Commit 2820eeb6 authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: Implement many KeyedStoreStubs using Crankshaft

Port r14001 (28443693)

Original commit message:
- Addition of a compiled hydrogen stub for KeyedStores.
- Inlining of "grow" stubs into OPTIMIZED_FUNCTIONs
- Addition of new "ignore OOB" ic stub that silently swallows out-of-bounds stores to external typed arrays.
- Addition of new "copy-on-write" ic stub that inlines allocation and copying operations for cow array
- New stub are generated with Crankshaft, so they are automatically inlined into OPTIMIZED_FUNCTIONs

BUG=

Review URL: https://codereview.chromium.org/12702012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f8b4fbb3
...@@ -62,6 +62,17 @@ void KeyedLoadFastElementStub::InitializeInterfaceDescriptor( ...@@ -62,6 +62,17 @@ void KeyedLoadFastElementStub::InitializeInterfaceDescriptor(
} }
void KeyedStoreFastElementStub::InitializeInterfaceDescriptor(
Isolate* isolate,
CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { a2, a1, a0 };
descriptor->register_param_count_ = 3;
descriptor->register_params_ = registers;
descriptor->deoptimization_handler_ =
FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure);
}
void TransitionElementsKindStub::InitializeInterfaceDescriptor( void TransitionElementsKindStub::InitializeInterfaceDescriptor(
Isolate* isolate, Isolate* isolate,
CodeStubInterfaceDescriptor* descriptor) { CodeStubInterfaceDescriptor* descriptor) {
......
...@@ -237,7 +237,7 @@ bool LCodeGen::GeneratePrologue() { ...@@ -237,7 +237,7 @@ bool LCodeGen::GeneratePrologue() {
__ sw(a0, target); __ sw(a0, target);
// Update the write barrier. This clobbers a3 and a0. // Update the write barrier. This clobbers a3 and a0.
__ RecordWriteContextSlot( __ RecordWriteContextSlot(
cp, target.offset(), a0, a3, kRAHasBeenSaved, kSaveFPRegs); cp, target.offset(), a0, a3, GetRAState(), kSaveFPRegs);
} }
} }
Comment(";;; End allocate local context"); Comment(";;; End allocate local context");
...@@ -2687,7 +2687,7 @@ void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { ...@@ -2687,7 +2687,7 @@ void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
target.offset(), target.offset(),
value, value,
scratch0(), scratch0(),
kRAHasBeenSaved, GetRAState(),
kSaveFPRegs, kSaveFPRegs,
EMIT_REMEMBERED_SET, EMIT_REMEMBERED_SET,
check_needed); check_needed);
...@@ -4030,7 +4030,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { ...@@ -4030,7 +4030,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
HeapObject::kMapOffset, HeapObject::kMapOffset,
scratch, scratch,
temp, temp,
kRAHasBeenSaved, GetRAState(),
kSaveFPRegs, kSaveFPRegs,
OMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET,
OMIT_SMI_CHECK); OMIT_SMI_CHECK);
...@@ -4049,7 +4049,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { ...@@ -4049,7 +4049,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
offset, offset,
value, value,
scratch, scratch,
kRAHasBeenSaved, GetRAState(),
kSaveFPRegs, kSaveFPRegs,
EMIT_REMEMBERED_SET, EMIT_REMEMBERED_SET,
check_needed); check_needed);
...@@ -4064,7 +4064,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { ...@@ -4064,7 +4064,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
offset, offset,
value, value,
object, object,
kRAHasBeenSaved, GetRAState(),
kSaveFPRegs, kSaveFPRegs,
EMIT_REMEMBERED_SET, EMIT_REMEMBERED_SET,
check_needed); check_needed);
...@@ -4275,7 +4275,7 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) { ...@@ -4275,7 +4275,7 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) {
__ RecordWrite(elements, __ RecordWrite(elements,
key, key,
value, value,
kRAHasBeenSaved, GetRAState(),
kSaveFPRegs, kSaveFPRegs,
EMIT_REMEMBERED_SET, EMIT_REMEMBERED_SET,
check_needed); check_needed);
...@@ -4326,7 +4326,7 @@ void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { ...@@ -4326,7 +4326,7 @@ void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) {
__ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset));
// Write barrier. // Write barrier.
__ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg,
scratch, kRAHasBeenSaved, kDontSaveFPRegs); scratch, GetRAState(), kDontSaveFPRegs);
} else if (FLAG_compiled_transitions) { } else if (FLAG_compiled_transitions) {
PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters);
__ mov(a0, object_reg); __ mov(a0, object_reg);
......
...@@ -87,6 +87,10 @@ class LCodeGen BASE_EMBEDDED { ...@@ -87,6 +87,10 @@ class LCodeGen BASE_EMBEDDED {
return !NeedsEagerFrame() && info()->is_deferred_calling(); return !NeedsEagerFrame() && info()->is_deferred_calling();
} }
RAStatus GetRAState() const {
return frame_is_built_ ? kRAHasBeenSaved : kRAHasNotBeenSaved;
}
// Support for converting LOperands to assembler types. // Support for converting LOperands to assembler types.
// LOperand must be a register. // LOperand must be a register.
Register ToRegister(LOperand* op) const; Register ToRegister(LOperand* op) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment