Reviewers: arv, rossberg,

Message:
PTAL before platform ports.

The idea is: subclass constructors (the ones that have 'extends') have an extra
argument (which is new.target). This is reflected in the count of formal
arguments as reported by SharedFunctionInfo, so argument adaptor frames etc. are
set correctly.

The only way those functions can be gainfully invoked is via their 'construct' stub, and their special construct stub sets up arguemnts correctly. If you call them via [[Call]] the arguments will be bound all wrong, but it does not matter
since [[Call]] throws.

Ideas for more tests or what can go wrong welcome

Description:
new classes: implement new.target passing to superclass constructor.

[email protected],[email protected]
BUG=v8:3834
LOG=N

Please review this at https://codereview.chromium.org/908883002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+274, -87 lines):
  M src/ast-value-factory.h
  M src/code-stubs.h
  M src/compiler.cc
  M src/compiler/pipeline.cc
  M src/globals.h
  M src/hydrogen.cc
  M src/ia32/builtins-ia32.cc
  M src/ia32/code-stubs-ia32.cc
  M src/ia32/full-codegen-ia32.cc
  M src/runtime/runtime-object.cc
  M src/scopes.h
  M src/scopes.cc
  M src/variables.h
  M test/mjsunit/harmony/classes-experimental.js


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to