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/bytecode-branch-analysis.h" | 10 #include "src/compiler/bytecode-branch-analysis.h" |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 Node* object = | 796 Node* object = |
797 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); | 797 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); |
798 Node* name = | 798 Node* name = |
799 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(1)); | 799 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(1)); |
800 Node* value = | 800 Node* value = |
801 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(2)); | 801 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(2)); |
802 Node* attrs = | 802 Node* attrs = |
803 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(3)); | 803 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(3)); |
804 | 804 |
805 Node* set_function_name = environment()->LookupAccumulator(); | 805 Node* set_function_name = environment()->LookupAccumulator(); |
806 const Operator* op = | 806 const Operator* op = javascript()->StoreDataPropertyInLiteral(); |
807 javascript()->CallRuntime(Runtime::kDefineDataPropertyInLiteral); | 807 Node* node = NewNode(op, object, name, value, attrs, set_function_name); |
808 Node* store = NewNode(op, object, name, value, attrs, set_function_name); | 808 environment()->RecordAfterState(node, Environment::kAttachFrameState); |
809 environment()->RecordAfterState(store, Environment::kAttachFrameState); | |
810 } | 809 } |
811 | 810 |
812 void BytecodeGraphBuilder::VisitLdaContextSlot() { | 811 void BytecodeGraphBuilder::VisitLdaContextSlot() { |
813 // TODO(mythria): immutable flag is also set to false. This information is not | 812 // TODO(mythria): immutable flag is also set to false. This information is not |
814 // available in bytecode array. update this code when the implementation | 813 // available in bytecode array. update this code when the implementation |
815 // changes. | 814 // changes. |
816 const Operator* op = javascript()->LoadContext( | 815 const Operator* op = javascript()->LoadContext( |
817 bytecode_iterator().GetUnsignedImmediateOperand(2), | 816 bytecode_iterator().GetUnsignedImmediateOperand(2), |
818 bytecode_iterator().GetIndexOperand(1), false); | 817 bytecode_iterator().GetIndexOperand(1), false); |
819 Node* context = | 818 Node* context = |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2232 it->source_position().ScriptOffset(), start_position_.InliningId())); | 2231 it->source_position().ScriptOffset(), start_position_.InliningId())); |
2233 it->Advance(); | 2232 it->Advance(); |
2234 } else { | 2233 } else { |
2235 DCHECK_GT(it->code_offset(), offset); | 2234 DCHECK_GT(it->code_offset(), offset); |
2236 } | 2235 } |
2237 } | 2236 } |
2238 | 2237 |
2239 } // namespace compiler | 2238 } // namespace compiler |
2240 } // namespace internal | 2239 } // namespace internal |
2241 } // namespace v8 | 2240 } // namespace v8 |
OLD | NEW |