Repository navigation
Fix rot13 test on big-endian platforms - #2386
Conversation
| #else | ||
| std::copy(string_data.begin(), string_data.begin() + size, | ||
| memory->UnsafeData() + ptr); | ||
| #endif |
There was a problem hiding this comment.
It it worth extracting a named function here?
There was a problem hiding this comment.
it's the only test that needs this (*currently) so probably not yet?
There was a problem hiding this comment.
What I mean is that this logic seems to be duplicated with lines 535 to 542 below. Would a "CopyUserMemory" helper function make sense?
There was a problem hiding this comment.
not in this context, these are slightly different operations (copy to memory vs copy from memory) and we can't think of a good way to abstract over both of them.
the APIs between host and wasm are rather lacking in pretty much every standalone wasm engine we've tried. allegedly interface types were supposed to help with this but uh... wabt doesn't really have those yet. (and probably won't for a while...)
Head branch was pushed to by a user without write access
|
@sbc100 sorry, try again, it needed to be rebased |
arguably more like "implement big-endian support in rot13 test" rather than a "fix" but anyway.