Some general high-level observations about this change:

1) This is a very specialized optimization targeting one specific instruction (i.e. rotation). I think a more general approach that performs general pattern matching might scale better and cover other peephole optimizations as well (e.g.
scaled array access, algebraic simplification or other strength reductions)

2) Is this a common pattern in JavaScript applications or is this tracked by any
benchmark? I would be interested to know what particular use case this
optimization targets.

3) Adding a token for something that has no equivalent in JavaScript seems
wrong. We only do this in rare cases where we need to push information about
variable initialization through the AST, but not for Crankshaft optimizations.

4) This change definitely needs better test coverage.

https://chromiumcodereview.appspot.com/10984057/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to