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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 const Operator* op = | 481 const Operator* op = |
482 javascript()->StoreContext(0, iterator.GetIndexOperand(1)); | 482 javascript()->StoreContext(0, iterator.GetIndexOperand(1)); |
483 Node* context = environment()->LookupRegister(iterator.GetRegisterOperand(0)); | 483 Node* context = environment()->LookupRegister(iterator.GetRegisterOperand(0)); |
484 Node* value = environment()->LookupAccumulator(); | 484 Node* value = environment()->LookupAccumulator(); |
485 Node* node = NewNode(op, context, value); | 485 Node* node = NewNode(op, context, value); |
486 CHECK(node != nullptr); | 486 CHECK(node != nullptr); |
487 environment()->BindAccumulator(value); | 487 environment()->BindAccumulator(value); |
488 } | 488 } |
489 | 489 |
490 | 490 |
| 491 void BytecodeGraphBuilder::VisitLdaLookupSlot( |
| 492 const interpreter::BytecodeArrayIterator& iterator) { |
| 493 UNIMPLEMENTED(); |
| 494 } |
| 495 |
| 496 |
| 497 void BytecodeGraphBuilder::VisitLdaLookupSlotInsideTypeof( |
| 498 const interpreter::BytecodeArrayIterator& iterator) { |
| 499 UNIMPLEMENTED(); |
| 500 } |
| 501 |
| 502 |
| 503 void BytecodeGraphBuilder::VisitStaLookupSlotSloppy( |
| 504 const interpreter::BytecodeArrayIterator& iterator) { |
| 505 UNIMPLEMENTED(); |
| 506 } |
| 507 |
| 508 |
| 509 void BytecodeGraphBuilder::VisitStaLookupSlotStrict( |
| 510 const interpreter::BytecodeArrayIterator& iterator) { |
| 511 UNIMPLEMENTED(); |
| 512 } |
| 513 |
| 514 |
491 void BytecodeGraphBuilder::BuildNamedLoad( | 515 void BytecodeGraphBuilder::BuildNamedLoad( |
492 const interpreter::BytecodeArrayIterator& iterator) { | 516 const interpreter::BytecodeArrayIterator& iterator) { |
493 Node* object = environment()->LookupRegister(iterator.GetRegisterOperand(0)); | 517 Node* object = environment()->LookupRegister(iterator.GetRegisterOperand(0)); |
494 Handle<Name> name = | 518 Handle<Name> name = |
495 Handle<Name>::cast(iterator.GetConstantForIndexOperand(1)); | 519 Handle<Name>::cast(iterator.GetConstantForIndexOperand(1)); |
496 VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(2)); | 520 VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(2)); |
497 | 521 |
498 const Operator* op = javascript()->LoadNamed(language_mode(), name, feedback); | 522 const Operator* op = javascript()->LoadNamed(language_mode(), name, feedback); |
499 Node* node = NewNode(op, object, BuildLoadFeedbackVector()); | 523 Node* node = NewNode(op, object, BuildLoadFeedbackVector()); |
500 AddEmptyFrameStateInputs(node); | 524 AddEmptyFrameStateInputs(node); |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1378 | 1402 |
1379 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1403 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
1380 if (environment()->IsMarkedAsUnreachable()) return; | 1404 if (environment()->IsMarkedAsUnreachable()) return; |
1381 environment()->MarkAsUnreachable(); | 1405 environment()->MarkAsUnreachable(); |
1382 exit_controls_.push_back(exit); | 1406 exit_controls_.push_back(exit); |
1383 } | 1407 } |
1384 | 1408 |
1385 } // namespace compiler | 1409 } // namespace compiler |
1386 } // namespace internal | 1410 } // namespace internal |
1387 } // namespace v8 | 1411 } // namespace v8 |
OLD | NEW |