mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-04 00:54:36 +00:00
Fix Wasm dummy function
This commit is contained in:
parent
e57ca0aa12
commit
24cef94fb5
1 changed files with 1 additions and 2 deletions
|
@ -682,8 +682,7 @@ macro_rules! round_up_to_alignment {
|
|||
|
||||
/// Bytes for a dummy function with just a single `unreachable` instruction.
|
||||
/// Used in dead code elimination to replace unused functions.
|
||||
const DUMMY_FUNCTION: [u8; 4] = [
|
||||
3, // inner byte length
|
||||
const DUMMY_FUNCTION: [u8; 3] = [
|
||||
0, // number of local variable declarations
|
||||
OpCode::UNREACHABLE as u8, // panic if we were wrong to eliminate!
|
||||
OpCode::END as u8, // end of function (required for validation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue