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

Unified Diff: src/contexts.h

Issue 1478303002: Revert of [runtime] Replace global object link with native context link in all contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/compiler/verifier.cc ('k') | src/contexts.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.h
diff --git a/src/contexts.h b/src/contexts.h
index a9a9b7835b0bc8985333bc0f520104730c76abb1..75467cb1255fa4c89602fbdbe38a2f50fae8b160 100644
--- a/src/contexts.h
+++ b/src/contexts.h
@@ -223,6 +223,7 @@
V(PROXY_FUNCTION_INDEX, JSFunction, proxy_function) \
V(REGEXP_FUNCTION_INDEX, JSFunction, regexp_function) \
V(REGEXP_RESULT_MAP_INDEX, Map, regexp_result_map) \
+ V(RUNTIME_CONTEXT_INDEX, Context, runtime_context) \
V(SCRIPT_CONTEXT_TABLE_INDEX, ScriptContextTable, script_context_table) \
V(SCRIPT_FUNCTION_INDEX, JSFunction, script_function) \
V(SECURITY_TOKEN_INDEX, Object, security_token) \
@@ -367,12 +368,12 @@
// These slots are in all contexts.
CLOSURE_INDEX,
PREVIOUS_INDEX,
- // The extension slot is used for either the global object (in native
+ // The extension slot is used for either the global object (in global
// contexts), eval extension object (function contexts), subject of with
// (with contexts), or the variable name (catch contexts), the serialized
// scope info (block contexts), or the module instance (module contexts).
EXTENSION_INDEX,
- NATIVE_CONTEXT_INDEX,
+ GLOBAL_OBJECT_INDEX,
// These slots are only in native contexts.
#define NATIVE_CONTEXT_SLOT(index, type, name) index,
@@ -421,19 +422,18 @@
Context* declaration_context();
bool is_declaration_context();
+ inline JSGlobalObject* global_object();
+ inline void set_global_object(JSGlobalObject* object);
+
// Returns a JSGlobalProxy object or null.
JSObject* global_proxy();
void set_global_proxy(JSObject* global);
- // Get the JSGlobalObject object.
- JSGlobalObject* global_object();
-
// Get the script context by traversing the context chain.
Context* script_context();
- // Compute the native context.
- inline Context* native_context();
- inline void set_native_context(Context* context);
+ // Compute the native context by traversing the context chain.
+ Context* native_context();
// Predicates for context types. IsNativeContext is also defined on Object
// because we frequently have to know if arbitrary objects are natives
@@ -548,8 +548,8 @@
private:
#ifdef DEBUG
// Bootstrapping-aware type checks.
- static bool IsBootstrappingOrNativeContext(Isolate* isolate, Object* object);
static bool IsBootstrappingOrValidParentContext(Object* object, Context* kid);
+ static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
#endif
STATIC_ASSERT(kHeaderSize == Internals::kContextHeaderSize);
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/contexts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698