[strong] Allow mutually recursive classes.
authormarja <marja@chromium.org>
Thu, 16 Apr 2015 14:13:03 +0000 (07:13 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 16 Apr 2015 14:12:52 +0000 (14:12 +0000)
commit2dc0f2ec01f521a3fea8d8e18dd99c87118b36df
treecc71cf1fadf8651e1f69d871a5a75a2934029e04
parenta2baf44bf6e913e308ff5dad70c777004bb037cb
[strong] Allow mutually recursive classes.

The previous restrictions were overshooting (didn't allow a class to refer to a
later class under any circumstances); after this CL we're undershooting (allow
referring to any class from inside a method).

Implementing the correct checks (allow referring only if the class declarations
are in a consecutive block and if there's no dependency cycle) will be
implemented as a follow up.

BUG=v8:3956
LOG=N

Review URL: https://codereview.chromium.org/1087543004

Cr-Commit-Position: refs/heads/master@{#27888}
src/ast.h
src/parser.cc
src/scopes.cc
src/variables.h
test/mjsunit/strong/declaration-after-use.js
test/mjsunit/strong/mutually-recursive-classes.js [new file with mode: 0644]