• dslomov's avatar
    [destructuring] Grand for statement parsing unification. · 7ffdb519
    dslomov authored
    Also support patterns in ``for (var p in/of ...)``
    
    This CL extends the rewriting we used to do for ``for (let p in/of...)`` to
    ``for (var p in/of ...)``. For all for..in/of loop declaring variable,
    we rewrite
       for (var/let/const pattern in/of e) b
    into
       for (x' in/of e) { var/let/const pattern = e; b }
    
    This adds a small complication for debugger: for a statement
       for (var v in/of e) ...
    we used to have
       var v;
       for (v in/of e) ...
    and there was a separate breakpoint on ``var v`` line.
    This breakpoint is actually useless since it is immediately followed by
    a breakpoint on evaluation of ``e``, so this CL removes that breakpoint
    location.
    
    Similiraly, for let, it used to be that
      for (let v in/of e) ...
    became
      for (x' in/of e) { let v; v  = x'; ... }
    ``let v``generetaed a useless breakpoint (with the location at the
    loop's head. This CL removes that breakpoint as well.
    
    R=arv@chromium.org,rossberg@chromium.org
    BUG=v8:811
    LOG=N
    
    Review URL: https://codereview.chromium.org/1149043005
    
    Cr-Commit-Position: refs/heads/master@{#28565}
    7ffdb519
Name
Last commit
Last update
..
regress Loading commit data...
array-concat.js Loading commit data...
array-copywithin.js Loading commit data...
array-fill.js Loading commit data...
array-find.js Loading commit data...
array-findindex.js Loading commit data...
array-from.js Loading commit data...
array-includes-to-object-sloppy.js Loading commit data...
array-includes-to-object-strict.js Loading commit data...
array-includes.js Loading commit data...
array-of.js Loading commit data...
arrow-functions-lexical-arguments.js Loading commit data...
arrow-functions-this.js Loading commit data...
arrow-functions.js Loading commit data...
block-lazy-compile.js Loading commit data...
class-computed-property-names-super.js Loading commit data...
class-property-name-eval-arguments.js Loading commit data...
classes-derived-return-type.js Loading commit data...
classes-experimental.js Loading commit data...
classes-lazy-parsing.js Loading commit data...
classes-maps.js Loading commit data...
classes-subclass-arrays.js Loading commit data...
classes.js Loading commit data...
computed-property-names-classes.js Loading commit data...
computed-property-names-object-literals-methods.js Loading commit data...
computed-property-names-super.js Loading commit data...
computed-property-names.js Loading commit data...
dataview-accessors.js Loading commit data...
debug-step-into-class-extends.js Loading commit data...
debug-step-into-constructor.js Loading commit data...
destructuring.js Loading commit data...
method-name-eval-arguments.js Loading commit data...
module-linking.js Loading commit data...
module-parsing-eval.js Loading commit data...
module-recompile.js Loading commit data...
module-resolution.js Loading commit data...
modules.js Loading commit data...
object-assign.js Loading commit data...
object-literals-method.js Loading commit data...
object-literals-property-shorthand.js Loading commit data...
object-literals-super.js Loading commit data...
private.js Loading commit data...
proxies-example-membrane.js Loading commit data...
proxies-for.js Loading commit data...
proxies-function.js Loading commit data...
proxies-hash.js Loading commit data...
proxies-json.js Loading commit data...
proxies-symbols.js Loading commit data...
proxies-with-unscopables.js Loading commit data...
proxies-with.js Loading commit data...
proxies.js Loading commit data...
reflect-apply.js Loading commit data...
reflect-construct.js Loading commit data...
regexp-flags.js Loading commit data...
regexp-sticky.js Loading commit data...
rest-params-lazy-parsing.js Loading commit data...
rest-params.js Loading commit data...
set-prototype-of.js Loading commit data...
spread-array.js Loading commit data...
spread-call-new-class.js Loading commit data...
spread-call-new.js Loading commit data...
spread-call-super-property.js Loading commit data...
spread-call.js Loading commit data...
super.js Loading commit data...
toMethod.js Loading commit data...
typedarray-copywithin.js Loading commit data...
typedarray-fill.js Loading commit data...
typedarray-find.js Loading commit data...
typedarray-findindex.js Loading commit data...
typedarray-from.js Loading commit data...
typedarray-indexing.js Loading commit data...
typedarray-iteration.js Loading commit data...
typedarray-proto.js Loading commit data...
typedarray-reverse.js Loading commit data...
typedarray-sort.js Loading commit data...
typedarrays-every.js Loading commit data...
typedarrays-foreach.js Loading commit data...
typedarrays-of.js Loading commit data...
typedarrays.js Loading commit data...
unicode-escapes-in-regexps.js Loading commit data...
unicode-escapes.js Loading commit data...