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/PNaClTranslator.cpp

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/PNaClTranslator.h ('k') | src/assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/PNaClTranslator.cpp
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
index 48f47a95b4b0197f889d588e93107667fee8b885..a0ce417058f1b20826dfff16db73be629698a98c 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -1150,7 +1150,8 @@ public:
}
if (!isIRGenerationDisabled())
- Func = Ice::Cfg::create(getTranslator().getContext());
+ Func = Ice::Cfg::create(getTranslator().getContext(),
+ getTranslator().getNextSequenceNumber());
Ice::Cfg::setCurrentCfg(Func.get());
// TODO(kschimpf) Clean up API to add a function signature to
@@ -1185,7 +1186,7 @@ public:
// translation of all remaining functions. This allows successive
// parsing errors to be reported, without adding extra checks to
// the translator for such parsing errors.
- if (Context->getNumErrors() == 0) {
+ if (Context->getNumErrors() == 0 && Func) {
getTranslator().translateFcn(std::move(Func));
// The translator now has ownership of Func.
} else {
@@ -2863,10 +2864,7 @@ private:
if (!GlobalDeclarationNamesAndInitializersInstalled) {
Context->installGlobalNames();
Context->createValueIDs();
- std::unique_ptr<Ice::VariableDeclarationList> DeclsPtr =
- Context->getGlobalVariables();
- const Ice::VariableDeclarationList &Decls = *DeclsPtr;
- getTranslator().lowerGlobals(Decls);
+ getTranslator().lowerGlobals(Context->getGlobalVariables());
GlobalDeclarationNamesAndInitializersInstalled = true;
}
}
« no previous file with comments | « src/PNaClTranslator.h ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698