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

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

Issue 2673383002: [ic] Encode LoadGlobalIC's typeof mode in slot kind instead of code object's flags. (Closed)
Patch Set: Addressed comments and added check to FCG Created 3 years, 10 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/compiler/ast-graph-builder.cc ('k') | src/crankshaft/hydrogen.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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 void BytecodeGraphBuilder::VisitMov() { 699 void BytecodeGraphBuilder::VisitMov() {
700 Node* value = 700 Node* value =
701 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0)); 701 environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
702 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(1), value); 702 environment()->BindRegister(bytecode_iterator().GetRegisterOperand(1), value);
703 } 703 }
704 704
705 Node* BytecodeGraphBuilder::BuildLoadGlobal(Handle<Name> name, 705 Node* BytecodeGraphBuilder::BuildLoadGlobal(Handle<Name> name,
706 uint32_t feedback_slot_index, 706 uint32_t feedback_slot_index,
707 TypeofMode typeof_mode) { 707 TypeofMode typeof_mode) {
708 VectorSlotPair feedback = CreateVectorSlotPair(feedback_slot_index); 708 VectorSlotPair feedback = CreateVectorSlotPair(feedback_slot_index);
709 DCHECK_EQ(FeedbackVectorSlotKind::LOAD_GLOBAL_IC, 709 DCHECK(IsLoadGlobalICKind(feedback_vector()->GetKind(feedback.slot())));
710 feedback_vector()->GetKind(feedback.slot()));
711 const Operator* op = javascript()->LoadGlobal(name, feedback, typeof_mode); 710 const Operator* op = javascript()->LoadGlobal(name, feedback, typeof_mode);
712 return NewNode(op); 711 return NewNode(op);
713 } 712 }
714 713
715 void BytecodeGraphBuilder::VisitLdaGlobal() { 714 void BytecodeGraphBuilder::VisitLdaGlobal() {
716 PrepareEagerCheckpoint(); 715 PrepareEagerCheckpoint();
717 Handle<Name> name = 716 Handle<Name> name =
718 Handle<Name>::cast(bytecode_iterator().GetConstantForIndexOperand(0)); 717 Handle<Name>::cast(bytecode_iterator().GetConstantForIndexOperand(0));
719 uint32_t feedback_slot_index = bytecode_iterator().GetIndexOperand(1); 718 uint32_t feedback_slot_index = bytecode_iterator().GetIndexOperand(1);
720 Node* node = 719 Node* node =
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
2316 it->source_position().ScriptOffset(), start_position_.InliningId())); 2315 it->source_position().ScriptOffset(), start_position_.InliningId()));
2317 it->Advance(); 2316 it->Advance();
2318 } else { 2317 } else {
2319 DCHECK_GT(it->code_offset(), offset); 2318 DCHECK_GT(it->code_offset(), offset);
2320 } 2319 }
2321 } 2320 }
2322 2321
2323 } // namespace compiler 2322 } // namespace compiler
2324 } // namespace internal 2323 } // namespace internal
2325 } // namespace v8 2324 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698