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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 2352993003: Make local var assignments debuggable in checked mode (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | 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 b615941fad16b51c183160cc2be077fe32b79e9e..79285e9619a9ae87be43529d3681e45fc65f9949 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -3586,10 +3586,14 @@ void EffectGraphVisitor::VisitStoreLocalNode(StoreLocalNode* node) {
// call. Exception: don't do this when assigning to or from internal
// variables, or for generated code that has no source position.
if (FLAG_support_debugger) {
- if ((node->value()->IsLiteralNode() ||
- (node->value()->IsLoadLocalNode() &&
- !node->value()->AsLoadLocalNode()->local().IsInternal()) ||
- node->value()->IsClosureNode()) &&
+ AstNode* rhs = node->value();
+ if (rhs->IsAssignableNode()) {
+ rhs = rhs->AsAssignableNode()->expr();
+ }
+ if ((rhs->IsLiteralNode() ||
+ (rhs->IsLoadLocalNode() &&
+ !rhs->AsLoadLocalNode()->local().IsInternal()) ||
+ rhs->IsClosureNode()) &&
!node->local().IsInternal() &&
node->token_pos().IsDebugPause()) {
AddInstruction(new(Z) DebugStepCheckInstr(
@@ -3708,13 +3712,13 @@ Definition* EffectGraphVisitor::BuildStoreStaticField(
// If the right hand side is an expression that does not contain
// a safe point for the debugger to stop, add an explicit stub
// call.
- AstNode* val = node->value();
- if (val->IsAssignableNode()) {
- val = val->AsAssignableNode()->expr();
+ AstNode* rhs = node->value();
+ if (rhs->IsAssignableNode()) {
+ rhs = rhs->AsAssignableNode()->expr();
}
- if ((val->IsLiteralNode() ||
- val->IsLoadLocalNode() ||
- val->IsClosureNode()) &&
+ if ((rhs->IsLiteralNode() ||
+ rhs->IsLoadLocalNode() ||
+ rhs->IsClosureNode()) &&
node->token_pos().IsDebugPause()) {
AddInstruction(new(Z) DebugStepCheckInstr(
node->token_pos(), RawPcDescriptors::kRuntimeCall));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698