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

Unified Diff: src/assembler.h

Issue 876083007: Subzero: Emit functions and global initializers in a separate thread. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: More code review changes Created 5 years, 10 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 | « src/PNaClTranslator.cpp ('k') | src/llvm2ice.cpp » ('j') | no next file with comments »
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 40f50fd5b1a11f3d0d79dffc40926124a98f200c..dfd8cd123bfdc09418d095c80666b1be53c322f8 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -149,7 +149,7 @@ class Assembler {
Assembler &operator=(const Assembler &) = delete;
public:
- Assembler() : buffer_(*this) {}
+ Assembler() : FunctionName(""), IsInternal(false), buffer_(*this) {}
virtual ~Assembler() {}
// Allocate a chunk of bytes using the per-Assembler allocator.
@@ -190,9 +190,18 @@ public:
}
void emitIASBytes(GlobalContext *Ctx) const;
+ bool getInternal() const { return IsInternal; }
+ void setInternal(bool Internal) { IsInternal = Internal; }
+ const IceString &getFunctionName() { return FunctionName; }
+ void setFunctionName(const IceString &NewName) { FunctionName = NewName; }
private:
ArenaAllocator<32 * 1024> Allocator;
+ // FunctionName and IsInternal are transferred from the original Cfg
+ // object, since the Cfg object may be deleted by the time the
+ // assembler buffer is emitted.
+ IceString FunctionName;
+ bool IsInternal;
protected:
AssemblerBuffer buffer_;
« no previous file with comments | « src/PNaClTranslator.cpp ('k') | src/llvm2ice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698