Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 91efc296b621e7ae7e5ba1895a7fbafce059ed25..b21eec83d2bafd378a56d667d47355957d32e46d 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -1002,6 +1002,13 @@ void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { |
} |
+void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) { |
+ Register result = ToRegister(instr->result()); |
+ Register array = ToRegister(instr->InputAt(0)); |
+ __ mov(result, FieldOperand(array, PixelArray::kLengthOffset)); |
+} |
+ |
+ |
void LCodeGen::DoValueOf(LValueOf* instr) { |
Register input = ToRegister(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
@@ -2024,22 +2031,33 @@ void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
void LCodeGen::DoLoadElements(LLoadElements* instr) { |
- ASSERT(instr->result()->Equals(instr->InputAt(0))); |
- Register reg = ToRegister(instr->InputAt(0)); |
- __ mov(reg, FieldOperand(reg, JSObject::kElementsOffset)); |
+ Register result = ToRegister(instr->result()); |
+ Register input = ToRegister(instr->InputAt(0)); |
+ __ mov(result, FieldOperand(input, JSObject::kElementsOffset)); |
if (FLAG_debug_code) { |
NearLabel done; |
- __ cmp(FieldOperand(reg, HeapObject::kMapOffset), |
+ __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
Immediate(Factory::fixed_array_map())); |
__ j(equal, &done); |
- __ cmp(FieldOperand(reg, HeapObject::kMapOffset), |
+ __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
+ Immediate(Factory::pixel_array_map())); |
+ __ j(equal, &done); |
+ __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
Immediate(Factory::fixed_cow_array_map())); |
- __ Check(equal, "Check for fast elements failed."); |
+ __ Check(equal, "Check for fast elements or pixel array failed."); |
__ bind(&done); |
} |
} |
+void LCodeGen::DoLoadPixelArrayExternalPointer( |
+ LLoadPixelArrayExternalPointer* instr) { |
+ Register result = ToRegister(instr->result()); |
+ Register input = ToRegister(instr->InputAt(0)); |
+ __ mov(result, FieldOperand(input, PixelArray::kExternalPointerOffset)); |
+} |
+ |
+ |
void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { |
Register arguments = ToRegister(instr->arguments()); |
Register length = ToRegister(instr->length()); |
@@ -2073,6 +2091,17 @@ 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()); |
+ ASSERT(result.is(external_elements)); |
+ |
+ // Load the result. |
+ __ movzx_b(result, Operand(external_elements, key, times_1, 0)); |
+} |
+ |
+ |
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
ASSERT(ToRegister(instr->context()).is(esi)); |
ASSERT(ToRegister(instr->object()).is(edx)); |