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

Unified Diff: runtime/vm/ast.h

Issue 2618823002: VM: Fix bug in deferred loading. (Closed)
Patch Set: add assertion Created 3 years, 11 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/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
diff --git a/runtime/vm/ast.h b/runtime/vm/ast.h
index ef265639dc34d025ec93bbf489975616f0e8a1bd..ca758563d230687bdae37a0cf3fed89061378328 100644
--- a/runtime/vm/ast.h
+++ b/runtime/vm/ast.h
@@ -564,14 +564,18 @@ class ClosureNode : public AstNode {
class PrimaryNode : public AstNode {
public:
PrimaryNode(TokenPosition token_pos, const Object& primary)
- : AstNode(token_pos), primary_(primary), is_deferred_reference_(false) {
+ : AstNode(token_pos), primary_(primary), prefix_(NULL) {
ASSERT(primary_.IsNotTemporaryScopedHandle());
}
const Object& primary() const { return primary_; }
- void set_is_deferred(bool value) { is_deferred_reference_ = value; }
- bool is_deferred_reference() const { return is_deferred_reference_; }
+ void set_prefix(const LibraryPrefix* prefix) {
+ ASSERT(prefix->IsNotTemporaryScopedHandle());
+ prefix_ = prefix;
+ }
+ const LibraryPrefix* prefix() const { return prefix_; }
+ bool is_deferred_reference() const { return prefix_ != NULL; }
bool IsSuper() const {
return primary().IsString() && (primary().raw() == Symbols::Super().raw());
@@ -583,7 +587,7 @@ class PrimaryNode : public AstNode {
private:
const Object& primary_;
- bool is_deferred_reference_;
+ const LibraryPrefix* prefix_;
DISALLOW_IMPLICIT_CONSTRUCTORS(PrimaryNode);
};
« no previous file with comments | « no previous file | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698