Index: src/x64/assembler-x64.cc |
diff --git a/src/x64/assembler-x64.cc b/src/x64/assembler-x64.cc |
index 2568cc082204ae839dcf376a416d43b05ed978fb..e428e8ee7771d22360e0aac45e1b2ea53de41b2e 100644 |
--- a/src/x64/assembler-x64.cc |
+++ b/src/x64/assembler-x64.cc |
@@ -331,8 +331,8 @@ void Assembler::GrowBuffer() { |
// Compute new buffer size. |
CodeDesc desc; // the new buffer |
- if (buffer_size_ < 4*KB) { |
- desc.buffer_size = 4*KB; |
+ if (buffer_size_ == 0) { |
+ desc.buffer_size = kMinimalBufferSize; |
} else { |
desc.buffer_size = 2*buffer_size_; |
} |
@@ -363,14 +363,7 @@ void Assembler::GrowBuffer() { |
MemMove(rc_delta + reloc_info_writer.pos(), reloc_info_writer.pos(), |
desc.reloc_size); |
- // Switch buffers. |
- if (isolate() != NULL && |
- isolate()->assembler_spare_buffer() == NULL && |
- buffer_size_ == kMinimalBufferSize) { |
- isolate()->set_assembler_spare_buffer(buffer_); |
- } else { |
- DeleteArray(buffer_); |
- } |
+ DeleteArray(buffer_); |
buffer_ = desc.buffer; |
buffer_size_ = desc.buffer_size; |
pc_ += pc_delta; |