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

Unified Diff: runtime/vm/object.h

Issue 2489723003: Run field initializers for new instance fields after a reload (Closed)
Patch Set: Fix a comment Created 4 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 | « runtime/vm/isolate_reload_test.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 e06c9b05e2e5c8342cf3d4de7fa84b557416e3e0..501cc90e5783b7f034114c24510cf7ea2f5e0862 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1030,7 +1030,10 @@ class Class : public Object {
}
// Asserts that the class of the super type has been resolved.
- RawClass* SuperClass() const;
+ // |original_classes| only has an effect when reloading. If true and we
+ // are reloading, it will prefer the original classes to the replacement
+ // classes.
+ RawClass* SuperClass(bool original_classes = false) const;
RawType* mixin() const { return raw_ptr()->mixin_; }
void set_mixin(const Type& value) const;
@@ -1119,7 +1122,10 @@ class Class : public Object {
// Returns an array of all instance fields of this class and its superclasses
// indexed by offset in words.
- RawArray* OffsetToFieldMap() const;
+ // |original_classes| only has an effect when reloading. If true and we
+ // are reloading, it will prefer the original classes to the replacement
+ // classes.
+ RawArray* OffsetToFieldMap(bool original_classes = false) const;
// Returns true if non-static fields are defined.
bool HasInstanceFields() const;
@@ -2741,6 +2747,11 @@ class Function : public Object {
return RoundedAllocationSize(sizeof(RawFunction));
}
+ static RawFunction* EvaluateHelper(const Class& cls,
+ const String& expr,
+ const Array& param_names,
+ bool is_static);
+
static RawFunction* New(const String& name,
RawFunction::Kind kind,
bool is_static,
@@ -3130,6 +3141,8 @@ class Field : public Object {
TokenPosition token_pos() const { return raw_ptr()->token_pos_; }
+ RawString* InitializingExpression() const;
+
bool has_initializer() const {
return HasInitializerBit::decode(raw_ptr()->kind_bits_);
}
@@ -3490,6 +3503,7 @@ class Script : public Object {
RawLibrary* FindLibrary() const;
RawString* GetLine(intptr_t line_number,
Heap::Space space = Heap::kNew) const;
+ RawString* GetSnippet(TokenPosition from, TokenPosition to) const;
RawString* GetSnippet(intptr_t from_line,
intptr_t from_column,
intptr_t to_line,
« no previous file with comments | « runtime/vm/isolate_reload_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698