| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 7045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7056 // GenerateStoreField calls the stub with two different permutations of | 7056 // GenerateStoreField calls the stub with two different permutations of |
| 7057 // registers. This is the second. | 7057 // registers. This is the second. |
| 7058 { REG(ebx), REG(ecx), REG(edx), EMIT_REMEMBERED_SET }, | 7058 { REG(ebx), REG(ecx), REG(edx), EMIT_REMEMBERED_SET }, |
| 7059 // StoreIC::GenerateNormal via GenerateDictionaryStore | 7059 // StoreIC::GenerateNormal via GenerateDictionaryStore |
| 7060 { REG(ebx), REG(edi), REG(edx), EMIT_REMEMBERED_SET }, | 7060 { REG(ebx), REG(edi), REG(edx), EMIT_REMEMBERED_SET }, |
| 7061 // KeyedStoreIC::GenerateGeneric. | 7061 // KeyedStoreIC::GenerateGeneric. |
| 7062 { REG(ebx), REG(edx), REG(ecx), EMIT_REMEMBERED_SET}, | 7062 { REG(ebx), REG(edx), REG(ecx), EMIT_REMEMBERED_SET}, |
| 7063 // KeyedStoreStubCompiler::GenerateStoreFastElement. | 7063 // KeyedStoreStubCompiler::GenerateStoreFastElement. |
| 7064 { REG(edi), REG(ebx), REG(ecx), EMIT_REMEMBERED_SET}, | 7064 { REG(edi), REG(ebx), REG(ecx), EMIT_REMEMBERED_SET}, |
| 7065 { REG(edx), REG(edi), REG(ebx), EMIT_REMEMBERED_SET}, | 7065 { REG(edx), REG(edi), REG(ebx), EMIT_REMEMBERED_SET}, |
| 7066 // ElementsTransitionGenerator::GenerateMapChangeElementTransition | 7066 // ElementsTransitionGenerator::GenerateSmiOnlyToObject |
| 7067 // and ElementsTransitionGenerator::GenerateSmiToDouble | 7067 // and ElementsTransitionGenerator::GenerateSmiOnlyToDouble |
| 7068 // and ElementsTransitionGenerator::GenerateDoubleToObject | 7068 // and ElementsTransitionGenerator::GenerateDoubleToObject |
| 7069 { REG(edx), REG(ebx), REG(edi), EMIT_REMEMBERED_SET}, | 7069 { REG(edx), REG(ebx), REG(edi), EMIT_REMEMBERED_SET}, |
| 7070 { REG(edx), REG(ebx), REG(edi), OMIT_REMEMBERED_SET}, | 7070 { REG(edx), REG(ebx), REG(edi), OMIT_REMEMBERED_SET}, |
| 7071 // ElementsTransitionGenerator::GenerateDoubleToObject | 7071 // ElementsTransitionGenerator::GenerateDoubleToObject |
| 7072 { REG(eax), REG(edx), REG(esi), EMIT_REMEMBERED_SET}, | 7072 { REG(eax), REG(edx), REG(esi), EMIT_REMEMBERED_SET}, |
| 7073 { REG(edx), REG(eax), REG(edi), EMIT_REMEMBERED_SET}, | 7073 { REG(edx), REG(eax), REG(edi), EMIT_REMEMBERED_SET}, |
| 7074 // StoreArrayLiteralElementStub::Generate | 7074 // StoreArrayLiteralElementStub::Generate |
| 7075 { REG(ebx), REG(eax), REG(ecx), EMIT_REMEMBERED_SET}, | 7075 { REG(ebx), REG(eax), REG(ecx), EMIT_REMEMBERED_SET}, |
| 7076 // Null termination. | 7076 // Null termination. |
| 7077 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET} | 7077 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET} |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7329 | 7329 |
| 7330 Label element_done; | 7330 Label element_done; |
| 7331 Label double_elements; | 7331 Label double_elements; |
| 7332 Label smi_element; | 7332 Label smi_element; |
| 7333 Label slow_elements; | 7333 Label slow_elements; |
| 7334 Label slow_elements_from_double; | 7334 Label slow_elements_from_double; |
| 7335 Label fast_elements; | 7335 Label fast_elements; |
| 7336 | 7336 |
| 7337 __ CheckFastElements(edi, &double_elements); | 7337 __ CheckFastElements(edi, &double_elements); |
| 7338 | 7338 |
| 7339 // Check for FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS elements | 7339 // FAST_SMI_ONLY_ELEMENTS or FAST_ELEMENTS |
| 7340 __ JumpIfSmi(eax, &smi_element); | 7340 __ JumpIfSmi(eax, &smi_element); |
| 7341 __ CheckFastSmiElements(edi, &fast_elements, Label::kNear); | 7341 __ CheckFastSmiOnlyElements(edi, &fast_elements, Label::kNear); |
| 7342 | 7342 |
| 7343 // Store into the array literal requires a elements transition. Call into | 7343 // Store into the array literal requires a elements transition. Call into |
| 7344 // the runtime. | 7344 // the runtime. |
| 7345 | 7345 |
| 7346 __ bind(&slow_elements); | 7346 __ bind(&slow_elements); |
| 7347 __ pop(edi); // Pop return address and remember to put back later for tail | 7347 __ pop(edi); // Pop return address and remember to put back later for tail |
| 7348 // call. | 7348 // call. |
| 7349 __ push(ebx); | 7349 __ push(ebx); |
| 7350 __ push(ecx); | 7350 __ push(ecx); |
| 7351 __ push(eax); | 7351 __ push(eax); |
| 7352 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 7352 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 7353 __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset)); | 7353 __ push(FieldOperand(ebx, JSFunction::kLiteralsOffset)); |
| 7354 __ push(edx); | 7354 __ push(edx); |
| 7355 __ push(edi); // Return return address so that tail call returns to right | 7355 __ push(edi); // Return return address so that tail call returns to right |
| 7356 // place. | 7356 // place. |
| 7357 __ TailCallRuntime(Runtime::kStoreArrayLiteralElement, 5, 1); | 7357 __ TailCallRuntime(Runtime::kStoreArrayLiteralElement, 5, 1); |
| 7358 | 7358 |
| 7359 __ bind(&slow_elements_from_double); | 7359 __ bind(&slow_elements_from_double); |
| 7360 __ pop(edx); | 7360 __ pop(edx); |
| 7361 __ jmp(&slow_elements); | 7361 __ jmp(&slow_elements); |
| 7362 | 7362 |
| 7363 // Array literal has ElementsKind of FAST_*_ELEMENTS and value is an object. | 7363 // Array literal has ElementsKind of FAST_ELEMENTS and value is an object. |
| 7364 __ bind(&fast_elements); | 7364 __ bind(&fast_elements); |
| 7365 __ mov(ebx, FieldOperand(ebx, JSObject::kElementsOffset)); | 7365 __ mov(ebx, FieldOperand(ebx, JSObject::kElementsOffset)); |
| 7366 __ lea(ecx, FieldOperand(ebx, ecx, times_half_pointer_size, | 7366 __ lea(ecx, FieldOperand(ebx, ecx, times_half_pointer_size, |
| 7367 FixedArrayBase::kHeaderSize)); | 7367 FixedArrayBase::kHeaderSize)); |
| 7368 __ mov(Operand(ecx, 0), eax); | 7368 __ mov(Operand(ecx, 0), eax); |
| 7369 // Update the write barrier for the array store. | 7369 // Update the write barrier for the array store. |
| 7370 __ RecordWrite(ebx, ecx, eax, | 7370 __ RecordWrite(ebx, ecx, eax, |
| 7371 kDontSaveFPRegs, | 7371 kDontSaveFPRegs, |
| 7372 EMIT_REMEMBERED_SET, | 7372 EMIT_REMEMBERED_SET, |
| 7373 OMIT_SMI_CHECK); | 7373 OMIT_SMI_CHECK); |
| 7374 __ ret(0); | 7374 __ ret(0); |
| 7375 | 7375 |
| 7376 // Array literal has ElementsKind of FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS, | 7376 // Array literal has ElementsKind of FAST_SMI_ONLY_ELEMENTS or |
| 7377 // and value is Smi. | 7377 // FAST_ELEMENTS, and value is Smi. |
| 7378 __ bind(&smi_element); | 7378 __ bind(&smi_element); |
| 7379 __ mov(ebx, FieldOperand(ebx, JSObject::kElementsOffset)); | 7379 __ mov(ebx, FieldOperand(ebx, JSObject::kElementsOffset)); |
| 7380 __ mov(FieldOperand(ebx, ecx, times_half_pointer_size, | 7380 __ mov(FieldOperand(ebx, ecx, times_half_pointer_size, |
| 7381 FixedArrayBase::kHeaderSize), eax); | 7381 FixedArrayBase::kHeaderSize), eax); |
| 7382 __ ret(0); | 7382 __ ret(0); |
| 7383 | 7383 |
| 7384 // Array literal has ElementsKind of FAST_*_DOUBLE_ELEMENTS. | 7384 // Array literal has ElementsKind of FAST_DOUBLE_ELEMENTS. |
| 7385 __ bind(&double_elements); | 7385 __ bind(&double_elements); |
| 7386 | 7386 |
| 7387 __ push(edx); | 7387 __ push(edx); |
| 7388 __ mov(edx, FieldOperand(ebx, JSObject::kElementsOffset)); | 7388 __ mov(edx, FieldOperand(ebx, JSObject::kElementsOffset)); |
| 7389 __ StoreNumberToDoubleElements(eax, | 7389 __ StoreNumberToDoubleElements(eax, |
| 7390 edx, | 7390 edx, |
| 7391 ecx, | 7391 ecx, |
| 7392 edi, | 7392 edi, |
| 7393 xmm0, | 7393 xmm0, |
| 7394 &slow_elements_from_double, | 7394 &slow_elements_from_double, |
| 7395 false); | 7395 false); |
| 7396 __ pop(edx); | 7396 __ pop(edx); |
| 7397 __ ret(0); | 7397 __ ret(0); |
| 7398 } | 7398 } |
| 7399 | 7399 |
| 7400 #undef __ | 7400 #undef __ |
| 7401 | 7401 |
| 7402 } } // namespace v8::internal | 7402 } } // namespace v8::internal |
| 7403 | 7403 |
| 7404 #endif // V8_TARGET_ARCH_IA32 | 7404 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |