[builtins] Don't put doubles on the stack in ConstructWithSpread.
FAST_DOUBLE_ELEMENTS and FAST_HOLEY_DOUBLE_ELEMENTS kinds should both be handled by the runtime. Review-Url: https://codereview.chromium.org/2644643011 Cr-Commit-Position: refs/heads/master@{#42561}
This commit is contained in:
parent
a1e04ef524
commit
ee9c709190
@ -2789,15 +2789,13 @@ void Builtins::Generate_ConstructWithSpread(MacroAssembler* masm) {
|
||||
Label no_protector_check;
|
||||
__ ldr(scratch, FieldMemOperand(spread_map, Map::kBitField2Offset));
|
||||
__ DecodeField<Map::ElementsKindBits>(scratch);
|
||||
__ cmp(scratch, Operand(LAST_FAST_ELEMENTS_KIND));
|
||||
__ cmp(scratch, Operand(FAST_HOLEY_ELEMENTS));
|
||||
__ b(hi, &runtime_call);
|
||||
// For non-FastHoley kinds, we can skip the protector check.
|
||||
__ cmp(scratch, Operand(FAST_SMI_ELEMENTS));
|
||||
__ b(eq, &no_protector_check);
|
||||
__ cmp(scratch, Operand(FAST_ELEMENTS));
|
||||
__ b(eq, &no_protector_check);
|
||||
__ cmp(scratch, Operand(FAST_DOUBLE_ELEMENTS));
|
||||
__ b(eq, &no_protector_check);
|
||||
// Check the ArrayProtector cell.
|
||||
__ LoadRoot(scratch, Heap::kArrayProtectorRootIndex);
|
||||
__ ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset));
|
||||
|
@ -2875,15 +2875,13 @@ void Builtins::Generate_ConstructWithSpread(MacroAssembler* masm) {
|
||||
Label no_protector_check;
|
||||
__ Ldr(scratch, FieldMemOperand(spread_map, Map::kBitField2Offset));
|
||||
__ DecodeField<Map::ElementsKindBits>(scratch);
|
||||
__ Cmp(scratch, LAST_FAST_ELEMENTS_KIND);
|
||||
__ Cmp(scratch, FAST_HOLEY_ELEMENTS);
|
||||
__ B(hi, &runtime_call);
|
||||
// For non-FastHoley kinds, we can skip the protector check.
|
||||
__ Cmp(scratch, FAST_SMI_ELEMENTS);
|
||||
__ B(eq, &no_protector_check);
|
||||
__ Cmp(scratch, FAST_ELEMENTS);
|
||||
__ B(eq, &no_protector_check);
|
||||
__ Cmp(scratch, FAST_DOUBLE_ELEMENTS);
|
||||
__ B(eq, &no_protector_check);
|
||||
// Check the ArrayProtector cell.
|
||||
__ LoadRoot(scratch, Heap::kArrayProtectorRootIndex);
|
||||
__ Ldr(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset));
|
||||
|
@ -2855,15 +2855,13 @@ void Builtins::Generate_ConstructWithSpread(MacroAssembler* masm) {
|
||||
Label no_protector_check;
|
||||
__ mov(scratch, FieldOperand(spread_map, Map::kBitField2Offset));
|
||||
__ DecodeField<Map::ElementsKindBits>(scratch);
|
||||
__ cmp(scratch, Immediate(LAST_FAST_ELEMENTS_KIND));
|
||||
__ cmp(scratch, Immediate(FAST_HOLEY_ELEMENTS));
|
||||
__ j(above, &runtime_call);
|
||||
// For non-FastHoley kinds, we can skip the protector check.
|
||||
__ cmp(scratch, Immediate(FAST_SMI_ELEMENTS));
|
||||
__ j(equal, &no_protector_check);
|
||||
__ cmp(scratch, Immediate(FAST_ELEMENTS));
|
||||
__ j(equal, &no_protector_check);
|
||||
__ cmp(scratch, Immediate(FAST_DOUBLE_ELEMENTS));
|
||||
__ j(equal, &no_protector_check);
|
||||
// Check the ArrayProtector cell.
|
||||
__ LoadRoot(scratch, Heap::kArrayProtectorRootIndex);
|
||||
__ cmp(FieldOperand(scratch, PropertyCell::kValueOffset),
|
||||
|
@ -2866,11 +2866,10 @@ void Builtins::Generate_ConstructWithSpread(MacroAssembler* masm) {
|
||||
Label no_protector_check;
|
||||
__ lbu(scratch, FieldMemOperand(spread_map, Map::kBitField2Offset));
|
||||
__ DecodeField<Map::ElementsKindBits>(scratch);
|
||||
__ Branch(&runtime_call, hi, scratch, Operand(LAST_FAST_ELEMENTS_KIND));
|
||||
__ Branch(&runtime_call, hi, scratch, Operand(FAST_HOLEY_ELEMENTS));
|
||||
// For non-FastHoley kinds, we can skip the protector check.
|
||||
__ Branch(&no_protector_check, eq, scratch, Operand(FAST_SMI_ELEMENTS));
|
||||
__ Branch(&no_protector_check, eq, scratch, Operand(FAST_ELEMENTS));
|
||||
__ Branch(&no_protector_check, eq, scratch, Operand(FAST_DOUBLE_ELEMENTS));
|
||||
// Check the ArrayProtector cell.
|
||||
__ LoadRoot(scratch, Heap::kArrayProtectorRootIndex);
|
||||
__ lw(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset));
|
||||
|
@ -2889,11 +2889,10 @@ void Builtins::Generate_ConstructWithSpread(MacroAssembler* masm) {
|
||||
Label no_protector_check;
|
||||
__ lbu(scratch, FieldMemOperand(spread_map, Map::kBitField2Offset));
|
||||
__ DecodeField<Map::ElementsKindBits>(scratch);
|
||||
__ Branch(&runtime_call, hi, scratch, Operand(LAST_FAST_ELEMENTS_KIND));
|
||||
__ Branch(&runtime_call, hi, scratch, Operand(FAST_HOLEY_ELEMENTS));
|
||||
// For non-FastHoley kinds, we can skip the protector check.
|
||||
__ Branch(&no_protector_check, eq, scratch, Operand(FAST_SMI_ELEMENTS));
|
||||
__ Branch(&no_protector_check, eq, scratch, Operand(FAST_ELEMENTS));
|
||||
__ Branch(&no_protector_check, eq, scratch, Operand(FAST_DOUBLE_ELEMENTS));
|
||||
// Check the ArrayProtector cell.
|
||||
__ LoadRoot(scratch, Heap::kArrayProtectorRootIndex);
|
||||
__ lw(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset));
|
||||
|
@ -2865,15 +2865,13 @@ void Builtins::Generate_ConstructWithSpread(MacroAssembler* masm) {
|
||||
Label no_protector_check;
|
||||
__ LoadP(scratch, FieldMemOperand(spread_map, Map::kBitField2Offset));
|
||||
__ DecodeField<Map::ElementsKindBits>(scratch);
|
||||
__ cmpi(scratch, Operand(LAST_FAST_ELEMENTS_KIND));
|
||||
__ cmpi(scratch, Operand(FAST_HOLEY_ELEMENTS));
|
||||
__ bgt(&runtime_call);
|
||||
// For non-FastHoley kinds, we can skip the protector check.
|
||||
__ cmpi(scratch, Operand(FAST_SMI_ELEMENTS));
|
||||
__ beq(&no_protector_check);
|
||||
__ cmpi(scratch, Operand(FAST_ELEMENTS));
|
||||
__ beq(&no_protector_check);
|
||||
__ cmpi(scratch, Operand(FAST_DOUBLE_ELEMENTS));
|
||||
__ beq(&no_protector_check);
|
||||
// Check the ArrayProtector cell.
|
||||
__ LoadRoot(scratch, Heap::kArrayProtectorRootIndex);
|
||||
__ LoadP(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset));
|
||||
|
@ -2878,15 +2878,13 @@ void Builtins::Generate_ConstructWithSpread(MacroAssembler* masm) {
|
||||
Label no_protector_check;
|
||||
__ LoadP(scratch, FieldMemOperand(spread_map, Map::kBitField2Offset));
|
||||
__ DecodeField<Map::ElementsKindBits>(scratch);
|
||||
__ CmpP(scratch, Operand(LAST_FAST_ELEMENTS_KIND));
|
||||
__ CmpP(scratch, Operand(FAST_HOLEY_ELEMENTS));
|
||||
__ bgt(&runtime_call);
|
||||
// For non-FastHoley kinds, we can skip the protector check.
|
||||
__ CmpP(scratch, Operand(FAST_SMI_ELEMENTS));
|
||||
__ beq(&no_protector_check);
|
||||
__ CmpP(scratch, Operand(FAST_ELEMENTS));
|
||||
__ beq(&no_protector_check);
|
||||
__ CmpP(scratch, Operand(FAST_DOUBLE_ELEMENTS));
|
||||
__ beq(&no_protector_check);
|
||||
// Check the ArrayProtector cell.
|
||||
__ LoadRoot(scratch, Heap::kArrayProtectorRootIndex);
|
||||
__ LoadP(scratch, FieldMemOperand(scratch, PropertyCell::kValueOffset));
|
||||
|
@ -2931,15 +2931,13 @@ void Builtins::Generate_ConstructWithSpread(MacroAssembler* masm) {
|
||||
Label no_protector_check;
|
||||
__ movzxbp(rcx, FieldOperand(r15, Map::kBitField2Offset));
|
||||
__ DecodeField<Map::ElementsKindBits>(rcx);
|
||||
__ cmpp(rcx, Immediate(LAST_FAST_ELEMENTS_KIND));
|
||||
__ cmpp(rcx, Immediate(FAST_HOLEY_ELEMENTS));
|
||||
__ j(above, &runtime_call);
|
||||
// For non-FastHoley kinds, we can skip the protector check.
|
||||
__ cmpp(rcx, Immediate(FAST_SMI_ELEMENTS));
|
||||
__ j(equal, &no_protector_check);
|
||||
__ cmpp(rcx, Immediate(FAST_ELEMENTS));
|
||||
__ j(equal, &no_protector_check);
|
||||
__ cmpp(rcx, Immediate(FAST_DOUBLE_ELEMENTS));
|
||||
__ j(equal, &no_protector_check);
|
||||
// Check the ArrayProtector cell.
|
||||
__ LoadRoot(rcx, Heap::kArrayProtectorRootIndex);
|
||||
__ Cmp(FieldOperand(rcx, PropertyCell::kValueOffset),
|
||||
|
Loading…
Reference in New Issue
Block a user