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

Unified Diff: src/bootstrapper.h

Issue 1213203007: Create a internal, global native context used only for generated code stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 5 years, 5 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 | « BUILD.gn ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.h
diff --git a/src/bootstrapper.h b/src/bootstrapper.h
index cb0d918b171e3b222f37f648e8ace256a1636998..ce8db3a7d2c1d1fa7ffa161848463e5ccdd32620 100644
--- a/src/bootstrapper.h
+++ b/src/bootstrapper.h
@@ -61,6 +61,7 @@ class SourceCodeCache final BASE_EMBEDDED {
DISALLOW_COPY_AND_ASSIGN(SourceCodeCache);
};
+enum ContextType { FULL_CONTEXT, THIN_CONTEXT };
// The Boostrapper is the public interface for creating a JavaScript global
// context.
@@ -78,7 +79,10 @@ class Bootstrapper final {
Handle<Context> CreateEnvironment(
MaybeHandle<JSGlobalProxy> maybe_global_proxy,
v8::Local<v8::ObjectTemplate> global_object_template,
- v8::ExtensionConfiguration* extensions);
+ v8::ExtensionConfiguration* extensions,
+ ContextType context_type = FULL_CONTEXT);
+
+ bool CreateCodeStubContext(Isolate* isolate);
// Detach the environment from its outer global object.
void DetachGlobal(Handle<Context> env);
@@ -105,6 +109,15 @@ class Bootstrapper final {
SourceCodeCache* extensions_cache() { return &extensions_cache_; }
+ static bool CompileNative(Isolate* isolate, Vector<const char> name,
+ Handle<JSObject> receiver, Handle<String> source,
+ int argc, Handle<Object> argv[]);
+ static bool CompileBuiltin(Isolate* isolate, int index);
+ static bool CompileExperimentalBuiltin(Isolate* isolate, int index);
+ static bool CompileExtraBuiltin(Isolate* isolate, int index);
+ static bool CompileCodeStubBuiltin(Isolate* isolate, int index);
+ static bool InstallCodeStubNatives(Isolate* isolate);
+
private:
Isolate* isolate_;
typedef int NestingCounterType;
« no previous file with comments | « BUILD.gn ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698