@@ -205,8 +205,7 @@ void CommandLineInterface::handleIR(string const& _contractName)
205
205
{
206
206
solAssert (
207
207
m_options.input .mode == InputMode::Compiler ||
208
- m_options.input .mode == InputMode::CompilerWithASTImport ||
209
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport , " "
208
+ m_options.input .mode == InputMode::CompilerWithASTImport
210
209
);
211
210
212
211
if (!m_options.compiler .outputs .ir )
@@ -225,8 +224,7 @@ void CommandLineInterface::handleIROptimized(string const& _contractName)
225
224
{
226
225
solAssert (
227
226
m_options.input .mode == InputMode::Compiler ||
228
- m_options.input .mode == InputMode::CompilerWithASTImport ||
229
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport , " "
227
+ m_options.input .mode == InputMode::CompilerWithASTImport
230
228
);
231
229
232
230
if (!m_options.compiler .outputs .irOptimized )
@@ -245,8 +243,7 @@ void CommandLineInterface::handleEwasm(string const& _contractName)
245
243
{
246
244
solAssert (
247
245
m_options.input .mode == InputMode::Compiler ||
248
- m_options.input .mode == InputMode::CompilerWithASTImport ||
249
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport , " "
246
+ m_options.input .mode == InputMode::CompilerWithASTImport
250
247
);
251
248
252
249
if (!m_options.compiler .outputs .ewasm )
@@ -286,8 +283,7 @@ void CommandLineInterface::handleSignatureHashes(string const& _contract)
286
283
{
287
284
solAssert (
288
285
m_options.input .mode == InputMode::Compiler ||
289
- m_options.input .mode == InputMode::CompilerWithASTImport ||
290
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport , " "
286
+ m_options.input .mode == InputMode::CompilerWithASTImport
291
287
);
292
288
293
289
if (!m_options.compiler .outputs .signatureHashes )
@@ -326,8 +322,7 @@ void CommandLineInterface::handleABI(string const& _contract)
326
322
{
327
323
solAssert (
328
324
m_options.input .mode == InputMode::Compiler ||
329
- m_options.input .mode == InputMode::CompilerWithASTImport ||
330
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport , " "
325
+ m_options.input .mode == InputMode::CompilerWithASTImport
331
326
);
332
327
333
328
if (!m_options.compiler .outputs .abi )
@@ -344,8 +339,7 @@ void CommandLineInterface::handleStorageLayout(string const& _contract)
344
339
{
345
340
solAssert (
346
341
m_options.input .mode == InputMode::Compiler ||
347
- m_options.input .mode == InputMode::CompilerWithASTImport ||
348
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport , " "
342
+ m_options.input .mode == InputMode::CompilerWithASTImport
349
343
);
350
344
351
345
if (!m_options.compiler .outputs .storageLayout )
@@ -362,8 +356,7 @@ void CommandLineInterface::handleNatspec(bool _natspecDev, string const& _contra
362
356
{
363
357
solAssert (
364
358
m_options.input .mode == InputMode::Compiler ||
365
- m_options.input .mode == InputMode::CompilerWithASTImport ||
366
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport , " "
359
+ m_options.input .mode == InputMode::CompilerWithASTImport
367
360
);
368
361
369
362
bool enabled = false ;
@@ -942,8 +935,7 @@ void CommandLineInterface::handleAst()
942
935
{
943
936
solAssert (
944
937
m_options.input .mode == InputMode::Compiler ||
945
- m_options.input .mode == InputMode::CompilerWithASTImport ||
946
- m_options.input .mode == InputMode::CompilerWithEvmAssemblyJsonImport, " "
938
+ m_options.input .mode == InputMode::CompilerWithASTImport
947
939
);
948
940
949
941
if (!m_options.compiler .outputs .astCompactJson )
@@ -1193,7 +1185,8 @@ void CommandLineInterface::outputCompilationResults()
1193
1185
handleCombinedJSON ();
1194
1186
1195
1187
// do we need AST output?
1196
- handleAst ();
1188
+ if (m_options.input .mode != InputMode::CompilerWithEvmAssemblyJsonImport)
1189
+ handleAst ();
1197
1190
1198
1191
if (
1199
1192
!m_compiler->compilationSuccessful () &&
@@ -1233,15 +1226,19 @@ void CommandLineInterface::outputCompilationResults()
1233
1226
handleGasEstimation (contract);
1234
1227
1235
1228
handleBytecode (contract);
1236
- handleIR (contract);
1237
- handleIROptimized (contract);
1238
- handleEwasm (contract);
1239
- handleSignatureHashes (contract);
1240
- handleMetadata (contract);
1241
- handleABI (contract);
1242
- handleStorageLayout (contract);
1243
- handleNatspec (true , contract);
1244
- handleNatspec (false , contract);
1229
+
1230
+ if (m_options.input .mode != InputMode::CompilerWithEvmAssemblyJsonImport)
1231
+ {
1232
+ handleIR (contract);
1233
+ handleIROptimized (contract);
1234
+ handleEwasm (contract);
1235
+ handleSignatureHashes (contract);
1236
+ handleMetadata (contract);
1237
+ handleABI (contract);
1238
+ handleStorageLayout (contract);
1239
+ handleNatspec (true , contract);
1240
+ handleNatspec (false , contract);
1241
+ }
1245
1242
} // end of contracts iteration
1246
1243
1247
1244
if (!m_hasOutput)
0 commit comments