Tech/EIPs/#7912
EIP 7912카테고리 · 코어유형 · 표준 트랙상태 · 정체

Pragmatic stack manipulation tools

EIP-7912는 EVM 스택 조작을 위한 실용적인 도구 모음(DUPN, SWAPN 등)을 추가하는 Core EIP를 제안했으나 현재 Stagnant 상태입니다. 복잡한 스택 연산을 단순화하여 컴파일러 출력 코드를 개선하는 것이 목적이었습니다.

Proposed Opcodes

EIP-7912 proposed generalized DUPN and SWAPN opcodes that accept an immediate operand specifying how deep in the stack to reach. Current DUP1-DUP16 and SWAP1-SWAP16 are limited to the top 16 stack items.

Motivation

Compilers targeting the EVM frequently emit inefficient code to work around the 16-item stack depth limitation. Flexible stack manipulation would allow compilers to generate more optimal bytecode.

Why It Stalled

EOF already includes a mechanism for flexible stack access via SWAPN and DUPN in its own opcode namespace. Since EOF is progressing, a standalone proposal for legacy EVM was seen as redundant, leading to Stagnant status.

Historical Context

Stack depth limitations have long been a pain point for Solidity developers encountering the "stack too deep" compiler error. EIP-7912 addressed the EVM layer; EIP-663 and EOF address overlapping concerns.

공식 EIP 문서open_in_new