Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 67ed508e87e1b2891436dae17e5bfd190567afb5..a027629e5e2552207302a7ef0a811d14762b1aff 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -1322,6 +1322,13 @@ void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { |
} |
+void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) { |
+ Register result = ToRegister(instr->result()); |
+ Register array = ToRegister(instr->InputAt(0)); |
+ __ ldr(result, FieldMemOperand(array, PixelArray::kLengthOffset)); |
+} |
+ |
+ |
void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { |
Register result = ToRegister(instr->result()); |
Register array = ToRegister(instr->InputAt(0)); |
@@ -2354,17 +2361,20 @@ void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
void LCodeGen::DoLoadElements(LLoadElements* instr) { |
- ASSERT(instr->result()->Equals(instr->InputAt(0))); |
- Register reg = ToRegister(instr->InputAt(0)); |
+ Register result = ToRegister(instr->result()); |
+ Register input = ToRegister(instr->InputAt(0)); |
Register scratch = scratch0(); |
- __ ldr(reg, FieldMemOperand(reg, JSObject::kElementsOffset)); |
+ __ ldr(result, FieldMemOperand(input, JSObject::kElementsOffset)); |
if (FLAG_debug_code) { |
Label done; |
- __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset)); |
+ __ ldr(scratch, FieldMemOperand(result, HeapObject::kMapOffset)); |
__ LoadRoot(ip, Heap::kFixedArrayMapRootIndex); |
__ cmp(scratch, ip); |
__ b(eq, &done); |
+ __ LoadRoot(ip, Heap::kPixelArrayMapRootIndex); |
+ __ cmp(scratch, ip); |
+ __ b(eq, &done); |
__ LoadRoot(ip, Heap::kFixedCOWArrayMapRootIndex); |
__ cmp(scratch, ip); |
__ Check(eq, "Check for fast elements failed."); |
@@ -2373,6 +2383,14 @@ void LCodeGen::DoLoadElements(LLoadElements* instr) { |
} |
+void LCodeGen::DoLoadPixelArrayExternalPointer( |
+ LLoadPixelArrayExternalPointer* instr) { |
+ Register to_reg = ToRegister(instr->result()); |
+ Register from_reg = ToRegister(instr->InputAt(0)); |
+ __ ldr(to_reg, FieldMemOperand(from_reg, PixelArray::kExternalPointerOffset)); |
+} |
+ |
+ |
void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { |
Register arguments = ToRegister(instr->arguments()); |
Register length = ToRegister(instr->length()); |
@@ -2409,6 +2427,16 @@ void LCodeGen::DoLoadKeyedFastElement(LLoadKeyedFastElement* instr) { |
} |
+void LCodeGen::DoLoadPixelArrayElement(LLoadPixelArrayElement* instr) { |
+ Register external_elements = ToRegister(instr->external_pointer()); |
+ Register key = ToRegister(instr->key()); |
+ Register result = ToRegister(instr->result()); |
+ |
+ // Load the result. |
+ __ ldrb(result, MemOperand(external_elements, key)); |
+} |
+ |
+ |
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
ASSERT(ToRegister(instr->object()).is(r1)); |
ASSERT(ToRegister(instr->key()).is(r0)); |