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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 2354773002: Add debugger safe point on assignment to global variables (Closed)
Patch Set: Add regression test 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 | « runtime/observatory/tests/service/issue_27287_test.dart ('k') | 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 7a014804248ad8e381043bd17491e6f97f3653d3..92a2903b22acf73e1950c5a33e5c2a2097cbf1bd 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -3704,6 +3704,19 @@ Definition* EffectGraphVisitor::BuildStoreStaticField(
StoreStaticFieldNode* node,
bool result_is_needed,
TokenPosition token_pos) {
+ if (FLAG_support_debugger) {
+ // 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.
+ if ((node->value()->IsLiteralNode() ||
+ node->value()->IsLoadLocalNode() ||
+ node->value()->IsClosureNode()) &&
+ node->token_pos().IsDebugPause()) {
+ AddInstruction(new(Z) DebugStepCheckInstr(
+ node->token_pos(), RawPcDescriptors::kRuntimeCall));
+ }
+ }
+
ValueGraphVisitor for_value(owner());
node->value()->Visit(&for_value);
Append(for_value);
« no previous file with comments | « runtime/observatory/tests/service/issue_27287_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698