RESOLVED INVALID 203084
Cleanup dead initializations in JSC code
https://bugs.webkit.org/show_bug.cgi?id=203084
Summary Cleanup dead initializations in JSC code
Paulo Matos
Reported 2019-10-17 08:50:03 PDT
Cleanup dead initializations in JSC code
Attachments
Patch (9.11 KB, patch)
2019-10-17 08:54 PDT, Paulo Matos
no flags
Patch (8.37 KB, patch)
2019-10-24 00:38 PDT, Paulo Matos
no flags
Patch (7.85 KB, patch)
2019-10-24 02:14 PDT, Paulo Matos
no flags
Patch (6.53 KB, patch)
2020-01-20 05:31 PST, Paulo Matos
darin: review+
Paulo Matos
Comment 1 2019-10-17 08:54:11 PDT
Saam Barati
Comment 2 2019-10-20 21:51:24 PDT
Comment on attachment 381193 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=381193&action=review > Source/JavaScriptCore/runtime/TypeSet.cpp:-306 > - hasAnItem = true; Even though this is dead, it’s kind of nice to keep it in in places like this so we don’t forget to do it if we add new cases in the future.
Paulo Matos
Comment 3 2019-10-24 00:38:57 PDT
Paulo Matos
Comment 4 2019-10-24 02:14:16 PDT
Paulo Matos
Comment 5 2020-01-20 05:31:29 PST
Darin Adler
Comment 6 2020-01-20 10:08:06 PST
Comment on attachment 388231 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388231&action=review > Source/JavaScriptCore/API/tests/TypedArrayCTest.cpp:194 > - typedArray = JSObjectMakeTypedArrayWithArrayBufferAndOffset(context, type, data, 1, length-1, &exception); > + JSObjectMakeTypedArrayWithArrayBufferAndOffset(context, type, data, 1, length-1, &exception); This change does not yet seem quite right to me. Why change this call to JSObjectMakeTypedArrayWithArrayBufferAndOffset and not the next call just below after the if statement, which also sets a value of typedArray that is never looked at?
Darin Adler
Comment 7 2020-01-20 10:09:02 PST
Comment on attachment 388231 [details] Patch Also: A number of these are a bit unsafe if we add any new code. The stores are only dead because there is no further code using the results after this point; not sure they are all improvements.
Paulo Matos
Comment 8 2020-01-30 00:47:39 PST
(In reply to Darin Adler from comment #7) > Comment on attachment 388231 [details] > Patch > > Also: A number of these are a bit unsafe if we add any new code. The stores > are only dead because there is no further code using the results after this > point; not sure they are all improvements. Thanks for the comments - I will close this for now.
Mark Lam
Comment 9 2020-01-30 11:11:36 PST
(In reply to Paulo Matos from comment #8) > (In reply to Darin Adler from comment #7) > > Comment on attachment 388231 [details] > > Patch > > > > Also: A number of these are a bit unsafe if we add any new code. The stores > > are only dead because there is no further code using the results after this > > point; not sure they are all improvements. > > Thanks for the comments - I will close this for now. FYI, if you want to silence the warning, you can always add a UNUSED_PARAM(value).
Note You need to log in before you can comment on or make changes to this bug.