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

Unified Diff: runtime/vm/intermediate_language.h

Issue 1568713002: Add token position to StoreStaticFieldInstr (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.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 502bcd28d180102eb282f7569779529d6ef8892e..f9f5b9cd170ad5cdd32fb125238d3771b691a4ab 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -3277,7 +3277,7 @@ class LoadLocalInstr : public TemplateDefinition<0, NoThrow> {
private:
const LocalVariable& local_;
bool is_last_;
- intptr_t token_pos_;
+ const intptr_t token_pos_;
DISALLOW_COPY_AND_ASSIGN(LoadLocalInstr);
};
@@ -3392,7 +3392,7 @@ class StoreLocalInstr : public TemplateDefinition<1, NoThrow> {
const LocalVariable& local_;
bool is_dead_;
bool is_last_;
- intptr_t token_pos_;
+ const intptr_t token_pos_;
DISALLOW_COPY_AND_ASSIGN(StoreLocalInstr);
};
@@ -3679,7 +3679,7 @@ class LoadStaticFieldInstr : public TemplateDefinition<1, NoThrow> {
virtual intptr_t token_pos() const { return token_pos_; }
private:
- intptr_t token_pos_;
+ const intptr_t token_pos_;
DISALLOW_COPY_AND_ASSIGN(LoadStaticFieldInstr);
};
@@ -3687,8 +3687,11 @@ class LoadStaticFieldInstr : public TemplateDefinition<1, NoThrow> {
class StoreStaticFieldInstr : public TemplateDefinition<1, NoThrow> {
public:
- StoreStaticFieldInstr(const Field& field, Value* value)
- : field_(field) {
+ StoreStaticFieldInstr(const Field& field,
+ Value* value,
+ intptr_t token_pos = Scanner::kNoSourcePos)
+ : field_(field),
+ token_pos_(token_pos) {
ASSERT(field.IsZoneHandle());
SetInputAt(kValuePos, value);
}
@@ -3711,6 +3714,8 @@ class StoreStaticFieldInstr : public TemplateDefinition<1, NoThrow> {
// are marked as having no side-effects.
virtual EffectSet Effects() const { return EffectSet::None(); }
+ virtual intptr_t token_pos() const { return token_pos_; }
+
private:
bool CanValueBeSmi() const {
const intptr_t cid = value()->Type()->ToNullableCid();
@@ -3720,6 +3725,7 @@ class StoreStaticFieldInstr : public TemplateDefinition<1, NoThrow> {
}
const Field& field_;
+ const intptr_t token_pos_;
DISALLOW_COPY_AND_ASSIGN(StoreStaticFieldInstr);
};
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698