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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 = |
783 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(2)); | 783 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(2)); |
784 Node* attrs = | 784 int flags = bytecode_iterator().GetFlagOperand(3); |
785 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(3)); | |
786 | 785 |
787 Node* set_function_name = environment()->LookupAccumulator(); | |
788 const Operator* op = javascript()->StoreDataPropertyInLiteral(); | 786 const Operator* op = javascript()->StoreDataPropertyInLiteral(); |
789 Node* node = NewNode(op, object, name, value, attrs, set_function_name); | 787 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags)); |
790 environment()->RecordAfterState(node, Environment::kAttachFrameState); | 788 environment()->RecordAfterState(node, Environment::kAttachFrameState); |
791 } | 789 } |
792 | 790 |
793 void BytecodeGraphBuilder::VisitLdaContextSlot() { | 791 void BytecodeGraphBuilder::VisitLdaContextSlot() { |
794 // TODO(mythria): immutable flag is also set to false. This information is not | 792 // TODO(mythria): immutable flag is also set to false. This information is not |
795 // available in bytecode array. update this code when the implementation | 793 // available in bytecode array. update this code when the implementation |
796 // changes. | 794 // changes. |
797 const Operator* op = javascript()->LoadContext( | 795 const Operator* op = javascript()->LoadContext( |
798 bytecode_iterator().GetUnsignedImmediateOperand(2), | 796 bytecode_iterator().GetUnsignedImmediateOperand(2), |
799 bytecode_iterator().GetIndexOperand(1), false); | 797 bytecode_iterator().GetIndexOperand(1), false); |
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2283 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2281 it->source_position().ScriptOffset(), start_position_.InliningId())); |
2284 it->Advance(); | 2282 it->Advance(); |
2285 } else { | 2283 } else { |
2286 DCHECK_GT(it->code_offset(), offset); | 2284 DCHECK_GT(it->code_offset(), offset); |
2287 } | 2285 } |
2288 } | 2286 } |
2289 | 2287 |
2290 } // namespace compiler | 2288 } // namespace compiler |
2291 } // namespace internal | 2289 } // namespace internal |
2292 } // namespace v8 | 2290 } // namespace v8 |
OLD | NEW |