Skip to content

Refactor call instruction implementation #160

@chfast

Description

@chfast

The abstract goal is to de-duplicate the logic of call instructions. Currently, almost all calls (except CALL and CALLCODE) are implemented independently - it was done to get good code coverage in unit tests.

This can be achieved in two ways:

  1. By using a template by evmc_call_kind. This might be faster (less checks in runtime, code for legacy opcodes like CALLCODE stay cold) but result in larger code size (bad for wasm?).
  2. By having single runtime procedure for all calls. See Drop the call kind runtime argument #159 (comment).

There can be also a variant that selects 1 or 2 at build time - by using [[gcc::always_inline]] in variant 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions