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

Unified Diff: include/v8.h

Issue 902093002: Add basic compilation support for modules (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add TODO Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 9b0688c1fcce054d3e825ef9899f0cacfa216448..bcaf954df39f3f7548b6df2126e04e6a540bdf05 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1308,6 +1308,24 @@ class V8_EXPORT ScriptCompiler {
* compared when it is being used.
*/
static uint32_t CachedDataVersionTag();
+
+ /**
+ * Compile an ES6 module.
+ *
+ * This is an experimental feature.
+ *
+ * TODO(adamk): Script is likely the wrong return value for this;
+ * should return some new Module type.
+ */
+ static Local<Script> CompileModule(
+ Isolate* isolate, Source* source,
+ CompileOptions options = kNoCompileOptions);
+
+ private:
+ static Local<UnboundScript> CompileUnboundInternal(Isolate* isolate,
+ Source* source,
+ CompileOptions options,
+ bool is_module);
};
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698