You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add __codesize(RUNTIME): resolves at compile time to the byte length of the runtime section
(MAIN body + appended runtime tables). Usable in both MAIN and CONSTRUCTOR (directly or via a
derived #define constant). The self-referential MAIN-side case converges via iterative MAIN
codegen, bounded by EIP-170 (at most PUSH2). Enables Solidity-style immutables that the
runtime reads at compile-time literal offsets, with no runtime codesize arithmetic. Not
allowed inside code tables (would create a circular sizing dependency). RUNTIME is reserved
as a macro name.
hnc --bin-runtime (-r) now errors when the contract's CONSTRUCTOR returns its own bytecode,
instead of silently emitting MAIN, which would not match the deployed runtime. Constructors
that only initialize state (no RETURN) are unaffected.