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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 15946002: Allow breakpoints on strict equal (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 23094)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -620,7 +620,10 @@
}
Value* constant_true = Bind(new ConstantInstr(Bool::True()));
StrictCompareInstr* comp =
- new StrictCompareInstr(Token::kEQ_STRICT, value, constant_true);
+ new StrictCompareInstr(condition_token_pos(),
+ Token::kEQ_STRICT,
+ value,
+ constant_true);
BranchInstr* branch = new BranchInstr(comp);
AddInstruction(branch);
CloseFragment();
@@ -633,13 +636,15 @@
void TestGraphVisitor::MergeBranchWithComparison(ComparisonInstr* comp) {
ControlInstruction* branch;
if (Token::IsStrictEqualityOperator(comp->kind())) {
- branch = new BranchInstr(new StrictCompareInstr(comp->kind(),
+ branch = new BranchInstr(new StrictCompareInstr(comp->token_pos(),
+ comp->kind(),
comp->left(),
comp->right()));
} else if (Token::IsEqualityOperator(comp->kind()) &&
(comp->left()->BindsToConstantNull() ||
comp->right()->BindsToConstantNull())) {
branch = new BranchInstr(new StrictCompareInstr(
+ comp->token_pos(),
(comp->kind() == Token::kEQ) ? Token::kEQ_STRICT : Token::kNE_STRICT,
comp->left(),
comp->right()));
@@ -657,7 +662,10 @@
ASSERT(!FLAG_enable_type_checks);
Value* constant_true = Bind(new ConstantInstr(Bool::True()));
BranchInstr* branch = new BranchInstr(
- new StrictCompareInstr(Token::kNE_STRICT, neg->value(), constant_true));
+ new StrictCompareInstr(condition_token_pos(),
+ Token::kNE_STRICT,
+ neg->value(),
+ constant_true));
AddInstruction(branch);
CloseFragment();
true_successor_addresses_.Add(branch->true_successor_address());
@@ -959,7 +967,8 @@
}
Value* constant_true = for_right.Bind(new ConstantInstr(Bool::True()));
Value* compare =
- for_right.Bind(new StrictCompareInstr(Token::kEQ_STRICT,
+ for_right.Bind(new StrictCompareInstr(node->token_pos(),
+ Token::kEQ_STRICT,
right_value,
constant_true));
for_right.Do(BuildStoreExprTemp(compare));
@@ -1269,8 +1278,10 @@
ValueGraphVisitor for_right_value(owner(), temp_index());
node->right()->Visit(&for_right_value);
Append(for_right_value);
- StrictCompareInstr* comp = new StrictCompareInstr(
- node->kind(), for_left_value.value(), for_right_value.value());
+ StrictCompareInstr* comp = new StrictCompareInstr(node->token_pos(),
+ node->kind(),
+ for_left_value.value(),
+ for_right_value.value());
ReturnDefinition(comp);
return;
}

Powered by Google App Engine
This is Rietveld 408576698