Limitations and Differences from Upstream solc
This chapter summarizes where solx differs from upstream solc, and which limitations currently apply.
Compilation Modes
solx supports two codegen pipelines:
- Yul pipeline: enabled with
--via-ir(matching solc's--via-irflag). - Legacy EVM assembly pipeline: the default code generation path.
The --evmla and --ethir debug flags are only available in the legacy (non-via-ir) pipeline.
solc Fork Modifications
The solx-solidity fork includes the following changes relative to upstream solc:
extraMetadataoutput: emits user-defined function metadata (name, entry tag, input/output sizes, AST IDs) used during LLVM lowering.DUPX/SWAPXinstructions: extends stack access beyond depth 16 to avoid classic "stack too deep" failures.spillAreaSizesetting: configures a memory spill region for values that cannot remain on stack.- Function pointer dispatch tables: uses static dispatch through
FuncPtrTrackerinstead of dynamic jump-based dispatch. - Simplified
try/catchin legacy mode: reduces control-flow complexity for translator compatibility. - Bypassed EVM bytecode generation: solx does not use solc's EVM bytecode output; final bytecode is produced by the LLVM backend.
- Disabled optimizer: the solc optimizer is turned off to preserve function boundaries and metadata validity. All optimization is handled by the LLVM backend.
Behavioral Differences
- Generated bytecode can differ from upstream solc output because final code generation happens in LLVM.
- Optimization levels map to LLVM optimization pipelines, not upstream
solcoptimization heuristics. - Final code size can differ from upstream due to LLVM pass behavior.
Unsupported Features
CALLCODEis rejected at compile time. UseDELEGATECALLinstead.SELFDESTRUCTis rejected at compile time (deprecated by EIP-6049).PC(program counter) is not supported.BLOBHASHandBLOBBASEFEE(EIP-4844/EIP-7516) are rejected at compile time.- Inline assembly marked
memory-safecan cause errors when spill-area-based lowering is active. - Some
solcoptimizer settings are ignored since the solc optimizer is disabled.
Version Support
- The solx-solidity fork tracks upstream solc releases.
- The minimum supported Solidity version matches the forked solc version.