Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: src/runtime/runtime-function.cc

Issue 1207583002: Revert "Keep a canonical list of shared function infos." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/snapshot/serialize.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 source_shared->set_dont_flush(true); 225 source_shared->set_dont_flush(true);
226 226
227 // Set the code, scope info, formal parameter count, and the length 227 // Set the code, scope info, formal parameter count, and the length
228 // of the target shared function info. 228 // of the target shared function info.
229 target_shared->ReplaceCode(source_shared->code()); 229 target_shared->ReplaceCode(source_shared->code());
230 target_shared->set_scope_info(source_shared->scope_info()); 230 target_shared->set_scope_info(source_shared->scope_info());
231 target_shared->set_length(source_shared->length()); 231 target_shared->set_length(source_shared->length());
232 target_shared->set_feedback_vector(source_shared->feedback_vector()); 232 target_shared->set_feedback_vector(source_shared->feedback_vector());
233 target_shared->set_internal_formal_parameter_count( 233 target_shared->set_internal_formal_parameter_count(
234 source_shared->internal_formal_parameter_count()); 234 source_shared->internal_formal_parameter_count());
235 target_shared->set_script(source_shared->script());
235 target_shared->set_start_position_and_type( 236 target_shared->set_start_position_and_type(
236 source_shared->start_position_and_type()); 237 source_shared->start_position_and_type());
237 target_shared->set_end_position(source_shared->end_position()); 238 target_shared->set_end_position(source_shared->end_position());
238 bool was_native = target_shared->native(); 239 bool was_native = target_shared->native();
239 target_shared->set_compiler_hints(source_shared->compiler_hints()); 240 target_shared->set_compiler_hints(source_shared->compiler_hints());
240 target_shared->set_opt_count_and_bailout_reason( 241 target_shared->set_opt_count_and_bailout_reason(
241 source_shared->opt_count_and_bailout_reason()); 242 source_shared->opt_count_and_bailout_reason());
242 target_shared->set_native(was_native); 243 target_shared->set_native(was_native);
243 target_shared->set_profiler_ticks(source_shared->profiler_ticks()); 244 target_shared->set_profiler_ticks(source_shared->profiler_ticks());
244 SharedFunctionInfo::SetScript(
245 target_shared, Handle<Object>(source_shared->script(), isolate));
246 245
247 // Set the code of the target function. 246 // Set the code of the target function.
248 target->ReplaceCode(source_shared->code()); 247 target->ReplaceCode(source_shared->code());
249 DCHECK(target->next_function_link()->IsUndefined()); 248 DCHECK(target->next_function_link()->IsUndefined());
250 249
251 // Make sure we get a fresh copy of the literal vector to avoid cross 250 // Make sure we get a fresh copy of the literal vector to avoid cross
252 // context contamination. 251 // context contamination.
253 Handle<Context> context(source->context()); 252 Handle<Context> context(source->context());
254 int number_of_literals = source->NumberOfLiterals(); 253 int number_of_literals = source->NumberOfLiterals();
255 Handle<FixedArray> literals = 254 Handle<FixedArray> literals =
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 623
625 624
626 RUNTIME_FUNCTION(Runtime_ThrowStrongModeTooFewArguments) { 625 RUNTIME_FUNCTION(Runtime_ThrowStrongModeTooFewArguments) {
627 HandleScope scope(isolate); 626 HandleScope scope(isolate);
628 DCHECK(args.length() == 0); 627 DCHECK(args.length() == 0);
629 THROW_NEW_ERROR_RETURN_FAILURE(isolate, 628 THROW_NEW_ERROR_RETURN_FAILURE(isolate,
630 NewTypeError(MessageTemplate::kStrongArity)); 629 NewTypeError(MessageTemplate::kStrongArity));
631 } 630 }
632 } // namespace internal 631 } // namespace internal
633 } // namespace v8 632 } // namespace v8
OLDNEW
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/snapshot/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698