| 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 | 10 |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 UNIMPLEMENTED(); | 991 UNIMPLEMENTED(); |
| 992 } | 992 } |
| 993 | 993 |
| 994 | 994 |
| 995 void BytecodeGraphBuilder::VisitTestInstanceOf( | 995 void BytecodeGraphBuilder::VisitTestInstanceOf( |
| 996 const interpreter::BytecodeArrayIterator& iterator) { | 996 const interpreter::BytecodeArrayIterator& iterator) { |
| 997 UNIMPLEMENTED(); | 997 UNIMPLEMENTED(); |
| 998 } | 998 } |
| 999 | 999 |
| 1000 | 1000 |
| 1001 void BytecodeGraphBuilder::BuildCastOperator( |
| 1002 const Operator* js_op, const interpreter::BytecodeArrayIterator& iterator) { |
| 1003 Node* node = NewNode(js_op, environment()->LookupAccumulator()); |
| 1004 AddEmptyFrameStateInputs(node); |
| 1005 environment()->BindAccumulator(node); |
| 1006 } |
| 1007 |
| 1008 |
| 1001 void BytecodeGraphBuilder::VisitToBoolean( | 1009 void BytecodeGraphBuilder::VisitToBoolean( |
| 1002 const interpreter::BytecodeArrayIterator& iterator) { | 1010 const interpreter::BytecodeArrayIterator& iterator) { |
| 1003 UNIMPLEMENTED(); | 1011 BuildCastOperator(javascript()->ToBoolean(), iterator); |
| 1004 } | 1012 } |
| 1005 | 1013 |
| 1006 | 1014 |
| 1007 void BytecodeGraphBuilder::VisitToName( | 1015 void BytecodeGraphBuilder::VisitToName( |
| 1008 const interpreter::BytecodeArrayIterator& iterator) { | 1016 const interpreter::BytecodeArrayIterator& iterator) { |
| 1009 UNIMPLEMENTED(); | 1017 BuildCastOperator(javascript()->ToName(), iterator); |
| 1010 } | 1018 } |
| 1011 | 1019 |
| 1012 | 1020 |
| 1013 void BytecodeGraphBuilder::VisitToNumber( | 1021 void BytecodeGraphBuilder::VisitToNumber( |
| 1014 const interpreter::BytecodeArrayIterator& iterator) { | 1022 const interpreter::BytecodeArrayIterator& iterator) { |
| 1015 UNIMPLEMENTED(); | 1023 BuildCastOperator(javascript()->ToNumber(), iterator); |
| 1016 } | 1024 } |
| 1017 | 1025 |
| 1018 | 1026 |
| 1019 void BytecodeGraphBuilder::VisitToObject( | 1027 void BytecodeGraphBuilder::VisitToObject( |
| 1020 const interpreter::BytecodeArrayIterator& iterator) { | 1028 const interpreter::BytecodeArrayIterator& iterator) { |
| 1021 UNIMPLEMENTED(); | 1029 BuildCastOperator(javascript()->ToObject(), iterator); |
| 1022 } | 1030 } |
| 1023 | 1031 |
| 1024 | 1032 |
| 1025 void BytecodeGraphBuilder::VisitJump( | 1033 void BytecodeGraphBuilder::VisitJump( |
| 1026 const interpreter::BytecodeArrayIterator& iterator) { | 1034 const interpreter::BytecodeArrayIterator& iterator) { |
| 1027 UNIMPLEMENTED(); | 1035 UNIMPLEMENTED(); |
| 1028 } | 1036 } |
| 1029 | 1037 |
| 1030 | 1038 |
| 1031 void BytecodeGraphBuilder::VisitJumpConstant( | 1039 void BytecodeGraphBuilder::VisitJumpConstant( |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1228 | 1236 |
| 1229 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1237 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
| 1230 if (environment()->IsMarkedAsUnreachable()) return; | 1238 if (environment()->IsMarkedAsUnreachable()) return; |
| 1231 environment()->MarkAsUnreachable(); | 1239 environment()->MarkAsUnreachable(); |
| 1232 exit_controls_.push_back(exit); | 1240 exit_controls_.push_back(exit); |
| 1233 } | 1241 } |
| 1234 | 1242 |
| 1235 } // namespace compiler | 1243 } // namespace compiler |
| 1236 } // namespace internal | 1244 } // namespace internal |
| 1237 } // namespace v8 | 1245 } // namespace v8 |
| OLD | NEW |