-
Notifications
You must be signed in to change notification settings - Fork 4
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
structured ctrl #101
base: main
Are you sure you want to change the base?
structured ctrl #101
Conversation
Signed-off-by: wucke13 <[email protected]> Signed-off-by: Florian Hartung <[email protected]>
Signed-off-by: wucke13 <[email protected]> Signed-off-by: Florian Hartung <[email protected]>
Signed-off-by: Florian Hartung <[email protected]>
903fced
to
f68c38d
Compare
Signed-off-by: Cem Onem <[email protected]>
…ypes only Signed-off-by: Cem Onem <[email protected]>
Signed-off-by: Cem Onem <[email protected]>
Signed-off-by: Cem Onem <[email protected]>
Signed-off-by: Cem Onem <[email protected]>
Signed-off-by: Cem Onem <[email protected]>
…lue stack for select instr Signed-off-by: Cem Onem <[email protected]>
Signed-off-by: Cem Onem <[email protected]>
Signed-off-by: Cem Onem <[email protected]>
Signed-off-by: Cem Onem <[email protected]>
Signed-off-by: Cem Onem <[email protected]>
dff4ddf
to
032a136
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My review is not yet done, I still have to check the validation stack changes
// TODO there is definitely a better to write this | ||
let current_func_span = store | ||
.funcs | ||
.get(stack.current_stackframe().func_idx) | ||
.unwrap_validated() | ||
.code_expr; | ||
if wasm.pc != current_func_span.from() + current_func_span.len() { | ||
continue; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we continue and we don't break?
// TODO there is definitely a better to write this | |
let current_func_span = store | |
.funcs | |
.get(stack.current_stackframe().func_idx) | |
.unwrap_validated() | |
.code_expr; | |
if wasm.pc != current_func_span.from() + current_func_span.len() { | |
continue; | |
} | |
let current_func_span = store | |
.funcs | |
.get(stack.current_stackframe().func_idx) | |
.unwrap_validated() | |
.code_expr; | |
if wasm.pc != current_func_span.from() + current_func_span.len() { | |
continue; | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is not the very last END instr, END does not do anything, so we read the next instr (wasm.pc < last_end_idx). The dodgy case here is when the pc is erroneously after the very last END (wasm.pc > last_end_idx). I let it continue here, but we could also give an error or trap saying "instruction pointer is out of bounds"
Signed-off-by: Cem Onem <[email protected]>
Signed-off-by: Cem Onem <[email protected]>
e04a5da
to
c87fdb8
Compare
Signed-off-by: Cem Onem <[email protected]>
c87fdb8
to
e35beae
Compare
Signed-off-by: Cem Onem <[email protected]>
7a39a5a
to
db296f6
Compare
Signed-off-by: Cem Onem <[email protected]>
Signed-off-by: Cem Onem <[email protected]>
Pull Request Overview
TODO
This pull request still needs...
Formatting
cargo fmt
cargo check
cargo build
cargo doc
nix fmt