Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 2755973002: [type profile] Collect return types. (Closed)
Patch Set: Rebase. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ast/ast-numbering.cc ('k') | src/feedback-vector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/compiler/access-builder.h" 9 #include "src/compiler/access-builder.h"
10 #include "src/compiler/compiler-source-position-table.h" 10 #include "src/compiler/compiler-source-position-table.h"
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3)); 799 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3));
800 800
801 const Operator* op = javascript()->StoreDataPropertyInLiteral(feedback); 801 const Operator* op = javascript()->StoreDataPropertyInLiteral(feedback);
802 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags)); 802 Node* node = NewNode(op, object, name, value, jsgraph()->Constant(flags));
803 environment()->RecordAfterState(node, Environment::kAttachFrameState); 803 environment()->RecordAfterState(node, Environment::kAttachFrameState);
804 } 804 }
805 805
806 void BytecodeGraphBuilder::VisitCollectTypeProfile() { 806 void BytecodeGraphBuilder::VisitCollectTypeProfile() {
807 PrepareEagerCheckpoint(); 807 PrepareEagerCheckpoint();
808 808
809 Node* name = 809 Node* position =
810 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); 810 jsgraph()->Constant(bytecode_iterator().GetImmediateOperand(0));
811 Node* value = environment()->LookupAccumulator(); 811 Node* value = environment()->LookupAccumulator();
812 Node* index = jsgraph()->Constant(bytecode_iterator().GetIndexOperand(1)); 812 Node* index = jsgraph()->Constant(bytecode_iterator().GetIndexOperand(1));
813 813
814 Node* vector = jsgraph()->Constant(feedback_vector()); 814 Node* vector = jsgraph()->Constant(feedback_vector());
815 815
816 const Operator* op = javascript()->CallRuntime(Runtime::kCollectTypeProfile); 816 const Operator* op = javascript()->CallRuntime(Runtime::kCollectTypeProfile);
817 817
818 Node* node = NewNode(op, name, value, vector, index); 818 Node* node = NewNode(op, position, value, vector, index);
819 environment()->RecordAfterState(node, Environment::kAttachFrameState); 819 environment()->RecordAfterState(node, Environment::kAttachFrameState);
820 } 820 }
821 821
822 void BytecodeGraphBuilder::VisitLdaContextSlot() { 822 void BytecodeGraphBuilder::VisitLdaContextSlot() {
823 const Operator* op = javascript()->LoadContext( 823 const Operator* op = javascript()->LoadContext(
824 bytecode_iterator().GetUnsignedImmediateOperand(2), 824 bytecode_iterator().GetUnsignedImmediateOperand(2),
825 bytecode_iterator().GetIndexOperand(1), false); 825 bytecode_iterator().GetIndexOperand(1), false);
826 Node* node = NewNode(op); 826 Node* node = NewNode(op);
827 Node* context = 827 Node* context =
828 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); 828 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
2619 it->source_position().ScriptOffset(), start_position_.InliningId())); 2619 it->source_position().ScriptOffset(), start_position_.InliningId()));
2620 it->Advance(); 2620 it->Advance();
2621 } else { 2621 } else {
2622 DCHECK_GT(it->code_offset(), offset); 2622 DCHECK_GT(it->code_offset(), offset);
2623 } 2623 }
2624 } 2624 }
2625 2625
2626 } // namespace compiler 2626 } // namespace compiler
2627 } // namespace internal 2627 } // namespace internal
2628 } // namespace v8 2628 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast-numbering.cc ('k') | src/feedback-vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698