Skip to content

Conversation

@k-nasa
Copy link
Owner

@k-nasa k-nasa commented Jul 31, 2024

Related to #7

Implement br_table instruction in the WebAssembly runtime.

  • src/runtime/mod.rs

    • Implement the Instruction::BrTable variant in the execute function.
    • Add the br_table function to handle the Instruction::BrTable variant.
    • Update the Instruction::I64GeU case to call self.ge::<i64>() instead of self.ge_u::<i64>().
  • tests/testsuite.rs

    • Uncomment the tests that depend on br_table:
      • wasm_test!(br, "./testsuite/br.wast");
      • wasm_test!(call, "./testsuite/call.wast");
      • wasm_test!(select, "./testsuite/select.wast");
      • wasm_test!(_if, "./testsuite/if.wast");
      • wasm_test!(block, "./testsuite/block.wast");

For more details, open the Copilot Workspace session.

Related to #7

Implement `br_table` instruction in the WebAssembly runtime.

* **src/runtime/mod.rs**
  - Implement the `Instruction::BrTable` variant in the `execute` function.
  - Add the `br_table` function to handle the `Instruction::BrTable` variant.
  - Update the `Instruction::I64GeU` case to call `self.ge::<i64>()` instead of `self.ge_u::<i64>()`.

* **tests/testsuite.rs**
  - Uncomment the tests that depend on `br_table`:
    - `wasm_test!(br, "./testsuite/br.wast");`
    - `wasm_test!(call, "./testsuite/call.wast");`
    - `wasm_test!(select, "./testsuite/select.wast");`
    - `wasm_test!(_if, "./testsuite/if.wast");`
    - `wasm_test!(block, "./testsuite/block.wast");`

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/k-nasa/wai/issues/7?shareId=XXXX-XXXX-XXXX-XXXX).
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

Successfully merging this pull request may close these issues.

2 participants