Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Unified Diff: src/assembler.h

Issue 643903006: Subzero: Do class definition cleanups for assembler files too. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/assembler_ia32.h » ('j') | src/assembler_ia32.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index 46cf0100e4ab38d3862df2f4726559db63733481..bec0646e64fe88086bf385cee15715c9fe714e7d 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -40,6 +40,9 @@ class MemoryRegion;
// information that needs to be processed before finalizing the code
// into executable memory.
class AssemblerFixup {
+ AssemblerFixup(const AssemblerFixup &) = delete;
+ AssemblerFixup &operator=(const AssemblerFixup &) = delete;
+
public:
virtual void Process(const MemoryRegion &region, intptr_t position) = 0;
@@ -64,13 +67,14 @@ private:
void set_position(intptr_t position) { position_ = position; }
- AssemblerFixup(const AssemblerFixup &) = delete;
- AssemblerFixup &operator=(const AssemblerFixup &) = delete;
friend class AssemblerBuffer;
};
// Assembler buffers are used to emit binary code. They grow on demand.
class AssemblerBuffer {
+ AssemblerBuffer(const AssemblerBuffer &) = delete;
+ AssemblerBuffer &operator=(const AssemblerBuffer &) = delete;
+
public:
AssemblerBuffer(Assembler &);
~AssemblerBuffer();
@@ -120,6 +124,9 @@ public:
#if defined(DEBUG)
Jim Stichnoth 2014/10/16 18:19:53 Should this be "#if !defined(NDEBUG)"? I.e., is t
jvoung (off chromium) 2014/10/16 19:02:37 Ah yes, I forgot to change this when first bringin
class EnsureCapacity {
+ EnsureCapacity(const EnsureCapacity &) = delete;
+ EnsureCapacity &operator=(const EnsureCapacity &) = delete;
+
public:
explicit EnsureCapacity(AssemblerBuffer *buffer);
~EnsureCapacity();
@@ -135,7 +142,10 @@ public:
bool HasEnsuredCapacity() const { return has_ensured_capacity_; }
#else
class EnsureCapacity {
- public:
+ EnsureCapacity(const EnsureCapacity &) = delete;
+ EnsureCapacity &operator=(const EnsureCapacity &) = delete;
+
+ public:
explicit EnsureCapacity(AssemblerBuffer *buffer) {
if (buffer->cursor() >= buffer->limit())
buffer->ExtendCapacity();
@@ -191,6 +201,9 @@ private:
};
class Assembler {
+ Assembler(const Assembler &) = delete;
+ Assembler &operator=(const Assembler &) = delete;
+
public:
Assembler() {}
~Assembler() {}
@@ -212,9 +225,6 @@ public:
private:
llvm::BumpPtrAllocator Allocator;
-
- Assembler(const Assembler &) = delete;
- Assembler &operator=(const Assembler &) = delete;
};
} // end of namespace Ice
« no previous file with comments | « no previous file | src/assembler_ia32.h » ('j') | src/assembler_ia32.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698