| 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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 779 Node* value = environment()->LookupAccumulator(); | 779 Node* value = environment()->LookupAccumulator(); |
| 780 int flags = bytecode_iterator().GetFlagOperand(2); | 780 int flags = bytecode_iterator().GetFlagOperand(2); |
| 781 VectorSlotPair feedback = | 781 VectorSlotPair feedback = |
| 782 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3)); | 782 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3)); |
| 783 | 783 |
| 784 const Operator* op = javascript()->StoreDataPropertyInLiteral(feedback); | 784 const Operator* op = javascript()->StoreDataPropertyInLiteral(feedback); |
| 785 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags)); | 785 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags)); |
| 786 environment()->RecordAfterState(node, Environment::kAttachFrameState); | 786 environment()->RecordAfterState(node, Environment::kAttachFrameState); |
| 787 } | 787 } |
| 788 | 788 |
| 789 void BytecodeGraphBuilder::VisitCollectTypeProfile() { |
| 790 PrepareEagerCheckpoint(); |
| 791 |
| 792 Node* name = |
| 793 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
| 794 Node* value = |
| 795 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(1)); |
| 796 VectorSlotPair feedback = |
| 797 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(2)); |
| 798 |
| 799 const Operator* op = javascript()->CollectTypeProfile(feedback); |
| 800 |
| 801 Node* node = NewNode(op, name, value); |
| 802 environment()->RecordAfterState(node, Environment::kAttachFrameState); |
| 803 } |
| 804 |
| 789 void BytecodeGraphBuilder::VisitLdaContextSlot() { | 805 void BytecodeGraphBuilder::VisitLdaContextSlot() { |
| 790 const Operator* op = javascript()->LoadContext( | 806 const Operator* op = javascript()->LoadContext( |
| 791 bytecode_iterator().GetUnsignedImmediateOperand(2), | 807 bytecode_iterator().GetUnsignedImmediateOperand(2), |
| 792 bytecode_iterator().GetIndexOperand(1), false); | 808 bytecode_iterator().GetIndexOperand(1), false); |
| 793 Node* node = NewNode(op); | 809 Node* node = NewNode(op); |
| 794 Node* context = | 810 Node* context = |
| 795 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 811 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
| 796 NodeProperties::ReplaceContextInput(node, context); | 812 NodeProperties::ReplaceContextInput(node, context); |
| 797 environment()->BindAccumulator(node); | 813 environment()->BindAccumulator(node); |
| 798 } | 814 } |
| (...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2380 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2396 it->source_position().ScriptOffset(), start_position_.InliningId())); |
| 2381 it->Advance(); | 2397 it->Advance(); |
| 2382 } else { | 2398 } else { |
| 2383 DCHECK_GT(it->code_offset(), offset); | 2399 DCHECK_GT(it->code_offset(), offset); |
| 2384 } | 2400 } |
| 2385 } | 2401 } |
| 2386 | 2402 |
| 2387 } // namespace compiler | 2403 } // namespace compiler |
| 2388 } // namespace internal | 2404 } // namespace internal |
| 2389 } // namespace v8 | 2405 } // namespace v8 |
| OLD | NEW |