Reviewers: Dmitry Lomov (chromium), adamk,

Message:
Dmitry, I know you said you wanted this to get inlined. Maybe it is still
something I should pursue but after looking into it, it seems like writing
full-codegen for all of this would require significant work. We do not even have
inlined version of Apply (which is simpler than this one).


https://codereview.chromium.org/692333011/diff/1/src/runtime/runtime-classes.cc
File src/runtime/runtime-classes.cc (right):

https://codereview.chromium.org/692333011/diff/1/src/runtime/runtime-classes.cc#newcode477
src/runtime/runtime-classes.cc:477: // If there are too many arguments,
allocate argv via malloc.
This part is taken from Runtime_Apply. I don't see how this can be
refactored to reduce code duplication?

Description:
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
[email protected]

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

Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+98, -11 lines):
  M src/parser.cc
  M src/runtime/runtime.h
  M src/runtime/runtime-classes.cc
  M src/runtime/runtime-object.cc
  M test/mjsunit/harmony/classes.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