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

Unified Diff: runtime/vm/ast.h

Issue 2618823002: VM: Fix bug in deferred loading. (Closed)
Patch Set: 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') | runtime/vm/parser.cc » ('J')
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..0560dbcc6e8fb3ea3fcb1825a4d07c68f04d556b 100644
--- a/runtime/vm/ast.h
+++ b/runtime/vm/ast.h
@@ -564,14 +564,15 @@ 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) { prefix_ = prefix; }
rmacnak 2017/01/05 22:50:11 prefix -> deferred_prefix ASSERT(prefix.is_deferr
Florian Schneider 2017/01/06 02:12:12 Done.
+ 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 +584,7 @@ class PrimaryNode : public AstNode {
private:
const Object& primary_;
- bool is_deferred_reference_;
+ const LibraryPrefix* prefix_;
hausner 2017/01/05 21:50:44 We don't typically store pointers to handles in th
Florian Schneider 2017/01/05 22:07:16 I'd have to allocate an extra handle per PrimaryNo
hausner 2017/01/05 22:39:40 Fine with me. Yes, otherwise you'd have to allocat
DISALLOW_IMPLICIT_CONSTRUCTORS(PrimaryNode);
};
« no previous file with comments | « no previous file | runtime/vm/parser.h » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698