Chromium Code Reviews

Unified Diff: src/compiler/machine-node-factory.h

Issue 436593002: [turbofan] Add Int32AddWithOverflow machine operator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/compiler/machine-node-factory.h
diff --git a/src/compiler/machine-node-factory.h b/src/compiler/machine-node-factory.h
index b0e153181feb8d143c2e6341b54dc6319c7c54f1..f3815d15fdcdab12aca3b531795d6c1980bbbe03 100644
--- a/src/compiler/machine-node-factory.h
+++ b/src/compiler/machine-node-factory.h
@@ -85,6 +85,11 @@ class MachineNodeFactory {
return NEW_NODE_0(COMMON()->HeapConstant(val));
}
+ // Projections.
+ Node* Projection(int index, Node* tuple) {
+ return NEW_NODE_1(COMMON()->Projection(index), tuple);
+ }
+
// Memory Operations.
Node* Load(MachineRepresentation rep, Node* base) {
return Load(rep, base, Int32Constant(0));
@@ -195,6 +200,9 @@ class MachineNodeFactory {
Node* Int32Add(Node* a, Node* b) {
return NEW_NODE_2(MACHINE()->Int32Add(), a, b);
}
+ Node* Int32AddWithOverflow(Node* a, Node* b) {
titzer 2014/07/31 15:16:34 Maybe we want to return the two projection nodes f
Benedikt Meurer 2014/07/31 15:18:19 I'd leave it this way for consistency with calls.
Benedikt Meurer 2014/08/01 05:01:18 Done.
+ return NEW_NODE_2(MACHINE()->Int32AddWithOverflow(), a, b);
+ }
Node* Int32Sub(Node* a, Node* b) {
return NEW_NODE_2(MACHINE()->Int32Sub(), a, b);
}

Powered by Google App Engine