| OLD | NEW |
| 1 | 1 |
| 2 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 2 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 3 // All Rights Reserved. | 3 // All Rights Reserved. |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // - Redistributions of source code must retain the above copyright notice, | 9 // - Redistributions of source code must retain the above copyright notice, |
| 10 // this list of conditions and the following disclaimer. | 10 // this list of conditions and the following disclaimer. |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 // Assembler. | 493 // Assembler. |
| 494 | 494 |
| 495 | 495 |
| 496 void Assembler::CheckBuffer() { | 496 void Assembler::CheckBuffer() { |
| 497 if (buffer_space() <= kGap) { | 497 if (buffer_space() <= kGap) { |
| 498 GrowBuffer(); | 498 GrowBuffer(); |
| 499 } | 499 } |
| 500 } | 500 } |
| 501 | 501 |
| 502 | 502 |
| 503 void Assembler::CheckTrampolinePoolQuick() { | 503 void Assembler::CheckTrampolinePoolQuick(int extra_instructions) { |
| 504 if (pc_offset() >= next_buffer_check_) { | 504 if (pc_offset() >= next_buffer_check_ - extra_instructions * kInstrSize) { |
| 505 CheckTrampolinePool(); | 505 CheckTrampolinePool(); |
| 506 } | 506 } |
| 507 } | 507 } |
| 508 | 508 |
| 509 | 509 |
| 510 void Assembler::emit(Instr x) { | 510 void Assembler::emit(Instr x) { |
| 511 if (!is_buffer_growth_blocked()) { | 511 if (!is_buffer_growth_blocked()) { |
| 512 CheckBuffer(); | 512 CheckBuffer(); |
| 513 } | 513 } |
| 514 *reinterpret_cast<Instr*>(pc_) = x; | 514 *reinterpret_cast<Instr*>(pc_) = x; |
| 515 pc_ += kInstrSize; | 515 pc_ += kInstrSize; |
| 516 CheckTrampolinePoolQuick(); | 516 CheckTrampolinePoolQuick(); |
| 517 } | 517 } |
| 518 | 518 |
| 519 | 519 |
| 520 } } // namespace v8::internal | 520 } } // namespace v8::internal |
| 521 | 521 |
| 522 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 522 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
| OLD | NEW |