[Webkit-unassigned] [Bug 188598] [JSC] Remove gcc warnings on mips and armv7

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 14 10:13:19 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=188598

Mark Lam <mark.lam at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #349756|review?                     |review-
              Flags|                            |

--- Comment #19 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 349756
  --> https://bugs.webkit.org/attachment.cgi?id=349756
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=349756&action=review

> Source/JavaScriptCore/assembler/MacroAssemblerPrinter.cpp:140
> +        // assuming memory is not malformed, it originately pointed to a value

/originately/originally/

> Source/JavaScriptCore/interpreter/Interpreter.cpp:814
> +        IGNORE_CAST_ALIGN_WARNINGS_BEGIN
>          EXCEPTION_ASSERT(throwScope.exception() == reinterpret_cast<Exception*>(error));
> +        IGNORE_CAST_ALIGN_WARNINGS_END

Instead of doing this, can you just change prepareForExecution() to return a std::optional<Exception*>?  That should make the code cleaner and better document what will actually be returned.  That also removes the need for all these reinterpret_casts.  I think the JSObject* return value is a holdover from ancient times.

> Source/bmalloc/bmalloc/IsoPageInlines.h:197
> +        // the cast below is safe on these platforms as long as
> +        // both Config::objectSize and the alignment of this are multiples of
> +        // the required alignment of FreeCell
> +        static_assert(!(Config::objectSize % alignof(FreeCell)), "Config::objectSize should respect alignment of FreeCell");
> +        static_assert(!(alignof(IsoPage<Config>) % alignof(FreeCell)), "Alignment of IsoPage<Config> should match that of FreeCell");

Shouldn't these be always true?  I think we can get rid of the #if CPU(ARM) || CPU(MIPS) here and below.  You can also remove the comment.  The assertions are sufficient to document the invariant / requirement.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180914/f45bd1cc/attachment-0001.html>


More information about the webkit-unassigned mailing list