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

Issue 1542963002: [runtime] Introduce dedicated JSBoundFunction to represent bound functions. (Closed)

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

Description

[runtime] Introduce dedicated JSBoundFunction to represent bound functions. According to the ES2015 specification, bound functions are exotic objects, and thus don't need to be implemented as JSFunctions. So we introduce a new JSBoundFunction type to represent bound functions and make them optimizable. This already improves the performance of calling or constructing bound functions by 10-100x depending on the use case because we avoid the crazy dance between JavaScript and C++ that was implemented in v8natives.js previously. There's still room for improvement in the performance of actually creating bound functions, which is also relevant in practice, but we already have a plan how to accomplish that later. The mips/mips64 ports were contributed by akos.palfi@imgtec.com. CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel BUG=chromium:535408, chromium:571299, v8:4629 LOG=n Committed: https://crrev.com/ca8623eaa468cba65a5adafcdfb4615966f43ce2 Cr-Commit-Position: refs/heads/master@{#33042} Committed: https://crrev.com/97def8070cbb979419c041c3732d5e11779f79da Cr-Commit-Position: refs/heads/master@{#33044}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fixes and ia32 port. #

Patch Set 3 : arm port. #

Total comments: 6

Patch Set 4 : Fixes and arm64 port. #

Patch Set 5 : Update test262.status file. #

Patch Set 6 : Ahem #

Patch Set 7 : Refactor Intel. Merge MIPS ports. #

Patch Set 8 : Refactor arm and arm64 ports. #

Patch Set 9 : Partial revert of fix for ToString; layout tests not happy. #

Patch Set 10 : Some random debug updates #

Patch Set 11 : JSReceiver::GetCreationContext for bound functions. #

Patch Set 12 : Test case for CreationContext; and fix the implementation #

Patch Set 13 : ToFunctionName sanitization. #

Patch Set 14 : Add creation context to heap snapshot generator. #

Patch Set 15 : [arm64] Poke does not preserve flags with --debug-code. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1679 lines, -895 lines) Patch
M src/accessors.cc View 1 chunk +0 lines, -6 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +15 lines, -17 lines 0 comments Download
M src/api-natives.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/arm/builtins-arm.cc View 1 2 3 4 5 6 7 4 chunks +137 lines, -0 lines 0 comments Download
M src/arm/code-stubs-arm.cc View 1 2 3 4 5 6 1 chunk +0 lines, -10 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
M src/arm64/builtins-arm64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +143 lines, -0 lines 0 comments Download
M src/arm64/code-stubs-arm64.cc View 1 2 3 4 5 6 1 chunk +0 lines, -11 lines 0 comments Download
M src/arm64/macro-assembler-arm64.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M src/arm64/macro-assembler-arm64.cc View 1 2 3 4 5 6 1 chunk +13 lines, -0 lines 0 comments Download
M src/bailout-reason.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +56 lines, -53 lines 0 comments Download
M src/builtins.h View 4 chunks +7 lines, -0 lines 0 comments Download
M src/builtins.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +67 lines, -1 line 0 comments Download
M src/compiler.cc View 1 chunk +1 line, -4 lines 0 comments Download
M src/compiler/js-intrinsic-lowering.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-intrinsic-lowering.cc View 2 chunks +43 lines, -1 line 0 comments Download
M src/crankshaft/hydrogen.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/factory.h View 1 chunk +5 lines, -0 lines 0 comments Download
M src/factory.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +56 lines, -3 lines 0 comments Download
M src/full-codegen/arm/full-codegen-arm.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/full-codegen/arm64/full-codegen-arm64.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/full-codegen/ia32/full-codegen-ia32.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/full-codegen/mips/full-codegen-mips.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/full-codegen/mips64/full-codegen-mips64.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/full-codegen/x64/full-codegen-x64.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/heap/heap.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -0 lines 0 comments Download
M src/heap/objects-visiting.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 1 2 3 4 5 6 4 chunks +150 lines, -0 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 5 6 1 chunk +0 lines, -8 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 6 1 chunk +12 lines, -0 lines 0 comments Download
M src/js/v8natives.js View 1 1 chunk +0 lines, -70 lines 0 comments Download
M src/json-stringifier.h View 1 1 chunk +1 line, -2 lines 0 comments Download
M src/mips/builtins-mips.cc View 1 2 3 4 5 6 4 chunks +198 lines, -0 lines 0 comments Download
M src/mips/code-stubs-mips.cc View 1 2 3 4 5 6 1 chunk +0 lines, -9 lines 0 comments Download
M src/mips/macro-assembler-mips.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M src/mips/macro-assembler-mips.cc View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
M src/mips64/builtins-mips64.cc View 1 2 3 4 5 6 4 chunks +198 lines, -0 lines 0 comments Download
M src/mips64/code-stubs-mips64.cc View 1 2 3 4 5 6 1 chunk +0 lines, -9 lines 0 comments Download
M src/mips64/macro-assembler-mips64.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M src/mips64/macro-assembler-mips64.cc View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 19 chunks +71 lines, -67 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 10 chunks +62 lines, -55 lines 0 comments Download
M src/objects-body-descriptors-inl.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +18 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +22 lines, -107 lines 0 comments Download
M src/objects-printer.cc View 3 chunks +13 lines, -5 lines 0 comments Download
M src/profiler/heap-snapshot-generator.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/profiler/heap-snapshot-generator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +23 lines, -29 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 1 chunk +0 lines, -3 lines 0 comments Download
M src/runtime/runtime-debug.cc View 1 2 3 4 5 6 7 8 9 3 chunks +44 lines, -37 lines 0 comments Download
M src/runtime/runtime-function.cc View 5 chunks +17 lines, -146 lines 0 comments Download
M src/runtime/runtime-object.cc View 1 chunk +6 lines, -8 lines 0 comments Download
M src/runtime/runtime-observe.cc View 2 chunks +10 lines, -3 lines 0 comments Download
M src/snapshot/serialize.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/types.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/x64/builtins-x64.cc View 1 2 3 4 5 6 4 chunks +149 lines, -0 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 3 4 5 6 1 chunk +0 lines, -9 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 4 5 6 1 chunk +12 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +33 lines, -0 lines 0 comments Download
M test/cctest/test-heap-profiler.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/function-bind.js View 2 chunks +6 lines, -0 lines 0 comments Download
D test/mjsunit/regress/regress-1229.js View 1 chunk +0 lines, -146 lines 0 comments Download
D test/mjsunit/regress/regress-351315.js View 1 chunk +0 lines, -49 lines 0 comments Download
M test/test262/test262.status View 1 2 3 4 5 6 1 chunk +0 lines, -4 lines 0 comments Download
M test/unittests/compiler/js-intrinsic-lowering-unittest.cc View 2 chunks +8 lines, -7 lines 0 comments Download

Messages

Total messages: 72 (38 generated)
Benedikt Meurer
Hey mips people, Please add mips and mips64 ports. Thanks, Benedikt
5 years ago (2015-12-22 14:02:32 UTC) #1
ivica.bogosavljevic
On 2015/12/22 14:02:32, Benedikt Meurer wrote: > Hey mips people, > > Please add mips ...
5 years ago (2015-12-22 14:22:01 UTC) #2
Yang
https://codereview.chromium.org/1542963002/diff/1/src/json-stringifier.h File src/json-stringifier.h (right): https://codereview.chromium.org/1542963002/diff/1/src/json-stringifier.h#newcode346 src/json-stringifier.h:346: if (object->IsCallable()) break; Shouldn't this simply return UNCHANGED (so ...
5 years ago (2015-12-22 14:51:11 UTC) #4
Benedikt Meurer
https://codereview.chromium.org/1542963002/diff/1/src/json-stringifier.h File src/json-stringifier.h (right): https://codereview.chromium.org/1542963002/diff/1/src/json-stringifier.h#newcode346 src/json-stringifier.h:346: if (object->IsCallable()) break; Indeed, good catch. Thanks.
5 years ago (2015-12-23 05:04:34 UTC) #5
Benedikt Meurer
Hey Camillo, Here's the first big piece of meat. Please take a look. Thanks, Benedikt
5 years ago (2015-12-23 09:14:42 UTC) #8
Hannes Payer (out of office)
heap LGTM
5 years ago (2015-12-23 09:16:25 UTC) #10
Yang
On 2015/12/23 09:16:25, Hannes Payer wrote: > heap LGTM serializer lgtm
5 years ago (2015-12-23 09:18:25 UTC) #11
Camillo Bruni
LGTM with minor nits. mostly checked ia32 and x64. https://codereview.chromium.org/1542963002/diff/40001/src/objects-debug.cc File src/objects-debug.cc (right): https://codereview.chromium.org/1542963002/diff/40001/src/objects-debug.cc#newcode556 src/objects-debug.cc:556: ...
5 years ago (2015-12-23 13:52:28 UTC) #13
akos.palfi.imgtec
Hey Benedikt, The MIPS port is ready to merge, please find the ports here: https://codereview.chromium.org/1542313002
5 years ago (2015-12-24 00:36:09 UTC) #15
Benedikt Meurer
On 2015/12/24 00:36:09, akos.palfi.imgtec wrote: > Hey Benedikt, > > The MIPS port is ready ...
5 years ago (2015-12-24 06:28:03 UTC) #16
Benedikt Meurer
https://codereview.chromium.org/1542963002/diff/40001/src/objects-debug.cc File src/objects-debug.cc (right): https://codereview.chromium.org/1542963002/diff/40001/src/objects-debug.cc#newcode556 src/objects-debug.cc:556: CHECK(map()->is_callable()); Actually btf->IsConstructor() <=> IsConstructor(). Done. https://codereview.chromium.org/1542963002/diff/40001/src/objects-inl.h File src/objects-inl.h ...
5 years ago (2015-12-24 06:28:18 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/120001
5 years ago (2015-12-24 06:30:36 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/140001
5 years ago (2015-12-24 06:41:29 UTC) #22
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/80960)
4 years, 12 months ago (2015-12-24 08:22:55 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/160001
4 years, 12 months ago (2015-12-24 13:39:06 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/80963)
4 years, 12 months ago (2015-12-24 15:14:47 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/180001
4 years, 12 months ago (2015-12-24 15:22:32 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/80966)
4 years, 12 months ago (2015-12-24 16:07:17 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/180001
4 years, 12 months ago (2015-12-24 19:12:03 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/159912)
4 years, 12 months ago (2015-12-24 21:56:43 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/180001
4 years, 12 months ago (2015-12-25 10:04:38 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/159960)
4 years, 12 months ago (2015-12-25 13:43:03 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/200001
4 years, 12 months ago (2015-12-26 05:00:49 UTC) #44
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/200001
4 years, 12 months ago (2015-12-26 05:26:03 UTC) #47
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 12 months ago (2015-12-26 06:03:50 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/220001
4 years, 12 months ago (2015-12-26 18:06:50 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/260001
4 years, 12 months ago (2015-12-26 19:31:57 UTC) #56
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 12 months ago (2015-12-26 20:27:34 UTC) #58
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/ca8623eaa468cba65a5adafcdfb4615966f43ce2 Cr-Commit-Position: refs/heads/master@{#33042}
4 years, 12 months ago (2015-12-26 20:28:28 UTC) #60
Benedikt Meurer
A revert of this CL (patchset #14 id:260001) has been created in https://codereview.chromium.org/1552473002/ by bmeurer@chromium.org. ...
4 years, 12 months ago (2015-12-27 04:41:22 UTC) #61
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/280001
4 years, 12 months ago (2015-12-27 05:17:55 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1542963002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1542963002/280001
4 years, 12 months ago (2015-12-27 05:19:08 UTC) #68
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 12 months ago (2015-12-27 06:31:04 UTC) #70
commit-bot: I haz the power
4 years, 12 months ago (2015-12-27 06:31:56 UTC) #72
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/97def8070cbb979419c041c3732d5e11779f79da
Cr-Commit-Position: refs/heads/master@{#33044}

Powered by Google App Engine
This is Rietveld 408576698