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 4486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4497 int current_pc = masm()->pc_offset(); | 4497 int current_pc = masm()->pc_offset(); |
4498 int patch_size = Deoptimizer::patch_size(); | 4498 int patch_size = Deoptimizer::patch_size(); |
4499 if (current_pc < last_lazy_deopt_pc_ + patch_size) { | 4499 if (current_pc < last_lazy_deopt_pc_ + patch_size) { |
4500 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc; | 4500 int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc; |
4501 ASSERT_EQ(0, padding_size % Assembler::kInstrSize); | 4501 ASSERT_EQ(0, padding_size % Assembler::kInstrSize); |
4502 while (padding_size > 0) { | 4502 while (padding_size > 0) { |
4503 __ nop(); | 4503 __ nop(); |
4504 padding_size -= Assembler::kInstrSize; | 4504 padding_size -= Assembler::kInstrSize; |
4505 } | 4505 } |
4506 } | 4506 } |
4507 last_lazy_deopt_pc_ = current_pc; | 4507 last_lazy_deopt_pc_ = masm()->pc_offset(); |
4508 } | 4508 } |
4509 | 4509 |
4510 | 4510 |
4511 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { | 4511 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { |
4512 EnsureSpaceForLazyDeopt(); | 4512 EnsureSpaceForLazyDeopt(); |
4513 ASSERT(instr->HasEnvironment()); | 4513 ASSERT(instr->HasEnvironment()); |
4514 LEnvironment* env = instr->environment(); | 4514 LEnvironment* env = instr->environment(); |
4515 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); | 4515 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |
4516 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 4516 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
4517 } | 4517 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4621 ASSERT(osr_pc_offset_ == -1); | 4621 ASSERT(osr_pc_offset_ == -1); |
4622 osr_pc_offset_ = masm()->pc_offset(); | 4622 osr_pc_offset_ = masm()->pc_offset(); |
4623 } | 4623 } |
4624 | 4624 |
4625 | 4625 |
4626 | 4626 |
4627 | 4627 |
4628 #undef __ | 4628 #undef __ |
4629 | 4629 |
4630 } } // namespace v8::internal | 4630 } } // namespace v8::internal |
OLD | NEW |