| Index: runtime/vm/assembler.cc
|
| diff --git a/runtime/vm/assembler.cc b/runtime/vm/assembler.cc
|
| index 884326f397d9dd1dc9c89256655b96da446e4ef9..c4e8c2bd348f28a043afb86406ccd6c6ea377fbc 100644
|
| --- a/runtime/vm/assembler.cc
|
| +++ b/runtime/vm/assembler.cc
|
| @@ -37,7 +37,6 @@ static uword NewContents(intptr_t capacity) {
|
| return result;
|
| }
|
|
|
| -
|
| #if defined(DEBUG)
|
| AssemblerBuffer::EnsureCapacity::EnsureCapacity(AssemblerBuffer* buffer) {
|
| if (buffer->cursor() >= buffer->limit()) buffer->ExtendCapacity();
|
| @@ -55,7 +54,6 @@ AssemblerBuffer::EnsureCapacity::EnsureCapacity(AssemblerBuffer* buffer) {
|
| buffer->has_ensured_capacity_ = true;
|
| }
|
|
|
| -
|
| AssemblerBuffer::EnsureCapacity::~EnsureCapacity() {
|
| // Unmark the buffer, so we cannot emit after this.
|
| buffer_->has_ensured_capacity_ = false;
|
| @@ -66,7 +64,6 @@ AssemblerBuffer::EnsureCapacity::~EnsureCapacity() {
|
| }
|
| #endif
|
|
|
| -
|
| AssemblerBuffer::AssemblerBuffer()
|
| : pointer_offsets_(new ZoneGrowableArray<intptr_t>(16)) {
|
| static const intptr_t kInitialBufferCapacity = 4 * KB;
|
| @@ -84,10 +81,8 @@ AssemblerBuffer::AssemblerBuffer()
|
| ASSERT(Size() == 0);
|
| }
|
|
|
| -
|
| AssemblerBuffer::~AssemblerBuffer() {}
|
|
|
| -
|
| void AssemblerBuffer::ProcessFixups(const MemoryRegion& region) {
|
| AssemblerFixup* fixup = fixup_;
|
| while (fixup != NULL) {
|
| @@ -96,7 +91,6 @@ void AssemblerBuffer::ProcessFixups(const MemoryRegion& region) {
|
| }
|
| }
|
|
|
| -
|
| void AssemblerBuffer::FinalizeInstructions(const MemoryRegion& instructions) {
|
| // Copy the instructions from the buffer.
|
| MemoryRegion from(reinterpret_cast<void*>(contents()), Size());
|
| @@ -109,7 +103,6 @@ void AssemblerBuffer::FinalizeInstructions(const MemoryRegion& instructions) {
|
| #endif
|
| }
|
|
|
| -
|
| void AssemblerBuffer::ExtendCapacity() {
|
| intptr_t old_size = Size();
|
| intptr_t old_capacity = Capacity();
|
| @@ -137,7 +130,6 @@ void AssemblerBuffer::ExtendCapacity() {
|
| ASSERT(Size() == old_size);
|
| }
|
|
|
| -
|
| class PatchCodeWithHandle : public AssemblerFixup {
|
| public:
|
| PatchCodeWithHandle(ZoneGrowableArray<intptr_t>* pointer_offsets,
|
| @@ -159,7 +151,6 @@ class PatchCodeWithHandle : public AssemblerFixup {
|
| const Object& object_;
|
| };
|
|
|
| -
|
| intptr_t AssemblerBuffer::CountPointerOffsets() const {
|
| intptr_t count = 0;
|
| AssemblerFixup* current = fixup_;
|
| @@ -170,7 +161,6 @@ intptr_t AssemblerBuffer::CountPointerOffsets() const {
|
| return count;
|
| }
|
|
|
| -
|
| void AssemblerBuffer::EmitObject(const Object& object) {
|
| // Since we are going to store the handle as part of the fixup information
|
| // the handle needs to be a zone handle.
|
| @@ -180,7 +170,6 @@ void AssemblerBuffer::EmitObject(const Object& object) {
|
| cursor_ += kWordSize; // Reserve space for pointer.
|
| }
|
|
|
| -
|
| // Shared macros are implemented here.
|
| void Assembler::Unimplemented(const char* message) {
|
| const char* format = "Unimplemented: %s";
|
| @@ -190,7 +179,6 @@ void Assembler::Unimplemented(const char* message) {
|
| Stop(buffer);
|
| }
|
|
|
| -
|
| void Assembler::Untested(const char* message) {
|
| const char* format = "Untested: %s";
|
| const intptr_t len = OS::SNPrint(NULL, 0, format, message);
|
| @@ -199,7 +187,6 @@ void Assembler::Untested(const char* message) {
|
| Stop(buffer);
|
| }
|
|
|
| -
|
| void Assembler::Unreachable(const char* message) {
|
| const char* format = "Unreachable: %s";
|
| const intptr_t len = OS::SNPrint(NULL, 0, format, message);
|
| @@ -208,7 +195,6 @@ void Assembler::Unreachable(const char* message) {
|
| Stop(buffer);
|
| }
|
|
|
| -
|
| void Assembler::Comment(const char* format, ...) {
|
| if (EmittingComments()) {
|
| char buffer[1024];
|
| @@ -224,12 +210,10 @@ void Assembler::Comment(const char* format, ...) {
|
| }
|
| }
|
|
|
| -
|
| bool Assembler::EmittingComments() {
|
| return FLAG_code_comments || FLAG_disassemble || FLAG_disassemble_optimized;
|
| }
|
|
|
| -
|
| const Code::Comments& Assembler::GetCodeComments() const {
|
| Code::Comments& comments = Code::Comments::New(comments_.length());
|
|
|
| @@ -241,14 +225,12 @@ const Code::Comments& Assembler::GetCodeComments() const {
|
| return comments;
|
| }
|
|
|
| -
|
| intptr_t ObjectPoolWrapper::AddObject(const Object& obj,
|
| Patchability patchable) {
|
| ASSERT(obj.IsNotTemporaryScopedHandle());
|
| return AddObject(ObjectPoolWrapperEntry(&obj), patchable);
|
| }
|
|
|
| -
|
| intptr_t ObjectPoolWrapper::AddImmediate(uword imm) {
|
| return AddObject(ObjectPoolWrapperEntry(imm, ObjectPool::kImmediate),
|
| kNotPatchable);
|
| @@ -269,7 +251,6 @@ intptr_t ObjectPoolWrapper::AddObject(ObjectPoolWrapperEntry entry,
|
| return object_pool_.length() - 1;
|
| }
|
|
|
| -
|
| intptr_t ObjectPoolWrapper::FindObject(ObjectPoolWrapperEntry entry,
|
| Patchability patchable) {
|
| // If the object is not patchable, check if we've already got it in the
|
| @@ -283,25 +264,21 @@ intptr_t ObjectPoolWrapper::FindObject(ObjectPoolWrapperEntry entry,
|
| return AddObject(entry, patchable);
|
| }
|
|
|
| -
|
| intptr_t ObjectPoolWrapper::FindObject(const Object& obj,
|
| Patchability patchable) {
|
| return FindObject(ObjectPoolWrapperEntry(&obj), patchable);
|
| }
|
|
|
| -
|
| intptr_t ObjectPoolWrapper::FindObject(const Object& obj,
|
| const Object& equivalence) {
|
| return FindObject(ObjectPoolWrapperEntry(&obj, &equivalence), kNotPatchable);
|
| }
|
|
|
| -
|
| intptr_t ObjectPoolWrapper::FindImmediate(uword imm) {
|
| return FindObject(ObjectPoolWrapperEntry(imm, ObjectPool::kImmediate),
|
| kNotPatchable);
|
| }
|
|
|
| -
|
| intptr_t ObjectPoolWrapper::FindNativeEntry(const ExternalLabel* label,
|
| Patchability patchable) {
|
| return FindObject(
|
| @@ -309,7 +286,6 @@ intptr_t ObjectPoolWrapper::FindNativeEntry(const ExternalLabel* label,
|
| patchable);
|
| }
|
|
|
| -
|
| RawObjectPool* ObjectPoolWrapper::MakeObjectPool() {
|
| intptr_t len = object_pool_.length();
|
| if (len == 0) {
|
| @@ -329,5 +305,4 @@ RawObjectPool* ObjectPoolWrapper::MakeObjectPool() {
|
| return result.raw();
|
| }
|
|
|
| -
|
| } // namespace dart
|
|
|