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-ir flag).
  • 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:

  • extraMetadata output: emits user-defined function metadata (name, entry tag, input/output sizes, AST IDs) used during LLVM lowering.
  • DUPX / SWAPX instructions: extends stack access beyond depth 16 to avoid classic "stack too deep" failures.
  • spillAreaSize setting: configures a memory spill region for values that cannot remain on stack.
  • Function pointer dispatch tables: uses static dispatch through FuncPtrTracker instead of dynamic jump-based dispatch.
  • Simplified try/catch in 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 solc optimization heuristics.
  • Final code size can differ from upstream due to LLVM pass behavior.

Unsupported Features

  • CALLCODE is rejected at compile time. Use DELEGATECALL instead.
  • SELFDESTRUCT is rejected at compile time (deprecated by EIP-6049).
  • PC (program counter) is not supported.
  • BLOBHASH and BLOBBASEFEE (EIP-4844/EIP-7516) are rejected at compile time.
  • Inline assembly marked memory-safe can cause errors when spill-area-based lowering is active.
  • Some solc optimizer 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.