solidity icon indicating copy to clipboard operation
solidity copied to clipboard

Support Yul objects in yulopti

Open cameel opened this issue 2 years ago • 6 comments

Abstract

yulopti is a simple tool for executing optimizer step sequences step by step.

Currently it only supports raw Yul input (example: medium.yul). It would be convenient if it supported Yul objects as well (example: subObjectAccess.yul).

Motivation

The compiler never produces raw Yul as output. When invoked with --ir or --ir-optimized, the Yul code is always wrapped in an object. The object part needs to be stripped for it to be usable with yulopti.

Specification

  • Use ObjectParser for parsing Yul objects (see how it was done in yul-phaser: #8513).
  • yulopti should optimize all objects present in the file, including nested ones.
  • (optional) add a command-line flag for selecting a specific object via a dotted path (e.g. --object x.y.z)

Backwards Compatibility

This is an internal tool. We don't guarantee backwards-compatibility.

cameel avatar Mar 24 '22 21:03 cameel

@cameel I'd like to try my hand at implementing this. Could I be assigned to it?

Also, are there any tests at the moment for this particular tool? Should any tests be added?

dflupu avatar Apr 15 '22 15:04 dflupu

This issue has been marked as stale due to inactivity for the last 90 days. It will be automatically closed in 7 days.

github-actions[bot] avatar Mar 25 '23 12:03 github-actions[bot]

Hi everyone! This issue has been automatically closed due to inactivity. If you think this issue is still relevant in the latest Solidity version and you have something to contribute, feel free to reopen. However, unless the issue is a concrete proposal that can be implemented, we recommend starting a language discussion on the forum instead.

github-actions[bot] avatar Apr 02 '23 12:04 github-actions[bot]

We have a pending PR for this. It should not be closed, unless we also want to close the PR.

cameel avatar Apr 03 '23 15:04 cameel

What does a pending (and stale) PR change about the fact that the issue is stale?

ekpyron avatar Apr 05 '23 12:04 ekpyron

I mean, it does not make sense to close the issue alone. As long as we have that pending PR the issue should be open. If you want to close it, you should close both.

cameel avatar Apr 05 '23 13:04 cameel