| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 330 | 330 | 
| 331     Register entry_offset = t9; | 331     Register entry_offset = t9; | 
| 332 | 332 | 
| 333     int length = jump_table_.length(); | 333     int length = jump_table_.length(); | 
| 334     for (int i = 0; i < length; i++) { | 334     for (int i = 0; i < length; i++) { | 
| 335       Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i]; | 335       Deoptimizer::JumpTableEntry* table_entry = &jump_table_[i]; | 
| 336       __ bind(&table_entry->label); | 336       __ bind(&table_entry->label); | 
| 337 | 337 | 
| 338       DCHECK(table_entry->bailout_type == jump_table_[0].bailout_type); | 338       DCHECK(table_entry->bailout_type == jump_table_[0].bailout_type); | 
| 339       Address entry = table_entry->address; | 339       Address entry = table_entry->address; | 
| 340       DeoptComment(table_entry->reason); | 340       DeoptComment(table_entry->deopt_info); | 
| 341 | 341 | 
| 342       // Second-level deopt table entries are contiguous and small, so instead | 342       // Second-level deopt table entries are contiguous and small, so instead | 
| 343       // of loading the full, absolute address of each one, load an immediate | 343       // of loading the full, absolute address of each one, load an immediate | 
| 344       // offset which will be added to the base address later. | 344       // offset which will be added to the base address later. | 
| 345       __ li(entry_offset, Operand(entry - base)); | 345       __ li(entry_offset, Operand(entry - base)); | 
| 346 | 346 | 
| 347       if (table_entry->needs_frame) { | 347       if (table_entry->needs_frame) { | 
| 348         DCHECK(!info()->saves_caller_doubles()); | 348         DCHECK(!info()->saves_caller_doubles()); | 
| 349         if (needs_frame.is_bound()) { | 349         if (needs_frame.is_bound()) { | 
| 350           __ Branch(&needs_frame); | 350           __ Branch(&needs_frame); | 
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 849 | 849 | 
| 850   if (info()->ShouldTrapOnDeopt()) { | 850   if (info()->ShouldTrapOnDeopt()) { | 
| 851     Label skip; | 851     Label skip; | 
| 852     if (condition != al) { | 852     if (condition != al) { | 
| 853       __ Branch(&skip, NegateCondition(condition), src1, src2); | 853       __ Branch(&skip, NegateCondition(condition), src1, src2); | 
| 854     } | 854     } | 
| 855     __ stop("trap_on_deopt"); | 855     __ stop("trap_on_deopt"); | 
| 856     __ bind(&skip); | 856     __ bind(&skip); | 
| 857   } | 857   } | 
| 858 | 858 | 
| 859   Deoptimizer::Reason reason(instr->hydrogen_value()->position().raw(), | 859   Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position().raw(), | 
| 860                              instr->Mnemonic(), deopt_reason); | 860                                     instr->Mnemonic(), deopt_reason); | 
| 861   DCHECK(info()->IsStub() || frame_is_built_); | 861   DCHECK(info()->IsStub() || frame_is_built_); | 
| 862   // Go through jump table if we need to handle condition, build frame, or | 862   // Go through jump table if we need to handle condition, build frame, or | 
| 863   // restore caller doubles. | 863   // restore caller doubles. | 
| 864   if (condition == al && frame_is_built_ && | 864   if (condition == al && frame_is_built_ && | 
| 865       !info()->saves_caller_doubles()) { | 865       !info()->saves_caller_doubles()) { | 
| 866     DeoptComment(reason); | 866     DeoptComment(deopt_info); | 
| 867     __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2); | 867     __ Call(entry, RelocInfo::RUNTIME_ENTRY, condition, src1, src2); | 
| 868   } else { | 868   } else { | 
| 869     Deoptimizer::JumpTableEntry table_entry(entry, reason, bailout_type, | 869     Deoptimizer::JumpTableEntry table_entry(entry, deopt_info, bailout_type, | 
| 870                                             !frame_is_built_); | 870                                             !frame_is_built_); | 
| 871     // We often have several deopts to the same entry, reuse the last | 871     // We often have several deopts to the same entry, reuse the last | 
| 872     // jump entry if this is the case. | 872     // jump entry if this is the case. | 
| 873     if (jump_table_.is_empty() || | 873     if (jump_table_.is_empty() || | 
| 874         !table_entry.IsEquivalentTo(jump_table_.last())) { | 874         !table_entry.IsEquivalentTo(jump_table_.last())) { | 
| 875       jump_table_.Add(table_entry, zone()); | 875       jump_table_.Add(table_entry, zone()); | 
| 876     } | 876     } | 
| 877     __ Branch(&jump_table_.last().label, condition, src1, src2); | 877     __ Branch(&jump_table_.last().label, condition, src1, src2); | 
| 878   } | 878   } | 
| 879 } | 879 } | 
| (...skipping 5145 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6025   __ li(at, scope_info); | 6025   __ li(at, scope_info); | 
| 6026   __ Push(at, ToRegister(instr->function())); | 6026   __ Push(at, ToRegister(instr->function())); | 
| 6027   CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6027   CallRuntime(Runtime::kPushBlockContext, 2, instr); | 
| 6028   RecordSafepoint(Safepoint::kNoLazyDeopt); | 6028   RecordSafepoint(Safepoint::kNoLazyDeopt); | 
| 6029 } | 6029 } | 
| 6030 | 6030 | 
| 6031 | 6031 | 
| 6032 #undef __ | 6032 #undef __ | 
| 6033 | 6033 | 
| 6034 } }  // namespace v8::internal | 6034 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|