Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index a1f8cb430a28ffa421fcfb3b768ea719842d7415..a17ef236a97ad0f1f93ae2acd676e4b88af6c3e7 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -927,6 +927,13 @@ void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { |
} |
+void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) { |
+ Register result = ToRegister(instr->result()); |
+ Register array = ToRegister(instr->InputAt(0)); |
+ __ movq(result, FieldOperand(array, PixelArray::kLengthOffset)); |
+} |
+ |
+ |
void LCodeGen::DoValueOf(LValueOf* instr) { |
Abort("Unimplemented: %s", "DoValueOf"); |
} |
@@ -1726,15 +1733,18 @@ void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
void LCodeGen::DoLoadElements(LLoadElements* instr) { |
- ASSERT(instr->result()->Equals(instr->InputAt(0))); |
- Register reg = ToRegister(instr->InputAt(0)); |
- __ movq(reg, FieldOperand(reg, JSObject::kElementsOffset)); |
+ Register result = ToRegister(instr->result()); |
+ Register input = ToRegister(instr->InputAt(0)); |
+ __ movq(result, FieldOperand(input, JSObject::kElementsOffset)); |
if (FLAG_debug_code) { |
NearLabel done; |
- __ Cmp(FieldOperand(reg, HeapObject::kMapOffset), |
+ __ Cmp(FieldOperand(result, HeapObject::kMapOffset), |
Factory::fixed_array_map()); |
__ j(equal, &done); |
- __ Cmp(FieldOperand(reg, HeapObject::kMapOffset), |
+ __ Cmp(FieldOperand(result, HeapObject::kMapOffset), |
+ Factory::pixel_array_map()); |
+ __ j(equal, &done); |
+ __ Cmp(FieldOperand(result, HeapObject::kMapOffset), |
Factory::fixed_cow_array_map()); |
__ Check(equal, "Check for fast elements failed."); |
__ bind(&done); |
@@ -1742,6 +1752,14 @@ void LCodeGen::DoLoadElements(LLoadElements* instr) { |
} |
+void LCodeGen::DoLoadPixelArrayExternalPointer( |
+ LLoadPixelArrayExternalPointer* instr) { |
+ Register result = ToRegister(instr->result()); |
+ Register input = ToRegister(instr->InputAt(0)); |
+ __ movq(result, FieldOperand(input, PixelArray::kExternalPointerOffset)); |
+} |
+ |
+ |
void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { |
Abort("Unimplemented: %s", "DoAccessArgumentsAt"); |
} |
@@ -1765,6 +1783,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. |
+ __ movzxbq(result, Operand(external_elements, key, times_1, 0)); |
+} |
+ |
+ |
void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
Abort("Unimplemented: %s", "DoLoadKeyedGeneric"); |
} |