mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-23 00:18:01 +00:00
solc-json-interface: support for YUL optimizer details (#361)
- Add support for the YUL optimizer details in the standard json input definition. - Make optimizer settings optional. They can be omitted and solc will pick default values ([see here for reference](https://docs.soliditylang.org/en/latest/using-the-compiler.html#input-description)). For example allows to use the [`yul-phaser`](https://github.com/ethereum/solidity/blob/0917604a5ec7cff8bd40a1137f4fcb303fb90527/tools/yulPhaser/README.md?plain=1) utility. I did a single search with slightly adjusted costs (just made some educated guess) and after an hour or so this already found an optimizer sequence (`OESsShMxeoufcSTvlFxtelTfnfEvicdFxnsvopgCaIeLcnvsTtUrUgdVTUttaeUomccTTTuujsVVvVDvvueUrTjUOmjrrhuuTtj`) which shrinks the size of the `EndpointV2.sol` from LayerZero by 10%. --------- Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com> Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -74,9 +74,9 @@ impl Settings {
|
||||
}
|
||||
|
||||
/// Sets the necessary defaults.
|
||||
pub fn normalize(&mut self, version: &semver::Version) {
|
||||
pub fn normalize(&mut self) {
|
||||
self.polkavm = None;
|
||||
self.optimizer.normalize(version);
|
||||
self.optimizer.normalize();
|
||||
}
|
||||
|
||||
/// Parses the library list and returns their double hashmap with path and name as keys.
|
||||
|
||||
Reference in New Issue
Block a user