| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index bf6052a9456f6892454628be4af4006169eb52f8..a41f6ddec9744cc8fa8397d4f4ee5997fdd8e9bf 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -349,9 +349,7 @@ bool LCodeGen::GenerateDeoptJumpTable() {
|
| for (int i = 0; i < deopt_jump_table_.length(); i++) {
|
| __ bind(&deopt_jump_table_[i].label);
|
| Address entry = deopt_jump_table_[i].address;
|
| - bool is_lazy_deopt = deopt_jump_table_[i].is_lazy_deopt;
|
| - Deoptimizer::BailoutType type =
|
| - is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER;
|
| + Deoptimizer::BailoutType type = deopt_jump_table_[i].bailout_type;
|
| int id = Deoptimizer::GetDeoptimizationId(isolate(), entry, type);
|
| if (id == Deoptimizer::kNotDeoptimizationEntry) {
|
| Comment(";;; jump table entry %d.", i);
|
| @@ -360,7 +358,7 @@ bool LCodeGen::GenerateDeoptJumpTable() {
|
| }
|
| __ li(t9, Operand(ExternalReference::ForDeoptEntry(entry)));
|
| if (deopt_jump_table_[i].needs_frame) {
|
| - if (is_lazy_deopt) {
|
| + if (type == Deoptimizer::LAZY) {
|
| if (needs_frame_is_call.is_bound()) {
|
| __ Branch(&needs_frame_is_call);
|
| } else {
|
| @@ -392,7 +390,7 @@ bool LCodeGen::GenerateDeoptJumpTable() {
|
| }
|
| }
|
| } else {
|
| - if (is_lazy_deopt) {
|
| + if (type == Deoptimizer::LAZY) {
|
| __ Call(t9);
|
| } else {
|
| __ Jump(t9);
|
| @@ -804,15 +802,13 @@ void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment* environment,
|
|
|
| void LCodeGen::DeoptimizeIf(Condition cc,
|
| LEnvironment* environment,
|
| + Deoptimizer::BailoutType bailout_type,
|
| Register src1,
|
| const Operand& src2) {
|
| RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
|
| ASSERT(environment->HasBeenRegistered());
|
| int id = environment->deoptimization_index();
|
| ASSERT(info()->IsOptimizing() || info()->IsStub());
|
| - Deoptimizer::BailoutType bailout_type = info()->IsStub()
|
| - ? Deoptimizer::LAZY
|
| - : Deoptimizer::EAGER;
|
| Address entry =
|
| Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type);
|
| if (entry == NULL) {
|
| @@ -850,9 +846,11 @@ void LCodeGen::DeoptimizeIf(Condition cc,
|
| // jump entry if this is the case.
|
| if (deopt_jump_table_.is_empty() ||
|
| (deopt_jump_table_.last().address != entry) ||
|
| - (deopt_jump_table_.last().is_lazy_deopt != needs_lazy_deopt) ||
|
| + (deopt_jump_table_.last().bailout_type != bailout_type) ||
|
| (deopt_jump_table_.last().needs_frame != !frame_is_built_)) {
|
| - JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt);
|
| + Deoptimizer::JumpTableEntry table_entry(entry,
|
| + bailout_type,
|
| + !frame_is_built_);
|
| deopt_jump_table_.Add(table_entry, zone());
|
| }
|
| __ Branch(&deopt_jump_table_.last().label, cc, src1, src2);
|
| @@ -860,6 +858,25 @@ void LCodeGen::DeoptimizeIf(Condition cc,
|
| }
|
|
|
|
|
| +void LCodeGen::DeoptimizeIf(Condition cc,
|
| + LEnvironment* environment,
|
| + Register src1,
|
| + const Operand& src2) {
|
| + Deoptimizer::BailoutType bailout_type = info()->IsStub()
|
| + ? Deoptimizer::LAZY
|
| + : Deoptimizer::EAGER;
|
| + DeoptimizeIf(cc, environment, bailout_type, src1, src2);
|
| +}
|
| +
|
| +
|
| +void LCodeGen::SoftDeoptimize(LEnvironment* environment,
|
| + Register src1,
|
| + const Operand& src2) {
|
| + ASSERT(!info()->IsStub());
|
| + DeoptimizeIf(al, environment, Deoptimizer::SOFT, src1, src2);
|
| +}
|
| +
|
| +
|
| void LCodeGen::RegisterDependentCodeForEmbeddedMaps(Handle<Code> code) {
|
| ZoneList<Handle<Map> > maps(1, zone());
|
| int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT);
|
| @@ -5428,7 +5445,11 @@ void LCodeGen::DoLazyBailout(LLazyBailout* instr) {
|
|
|
|
|
| void LCodeGen::DoDeoptimize(LDeoptimize* instr) {
|
| - DeoptimizeIf(al, instr->environment(), zero_reg, Operand(zero_reg));
|
| + if (instr->hydrogen_value()->IsSoftDeoptimize()) {
|
| + SoftDeoptimize(instr->environment(), zero_reg, Operand(zero_reg));
|
| + } else {
|
| + DeoptimizeIf(al, instr->environment(), zero_reg, Operand(zero_reg));
|
| + }
|
| }
|
|
|
|
|
|
|