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

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

Issue 6656001: Support external arrays in Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: stub out arm 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
Index: src/arm/lithium-arm.cc
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
index 344699533ee07e3a8003a100e2c0cdbb1081ce22..7ffe526985d606432e047af235cbd76810d051a3 100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -1807,15 +1807,22 @@ LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
}
-LInstruction* LChunkBuilder::DoLoadPixelArrayElement(
- HLoadPixelArrayElement* instr) {
+LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
+ HLoadKeyedSpecializedArrayElement* instr) {
+ // TODO(danno): Add support for other external array types.
+ if (instr->array_type() != kExternalPixelArray) {
+ Abort("unsupported load for external array type.");
+ }
+
ASSERT(instr->representation().IsInteger32());
ASSERT(instr->key()->representation().IsInteger32());
LOperand* external_pointer =
UseRegisterAtStart(instr->external_pointer());
LOperand* key = UseRegisterAtStart(instr->key());
- LLoadPixelArrayElement* result =
- new LLoadPixelArrayElement(external_pointer, key);
+ LLoadKeyedSpecializedArrayElement* result =
+ new LLoadKeyedSpecializedArrayElement(external_pointer,
+ key,
+ instr->array_type());
return DefineAsRegister(result);
}
@@ -1849,8 +1856,13 @@ LInstruction* LChunkBuilder::DoStoreKeyedFastElement(
}
-LInstruction* LChunkBuilder::DoStorePixelArrayElement(
- HStorePixelArrayElement* instr) {
+LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
+ HStoreKeyedSpecializedArrayElement* instr) {
+ // TODO(danno): Add support for other external array types.
+ if (instr->array_type() != kExternalPixelArray) {
+ Abort("unsupported store for external array type.");
+ }
+
ASSERT(instr->value()->representation().IsInteger32());
ASSERT(instr->external_pointer()->representation().IsExternal());
ASSERT(instr->key()->representation().IsInteger32());
@@ -1859,7 +1871,10 @@ LInstruction* LChunkBuilder::DoStorePixelArrayElement(
LOperand* value = UseTempRegister(instr->value()); // changed by clamp.
LOperand* key = UseRegister(instr->key());
- return new LStorePixelArrayElement(external_pointer, key, value);
+ return new LStoreKeyedSpecializedArrayElement(external_pointer,
+ key,
+ value,
+ instr->array_type());
}

Powered by Google App Engine
This is Rietveld 408576698