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/compiler-source-position-table.h" | 10 #include "src/compiler/compiler-source-position-table.h" |
11 #include "src/compiler/linkage.h" | 11 #include "src/compiler/linkage.h" |
12 #include "src/compiler/operator-properties.h" | 12 #include "src/compiler/operator-properties.h" |
| 13 #include "src/compiler/simplified-operator.h" |
13 #include "src/interpreter/bytecodes.h" | 14 #include "src/interpreter/bytecodes.h" |
14 #include "src/objects-inl.h" | 15 #include "src/objects-inl.h" |
15 | 16 |
16 namespace v8 { | 17 namespace v8 { |
17 namespace internal { | 18 namespace internal { |
18 namespace compiler { | 19 namespace compiler { |
19 | 20 |
20 // The abstract execution environment simulates the content of the interpreter | 21 // The abstract execution environment simulates the content of the interpreter |
21 // register file. The environment performs SSA-renaming of all tracked nodes at | 22 // register file. The environment performs SSA-renaming of all tracked nodes at |
22 // split and merge points in the control flow. | 23 // split and merge points in the control flow. |
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1629 } | 1630 } |
1630 | 1631 |
1631 void BytecodeGraphBuilder::VisitTestIn() { | 1632 void BytecodeGraphBuilder::VisitTestIn() { |
1632 BuildCompareOp(javascript()->HasProperty()); | 1633 BuildCompareOp(javascript()->HasProperty()); |
1633 } | 1634 } |
1634 | 1635 |
1635 void BytecodeGraphBuilder::VisitTestInstanceOf() { | 1636 void BytecodeGraphBuilder::VisitTestInstanceOf() { |
1636 BuildCompareOp(javascript()->InstanceOf()); | 1637 BuildCompareOp(javascript()->InstanceOf()); |
1637 } | 1638 } |
1638 | 1639 |
| 1640 void BytecodeGraphBuilder::VisitTestUndetectable() { |
| 1641 Node* object = |
| 1642 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
| 1643 Node* node = NewNode(jsgraph()->simplified()->ObjectIsUndetectable(), object); |
| 1644 environment()->BindAccumulator(node); |
| 1645 } |
| 1646 |
1639 void BytecodeGraphBuilder::BuildCastOperator(const Operator* js_op) { | 1647 void BytecodeGraphBuilder::BuildCastOperator(const Operator* js_op) { |
1640 PrepareEagerCheckpoint(); | 1648 PrepareEagerCheckpoint(); |
1641 Node* value = NewNode(js_op, environment()->LookupAccumulator()); | 1649 Node* value = NewNode(js_op, environment()->LookupAccumulator()); |
1642 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value, | 1650 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(0), value, |
1643 Environment::kAttachFrameState); | 1651 Environment::kAttachFrameState); |
1644 } | 1652 } |
1645 | 1653 |
1646 void BytecodeGraphBuilder::VisitToName() { | 1654 void BytecodeGraphBuilder::VisitToName() { |
1647 BuildCastOperator(javascript()->ToName()); | 1655 BuildCastOperator(javascript()->ToName()); |
1648 } | 1656 } |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2190 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2198 it->source_position().ScriptOffset(), start_position_.InliningId())); |
2191 it->Advance(); | 2199 it->Advance(); |
2192 } else { | 2200 } else { |
2193 DCHECK_GT(it->code_offset(), offset); | 2201 DCHECK_GT(it->code_offset(), offset); |
2194 } | 2202 } |
2195 } | 2203 } |
2196 | 2204 |
2197 } // namespace compiler | 2205 } // namespace compiler |
2198 } // namespace internal | 2206 } // namespace internal |
2199 } // namespace v8 | 2207 } // namespace v8 |
OLD | NEW |