Index: src/compiler/raw-machine-assembler.h |
diff --git a/src/compiler/raw-machine-assembler.h b/src/compiler/raw-machine-assembler.h |
index 9dc1587cab019e4be25b1ed91b1fb456a3d36fca..7ea7b71d8c1af6b9278ba923b88bafd6bf75fd48 100644 |
--- a/src/compiler/raw-machine-assembler.h |
+++ b/src/compiler/raw-machine-assembler.h |
@@ -73,8 +73,7 @@ class RawMachineAssembler { |
// hence will not switch the current basic block. |
Node* UndefinedConstant() { |
- Handle<HeapObject> undefined = isolate()->factory()->undefined_value(); |
- return AddNode(common()->HeapConstant(undefined)); |
+ return HeapConstant(isolate()->factory()->undefined_value()); |
} |
// Constants. |
@@ -104,6 +103,10 @@ class RawMachineAssembler { |
Node* HeapConstant(Handle<HeapObject> object) { |
return AddNode(common()->HeapConstant(object)); |
} |
+ Node* BooleanConstant(bool value) { |
+ Handle<Object> object = isolate()->factory()->ToBoolean(value); |
+ return HeapConstant(Handle<HeapObject>::cast(object)); |
+ } |
Node* ExternalConstant(ExternalReference address) { |
return AddNode(common()->ExternalConstant(address)); |
} |