OLD | NEW |
---|---|
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 Loading... | |
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 // TODO(mvstanton): name register (ecx) isn't allocated in lithium-ia32.cc. |
4061 // Is this a problem? | |
Jakob Kummerow
2014/07/10 13:42:05
Nope. We're calling out, so the entire instruction
| |
4062 __ mov(StoreIC::NameRegister(), instr->name()); | |
4061 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode()); | 4063 Handle<Code> ic = StoreIC::initialize_stub(isolate(), instr->strict_mode()); |
4062 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4064 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
4063 } | 4065 } |
4064 | 4066 |
4065 | 4067 |
4066 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { | 4068 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { |
4067 Condition cc = instr->hydrogen()->allow_equality() ? above : above_equal; | 4069 Condition cc = instr->hydrogen()->allow_equality() ? above : above_equal; |
4068 if (instr->index()->IsConstantOperand()) { | 4070 if (instr->index()->IsConstantOperand()) { |
4069 __ cmp(ToOperand(instr->length()), | 4071 __ cmp(ToOperand(instr->length()), |
4070 ToImmediate(LConstantOperand::cast(instr->index()), | 4072 ToImmediate(LConstantOperand::cast(instr->index()), |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4229 } else if (instr->hydrogen()->value()->representation().IsDouble()) { | 4231 } else if (instr->hydrogen()->value()->representation().IsDouble()) { |
4230 DoStoreKeyedFixedDoubleArray(instr); | 4232 DoStoreKeyedFixedDoubleArray(instr); |
4231 } else { | 4233 } else { |
4232 DoStoreKeyedFixedArray(instr); | 4234 DoStoreKeyedFixedArray(instr); |
4233 } | 4235 } |
4234 } | 4236 } |
4235 | 4237 |
4236 | 4238 |
4237 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { | 4239 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { |
4238 ASSERT(ToRegister(instr->context()).is(esi)); | 4240 ASSERT(ToRegister(instr->context()).is(esi)); |
4239 ASSERT(ToRegister(instr->object()).is(edx)); | 4241 ASSERT(ToRegister(instr->object()).is(KeyedStoreIC::ReceiverRegister())); |
4240 ASSERT(ToRegister(instr->key()).is(ecx)); | 4242 ASSERT(ToRegister(instr->key()).is(KeyedStoreIC::NameRegister())); |
4241 ASSERT(ToRegister(instr->value()).is(eax)); | 4243 ASSERT(ToRegister(instr->value()).is(KeyedStoreIC::ValueRegister())); |
4242 | 4244 |
4243 Handle<Code> ic = instr->strict_mode() == STRICT | 4245 Handle<Code> ic = instr->strict_mode() == STRICT |
4244 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() | 4246 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() |
4245 : isolate()->builtins()->KeyedStoreIC_Initialize(); | 4247 : isolate()->builtins()->KeyedStoreIC_Initialize(); |
4246 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4248 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
4247 } | 4249 } |
4248 | 4250 |
4249 | 4251 |
4250 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { | 4252 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { |
4251 Register object = ToRegister(instr->object()); | 4253 Register object = ToRegister(instr->object()); |
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5662 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5664 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5663 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5665 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5664 } | 5666 } |
5665 | 5667 |
5666 | 5668 |
5667 #undef __ | 5669 #undef __ |
5668 | 5670 |
5669 } } // namespace v8::internal | 5671 } } // namespace v8::internal |
5670 | 5672 |
5671 #endif // V8_TARGET_ARCH_IA32 | 5673 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |