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

Unified Diff: src/PNaClTranslator.cpp

Issue 1848873002: Force sequential parsing when threads=0. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 9 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
« src/IceClFlags.h ('K') | « src/IceGlobalContext.cpp ('k') | no next file » | 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 be88b7f67a92db12680349191606dd91dccfa248..65b8a5c8ae7e277fd4dcd925971a58dcf416e1a9 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -2995,7 +2995,8 @@ public:
ModuleParser(unsigned BlockID, TopLevelParser *Context)
: BlockParserBaseClass(BlockID, Context),
Timer(Ice::TimerStack::TT_parseModule,
- Context->getTranslator().getContext()) {}
+ Context->getTranslator().getContext()),
+ IsParseParallel(Ice::GlobalContext::Flags.isParseParallel()) {}
~ModuleParser() override = default;
const char *getBlockName() const override { return "module"; }
NaClBitstreamCursor &getCursor() const { return Record.GetCursor(); }
@@ -3007,6 +3008,7 @@ private:
bool GlobalDeclarationNamesAndInitializersInstalled = false;
// True if we have already processed the symbol table for the module.
bool FoundValuesymtab = false;
+ const bool IsParseParallel;
// Generates names for unnamed global addresses (i.e. functions and global
// variables). Then lowers global variable declaration initializers to the
@@ -3148,7 +3150,7 @@ bool ModuleParser::ParseBlock(unsigned BlockID) {
Ice::GlobalContext *Ctx = Context->getTranslator().getContext();
uint32_t SeqNumber = Context->getTranslator().getNextSequenceNumber();
NaClBcIndexSize_t FcnId = Context->getNextFunctionBlockValueID();
- if (Ctx->getFlags().getParseParallel()) {
+ if (IsParseParallel) {
// Skip the block and copy into a buffer. Note: We copy into a buffer
// using the top-level parser to make sure that the underlying
// buffer reading from the data streamer is not thread safe.
« src/IceClFlags.h ('K') | « src/IceGlobalContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698