RFR: 8337225: Demote maxStack and maxLocals from CodeModel to CodeAttribute [v3]

Chen Liang liach at openjdk.org
Mon Jul 29 02:22:11 UTC 2024


> As discussed in offline meeting, the max stack and locals information are part of the code attribute and not meaningful for buffered code elements. Computation would be costly and these see no real usage during transformations. Thus, the proposed solution is to move these APIs to be CodeAttribute specific, as this is already how all these APIs' users are using.
> 
> Also removed useless `Writable` on buffered models, and fixed `BufferedMethodBuilder::code` implementation.

Chen Liang has updated the pull request incrementally with one additional commit since the last revision:

  Fix typo, and add tests

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/20338/files
  - new: https://git.openjdk.org/jdk/pull/20338/files/6b93ad70..e1575ab7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=20338&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20338&range=01-02

  Stats: 115 lines in 2 files changed: 100 ins; 11 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/20338.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20338/head:pull/20338

PR: https://git.openjdk.org/jdk/pull/20338


More information about the core-libs-dev mailing list