OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 7005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7016 | 7016 |
7017 __ bind(&need_incremental_pop_object); | 7017 __ bind(&need_incremental_pop_object); |
7018 __ pop(regs_.object()); | 7018 __ pop(regs_.object()); |
7019 | 7019 |
7020 __ bind(&need_incremental); | 7020 __ bind(&need_incremental); |
7021 | 7021 |
7022 // Fall through when we need to inform the incremental marker. | 7022 // Fall through when we need to inform the incremental marker. |
7023 } | 7023 } |
7024 | 7024 |
7025 | 7025 |
7026 void FastElementsConversionStub::GenerateSmiOnlyToObject(MacroAssembler* masm) { | 7026 void FastElementsConversionStub::GenerateSmiOnlyToObject(MacroAssembler* masm, |
| 7027 StrictModeFlag |
| 7028 strict_mode) { |
7027 // ----------- S t a t e ------------- | 7029 // ----------- S t a t e ------------- |
7028 // -- eax : value | 7030 // -- eax : value |
7029 // -- ebx : target map | 7031 // -- ebx : target map |
7030 // -- ecx : key | 7032 // -- ecx : key |
7031 // -- edx : receiver | 7033 // -- edx : receiver |
7032 // -- esp[0] : return address | 7034 // -- esp[0] : return address |
7033 // ----------------------------------- | 7035 // ----------------------------------- |
7034 // Set transitioned map. | 7036 // Set transitioned map. |
7035 __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); | 7037 if (FLAG_trace_elements_transitions) { |
7036 __ RecordWriteField(edx, | 7038 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode); |
7037 HeapObject::kMapOffset, | 7039 } else { |
7038 ebx, | 7040 __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); |
7039 edi, | 7041 __ RecordWriteField(edx, |
7040 kDontSaveFPRegs, | 7042 HeapObject::kMapOffset, |
7041 EMIT_REMEMBERED_SET, | 7043 ebx, |
7042 OMIT_SMI_CHECK); | 7044 edi, |
| 7045 kDontSaveFPRegs, |
| 7046 EMIT_REMEMBERED_SET, |
| 7047 OMIT_SMI_CHECK); |
| 7048 } |
7043 } | 7049 } |
7044 | 7050 |
7045 | 7051 |
7046 void FastElementsConversionStub::GenerateSmiOnlyToDouble( | 7052 void FastElementsConversionStub::GenerateSmiOnlyToDouble( |
7047 MacroAssembler* masm, StrictModeFlag strict_mode) { | 7053 MacroAssembler* masm, StrictModeFlag strict_mode) { |
7048 // ----------- S t a t e ------------- | 7054 // ----------- S t a t e ------------- |
7049 // -- eax : value | 7055 // -- eax : value |
7050 // -- ebx : target map | 7056 // -- ebx : target map |
7051 // -- ecx : key | 7057 // -- ecx : key |
7052 // -- edx : receiver | 7058 // -- edx : receiver |
7053 // -- esp[0] : return address | 7059 // -- esp[0] : return address |
7054 // ----------------------------------- | 7060 // ----------------------------------- |
7055 Label loop, entry, convert_hole, gc_required; | 7061 if (FLAG_trace_elements_transitions) { |
7056 __ push(eax); | 7062 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode); |
7057 __ push(ebx); | 7063 } else { |
| 7064 Label loop, entry, convert_hole, gc_required; |
7058 | 7065 |
7059 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); | 7066 __ push(eax); |
7060 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); | 7067 __ push(ebx); |
| 7068 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); |
| 7069 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); |
7061 | 7070 |
7062 // Allocate new FixedDoubleArray. | 7071 // Allocate new FixedDoubleArray. |
7063 // edx: receiver | 7072 // edx: receiver |
7064 // edi: length of source FixedArray (smi-tagged) | 7073 // edi: length of source FixedArray (smi-tagged) |
7065 __ lea(esi, Operand(edi, times_4, FixedDoubleArray::kHeaderSize)); | 7074 __ lea(esi, Operand(edi, times_4, FixedDoubleArray::kHeaderSize)); |
7066 __ AllocateInNewSpace(esi, eax, ebx, no_reg, &gc_required, TAG_OBJECT); | 7075 __ AllocateInNewSpace(esi, eax, ebx, no_reg, &gc_required, TAG_OBJECT); |
7067 | 7076 |
7068 // eax: destination FixedDoubleArray | 7077 // eax: destination FixedDoubleArray |
7069 // edi: number of elements | 7078 // edi: number of elements |
7070 // edx: receiver | 7079 // edx: receiver |
7071 __ mov(FieldOperand(eax, HeapObject::kMapOffset), | 7080 __ mov(FieldOperand(eax, HeapObject::kMapOffset), |
7072 Immediate(masm->isolate()->factory()->fixed_double_array_map())); | 7081 Immediate(masm->isolate()->factory()->fixed_double_array_map())); |
7073 __ mov(FieldOperand(eax, FixedDoubleArray::kLengthOffset), edi); | 7082 __ mov(FieldOperand(eax, FixedDoubleArray::kLengthOffset), edi); |
7074 __ mov(esi, FieldOperand(edx, JSObject::kElementsOffset)); | 7083 __ mov(esi, FieldOperand(edx, JSObject::kElementsOffset)); |
7075 // Replace receiver's backing store with newly created FixedDoubleArray. | 7084 // Replace receiver's backing store with newly created FixedDoubleArray. |
7076 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax); | 7085 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax); |
7077 __ mov(ebx, eax); | 7086 __ mov(ebx, eax); |
7078 __ RecordWriteField(edx, | 7087 __ RecordWriteField(edx, |
7079 JSObject::kElementsOffset, | 7088 JSObject::kElementsOffset, |
7080 ebx, | 7089 ebx, |
7081 edi, | 7090 edi, |
7082 kDontSaveFPRegs, | 7091 kDontSaveFPRegs, |
7083 EMIT_REMEMBERED_SET, | 7092 EMIT_REMEMBERED_SET, |
7084 OMIT_SMI_CHECK); | 7093 OMIT_SMI_CHECK); |
7085 | 7094 |
7086 __ mov(edi, FieldOperand(esi, FixedArray::kLengthOffset)); | 7095 __ mov(edi, FieldOperand(esi, FixedArray::kLengthOffset)); |
7087 | 7096 |
7088 // Prepare for conversion loop. | 7097 // Prepare for conversion loop. |
7089 ExternalReference canonical_the_hole_nan_reference = | 7098 ExternalReference canonical_the_hole_nan_reference = |
7090 ExternalReference::address_of_the_hole_nan(); | 7099 ExternalReference::address_of_the_hole_nan(); |
7091 XMMRegister the_hole_nan = xmm1; | 7100 XMMRegister the_hole_nan = xmm1; |
7092 if (CpuFeatures::IsSupported(SSE2)) { | 7101 if (CpuFeatures::IsSupported(SSE2)) { |
7093 CpuFeatures::Scope use_sse2(SSE2); | 7102 CpuFeatures::Scope use_sse2(SSE2); |
7094 __ movdbl(the_hole_nan, | 7103 __ movdbl(the_hole_nan, |
7095 Operand::StaticVariable(canonical_the_hole_nan_reference)); | 7104 Operand::StaticVariable(canonical_the_hole_nan_reference)); |
| 7105 } |
| 7106 __ jmp(&entry); |
| 7107 |
| 7108 // Call into runtime if GC is required. |
| 7109 __ bind(&gc_required); |
| 7110 // Restore registers before jumping into runtime. |
| 7111 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 7112 __ pop(ebx); |
| 7113 __ pop(eax); |
| 7114 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode); |
| 7115 |
| 7116 // Convert and copy elements |
| 7117 // esi: source FixedArray |
| 7118 // edi: number of elements to convert/copy |
| 7119 __ bind(&loop); |
| 7120 __ sub(edi, Immediate(Smi::FromInt(1))); |
| 7121 __ mov(ebx, FieldOperand(esi, edi, times_2, FixedArray::kHeaderSize)); |
| 7122 // ebx: current element from source |
| 7123 // edi: index of current element |
| 7124 __ JumpIfNotSmi(ebx, &convert_hole); |
| 7125 |
| 7126 // Normal smi, convert it to double and store. |
| 7127 __ SmiUntag(ebx); |
| 7128 if (CpuFeatures::IsSupported(SSE2)) { |
| 7129 CpuFeatures::Scope fscope(SSE2); |
| 7130 __ cvtsi2sd(xmm0, ebx); |
| 7131 __ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize), |
| 7132 xmm0); |
| 7133 } else { |
| 7134 __ push(ebx); |
| 7135 __ fild_s(Operand(esp, 0)); |
| 7136 __ pop(ebx); |
| 7137 __ fstp_d(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize)); |
| 7138 } |
| 7139 __ jmp(&entry); |
| 7140 |
| 7141 // Found hole, store hole_nan_as_double instead. |
| 7142 __ bind(&convert_hole); |
| 7143 if (CpuFeatures::IsSupported(SSE2)) { |
| 7144 CpuFeatures::Scope use_sse2(SSE2); |
| 7145 __ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize), |
| 7146 the_hole_nan); |
| 7147 } else { |
| 7148 __ fld_d(Operand::StaticVariable(canonical_the_hole_nan_reference)); |
| 7149 __ fstp_d(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize)); |
| 7150 } |
| 7151 |
| 7152 __ bind(&entry); |
| 7153 __ test(edi, edi); |
| 7154 __ j(not_zero, &loop); |
| 7155 |
| 7156 __ pop(ebx); |
| 7157 __ pop(eax); |
| 7158 // eax: value |
| 7159 // ebx: target map |
| 7160 // Set transitioned map. |
| 7161 __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); |
| 7162 __ RecordWriteField(edx, |
| 7163 HeapObject::kMapOffset, |
| 7164 ebx, |
| 7165 edi, |
| 7166 kDontSaveFPRegs, |
| 7167 EMIT_REMEMBERED_SET, |
| 7168 OMIT_SMI_CHECK); |
| 7169 // Restore esi. |
| 7170 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
7096 } | 7171 } |
7097 __ jmp(&entry); | |
7098 | |
7099 // Call into runtime if GC is required. | |
7100 __ bind(&gc_required); | |
7101 // Restore registers before jumping into runtime. | |
7102 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | |
7103 __ pop(ebx); | |
7104 __ pop(eax); | |
7105 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode); | |
7106 | |
7107 // Convert and copy elements | |
7108 // esi: source FixedArray | |
7109 // edi: number of elements to convert/copy | |
7110 __ bind(&loop); | |
7111 __ sub(edi, Immediate(Smi::FromInt(1))); | |
7112 __ mov(ebx, FieldOperand(esi, edi, times_2, FixedArray::kHeaderSize)); | |
7113 // ebx: current element from source | |
7114 // edi: index of current element | |
7115 __ JumpIfNotSmi(ebx, &convert_hole); | |
7116 | |
7117 // Normal smi, convert it to double and store. | |
7118 __ SmiUntag(ebx); | |
7119 if (CpuFeatures::IsSupported(SSE2)) { | |
7120 CpuFeatures::Scope fscope(SSE2); | |
7121 __ cvtsi2sd(xmm0, ebx); | |
7122 __ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize), | |
7123 xmm0); | |
7124 } else { | |
7125 __ push(ebx); | |
7126 __ fild_s(Operand(esp, 0)); | |
7127 __ pop(ebx); | |
7128 __ fstp_d(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize)); | |
7129 } | |
7130 __ jmp(&entry); | |
7131 | |
7132 // Found hole, store hole_nan_as_double instead. | |
7133 __ bind(&convert_hole); | |
7134 if (CpuFeatures::IsSupported(SSE2)) { | |
7135 CpuFeatures::Scope use_sse2(SSE2); | |
7136 __ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize), | |
7137 the_hole_nan); | |
7138 } else { | |
7139 __ fld_d(Operand::StaticVariable(canonical_the_hole_nan_reference)); | |
7140 __ fstp_d(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize)); | |
7141 } | |
7142 | |
7143 __ bind(&entry); | |
7144 __ test(edi, edi); | |
7145 __ j(not_zero, &loop); | |
7146 | |
7147 __ pop(ebx); | |
7148 __ pop(eax); | |
7149 // eax: value | |
7150 // ebx: target map | |
7151 // Set transitioned map. | |
7152 __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); | |
7153 __ RecordWriteField(edx, | |
7154 HeapObject::kMapOffset, | |
7155 ebx, | |
7156 edi, | |
7157 kDontSaveFPRegs, | |
7158 EMIT_REMEMBERED_SET, | |
7159 OMIT_SMI_CHECK); | |
7160 // Restore esi. | |
7161 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | |
7162 } | 7172 } |
7163 | 7173 |
7164 | 7174 |
7165 void FastElementsConversionStub::GenerateDoubleToObject( | 7175 void FastElementsConversionStub::GenerateDoubleToObject( |
7166 MacroAssembler* masm, StrictModeFlag strict_mode) { | 7176 MacroAssembler* masm, StrictModeFlag strict_mode) { |
7167 // ----------- S t a t e ------------- | 7177 // ----------- S t a t e ------------- |
7168 // -- eax : value | 7178 // -- eax : value |
7169 // -- ebx : target map | 7179 // -- ebx : target map |
7170 // -- ecx : key | 7180 // -- ecx : key |
7171 // -- edx : receiver | 7181 // -- edx : receiver |
7172 // -- esp[0] : return address | 7182 // -- esp[0] : return address |
7173 // ----------------------------------- | 7183 // ----------------------------------- |
7174 Label loop, entry, convert_hole, gc_required; | 7184 if (FLAG_trace_elements_transitions) { |
7175 __ push(eax); | 7185 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode); |
7176 __ push(edx); | 7186 } else { |
7177 __ push(ebx); | 7187 Label loop, entry, convert_hole, gc_required; |
| 7188 __ push(eax); |
| 7189 __ push(edx); |
| 7190 __ push(ebx); |
7178 | 7191 |
7179 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); | 7192 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); |
7180 __ mov(ebx, FieldOperand(edi, FixedDoubleArray::kLengthOffset)); | 7193 __ mov(ebx, FieldOperand(edi, FixedDoubleArray::kLengthOffset)); |
7181 | 7194 |
7182 // Allocate new FixedArray. | 7195 // Allocate new FixedArray. |
7183 // ebx: length of source FixedDoubleArray (smi-tagged) | 7196 // ebx: length of source FixedDoubleArray (smi-tagged) |
7184 __ lea(edi, Operand(ebx, times_2, FixedArray::kHeaderSize)); | 7197 __ lea(edi, Operand(ebx, times_2, FixedArray::kHeaderSize)); |
7185 __ AllocateInNewSpace(edi, eax, esi, no_reg, &gc_required, TAG_OBJECT); | 7198 __ AllocateInNewSpace(edi, eax, esi, no_reg, &gc_required, TAG_OBJECT); |
7186 | 7199 |
7187 // eax: destination FixedArray | 7200 // eax: destination FixedArray |
7188 // ebx: number of elements | 7201 // ebx: number of elements |
7189 __ mov(FieldOperand(eax, HeapObject::kMapOffset), | 7202 __ mov(FieldOperand(eax, HeapObject::kMapOffset), |
7190 Immediate(masm->isolate()->factory()->fixed_array_map())); | 7203 Immediate(masm->isolate()->factory()->fixed_array_map())); |
7191 __ mov(FieldOperand(eax, FixedArray::kLengthOffset), ebx); | 7204 __ mov(FieldOperand(eax, FixedArray::kLengthOffset), ebx); |
7192 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); | 7205 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); |
7193 | 7206 |
7194 __ jmp(&entry); | 7207 __ jmp(&entry); |
7195 | 7208 |
7196 // Call into runtime if GC is required. | 7209 // Call into runtime if GC is required. |
7197 __ bind(&gc_required); | 7210 __ bind(&gc_required); |
7198 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 7211 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
7199 __ pop(ebx); | 7212 __ pop(ebx); |
7200 __ pop(edx); | 7213 __ pop(edx); |
7201 __ pop(eax); | 7214 __ pop(eax); |
7202 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode); | 7215 KeyedStoreIC::GenerateRuntimeSetProperty(masm, strict_mode); |
7203 | 7216 |
7204 // Box doubles into heap numbers. | 7217 // Box doubles into heap numbers. |
7205 // edi: source FixedDoubleArray | 7218 // edi: source FixedDoubleArray |
7206 // eax: destination FixedArray | 7219 // eax: destination FixedArray |
7207 __ bind(&loop); | 7220 __ bind(&loop); |
7208 __ sub(ebx, Immediate(Smi::FromInt(1))); | 7221 __ sub(ebx, Immediate(Smi::FromInt(1))); |
7209 // ebx: index of current element (smi-tagged) | 7222 // ebx: index of current element (smi-tagged) |
7210 uint32_t offset = FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32); | 7223 uint32_t offset = FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32); |
7211 __ cmp(FieldOperand(edi, ebx, times_4, offset), Immediate(kHoleNanUpper32)); | 7224 __ cmp(FieldOperand(edi, ebx, times_4, offset), Immediate(kHoleNanUpper32)); |
7212 __ j(equal, &convert_hole); | 7225 __ j(equal, &convert_hole); |
7213 | 7226 |
7214 // Non-hole double, copy value into a heap number. | 7227 // Non-hole double, copy value into a heap number. |
7215 __ AllocateHeapNumber(edx, esi, no_reg, &gc_required); | 7228 __ AllocateHeapNumber(edx, esi, no_reg, &gc_required); |
7216 // edx: new heap number | 7229 // edx: new heap number |
7217 if (CpuFeatures::IsSupported(SSE2)) { | 7230 if (CpuFeatures::IsSupported(SSE2)) { |
7218 CpuFeatures::Scope fscope(SSE2); | 7231 CpuFeatures::Scope fscope(SSE2); |
7219 __ movdbl(xmm0, | 7232 __ movdbl(xmm0, |
7220 FieldOperand(edi, ebx, times_4, FixedDoubleArray::kHeaderSize)); | 7233 FieldOperand(edi, ebx, times_4, FixedDoubleArray::kHeaderSize)); |
7221 __ movdbl(FieldOperand(edx, HeapNumber::kValueOffset), xmm0); | 7234 __ movdbl(FieldOperand(edx, HeapNumber::kValueOffset), xmm0); |
7222 } else { | 7235 } else { |
7223 __ mov(esi, FieldOperand(edi, ebx, times_4, FixedDoubleArray::kHeaderSize)); | 7236 __ mov(esi, FieldOperand(edi, ebx, times_4, |
7224 __ mov(FieldOperand(edx, HeapNumber::kValueOffset), esi); | 7237 FixedDoubleArray::kHeaderSize)); |
7225 __ mov(esi, FieldOperand(edi, ebx, times_4, offset)); | 7238 __ mov(FieldOperand(edx, HeapNumber::kValueOffset), esi); |
7226 __ mov(FieldOperand(edx, HeapNumber::kValueOffset + kPointerSize), esi); | 7239 __ mov(esi, FieldOperand(edi, ebx, times_4, offset)); |
| 7240 __ mov(FieldOperand(edx, HeapNumber::kValueOffset + kPointerSize), esi); |
| 7241 } |
| 7242 __ mov(FieldOperand(eax, ebx, times_2, FixedArray::kHeaderSize), edx); |
| 7243 __ mov(esi, ebx); |
| 7244 __ RecordWriteArray(eax, |
| 7245 edx, |
| 7246 esi, |
| 7247 kDontSaveFPRegs, |
| 7248 EMIT_REMEMBERED_SET, |
| 7249 OMIT_SMI_CHECK); |
| 7250 __ jmp(&entry, Label::kNear); |
| 7251 |
| 7252 // Replace the-hole NaN with the-hole pointer. |
| 7253 __ bind(&convert_hole); |
| 7254 __ mov(FieldOperand(eax, ebx, times_2, FixedArray::kHeaderSize), |
| 7255 masm->isolate()->factory()->the_hole_value()); |
| 7256 |
| 7257 __ bind(&entry); |
| 7258 __ test(ebx, ebx); |
| 7259 __ j(not_zero, &loop); |
| 7260 |
| 7261 __ pop(ebx); |
| 7262 __ pop(edx); |
| 7263 // ebx: target map |
| 7264 // edx: receiver |
| 7265 // Set transitioned map. |
| 7266 __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); |
| 7267 __ RecordWriteField(edx, |
| 7268 HeapObject::kMapOffset, |
| 7269 ebx, |
| 7270 edi, |
| 7271 kDontSaveFPRegs, |
| 7272 EMIT_REMEMBERED_SET, |
| 7273 OMIT_SMI_CHECK); |
| 7274 // Replace receiver's backing store with newly created and filled |
| 7275 // FixedArray. |
| 7276 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax); |
| 7277 __ RecordWriteField(edx, |
| 7278 JSObject::kElementsOffset, |
| 7279 eax, |
| 7280 edi, |
| 7281 kDontSaveFPRegs, |
| 7282 EMIT_REMEMBERED_SET, |
| 7283 OMIT_SMI_CHECK); |
| 7284 |
| 7285 // Restore registers. |
| 7286 __ pop(eax); |
| 7287 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
7227 } | 7288 } |
7228 __ mov(FieldOperand(eax, ebx, times_2, FixedArray::kHeaderSize), edx); | |
7229 __ mov(esi, ebx); | |
7230 __ RecordWriteArray(eax, | |
7231 edx, | |
7232 esi, | |
7233 kDontSaveFPRegs, | |
7234 EMIT_REMEMBERED_SET, | |
7235 OMIT_SMI_CHECK); | |
7236 __ jmp(&entry, Label::kNear); | |
7237 | |
7238 // Replace the-hole NaN with the-hole pointer. | |
7239 __ bind(&convert_hole); | |
7240 __ mov(FieldOperand(eax, ebx, times_2, FixedArray::kHeaderSize), | |
7241 masm->isolate()->factory()->the_hole_value()); | |
7242 | |
7243 __ bind(&entry); | |
7244 __ test(ebx, ebx); | |
7245 __ j(not_zero, &loop); | |
7246 | |
7247 __ pop(ebx); | |
7248 __ pop(edx); | |
7249 // ebx: target map | |
7250 // edx: receiver | |
7251 // Set transitioned map. | |
7252 __ mov(FieldOperand(edx, HeapObject::kMapOffset), ebx); | |
7253 __ RecordWriteField(edx, | |
7254 HeapObject::kMapOffset, | |
7255 ebx, | |
7256 edi, | |
7257 kDontSaveFPRegs, | |
7258 EMIT_REMEMBERED_SET, | |
7259 OMIT_SMI_CHECK); | |
7260 // Replace receiver's backing store with newly created and filled FixedArray. | |
7261 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax); | |
7262 __ RecordWriteField(edx, | |
7263 JSObject::kElementsOffset, | |
7264 eax, | |
7265 edi, | |
7266 kDontSaveFPRegs, | |
7267 EMIT_REMEMBERED_SET, | |
7268 OMIT_SMI_CHECK); | |
7269 | |
7270 // Restore registers. | |
7271 __ pop(eax); | |
7272 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | |
7273 } | 7289 } |
7274 | 7290 |
7275 #undef __ | 7291 #undef __ |
7276 | 7292 |
7277 } } // namespace v8::internal | 7293 } } // namespace v8::internal |
7278 | 7294 |
7279 #endif // V8_TARGET_ARCH_IA32 | 7295 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |