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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 } | 302 } |
303 | 303 |
304 | 304 |
305 void BytecodeGraphBuilder::VisitStar( | 305 void BytecodeGraphBuilder::VisitStar( |
306 const interpreter::BytecodeArrayIterator& iterator) { | 306 const interpreter::BytecodeArrayIterator& iterator) { |
307 Node* value = environment()->LookupAccumulator(); | 307 Node* value = environment()->LookupAccumulator(); |
308 environment()->BindRegister(iterator.GetRegisterOperand(0), value); | 308 environment()->BindRegister(iterator.GetRegisterOperand(0), value); |
309 } | 309 } |
310 | 310 |
311 | 311 |
| 312 void BytecodeGraphBuilder::VisitMov( |
| 313 const interpreter::BytecodeArrayIterator& iterator) { |
| 314 Node* value = environment()->LookupRegister(iterator.GetRegisterOperand(0)); |
| 315 environment()->BindRegister(iterator.GetRegisterOperand(1), value); |
| 316 } |
| 317 |
| 318 |
312 void BytecodeGraphBuilder::BuildLoadGlobal( | 319 void BytecodeGraphBuilder::BuildLoadGlobal( |
313 const interpreter::BytecodeArrayIterator& iterator, | 320 const interpreter::BytecodeArrayIterator& iterator, |
314 TypeofMode typeof_mode) { | 321 TypeofMode typeof_mode) { |
315 Handle<Name> name = | 322 Handle<Name> name = |
316 Handle<Name>::cast(iterator.GetConstantForIndexOperand(0)); | 323 Handle<Name>::cast(iterator.GetConstantForIndexOperand(0)); |
317 VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(1)); | 324 VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(1)); |
318 | 325 |
319 const Operator* op = javascript()->LoadGlobal(name, feedback, typeof_mode); | 326 const Operator* op = javascript()->LoadGlobal(name, feedback, typeof_mode); |
320 Node* node = NewNode(op, BuildLoadFeedbackVector()); | 327 Node* node = NewNode(op, BuildLoadFeedbackVector()); |
321 AddEmptyFrameStateInputs(node); | 328 AddEmptyFrameStateInputs(node); |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1142 | 1149 |
1143 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1150 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
1144 if (environment()->IsMarkedAsUnreachable()) return; | 1151 if (environment()->IsMarkedAsUnreachable()) return; |
1145 environment()->MarkAsUnreachable(); | 1152 environment()->MarkAsUnreachable(); |
1146 exit_controls_.push_back(exit); | 1153 exit_controls_.push_back(exit); |
1147 } | 1154 } |
1148 | 1155 |
1149 } // namespace compiler | 1156 } // namespace compiler |
1150 } // namespace internal | 1157 } // namespace internal |
1151 } // namespace v8 | 1158 } // namespace v8 |
OLD | NEW |