[TurboFan] Provide a DebugBreak() operation to the graph assembler.

Now that we are writing more complex code in the effect control
linearizer, it can be helpful to stop in certain cases during
development / debugging.

Bug: 
Change-Id: Ibeafe807c43e092534509d4d9c3f84f9c20525a5
Reviewed-on: https://chromium-review.googlesource.com/584749
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46869}
This commit is contained in:
Mike Stanton 2017-07-25 13:16:13 +02:00 committed by Commit Bot
parent 661726dd39
commit fe8b8f2236
4 changed files with 10 additions and 1 deletions

View File

@ -130,6 +130,11 @@ Node* GraphAssembler::StoreElement(ElementAccess const& access, Node* object,
value, current_effect_, current_control_);
}
Node* GraphAssembler::DebugBreak() {
return current_effect_ = graph()->NewNode(machine()->DebugBreak(),
current_effect_, current_control_);
}
Node* GraphAssembler::Store(StoreRepresentation rep, Node* object, Node* offset,
Node* value) {
return current_effect_ =

View File

@ -260,6 +260,9 @@ class GraphAssembler {
CHECKED_ASSEMBLER_MACH_BINOP_LIST(BINOP_DECL)
#undef BINOP_DECL
// Debugging
Node* DebugBreak();
Node* Float64RoundDown(Node* value);
Node* ToNumber(Node* value);

View File

@ -651,7 +651,7 @@ struct MachineOperatorGlobalCache {
struct DebugBreakOperator : public Operator {
DebugBreakOperator()
: Operator(IrOpcode::kDebugBreak, Operator::kNoThrow, "DebugBreak", 0,
0, 0, 0, 0, 0) {}
1, 1, 0, 1, 0) {}
};
DebugBreakOperator kDebugBreak;

View File

@ -97,6 +97,7 @@ void MemoryOptimizer::VisitNode(Node* node, AllocationState const* state) {
case IrOpcode::kProtectedStore:
case IrOpcode::kRetain:
case IrOpcode::kUnsafePointerAdd:
case IrOpcode::kDebugBreak:
return VisitOtherEffect(node, state);
default:
break;