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

Unified Diff: src/IceTranslator.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/IceThreading.h ('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..658593164f4ff218905f34d350dcaff80307b7de 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,7 @@ public:
/// Lowers the given list of global addresses to target. Generates
/// list of corresponding variable declarations.
- void lowerGlobals(const VariableDeclarationList &VariableDeclarations);
+ void lowerGlobals(VariableDeclarationList *VariableDeclarations);
/// Creates a name using the given prefix and corresponding index.
std::string createUnnamedName(const IceString &Prefix, SizeT Index);
@@ -67,10 +67,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.h ('k') | src/IceTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698