| 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/compiler/linkage.h" | 7 #include "src/compiler/linkage.h" |
| 8 #include "src/compiler/operator-properties.h" | 8 #include "src/compiler/operator-properties.h" |
| 9 #include "src/interpreter/bytecode-array-iterator.h" | 9 #include "src/interpreter/bytecode-array-iterator.h" |
| 10 #include "src/interpreter/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 | 952 |
| 953 | 953 |
| 954 void BytecodeGraphBuilder::VisitDec( | 954 void BytecodeGraphBuilder::VisitDec( |
| 955 const interpreter::BytecodeArrayIterator& iterator) { | 955 const interpreter::BytecodeArrayIterator& iterator) { |
| 956 UNIMPLEMENTED(); | 956 UNIMPLEMENTED(); |
| 957 } | 957 } |
| 958 | 958 |
| 959 | 959 |
| 960 void BytecodeGraphBuilder::VisitLogicalNot( | 960 void BytecodeGraphBuilder::VisitLogicalNot( |
| 961 const interpreter::BytecodeArrayIterator& iterator) { | 961 const interpreter::BytecodeArrayIterator& iterator) { |
| 962 Node* node = | 962 Node* value = |
| 963 NewNode(javascript()->UnaryNot(), environment()->LookupAccumulator()); | 963 NewNode(javascript()->ToBoolean(), environment()->LookupAccumulator()); |
| 964 Node* node = NewNode(common()->Select(kMachAnyTagged), value, |
| 965 jsgraph()->FalseConstant(), jsgraph()->TrueConstant()); |
| 964 environment()->BindAccumulator(node); | 966 environment()->BindAccumulator(node); |
| 965 } | 967 } |
| 966 | 968 |
| 967 | 969 |
| 968 void BytecodeGraphBuilder::VisitTypeOf( | 970 void BytecodeGraphBuilder::VisitTypeOf( |
| 969 const interpreter::BytecodeArrayIterator& iterator) { | 971 const interpreter::BytecodeArrayIterator& iterator) { |
| 970 Node* node = | 972 Node* node = |
| 971 NewNode(javascript()->TypeOf(), environment()->LookupAccumulator()); | 973 NewNode(javascript()->TypeOf(), environment()->LookupAccumulator()); |
| 972 environment()->BindAccumulator(node); | 974 environment()->BindAccumulator(node); |
| 973 } | 975 } |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 | 1310 |
| 1309 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1311 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
| 1310 if (environment()->IsMarkedAsUnreachable()) return; | 1312 if (environment()->IsMarkedAsUnreachable()) return; |
| 1311 environment()->MarkAsUnreachable(); | 1313 environment()->MarkAsUnreachable(); |
| 1312 exit_controls_.push_back(exit); | 1314 exit_controls_.push_back(exit); |
| 1313 } | 1315 } |
| 1314 | 1316 |
| 1315 } // namespace compiler | 1317 } // namespace compiler |
| 1316 } // namespace internal | 1318 } // namespace internal |
| 1317 } // namespace v8 | 1319 } // namespace v8 |
| OLD | NEW |