Rearrange emit vs emitIAS. Wait till function is done before dumping text. Eventually, I wanted to have a flag "UseELFWriter" like: https://codereview.chromium.org/678533005/diff/120001/src/IceCfg.cpp Where the emit OStream would not have text, and only have binary. This refactor hopefully means fewer places to check for a flag to disable the text version of IAS, and be able to write binary. Otherwise, there are some text labels for branches that are still being dumped out. BUG=none R=stichnot@chromium.org Review URL: https://codereview.chromium.org/700263003
diff --git a/src/assembler_ia32.h b/src/assembler_ia32.h index 77159c4..a7ffc9e 100644 --- a/src/assembler_ia32.h +++ b/src/assembler_ia32.h
@@ -364,7 +364,7 @@ AssemblerX86 &operator=(const AssemblerX86 &) = delete; public: - explicit AssemblerX86(bool use_far_branches = false) : buffer_(*this) { + explicit AssemblerX86(bool use_far_branches = false) : Assembler() { // This mode is only needed and implemented for MIPS and ARM. assert(!use_far_branches); (void)use_far_branches; @@ -829,15 +829,6 @@ buffer_.FinalizeInstructions(region); } - // Expose the buffer, for bringup... - intptr_t GetPosition() const { return buffer_.GetPosition(); } - template <typename T> T LoadBuffer(intptr_t position) const { - return buffer_.Load<T>(position); - } - AssemblerFixup *GetLatestFixup(intptr_t position) const { - return buffer_.GetLatestFixup(position); - } - private: inline void EmitUint8(uint8_t value); inline void EmitInt16(int16_t value); @@ -868,8 +859,6 @@ LabelVector LocalLabels; Label *GetOrCreateLabel(SizeT Number, LabelVector &Labels); - - AssemblerBuffer buffer_; }; inline void AssemblerX86::EmitUint8(uint8_t value) {