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/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 MAYBE_RETURN( | 925 MAYBE_RETURN( |
926 JSReceiver::CreateDataProperty(&it, value, Object::THROW_ON_ERROR), | 926 JSReceiver::CreateDataProperty(&it, value, Object::THROW_ON_ERROR), |
927 isolate->heap()->exception()); | 927 isolate->heap()->exception()); |
928 return *value; | 928 return *value; |
929 } | 929 } |
930 | 930 |
931 RUNTIME_FUNCTION(Runtime_LoadModuleExport) { | 931 RUNTIME_FUNCTION(Runtime_LoadModuleExport) { |
932 HandleScope scope(isolate); | 932 HandleScope scope(isolate); |
933 DCHECK(args.length() == 1); | 933 DCHECK(args.length() == 1); |
934 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); | 934 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
935 Handle<JSModule> module(isolate->context()->module()); | 935 Handle<Module> module(isolate->context()->module()); |
936 return *JSModule::LoadExport(module, name); | 936 return *Module::LoadExport(module, name); |
937 } | 937 } |
938 | 938 |
939 RUNTIME_FUNCTION(Runtime_StoreModuleExport) { | 939 RUNTIME_FUNCTION(Runtime_StoreModuleExport) { |
940 HandleScope scope(isolate); | 940 HandleScope scope(isolate); |
941 DCHECK(args.length() == 2); | 941 DCHECK(args.length() == 2); |
942 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); | 942 CONVERT_ARG_HANDLE_CHECKED(String, name, 0); |
943 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 943 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
944 Handle<JSModule> module(isolate->context()->module()); | 944 Handle<Module> module(isolate->context()->module()); |
945 JSModule::StoreExport(module, name, value); | 945 Module::StoreExport(module, name, value); |
946 return isolate->heap()->undefined_value(); | 946 return isolate->heap()->undefined_value(); |
947 } | 947 } |
948 | 948 |
949 } // namespace internal | 949 } // namespace internal |
950 } // namespace v8 | 950 } // namespace v8 |
OLD | NEW |