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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 2367693002: [fullcodegen] Refactor code that calls load ICs. (Closed)
Patch Set: Created 4 years, 3 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/full-codegen/s390/full-codegen-s390.cc ('k') | src/full-codegen/x87/full-codegen-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex); 1211 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex);
1212 __ j(not_equal, done); 1212 __ j(not_equal, done);
1213 __ Push(var->name()); 1213 __ Push(var->name());
1214 __ CallRuntime(Runtime::kThrowReferenceError); 1214 __ CallRuntime(Runtime::kThrowReferenceError);
1215 } else { 1215 } else {
1216 __ jmp(done); 1216 __ jmp(done);
1217 } 1217 }
1218 } 1218 }
1219 } 1219 }
1220 1220
1221
1222 void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy,
1223 TypeofMode typeof_mode) {
1224 #ifdef DEBUG
1225 Variable* var = proxy->var();
1226 DCHECK(var->IsUnallocated() ||
1227 (var->IsLookupSlot() && var->mode() == DYNAMIC_GLOBAL));
1228 #endif
1229 __ Move(LoadGlobalDescriptor::SlotRegister(),
1230 SmiFromSlot(proxy->VariableFeedbackSlot()));
1231 CallLoadGlobalIC(typeof_mode);
1232 }
1233
1234
1235 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy, 1221 void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy,
1236 TypeofMode typeof_mode) { 1222 TypeofMode typeof_mode) {
1237 // Record position before possible IC call. 1223 // Record position before possible IC call.
1238 SetExpressionPosition(proxy); 1224 SetExpressionPosition(proxy);
1239 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS); 1225 PrepareForBailoutForId(proxy->BeforeId(), BailoutState::NO_REGISTERS);
1240 Variable* var = proxy->var(); 1226 Variable* var = proxy->var();
1241 1227
1242 // Three cases: global variables, lookup variables, and all other types of 1228 // Three cases: global variables, lookup variables, and all other types of
1243 // variables. 1229 // variables.
1244 switch (var->location()) { 1230 switch (var->location()) {
(...skipping 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after
3587 DCHECK_EQ( 3573 DCHECK_EQ(
3588 isolate->builtins()->OnStackReplacement()->entry(), 3574 isolate->builtins()->OnStackReplacement()->entry(),
3589 Assembler::target_address_at(call_target_address, unoptimized_code)); 3575 Assembler::target_address_at(call_target_address, unoptimized_code));
3590 return ON_STACK_REPLACEMENT; 3576 return ON_STACK_REPLACEMENT;
3591 } 3577 }
3592 3578
3593 } // namespace internal 3579 } // namespace internal
3594 } // namespace v8 3580 } // namespace v8
3595 3581
3596 #endif // V8_TARGET_ARCH_X64 3582 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698