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

Unified Diff: runtime/vm/object.h

Issue 1323813004: Changes to prepare for allowing script snapshots to be taken after running the main application (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review-comments Created 5 years, 4 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 | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/raw_object.h » ('J')
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 41dc35df6da8cfa88ca3d1f1f0104e2dc6351fdb..4ae0b231a07d7f2ce357b07b15144ba704069dcc 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -401,6 +401,11 @@ class Object {
return *zero_array_;
}
+ static const ContextScope& empty_context_scope() {
+ ASSERT(empty_context_scope_ != NULL);
+ return *empty_context_scope_;
+ }
+
static const ObjectPool& empty_object_pool() {
ASSERT(empty_object_pool_ != NULL);
return *empty_object_pool_;
@@ -791,6 +796,7 @@ class Object {
static TypeArguments* null_type_arguments_;
static Array* empty_array_;
static Array* zero_array_;
+ static ContextScope* empty_context_scope_;
static ObjectPool* empty_object_pool_;
static PcDescriptors* empty_descriptors_;
static LocalVarDescriptors* empty_var_descriptors_;
@@ -4508,13 +4514,17 @@ class ContextScope : public Object {
sizeof(RawContextScope) + (len * kBytesPerElement));
}
- static RawContextScope* New(intptr_t num_variables);
+ static RawContextScope* New(intptr_t num_variables, bool is_implicit);
private:
void set_num_variables(intptr_t num_variables) const {
StoreNonPointer(&raw_ptr()->num_variables_, num_variables);
}
+ void set_is_implicit(bool is_implicit) const {
+ StoreNonPointer(&raw_ptr()->is_implicit_, is_implicit);
+ }
+
const RawContextScope::VariableDesc* VariableDescAddr(intptr_t index) const {
ASSERT((index >= 0) && (index < num_variables()));
return raw_ptr()->VariableDescAddr(index);
@@ -4522,6 +4532,7 @@ class ContextScope : public Object {
FINAL_HEAP_OBJECT_IMPLEMENTATION(ContextScope, Object);
friend class Class;
+ friend class Object;
};
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698