| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 | 267 |
| 268 RUNTIME_FUNCTION(Runtime_Call) { | 268 RUNTIME_FUNCTION(Runtime_Call) { |
| 269 HandleScope scope(isolate); | 269 HandleScope scope(isolate); |
| 270 DCHECK_LE(2, args.length()); | 270 DCHECK_LE(2, args.length()); |
| 271 int const argc = args.length() - 2; | 271 int const argc = args.length() - 2; |
| 272 CONVERT_ARG_HANDLE_CHECKED(Object, target, 0); | 272 CONVERT_ARG_HANDLE_CHECKED(Object, target, 0); |
| 273 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 1); | 273 CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 1); |
| 274 ScopedVector<Handle<Object>> argv(argc); | 274 ScopedVector<Handle<Object>> argv(argc); |
| 275 for (int i = 0; i < argc; ++i) { | 275 for (int i = 0; i < argc; ++i) { |
| 276 argv[i] = args.at<Object>(2 + i); | 276 argv[i] = args.at(2 + i); |
| 277 } | 277 } |
| 278 RETURN_RESULT_OR_FAILURE( | 278 RETURN_RESULT_OR_FAILURE( |
| 279 isolate, Execution::Call(isolate, target, receiver, argc, argv.start())); | 279 isolate, Execution::Call(isolate, target, receiver, argc, argv.start())); |
| 280 } | 280 } |
| 281 | 281 |
| 282 | 282 |
| 283 // ES6 section 9.2.1.2, OrdinaryCallBindThis for sloppy callee. | 283 // ES6 section 9.2.1.2, OrdinaryCallBindThis for sloppy callee. |
| 284 RUNTIME_FUNCTION(Runtime_ConvertReceiver) { | 284 RUNTIME_FUNCTION(Runtime_ConvertReceiver) { |
| 285 HandleScope scope(isolate); | 285 HandleScope scope(isolate); |
| 286 DCHECK(args.length() == 1); | 286 DCHECK(args.length() == 1); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 302 DCHECK_EQ(1, args.length()); | 302 DCHECK_EQ(1, args.length()); |
| 303 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); | 303 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
| 304 return function->IsJSBoundFunction() | 304 return function->IsJSBoundFunction() |
| 305 ? *JSBoundFunction::ToString( | 305 ? *JSBoundFunction::ToString( |
| 306 Handle<JSBoundFunction>::cast(function)) | 306 Handle<JSBoundFunction>::cast(function)) |
| 307 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); | 307 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); |
| 308 } | 308 } |
| 309 | 309 |
| 310 } // namespace internal | 310 } // namespace internal |
| 311 } // namespace v8 | 311 } // namespace v8 |
| OLD | NEW |