Classes: Add support for arguments in default constructor
authorarv@chromium.org <arv@chromium.org>
Tue, 11 Nov 2014 15:54:33 +0000 (15:54 +0000)
committerarv@chromium.org <arv@chromium.org>
Tue, 11 Nov 2014 15:55:30 +0000 (15:55 +0000)
commit3a91adaec82205de84ca9264351b3cb93a881d53
tree7e37c72499e512e84833c555cbb015b3aa929122
parent5044c510cb6773bcd518da6add2588cb973d8724
Classes: Add support for arguments in default constructor

This is currently done by generating a default constructor that looks
like this:

  constructor() {
    %DefaultConstructorSuperCall();
  }

The a runtime function implements the logic which is pretty similar to
Runtime_Apply except that it uses the [[Prototype]] of the current
function.

BUG=v8:3672
LOG=Y
R=dslomov@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25268}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/parser.cc
src/runtime/runtime-classes.cc
src/runtime/runtime-object.cc
src/runtime/runtime.h
test/mjsunit/harmony/classes.js