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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 | 772 |
773 void BytecodeGraphBuilder::VisitStaGlobalStrict() { | 773 void BytecodeGraphBuilder::VisitStaGlobalStrict() { |
774 BuildStoreGlobal(LanguageMode::STRICT); | 774 BuildStoreGlobal(LanguageMode::STRICT); |
775 } | 775 } |
776 | 776 |
777 void BytecodeGraphBuilder::VisitStaDataPropertyInLiteral() { | 777 void BytecodeGraphBuilder::VisitStaDataPropertyInLiteral() { |
778 Node* object = | 778 Node* object = |
779 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 779 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
780 Node* name = | 780 Node* name = |
781 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(1)); | 781 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(1)); |
782 Node* value = | 782 Node* value = environment()->LookupAccumulator(); |
783 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(2)); | 783 int flags = bytecode_iterator().GetFlagOperand(2); |
784 int flags = bytecode_iterator().GetFlagOperand(3); | 784 VectorSlotPair feedback = |
| 785 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3)); |
785 | 786 |
786 const Operator* op = javascript()->StoreDataPropertyInLiteral(); | 787 const Operator* op = javascript()->StoreDataPropertyInLiteral(feedback); |
787 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags)); | 788 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags)); |
788 environment()->RecordAfterState(node, Environment::kAttachFrameState); | 789 environment()->RecordAfterState(node, Environment::kAttachFrameState); |
789 } | 790 } |
790 | 791 |
791 void BytecodeGraphBuilder::VisitLdaContextSlot() { | 792 void BytecodeGraphBuilder::VisitLdaContextSlot() { |
792 // TODO(mythria): immutable flag is also set to false. This information is not | 793 // TODO(mythria): immutable flag is also set to false. This information is not |
793 // available in bytecode array. update this code when the implementation | 794 // available in bytecode array. update this code when the implementation |
794 // changes. | 795 // changes. |
795 const Operator* op = javascript()->LoadContext( | 796 const Operator* op = javascript()->LoadContext( |
796 bytecode_iterator().GetUnsignedImmediateOperand(2), | 797 bytecode_iterator().GetUnsignedImmediateOperand(2), |
(...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2289 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2290 it->source_position().ScriptOffset(), start_position_.InliningId())); |
2290 it->Advance(); | 2291 it->Advance(); |
2291 } else { | 2292 } else { |
2292 DCHECK_GT(it->code_offset(), offset); | 2293 DCHECK_GT(it->code_offset(), offset); |
2293 } | 2294 } |
2294 } | 2295 } |
2295 | 2296 |
2296 } // namespace compiler | 2297 } // namespace compiler |
2297 } // namespace internal | 2298 } // namespace internal |
2298 } // namespace v8 | 2299 } // namespace v8 |
OLD | NEW |