Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Unified Diff: src/compiler/raw-machine-assembler.h

Issue 1343363002: [Interpreter] Basic flow control. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Switch test-bytecode-generator/IfConditions to use new style bytecode array check. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/interpreter-assembler.cc ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « src/compiler/interpreter-assembler.cc ('k') | src/compiler/raw-machine-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698