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

Unified Diff: src/PNaClTranslator.cpp

Issue 1359923002: Require that the module symbol table can't appear after function. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | tests_lit/parse_errs/Inputs/symtab-after-fcn.tbc » ('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 3380c9ea29e96de3cf26853b82db81407260bb7c..02bbc661ae81524e37a003fbfd26b2c79e572594 100644
--- a/src/PNaClTranslator.cpp
+++ b/src/PNaClTranslator.cpp
@@ -3158,6 +3158,12 @@ bool ModuleParser::ParseBlock(unsigned BlockID) {
if (FoundValuesymtab)
Fatal("Duplicate valuesymtab in module");
+ // If we have already processed a function block (i.e. we have already
Jim Stichnoth 2015/09/22 20:06:06 single space after i.e.
Karl 2015/09/22 20:15:15 Done.
+ // installed global names and variable initializers) we can no longer accept
+ // the value symbol table. Names have already been generated.
+ if (GlobalDeclarationNamesAndInitializersInstalled)
+ Fatal("Module valuesymtab not allowed after function blocks");
+
FoundValuesymtab = true;
ModuleValuesymtabParser Parser(BlockID, this);
return Parser.ParseThisBlock();
« no previous file with comments | « no previous file | tests_lit/parse_errs/Inputs/symtab-after-fcn.tbc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698