On Wed, 24 Jul 2024 07:58:31 GMT, ExE Boss <d...@openjdk.org> wrote: >> This transformation is called only after the `classModel` is transformed: >> - at line 472 and 380 when the `transformToBytes()` method is called is >> after effectively transforming the `classModel` inside the `Logic` class. > > There isn’t currently any API for converting a `ClassModel` directly to a > `byte[]` without calling a `ClassFile::transformClass(…)` method.
Repeated parsing (bytes -> model) and transforming back (model -> bytes) is an anti-pattern. Indify tool should operate as a single-pass transformation. Looping on a class model methods / instructions while replacing the class model itself (with something partially transformed) is not the right approach. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18841#discussion_r1689346557