| 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.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/frames-inl.h" | 10 #include "src/frames-inl.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // shared unoptimized code makes them impossible to enqueue in a list. | 161 // shared unoptimized code makes them impossible to enqueue in a list. |
| 162 DCHECK(target_shared->code()->gc_metadata() == NULL); | 162 DCHECK(target_shared->code()->gc_metadata() == NULL); |
| 163 DCHECK(source_shared->code()->gc_metadata() == NULL); | 163 DCHECK(source_shared->code()->gc_metadata() == NULL); |
| 164 target_shared->set_dont_flush(true); | 164 target_shared->set_dont_flush(true); |
| 165 source_shared->set_dont_flush(true); | 165 source_shared->set_dont_flush(true); |
| 166 | 166 |
| 167 // Set the code, scope info, formal parameter count, and the length | 167 // Set the code, scope info, formal parameter count, and the length |
| 168 // of the target shared function info. | 168 // of the target shared function info. |
| 169 target_shared->ReplaceCode(source_shared->code()); | 169 target_shared->ReplaceCode(source_shared->code()); |
| 170 if (source_shared->HasBytecodeArray()) { | 170 if (source_shared->HasBytecodeArray()) { |
| 171 target_shared->set_function_data(source_shared->bytecode_array()); | 171 target_shared->set_bytecode_array(source_shared->bytecode_array()); |
| 172 } | 172 } |
| 173 target_shared->set_scope_info(source_shared->scope_info()); | 173 target_shared->set_scope_info(source_shared->scope_info()); |
| 174 target_shared->set_length(source_shared->length()); | 174 target_shared->set_length(source_shared->length()); |
| 175 target_shared->set_feedback_vector(source_shared->feedback_vector()); | 175 target_shared->set_feedback_vector(source_shared->feedback_vector()); |
| 176 target_shared->set_internal_formal_parameter_count( | 176 target_shared->set_internal_formal_parameter_count( |
| 177 source_shared->internal_formal_parameter_count()); | 177 source_shared->internal_formal_parameter_count()); |
| 178 target_shared->set_start_position_and_type( | 178 target_shared->set_start_position_and_type( |
| 179 source_shared->start_position_and_type()); | 179 source_shared->start_position_and_type()); |
| 180 target_shared->set_end_position(source_shared->end_position()); | 180 target_shared->set_end_position(source_shared->end_position()); |
| 181 bool was_native = target_shared->native(); | 181 bool was_native = target_shared->native(); |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 DCHECK_EQ(1, args.length()); | 355 DCHECK_EQ(1, args.length()); |
| 356 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); | 356 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
| 357 return function->IsJSBoundFunction() | 357 return function->IsJSBoundFunction() |
| 358 ? *JSBoundFunction::ToString( | 358 ? *JSBoundFunction::ToString( |
| 359 Handle<JSBoundFunction>::cast(function)) | 359 Handle<JSBoundFunction>::cast(function)) |
| 360 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); | 360 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); |
| 361 } | 361 } |
| 362 | 362 |
| 363 } // namespace internal | 363 } // namespace internal |
| 364 } // namespace v8 | 364 } // namespace v8 |
| OLD | NEW |