diff options
Diffstat (limited to 'deps/v8/src/ppc/lithium-ppc.cc')
-rw-r--r-- | deps/v8/src/ppc/lithium-ppc.cc | 52 |
1 files changed, 39 insertions, 13 deletions
diff --git a/deps/v8/src/ppc/lithium-ppc.cc b/deps/v8/src/ppc/lithium-ppc.cc index 4f15a60d5d..6841db5d32 100644 --- a/deps/v8/src/ppc/lithium-ppc.cc +++ b/deps/v8/src/ppc/lithium-ppc.cc @@ -4,8 +4,6 @@ #include <sstream> -#include "src/v8.h" - #include "src/hydrogen-osr.h" #include "src/lithium-inl.h" #include "src/ppc/lithium-codegen-ppc.h" @@ -343,6 +341,11 @@ void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { } +void LLoadGlobalViaContext::PrintDataTo(StringStream* stream) { + stream->Add("depth:%d slot:%d", depth(), slot_index()); +} + + void LStoreNamedField::PrintDataTo(StringStream* stream) { object()->PrintTo(stream); std::ostringstream os; @@ -361,6 +364,12 @@ void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { } +void LStoreGlobalViaContext::PrintDataTo(StringStream* stream) { + stream->Add("depth:%d slot:%d <- ", depth(), slot_index()); + value()->PrintTo(stream); +} + + void LLoadKeyed::PrintDataTo(StringStream* stream) { elements()->PrintTo(stream); stream->Add("["); @@ -1631,8 +1640,7 @@ LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { } return result; } else if (instr->representation().IsExternal()) { - DCHECK(instr->left()->representation().IsExternal()); - DCHECK(instr->right()->representation().IsInteger32()); + DCHECK(instr->IsConsistentExternalRepresentation()); DCHECK(!instr->CheckFlag(HValue::kCanOverflow)); LOperand* left = UseRegisterAtStart(instr->left()); LOperand* right = UseOrConstantAtStart(instr->right()); @@ -2108,6 +2116,15 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { } +LInstruction* LChunkBuilder::DoLoadGlobalViaContext( + HLoadGlobalViaContext* instr) { + LOperand* context = UseFixed(instr->context(), cp); + DCHECK(instr->slot_index() > 0); + LLoadGlobalViaContext* result = new (zone()) LLoadGlobalViaContext(context); + return MarkAsCall(DefineFixed(result, r3), instr); +} + + LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { LOperand* context = UseRegisterAtStart(instr->value()); LInstruction* result = @@ -2176,7 +2193,7 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { LOperand* key = UseRegisterOrConstantAtStart(instr->key()); LInstruction* result = NULL; - if (!instr->is_typed_elements()) { + if (!instr->is_fixed_typed_array()) { LOperand* obj = NULL; if (instr->representation().IsDouble()) { obj = UseRegister(instr->elements()); @@ -2194,10 +2211,9 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { } bool needs_environment; - if (instr->is_external() || instr->is_fixed_typed_array()) { + if (instr->is_fixed_typed_array()) { // see LCodeGen::DoLoadKeyedExternalArray - needs_environment = (elements_kind == EXTERNAL_UINT32_ELEMENTS || - elements_kind == UINT32_ELEMENTS) && + needs_environment = elements_kind == UINT32_ELEMENTS && !instr->CheckFlag(HInstruction::kUint32); } else { // see LCodeGen::DoLoadKeyedFixedDoubleArray and @@ -2231,7 +2247,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { - if (!instr->is_typed_elements()) { + if (!instr->is_fixed_typed_array()) { DCHECK(instr->elements()->representation().IsTagged()); bool needs_write_barrier = instr->NeedsWriteBarrier(); LOperand* object = NULL; @@ -2261,10 +2277,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { !IsDoubleOrFloatElementsKind(instr->elements_kind())) || (instr->value()->representation().IsDouble() && IsDoubleOrFloatElementsKind(instr->elements_kind()))); - DCHECK((instr->is_fixed_typed_array() && - instr->elements()->representation().IsTagged()) || - (instr->is_external() && - instr->elements()->representation().IsExternal())); + DCHECK(instr->elements()->representation().IsExternal()); LOperand* val = UseRegister(instr->value()); LOperand* key = UseRegisterOrConstantAtStart(instr->key()); LOperand* backing_store = UseRegister(instr->elements()); @@ -2388,6 +2401,19 @@ LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { } +LInstruction* LChunkBuilder::DoStoreGlobalViaContext( + HStoreGlobalViaContext* instr) { + LOperand* context = UseFixed(instr->context(), cp); + LOperand* value = UseFixed(instr->value(), + StoreGlobalViaContextDescriptor::ValueRegister()); + DCHECK(instr->slot_index() > 0); + + LStoreGlobalViaContext* result = + new (zone()) LStoreGlobalViaContext(context, value); + return MarkAsCall(result, instr); +} + + LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { LOperand* context = UseFixed(instr->context(), cp); LOperand* left = UseFixed(instr->left(), r4); |