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

Issue 1626423003: Support computed properties for ES2015 Function.name (Closed)

Created:
4 years, 11 months ago by adamk
Modified:
4 years, 10 months ago
CC:
v8-reviews_googlegroups.com, Igor Sheludko, caitp (gmail), rmcilroy, oth
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Support computed properties for ES2015 Function.name Adds a new runtime function, %DefineDataPropertyInLiteral, which takes a fifth argument specifying whether the property and value are syntactically such that the value is a function (or class) literal that should have its name set at runtime. The new runtime call also allows us to eliminate the now-redundant %DefineClassMethod runtime function. This should get much less ugly once we can desugar the "dynamic" part of object literals in the parser (but that work is currently blocked on having a performant way of desugaring literals). BUG=v8:3699, v8:3761 LOG=n Committed: https://crrev.com/21c045a2fafd171272c53b17a5d495f5be100662 Cr-Commit-Position: refs/heads/master@{#33756}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Mostly working #

Total comments: 5

Patch Set 3 : Add FrameStateInputCount, use Push everywhere #

Patch Set 4 : Merge to trunk, disable bytecode generator class test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+258 lines, -143 lines) Patch
M src/ast/ast.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 3 2 chunks +9 lines, -5 lines 0 comments Download
M src/compiler/linkage.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/full-codegen/arm/full-codegen-arm.cc View 1 2 3 3 chunks +10 lines, -12 lines 0 comments Download
M src/full-codegen/arm64/full-codegen-arm64.cc View 1 2 3 3 chunks +10 lines, -12 lines 0 comments Download
M src/full-codegen/ia32/full-codegen-ia32.cc View 1 2 3 3 chunks +10 lines, -7 lines 0 comments Download
M src/full-codegen/mips/full-codegen-mips.cc View 1 2 3 3 chunks +10 lines, -12 lines 0 comments Download
M src/full-codegen/mips64/full-codegen-mips64.cc View 1 2 3 3 chunks +10 lines, -12 lines 0 comments Download
M src/full-codegen/ppc/full-codegen-ppc.cc View 1 2 3 chunks +10 lines, -12 lines 0 comments Download
M src/full-codegen/x64/full-codegen-x64.cc View 1 2 3 2 chunks +5 lines, -2 lines 0 comments Download
M src/full-codegen/x87/full-codegen-x87.cc View 1 2 3 chunks +10 lines, -7 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 2 3 5 chunks +20 lines, -11 lines 0 comments Download
M src/objects.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 chunks +1 line, -3 lines 0 comments Download
M src/runtime/runtime-classes.cc View 1 1 chunk +0 lines, -14 lines 0 comments Download
M src/runtime/runtime-object.cc View 1 2 3 3 chunks +34 lines, -0 lines 0 comments Download
M test/cctest/interpreter/test-bytecode-generator.cc View 1 2 3 14 chunks +32 lines, -21 lines 0 comments Download
M test/mjsunit/harmony/function-name.js View 1 2 chunks +58 lines, -11 lines 0 comments Download

Messages

Total messages: 33 (13 generated)
adamk
Hi Toon, This is still a work-in-progress, but I had a couple of questions about ...
4 years, 11 months ago (2016-01-26 19:34:34 UTC) #3
Toon Verwaest
Since I landed https://codereview.chromium.org/1632603002/ you can just set the property (with SetProperty), assuming that it's ...
4 years, 11 months ago (2016-01-27 13:40:37 UTC) #4
adamk
On 2016/01/27 13:40:37, Toon Verwaest wrote: > Since I landed https://codereview.chromium.org/1632603002/ you can just set ...
4 years, 11 months ago (2016-01-27 17:04:51 UTC) #5
Toon Verwaest
I'm all in favor of adding a new map that has inobject space for the ...
4 years, 11 months ago (2016-01-27 17:26:33 UTC) #7
adamk
On 2016/01/27 17:26:33, Toon Verwaest wrote: > I'm all in favor of adding a new ...
4 years, 11 months ago (2016-01-27 20:17:45 UTC) #8
Toon Verwaest
lgtm; the current approach is ok for a first version. The right approach is indeed ...
4 years, 10 months ago (2016-01-29 12:18:49 UTC) #9
adamk
Will upload a new version of this after
4 years, 10 months ago (2016-01-29 23:43:18 UTC) #10
adamk
On 2016/01/29 23:43:18, adamk wrote: > Will upload a new version of this after er...after ...
4 years, 10 months ago (2016-01-29 23:43:27 UTC) #11
adamk
https://codereview.chromium.org/1626423003/diff/20001/src/full-codegen/arm/full-codegen-arm.cc File src/full-codegen/arm/full-codegen-arm.cc (right): https://codereview.chromium.org/1626423003/diff/20001/src/full-codegen/arm/full-codegen-arm.cc#newcode1652 src/full-codegen/arm/full-codegen-arm.cc:1652: __ mov(r0, Operand(Smi::FromInt(NONE))); Let me know if you'd like ...
4 years, 10 months ago (2016-02-02 23:57:30 UTC) #14
adamk
This is now ready for review, PTAL
4 years, 10 months ago (2016-02-02 23:57:54 UTC) #15
Benedikt Meurer
LGTM on compiler parts, modulo comment about frame state. https://codereview.chromium.org/1626423003/diff/20001/src/compiler/linkage.cc File src/compiler/linkage.cc (right): https://codereview.chromium.org/1626423003/diff/20001/src/compiler/linkage.cc#newcode151 src/compiler/linkage.cc:151: ...
4 years, 10 months ago (2016-02-03 05:14:51 UTC) #16
Toon Verwaest
still lgtm https://codereview.chromium.org/1626423003/diff/20001/src/full-codegen/arm/full-codegen-arm.cc File src/full-codegen/arm/full-codegen-arm.cc (right): https://codereview.chromium.org/1626423003/diff/20001/src/full-codegen/arm/full-codegen-arm.cc#newcode1652 src/full-codegen/arm/full-codegen-arm.cc:1652: __ mov(r0, Operand(Smi::FromInt(NONE))); On 2016/02/02 23:57:30, adamk ...
4 years, 10 months ago (2016-02-03 10:47:23 UTC) #17
adamk
https://codereview.chromium.org/1626423003/diff/20001/src/compiler/linkage.cc File src/compiler/linkage.cc (right): https://codereview.chromium.org/1626423003/diff/20001/src/compiler/linkage.cc#newcode151 src/compiler/linkage.cc:151: case Runtime::kDefineGetterPropertyUnchecked: // TODO(jarin): Is it safe? On 2016/02/03 ...
4 years, 10 months ago (2016-02-03 19:04:59 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1626423003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1626423003/40001
4 years, 10 months ago (2016-02-04 19:17:51 UTC) #21
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/12979) v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, ...
4 years, 10 months ago (2016-02-04 19:19:07 UTC) #23
adamk
+rmcilroy, FYI: I disabled the new class test in test-bytecode-generator; please fix and re-enable at ...
4 years, 10 months ago (2016-02-04 21:48:53 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1626423003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1626423003/60001
4 years, 10 months ago (2016-02-04 21:49:04 UTC) #27
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 10 months ago (2016-02-04 22:36:22 UTC) #29
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/21c045a2fafd171272c53b17a5d495f5be100662 Cr-Commit-Position: refs/heads/master@{#33756}
4 years, 10 months ago (2016-02-04 22:36:58 UTC) #31
rmcilroy
4 years, 10 months ago (2016-02-05 10:48:29 UTC) #33
Message was sent while issue was closed.
+oth who implemented class literals for Ignition.

Thanks for letting us know Adam.

Powered by Google App Engine
This is Rietveld 408576698