[Webkit-unassigned] [Bug 183857] New: Use CodeBlock::instructions()[] and CodeBlock::bytecodeOffset() instead of doing own pointer math.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 21 10:05:43 PDT 2018


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

            Bug ID: 183857
           Summary: Use CodeBlock::instructions()[] and
                    CodeBlock::bytecodeOffset() instead of doing own
                    pointer math.
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mark.lam at apple.com

We should avoid doing pointer math with CodeBlock::instructions().begin().  Instead, we should use the operator[] that comes with CodeBlock::instructions() for computing an Instruction*, and use CodeBlock::bytecodeOffset() for computing the bytecode offset of a given Instruction*.  These methods will do assertions which helps catch bugs sooner, plus they are more descriptive of the operation we're trying to do.

-- 
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/20180321/d7140a30/attachment.html>


More information about the webkit-unassigned mailing list