OLD | NEW |
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/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 target_shared->set_length(source_shared->length()); | 272 target_shared->set_length(source_shared->length()); |
273 target_shared->set_feedback_vector(source_shared->feedback_vector()); | 273 target_shared->set_feedback_vector(source_shared->feedback_vector()); |
274 target_shared->set_formal_parameter_count( | 274 target_shared->set_formal_parameter_count( |
275 source_shared->formal_parameter_count()); | 275 source_shared->formal_parameter_count()); |
276 target_shared->set_script(source_shared->script()); | 276 target_shared->set_script(source_shared->script()); |
277 target_shared->set_start_position_and_type( | 277 target_shared->set_start_position_and_type( |
278 source_shared->start_position_and_type()); | 278 source_shared->start_position_and_type()); |
279 target_shared->set_end_position(source_shared->end_position()); | 279 target_shared->set_end_position(source_shared->end_position()); |
280 bool was_native = target_shared->native(); | 280 bool was_native = target_shared->native(); |
281 target_shared->set_compiler_hints(source_shared->compiler_hints()); | 281 target_shared->set_compiler_hints(source_shared->compiler_hints()); |
| 282 target_shared->set_opt_count_and_bailout_reason( |
| 283 source_shared->opt_count_and_bailout_reason()); |
282 target_shared->set_native(was_native); | 284 target_shared->set_native(was_native); |
283 target_shared->set_profiler_ticks(source_shared->profiler_ticks()); | 285 target_shared->set_profiler_ticks(source_shared->profiler_ticks()); |
284 | 286 |
285 // Set the code of the target function. | 287 // Set the code of the target function. |
286 target->ReplaceCode(source_shared->code()); | 288 target->ReplaceCode(source_shared->code()); |
287 DCHECK(target->next_function_link()->IsUndefined()); | 289 DCHECK(target->next_function_link()->IsUndefined()); |
288 | 290 |
289 // Make sure we get a fresh copy of the literal vector to avoid cross | 291 // Make sure we get a fresh copy of the literal vector to avoid cross |
290 // context contamination. | 292 // context contamination. |
291 Handle<Context> context(source->context()); | 293 Handle<Context> context(source->context()); |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 | 645 |
644 | 646 |
645 RUNTIME_FUNCTION(RuntimeReference_IsFunction) { | 647 RUNTIME_FUNCTION(RuntimeReference_IsFunction) { |
646 SealHandleScope shs(isolate); | 648 SealHandleScope shs(isolate); |
647 DCHECK(args.length() == 1); | 649 DCHECK(args.length() == 1); |
648 CONVERT_ARG_CHECKED(Object, obj, 0); | 650 CONVERT_ARG_CHECKED(Object, obj, 0); |
649 return isolate->heap()->ToBoolean(obj->IsJSFunction()); | 651 return isolate->heap()->ToBoolean(obj->IsJSFunction()); |
650 } | 652 } |
651 } | 653 } |
652 } // namespace v8::internal | 654 } // namespace v8::internal |
OLD | NEW |