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

Unified Diff: src/IceTranslator.h

Issue 916653004: 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: Const change 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/IceThreading.cpp ('k') | src/IceTranslator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTranslator.h
diff --git a/src/IceTranslator.h b/src/IceTranslator.h
index 6b35b25f97ae43167f18ed773227e2cb57c352f5..bc9a933dd22b7063bd19a9698d2fa5368e01d8e0 100644
--- a/src/IceTranslator.h
+++ b/src/IceTranslator.h
@@ -34,14 +34,14 @@ class Translator {
Translator &operator=(const Translator &) = delete;
public:
- Translator(GlobalContext *Ctx, const ClFlags &Flags);
+ Translator(GlobalContext *Ctx);
~Translator();
const ErrorCode &getErrorStatus() const { return ErrorStatus; }
GlobalContext *getContext() const { return Ctx; }
- const ClFlags &getFlags() const { return Flags; }
+ const ClFlags &getFlags() const { return Ctx->getFlags(); }
/// Translates the constructed ICE function Fcn to machine code.
/// Takes ownership of Func.
@@ -56,7 +56,8 @@ public:
/// Lowers the given list of global addresses to target. Generates
/// list of corresponding variable declarations.
- void lowerGlobals(const VariableDeclarationList &VariableDeclarations);
+ void
+ lowerGlobals(std::unique_ptr<VariableDeclarationList> VariableDeclarations);
/// Creates a name using the given prefix and corresponding index.
std::string createUnnamedName(const IceString &Prefix, SizeT Index);
@@ -67,10 +68,11 @@ public:
bool checkIfUnnamedNameSafe(const IceString &Name, const char *Kind,
const IceString &Prefix);
+ uint32_t getNextSequenceNumber() { return NextSequenceNumber++; }
+
protected:
GlobalContext *Ctx;
- const ClFlags &Flags;
- std::unique_ptr<TargetDataLowering> DataLowering;
+ uint32_t NextSequenceNumber;
// Exit status of the translation. False is successful. True otherwise.
ErrorCode ErrorStatus;
};
« no previous file with comments | « src/IceThreading.cpp ('k') | src/IceTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698