Commit graph

8 commits

Author SHA1 Message Date
Max Brunsfeld
7a9b3076ef Handle memory errors occurring in wasm scanners
* In WASM, use a custom, simple malloc implementation that lets us
  expicitly reset the heap with a new start location.
* When a WASM call traps or errors, propagate that as a parse failure.
* Reset the WASM heap after every parse.

Co-authored-by: Conrad <conrad@zed.dev>
2024-03-17 10:19:42 -07:00
Max Brunsfeld
63f34236e3 Add iswxdigit to wasm stdlib 2024-02-05 10:20:27 -08:00
Max Brunsfeld
f383b02741 Add iswblank wasm stdlib function 2024-02-02 12:04:49 -08:00
Max Brunsfeld
68ba9a4d66 Grow memory dynamically as-needed when loading wasm language modules 2023-12-03 12:12:47 -08:00
Max Brunsfeld
b26eff13e2 Remove code duplication in wasm module instantiation, add stdlib symbols 2023-10-31 15:58:56 -07:00
Max Brunsfeld
0743edd162 Include two more std::string functions in wasm stdlib 2023-10-27 21:54:23 +01:00
Max Brunsfeld
6d34e5cb5c Refactor storage of wasm stdlib function indices 2023-01-23 15:19:42 -08:00
Max Brunsfeld
98ccfcffb0 Provide minimal C/C++ std library to wasm external scanners 2022-11-15 17:14:33 -08:00