Add ABI frame lowering layers#1947
Open
Th0rgal wants to merge 3 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 918faad. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Compiler.ABI.Frametyped ABI frame layouts for nested structs, dynamic bytes/arrays, and calldata/memory/code/storage sourcesCompiler.Lowering.StackSafeAbiframe-spilled lowering for events, external calls, and dynamic returns so large payloads are materialized in memory and passed as pointersCompiler.Modules.CodeDatatyped CREATE2/SSTORE2 code-as-data read/write facade with explicit trust surface and roundtrip shape testsCompiler.Proofs.GeneratedTransitionminimal reads/writes/guards/events extraction for later Midnight RCF/totalUnits wiringVerification
lake build Compiler.ABI.FrameTest Compiler.Lowering.StackSafeAbiTest Compiler.Modules.CodeDataTest Compiler.Proofs.GeneratedTransitionTestlake build Compiler.Moduleslake build CompilerNote
Medium Risk
New compiler lowering paths affect how ABI payloads reach EVM
call/log1/returnand CREATE2 deploy buffers; mistakes could change encoding or stack behavior, though changes are isolated behind new modules and not yet wired into the main pipeline per this diff.Overview
Introduces typed ABI frame layouts and stack-safe lowering so large or dynamic Solidity-style payloads become memory-resident
(ptr, size)pairs instead of long Yul argument lists.Compiler.ABI.FramedefinesFrameField/FrameLayout, chooses inline words vs pointer mode (dynamic types or head size above a 4-word threshold), and emits Yul to spill from calldata, memory, code, or storage into an allocated frame buffer.Compiler.Lowering.StackSafeAbiwraps that forlog1events,call, andreturn, with#eval!tests for both pointer and small inline payloads.Compiler.Modules.CodeDataadds a typed CREATE2/SSTORE2 write/read facade that materializes aFrameLayoutthen delegates to existingCreate2SSTORE2ECM modules, plus an explicit trust surface list.Compiler.Proofs.GeneratedTransitionadds a staticTransitionSummaryextractor (reads, writes, guards, events) overCompilationModelStmt/Expr, intended for later Midnight RCF /totalUnitswiring.Compiler.Modulesnow re-exportsCreate2SSTORE2andCodeData; the modules README documentsCodeData.lean.Reviewed by Cursor Bugbot for commit 0df4e11. Bugbot is set up for automated code reviews on this repo. Configure here.