| Index: src/ia32/lithium-ia32.cc
|
| ===================================================================
|
| --- src/ia32/lithium-ia32.cc (revision 8778)
|
| +++ src/ia32/lithium-ia32.cc (working copy)
|
| @@ -429,6 +429,15 @@
|
| }
|
|
|
|
|
| +void LStoreKeyedFastDoubleElement::PrintDataTo(StringStream* stream) {
|
| + elements()->PrintTo(stream);
|
| + stream->Add("[");
|
| + key()->PrintTo(stream);
|
| + stream->Add("] <- ");
|
| + value()->PrintTo(stream);
|
| +}
|
| +
|
| +
|
| void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
| object()->PrintTo(stream);
|
| stream->Add("[");
|
| @@ -1032,7 +1041,16 @@
|
| : instr->SecondSuccessor();
|
| return new LGoto(successor->block_id());
|
| }
|
| - return new LBranch(UseRegisterAtStart(v));
|
| + ToBooleanStub::Types expected = instr->expected_input_types();
|
| + // We need a temporary register when we have to access the map *or* we have
|
| + // no type info yet, in which case we handle all cases (including the ones
|
| + // involving maps).
|
| + bool needs_temp = expected.NeedsMap() || expected.IsEmpty();
|
| + LOperand* temp = needs_temp ? TempRegister() : NULL;
|
| + LInstruction* branch = new LBranch(UseRegister(v), temp);
|
| + // When we handle all cases, we never deopt, so we don't need to assign the
|
| + // environment then.
|
| + return expected.IsAll() ? branch : AssignEnvironment(branch);
|
| }
|
|
|
|
|
| @@ -1878,6 +1896,18 @@
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement(
|
| + HLoadKeyedFastDoubleElement* instr) {
|
| + ASSERT(instr->representation().IsDouble());
|
| + ASSERT(instr->key()->representation().IsInteger32());
|
| + LOperand* elements = UseRegisterAtStart(instr->elements());
|
| + LOperand* key = UseRegisterOrConstantAtStart(instr->key());
|
| + LLoadKeyedFastDoubleElement* result =
|
| + new LLoadKeyedFastDoubleElement(elements, key);
|
| + return AssignEnvironment(DefineAsRegister(result));
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
|
| HLoadKeyedSpecializedArrayElement* instr) {
|
| JSObject::ElementsKind elements_kind = instr->elements_kind();
|
| @@ -1933,6 +1963,20 @@
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoStoreKeyedFastDoubleElement(
|
| + HStoreKeyedFastDoubleElement* instr) {
|
| + ASSERT(instr->value()->representation().IsDouble());
|
| + ASSERT(instr->elements()->representation().IsTagged());
|
| + ASSERT(instr->key()->representation().IsInteger32());
|
| +
|
| + LOperand* elements = UseRegisterAtStart(instr->elements());
|
| + LOperand* val = UseTempRegister(instr->value());
|
| + LOperand* key = UseRegisterOrConstantAtStart(instr->key());
|
| +
|
| + return new LStoreKeyedFastDoubleElement(elements, key, val);
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
|
| HStoreKeyedSpecializedArrayElement* instr) {
|
| Representation representation(instr->value()->representation());
|
|
|