-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify representation of host references and functions (#25)
* Eliminates RefData structs and its subtypes, avoid storing any extra data. * Implement all reflection methods directly. * Store host info via weak map. * Store host function data as host data. * Use foreign pointer instead of object template with internal slot for function data. * Link back from isolate to store. * Add Val::is_num and Val::is_ref short-hands. * Fix a couple of memory leaks in threads example and simplify it; add to Makefile.
- Loading branch information
Showing
11 changed files
with
314 additions
and
359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <iostream> | ||
|
||
#include "wasm.hh" | ||
|
||
int main(int argc, const char* argv[]) { | ||
// TODO | ||
std::cout << "Done." << std::endl; | ||
return 0; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
(module | ||
(func $hello (import "" "hello") (param i32)) | ||
(func $message (import "" "hello") (param i32)) | ||
(global $id (import "" "id") i32) | ||
(func (export "run") (call $hello (get_global $id))) | ||
(func (export "run") (call $message (get_global $id))) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.