[Webkit-unassigned] [Bug 177372] New: Consider a throwExceptionIf bytecode.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 22 11:35:44 PDT 2017


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

            Bug ID: 177372
           Summary: Consider a throwExceptionIf bytecode.
           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: keith_miller at apple.com

There are several places in BytecodeGenerator.cpp where we emit roughly the following bytecodes:

Ref<Label> typeIsObject = newLabel();
emitJumpIfTrue(emitIsObject(newTemporary(), dst), typeIsObject.get());
emitThrowTypeError(ASCIILiteral("Expected Object"));
emitLabel(typeIsObject.get());

This will get split into a basic block in the DFG, which might slow down compile times or prevent some optimizations.

I'm not exactly sure on the semantics we want. Do we want to do toBoolean on the condition or do we want to assume it's a boolean already? We should also figure out if we want to allow this bytecode to throw different types of exceptions. I think we really only throw type errors however.

-- 
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/20170922/fca6fc60/attachment.html>


More information about the webkit-unassigned mailing list