Index: src/arm/assembler-arm.cc |
diff --git a/src/arm/assembler-arm.cc b/src/arm/assembler-arm.cc |
index 2fe80b065c7121425948e41bf0825fde4c21bc6e..47ea0e20666e2f44621e42959b7094067c43ed79 100644 |
--- a/src/arm/assembler-arm.cc |
+++ b/src/arm/assembler-arm.cc |
@@ -318,44 +318,11 @@ const Instr kLdrStrInstrArgumentMask = 0x0000ffff; |
const Instr kLdrStrOffsetMask = 0x00000fff; |
-// Spare buffer. |
-static const int kMinimalBufferSize = 4*KB; |
- |
- |
-Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) |
- : AssemblerBase(arg_isolate), |
+Assembler::Assembler(Isolate* isolate, void* buffer, int buffer_size) |
+ : AssemblerBase(isolate, buffer, buffer_size), |
recorded_ast_id_(TypeFeedbackId::None()), |
positions_recorder_(this) { |
- if (buffer == NULL) { |
- // Do our own buffer management. |
- if (buffer_size <= kMinimalBufferSize) { |
- buffer_size = kMinimalBufferSize; |
- |
- if (isolate()->assembler_spare_buffer() != NULL) { |
- buffer = isolate()->assembler_spare_buffer(); |
- isolate()->set_assembler_spare_buffer(NULL); |
- } |
- } |
- if (buffer == NULL) { |
- buffer_ = NewArray<byte>(buffer_size); |
- } else { |
- buffer_ = static_cast<byte*>(buffer); |
- } |
- buffer_size_ = buffer_size; |
- own_buffer_ = true; |
- |
- } else { |
- // Use externally provided buffer instead. |
- ASSERT(buffer_size > 0); |
- buffer_ = static_cast<byte*>(buffer); |
- buffer_size_ = buffer_size; |
- own_buffer_ = false; |
- } |
- |
- // Set up buffer pointers. |
- ASSERT(buffer_ != NULL); |
- pc_ = buffer_; |
- reloc_info_writer.Reposition(buffer_ + buffer_size, pc_); |
+ reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_); |
num_pending_reloc_info_ = 0; |
next_buffer_check_ = 0; |
const_pool_blocked_nesting_ = 0; |
@@ -368,14 +335,6 @@ Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) |
Assembler::~Assembler() { |
ASSERT(const_pool_blocked_nesting_ == 0); |
- if (own_buffer_) { |
- if (isolate()->assembler_spare_buffer() == NULL && |
- buffer_size_ == kMinimalBufferSize) { |
- isolate()->set_assembler_spare_buffer(buffer_); |
- } else { |
- DeleteArray(buffer_); |
- } |
- } |
} |