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

Side by Side Diff: src/arm/ic-arm.cc

Issue 6287030: Create specialized code stubs for PixelArray loads. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: review feedback Created 9 years, 10 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 | « src/arm/code-stubs-arm.cc ('k') | src/arm/stub-cache-arm.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 1182
1183 GenerateFastArrayLoad( 1183 GenerateFastArrayLoad(
1184 masm, receiver, key, r4, r3, r2, r0, NULL, &slow); 1184 masm, receiver, key, r4, r3, r2, r0, NULL, &slow);
1185 __ IncrementCounter(&Counters::keyed_load_generic_smi, 1, r2, r3); 1185 __ IncrementCounter(&Counters::keyed_load_generic_smi, 1, r2, r3);
1186 __ Ret(); 1186 __ Ret();
1187 1187
1188 // Check whether the elements is a pixel array. 1188 // Check whether the elements is a pixel array.
1189 // r0: key 1189 // r0: key
1190 // r1: receiver 1190 // r1: receiver
1191 __ bind(&check_pixel_array); 1191 __ bind(&check_pixel_array);
1192 __ ldr(r4, FieldMemOperand(r1, JSObject::kElementsOffset)); 1192
1193 __ ldr(r3, FieldMemOperand(r4, HeapObject::kMapOffset)); 1193 GenerateFastPixelArrayLoad(masm,
1194 __ LoadRoot(ip, Heap::kPixelArrayMapRootIndex); 1194 r1,
1195 __ cmp(r3, ip); 1195 r0,
1196 __ b(ne, &check_number_dictionary); 1196 r3,
1197 __ ldr(ip, FieldMemOperand(r4, PixelArray::kLengthOffset)); 1197 r4,
1198 __ mov(r2, Operand(key, ASR, kSmiTagSize)); 1198 r2,
1199 __ cmp(r2, ip); 1199 r5,
1200 __ b(hs, &slow); 1200 r0,
1201 __ ldr(ip, FieldMemOperand(r4, PixelArray::kExternalPointerOffset)); 1201 &check_number_dictionary,
1202 __ ldrb(r2, MemOperand(ip, r2)); 1202 NULL,
1203 __ mov(r0, Operand(r2, LSL, kSmiTagSize)); // Tag result as smi. 1203 &slow);
1204 __ Ret();
1205 1204
1206 __ bind(&check_number_dictionary); 1205 __ bind(&check_number_dictionary);
1207 // Check whether the elements is a number dictionary. 1206 // Check whether the elements is a number dictionary.
1208 // r0: key 1207 // r0: key
1209 // r3: elements map 1208 // r3: elements map
1210 // r4: elements 1209 // r4: elements
1211 __ LoadRoot(ip, Heap::kHashTableMapRootIndex); 1210 __ LoadRoot(ip, Heap::kHashTableMapRootIndex);
1212 __ cmp(r3, ip); 1211 __ cmp(r3, ip);
1213 __ b(ne, &slow); 1212 __ b(ne, &slow);
1214 __ mov(r2, Operand(r0, ASR, kSmiTagSize)); 1213 __ mov(r2, Operand(r0, ASR, kSmiTagSize));
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 1704
1706 1705
1707 void PatchInlinedSmiCode(Address address) { 1706 void PatchInlinedSmiCode(Address address) {
1708 // Currently there is no smi inlining in the ARM full code generator. 1707 // Currently there is no smi inlining in the ARM full code generator.
1709 } 1708 }
1710 1709
1711 1710
1712 } } // namespace v8::internal 1711 } } // namespace v8::internal
1713 1712
1714 #endif // V8_TARGET_ARCH_ARM 1713 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698