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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/accessors.h" | 9 #include "src/accessors.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 Handle<Context> current(isolate->context()); | 706 Handle<Context> current(isolate->context()); |
707 Handle<Context> context = isolate->factory()->NewWithContext( | 707 Handle<Context> context = isolate->factory()->NewWithContext( |
708 function, current, scope_info, extension_object); | 708 function, current, scope_info, extension_object); |
709 isolate->set_context(*context); | 709 isolate->set_context(*context); |
710 return *context; | 710 return *context; |
711 } | 711 } |
712 | 712 |
713 RUNTIME_FUNCTION(Runtime_PushModuleContext) { | 713 RUNTIME_FUNCTION(Runtime_PushModuleContext) { |
714 HandleScope scope(isolate); | 714 HandleScope scope(isolate); |
715 DCHECK_EQ(3, args.length()); | 715 DCHECK_EQ(3, args.length()); |
716 CONVERT_ARG_HANDLE_CHECKED(JSModule, module, 0); | 716 CONVERT_ARG_HANDLE_CHECKED(Module, module, 0); |
717 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 1); | 717 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 1); |
718 CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 2); | 718 CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 2); |
719 DCHECK(function->context() == isolate->context()); | 719 DCHECK(function->context() == isolate->context()); |
720 | 720 |
721 Handle<Context> context = | 721 Handle<Context> context = |
722 isolate->factory()->NewModuleContext(module, function, scope_info); | 722 isolate->factory()->NewModuleContext(module, function, scope_info); |
723 isolate->set_context(*context); | 723 isolate->set_context(*context); |
724 return *context; | 724 return *context; |
725 } | 725 } |
726 | 726 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { | 956 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { |
957 HandleScope scope(isolate); | 957 HandleScope scope(isolate); |
958 DCHECK_EQ(2, args.length()); | 958 DCHECK_EQ(2, args.length()); |
959 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); | 959 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
960 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 960 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
961 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); | 961 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); |
962 } | 962 } |
963 | 963 |
964 } // namespace internal | 964 } // namespace internal |
965 } // namespace v8 | 965 } // namespace v8 |
OLD | NEW |