| 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/compiler-source-position-table.h" | 10 #include "src/compiler/compiler-source-position-table.h" |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 Node* value = environment()->LookupAccumulator(); | 795 Node* value = environment()->LookupAccumulator(); |
| 796 int flags = bytecode_iterator().GetFlagOperand(2); | 796 int flags = bytecode_iterator().GetFlagOperand(2); |
| 797 VectorSlotPair feedback = | 797 VectorSlotPair feedback = |
| 798 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3)); | 798 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3)); |
| 799 | 799 |
| 800 const Operator* op = javascript()->StoreDataPropertyInLiteral(feedback); | 800 const Operator* op = javascript()->StoreDataPropertyInLiteral(feedback); |
| 801 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags)); | 801 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags)); |
| 802 environment()->RecordAfterState(node, Environment::kAttachFrameState); | 802 environment()->RecordAfterState(node, Environment::kAttachFrameState); |
| 803 } | 803 } |
| 804 | 804 |
| 805 void BytecodeGraphBuilder::VisitCollectTypeProfile() { |
| 806 PrepareEagerCheckpoint(); |
| 807 |
| 808 Node* name = |
| 809 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
| 810 Node* value = |
| 811 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(1)); |
| 812 VectorSlotPair feedback = |
| 813 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(2)); |
| 814 |
| 815 const Operator* op = javascript()->CollectTypeProfile(feedback); |
| 816 |
| 817 Node* node = NewNode(op, name, value); |
| 818 environment()->RecordAfterState(node, Environment::kAttachFrameState); |
| 819 } |
| 820 |
| 805 void BytecodeGraphBuilder::VisitLdaContextSlot() { | 821 void BytecodeGraphBuilder::VisitLdaContextSlot() { |
| 806 const Operator* op = javascript()->LoadContext( | 822 const Operator* op = javascript()->LoadContext( |
| 807 bytecode_iterator().GetUnsignedImmediateOperand(2), | 823 bytecode_iterator().GetUnsignedImmediateOperand(2), |
| 808 bytecode_iterator().GetIndexOperand(1), false); | 824 bytecode_iterator().GetIndexOperand(1), false); |
| 809 Node* node = NewNode(op); | 825 Node* node = NewNode(op); |
| 810 Node* context = | 826 Node* context = |
| 811 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 827 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
| 812 NodeProperties::ReplaceContextInput(node, context); | 828 NodeProperties::ReplaceContextInput(node, context); |
| 813 environment()->BindAccumulator(node); | 829 environment()->BindAccumulator(node); |
| 814 } | 830 } |
| (...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2412 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2428 it->source_position().ScriptOffset(), start_position_.InliningId())); |
| 2413 it->Advance(); | 2429 it->Advance(); |
| 2414 } else { | 2430 } else { |
| 2415 DCHECK_GT(it->code_offset(), offset); | 2431 DCHECK_GT(it->code_offset(), offset); |
| 2416 } | 2432 } |
| 2417 } | 2433 } |
| 2418 | 2434 |
| 2419 } // namespace compiler | 2435 } // namespace compiler |
| 2420 } // namespace internal | 2436 } // namespace internal |
| 2421 } // namespace v8 | 2437 } // namespace v8 |
| OLD | NEW |