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

Unified Diff: runtime/vm/kernel.h

Issue 2778693002: [kernel] Don't use kernel ast nodes as keys (Closed)
Patch Set: Address comments 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 | « no previous file | runtime/vm/kernel_binary.cc » ('j') | runtime/vm/kernel_to_il.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel.h
diff --git a/runtime/vm/kernel.h b/runtime/vm/kernel.h
index 9832194b7fcc1a4f3101a41ed08bcc2828196db3..e379105142ad173531552f2413917d3e6cbd4999 100644
--- a/runtime/vm/kernel.h
+++ b/runtime/vm/kernel.h
@@ -435,9 +435,14 @@ class TreeNode : public Node {
virtual void AcceptVisitor(Visitor* visitor);
virtual void AcceptTreeVisitor(TreeVisitor* visitor) = 0;
+ intptr_t kernel_offset() { return kernel_offset_; }
protected:
- TreeNode() {}
+ TreeNode() : kernel_offset_(-1) {}
+
+ // Offset for this node in the kernel-binary. If this node has a tag the
+ // offset includes the tag. Can be -1 to indicate "unknown" or invalid offset.
+ intptr_t kernel_offset_;
private:
DISALLOW_COPY_AND_ASSIGN(TreeNode);
@@ -2455,7 +2460,7 @@ class VariableDeclaration : public Statement {
};
static VariableDeclaration* ReadFrom(Reader* reader);
- static VariableDeclaration* ReadFromImpl(Reader* reader);
+ static VariableDeclaration* ReadFromImpl(Reader* reader, bool read_tag);
virtual ~VariableDeclaration();
« no previous file with comments | « no previous file | runtime/vm/kernel_binary.cc » ('j') | runtime/vm/kernel_to_il.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698