Index: src/compiler/machine-node-factory.h |
diff --git a/src/compiler/machine-node-factory.h b/src/compiler/machine-node-factory.h |
index 8daae42ba8465f92f2276b2ef263cf9497b0f2a0..984d3944f9c3df7bcf2bcce4de33e4e872a1e115 100644 |
--- a/src/compiler/machine-node-factory.h |
+++ b/src/compiler/machine-node-factory.h |
@@ -85,6 +85,10 @@ class MachineNodeFactory { |
return NEW_NODE_0(COMMON()->HeapConstant(val)); |
} |
+ Node* Projection(int index, Node* a) { |
+ return NEW_NODE_1(COMMON()->Projection(index), a); |
+ } |
+ |
// Memory Operations. |
Node* Load(MachineRepresentation rep, Node* base) { |
return Load(rep, base, Int32Constant(0)); |
@@ -198,12 +202,18 @@ class MachineNodeFactory { |
void Int32AddWithOverflow(Node* a, Node* b, Node** val_return, |
Node** ovf_return) { |
Node* add = NEW_NODE_2(MACHINE()->Int32AddWithOverflow(), a, b); |
- if (val_return) *val_return = NEW_NODE_1(COMMON()->Projection(0), add); |
- if (ovf_return) *ovf_return = NEW_NODE_1(COMMON()->Projection(1), add); |
+ if (val_return) *val_return = Projection(0, add); |
+ if (ovf_return) *ovf_return = Projection(1, add); |
} |
Node* Int32Sub(Node* a, Node* b) { |
return NEW_NODE_2(MACHINE()->Int32Sub(), a, b); |
} |
+ void Int32SubWithOverflow(Node* a, Node* b, Node** val_return, |
+ Node** ovf_return) { |
+ Node* add = NEW_NODE_2(MACHINE()->Int32SubWithOverflow(), a, b); |
+ if (val_return) *val_return = Projection(0, add); |
+ if (ovf_return) *ovf_return = Projection(1, add); |
+ } |
Node* Int32Mul(Node* a, Node* b) { |
return NEW_NODE_2(MACHINE()->Int32Mul(), a, b); |
} |