mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:47:03 +00:00
Allow debugger to stop when reading a static field
Add a DebugStepCheck when the right-hand side of an expression is an access to a static field or top-level variable. BUG=#28453 R=rmacnak@google.com Review-Url: https://codereview.chromium.org/2650823007 .
This commit is contained in:
parent
6c2e67e764
commit
197f141100
|
@ -3364,7 +3364,7 @@ void EffectGraphVisitor::VisitStoreLocalNode(StoreLocalNode* node) {
|
|||
if (rhs->IsAssignableNode()) {
|
||||
rhs = rhs->AsAssignableNode()->expr();
|
||||
}
|
||||
if ((rhs->IsLiteralNode() ||
|
||||
if ((rhs->IsLiteralNode() || rhs->IsLoadStaticFieldNode() ||
|
||||
(rhs->IsLoadLocalNode() &&
|
||||
!rhs->AsLoadLocalNode()->local().IsInternal()) ||
|
||||
rhs->IsClosureNode()) &&
|
||||
|
@ -3476,7 +3476,7 @@ Definition* EffectGraphVisitor::BuildStoreStaticField(
|
|||
rhs = rhs->AsAssignableNode()->expr();
|
||||
}
|
||||
if ((rhs->IsLiteralNode() || rhs->IsLoadLocalNode() ||
|
||||
rhs->IsClosureNode()) &&
|
||||
rhs->IsLoadStaticFieldNode() || rhs->IsClosureNode()) &&
|
||||
node->token_pos().IsDebugPause()) {
|
||||
AddInstruction(new (Z) DebugStepCheckInstr(
|
||||
node->token_pos(), RawPcDescriptors::kRuntimeCall));
|
||||
|
@ -4207,6 +4207,7 @@ void EffectGraphVisitor::BuildThrowNode(ThrowNode* node) {
|
|||
if (FLAG_support_debugger) {
|
||||
if (node->exception()->IsLiteralNode() ||
|
||||
node->exception()->IsLoadLocalNode() ||
|
||||
node->exception()->IsLoadStaticFieldNode() ||
|
||||
node->exception()->IsClosureNode()) {
|
||||
AddInstruction(new (Z) DebugStepCheckInstr(
|
||||
node->token_pos(), RawPcDescriptors::kRuntimeCall));
|
||||
|
|
Loading…
Reference in a new issue