Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to define functions using "untyped callbacks" #207

Merged
merged 10 commits into from
Jan 24, 2023

Commits on Jan 24, 2023

  1. Allow to specify functions using untyped callbacks, which allows to s…

    …pecify a callback of any type without the need to use a specific delegate type.
    
    The untyped callback will receive arguments and can set results as a span of ValueBox.
    
    For example, this allows to define trapping functions for a module's import without having to know the function time at compile-time, similar to Wasmtime's define_unknown_imports_as_traps.
    kpreisser committed Jan 24, 2023
    Configuration menu
    Copy the full SHA
    7e73223 View commit details
    Browse the repository at this point in the history
  2. Follow-Up: Initialize the result ValueBoxes with their expected Value…

    …Kind but a default value, as otherwise they all would be initialized with ValueKind.Int32.
    kpreisser committed Jan 24, 2023
    Configuration menu
    Copy the full SHA
    0b988e8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b5d7851 View commit details
    Browse the repository at this point in the history
  4. Fix wording.

    kpreisser committed Jan 24, 2023
    Configuration menu
    Copy the full SHA
    0a675de View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dd72a4f View commit details
    Browse the repository at this point in the history
  6. Fix code style.

    Co-authored-by: Peter Huene <peter@huene.dev>
    kpreisser and peterhuene authored Jan 24, 2023
    Configuration menu
    Copy the full SHA
    a8d9445 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    407585d View commit details
    Browse the repository at this point in the history
  8. Apply the changes from bytecodealliance#202 also for the two remainin…

    …g overloads of Linker.DefineFunction, to reduce allocations for the strings.
    kpreisser committed Jan 24, 2023
    Configuration menu
    Copy the full SHA
    c65dbef View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b83d2a2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9fbb0b4 View commit details
    Browse the repository at this point in the history