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

Issue 1509533003: Rewrite Object.prototype.toString in C++ (Closed)

Created:
5 years ago by adamk
Modified:
5 years ago
CC:
v8-reviews_googlegroups.com, Hannes Payer (out of office), ulan
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Rewrite Object.prototype.toString in C++ The main impetus is to improve performance when --harmony-tostring is enabled, thanks to using a generic property load instead of a megamorphic IC. This also reduces duplication, as the API function v8::Object::ObjectProtoToString can share the runtime implementation. The only functional change in this patch is to drop an accidental difference between the JS and API implementations: the arguments object should toString as "[object Arguments]". The JS side was corrected in https://code.google.com/p/v8/source/detail?r=3279, but the API version was missed in that patch. BUG=chromium:555127, v8:3502 LOG=n CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel Committed: https://crrev.com/ed698f3da11bb95fa2e40f2537562e27d178e24d Cr-Commit-Position: refs/heads/master@{#32777}

Patch Set 1 #

Patch Set 2 : Cleaned up #

Total comments: 2

Patch Set 3 : Handled review comments #

Total comments: 4

Patch Set 4 : verwaest comments #

Patch Set 5 : Rebase, add back experimental flag #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -97 lines) Patch
M src/api.cc View 1 2 3 4 1 chunk +7 lines, -57 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M src/builtins.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/builtins.cc View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M src/heap/heap.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M src/js/array.js View 1 2 3 4 2 chunks +1 line, -2 lines 0 comments Download
M src/js/messages.js View 1 2 3 4 2 chunks +1 line, -2 lines 0 comments Download
M src/js/prologue.js View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/js/v8natives.js View 1 2 3 4 5 chunks +1 line, -29 lines 0 comments Download
M src/objects.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M src/runtime/runtime-internal.cc View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download

Messages

Total messages: 38 (14 generated)
adamk
verwaest: the whole thing. In particular, not sure I put Runtime::ObjectProtoToString in the right place. ...
5 years ago (2015-12-08 01:16:38 UTC) #4
caitp (gmail)
On 2015/12/08 01:16:38, adamk wrote: > verwaest: the whole thing. In particular, not sure I ...
5 years ago (2015-12-08 01:23:01 UTC) #5
adamk
On 2015/12/08 01:23:01, caitp wrote: > On 2015/12/08 01:16:38, adamk wrote: > > verwaest: the ...
5 years ago (2015-12-08 01:28:54 UTC) #6
Benedikt Meurer
I like the approach. How about using the IncrementalStringBuilder? And I'm not a big fan ...
5 years ago (2015-12-08 05:26:21 UTC) #8
Michael Starzinger
On 2015/12/08 05:26:21, Benedikt Meurer wrote: > I like the approach. How about using the ...
5 years ago (2015-12-08 08:16:48 UTC) #9
Hannes Payer (out of office)
https://codereview.chromium.org/1509533003/diff/20001/src/heap/heap.h File src/heap/heap.h (right): https://codereview.chromium.org/1509533003/diff/20001/src/heap/heap.h#newcode325 src/heap/heap.h:325: V(null_to_string, "[object Null]") \ alphabetic order
5 years ago (2015-12-08 14:12:39 UTC) #10
adamk
Okay, handled comments: - Used IncrementalStringBuilder (thanks for the pointer, didn't know we had that). ...
5 years ago (2015-12-08 23:19:52 UTC) #11
Benedikt Meurer
On 2015/12/08 23:19:52, adamk wrote: > Okay, handled comments: > - Used IncrementalStringBuilder (thanks for ...
5 years ago (2015-12-09 04:40:25 UTC) #12
adamk
On 2015/12/09 04:40:25, Benedikt Meurer wrote: > On 2015/12/08 23:19:52, adamk wrote: > > Okay, ...
5 years ago (2015-12-09 20:21:16 UTC) #13
Michael Starzinger
On 2015/12/09 20:21:16, adamk wrote: > On 2015/12/09 04:40:25, Benedikt Meurer wrote: > > On ...
5 years ago (2015-12-09 20:30:11 UTC) #14
adamk
On 2015/12/09 20:30:11, Michael Starzinger wrote: > On 2015/12/09 20:21:16, adamk wrote: > > On ...
5 years ago (2015-12-09 20:38:41 UTC) #15
adamk
Ping? Would love to get this in to confirm that it gets the same perf ...
5 years ago (2015-12-10 17:29:04 UTC) #16
Hannes Payer (out of office)
heap LGTM
5 years ago (2015-12-10 18:33:01 UTC) #17
Michael Starzinger
Unsure whether I was meant as a reviewer for this, but LGTM on "runtime" FWIW. ...
5 years ago (2015-12-10 18:41:22 UTC) #18
adamk
On 2015/12/10 18:41:22, Michael Starzinger wrote: > Unsure whether I was meant as a reviewer ...
5 years ago (2015-12-10 19:24:40 UTC) #19
Toon Verwaest
Lgtm as well. I added a side effect free copy of this method to messages.js ...
5 years ago (2015-12-10 20:13:17 UTC) #20
adamk
https://codereview.chromium.org/1509533003/diff/40001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1509533003/diff/40001/src/objects.cc#newcode16104 src/objects.cc:16104: On 2015/12/10 20:13:17, Toon Verwaest wrote: > Class-name is ...
5 years ago (2015-12-10 23:25:29 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1509533003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1509533003/60001
5 years ago (2015-12-10 23:25:41 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: v8_android_arm_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_android_arm_compile_rel/builds/11038) v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, ...
5 years ago (2015-12-10 23:26:48 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1509533003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1509533003/80001
5 years ago (2015-12-11 01:08:16 UTC) #30
adamk
Marked blink test for rebaselining in https://codereview.chromium.org/1513143005
5 years ago (2015-12-11 02:20:16 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1509533003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1509533003/80001
5 years ago (2015-12-11 02:20:30 UTC) #34
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years ago (2015-12-11 04:26:39 UTC) #36
commit-bot: I haz the power
5 years ago (2015-12-11 04:26:49 UTC) #38
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ed698f3da11bb95fa2e40f2537562e27d178e24d
Cr-Commit-Position: refs/heads/master@{#32777}

Powered by Google App Engine
This is Rietveld 408576698