[Webkit-unassigned] [Bug 162995] New: [JSC] Add @throwTypeError bytecode intrinsic

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 5 22:04:29 PDT 2016


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

            Bug ID: 162995
           Summary: [JSC] Add @throwTypeError bytecode intrinsic
    Classification: Unclassified
           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: utatane.tea at gmail.com

In builtin JS, there are so many `throw @TypeError(".....");` things.
But it spreads so large byte code sequence, effectively enlarges the size of bytecodes, and prevent us from inlining!

[  15] resolve_scope     loc8, loc3, PrivateSymbol.TypeError(@id0), <GlobalVar>, 0, 0x110bdc0a0
[  22] get_from_scope    loc9, loc8, PrivateSymbol.TypeError(@id0), 2049<ThrowIfNotFound|GlobalVar|NotInitialization>, 238692432    predicting None
[  30] mov               loc12, loc9
[  33] mov               loc11, String (atomic) (identifier): Properties can only be defined on Objects., ID: 4(const0)
[  36] construct         loc9, loc9, 2, 18 (this at loc12) status(Could Take Slow Path)    predicting None
[  45] throw             loc9
[  47] ...

Oh, it bloats 32 intructions! We already have great solution. Let's emit op_throw_static_error instead (size is only 3).

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


More information about the webkit-unassigned mailing list