super is only allowed in methods, accessors and constructor
authorarv <arv@chromium.org>
Tue, 10 Feb 2015 19:51:18 +0000 (11:51 -0800)
committerCommit bot <commit-bot@chromium.org>
Tue, 10 Feb 2015 19:51:39 +0000 (19:51 +0000)
commit9acfd4fe0825afb9284327327ed7edc185994e02
tree250302b98bcac396ea0bd99526c4f9fdd23070cb
parent5cd84502bf1aadd42b3ccc90746f8bd79402d3b3
super is only allowed in methods, accessors and constructor

super() is only allowed in a class constructor.
super.p is allowed in methods, accessors and constructors.

The parser now checks the FunctionState to see what kind of function
we are currently inside.

BUG=v8:3330
LOG=N
R=dslomov@chromium.org, marja@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26557}
src/preparser.h
test/cctest/test-parsing.cc
test/mjsunit/harmony/classes.js
test/mjsunit/harmony/object-literals-super.js
test/mjsunit/harmony/super.js
test/mjsunit/mjsunit.status