Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 642 ASSERT(environment->HasBeenRegistered()); | 642 ASSERT(environment->HasBeenRegistered()); |
| 643 int id = environment->deoptimization_index(); | 643 int id = environment->deoptimization_index(); |
| 644 ASSERT(info()->IsOptimizing() || info()->IsStub()); | 644 ASSERT(info()->IsOptimizing() || info()->IsStub()); |
| 645 Address entry = | 645 Address entry = |
| 646 Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type); | 646 Deoptimizer::GetDeoptimizationEntry(isolate(), id, bailout_type); |
| 647 if (entry == NULL) { | 647 if (entry == NULL) { |
| 648 Abort(kBailoutWasNotPrepared); | 648 Abort(kBailoutWasNotPrepared); |
| 649 return; | 649 return; |
| 650 } | 650 } |
| 651 | 651 |
| 652 ASSERT(FLAG_deopt_every_n_times == 0); // Not yet implemented on x64. | 652 if (FLAG_deopt_every_n_times != 0 && !info()->IsStub()) { |
| 653 ExternalReference count = ExternalReference::stress_deopt_count(isolate()); | |
| 654 Label no_deopt; | |
| 655 __ pushfq(); | |
| 656 __ push(rax); | |
| 657 Operand count_operand = __ ExternalOperand(count, kScratchRegister); | |
|
Weiliang
2013/11/07 09:20:11
drive-by comments
use masm()-> instead of __ here
| |
| 658 __ movl(rax, count_operand); | |
| 659 __ subl(rax, Immediate(1)); | |
| 660 __ j(not_zero, &no_deopt, Label::kNear); | |
| 661 if (FLAG_trap_on_deopt) __ int3(); | |
| 662 __ movl(rax, Immediate(FLAG_deopt_every_n_times)); | |
| 663 __ movl(count_operand, rax); | |
| 664 __ pop(rax); | |
| 665 __ popfq(); | |
| 666 ASSERT(frame_is_built_); | |
| 667 __ call(entry, RelocInfo::RUNTIME_ENTRY); | |
| 668 __ bind(&no_deopt); | |
| 669 __ movl(count_operand, rax); | |
| 670 __ pop(rax); | |
| 671 __ popfq(); | |
| 672 } | |
| 653 | 673 |
| 654 if (info()->ShouldTrapOnDeopt()) { | 674 if (info()->ShouldTrapOnDeopt()) { |
| 655 Label done; | 675 Label done; |
| 656 if (cc != no_condition) { | 676 if (cc != no_condition) { |
| 657 __ j(NegateCondition(cc), &done, Label::kNear); | 677 __ j(NegateCondition(cc), &done, Label::kNear); |
| 658 } | 678 } |
| 659 __ int3(); | 679 __ int3(); |
| 660 __ bind(&done); | 680 __ bind(&done); |
| 661 } | 681 } |
| 662 | 682 |
| (...skipping 4836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5499 FixedArray::kHeaderSize - kPointerSize)); | 5519 FixedArray::kHeaderSize - kPointerSize)); |
| 5500 __ bind(&done); | 5520 __ bind(&done); |
| 5501 } | 5521 } |
| 5502 | 5522 |
| 5503 | 5523 |
| 5504 #undef __ | 5524 #undef __ |
| 5505 | 5525 |
| 5506 } } // namespace v8::internal | 5526 } } // namespace v8::internal |
| 5507 | 5527 |
| 5508 #endif // V8_TARGET_ARCH_X64 | 5528 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |