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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2396023002: [crankshaft] Remove HLoadGlobalGeneric and use HCallWithDescriptor instead to call LoadGlobalIC. (Closed)
Patch Set: Created 4 years, 2 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/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 5572 matching lines...) Expand 10 before | Expand all | Expand 10 after
5583 } else { 5583 } else {
5584 instr = New<HLoadNamedField>(cell_constant, nullptr, access, 5584 instr = New<HLoadNamedField>(cell_constant, nullptr, access,
5585 field_maps, HType::HeapObject()); 5585 field_maps, HType::HeapObject());
5586 } 5586 }
5587 instr->ClearDependsOnFlag(kInobjectFields); 5587 instr->ClearDependsOnFlag(kInobjectFields);
5588 instr->SetDependsOnFlag(kGlobalVars); 5588 instr->SetDependsOnFlag(kGlobalVars);
5589 return ast_context()->ReturnInstruction(instr, expr->id()); 5589 return ast_context()->ReturnInstruction(instr, expr->id());
5590 } 5590 }
5591 } else { 5591 } else {
5592 Handle<TypeFeedbackVector> vector(current_feedback_vector(), isolate()); 5592 Handle<TypeFeedbackVector> vector(current_feedback_vector(), isolate());
5593 HLoadGlobalGeneric* instr = New<HLoadGlobalGeneric>( 5593
5594 variable->name(), ast_context()->typeof_mode(), vector, 5594 HValue* vector_value = Add<HConstant>(vector);
5595 expr->VariableFeedbackSlot()); 5595 HValue* slot_value =
5596 Add<HConstant>(vector->GetIndex(expr->VariableFeedbackSlot()));
5597 Callable callable = CodeFactory::LoadGlobalICInOptimizedCode(
5598 isolate(), ast_context()->typeof_mode());
5599 HValue* stub = Add<HConstant>(callable.code());
5600 HValue* values[] = {context(), slot_value, vector_value};
5601 HCallWithDescriptor* instr = New<HCallWithDescriptor>(
5602 stub, 0, callable.descriptor(), ArrayVector(values));
5596 return ast_context()->ReturnInstruction(instr, expr->id()); 5603 return ast_context()->ReturnInstruction(instr, expr->id());
5597 } 5604 }
5598 } 5605 }
5599 5606
5600 case VariableLocation::PARAMETER: 5607 case VariableLocation::PARAMETER:
5601 case VariableLocation::LOCAL: { 5608 case VariableLocation::LOCAL: {
5602 HValue* value = LookupAndMakeLive(variable); 5609 HValue* value = LookupAndMakeLive(variable);
5603 if (value == graph()->GetConstantHole()) { 5610 if (value == graph()->GetConstantHole()) {
5604 DCHECK(IsDeclaredVariableMode(variable->mode()) && 5611 DCHECK(IsDeclaredVariableMode(variable->mode()) &&
5605 variable->mode() != VAR); 5612 variable->mode() != VAR);
(...skipping 7672 matching lines...) Expand 10 before | Expand all | Expand 10 after
13278 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13285 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13279 } 13286 }
13280 13287
13281 #ifdef DEBUG 13288 #ifdef DEBUG
13282 graph_->Verify(false); // No full verify. 13289 graph_->Verify(false); // No full verify.
13283 #endif 13290 #endif
13284 } 13291 }
13285 13292
13286 } // namespace internal 13293 } // namespace internal
13287 } // namespace v8 13294 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698