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

Unified Diff: src/compiler.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/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 759728b0a285f68bdb1aec751a77de9fce15ceba..a2e85f262679bc5a00775ae2ae7439a4a5ed9076 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -288,18 +288,19 @@
(FLAG_trap_on_stub_deopt && IsStub());
}
- bool has_native_context() const {
- return !closure().is_null() && (closure()->native_context() != nullptr);
- }
+ bool has_global_object() const {
+ return !closure().is_null() &&
+ (closure()->context()->global_object() != NULL);
+ }
+
+ JSGlobalObject* global_object() const {
+ return has_global_object() ? closure()->context()->global_object() : NULL;
+ }
+
+ bool has_native_context() const { return has_global_object(); }
Context* native_context() const {
- return has_native_context() ? closure()->native_context() : nullptr;
- }
-
- bool has_global_object() const { return has_native_context(); }
-
- JSGlobalObject* global_object() const {
- return has_global_object() ? native_context()->global_object() : nullptr;
+ return has_native_context() ? global_object()->native_context() : 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