Fixed a bug in smi-only implementation in x64.

Review URL: http://codereview.chromium.org/8060009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9451 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2011-09-27 12:25:42 +00:00
parent 9f8d2d4f0e
commit 8581ac213a

View File

@ -3722,13 +3722,14 @@ void KeyedStoreStubCompiler::GenerateStoreFastElement(
}
// Do the store and update the write barrier.
__ SmiToInteger32(rcx, rcx);
if (elements_kind == FAST_SMI_ONLY_ELEMENTS) {
__ JumpIfNotSmi(rax, &miss_force_generic);
__ SmiToInteger32(rcx, rcx);
__ movq(FieldOperand(rdi, rcx, times_pointer_size, FixedArray::kHeaderSize),
rax);
} else {
ASSERT(elements_kind == FAST_ELEMENTS);
__ SmiToInteger32(rcx, rcx);
__ lea(rcx,
FieldOperand(rdi, rcx, times_pointer_size, FixedArray::kHeaderSize));
__ movq(Operand(rcx, 0), rax);