aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen/CompilerContext.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-12-13 21:40:54 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-01-06 09:23:38 +0800
commit124190336b0a70ea32d5f8ca0c4b364f1fc774d0 (patch)
tree6be4f7815f417c9343ed57a85ec51f77f0c53aff /libsolidity/codegen/CompilerContext.cpp
parent2548228b365d56612e2f039f735be0fdf6ce0807 (diff)
downloaddexon-solidity-124190336b0a70ea32d5f8ca0c4b364f1fc774d0.tar.gz
dexon-solidity-124190336b0a70ea32d5f8ca0c4b364f1fc774d0.tar.zst
dexon-solidity-124190336b0a70ea32d5f8ca0c4b364f1fc774d0.zip
Split inline assembly into loose and strict flavours.
Diffstat (limited to 'libsolidity/codegen/CompilerContext.cpp')
-rw-r--r--libsolidity/codegen/CompilerContext.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/libsolidity/codegen/CompilerContext.cpp b/libsolidity/codegen/CompilerContext.cpp
index ab10d7dd..7a88475a 100644
--- a/libsolidity/codegen/CompilerContext.cpp
+++ b/libsolidity/codegen/CompilerContext.cpp
@@ -319,14 +319,19 @@ void CompilerContext::appendInlineAssembly(
ErrorList errors;
ErrorReporter errorReporter(errors);
auto scanner = make_shared<Scanner>(CharStream(_assembly), "--CODEGEN--");
- auto parserResult = assembly::Parser(errorReporter).parse(scanner);
+ auto parserResult = assembly::Parser(errorReporter, assembly::AsmFlavour::Strict).parse(scanner);
#ifdef SOL_OUTPUT_ASM
cout << assembly::AsmPrinter()(*parserResult) << endl;
#endif
assembly::AsmAnalysisInfo analysisInfo;
bool analyzerResult = false;
if (parserResult)
- analyzerResult = assembly::AsmAnalyzer(analysisInfo, errorReporter, false, identifierAccess.resolve).analyze(*parserResult);
+ analyzerResult = assembly::AsmAnalyzer(
+ analysisInfo,
+ errorReporter,
+ assembly::AsmFlavour::Strict,
+ identifierAccess.resolve
+ ).analyze(*parserResult);
if (!parserResult || !errorReporter.errors().empty() || !analyzerResult)
{
string message =