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

Issue 475423003: Implement Function.prototype.toMethod. (Closed)

Created:
6 years, 4 months ago by Dmitry Lomov (no reviews)
Modified:
6 years, 4 months ago
CC:
Paweł Hajdan Jr., v8-dev
Project:
v8
Visibility:
Public.

Description

Implement Function.prototype.toMethod. R=arv@chromium.org, verwaest@chromium.org BUG=v8:3330 LOG=N Committed: https://code.google.com/p/v8/source/detail?r=23274

Patch Set 1 #

Total comments: 1

Patch Set 2 : Missing file added #

Total comments: 17

Patch Set 3 : CR feedback #

Patch Set 4 : Name for the last test #

Total comments: 8

Patch Set 5 : JSFunction::Copy #

Patch Set 6 : Remove stray change #

Total comments: 8

Patch Set 7 : Simpler and latest-spec-conformant toMethod #

Patch Set 8 : Add extensibility change test + rename tests #

Patch Set 9 : Remove stray change #

Total comments: 6

Patch Set 10 : CR feedback #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+371 lines, -164 lines) Patch
M BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M include/v8.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A src/harmony-classes.js View 1 2 1 chunk +32 lines, -0 lines 0 comments Download
M src/heap/heap.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/messages.js View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 1 chunk +24 lines, -0 lines 1 comment Download
M src/runtime.h View 1 2 3 4 5 6 7 8 9 1 chunk +163 lines, -159 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 5 6 7 8 9 1 chunk +19 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/toMethod.js View 1 2 3 4 5 6 7 1 chunk +115 lines, -0 lines 0 comments Download
A + test/mjsunit/runtime-gen/homeobjectsymbol.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A + test/mjsunit/runtime-gen/tomethod.js View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M tools/generate-runtime-tests.py View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M tools/gyp/v8.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Dmitry Lomov (no reviews)
PTAL. The spec for toMethod requires the result to be extensible, that will be a ...
6 years, 4 months ago (2014-08-15 21:58:21 UTC) #1
arv (Not doing code reviews)
https://codereview.chromium.org/475423003/diff/1/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/475423003/diff/1/src/runtime.cc#newcode2070 src/runtime.cc:2070: return isolate->heap()->home_object_symbol(); Why do you need this? https://codereview.chromium.org/475423003/diff/20001/src/harmony-classes.js File ...
6 years, 4 months ago (2014-08-15 22:28:48 UTC) #2
Dmitry Lomov (no reviews)
Thanks for review, addressed comments https://codereview.chromium.org/475423003/diff/20001/src/harmony-classes.js File src/harmony-classes.js (right): https://codereview.chromium.org/475423003/diff/20001/src/harmony-classes.js#newcode15 src/harmony-classes.js:15: [%ToString(this), typeof this]); On ...
6 years, 4 months ago (2014-08-15 22:56:57 UTC) #3
arv (Not doing code reviews)
https://codereview.chromium.org/475423003/diff/20001/test/mjsunit/harmony/toMethod.js File test/mjsunit/harmony/toMethod.js (right): https://codereview.chromium.org/475423003/diff/20001/test/mjsunit/harmony/toMethod.js#newcode80 test/mjsunit/harmony/toMethod.js:80: assertEquals(o, fMeth[%HomeObjectSymbol()]); On 2014/08/15 22:56:57, Dmitry Lomov (chromium) wrote: ...
6 years, 4 months ago (2014-08-15 23:02:41 UTC) #4
Dmitry Lomov (no reviews)
On 2014/08/15 23:02:41, arv wrote: > https://codereview.chromium.org/475423003/diff/20001/test/mjsunit/harmony/toMethod.js > File test/mjsunit/harmony/toMethod.js (right): > > https://codereview.chromium.org/475423003/diff/20001/test/mjsunit/harmony/toMethod.js#newcode80 > ...
6 years, 4 months ago (2014-08-15 23:07:45 UTC) #5
Toon Verwaest
https://codereview.chromium.org/475423003/diff/60001/src/heap/heap.cc File src/heap/heap.cc (right): https://codereview.chromium.org/475423003/diff/60001/src/heap/heap.cc#newcode3758 src/heap/heap.cc:3758: if (source->IsJSFunction()) { Are you sure this works? What ...
6 years, 4 months ago (2014-08-18 14:15:35 UTC) #6
Dmitry Lomov (no reviews)
Toon, thanks for taking a look, working on a better patch. https://codereview.chromium.org/475423003/diff/60001/src/heap/heap.cc File src/heap/heap.cc (right): ...
6 years, 4 months ago (2014-08-19 13:47:42 UTC) #7
Dmitry Lomov (no reviews)
An implementation of JSFunction::Copy + more tests. https://codereview.chromium.org/475423003/diff/60001/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/475423003/diff/60001/src/runtime.cc#newcode2063 src/runtime.cc:2063: Object::SetProperty(clone, home_object_symbol, ...
6 years, 4 months ago (2014-08-19 20:02:48 UTC) #8
Toon Verwaest
Added comments for the code, still need to look through the tests. What about function ...
6 years, 4 months ago (2014-08-20 07:43:11 UTC) #9
Dmitry Lomov (no reviews)
Thanks Toon! On 2014/08/20 07:43:11, Toon Verwaest wrote: > Added comments for the code, still ...
6 years, 4 months ago (2014-08-20 10:13:43 UTC) #10
Dmitry Lomov (no reviews)
On 2014/08/20 10:13:43, Dmitry Lomov (chromium) wrote: > AFAIU Heap::CopyJSObject has the same bug, i.e. ...
6 years, 4 months ago (2014-08-20 10:42:19 UTC) #11
arv (Not doing code reviews)
https://codereview.chromium.org/475423003/diff/100001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/475423003/diff/100001/src/objects.cc#newcode9412 src/objects.cc:9412: clone->set_properties( For F.p.toMethod we should not copy the properties. ...
6 years, 4 months ago (2014-08-20 15:35:54 UTC) #12
Dmitry Lomov (no reviews)
On 2014/08/20 15:35:54, arv wrote: > https://codereview.chromium.org/475423003/diff/100001/src/objects.cc > File src/objects.cc (right): > > https://codereview.chromium.org/475423003/diff/100001/src/objects.cc#newcode9412 > ...
6 years, 4 months ago (2014-08-20 16:54:33 UTC) #13
Dmitry Lomov (no reviews)
Thanks to arv@ it all got much simpler. PTAL.
6 years, 4 months ago (2014-08-20 18:03:20 UTC) #14
arv (Not doing code reviews)
LGTM
6 years, 4 months ago (2014-08-20 18:13:07 UTC) #15
Dmitry Lomov (no reviews)
On 2014/08/20 18:13:07, arv wrote: > LGTM Thanks for review! Toon, could you take a ...
6 years, 4 months ago (2014-08-20 18:16:27 UTC) #16
Dmitry Lomov (no reviews)
Added a test for extensibility change + renamed tests
6 years, 4 months ago (2014-08-20 18:52:29 UTC) #17
Toon Verwaest
https://codereview.chromium.org/475423003/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/475423003/diff/160001/src/objects.cc#newcode9302 src/objects.cc:9302: Handle<JSFunction> JSFunction::Copy(Handle<JSFunction> function) { This method doesn't exactly copy ...
6 years, 4 months ago (2014-08-21 09:02:20 UTC) #18
Dmitry Lomov (no reviews)
Comments addressed PTAL https://codereview.chromium.org/475423003/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/475423003/diff/160001/src/objects.cc#newcode9302 src/objects.cc:9302: Handle<JSFunction> JSFunction::Copy(Handle<JSFunction> function) { On 2014/08/21 ...
6 years, 4 months ago (2014-08-21 11:09:12 UTC) #19
Toon Verwaest
lgtm with nit https://codereview.chromium.org/475423003/diff/180001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/475423003/diff/180001/src/objects.cc#newcode9315 src/objects.cc:9315: // prototype, which means that SetPrototype ...
6 years, 4 months ago (2014-08-21 11:32:28 UTC) #20
Dmitry Lomov (no reviews)
6 years, 4 months ago (2014-08-21 12:39:48 UTC) #21
Message was sent while issue was closed.
Committed patchset #10 manually as 23274 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698