Rename WASM classes dropping the WASM prefix
Created attachment 287652 [details] Patch
Attachment 287652 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/wasm/WASMFormat.h:63: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 14 files If any of these errors are false positives, please file a bug against check-webkit-style.
(In reply to comment #2) > Attachment 287652 [details] did not pass style-queue: > > > ERROR: Source/JavaScriptCore/wasm/WASMFormat.h:63: Tests for true/false, > null/non-null, and zero/non-zero should all be done without equality > comparisons. [readability/comparison_to_zero] [5] > Total errors found: 1 in 14 files > > > If any of these errors are false positives, please file a bug against > check-webkit-style. While this is technically a violation of WebKit style I think its are warranted in this case. The case is surrounded by other checks that the result of similar expressions are equal to non-zero values. Using ! instead just makes the code harder to read.
Comment on attachment 287652 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287652&action=review r=me if you resolve the question about the Signature vector in WASMModuleParser.h. > Source/JavaScriptCore/ChangeLog:11 > + primitive type makes it much trivial to convert a Vector of WASM /much/more/ or /much/much more/ > Source/JavaScriptCore/wasm/WASMModuleParser.h:61 > + Vector<FunctionInformation> m_functions; > + Vector<Signature> m_signatures; FunctionInformation embeds a Signature. Why do we need this separate Signature Vector? I also don't see it used anywhere.
Please fix the build failures too.
Comment on attachment 287652 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287652&action=review Fixed the build failure locally. >> Source/JavaScriptCore/wasm/WASMModuleParser.h:61 >> + Vector<Signature> m_signatures; > > FunctionInformation embeds a Signature. Why do we need this separate Signature Vector? I also don't see it used anywhere. m_signatures owns the signatures used by FunctionInformation. It's likely that many functions all have the same signature so rather than duplicate that everywhere we just have each function point to a shared signature. You're right that it's not used in this patch. I'll delete them.
Comment on attachment 287652 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287652&action=review >>> Source/JavaScriptCore/wasm/WASMModuleParser.h:61 >>> + Vector<Signature> m_signatures; >> >> FunctionInformation embeds a Signature. Why do we need this separate Signature Vector? I also don't see it used anywhere. > > m_signatures owns the signatures used by FunctionInformation. It's likely that many functions all have the same signature so rather than duplicate that everywhere we just have each function point to a shared signature. You're right that it's not used in this patch. I'll delete them. Ah. I missed the detail that the signature in FunctionInformation is a Signature* and not the Signature itself.
Committed r205309: <http://trac.webkit.org/changeset/205309>