mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Meta: Enable all wasm extensions when building test suite
...and let LibWasm do the validation instead of removing the test when a module is invalid. Also, one of the tests has an integer literal starting with zero, so account for this to make it not fail :^)
This commit is contained in:
parent
8b50009e9b
commit
ab55abb0f8
Notes:
sideshowbarker
2024-07-17 20:33:50 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/ab55abb0f8 Pull-request: https://github.com/SerenityOS/serenity/pull/12998 Reviewed-by: https://github.com/IdanHo Reviewed-by: https://github.com/davidot ✅
1 changed files with 5 additions and 1 deletions
|
@ -274,6 +274,10 @@ def genarg(spec):
|
||||||
return str(struct.unpack('>q', struct.pack('>Q', int(x, 16)))[0]) + 'n'
|
return str(struct.unpack('>q', struct.pack('>Q', int(x, 16)))[0]) + 'n'
|
||||||
if spec['type'] == 'i64':
|
if spec['type'] == 'i64':
|
||||||
# Make a bigint instead, since `double' cannot fit all i64 values.
|
# Make a bigint instead, since `double' cannot fit all i64 values.
|
||||||
|
if x.startswith('0'):
|
||||||
|
x = x.lstrip('0')
|
||||||
|
if x == '':
|
||||||
|
x = '0'
|
||||||
return x + 'n'
|
return x + 'n'
|
||||||
return x
|
return x
|
||||||
|
|
||||||
|
@ -434,7 +438,7 @@ def compile_wasm_source(mod, outpath):
|
||||||
with NamedTemporaryFile("w+") as temp:
|
with NamedTemporaryFile("w+") as temp:
|
||||||
temp.write(mod[1])
|
temp.write(mod[1])
|
||||||
temp.flush()
|
temp.flush()
|
||||||
rc = call(["wat2wasm", temp.name, "-o", outpath])
|
rc = call(["wat2wasm", "--enable-all", "--no-check", temp.name, "-o", outpath])
|
||||||
return rc == 0
|
return rc == 0
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue