diff options
Diffstat (limited to 'deps/v8/src/arm/lithium-arm.cc')
-rw-r--r-- | deps/v8/src/arm/lithium-arm.cc | 52 |
1 files changed, 39 insertions, 13 deletions
diff --git a/deps/v8/src/arm/lithium-arm.cc b/deps/v8/src/arm/lithium-arm.cc index 55e501762c..1c04ba7ee7 100644 --- a/deps/v8/src/arm/lithium-arm.cc +++ b/deps/v8/src/arm/lithium-arm.cc @@ -4,8 +4,6 @@ #include <sstream> -#include "src/v8.h" - #include "src/arm/lithium-codegen-arm.h" #include "src/hydrogen-osr.h" #include "src/lithium-inl.h" @@ -330,6 +328,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; @@ -348,6 +351,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("["); @@ -1661,8 +1670,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()); @@ -2150,6 +2158,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, r0), instr); +} + + LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { LOperand* context = UseRegisterAtStart(instr->value()); LInstruction* result = @@ -2218,7 +2235,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()); @@ -2238,10 +2255,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 @@ -2276,7 +2292,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; @@ -2308,10 +2324,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()); @@ -2437,6 +2450,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(), r1); |