| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 3184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3195 // code. | 3195 // code. |
| 3196 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); | 3196 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); |
| 3197 } | 3197 } |
| 3198 | 3198 |
| 3199 | 3199 |
| 3200 void Assembler::GrowBuffer() { | 3200 void Assembler::GrowBuffer() { |
| 3201 if (!own_buffer_) FATAL("external code buffer is too small"); | 3201 if (!own_buffer_) FATAL("external code buffer is too small"); |
| 3202 | 3202 |
| 3203 // Compute new buffer size. | 3203 // Compute new buffer size. |
| 3204 CodeDesc desc; // the new buffer | 3204 CodeDesc desc; // the new buffer |
| 3205 if (buffer_size_ == 0) { | 3205 if (buffer_size_ < 1 * MB) { |
| 3206 desc.buffer_size = kMinimalBufferSize; | |
| 3207 } else if (buffer_size_ < 1*MB) { | |
| 3208 desc.buffer_size = 2*buffer_size_; | 3206 desc.buffer_size = 2*buffer_size_; |
| 3209 } else { | 3207 } else { |
| 3210 desc.buffer_size = buffer_size_ + 1*MB; | 3208 desc.buffer_size = buffer_size_ + 1*MB; |
| 3211 } | 3209 } |
| 3212 CHECK_GT(desc.buffer_size, 0); // no overflow | 3210 CHECK_GT(desc.buffer_size, 0); // no overflow |
| 3213 | 3211 |
| 3214 // Set up new buffer. | 3212 // Set up new buffer. |
| 3215 desc.buffer = NewArray<byte>(desc.buffer_size); | 3213 desc.buffer = NewArray<byte>(desc.buffer_size); |
| 3216 | 3214 |
| 3217 desc.instr_size = pc_offset(); | 3215 desc.instr_size = pc_offset(); |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3763 assm->instr_at_put( | 3761 assm->instr_at_put( |
| 3764 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); | 3762 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); |
| 3765 } | 3763 } |
| 3766 } | 3764 } |
| 3767 } | 3765 } |
| 3768 | 3766 |
| 3769 | 3767 |
| 3770 } } // namespace v8::internal | 3768 } } // namespace v8::internal |
| 3771 | 3769 |
| 3772 #endif // V8_TARGET_ARCH_ARM | 3770 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |