| 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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 void BytecodeGraphBuilder::VisitShiftRightLogical( | 940 void BytecodeGraphBuilder::VisitShiftRightLogical( |
| 941 const interpreter::BytecodeArrayIterator& iterator) { | 941 const interpreter::BytecodeArrayIterator& iterator) { |
| 942 BinaryOperationHints hints = BinaryOperationHints::Any(); | 942 BinaryOperationHints hints = BinaryOperationHints::Any(); |
| 943 BuildBinaryOp(javascript()->ShiftRightLogical(language_mode(), hints), | 943 BuildBinaryOp(javascript()->ShiftRightLogical(language_mode(), hints), |
| 944 iterator); | 944 iterator); |
| 945 } | 945 } |
| 946 | 946 |
| 947 | 947 |
| 948 void BytecodeGraphBuilder::VisitInc( | 948 void BytecodeGraphBuilder::VisitInc( |
| 949 const interpreter::BytecodeArrayIterator& iterator) { | 949 const interpreter::BytecodeArrayIterator& iterator) { |
| 950 UNIMPLEMENTED(); | 950 const Operator* js_op = |
| 951 javascript()->Add(language_mode(), BinaryOperationHints::Any()); |
| 952 Node* node = NewNode(js_op, environment()->LookupAccumulator(), |
| 953 jsgraph()->OneConstant()); |
| 954 |
| 955 AddEmptyFrameStateInputs(node); |
| 956 environment()->BindAccumulator(node); |
| 951 } | 957 } |
| 952 | 958 |
| 953 | 959 |
| 954 void BytecodeGraphBuilder::VisitDec( | 960 void BytecodeGraphBuilder::VisitDec( |
| 955 const interpreter::BytecodeArrayIterator& iterator) { | 961 const interpreter::BytecodeArrayIterator& iterator) { |
| 956 UNIMPLEMENTED(); | 962 const Operator* js_op = |
| 963 javascript()->Subtract(language_mode(), BinaryOperationHints::Any()); |
| 964 Node* node = NewNode(js_op, environment()->LookupAccumulator(), |
| 965 jsgraph()->OneConstant()); |
| 966 |
| 967 AddEmptyFrameStateInputs(node); |
| 968 environment()->BindAccumulator(node); |
| 957 } | 969 } |
| 958 | 970 |
| 959 | 971 |
| 960 void BytecodeGraphBuilder::VisitLogicalNot( | 972 void BytecodeGraphBuilder::VisitLogicalNot( |
| 961 const interpreter::BytecodeArrayIterator& iterator) { | 973 const interpreter::BytecodeArrayIterator& iterator) { |
| 962 Node* value = | 974 Node* value = |
| 963 NewNode(javascript()->ToBoolean(), environment()->LookupAccumulator()); | 975 NewNode(javascript()->ToBoolean(), environment()->LookupAccumulator()); |
| 964 Node* node = NewNode(common()->Select(kMachAnyTagged), value, | 976 Node* node = NewNode(common()->Select(kMachAnyTagged), value, |
| 965 jsgraph()->FalseConstant(), jsgraph()->TrueConstant()); | 977 jsgraph()->FalseConstant(), jsgraph()->TrueConstant()); |
| 966 environment()->BindAccumulator(node); | 978 environment()->BindAccumulator(node); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1310 | 1322 |
| 1311 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1323 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
| 1312 if (environment()->IsMarkedAsUnreachable()) return; | 1324 if (environment()->IsMarkedAsUnreachable()) return; |
| 1313 environment()->MarkAsUnreachable(); | 1325 environment()->MarkAsUnreachable(); |
| 1314 exit_controls_.push_back(exit); | 1326 exit_controls_.push_back(exit); |
| 1315 } | 1327 } |
| 1316 | 1328 |
| 1317 } // namespace compiler | 1329 } // namespace compiler |
| 1318 } // namespace internal | 1330 } // namespace internal |
| 1319 } // namespace v8 | 1331 } // namespace v8 |
| OLD | NEW |