Chromium Code Reviews| 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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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::VisitToBoolean( | 1001 void BytecodeGraphBuilder::VisitToBoolean( |
| 1002 const interpreter::BytecodeArrayIterator& iterator) { | 1002 const interpreter::BytecodeArrayIterator& iterator) { |
| 1003 UNIMPLEMENTED(); | 1003 Node* node = |
|
oth
2015/11/23 13:46:41
There's a common pattern here and also in VisitLog
mythria
2015/11/24 12:58:48
I added a method for cast operators. I did not inc
| |
| 1004 NewNode(javascript()->ToBoolean(), environment()->LookupAccumulator()); | |
| 1005 AddEmptyFrameStateInputs(node); | |
| 1006 environment()->BindAccumulator(node); | |
| 1004 } | 1007 } |
| 1005 | 1008 |
| 1006 | 1009 |
| 1007 void BytecodeGraphBuilder::VisitToName( | 1010 void BytecodeGraphBuilder::VisitToName( |
| 1008 const interpreter::BytecodeArrayIterator& iterator) { | 1011 const interpreter::BytecodeArrayIterator& iterator) { |
| 1009 UNIMPLEMENTED(); | 1012 Node* node = |
| 1013 NewNode(javascript()->ToName(), environment()->LookupAccumulator()); | |
| 1014 AddEmptyFrameStateInputs(node); | |
| 1015 environment()->BindAccumulator(node); | |
| 1010 } | 1016 } |
| 1011 | 1017 |
| 1012 | 1018 |
| 1013 void BytecodeGraphBuilder::VisitToNumber( | 1019 void BytecodeGraphBuilder::VisitToNumber( |
| 1014 const interpreter::BytecodeArrayIterator& iterator) { | 1020 const interpreter::BytecodeArrayIterator& iterator) { |
| 1015 UNIMPLEMENTED(); | 1021 Node* node = |
| 1022 NewNode(javascript()->ToNumber(), environment()->LookupAccumulator()); | |
| 1023 AddEmptyFrameStateInputs(node); | |
| 1024 environment()->BindAccumulator(node); | |
| 1016 } | 1025 } |
| 1017 | 1026 |
| 1018 | 1027 |
| 1019 void BytecodeGraphBuilder::VisitToObject( | 1028 void BytecodeGraphBuilder::VisitToObject( |
| 1020 const interpreter::BytecodeArrayIterator& iterator) { | 1029 const interpreter::BytecodeArrayIterator& iterator) { |
| 1021 UNIMPLEMENTED(); | 1030 Node* node = |
| 1031 NewNode(javascript()->ToObject(), environment()->LookupAccumulator()); | |
| 1032 AddEmptyFrameStateInputs(node); | |
| 1033 environment()->BindAccumulator(node); | |
| 1022 } | 1034 } |
| 1023 | 1035 |
| 1024 | 1036 |
| 1025 void BytecodeGraphBuilder::VisitJump( | 1037 void BytecodeGraphBuilder::VisitJump( |
| 1026 const interpreter::BytecodeArrayIterator& iterator) { | 1038 const interpreter::BytecodeArrayIterator& iterator) { |
| 1027 UNIMPLEMENTED(); | 1039 UNIMPLEMENTED(); |
| 1028 } | 1040 } |
| 1029 | 1041 |
| 1030 | 1042 |
| 1031 void BytecodeGraphBuilder::VisitJumpConstant( | 1043 void BytecodeGraphBuilder::VisitJumpConstant( |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1228 | 1240 |
| 1229 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1241 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
| 1230 if (environment()->IsMarkedAsUnreachable()) return; | 1242 if (environment()->IsMarkedAsUnreachable()) return; |
| 1231 environment()->MarkAsUnreachable(); | 1243 environment()->MarkAsUnreachable(); |
| 1232 exit_controls_.push_back(exit); | 1244 exit_controls_.push_back(exit); |
| 1233 } | 1245 } |
| 1234 | 1246 |
| 1235 } // namespace compiler | 1247 } // namespace compiler |
| 1236 } // namespace internal | 1248 } // namespace internal |
| 1237 } // namespace v8 | 1249 } // namespace v8 |
| OLD | NEW |