Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index a07b8d944daf187a2d745a847ee6df49268df361..d9022d2047b130e9ecb4d3bd2197ca9f15b91d22 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -1976,8 +1976,6 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
- LStoreKeyed* result = NULL; |
- |
if (!instr->is_external()) { |
ASSERT(instr->elements()->representation().IsTagged()); |
ASSERT(instr->key()->representation().IsInteger32() || |
@@ -1988,7 +1986,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
LOperand* val = UseTempRegister(instr->value()); |
LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
- result = new(zone()) LStoreKeyed(object, key, val); |
+ return new(zone()) LStoreKeyed(object, key, val); |
} else { |
ASSERT(instr->value()->representation().IsTagged()); |
bool needs_write_barrier = instr->NeedsWriteBarrier(); |
@@ -2000,41 +1998,38 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
LOperand* key = needs_write_barrier |
? UseTempRegister(instr->key()) |
: UseRegisterOrConstantAtStart(instr->key()); |
- result = new(zone()) LStoreKeyed(obj, key, val); |
+ return new(zone()) LStoreKeyed(obj, key, val); |
} |
- } else { |
- ElementsKind elements_kind = instr->elements_kind(); |
- ASSERT( |
- (instr->value()->representation().IsInteger32() && |
- (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && |
- (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || |
- (instr->value()->representation().IsDouble() && |
- ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || |
- (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); |
- ASSERT(instr->elements()->representation().IsExternal()); |
- |
- LOperand* external_pointer = UseRegister(instr->elements()); |
- // Determine if we need a byte register in this case for the value. |
- bool val_is_fixed_register = |
- elements_kind == EXTERNAL_BYTE_ELEMENTS || |
- elements_kind == EXTERNAL_UNSIGNED_BYTE_ELEMENTS || |
- elements_kind == EXTERNAL_PIXEL_ELEMENTS; |
- |
- LOperand* val = val_is_fixed_register |
- ? UseFixed(instr->value(), eax) |
- : UseRegister(instr->value()); |
- bool clobbers_key = ExternalArrayOpRequiresTemp( |
- instr->key()->representation(), elements_kind); |
- LOperand* key = clobbers_key |
- ? UseTempRegister(instr->key()) |
- : UseRegisterOrConstantAtStart(instr->key()); |
- result = new(zone()) LStoreKeyed(external_pointer, |
- key, |
- val); |
} |
- ASSERT(result != NULL); |
- return result; |
+ ElementsKind elements_kind = instr->elements_kind(); |
+ ASSERT( |
+ (instr->value()->representation().IsInteger32() && |
+ (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && |
+ (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || |
+ (instr->value()->representation().IsDouble() && |
+ ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || |
+ (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); |
+ ASSERT(instr->elements()->representation().IsExternal()); |
+ |
+ LOperand* external_pointer = UseRegister(instr->elements()); |
+ // Determine if we need a byte register in this case for the value. |
+ bool val_is_fixed_register = |
+ elements_kind == EXTERNAL_BYTE_ELEMENTS || |
+ elements_kind == EXTERNAL_UNSIGNED_BYTE_ELEMENTS || |
+ elements_kind == EXTERNAL_PIXEL_ELEMENTS; |
+ |
+ LOperand* val = val_is_fixed_register |
+ ? UseFixed(instr->value(), eax) |
+ : UseRegister(instr->value()); |
+ bool clobbers_key = ExternalArrayOpRequiresTemp( |
+ instr->key()->representation(), elements_kind); |
+ LOperand* key = clobbers_key |
+ ? UseTempRegister(instr->key()) |
+ : UseRegisterOrConstantAtStart(instr->key()); |
+ return new(zone()) LStoreKeyed(external_pointer, |
+ key, |
+ val); |
} |