Chromium Code Reviews| Index: src/IceAssembler.cpp |
| diff --git a/src/IceAssembler.cpp b/src/IceAssembler.cpp |
| index e160612bad75853efd84be1cec45cb2db3b65bf2..757c3ea80b72f5f6b2e248d65e594de0024a0a33 100644 |
| --- a/src/IceAssembler.cpp |
| +++ b/src/IceAssembler.cpp |
| @@ -45,15 +45,11 @@ AssemblerFixup *AssemblerBuffer::createFixup(FixupKind Kind, |
| return F; |
| } |
| -#ifndef NDEBUG |
| -AssemblerBuffer::EnsureCapacity::EnsureCapacity(AssemblerBuffer *buffer) { |
| - if (buffer->cursor() >= buffer->limit()) |
| - buffer->extendCapacity(); |
| +void AssemblerBuffer::EnsureCapacity::validate(AssemblerBuffer *buffer) { |
|
John
2015/06/23 22:28:30
optional: s/buffer/Buffer/
?
If you want to avoi
Jim Stichnoth
2015/06/24 21:27:27
I think these naming inconsistencies come from try
|
| // In debug mode, we save the assembler buffer along with the gap |
| // size before we start emitting to the buffer. This allows us to |
| // check that any single generated instruction doesn't overflow the |
| // limit implied by the minimum gap size. |
| - Buffer = buffer; |
| Gap = computeGap(); |
| // Make sure that extending the capacity leaves a big enough gap |
| // for any kind of instruction. |
| @@ -69,9 +65,9 @@ AssemblerBuffer::EnsureCapacity::~EnsureCapacity() { |
| // Make sure the generated instruction doesn't take up more |
| // space than the minimum gap. |
| intptr_t delta = Gap - computeGap(); |
| + (void)delta; |
|
John
2015/06/23 22:28:30
optional: s/delta/Delta/?
Jim Stichnoth
2015/06/24 21:27:27
(same response as above)
|
| assert(delta <= kMinimumGap); |
| } |
| -#endif // !NDEBUG |
| AssemblerBuffer::AssemblerBuffer(Assembler &Asm) : Assemblr(Asm) { |
| const intptr_t OneKB = 1024; |
| @@ -79,9 +75,7 @@ AssemblerBuffer::AssemblerBuffer(Assembler &Asm) : Assemblr(Asm) { |
| Contents = NewContents(Assemblr, kInitialBufferCapacity); |
| Cursor = Contents; |
| Limit = computeLimit(Contents, kInitialBufferCapacity); |
| -#ifndef NDEBUG |
| HasEnsuredCapacity = false; |
| -#endif // !NDEBUG |
| // Verify internal state. |
| assert(capacity() == kInitialBufferCapacity); |