MIPS: We should never allocate a 0-sized buffer, so never grow from 0.

Port r22947 (e72b5aed) and r22944 (d1d8f44c)

BUG=
R=paul.lind@imgtec.com

Review URL: https://codereview.chromium.org/446923003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
akos.palfi@imgtec.com 2014-08-06 19:30:03 +00:00
parent aade11ede0
commit 957e1b3897
2 changed files with 2 additions and 6 deletions

View File

@ -1974,9 +1974,7 @@ void Assembler::GrowBuffer() {
// Compute new buffer size.
CodeDesc desc; // The new buffer.
if (buffer_size_ < 4*KB) {
desc.buffer_size = 4*KB;
} else if (buffer_size_ < 1*MB) {
if (buffer_size_ < 1 * MB) {
desc.buffer_size = 2*buffer_size_;
} else {
desc.buffer_size = buffer_size_ + 1*MB;

View File

@ -2631,9 +2631,7 @@ void Assembler::GrowBuffer() {
// Compute new buffer size.
CodeDesc desc; // The new buffer.
if (buffer_size_ < 4*KB) {
desc.buffer_size = 4*KB;
} else if (buffer_size_ < 1*MB) {
if (buffer_size_ < 1 * MB) {
desc.buffer_size = 2*buffer_size_;
} else {
desc.buffer_size = buffer_size_ + 1*MB;