Commit fe8b8f22 authored by Mike Stanton's avatar Mike Stanton Committed by Commit Bot

[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/584749Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46869}
parent 661726dd
......@@ -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_ =
......
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment