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

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

Issue 2661933003: [ESnext] Parse dynamic import expression (Closed)
Patch Set: review fixes Created 3 years, 10 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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/arguments.h" 7 #include "src/arguments.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
11 11
12 RUNTIME_FUNCTION(Runtime_DynamicImportCall) {
13 HandleScope scope(isolate);
14 DCHECK_EQ(1, args.length());
15 return isolate->heap()->undefined_value();
neis 2017/01/31 10:47:57 Maybe add a TODO here :)
gsathya 2017/01/31 18:26:07 Done.
16 }
17
12 RUNTIME_FUNCTION(Runtime_GetModuleNamespace) { 18 RUNTIME_FUNCTION(Runtime_GetModuleNamespace) {
13 HandleScope scope(isolate); 19 HandleScope scope(isolate);
14 DCHECK_EQ(1, args.length()); 20 DCHECK_EQ(1, args.length());
15 CONVERT_SMI_ARG_CHECKED(module_request, 0); 21 CONVERT_SMI_ARG_CHECKED(module_request, 0);
16 Handle<Module> module(isolate->context()->module()); 22 Handle<Module> module(isolate->context()->module());
17 return *Module::GetModuleNamespace(module, module_request); 23 return *Module::GetModuleNamespace(module, module_request);
18 } 24 }
19 25
20 RUNTIME_FUNCTION(Runtime_LoadModuleVariable) { 26 RUNTIME_FUNCTION(Runtime_LoadModuleVariable) {
21 HandleScope scope(isolate); 27 HandleScope scope(isolate);
22 DCHECK_EQ(1, args.length()); 28 DCHECK_EQ(1, args.length());
23 CONVERT_SMI_ARG_CHECKED(index, 0); 29 CONVERT_SMI_ARG_CHECKED(index, 0);
24 Handle<Module> module(isolate->context()->module()); 30 Handle<Module> module(isolate->context()->module());
25 return *Module::LoadVariable(module, index); 31 return *Module::LoadVariable(module, index);
26 } 32 }
27 33
28 RUNTIME_FUNCTION(Runtime_StoreModuleVariable) { 34 RUNTIME_FUNCTION(Runtime_StoreModuleVariable) {
29 HandleScope scope(isolate); 35 HandleScope scope(isolate);
30 DCHECK_EQ(2, args.length()); 36 DCHECK_EQ(2, args.length());
31 CONVERT_SMI_ARG_CHECKED(index, 0); 37 CONVERT_SMI_ARG_CHECKED(index, 0);
32 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); 38 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1);
33 Handle<Module> module(isolate->context()->module()); 39 Handle<Module> module(isolate->context()->module());
34 Module::StoreVariable(module, index, value); 40 Module::StoreVariable(module, index, value);
35 return isolate->heap()->undefined_value(); 41 return isolate->heap()->undefined_value();
36 } 42 }
37 43
38 } // namespace internal 44 } // namespace internal
39 } // namespace v8 45 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698