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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
407 } else { | 407 } else { |
408 RecordSafepoint(instr->pointer_map(), Safepoint::kNoDeoptimizationIndex); | 408 RecordSafepoint(instr->pointer_map(), Safepoint::kNoDeoptimizationIndex); |
409 } | 409 } |
410 } | 410 } |
411 | 411 |
412 | 412 |
413 void LCodeGen::RegisterLazyDeoptimization(LInstruction* instr) { | 413 void LCodeGen::RegisterLazyDeoptimization(LInstruction* instr) { |
414 // Create the environment to bailout to. If the call has side effects | 414 // Create the environment to bailout to. If the call has side effects |
415 // execution has to continue after the call otherwise execution can continue | 415 // execution has to continue after the call otherwise execution can continue |
416 // from a previous bailout point repeating the call. | 416 // from a previous bailout point repeating the call. |
417 LEnvironment* deoptimization_environment; | 417 LEnvironment* lazy_deoptimization_environment; |
418 if (instr->HasDeoptimizationEnvironment()) { | 418 ASSERT(!instr->IsControl()); |
419 deoptimization_environment = instr->deoptimization_environment(); | 419 ASSERT(instructions_->at(current_instruction_ + 1)->IsGap()); |
Søren Thygesen Gjesse
2011/01/24 13:02:43
As far as I remember there used to be places where
| |
420 LInstruction* next_instr = instructions_->at(current_instruction_ + 2); | |
421 if (next_instr->IsLazyBailout()) { | |
422 ASSERT(next_instr->HasEnvironment()); | |
423 lazy_deoptimization_environment = next_instr->environment(); | |
420 } else { | 424 } else { |
421 deoptimization_environment = instr->environment(); | 425 lazy_deoptimization_environment = instr->environment(); |
422 } | 426 } |
423 | 427 |
424 RegisterEnvironmentForDeoptimization(deoptimization_environment); | 428 RegisterEnvironmentForDeoptimization(lazy_deoptimization_environment); |
425 RecordSafepoint(instr->pointer_map(), | 429 RecordSafepoint(instr->pointer_map(), |
426 deoptimization_environment->deoptimization_index()); | 430 lazy_deoptimization_environment->deoptimization_index()); |
427 } | 431 } |
428 | 432 |
429 | 433 |
430 void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment* environment) { | 434 void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment* environment) { |
431 if (!environment->HasBeenRegistered()) { | 435 if (!environment->HasBeenRegistered()) { |
432 // Physical stack frame layout: | 436 // Physical stack frame layout: |
433 // -x ............. -4 0 ..................................... y | 437 // -x ............. -4 0 ..................................... y |
434 // [incoming arguments] [spill slots] [pushed outgoing arguments] | 438 // [incoming arguments] [spill slots] [pushed outgoing arguments] |
435 | 439 |
436 // Layout of the environment: | 440 // Layout of the environment: |
(...skipping 3159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3596 ASSERT(osr_pc_offset_ == -1); | 3600 ASSERT(osr_pc_offset_ == -1); |
3597 osr_pc_offset_ = masm()->pc_offset(); | 3601 osr_pc_offset_ = masm()->pc_offset(); |
3598 } | 3602 } |
3599 | 3603 |
3600 | 3604 |
3601 #undef __ | 3605 #undef __ |
3602 | 3606 |
3603 } } // namespace v8::internal | 3607 } } // namespace v8::internal |
3604 | 3608 |
3605 #endif // V8_TARGET_ARCH_IA32 | 3609 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |