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

Issue 1722003: Added ability to remove prototype from function. In this case, [[Construct]] ... (Closed)

Created:
10 years, 8 months ago by dgozman
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Added ability to remove prototype from function. In this case, [[Construct]] from function will not be allowed. Added runtime function %FunctionRemovePrototype for this. Removed prototypes from all builtin functions. Some sputnik tests marked as fixed. Added test to check builtins behavior. Committed: http://code.google.com/p/v8/source/detail?r=4536

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 17

Patch Set 4 : Fixes according to Erik's comments #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -97 lines) Patch
M src/bootstrapper.cc View 1 2 3 8 chunks +62 lines, -22 lines 2 comments Download
M src/contexts.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/factory.h View 3 chunks +8 lines, -0 lines 0 comments Download
M src/factory.cc View 2 chunks +28 lines, -0 lines 0 comments Download
M src/handles.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/ic.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M src/objects.h View 1 2 3 3 chunks +12 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 chunks +9 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 2 chunks +18 lines, -0 lines 0 comments Download
M src/runtime.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 2 3 3 chunks +23 lines, -0 lines 0 comments Download
M src/v8natives.js View 1 chunk +1 line, -0 lines 0 comments Download
A test/mjsunit/function-without-prototype.js View 1 chunk +54 lines, -0 lines 2 comments Download
M test/sputnik/sputnik.status View 1 chunk +0 lines, -73 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
dgozman
10 years, 8 months ago (2010-04-21 13:07:49 UTC) #1
antonm
Drive by question http://codereview.chromium.org/1722003/diff/1/4 File src/objects.cc (right): http://codereview.chromium.org/1722003/diff/1/4#newcode4935 src/objects.cc:4935: Object* JSFunction::RemovePrototype() { is it fine ...
10 years, 8 months ago (2010-04-21 13:51:12 UTC) #2
dgozman
http://codereview.chromium.org/1722003/diff/1/4 File src/objects.cc (right): http://codereview.chromium.org/1722003/diff/1/4#newcode4935 src/objects.cc:4935: Object* JSFunction::RemovePrototype() { On 2010/04/21 13:51:12, antonm wrote: > ...
10 years, 8 months ago (2010-04-21 14:04:52 UTC) #3
Mads Ager (chromium)
Looks like a good start. I think we need to do more to the new ...
10 years, 8 months ago (2010-04-22 08:36:00 UTC) #4
antonm
Sorry, forgot to hit publish all my drafts yesterday. But with Mads' response it's now ...
10 years, 8 months ago (2010-04-22 14:50:58 UTC) #5
dgozman
10 years, 8 months ago (2010-04-26 12:00:13 UTC) #6
antonm
Mostly minor comments, let's hear what Erik and Mads say. http://codereview.chromium.org/1722003/diff/23001/24013 File src/ic.cc (right): http://codereview.chromium.org/1722003/diff/23001/24013#newcode619 ...
10 years, 8 months ago (2010-04-26 16:32:43 UTC) #7
dgozman
http://codereview.chromium.org/1722003/diff/23001/24013 File src/ic.cc (right): http://codereview.chromium.org/1722003/diff/23001/24013#newcode619 src/ic.cc:619: JSFunction::cast(*object)->should_have_prototype()) { On 2010/04/26 16:32:43, antonm wrote: > why ...
10 years, 8 months ago (2010-04-26 16:47:46 UTC) #8
antonm
http://codereview.chromium.org/1722003/diff/23001/24013 File src/ic.cc (right): http://codereview.chromium.org/1722003/diff/23001/24013#newcode619 src/ic.cc:619: JSFunction::cast(*object)->should_have_prototype()) { On 2010/04/26 16:47:46, dgozman wrote: > On ...
10 years, 8 months ago (2010-04-26 17:09:14 UTC) #9
Erik Corry
http://codereview.chromium.org/1722003/diff/23001/24004 File src/bootstrapper.cc (right): http://codereview.chromium.org/1722003/diff/23001/24004#newcode252 src/bootstrapper.cc:252: bool add_prototype_property, Boolean arguments are very hard to read ...
10 years, 8 months ago (2010-04-27 13:02:12 UTC) #10
dgozman
http://codereview.chromium.org/1722003/diff/23001/24004 File src/bootstrapper.cc (right): http://codereview.chromium.org/1722003/diff/23001/24004#newcode252 src/bootstrapper.cc:252: bool add_prototype_property, On 2010/04/27 13:02:12, Erik Corry wrote: > ...
10 years, 8 months ago (2010-04-27 13:41:47 UTC) #11
Mads Ager (chromium)
LGTM http://codereview.chromium.org/1722003/diff/38001/39004 File src/bootstrapper.cc (right): http://codereview.chromium.org/1722003/diff/38001/39004#newcode478 src/bootstrapper.cc:478: // Allocate a distinct prototype for this function ...
10 years, 8 months ago (2010-04-28 10:40:04 UTC) #12
dgozman
10 years, 8 months ago (2010-04-28 11:16:59 UTC) #13
http://codereview.chromium.org/1722003/diff/38001/39004
File src/bootstrapper.cc (right):

http://codereview.chromium.org/1722003/diff/38001/39004#newcode478
src/bootstrapper.cc:478: // Allocate a distinct prototype for this function map,
so it will not add
On 2010/04/28 10:40:04, Mads Ager wrote:
> Make the comment a bit more explicit? How about:
> 
> this function map -> the function map for functions without prototypes?

Done.

http://codereview.chromium.org/1722003/diff/38001/39009
File test/mjsunit/function-without-prototype.js (right):

http://codereview.chromium.org/1722003/diff/38001/39009#newcode1
test/mjsunit/function-without-prototype.js:1: // Copyright 2008 the V8 project
authors. All rights reserved.
On 2010/04/28 10:40:04, Mads Ager wrote:
> 2010

Done.

Powered by Google App Engine
This is Rietveld 408576698