[webkit-reviews] review denied: [Bug 104638] Support op_switch_imm bytecode on DFG. : [Attachment 178731] Proposed patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 11 01:24:31 PST 2012


Filip Pizlo <fpizlo at apple.com> has denied Roman Zhuykov <zhroma at ispras.ru>'s
request for review:
Bug 104638: Support op_switch_imm bytecode on DFG.
https://bugs.webkit.org/show_bug.cgi?id=104638

Attachment 178731: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=178731&action=review

------- Additional Comments from Filip Pizlo <fpizlo at apple.com>
I don't think this is the right approach.  For large switch statements, this
will perform worse.  I also fear that your way of creating multiple basic
blocks is fragile - I can't see any obvious bugs in it, but it's kind of a
dangerous approach that requires a mutable context to be held in place while
you repeatedly revisit the same bytecode.  A better way of handling Switch in
an optimizing compiler is to (a) have a Switch node in the DFG IR and (b)
perform transformations on the Switch later in compilation if you find that
it's a trivial one.  Writing a phase to handle (b) would give you the ability
to have a more straight-forward handling of basic block creation.  Using (a)
and allowing the Switch to sometimes survive into the backend (particularly
when it's a Switch with a lot of cases) would take care of pathologies for
large switch statements.


More information about the webkit-reviews mailing list