Ben Visness

Results 88 comments of Ben Visness

Chrome, Firefox, and Safari all seem to throw RangeError, so I guess the best course of action would just be to add a line explicitly stating this in the JS...

FYI, we ended up reverting this in https://github.com/WebAssembly/memory64/pull/86 because the special [conversion rules](https://webidl.spec.whatwg.org/#js-bigint) for a union of numeric type and bigint would, through [ToNumeric](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tonumeric)/[ToNumber](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tonumber), force all string and boolean values...

> growing table fails, INCORRECT (growing returns -1 by default); The `table.grow` [wasm instruction](https://webassembly.github.io/memory64/core/exec/instructions.html#xref-syntax-instructions-syntax-instr-table-mathsf-table-grow-x) returns -1 on failure, but the `Table.grow()` [JS method](https://webassembly.github.io/memory64/js-api/#grow-the-memory-buffer) throws RangeError on failure. So I think...

If you would like more info about `memory.discard`, check out the [discussion issue](https://github.com/WebAssembly/memory-control/issues/6) and the [linked document](https://docs.google.com/document/d/131BCKkMSdKCeU51XJ52mIy5O4i60CIGMopSh8aWNQG8/edit?tab=t.0) describing the SpiderMonkey prototype. The [wasm-tools](https://github.com/bytecodealliance/wasm-tools/) text parser also supports `memory.discard` with the...

Another idea for addressing this issue (which I prefer) is the [static memory protection](https://github.com/WebAssembly/memory-control/blob/main/proposals/memory-control/static-protection.md) sub-proposal within [memory control](https://github.com/WebAssembly/memory-control).

> A simple implementation of WebAssembly could emit a compare against the page protections and jump. What page protections are you referring to? I could imagine this being related to...

Wow, this is amazing! I certainly never expected anyone to just contribute to an _article_ on their own :smile: I really like the setup here and the idea of stealing...

Thanks for opening this up. This occupies a possibly-interesting point in the design space - yes, it pessimizes every load and store, but indeed in much the same way that...

For now I'm going to proceed with JS numbers instead of BigInts, but I think we will need to carefully consider this question before phase 4. Tables are really less...

We still have concerns about this issue, and it seems to me that there are three options: 1. Accept only numbers 2. Accept only BigInts 3. Accept both numbers and...