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 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 | 1085 |
1086 | 1086 |
1087 void BytecodeGraphBuilder::BuildCastOperator( | 1087 void BytecodeGraphBuilder::BuildCastOperator( |
1088 const Operator* js_op, const interpreter::BytecodeArrayIterator& iterator) { | 1088 const Operator* js_op, const interpreter::BytecodeArrayIterator& iterator) { |
1089 Node* node = NewNode(js_op, environment()->LookupAccumulator()); | 1089 Node* node = NewNode(js_op, environment()->LookupAccumulator()); |
1090 AddEmptyFrameStateInputs(node); | 1090 AddEmptyFrameStateInputs(node); |
1091 environment()->BindAccumulator(node); | 1091 environment()->BindAccumulator(node); |
1092 } | 1092 } |
1093 | 1093 |
1094 | 1094 |
1095 void BytecodeGraphBuilder::VisitToBoolean( | |
1096 const interpreter::BytecodeArrayIterator& iterator) { | |
1097 BuildCastOperator(javascript()->ToBoolean(ToBooleanHint::kAny), iterator); | |
1098 } | |
1099 | |
1100 | |
1101 void BytecodeGraphBuilder::VisitToName( | 1095 void BytecodeGraphBuilder::VisitToName( |
1102 const interpreter::BytecodeArrayIterator& iterator) { | 1096 const interpreter::BytecodeArrayIterator& iterator) { |
1103 BuildCastOperator(javascript()->ToName(), iterator); | 1097 BuildCastOperator(javascript()->ToName(), iterator); |
1104 } | 1098 } |
1105 | 1099 |
1106 | 1100 |
1107 void BytecodeGraphBuilder::VisitToNumber( | 1101 void BytecodeGraphBuilder::VisitToNumber( |
1108 const interpreter::BytecodeArrayIterator& iterator) { | 1102 const interpreter::BytecodeArrayIterator& iterator) { |
1109 BuildCastOperator(javascript()->ToNumber(), iterator); | 1103 BuildCastOperator(javascript()->ToNumber(), iterator); |
1110 } | 1104 } |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 | 1316 |
1323 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1317 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
1324 if (environment()->IsMarkedAsUnreachable()) return; | 1318 if (environment()->IsMarkedAsUnreachable()) return; |
1325 environment()->MarkAsUnreachable(); | 1319 environment()->MarkAsUnreachable(); |
1326 exit_controls_.push_back(exit); | 1320 exit_controls_.push_back(exit); |
1327 } | 1321 } |
1328 | 1322 |
1329 } // namespace compiler | 1323 } // namespace compiler |
1330 } // namespace internal | 1324 } // namespace internal |
1331 } // namespace v8 | 1325 } // namespace v8 |
OLD | NEW |