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

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

Issue 2587393006: [runtime] Collect IC feedback in DefineDataPropertyInLiteral. (Closed)
Patch Set: Rebase. Created 3 years, 11 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.cc ('k') | src/compiler/code-assembler.cc » ('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/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
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
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
OLDNEW
« no previous file with comments | « src/ast/ast.cc ('k') | src/compiler/code-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698