Disable lazy selector registration check for OLDABI non-compat - #420
Disable lazy selector registration check for OLDABI non-compat#420HendrikHuebner wants to merge 1 commit into
Conversation
|
Do we actually need the is-registered check with the v2 ABI? I think we now guarantee that all selectors are registered in I think WebAssembly can just not expose the v1 entry point and skip the is-resolved checks. We can probably disable them entirely in any build configuration where we're not building v1 ABI support and stick in a |
|
Alright, I #ifdef'd the check to always return true when the old ABI is not enabled. I'll create a separate PR to update the build system to support a |
a779787 to
0ff16de
Compare
|
@davidchisnall please don't merge this yet - I think |
|
@davidchisnall The current #ifdef OLDABI version is wrong. |
0ff16de to
522fc25
Compare
|
@davidchisnall I reverted it to the original patch. Can you restart the CI checks please? |
WebAssembly's linear memory does not guarantee that static/heap alocated selector strings are greater than a certain numeric value. Therefore, we can't reliably assume that
sel->index < selector_list->size()means the selector is registered already. The pointer value might be smaller than the size of the selector_list.This patch uses
tsl::robin_mapfor WebAssembly instead. Perhaps this could be optimized in the future by extending the selector unionobjc_selectoron WASM to have an additional entry to mark it as registered? I think this would also require a compiler change however, so this seems like the easiest option for now.