Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: src/runtime/runtime-scopes.cc

Issue 2302783002: [modules] Basic support of exports (Closed)
Patch Set: Disable module tests for deopt fuzzer. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, extension_object, 0); 692 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, extension_object, 0);
693 CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 1); 693 CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 1);
694 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 2); 694 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 2);
695 Handle<Context> current(isolate->context()); 695 Handle<Context> current(isolate->context());
696 Handle<Context> context = isolate->factory()->NewWithContext( 696 Handle<Context> context = isolate->factory()->NewWithContext(
697 function, current, scope_info, extension_object); 697 function, current, scope_info, extension_object);
698 isolate->set_context(*context); 698 isolate->set_context(*context);
699 return *context; 699 return *context;
700 } 700 }
701 701
702 RUNTIME_FUNCTION(Runtime_PushModuleContext) {
703 HandleScope scope(isolate);
704 DCHECK_EQ(3, args.length());
705 CONVERT_ARG_HANDLE_CHECKED(JSModule, module, 0);
706 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 1);
707 CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 2);
708 DCHECK(function->context() == isolate->context());
709
710 Handle<Context> context =
711 isolate->factory()->NewModuleContext(module, function, scope_info);
712 isolate->set_context(*context);
713 return *context;
714 }
702 715
703 RUNTIME_FUNCTION(Runtime_PushCatchContext) { 716 RUNTIME_FUNCTION(Runtime_PushCatchContext) {
704 HandleScope scope(isolate); 717 HandleScope scope(isolate);
705 DCHECK_EQ(4, args.length()); 718 DCHECK_EQ(4, args.length());
706 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); 719 CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
707 CONVERT_ARG_HANDLE_CHECKED(Object, thrown_object, 1); 720 CONVERT_ARG_HANDLE_CHECKED(Object, thrown_object, 1);
708 CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 2); 721 CONVERT_ARG_HANDLE_CHECKED(ScopeInfo, scope_info, 2);
709 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 3); 722 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 3);
710 Handle<Context> current(isolate->context()); 723 Handle<Context> current(isolate->context());
711 Handle<Context> context = isolate->factory()->NewCatchContext( 724 Handle<Context> context = isolate->factory()->NewCatchContext(
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) { 945 RUNTIME_FUNCTION(Runtime_StoreLookupSlot_Strict) {
933 HandleScope scope(isolate); 946 HandleScope scope(isolate);
934 DCHECK_EQ(2, args.length()); 947 DCHECK_EQ(2, args.length());
935 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); 948 CONVERT_ARG_HANDLE_CHECKED(String, name, 0);
936 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); 949 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
937 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT)); 950 RETURN_RESULT_OR_FAILURE(isolate, StoreLookupSlot(name, value, STRICT));
938 } 951 }
939 952
940 } // namespace internal 953 } // namespace internal
941 } // namespace v8 954 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-object.cc ('k') | test/cctest/interpreter/bytecode_expectations/CallRuntime.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698