| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index 1c8973fe7e2d1e08071df3b390f917cfff6b34fa..5f5d5c4ea2f3aae3393dac1ef003c5232500e007 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -645,33 +645,6 @@ void LCodeGen::WriteTranslation(LEnvironment* environment,
|
|
|
| for (int i = 0; i < translation_size; ++i) {
|
| LOperand* value = environment->values()->at(i);
|
| - // spilled_registers_ and spilled_double_registers_ are either
|
| - // both NULL or both set.
|
| - if (environment->spilled_registers() != NULL && value != NULL) {
|
| - if (value->IsRegister() &&
|
| - environment->spilled_registers()[value->index()] != NULL) {
|
| - translation->MarkDuplicate();
|
| - AddToTranslation(translation,
|
| - environment->spilled_registers()[value->index()],
|
| - environment->HasTaggedValueAt(i),
|
| - environment->HasUint32ValueAt(i),
|
| - arguments_known,
|
| - arguments_index,
|
| - arguments_count);
|
| - } else if (
|
| - value->IsDoubleRegister() &&
|
| - environment->spilled_double_registers()[value->index()] != NULL) {
|
| - translation->MarkDuplicate();
|
| - AddToTranslation(
|
| - translation,
|
| - environment->spilled_double_registers()[value->index()],
|
| - false,
|
| - false,
|
| - arguments_known,
|
| - arguments_index,
|
| - arguments_count);
|
| - }
|
| - }
|
|
|
| AddToTranslation(translation,
|
| value,
|
| @@ -1140,7 +1113,8 @@ void LCodeGen::DoCallStub(LCallStub* instr) {
|
|
|
|
|
| void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) {
|
| - // Nothing to do.
|
| + // Record the address of the first unknown OSR value as the place to enter.
|
| + if (osr_pc_offset_ == -1) osr_pc_offset_ = masm()->pc_offset();
|
| }
|
|
|
|
|
| @@ -5611,15 +5585,15 @@ void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
|
| // properly registered for deoptimization and records the assembler's PC
|
| // offset.
|
| LEnvironment* environment = instr->environment();
|
| - environment->SetSpilledRegisters(instr->SpilledRegisterArray(),
|
| - instr->SpilledDoubleRegisterArray());
|
|
|
| // If the environment were already registered, we would have no way of
|
| // backpatching it with the spill slot operands.
|
| ASSERT(!environment->HasBeenRegistered());
|
| RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
|
| - ASSERT(osr_pc_offset_ == -1);
|
| - osr_pc_offset_ = masm()->pc_offset();
|
| +
|
| + // Normally we record the first unknown OSR value as the entrypoint to the OSR
|
| + // code, but if there were none, record the entrypoint here.
|
| + if (osr_pc_offset_ == -1) osr_pc_offset_ = masm()->pc_offset();
|
| }
|
|
|
|
|
|
|