| 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/bytecode-branch-analysis.h" | 7 #include "src/compiler/bytecode-branch-analysis.h" |
| 8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
| 9 #include "src/compiler/operator-properties.h" | 9 #include "src/compiler/operator-properties.h" |
| 10 #include "src/interpreter/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 FrameStateBeforeAndAfter states(this, iterator); | 733 FrameStateBeforeAndAfter states(this, iterator); |
| 734 Node* value = environment()->LookupAccumulator(); | 734 Node* value = environment()->LookupAccumulator(); |
| 735 Node* name = jsgraph()->Constant(iterator.GetConstantForIndexOperand(0)); | 735 Node* name = jsgraph()->Constant(iterator.GetConstantForIndexOperand(0)); |
| 736 Node* language = jsgraph()->Constant(language_mode); | 736 Node* language = jsgraph()->Constant(language_mode); |
| 737 const Operator* op = javascript()->CallRuntime(Runtime::kStoreLookupSlot, 4); | 737 const Operator* op = javascript()->CallRuntime(Runtime::kStoreLookupSlot, 4); |
| 738 Node* store = NewNode(op, value, environment()->Context(), name, language); | 738 Node* store = NewNode(op, value, environment()->Context(), name, language); |
| 739 environment()->BindAccumulator(store, &states); | 739 environment()->BindAccumulator(store, &states); |
| 740 } | 740 } |
| 741 | 741 |
| 742 | 742 |
| 743 void BytecodeGraphBuilder::VisitLdaLookupSlotWide( |
| 744 const interpreter::BytecodeArrayIterator& iterator) { |
| 745 VisitLdaLookupSlot(iterator); |
| 746 } |
| 747 |
| 748 |
| 749 void BytecodeGraphBuilder::VisitLdaLookupSlotInsideTypeofWide( |
| 750 const interpreter::BytecodeArrayIterator& iterator) { |
| 751 VisitLdaLookupSlotInsideTypeof(iterator); |
| 752 } |
| 753 |
| 754 |
| 743 void BytecodeGraphBuilder::VisitStaLookupSlotSloppy( | 755 void BytecodeGraphBuilder::VisitStaLookupSlotSloppy( |
| 744 const interpreter::BytecodeArrayIterator& iterator) { | 756 const interpreter::BytecodeArrayIterator& iterator) { |
| 745 BuildStaLookupSlot(LanguageMode::SLOPPY, iterator); | 757 BuildStaLookupSlot(LanguageMode::SLOPPY, iterator); |
| 746 } | 758 } |
| 747 | 759 |
| 748 | 760 |
| 749 void BytecodeGraphBuilder::VisitStaLookupSlotStrict( | 761 void BytecodeGraphBuilder::VisitStaLookupSlotStrict( |
| 750 const interpreter::BytecodeArrayIterator& iterator) { | 762 const interpreter::BytecodeArrayIterator& iterator) { |
| 751 BuildStaLookupSlot(LanguageMode::STRICT, iterator); | 763 BuildStaLookupSlot(LanguageMode::STRICT, iterator); |
| 752 } | 764 } |
| 753 | 765 |
| 754 | 766 |
| 767 void BytecodeGraphBuilder::VisitStaLookupSlotSloppyWide( |
| 768 const interpreter::BytecodeArrayIterator& iterator) { |
| 769 VisitStaLookupSlotSloppy(iterator); |
| 770 } |
| 771 |
| 772 |
| 773 void BytecodeGraphBuilder::VisitStaLookupSlotStrictWide( |
| 774 const interpreter::BytecodeArrayIterator& iterator) { |
| 775 VisitStaLookupSlotStrict(iterator); |
| 776 } |
| 777 |
| 778 |
| 755 void BytecodeGraphBuilder::BuildNamedLoad( | 779 void BytecodeGraphBuilder::BuildNamedLoad( |
| 756 const interpreter::BytecodeArrayIterator& iterator) { | 780 const interpreter::BytecodeArrayIterator& iterator) { |
| 757 FrameStateBeforeAndAfter states(this, iterator); | 781 FrameStateBeforeAndAfter states(this, iterator); |
| 758 Node* object = environment()->LookupRegister(iterator.GetRegisterOperand(0)); | 782 Node* object = environment()->LookupRegister(iterator.GetRegisterOperand(0)); |
| 759 Handle<Name> name = | 783 Handle<Name> name = |
| 760 Handle<Name>::cast(iterator.GetConstantForIndexOperand(1)); | 784 Handle<Name>::cast(iterator.GetConstantForIndexOperand(1)); |
| 761 VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(2)); | 785 VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(2)); |
| 762 | 786 |
| 763 const Operator* op = javascript()->LoadNamed(language_mode(), name, feedback); | 787 const Operator* op = javascript()->LoadNamed(language_mode(), name, feedback); |
| 764 Node* node = NewNode(op, object, BuildLoadFeedbackVector()); | 788 Node* node = NewNode(op, object, BuildLoadFeedbackVector()); |
| (...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1853 | 1877 |
| 1854 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { | 1878 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { |
| 1855 if (environment()->IsMarkedAsUnreachable()) return; | 1879 if (environment()->IsMarkedAsUnreachable()) return; |
| 1856 environment()->MarkAsUnreachable(); | 1880 environment()->MarkAsUnreachable(); |
| 1857 exit_controls_.push_back(exit); | 1881 exit_controls_.push_back(exit); |
| 1858 } | 1882 } |
| 1859 | 1883 |
| 1860 } // namespace compiler | 1884 } // namespace compiler |
| 1861 } // namespace internal | 1885 } // namespace internal |
| 1862 } // namespace v8 | 1886 } // namespace v8 |
| OLD | NEW |