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

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

Issue 7992003: Porting r9392 to x64 (smi-only arrays). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: save one memory access. Created 9 years, 3 months 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 | « no previous file | src/x64/full-codegen-x64.cc » ('j') | src/x64/ic-x64.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3918 matching lines...) Expand 10 before | Expand all | Expand 10 after
3929 __ cmp(ecx, FieldOperand(edx, JSArray::kLengthOffset)); // smis. 3929 __ cmp(ecx, FieldOperand(edx, JSArray::kLengthOffset)); // smis.
3930 __ j(above_equal, &miss_force_generic); 3930 __ j(above_equal, &miss_force_generic);
3931 } else { 3931 } else {
3932 // Check that the key is within bounds. 3932 // Check that the key is within bounds.
3933 __ cmp(ecx, FieldOperand(edi, FixedArray::kLengthOffset)); // smis. 3933 __ cmp(ecx, FieldOperand(edi, FixedArray::kLengthOffset)); // smis.
3934 __ j(above_equal, &miss_force_generic); 3934 __ j(above_equal, &miss_force_generic);
3935 } 3935 }
3936 3936
3937 if (elements_kind == FAST_SMI_ONLY_ELEMENTS) { 3937 if (elements_kind == FAST_SMI_ONLY_ELEMENTS) {
3938 __ JumpIfNotSmi(eax, &miss_force_generic); 3938 __ JumpIfNotSmi(eax, &miss_force_generic);
3939 // ecx is a smi, don't use times_half_pointer_size istead of 3939 // ecx is a smi, use times_half_pointer_size instead of
3940 // times_pointer_size 3940 // times_pointer_size
3941 __ mov(FieldOperand(edi, 3941 __ mov(FieldOperand(edi,
3942 ecx, 3942 ecx,
3943 times_half_pointer_size, 3943 times_half_pointer_size,
3944 FixedArray::kHeaderSize), eax); 3944 FixedArray::kHeaderSize), eax);
3945 } else { 3945 } else {
3946 ASSERT(elements_kind == FAST_ELEMENTS); 3946 ASSERT(elements_kind == FAST_ELEMENTS);
3947 // Do the store and update the write barrier. 3947 // Do the store and update the write barrier.
3948 // ecx is a smi, don't use times_half_pointer_size istead of 3948 // ecx is a smi, use times_half_pointer_size instead of
3949 // times_pointer_size 3949 // times_pointer_size
3950 __ lea(ecx, FieldOperand(edi, 3950 __ lea(ecx, FieldOperand(edi,
3951 ecx, 3951 ecx,
3952 times_half_pointer_size, 3952 times_half_pointer_size,
3953 FixedArray::kHeaderSize)); 3953 FixedArray::kHeaderSize));
3954 __ mov(Operand(ecx, 0), eax); 3954 __ mov(Operand(ecx, 0), eax);
3955 // Make sure to preserve the value in register eax. 3955 // Make sure to preserve the value in register eax.
3956 __ mov(edx, Operand(eax)); 3956 __ mov(edx, Operand(eax));
3957 __ RecordWrite(edi, ecx, edx, kDontSaveFPRegs); 3957 __ RecordWrite(edi, ecx, edx, kDontSaveFPRegs);
3958 } 3958 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
4060 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); 4060 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric();
4061 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); 4061 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET);
4062 } 4062 }
4063 4063
4064 4064
4065 #undef __ 4065 #undef __
4066 4066
4067 } } // namespace v8::internal 4067 } } // namespace v8::internal
4068 4068
4069 #endif // V8_TARGET_ARCH_IA32 4069 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/x64/full-codegen-x64.cc » ('j') | src/x64/ic-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698