• 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
..
debug-promises Loading commit data...
regress Loading commit data...
arguments-iterator.js Loading commit data...
array-iterator.js Loading commit data...
array-tostring.js Loading commit data...
block-conflicts.js Loading commit data...
block-const-assign.js Loading commit data...
block-early-errors.js Loading commit data...
block-for.js Loading commit data...
block-leave.js Loading commit data...
block-let-crankshaft.js Loading commit data...
block-let-declaration.js Loading commit data...
block-let-semantics.js Loading commit data...
block-non-strict-errors.js Loading commit data...
block-scoping-top-level.js Loading commit data...
block-scoping.js Loading commit data...
built-in-accessor-names.js Loading commit data...
collection-iterator.js Loading commit data...
collections.js Loading commit data...
debug-blockscopes.js Loading commit data...
debug-evaluate-blockscopes.js Loading commit data...
debug-function-scopes.js Loading commit data...
debug-stepin-collections-foreach.js Loading commit data...
debug-stepin-generators.js Loading commit data...
debug-stepin-microtasks.js Loading commit data...
debug-stepin-promises.js Loading commit data...
debug-stepnext-for.js Loading commit data...
empty-for.js Loading commit data...
function-length-configurable.js Loading commit data...
function-name-configurable.js Loading commit data...
function-prototype-name.js Loading commit data...
generators-debug-liveedit.js Loading commit data...
generators-debug-scopes.js Loading commit data...
generators-iteration.js Loading commit data...
generators-mirror.js Loading commit data...
generators-objects.js Loading commit data...
generators-parsing.js Loading commit data...
generators-poisoned-properties.js Loading commit data...
generators-relocation.js Loading commit data...
generators-runtime.js Loading commit data...
generators-states.js Loading commit data...
indexed-integer-exotics.js Loading commit data...
iteration-semantics.js Loading commit data...
iteration-syntax.js Loading commit data...
iterator-prototype.js Loading commit data...
json.js Loading commit data...
map-minus-zero.js Loading commit data...
math-cbrt.js Loading commit data...
math-clz32.js Loading commit data...
math-expm1.js Loading commit data...
math-fround.js Loading commit data...
math-hyperbolic.js Loading commit data...
math-hypot.js Loading commit data...
math-log1p.js Loading commit data...
math-log2-log10.js Loading commit data...
math-sign.js Loading commit data...
math-trunc.js Loading commit data...
math.js Loading commit data...
microtask-delivery.js Loading commit data...
mirror-collections.js Loading commit data...
mirror-iterators.js Loading commit data...
mirror-promises.js Loading commit data...
mirror-symbols.js Loading commit data...
numeric-literals.js Loading commit data...
object-tostring.js Loading commit data...
promises.js Loading commit data...
prototype-ordinary-objects.js Loading commit data...
set-minus-zero.js Loading commit data...
string-codepointat.js Loading commit data...
string-endswith.js Loading commit data...
string-fromcodepoint.js Loading commit data...
string-html.js Loading commit data...
string-includes.js Loading commit data...
string-iterator.js Loading commit data...
string-raw.js Loading commit data...
string-repeat.js Loading commit data...
string-startswith.js Loading commit data...
symbols.js Loading commit data...
templates.js Loading commit data...
throw-type-error-function-restrictions.js Loading commit data...
typed-array-iterator.js Loading commit data...
unscopables.js Loading commit data...