Index: src/compiler/bytecode-graph-builder.cc |
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc |
index 9ff111722063c8d9c50eddcc73b0ed2ac008abe9..676c74baa40fe93347d7fea24914c825d994cfef 100644 |
--- a/src/compiler/bytecode-graph-builder.cc |
+++ b/src/compiler/bytecode-graph-builder.cc |
@@ -1304,18 +1304,19 @@ void BytecodeGraphBuilder::VisitTestInstanceOf() { |
BuildCompareOp(javascript()->InstanceOf()); |
} |
-void BytecodeGraphBuilder::BuildCastOperator(const Operator* js_op) { |
- FrameStateBeforeAndAfter states(this); |
- Node* node = NewNode(js_op, environment()->LookupAccumulator()); |
- environment()->BindAccumulator(node, &states); |
-} |
- |
void BytecodeGraphBuilder::VisitToName() { |
- BuildCastOperator(javascript()->ToName()); |
+ FrameStateBeforeAndAfter states(this); |
+ Node* value = |
+ NewNode(javascript()->ToName(), environment()->LookupAccumulator()); |
+ environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value, |
+ &states); |
} |
void BytecodeGraphBuilder::VisitToObject() { |
- BuildCastOperator(javascript()->ToObject()); |
+ FrameStateBeforeAndAfter states(this); |
+ Node* node = |
+ NewNode(javascript()->ToObject(), environment()->LookupAccumulator()); |
+ environment()->BindAccumulator(node, &states); |
} |
void BytecodeGraphBuilder::VisitToNumber() { |