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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 381633002: Use a register spec for StoreIC and KeyedStoreIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comments. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ia32/lithium-ia32.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 4036 matching lines...) Expand 10 before | Expand all | Expand 10 after
4047 kSaveFPRegs, 4047 kSaveFPRegs,
4048 EMIT_REMEMBERED_SET, 4048 EMIT_REMEMBERED_SET,
4049 instr->hydrogen()->SmiCheckForWriteBarrier(), 4049 instr->hydrogen()->SmiCheckForWriteBarrier(),
4050 instr->hydrogen()->PointersToHereCheckForValue()); 4050 instr->hydrogen()->PointersToHereCheckForValue());
4051 } 4051 }
4052 } 4052 }
4053 4053
4054 4054
4055 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 4055 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
4056 ASSERT(ToRegister(instr->context()).is(esi)); 4056 ASSERT(ToRegister(instr->context()).is(esi));
4057 ASSERT(ToRegister(instr->object()).is(edx)); 4057 ASSERT(ToRegister(instr->object()).is(StoreIC::ReceiverRegister()));
4058 ASSERT(ToRegister(instr->value()).is(eax)); 4058 ASSERT(ToRegister(instr->value()).is(StoreIC::ValueRegister()));
4059 4059
4060 __ mov(ecx, instr->name()); 4060 __ mov(StoreIC::NameRegister(), instr->name());
4061 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode()); 4061 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode());
4062 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4062 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4063 } 4063 }
4064 4064
4065 4065
4066 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 4066 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
4067 Condition cc = instr->hydrogen()->allow_equality() ? above : above_equal; 4067 Condition cc = instr->hydrogen()->allow_equality() ? above : above_equal;
4068 if (instr->index()->IsConstantOperand()) { 4068 if (instr->index()->IsConstantOperand()) {
4069 __ cmp(ToOperand(instr->length()), 4069 __ cmp(ToOperand(instr->length()),
4070 ToImmediate(LConstantOperand::cast(instr->index()), 4070 ToImmediate(LConstantOperand::cast(instr->index()),
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
4229 } else if (instr->hydrogen()->value()->representation().IsDouble()) { 4229 } else if (instr->hydrogen()->value()->representation().IsDouble()) {
4230 DoStoreKeyedFixedDoubleArray(instr); 4230 DoStoreKeyedFixedDoubleArray(instr);
4231 } else { 4231 } else {
4232 DoStoreKeyedFixedArray(instr); 4232 DoStoreKeyedFixedArray(instr);
4233 } 4233 }
4234 } 4234 }
4235 4235
4236 4236
4237 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 4237 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4238 ASSERT(ToRegister(instr->context()).is(esi)); 4238 ASSERT(ToRegister(instr->context()).is(esi));
4239 ASSERT(ToRegister(instr->object()).is(edx)); 4239 ASSERT(ToRegister(instr->object()).is(KeyedStoreIC::ReceiverRegister()));
4240 ASSERT(ToRegister(instr->key()).is(ecx)); 4240 ASSERT(ToRegister(instr->key()).is(KeyedStoreIC::NameRegister()));
4241 ASSERT(ToRegister(instr->value()).is(eax)); 4241 ASSERT(ToRegister(instr->value()).is(KeyedStoreIC::ValueRegister()));
4242 4242
4243 Handle<Code> ic = instr->strict_mode() == STRICT 4243 Handle<Code> ic = instr->strict_mode() == STRICT
4244 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() 4244 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
4245 : isolate()->builtins()->KeyedStoreIC_Initialize(); 4245 : isolate()->builtins()->KeyedStoreIC_Initialize();
4246 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4246 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4247 } 4247 }
4248 4248
4249 4249
4250 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { 4250 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
4251 Register object = ToRegister(instr->object()); 4251 Register object = ToRegister(instr->object());
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after
5662 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5662 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5663 RecordSafepoint(Safepoint::kNoLazyDeopt); 5663 RecordSafepoint(Safepoint::kNoLazyDeopt);
5664 } 5664 }
5665 5665
5666 5666
5667 #undef __ 5667 #undef __
5668 5668
5669 } } // namespace v8::internal 5669 } } // namespace v8::internal
5670 5670
5671 #endif // V8_TARGET_ARCH_IA32 5671 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698