| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 target->set_context(*context); | 197 target->set_context(*context); |
| 198 | 198 |
| 199 int number_of_literals = source->NumberOfLiterals(); | 199 int number_of_literals = source->NumberOfLiterals(); |
| 200 Handle<LiteralsArray> literals = | 200 Handle<LiteralsArray> literals = |
| 201 LiteralsArray::New(isolate, handle(target_shared->feedback_vector()), | 201 LiteralsArray::New(isolate, handle(target_shared->feedback_vector()), |
| 202 number_of_literals, TENURED); | 202 number_of_literals, TENURED); |
| 203 target->set_literals(*literals); | 203 target->set_literals(*literals); |
| 204 | 204 |
| 205 if (isolate->logger()->is_logging_code_events() || | 205 if (isolate->logger()->is_logging_code_events() || |
| 206 isolate->cpu_profiler()->is_profiling()) { | 206 isolate->cpu_profiler()->is_profiling()) { |
| 207 isolate->logger()->LogExistingFunction(source_shared, | 207 isolate->logger()->LogExistingFunction( |
| 208 Handle<Code>(source_shared->code())); | 208 source_shared, Handle<AbstractCode>(source_shared->abstract_code())); |
| 209 } | 209 } |
| 210 | 210 |
| 211 return *target; | 211 return *target; |
| 212 } | 212 } |
| 213 | 213 |
| 214 | 214 |
| 215 // Set the native flag on the function. | 215 // Set the native flag on the function. |
| 216 // This is used to decide if we should transform null and undefined | 216 // This is used to decide if we should transform null and undefined |
| 217 // into the global object when doing call and apply. | 217 // into the global object when doing call and apply. |
| 218 RUNTIME_FUNCTION(Runtime_SetNativeFlag) { | 218 RUNTIME_FUNCTION(Runtime_SetNativeFlag) { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 DCHECK_EQ(1, args.length()); | 300 DCHECK_EQ(1, args.length()); |
| 301 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); | 301 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
| 302 return function->IsJSBoundFunction() | 302 return function->IsJSBoundFunction() |
| 303 ? *JSBoundFunction::ToString( | 303 ? *JSBoundFunction::ToString( |
| 304 Handle<JSBoundFunction>::cast(function)) | 304 Handle<JSBoundFunction>::cast(function)) |
| 305 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); | 305 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); |
| 306 } | 306 } |
| 307 | 307 |
| 308 } // namespace internal | 308 } // namespace internal |
| 309 } // namespace v8 | 309 } // namespace v8 |
| OLD | NEW |