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

Issue 2109223002: [intl] Clean up function name handling in AddBoundMethod (Closed)

Created:
4 years, 5 months ago by adamk
Modified:
4 years, 5 months ago
Reviewers:
Dan Ehrenberg
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[intl] Clean up function name handling in AddBoundMethod AddBoundMethod, in i18n.js, returns functions all of which share the same backing SharedFunctionInfo, which means that its calls to InstallGetter were causing all such functions to have a single name (that of the last caller, "get breakType"). This patch skips calling InstallGetter and instead directly calls %DefineGetterPropertyUnchecked, which itself sets the name property on the JSFunction instance (it knows how to do this in order to handle getters that have computed property names). Also takes care of a TODO having to do with the inner boundMethod: its name is now made empty, by using a new macro that gets around ES2015's function name inference. Finally, removes a redundant %FunctionRemovePrototype: arrow functions have no prototypes to begin with. R=littledan@chromium.org BUG=v8:4778 Committed: https://crrev.com/54ce1935b5160045822fa5f17ab7cd01d54cf884 Cr-Commit-Position: refs/heads/master@{#37459}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Simpler, but hackier approach #

Patch Set 3 : Use an arrow function #

Patch Set 4 : Getter cannot be an arrow function, of course #

Patch Set 5 : Fix build, I think #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -19 lines) Patch
M src/js/i18n.js View 1 2 3 4 1 chunk +16 lines, -14 lines 0 comments Download
M src/js/macros.py View 1 chunk +3 lines, -0 lines 0 comments Download
M test/test262/test262.status View 1 chunk +0 lines, -5 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
adamk
4 years, 5 months ago (2016-06-29 20:42:57 UTC) #1
Dan Ehrenberg
https://codereview.chromium.org/2109223002/diff/1/src/js/i18n.js File src/js/i18n.js (right): https://codereview.chromium.org/2109223002/diff/1/src/js/i18n.js#newcode124 src/js/i18n.js:124: %object_define_property(getter, "name", {value: "get " + methodName}); The name ...
4 years, 5 months ago (2016-06-29 21:10:12 UTC) #2
adamk
https://codereview.chromium.org/2109223002/diff/1/src/js/i18n.js File src/js/i18n.js (right): https://codereview.chromium.org/2109223002/diff/1/src/js/i18n.js#newcode124 src/js/i18n.js:124: %object_define_property(getter, "name", {value: "get " + methodName}); On 2016/06/29 ...
4 years, 5 months ago (2016-06-29 22:53:10 UTC) #3
adamk
See CL description for what the heck this is doing. https://codereview.chromium.org/2109223002/diff/1/src/js/i18n.js File src/js/i18n.js (right): https://codereview.chromium.org/2109223002/diff/1/src/js/i18n.js#newcode124 ...
4 years, 5 months ago (2016-06-29 23:19:16 UTC) #5
Dan Ehrenberg
lgtm modulo fixing that Intl is apparently very broken by this change
4 years, 5 months ago (2016-06-30 19:33:05 UTC) #6
adamk
Changed getter back to being a regular function, since it uses "this" (had to add ...
4 years, 5 months ago (2016-06-30 19:36:10 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2109223002/60001
4 years, 5 months ago (2016-06-30 19:36:19 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_avx2_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel_ng/builds/4254) v8_linux_arm64_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
4 years, 5 months ago (2016-06-30 19:39:34 UTC) #12
Dan Ehrenberg
lgtm
4 years, 5 months ago (2016-06-30 19:41:57 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2109223002/80001
4 years, 5 months ago (2016-06-30 19:44:39 UTC) #16
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 5 months ago (2016-06-30 20:08:39 UTC) #18
commit-bot: I haz the power
4 years, 5 months ago (2016-06-30 20:10:57 UTC) #20
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/54ce1935b5160045822fa5f17ab7cd01d54cf884
Cr-Commit-Position: refs/heads/master@{#37459}

Powered by Google App Engine
This is Rietveld 408576698