| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 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 4500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4511 int current_pc = masm()->pc_offset(); | 4511 int current_pc = masm()->pc_offset(); |
| 4512 int patch_size = Deoptimizer::patch_size(); | 4512 int patch_size = Deoptimizer::patch_size(); |
| 4513 if (current_pc < last_lazy_deopt_pc_ + patch_size) { | 4513 if (current_pc < last_lazy_deopt_pc_ + patch_size) { |
| 4514 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc; | 4514 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc; |
| 4515 ASSERT_EQ(0, padding_size % Assembler::kInstrSize); | 4515 ASSERT_EQ(0, padding_size % Assembler::kInstrSize); |
| 4516 while (padding_size > 0) { | 4516 while (padding_size > 0) { |
| 4517 __ nop(); | 4517 __ nop(); |
| 4518 padding_size -= Assembler::kInstrSize; | 4518 padding_size -= Assembler::kInstrSize; |
| 4519 } | 4519 } |
| 4520 } | 4520 } |
| 4521 last_lazy_deopt_pc_ = current_pc; | 4521 last_lazy_deopt_pc_ = masm()->pc_offset(); |
| 4522 } | 4522 } |
| 4523 | 4523 |
| 4524 | 4524 |
| 4525 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { | 4525 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { |
| 4526 EnsureSpaceForLazyDeopt(); | 4526 EnsureSpaceForLazyDeopt(); |
| 4527 ASSERT(instr->HasEnvironment()); | 4527 ASSERT(instr->HasEnvironment()); |
| 4528 LEnvironment* env = instr->environment(); | 4528 LEnvironment* env = instr->environment(); |
| 4529 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); | 4529 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |
| 4530 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 4530 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
| 4531 } | 4531 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4631 ASSERT(!environment->HasBeenRegistered()); | 4631 ASSERT(!environment->HasBeenRegistered()); |
| 4632 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 4632 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
| 4633 ASSERT(osr_pc_offset_ == -1); | 4633 ASSERT(osr_pc_offset_ == -1); |
| 4634 osr_pc_offset_ = masm()->pc_offset(); | 4634 osr_pc_offset_ = masm()->pc_offset(); |
| 4635 } | 4635 } |
| 4636 | 4636 |
| 4637 | 4637 |
| 4638 #undef __ | 4638 #undef __ |
| 4639 | 4639 |
| 4640 } } // namespace v8::internal | 4640 } } // namespace v8::internal |
| OLD | NEW |