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

Introduce IR for execution #12

Open
fengb opened this issue Sep 18, 2020 · 0 comments
Open

Introduce IR for execution #12

fengb opened this issue Sep 18, 2020 · 0 comments

Comments

@fengb
Copy link
Owner

fengb commented Sep 18, 2020

There's some direct instructions that require branches inside the body:

fn @"0x10 call"(id: usize) !void {
    const func = self.instance.funcs[func_id];
    switch (func.kind) {
        .imported => {},
        .implemented => {},
    }
}

This branch is actually known at module processing time, but currently there's no way of differentiating since the execution engine maps directly to the bytecode.

We should insert a custom IR so we can optimize the instructions before execution.

@fengb fengb changed the title Split opcode execution Introduce IR for execution Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant