WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
178210
WebAssembly: Wasm functions should have either JSFunctionType or TypeOfShouldCallGetCallData
https://bugs.webkit.org/show_bug.cgi?id=178210
Summary
WebAssembly: Wasm functions should have either JSFunctionType or TypeOfShould...
Yusuke Suzuki
Reported
2017-10-12 06:22:25 PDT
https://twitter.com/fchiba/status/918056577030021121
Attachments
Patch
(8.94 KB, patch)
2017-10-12 07:10 PDT
,
Yusuke Suzuki
saam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2017-10-12 07:10:43 PDT
Created
attachment 323524
[details]
Patch
JF Bastien
Comment 2
2017-10-12 08:32:41 PDT
Comment on
attachment 323524
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=323524&action=review
Nice!
> JSTests/wasm/js-api/web-assembly-function.js:22 > + assert.truthy(typeof instance.exports.foo === "function", "is_function bytecode should handle wasm function.");
We have assert.isFunction
> JSTests/wasm/js-api/web-assembly-function.js:24 > + assert.eq(value, "function", "the result of typeof should be 'function'");
Why twice?
Yusuke Suzuki
Comment 3
2017-10-12 19:09:38 PDT
Comment on
attachment 323524
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=323524&action=review
Thank you!
>> JSTests/wasm/js-api/web-assembly-function.js:22 >> + assert.truthy(typeof instance.exports.foo === "function", "is_function bytecode should handle wasm function."); > > We have assert.isFunction
I would like to keep this as is. This is because I would like to keep this `typeof xxx === 'function'` form. Currently, our bytecode compiler performs pattern matching onto the AST nodes and emit `is_function` specially if it finds `typeof xxx === "function"`.
>> JSTests/wasm/js-api/web-assembly-function.js:24 >> + assert.eq(value, "function", "the result of typeof should be 'function'"); > > Why twice?
This is because we would like to test `is_function` opcode and `typeof` opcode in bytecode compiler. Our JSC bytecode compiler emits `is_function` if `typeof XXX === "function"` case. The first `truthy` one tests this. And second this one tests `typeof` bytecode operation.
Yusuke Suzuki
Comment 4
2017-10-12 19:13:27 PDT
Committed
r223274
: <
https://trac.webkit.org/changeset/223274
>
Radar WebKit Bug Importer
Comment 5
2017-10-12 19:14:28 PDT
<
rdar://problem/34969307
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug