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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 1564493002: Make Scanner::kNoSourcePos be a true sentinel value (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/debugger.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index fc3264f73803f73b2f0b5c582994155a13294668..87d54827c99ee5587f523c4fc5d7a645aa3ef52c 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2284,7 +2284,7 @@ LocalVariable* EffectGraphVisitor::EnterTempLocalScope(Value* value) {
char name[64];
OS::SNPrint(name, 64, ":tmp_local%" Pd, index);
LocalVariable* var =
- new(Z) LocalVariable(0,
+ new(Z) LocalVariable(Scanner::kNoSourcePos,
String::ZoneHandle(Z, Symbols::New(name)),
*value->Type()->ToAbstractType());
var->set_index(index);
@@ -4002,7 +4002,7 @@ void EffectGraphVisitor::VisitSequenceNode(SequenceNode* node) {
// Create a temporary local describing the original position.
const String& temp_name = Symbols::TempParam();
LocalVariable* temp_local = new(Z) LocalVariable(
- 0, // Token index.
+ Scanner::kNoSourcePos, // Token index.
temp_name,
Object::dynamic_type()); // Type.
temp_local->set_index(param_frame_index);
@@ -4043,6 +4043,7 @@ void EffectGraphVisitor::VisitSequenceNode(SequenceNode* node) {
if (check_pos == Scanner::kNoSourcePos) {
// No parameters or synthetic parameters.
check_pos = node->token_pos();
+ ASSERT(check_pos != Scanner::kNoSourcePos);
}
AddInstruction(new(Z) DebugStepCheckInstr(check_pos,
RawPcDescriptors::kRuntimeCall));
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698