| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 | 266 |
| 267 // Spare buffer. | 267 // Spare buffer. |
| 268 static const int kMinimalBufferSize = 4*KB; | 268 static const int kMinimalBufferSize = 4*KB; |
| 269 static byte* spare_buffer_ = NULL; | 269 static byte* spare_buffer_ = NULL; |
| 270 | 270 |
| 271 | 271 |
| 272 Assembler::Assembler(void* buffer, int buffer_size) | 272 Assembler::Assembler(void* buffer, int buffer_size) |
| 273 : positions_recorder_(this), | 273 : positions_recorder_(this), |
| 274 allow_peephole_optimization_(false) { | 274 allow_peephole_optimization_(false) { |
| 275 // BUG(3245989): disable peephole optimization if crankshaft is enabled. | |
| 276 allow_peephole_optimization_ = FLAG_peephole_optimization; | 275 allow_peephole_optimization_ = FLAG_peephole_optimization; |
| 277 if (buffer == NULL) { | 276 if (buffer == NULL) { |
| 278 // Do our own buffer management. | 277 // Do our own buffer management. |
| 279 if (buffer_size <= kMinimalBufferSize) { | 278 if (buffer_size <= kMinimalBufferSize) { |
| 280 buffer_size = kMinimalBufferSize; | 279 buffer_size = kMinimalBufferSize; |
| 281 | 280 |
| 282 if (spare_buffer_ != NULL) { | 281 if (spare_buffer_ != NULL) { |
| 283 buffer = spare_buffer_; | 282 buffer = spare_buffer_; |
| 284 spare_buffer_ = NULL; | 283 spare_buffer_ = NULL; |
| 285 } | 284 } |
| (...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2670 | 2669 |
| 2671 // Since a constant pool was just emitted, move the check offset forward by | 2670 // Since a constant pool was just emitted, move the check offset forward by |
| 2672 // the standard interval. | 2671 // the standard interval. |
| 2673 next_buffer_check_ = pc_offset() + kCheckConstInterval; | 2672 next_buffer_check_ = pc_offset() + kCheckConstInterval; |
| 2674 } | 2673 } |
| 2675 | 2674 |
| 2676 | 2675 |
| 2677 } } // namespace v8::internal | 2676 } } // namespace v8::internal |
| 2678 | 2677 |
| 2679 #endif // V8_TARGET_ARCH_ARM | 2678 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |