Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/Debugger.java @ 22011:95d5d6a93968
add more truffle boundaries
author | Andreas Woess <andreas.woess@oracle.com> |
---|---|
date | Thu, 23 Jul 2015 17:23:05 +0200 |
parents | 02e4cf046653 |
children | 78c3d3d8d86e |
comparison
equal
deleted
inserted
replaced
22010:f410818cdec8 | 22011:95d5d6a93968 |
---|---|
397 } | 397 } |
398 | 398 |
399 @Override | 399 @Override |
400 protected void setStrategy(final int stackDepth) { | 400 protected void setStrategy(final int stackDepth) { |
401 Probe.setBeforeTagTrap(new SyntaxTagTrap(STEPPING_TAG) { | 401 Probe.setBeforeTagTrap(new SyntaxTagTrap(STEPPING_TAG) { |
402 | 402 @TruffleBoundary |
403 @Override | 403 @Override |
404 public void tagTrappedAt(Node node, MaterializedFrame mFrame) { | 404 public void tagTrappedAt(Node node, MaterializedFrame mFrame) { |
405 // HALT: just before statement | 405 // HALT: just before statement |
406 --unfinishedStepCount; | 406 --unfinishedStepCount; |
407 strategyTrace("TRAP BEFORE", "unfinished steps=%d", unfinishedStepCount); | 407 strategyTrace("TRAP BEFORE", "unfinished steps=%d", unfinishedStepCount); |
411 } | 411 } |
412 strategyTrace("RESUME BEFORE", ""); | 412 strategyTrace("RESUME BEFORE", ""); |
413 } | 413 } |
414 }); | 414 }); |
415 Probe.setAfterTagTrap(new SyntaxTagTrap(CALL_TAG) { | 415 Probe.setAfterTagTrap(new SyntaxTagTrap(CALL_TAG) { |
416 | 416 @TruffleBoundary |
417 @Override | 417 @Override |
418 public void tagTrappedAt(Node node, MaterializedFrame mFrame) { | 418 public void tagTrappedAt(Node node, MaterializedFrame mFrame) { |
419 --unfinishedStepCount; | 419 --unfinishedStepCount; |
420 strategyTrace(null, "TRAP AFTER unfinished steps=%d", unfinishedStepCount); | 420 strategyTrace(null, "TRAP AFTER unfinished steps=%d", unfinishedStepCount); |
421 if (currentStackDepth() < stackDepth) { | 421 if (currentStackDepth() < stackDepth) { |
498 } | 498 } |
499 | 499 |
500 @Override | 500 @Override |
501 protected void setStrategy(final int stackDepth) { | 501 protected void setStrategy(final int stackDepth) { |
502 Probe.setBeforeTagTrap(new SyntaxTagTrap(STEPPING_TAG) { | 502 Probe.setBeforeTagTrap(new SyntaxTagTrap(STEPPING_TAG) { |
503 | 503 @TruffleBoundary |
504 @Override | 504 @Override |
505 public void tagTrappedAt(Node node, MaterializedFrame mFrame) { | 505 public void tagTrappedAt(Node node, MaterializedFrame mFrame) { |
506 final int currentStackDepth = currentStackDepth(); | 506 final int currentStackDepth = currentStackDepth(); |
507 if (currentStackDepth <= stackDepth) { | 507 if (currentStackDepth <= stackDepth) { |
508 // HALT: stack depth unchanged or smaller; treat like StepInto | 508 // HALT: stack depth unchanged or smaller; treat like StepInto |
523 strategyTrace("RESUME BEFORE", ""); | 523 strategyTrace("RESUME BEFORE", ""); |
524 } | 524 } |
525 }); | 525 }); |
526 | 526 |
527 Probe.setAfterTagTrap(new SyntaxTagTrap(CALL_TAG) { | 527 Probe.setAfterTagTrap(new SyntaxTagTrap(CALL_TAG) { |
528 | 528 @TruffleBoundary |
529 @Override | 529 @Override |
530 public void tagTrappedAt(Node node, MaterializedFrame mFrame) { | 530 public void tagTrappedAt(Node node, MaterializedFrame mFrame) { |
531 final int currentStackDepth = currentStackDepth(); | 531 final int currentStackDepth = currentStackDepth(); |
532 if (currentStackDepth < stackDepth) { | 532 if (currentStackDepth < stackDepth) { |
533 // HALT: just "stepped out" | 533 // HALT: just "stepped out" |
573 } | 573 } |
574 | 574 |
575 @Override | 575 @Override |
576 protected void setStrategy(final int stackDepth) { | 576 protected void setStrategy(final int stackDepth) { |
577 Probe.setBeforeTagTrap(new SyntaxTagTrap(STEPPING_TAG) { | 577 Probe.setBeforeTagTrap(new SyntaxTagTrap(STEPPING_TAG) { |
578 | 578 @TruffleBoundary |
579 @Override | 579 @Override |
580 public void tagTrappedAt(Node node, MaterializedFrame mFrame) { | 580 public void tagTrappedAt(Node node, MaterializedFrame mFrame) { |
581 final int currentStackDepth = currentStackDepth(); | 581 final int currentStackDepth = currentStackDepth(); |
582 if (currentStackDepth <= startStackDepth) { | 582 if (currentStackDepth <= startStackDepth) { |
583 // At original step depth (or smaller) after being nested | 583 // At original step depth (or smaller) after being nested |