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/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler/access-builder.h" | 10 #include "src/compiler/access-builder.h" |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3)); | 799 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3)); |
800 | 800 |
801 const Operator* op = javascript()->StoreDataPropertyInLiteral(feedback); | 801 const Operator* op = javascript()->StoreDataPropertyInLiteral(feedback); |
802 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags)); | 802 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags)); |
803 environment()->RecordAfterState(node, Environment::kAttachFrameState); | 803 environment()->RecordAfterState(node, Environment::kAttachFrameState); |
804 } | 804 } |
805 | 805 |
806 void BytecodeGraphBuilder::VisitCollectTypeProfile() { | 806 void BytecodeGraphBuilder::VisitCollectTypeProfile() { |
807 PrepareEagerCheckpoint(); | 807 PrepareEagerCheckpoint(); |
808 | 808 |
| 809 Node* position = |
| 810 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
809 Node* name = | 811 Node* name = |
810 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 812 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(1)); |
811 Node* value = environment()->LookupAccumulator(); | 813 Node* value = environment()->LookupAccumulator(); |
812 Node* index = jsgraph()->Constant(bytecode_iterator().GetIndexOperand(1)); | 814 Node* index = jsgraph()->Constant(bytecode_iterator().GetIndexOperand(2)); |
813 | 815 |
814 Node* vector = jsgraph()->Constant(feedback_vector()); | 816 Node* vector = jsgraph()->Constant(feedback_vector()); |
815 | 817 |
816 const Operator* op = javascript()->CallRuntime(Runtime::kCollectTypeProfile); | 818 const Operator* op = javascript()->CallRuntime(Runtime::kCollectTypeProfile); |
817 | 819 |
818 Node* node = NewNode(op, name, value, vector, index); | 820 Node* node = NewNode(op, position, name, value, vector, index); |
819 environment()->RecordAfterState(node, Environment::kAttachFrameState); | 821 environment()->RecordAfterState(node, Environment::kAttachFrameState); |
820 } | 822 } |
821 | 823 |
822 void BytecodeGraphBuilder::VisitLdaContextSlot() { | 824 void BytecodeGraphBuilder::VisitLdaContextSlot() { |
823 const Operator* op = javascript()->LoadContext( | 825 const Operator* op = javascript()->LoadContext( |
824 bytecode_iterator().GetUnsignedImmediateOperand(2), | 826 bytecode_iterator().GetUnsignedImmediateOperand(2), |
825 bytecode_iterator().GetIndexOperand(1), false); | 827 bytecode_iterator().GetIndexOperand(1), false); |
826 Node* node = NewNode(op); | 828 Node* node = NewNode(op); |
827 Node* context = | 829 Node* context = |
828 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 830 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2592 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2594 it->source_position().ScriptOffset(), start_position_.InliningId())); |
2593 it->Advance(); | 2595 it->Advance(); |
2594 } else { | 2596 } else { |
2595 DCHECK_GT(it->code_offset(), offset); | 2597 DCHECK_GT(it->code_offset(), offset); |
2596 } | 2598 } |
2597 } | 2599 } |
2598 | 2600 |
2599 } // namespace compiler | 2601 } // namespace compiler |
2600 } // namespace internal | 2602 } // namespace internal |
2601 } // namespace v8 | 2603 } // namespace v8 |
OLD | NEW |