WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
198077
[WHLSL] Struct fields named "length" get wrong codegen
https://bugs.webkit.org/show_bug.cgi?id=198077
Summary
[WHLSL] Struct fields named "length" get wrong codegen
Myles C. Maxfield
Reported
2019-05-21 11:31:17 PDT
Inside WHLSLNativeFunctionWriter.cpp, we special case "operator.length" which is wrong for automatically generated getters for user-authored fields named "length" inside structs.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-05-21 15:13:54 PDT
<
rdar://problem/51002694
>
Myles C. Maxfield
Comment 2
2019-05-22 22:13:53 PDT
Consider the following: struct Foo { int length; } synthesizeStructureAccessors() will create a getter for that field (just like it would create a getter for any other field) and this new getter will be named "operator.length". It will be a NativeFunctionDeclaration because it's being generated by synthesizeStructureAccessors(). Then, this code will recognize the name, and erroneously treat it as if it was .length on an array reference.
Myles C. Maxfield
Comment 3
2020-05-05 00:42:27 PDT
WHLSL is no longer relevant.
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