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

Unified Diff: src/compiler.h

Issue 1480003002: [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: Add patch from Orion for interpreter cementation test. Disable obsolete/invalid tests. 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/code-stubs-hydrogen.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index a2e85f262679bc5a00775ae2ae7439a4a5ed9076..759728b0a285f68bdb1aec751a77de9fce15ceba 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -288,19 +288,18 @@ class CompilationInfo {
(FLAG_trap_on_stub_deopt && IsStub());
}
- bool has_global_object() const {
- return !closure().is_null() &&
- (closure()->context()->global_object() != NULL);
+ bool has_native_context() const {
+ return !closure().is_null() && (closure()->native_context() != nullptr);
}
- JSGlobalObject* global_object() const {
- return has_global_object() ? closure()->context()->global_object() : NULL;
+ Context* native_context() const {
+ return has_native_context() ? closure()->native_context() : nullptr;
}
- bool has_native_context() const { return has_global_object(); }
+ bool has_global_object() const { return has_native_context(); }
- Context* native_context() const {
- return has_native_context() ? global_object()->native_context() : nullptr;
+ JSGlobalObject* global_object() const {
+ return has_global_object() ? native_context()->global_object() : nullptr;
}
// Accessors for the different compilation modes.
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698