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

Side by Side Diff: src/x64/stub-cache-x64.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/ia32/stub-cache-ia32.cc ('k') | no next file » | 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 4090 matching lines...) Expand 10 before | Expand all | Expand 10 after
4101 // rcx: key 4101 // rcx: key
4102 // rdx: receiver 4102 // rdx: receiver
4103 // rdi: elements 4103 // rdi: elements
4104 // Initialize the new FixedDoubleArray. Leave elements unitialized for 4104 // Initialize the new FixedDoubleArray. Leave elements unitialized for
4105 // efficiency, they are guaranteed to be initialized before use. 4105 // efficiency, they are guaranteed to be initialized before use.
4106 __ Move(FieldOperand(rdi, JSObject::kMapOffset), 4106 __ Move(FieldOperand(rdi, JSObject::kMapOffset),
4107 masm->isolate()->factory()->fixed_double_array_map()); 4107 masm->isolate()->factory()->fixed_double_array_map());
4108 __ Move(FieldOperand(rdi, FixedDoubleArray::kLengthOffset), 4108 __ Move(FieldOperand(rdi, FixedDoubleArray::kLengthOffset),
4109 Smi::FromInt(JSArray::kPreallocatedArrayElements)); 4109 Smi::FromInt(JSArray::kPreallocatedArrayElements));
4110 4110
4111 // Increment the length of the array.
4112 __ SmiToInteger32(rcx, rcx);
4113 __ StoreNumberToDoubleElements(rax, rdi, rcx, xmm0,
4114 &restore_key_transition_elements_kind);
4115
4111 __ movq(r8, BitCast<int64_t, uint64_t>(kHoleNanInt64), RelocInfo::NONE); 4116 __ movq(r8, BitCast<int64_t, uint64_t>(kHoleNanInt64), RelocInfo::NONE);
4112 for (int i = 1; i < JSArray::kPreallocatedArrayElements; i++) { 4117 for (int i = 1; i < JSArray::kPreallocatedArrayElements; i++) {
4113 __ movq(FieldOperand(rdi, FixedDoubleArray::OffsetOfElementAt(i)), r8); 4118 __ movq(FieldOperand(rdi, FixedDoubleArray::OffsetOfElementAt(i)), r8);
4114 } 4119 }
4115 4120
4116 // Increment the length of the array.
4117 __ SmiToInteger32(rcx, rcx);
4118 __ StoreNumberToDoubleElements(rax, rdi, rcx, xmm0,
4119 &restore_key_transition_elements_kind);
4120
4121 // Install the new backing store in the JSArray. 4121 // Install the new backing store in the JSArray.
4122 __ movq(FieldOperand(rdx, JSObject::kElementsOffset), rdi); 4122 __ movq(FieldOperand(rdx, JSObject::kElementsOffset), rdi);
4123 __ RecordWriteField(rdx, JSObject::kElementsOffset, rdi, rbx, 4123 __ RecordWriteField(rdx, JSObject::kElementsOffset, rdi, rbx,
4124 kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); 4124 kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
4125 4125
4126 // Increment the length of the array. 4126 // Increment the length of the array.
4127 __ Move(FieldOperand(rdx, JSArray::kLengthOffset), Smi::FromInt(1)); 4127 __ Move(FieldOperand(rdx, JSArray::kLengthOffset), Smi::FromInt(1));
4128 __ movq(rdi, FieldOperand(rdx, JSObject::kElementsOffset)); 4128 __ movq(rdi, FieldOperand(rdx, JSObject::kElementsOffset));
4129 __ ret(0); 4129 __ ret(0);
4130 4130
(...skipping 16 matching lines...) Expand all
4147 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 4147 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
4148 } 4148 }
4149 } 4149 }
4150 4150
4151 4151
4152 #undef __ 4152 #undef __
4153 4153
4154 } } // namespace v8::internal 4154 } } // namespace v8::internal
4155 4155
4156 #endif // V8_TARGET_ARCH_X64 4156 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698