Module cfx_executor::stack

source ·
Expand description

Stack Management for Execution Engine: Conflux’s execution engine is stack-based. This module manages the stack operations, mainly handling the logic related to pushing and popping frames.

Re-exports§

Structs§

  • FrameLocal represents the local data associated with a specific call frame during the execution of the Ethereum Virtual Machine (EVM). This data is local to the frame and is not visible to other frames in the execution stack.
  • The result of executing a frame on a successful complete or an expected revert.
  • A frame has not yet been executed, with all the necessary information to initiate and carry out the execution of the frame.
  • The global resources and utilities shared across all frames.

Enums§

  • The possible outcomes of an Executable’s execution within a frame. It encapsulates either the final result of the frame’s execution or the parameters needed for invoking the next level frame.

Traits§

  • Executable is a trait representing an object that can be executed within a frame.
  • Resumable is a trait representing objects for resuming the execution of a frame, which is suspended due to the invocation of another frame. The caller frame is resumed when the callee frame returns.

Functions§

  • A helper function which extract substate from FrameResult if applicable and merges it to the parent function.
  • The function operates in a loop, starting with the execution of the main frame. Upon each frame’s invocation, the caller is pushed onto the call stack, and the callee is executed. After a frame completes execution, the function retrieves the result, pops a frame from the stack, and continues execution with the results from the callee. The loop continues until the call stack is empty, indicating that the main frame has finished executing.

Type Aliases§