| 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/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 return *result; | 573 return *result; |
| 574 } | 574 } |
| 575 | 575 |
| 576 | 576 |
| 577 RUNTIME_FUNCTION(Runtime_NewSloppyArguments) { | 577 RUNTIME_FUNCTION(Runtime_NewSloppyArguments) { |
| 578 HandleScope scope(isolate); | 578 HandleScope scope(isolate); |
| 579 DCHECK(args.length() == 3); | 579 DCHECK(args.length() == 3); |
| 580 CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0); | 580 CONVERT_ARG_HANDLE_CHECKED(JSFunction, callee, 0); |
| 581 Object** parameters = reinterpret_cast<Object**>(args[1]); | 581 Object** parameters = reinterpret_cast<Object**>(args[1]); |
| 582 CONVERT_SMI_ARG_CHECKED(argument_count, 2); | 582 CONVERT_SMI_ARG_CHECKED(argument_count, 2); |
| 583 #ifdef DEBUG | |
| 584 // This runtime function does not materialize the correct arguments when the | |
| 585 // caller has been inlined, better make sure we are not hitting that case. | |
| 586 JavaScriptFrameIterator it(isolate); | |
| 587 DCHECK(!it.frame()->HasInlinedFrames()); | |
| 588 #endif // DEBUG | |
| 589 ParameterArguments argument_getter(parameters); | 583 ParameterArguments argument_getter(parameters); |
| 590 return *NewSloppyArguments(isolate, callee, argument_getter, argument_count); | 584 return *NewSloppyArguments(isolate, callee, argument_getter, argument_count); |
| 591 } | 585 } |
| 592 | 586 |
| 593 | 587 |
| 594 RUNTIME_FUNCTION(Runtime_NewClosure) { | 588 RUNTIME_FUNCTION(Runtime_NewClosure) { |
| 595 HandleScope scope(isolate); | 589 HandleScope scope(isolate); |
| 596 DCHECK_EQ(1, args.length()); | 590 DCHECK_EQ(1, args.length()); |
| 597 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0); | 591 CONVERT_ARG_HANDLE_CHECKED(SharedFunctionInfo, shared, 0); |
| 598 Handle<Context> context(isolate->context(), isolate); | 592 Handle<Context> context(isolate->context(), isolate); |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 DCHECK_EQ(2, args.length()); | 1034 DCHECK_EQ(2, args.length()); |
| 1041 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); | 1035 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
| 1042 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 1036 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
| 1043 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, value, | 1037 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, value, |
| 1044 StoreLookupSlot(name, value, STRICT)); | 1038 StoreLookupSlot(name, value, STRICT)); |
| 1045 return *value; | 1039 return *value; |
| 1046 } | 1040 } |
| 1047 | 1041 |
| 1048 } // namespace internal | 1042 } // namespace internal |
| 1049 } // namespace v8 | 1043 } // namespace v8 |
| OLD | NEW |