Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index e0963145ff0198c2698e63a55e6f59097eba8623..0cca9e7f3be393ec5fc27d37977aed556a87f19d 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -22,6 +22,18 @@ CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone, |
const char* name) |
: compiler::CodeAssembler(isolate, zone, parameter_count, flags, name) {} |
+void CodeStubAssembler::Assert(Node* condition) { |
+#if defined(DEBUG) |
+ Label ok(this); |
+ Label not_ok(this); |
+ Branch(condition, &ok, ¬_ok); |
+ Bind(¬_ok); |
+ DebugBreak(); |
+ Goto(&ok); |
+ Bind(&ok); |
+#endif |
+} |
+ |
Node* CodeStubAssembler::BooleanMapConstant() { |
return HeapConstant(isolate()->factory()->boolean_map()); |
} |