OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/bytecode-graph-builder.h" | 5 #include "src/compiler/bytecode-graph-builder.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler/bytecode-branch-analysis.h" | 10 #include "src/compiler/bytecode-branch-analysis.h" |
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 | 1597 |
1598 void BytecodeGraphBuilder::VisitTestGreaterThanOrEqual() { | 1598 void BytecodeGraphBuilder::VisitTestGreaterThanOrEqual() { |
1599 BuildCompareOp(javascript()->GreaterThanOrEqual(GetCompareOperationHint())); | 1599 BuildCompareOp(javascript()->GreaterThanOrEqual(GetCompareOperationHint())); |
1600 } | 1600 } |
1601 | 1601 |
1602 void BytecodeGraphBuilder::VisitTestIn() { | 1602 void BytecodeGraphBuilder::VisitTestIn() { |
1603 BuildCompareOp(javascript()->HasProperty()); | 1603 BuildCompareOp(javascript()->HasProperty()); |
1604 } | 1604 } |
1605 | 1605 |
1606 void BytecodeGraphBuilder::VisitTestInstanceOf() { | 1606 void BytecodeGraphBuilder::VisitTestInstanceOf() { |
1607 BuildCompareOp(javascript()->InstanceOf()); | 1607 VectorSlotPair feedback = |
| 1608 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(1)); |
| 1609 BuildCompareOp(javascript()->InstanceOf(feedback)); |
1608 } | 1610 } |
1609 | 1611 |
1610 void BytecodeGraphBuilder::BuildCastOperator(const Operator* js_op) { | 1612 void BytecodeGraphBuilder::BuildCastOperator(const Operator* js_op) { |
1611 FrameStateBeforeAndAfter states(this); | 1613 FrameStateBeforeAndAfter states(this); |
1612 Node* value = NewNode(js_op, environment()->LookupAccumulator()); | 1614 Node* value = NewNode(js_op, environment()->LookupAccumulator()); |
1613 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value, | 1615 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value, |
1614 &states); | 1616 &states); |
1615 } | 1617 } |
1616 | 1618 |
1617 void BytecodeGraphBuilder::VisitToName() { | 1619 void BytecodeGraphBuilder::VisitToName() { |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2138 // Phi does not exist yet, introduce one. | 2140 // Phi does not exist yet, introduce one. |
2139 value = NewPhi(inputs, value, control); | 2141 value = NewPhi(inputs, value, control); |
2140 value->ReplaceInput(inputs - 1, other); | 2142 value->ReplaceInput(inputs - 1, other); |
2141 } | 2143 } |
2142 return value; | 2144 return value; |
2143 } | 2145 } |
2144 | 2146 |
2145 } // namespace compiler | 2147 } // namespace compiler |
2146 } // namespace internal | 2148 } // namespace internal |
2147 } // namespace v8 | 2149 } // namespace v8 |
OLD | NEW |