Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Issue 11631002: Extend API to allow setting length property for function templates. (Closed)

Created:
8 years ago by rossberg
Modified:
8 years ago
Reviewers:
Yang
CC:
v8-dev
Visibility:
Public.

Description

Extend API to allow setting length property for function templates. R=yangguo@chromium.org BUG=125308 Committed: http://code.google.com/p/v8/source/detail?r=13240

Patch Set 1 #

Total comments: 2

Patch Set 2 : Support length as argument to FunctionTempalte::New #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -4 lines) Patch
M include/v8.h View 1 3 chunks +5 lines, -2 lines 0 comments Download
M src/api.cc View 1 3 chunks +10 lines, -1 line 0 comments Download
M src/factory.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M src/objects.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/objects-inl.h View 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
rossberg
8 years ago (2012-12-18 13:18:14 UTC) #1
Yang
LGTM with one suggestion. https://codereview.chromium.org/11631002/diff/1/src/api.cc File src/api.cc (right): https://codereview.chromium.org/11631002/diff/1/src/api.cc#newcode1073 src/api.cc:1073: obj->set_length(0); We have this Signature ...
8 years ago (2012-12-19 09:14:45 UTC) #2
rossberg
https://codereview.chromium.org/11631002/diff/1/src/api.cc File src/api.cc (right): https://codereview.chromium.org/11631002/diff/1/src/api.cc#newcode1073 src/api.cc:1073: obj->set_length(0); On 2012/12/19 09:14:45, Yang wrote: > We have ...
8 years ago (2012-12-19 10:21:50 UTC) #3
Yang
8 years ago (2012-12-19 10:26:04 UTC) #4
On 2012/12/19 10:21:50, rossberg wrote:
> https://codereview.chromium.org/11631002/diff/1/src/api.cc
> File src/api.cc (right):
> 
> https://codereview.chromium.org/11631002/diff/1/src/api.cc#newcode1073
> src/api.cc:1073: obj->set_length(0);
> On 2012/12/19 09:14:45, Yang wrote:
> > We have this Signature object (third argument in this New-method) where we
can
> > specify the number of arguments. In our repo the Signature object is only
used
> > in test-api.cc, but maybe it makes sense to set the length to the argc
(length
> > of the arg-FixedArray) in Signature?
> 
> Interesting idea. But as discussed offline, it's probably preferable to keep
> internal type checking (which is what Signature supports) and the rather
> arbitrary value of the 'length' property separate concerns.
> 
> I added length as an additional optional argument to the New constructor,
> though.

LGTM.

Powered by Google App Engine
This is Rietveld 408576698