Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 11299200: Only fill in holes if storing the number to the double array has succeeded. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4341 matching lines...) Expand 10 before | Expand all | Expand 10 after
4352 // eax: value 4352 // eax: value
4353 // ecx: key 4353 // ecx: key
4354 // edx: receiver 4354 // edx: receiver
4355 // edi: elements 4355 // edi: elements
4356 // Initialize the new FixedDoubleArray. 4356 // Initialize the new FixedDoubleArray.
4357 __ mov(FieldOperand(edi, JSObject::kMapOffset), 4357 __ mov(FieldOperand(edi, JSObject::kMapOffset),
4358 Immediate(masm->isolate()->factory()->fixed_double_array_map())); 4358 Immediate(masm->isolate()->factory()->fixed_double_array_map()));
4359 __ mov(FieldOperand(edi, FixedDoubleArray::kLengthOffset), 4359 __ mov(FieldOperand(edi, FixedDoubleArray::kLengthOffset),
4360 Immediate(Smi::FromInt(JSArray::kPreallocatedArrayElements))); 4360 Immediate(Smi::FromInt(JSArray::kPreallocatedArrayElements)));
4361 4361
4362 __ StoreNumberToDoubleElements(eax, edi, ecx, ebx, xmm0,
4363 &transition_elements_kind, true);
4364
4362 for (int i = 1; i < JSArray::kPreallocatedArrayElements; i++) { 4365 for (int i = 1; i < JSArray::kPreallocatedArrayElements; i++) {
4363 int offset = FixedDoubleArray::OffsetOfElementAt(i); 4366 int offset = FixedDoubleArray::OffsetOfElementAt(i);
4364 __ mov(FieldOperand(edi, offset), Immediate(kHoleNanLower32)); 4367 __ mov(FieldOperand(edi, offset), Immediate(kHoleNanLower32));
4365 __ mov(FieldOperand(edi, offset + kPointerSize), 4368 __ mov(FieldOperand(edi, offset + kPointerSize),
4366 Immediate(kHoleNanUpper32)); 4369 Immediate(kHoleNanUpper32));
4367 } 4370 }
4368 4371
4369 __ StoreNumberToDoubleElements(eax, edi, ecx, ebx, xmm0,
4370 &transition_elements_kind, true);
4371
4372 // Install the new backing store in the JSArray. 4372 // Install the new backing store in the JSArray.
4373 __ mov(FieldOperand(edx, JSObject::kElementsOffset), edi); 4373 __ mov(FieldOperand(edx, JSObject::kElementsOffset), edi);
4374 __ RecordWriteField(edx, JSObject::kElementsOffset, edi, ebx, 4374 __ RecordWriteField(edx, JSObject::kElementsOffset, edi, ebx,
4375 kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); 4375 kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
4376 4376
4377 // Increment the length of the array. 4377 // Increment the length of the array.
4378 __ add(FieldOperand(edx, JSArray::kLengthOffset), 4378 __ add(FieldOperand(edx, JSArray::kLengthOffset),
4379 Immediate(Smi::FromInt(1))); 4379 Immediate(Smi::FromInt(1)));
4380 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); 4380 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset));
4381 __ ret(0); 4381 __ ret(0);
(...skipping 21 matching lines...) Expand all
4403 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 4403 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
4404 } 4404 }
4405 } 4405 }
4406 4406
4407 4407
4408 #undef __ 4408 #undef __
4409 4409
4410 } } // namespace v8::internal 4410 } } // namespace v8::internal
4411 4411
4412 #endif // V8_TARGET_ARCH_IA32 4412 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698