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

Unified Diff: runtime/vm/intermediate_language.h

Issue 1574363002: Use classifying token position for control flow IR instructions (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « runtime/vm/flow_graph_builder_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index bc01c87c03f2d6ccbc719bc3efa59500a481a49d..f8497d1c7413b24784eb05e5c565d4801791ccad 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -41,10 +41,13 @@ class UnboxIntegerInstr;
// These token positions are used to classify instructions that can't be
// directly tied to an actual source position.
#define CLASSIFYING_TOKEN_POSITIONS(V) \
- V(Box, -2) \
- V(ParallelMove, -3) \
- V(TempMove, -4) \
- V(Constant, -5)
+ V(Private, -2) \
+ V(Box, -3) \
+ V(ParallelMove, -4) \
+ V(TempMove, -5) \
+ V(Constant, -6) \
+ V(PushArgument, -7) \
+ V(ControlFlow, -8)
// COMPILE_ASSERT that all CLASSIFYING_TOKEN_POSITIONS are less than
// Scanner::kNoSourcePos.
@@ -1226,6 +1229,10 @@ class BlockEntryInstr : public Instruction {
return this;
}
+ virtual intptr_t token_pos() const {
+ return ClassifyingTokenPositions::kControlFlow;
+ }
+
// Helper to mutate the graph during inlining. This block should be
// replaced with new_block as a predecessor of all of this block's
// successors.
@@ -2075,6 +2082,10 @@ class PushArgumentInstr : public TemplateDefinition<1, NoThrow> {
virtual void PrintOperandsTo(BufferFormatter* f) const;
+ virtual intptr_t token_pos() const {
+ return ClassifyingTokenPositions::kPushArgument;
+ }
+
private:
DISALLOW_COPY_AND_ASSIGN(PushArgumentInstr);
};
@@ -2249,6 +2260,10 @@ class GotoInstr : public TemplateInstruction<0, NoThrow> {
virtual void PrintTo(BufferFormatter* f) const;
+ virtual intptr_t token_pos() const {
+ return ClassifyingTokenPositions::kControlFlow;
+ }
+
private:
BlockEntryInstr* block_;
JoinEntryInstr* successor_;
« no previous file with comments | « runtime/vm/flow_graph_builder_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698