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

Unified Diff: runtime/vm/object.h

Issue 2780393005: Move the canonical empty context to the VM isolate. (Closed)
Patch Set: . Created 3 years, 9 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 | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 0314d770120306de871a98e63cb2b55bb1f069fe..908f520cddebe4c6cade85866602fda5167abb1c 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -374,6 +374,11 @@ class Object {
return *zero_array_;
}
+ static const Context& empty_context() {
+ ASSERT(empty_context_ != NULL);
+ return *empty_context_;
+ }
+
static const ContextScope& empty_context_scope() {
ASSERT(empty_context_scope_ != NULL);
return *empty_context_scope_;
@@ -785,6 +790,7 @@ class Object {
static TypeArguments* null_type_arguments_;
static Array* empty_array_;
static Array* zero_array_;
+ static Context* empty_context_;
static ContextScope* empty_context_scope_;
static ObjectPool* empty_object_pool_;
static PcDescriptors* empty_descriptors_;
@@ -5110,6 +5116,7 @@ class Context : public Object {
FINAL_HEAP_OBJECT_IMPLEMENTATION(Context, Object);
friend class Class;
+ friend class Object;
};
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698