wasm2c: Implement EHv4#2513
Conversation
|
@sbc100 (this might still have some nits? can't remember. something about updating comments?) |
|
@sbc100 should be good now |
|
hello @shravanrn @keithw @sbc100 can anyone take a look at this? |
| defined(WASM_RT_TABLE_OPS_EXNREF) > \ | ||
| 1 | ||
| #error \ | ||
| "Expected only one of { WASM_RT_TABLE_OPS_FUNCREF, WASM_RT_TABLE_OPS_EXTERNREF } to be defined" |
There was a problem hiding this comment.
This error should now include WASM_RT_TABLE_OPS_EXNREF?
| /** | ||
| * The maximum size of an exception. | ||
| */ | ||
| #define WASM_EXN_MAX_SIZE 256 |
There was a problem hiding this comment.
In practice I think this will normally just be a 4-byte pointer. So maybe 32 is enough for now?
There was a problem hiding this comment.
256 is what we use today, so we just used that. we would prefer not to break compatibility with existing wasm2c exception handling users (assuming we have some).
| } | ||
|
|
||
| // static | ||
| constexpr bool CWriter::HasNonNullInitializers(Type type) { |
There was a problem hiding this comment.
Since this is always using in the negative how about inverting it? i.e. "NullOnlyInitializers"?
Continuation of #2470 / #2512