| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index 565c2506ba5ef85a67dacf021568016424570e0a..2a9ca324fc69561d7f4dafa2d76d7eb82fa93163 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -159,9 +159,9 @@ bool LCodeGen::GeneratePrologue() {
|
| // The following three instructions must remain together and unmodified
|
| // for code aging to work properly.
|
| __ Push(ra, fp, cp, a1);
|
| - // Add unused load of ip to ensure prologue sequence is identical for
|
| + // Add unused nop to ensure prologue sequence is identical for
|
| // full-codegen and lithium-codegen.
|
| - __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
|
| + __ nop(Assembler::CODE_AGE_SEQUENCE_NOP);
|
| // Adj. FP to point to saved FP.
|
| __ Addu(fp, sp, Operand(2 * kPointerSize));
|
| }
|
| @@ -271,6 +271,7 @@ bool LCodeGen::GenerateBody() {
|
| instr->CompileToNative(this);
|
| }
|
| EnsureSpaceForLazyDeopt();
|
| + last_lazy_deopt_pc_ = masm()->pc_offset();
|
| return !is_aborted();
|
| }
|
|
|
| @@ -1024,11 +1025,6 @@ void LCodeGen::DoCallStub(LCallStub* instr) {
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| break;
|
| }
|
| - case CodeStub::StringAdd: {
|
| - StringAddStub stub(NO_STRING_ADD_FLAGS);
|
| - CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| - break;
|
| - }
|
| case CodeStub::StringCompare: {
|
| StringCompareStub stub;
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| @@ -2794,6 +2790,19 @@ void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) {
|
| }
|
|
|
|
|
| +void LCodeGen::DoLinkObjectInList(LLinkObjectInList* instr) {
|
| + Register object = ToRegister(instr->object());
|
| + ExternalReference sites_list_address = instr->GetReference(isolate());
|
| +
|
| + __ li(at, Operand(sites_list_address));
|
| + __ lw(at, MemOperand(at));
|
| + __ sw(at, FieldMemOperand(object,
|
| + instr->hydrogen()->store_field().offset()));
|
| + __ li(at, Operand(sites_list_address));
|
| + __ sw(object, MemOperand(at));
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
|
| Register context = ToRegister(instr->context());
|
| Register result = ToRegister(instr->result());
|
| @@ -4456,7 +4465,7 @@ void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
|
| Register object = ToRegister(instr->object());
|
| Register temp = ToRegister(instr->temp());
|
| Label fail;
|
| - __ TestJSArrayForAllocationSiteInfo(object, temp, ne, &fail);
|
| + __ TestJSArrayForAllocationMemento(object, temp, ne, &fail);
|
| DeoptimizeIf(al, instr->environment());
|
| __ bind(&fail);
|
| }
|
| @@ -4465,7 +4474,7 @@ void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
|
| void LCodeGen::DoStringAdd(LStringAdd* instr) {
|
| __ push(ToRegister(instr->left()));
|
| __ push(ToRegister(instr->right()));
|
| - StringAddStub stub(NO_STRING_CHECK_IN_STUB);
|
| + StringAddStub stub(instr->hydrogen()->flags());
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| }
|
|
|
| @@ -5315,6 +5324,25 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
|
| }
|
|
|
| __ bind(deferred->exit());
|
| +
|
| + if (instr->hydrogen()->MustPrefillWithFiller()) {
|
| + if (instr->size()->IsConstantOperand()) {
|
| + int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
|
| + __ li(scratch, Operand(size));
|
| + } else {
|
| + scratch = ToRegister(instr->size());
|
| + }
|
| + __ Subu(scratch, scratch, Operand(kPointerSize));
|
| + __ Subu(result, result, Operand(kHeapObjectTag));
|
| + Label loop;
|
| + __ bind(&loop);
|
| + __ li(scratch2, Operand(isolate()->factory()->one_pointer_filler_map()));
|
| + __ Addu(at, result, Operand(scratch));
|
| + __ sw(scratch2, MemOperand(at));
|
| + __ Subu(scratch, scratch, Operand(kPointerSize));
|
| + __ Branch(&loop, ge, scratch, Operand(zero_reg));
|
| + __ Addu(result, result, Operand(kHeapObjectTag));
|
| + }
|
| }
|
|
|
|
|
| @@ -5607,12 +5635,12 @@ void LCodeGen::EnsureSpaceForLazyDeopt() {
|
| padding_size -= Assembler::kInstrSize;
|
| }
|
| }
|
| - last_lazy_deopt_pc_ = masm()->pc_offset();
|
| }
|
|
|
|
|
| void LCodeGen::DoLazyBailout(LLazyBailout* instr) {
|
| EnsureSpaceForLazyDeopt();
|
| + last_lazy_deopt_pc_ = masm()->pc_offset();
|
| ASSERT(instr->HasEnvironment());
|
| LEnvironment* env = instr->environment();
|
| RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
|
| @@ -5668,6 +5696,7 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) {
|
| StackCheckStub stub;
|
| CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
|
| EnsureSpaceForLazyDeopt();
|
| + last_lazy_deopt_pc_ = masm()->pc_offset();
|
| __ bind(&done);
|
| RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
|
| safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
|
| @@ -5679,6 +5708,7 @@ void LCodeGen::DoStackCheck(LStackCheck* instr) {
|
| __ LoadRoot(at, Heap::kStackLimitRootIndex);
|
| __ Branch(deferred_stack_check->entry(), lo, sp, Operand(at));
|
| EnsureSpaceForLazyDeopt();
|
| + last_lazy_deopt_pc_ = masm()->pc_offset();
|
| __ bind(instr->done_label());
|
| deferred_stack_check->SetExit(instr->done_label());
|
| RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
|
|
|