[Webkit-unassigned] [Bug 104638] Support op_switch_imm bytecode on DFG.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 11 01:30:20 PST 2012


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





--- Comment #4 from Filip Pizlo <fpizlo at apple.com>  2012-12-11 01:32:43 PST ---
(In reply to comment #0)
> Here I make an attempt to support op_switch on DFG level.
> 
> Is an approach of parsing jump table and expanding several comparisons possible?
> 
> DFG Bytecode parser were unable to support creating multiple dfg blocks for one bytecode operation.
> Here I mostly solve the problem by tricks, what is a proper way to allow such operations?

One other thought: it seems that you're generating a linear sequence of CompareStrictEq's.  If you really want to go with the CompareStrictEq approach to compiling a Switch, you should at least use a binary tree of blocks that contain comparisons, so that the amount of comparing you have to do is log(size of switch).

But I'm not sure that this would be any faster than a lookup table based Switch, in most of the cases where people actually use switch statements.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list