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

Unified Diff: src/d8.h

Issue 2351113004: [modules] Expand API to allow linking and use it in d8 (Closed)
Patch Set: Use StrictEquals, remove check for bad instantiation behavior 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.h
diff --git a/src/d8.h b/src/d8.h
index 085566128e56c1f197a439d6254e8a9c8e6c4305..a9e617ada81ffc5b3f4f6e5eff97319a83c7b87a 100644
--- a/src/d8.h
+++ b/src/d8.h
@@ -5,6 +5,9 @@
#ifndef V8_D8_H_
#define V8_D8_H_
+#include <map>
+#include <string>
+
#include "src/allocation.h"
#include "src/base/hashmap.h"
#include "src/base/platform/time.h"
@@ -313,15 +316,13 @@ class ShellOptions {
class Shell : public i::AllStatic {
public:
- enum SourceType { SCRIPT, MODULE };
-
static MaybeLocal<Script> CompileString(
Isolate* isolate, Local<String> source, Local<Value> name,
v8::ScriptCompiler::CompileOptions compile_options);
static bool ExecuteString(Isolate* isolate, Local<String> source,
Local<Value> name, bool print_result,
- bool report_exceptions,
- SourceType source_type = SCRIPT);
+ bool report_exceptions);
+ static bool ExecuteModule(Isolate* isolate, const char* file_name);
static const char* ToCString(const v8::String::Utf8Value& value);
static void ReportException(Isolate* isolate, TryCatch* try_catch);
static Local<String> ReadFile(Isolate* isolate, const char* name);
@@ -454,6 +455,9 @@ class Shell : public i::AllStatic {
static Local<ObjectTemplate> CreateGlobalTemplate(Isolate* isolate);
static MaybeLocal<Context> CreateRealm(
const v8::FunctionCallbackInfo<v8::Value>& args);
+ static MaybeLocal<Module> FetchModuleTree(
+ Isolate* isolate, const std::string& file_name,
+ std::map<std::string, Global<Module>>* module_map);
};
« no previous file with comments | « src/api.cc ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698