From 0f2c4220f9c1e6c713161e7b6fc6fc99e4452509 Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 20 Jun 2019 15:08:49 +0200 Subject: [PATCH 1/3] Enable yul optimizations if optimizations are enabled and in Yul mode. --- remix-solidity/src/compiler/compiler-input.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/remix-solidity/src/compiler/compiler-input.js b/remix-solidity/src/compiler/compiler-input.js index 6911617861..d5768c9ac9 100644 --- a/remix-solidity/src/compiler/compiler-input.js +++ b/remix-solidity/src/compiler/compiler-input.js @@ -24,5 +24,9 @@ module.exports = (sources, opts) => { if (opts.language) { o.language = opts.language } + if (opts.language == 'Yul' && o.settings.optimizer.enabled) + { + o.settings.optimizer.details['yul'] = true + } return JSON.stringify(o) } From 7081fa42cbcb95bad5104c81e0a9e55e00edec20 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 24 Jun 2019 09:33:24 +0200 Subject: [PATCH 2/3] equal --- remix-solidity/src/compiler/compiler-input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remix-solidity/src/compiler/compiler-input.js b/remix-solidity/src/compiler/compiler-input.js index d5768c9ac9..56e9b1d047 100644 --- a/remix-solidity/src/compiler/compiler-input.js +++ b/remix-solidity/src/compiler/compiler-input.js @@ -24,7 +24,7 @@ module.exports = (sources, opts) => { if (opts.language) { o.language = opts.language } - if (opts.language == 'Yul' && o.settings.optimizer.enabled) + if (opts.language === 'Yul' && o.settings.optimizer.enabled) { o.settings.optimizer.details['yul'] = true } From b9aa5bb13537266a10b7eb9d5aed93c15419ceef Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 24 Jun 2019 09:34:05 +0200 Subject: [PATCH 3/3] add `details` --- remix-solidity/src/compiler/compiler-input.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/remix-solidity/src/compiler/compiler-input.js b/remix-solidity/src/compiler/compiler-input.js index 56e9b1d047..7e99cd4705 100644 --- a/remix-solidity/src/compiler/compiler-input.js +++ b/remix-solidity/src/compiler/compiler-input.js @@ -7,7 +7,8 @@ module.exports = (sources, opts) => { settings: { optimizer: { enabled: opts.optimize === true || opts.optimize === 1, - runs: 200 + runs: 200, + details: {} }, libraries: opts.libraries, outputSelection: {