MIPS: Unify grow mode and stub kind

Port r13850 (bb94d408)

Original commit message:
In the process, ensure that transition-causing element stores handle all cases of the transitioned receiver map.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
palfia@homejinni.com 2013-03-08 00:55:24 +00:00
parent bb380cf971
commit fade1cc9bf

View File

@ -3093,7 +3093,7 @@ Handle<Code> KeyedStoreStubCompiler::CompileStoreElement(
Handle<Code> stub =
KeyedStoreElementStub(is_js_array,
elements_kind,
grow_mode_).GetCode(isolate());
store_mode_).GetCode(isolate());
__ DispatchMap(a2, a3, receiver_map, stub, DO_SMI_CHECK);
@ -3858,7 +3858,7 @@ void KeyedStoreStubCompiler::GenerateStoreFastElement(
__ lw(scratch, FieldMemOperand(elements_reg, FixedArray::kLengthOffset));
}
// Compare smis.
if (is_js_array && grow_mode == ALLOW_JSARRAY_GROWTH) {
if (is_js_array && IsGrowStoreMode(store_mode)) {
__ Branch(&grow, hs, key_reg, Operand(scratch));
} else {
__ Branch(&miss_force_generic, hs, key_reg, Operand(scratch));
@ -3910,7 +3910,7 @@ void KeyedStoreStubCompiler::GenerateStoreFastElement(
Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss();
__ Jump(ic_miss, RelocInfo::CODE_TARGET);
if (is_js_array && grow_mode == ALLOW_JSARRAY_GROWTH) {
if (is_js_array && IsGrowStoreMode(store_mode)) {
// Grow the array by a single element if possible.
__ bind(&grow);
@ -4026,7 +4026,7 @@ void KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(
}
// Compare smis, unsigned compare catches both negative and out-of-bound
// indexes.
if (grow_mode == ALLOW_JSARRAY_GROWTH) {
if (IsGrowStoreMode(store_mode)) {
__ Branch(&grow, hs, key_reg, Operand(scratch1));
} else {
__ Branch(&miss_force_generic, hs, key_reg, Operand(scratch1));
@ -4057,7 +4057,7 @@ void KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(
Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss();
__ Jump(ic_miss, RelocInfo::CODE_TARGET);
if (is_js_array && grow_mode == ALLOW_JSARRAY_GROWTH) {
if (is_js_array && IsGrowStoreMode(store_mode)) {
// Grow the array by a single element if possible.
__ bind(&grow);