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

Unified Diff: src/arm/ic-arm.cc

Issue 6546036: Combine typed and pixel arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: final version Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/ic-arm.cc
diff --git a/src/arm/ic-arm.cc b/src/arm/ic-arm.cc
index 0fc6818703375b649d8d31cd543058c0eed237f3..85a0c09b411be171ba4ad555120acf691d9a204d 100644
--- a/src/arm/ic-arm.cc
+++ b/src/arm/ic-arm.cc
@@ -1170,7 +1170,7 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
// -- r1 : receiver
// -----------------------------------
Label slow, check_string, index_smi, index_string, property_array_property;
- Label check_pixel_array, probe_dictionary, check_number_dictionary;
+ Label probe_dictionary, check_number_dictionary;
Register key = r0;
Register receiver = r1;
@@ -1188,31 +1188,17 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) {
// now in r2.
__ ldrb(r3, FieldMemOperand(r2, Map::kBitField2Offset));
__ tst(r3, Operand(1 << Map::kHasFastElements));
- __ b(eq, &check_pixel_array);
+ __ b(eq, &check_number_dictionary);
GenerateFastArrayLoad(
masm, receiver, key, r4, r3, r2, r0, NULL, &slow);
__ IncrementCounter(&Counters::keyed_load_generic_smi, 1, r2, r3);
__ Ret();
- // Check whether the elements is a pixel array.
- // r0: key
- // r1: receiver
- __ bind(&check_pixel_array);
-
- GenerateFastPixelArrayLoad(masm,
- r1,
- r0,
- r3,
- r4,
- r2,
- r5,
- r0,
- &check_number_dictionary,
- NULL,
- &slow);
-
__ bind(&check_number_dictionary);
+ __ ldr(r4, FieldMemOperand(receiver, JSObject::kElementsOffset));
+ __ ldr(r3, FieldMemOperand(r4, JSObject::kMapOffset));
+
// Check whether the elements is a number dictionary.
// r0: key
// r3: elements map
@@ -1428,7 +1414,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
// -- r2 : receiver
// -- lr : return address
// -----------------------------------
- Label slow, fast, array, extra, check_pixel_array;
+ Label slow, fast, array, extra;
// Register usage.
Register value = r0;
@@ -1464,7 +1450,7 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
__ ldr(r4, FieldMemOperand(elements, HeapObject::kMapOffset));
__ LoadRoot(ip, Heap::kFixedArrayMapRootIndex);
__ cmp(r4, ip);
- __ b(ne, &check_pixel_array);
+ __ b(ne, &slow);
// Check array bounds. Both the key and the length of FixedArray are smis.
__ ldr(ip, FieldMemOperand(elements, FixedArray::kLengthOffset));
__ cmp(key, Operand(ip));
@@ -1478,24 +1464,6 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
// r2: receiver.
GenerateRuntimeSetProperty(masm, strict_mode);
- // Check whether the elements is a pixel array.
- // r4: elements map.
- __ bind(&check_pixel_array);
- GenerateFastPixelArrayStore(masm,
- r2,
- r1,
- r0,
- elements,
- r4,
- r5,
- r6,
- false,
- false,
- NULL,
- &slow,
- &slow,
- &slow);
-
// Extra capacity case: Check if there is extra capacity to
// perform the store and update the length. Used for adding one
// element to the array by writing to array[array.length].
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698