OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 return; | 559 return; |
560 } | 560 } |
561 | 561 |
562 if (FLAG_deopt_every_n_times != 0) { | 562 if (FLAG_deopt_every_n_times != 0) { |
563 Handle<SharedFunctionInfo> shared(info_->shared_info()); | 563 Handle<SharedFunctionInfo> shared(info_->shared_info()); |
564 Label no_deopt; | 564 Label no_deopt; |
565 __ pushfd(); | 565 __ pushfd(); |
566 __ push(eax); | 566 __ push(eax); |
567 __ push(ebx); | 567 __ push(ebx); |
568 __ mov(ebx, shared); | 568 __ mov(ebx, shared); |
569 __ mov(eax, FieldOperand(ebx, SharedFunctionInfo::kDeoptCounterOffset)); | 569 __ mov(eax, |
| 570 FieldOperand(ebx, SharedFunctionInfo::kStressDeoptCounterOffset)); |
570 __ sub(Operand(eax), Immediate(Smi::FromInt(1))); | 571 __ sub(Operand(eax), Immediate(Smi::FromInt(1))); |
571 __ j(not_zero, &no_deopt, Label::kNear); | 572 __ j(not_zero, &no_deopt, Label::kNear); |
572 if (FLAG_trap_on_deopt) __ int3(); | 573 if (FLAG_trap_on_deopt) __ int3(); |
573 __ mov(eax, Immediate(Smi::FromInt(FLAG_deopt_every_n_times))); | 574 __ mov(eax, Immediate(Smi::FromInt(FLAG_deopt_every_n_times))); |
574 __ mov(FieldOperand(ebx, SharedFunctionInfo::kDeoptCounterOffset), eax); | 575 __ mov(FieldOperand(ebx, SharedFunctionInfo::kStressDeoptCounterOffset), |
| 576 eax); |
575 __ pop(ebx); | 577 __ pop(ebx); |
576 __ pop(eax); | 578 __ pop(eax); |
577 __ popfd(); | 579 __ popfd(); |
578 __ jmp(entry, RelocInfo::RUNTIME_ENTRY); | 580 __ jmp(entry, RelocInfo::RUNTIME_ENTRY); |
579 | 581 |
580 __ bind(&no_deopt); | 582 __ bind(&no_deopt); |
581 __ mov(FieldOperand(ebx, SharedFunctionInfo::kDeoptCounterOffset), eax); | 583 __ mov(FieldOperand(ebx, SharedFunctionInfo::kStressDeoptCounterOffset), |
| 584 eax); |
582 __ pop(ebx); | 585 __ pop(ebx); |
583 __ pop(eax); | 586 __ pop(eax); |
584 __ popfd(); | 587 __ popfd(); |
585 } | 588 } |
586 | 589 |
587 if (cc == no_condition) { | 590 if (cc == no_condition) { |
588 if (FLAG_trap_on_deopt) __ int3(); | 591 if (FLAG_trap_on_deopt) __ int3(); |
589 __ jmp(entry, RelocInfo::RUNTIME_ENTRY); | 592 __ jmp(entry, RelocInfo::RUNTIME_ENTRY); |
590 } else { | 593 } else { |
591 if (FLAG_trap_on_deopt) { | 594 if (FLAG_trap_on_deopt) { |
(...skipping 4504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5096 FixedArray::kHeaderSize - kPointerSize)); | 5099 FixedArray::kHeaderSize - kPointerSize)); |
5097 __ bind(&done); | 5100 __ bind(&done); |
5098 } | 5101 } |
5099 | 5102 |
5100 | 5103 |
5101 #undef __ | 5104 #undef __ |
5102 | 5105 |
5103 } } // namespace v8::internal | 5106 } } // namespace v8::internal |
5104 | 5107 |
5105 #endif // V8_TARGET_ARCH_IA32 | 5108 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |