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

Unified Diff: runtime/vm/intermediate_language.h

Issue 1576583003: More source position improvements and tests (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') | runtime/vm/parser.cc » ('j') | 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 afbc9b2cc1b76a4c7c34e769d89620ff82dccbdc..bc01c87c03f2d6ccbc719bc3efa59500a481a49d 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -43,7 +43,8 @@ class UnboxIntegerInstr;
#define CLASSIFYING_TOKEN_POSITIONS(V) \
V(Box, -2) \
V(ParallelMove, -3) \
- V(TempMove, -4)
+ V(TempMove, -4) \
+ V(Constant, -5)
// COMPILE_ASSERT that all CLASSIFYING_TOKEN_POSITIONS are less than
// Scanner::kNoSourcePos.
@@ -2582,7 +2583,7 @@ class ConstraintInstr : public TemplateDefinition<1, NoThrow> {
class ConstantInstr : public TemplateDefinition<0, NoThrow, Pure> {
public:
ConstantInstr(const Object& value,
- intptr_t token_pos = Scanner::kNoSourcePos);
+ intptr_t token_pos = ClassifyingTokenPositions::kConstant);
DECLARE_INSTRUCTION(Constant)
virtual CompileType ComputeType() const;
@@ -2599,6 +2600,8 @@ class ConstantInstr : public TemplateDefinition<0, NoThrow, Pure> {
virtual bool AttributesEqual(Instruction* other) const;
+ virtual intptr_t token_pos() const { return token_pos_; }
+
private:
const Object& value_;
const intptr_t token_pos_;
« no previous file with comments | « runtime/vm/flow_graph_builder_test.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698