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

Issue 1266013006: [stubs] Unify (and optimize) implementation of ToObject. (Closed)

Created:
5 years, 4 months ago by Benedikt Meurer
Modified:
5 years, 4 months ago
Reviewers:
mvstanton, Yang
CC:
v8-dev, Paweł Hajdan Jr.
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[stubs] Unify (and optimize) implementation of ToObject. This is the initial (big) step towards a more uniform implementation of the ToObject abstract operation (ES6 7.1.13), where we have a fallback implementation in JSReceiver::ToObject() and a fast (hydrogen) CodeStub to deal with the fast case (we should be able to do more cleanup on this in a followup CL). For natives we expose the abstract operation via a %_ToObject intrinsic, also exposed via a macro TO_OBJECT, that unifies the previous confusion with TO_OBJECT_INLINE, ToObject, TO_OBJECT, $toObject and %$toObject. Now the whole implementation of the abstract operation is context independent, meaning we don't need any magic in the builtins object nor the native context. R=mvstanton@chromium.org,yangguo@chromium.org Committed: https://crrev.com/4fc6f5472441523c1a46d0d273ba8b216f96250f Cr-Commit-Position: refs/heads/master@{#29953}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix mips64 #

Patch Set 3 : Address Michael's comment. #

Patch Set 4 : Add missing support for %_ToObject in TurboFan and Crankshaft. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+560 lines, -198 lines) Patch
M include/v8.h View 1 chunk +1 line, -1 line 0 comments Download
M src/arm/builtins-arm.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M src/arm/code-stubs-arm.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M src/arm/interface-descriptors-arm.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/arm64/builtins-arm64.cc View 2 chunks +7 lines, -4 lines 0 comments Download
M src/arm64/code-stubs-arm64.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M src/arm64/interface-descriptors-arm64.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/array.js View 25 chunks +25 lines, -25 lines 0 comments Download
M src/array-iterator.js View 2 chunks +2 lines, -2 lines 0 comments Download
M src/bootstrapper.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/builtins.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/code-factory.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/code-factory.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M src/code-stubs.h View 2 chunks +10 lines, -0 lines 0 comments Download
M src/code-stubs.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/code-stubs-hydrogen.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M src/collection.js View 2 chunks +2 lines, -2 lines 0 comments Download
M src/compiler/js-generic-lowering.cc View 1 chunk +3 lines, -1 line 0 comments Download
M src/compiler/js-intrinsic-lowering.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-intrinsic-lowering.cc View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M src/compiler/linkage.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/typer.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M src/contexts.h View 2 chunks +0 lines, -2 lines 0 comments Download
M src/date.js View 1 chunk +1 line, -1 line 0 comments Download
M src/deoptimizer.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/execution.cc View 2 chunks +10 lines, -8 lines 0 comments Download
M src/full-codegen/arm/full-codegen-arm.cc View 2 chunks +15 lines, -2 lines 0 comments Download
M src/full-codegen/arm64/full-codegen-arm64.cc View 2 chunks +15 lines, -2 lines 0 comments Download
M src/full-codegen/full-codegen.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/ia32/full-codegen-ia32.cc View 2 chunks +15 lines, -2 lines 0 comments Download
M src/full-codegen/mips/full-codegen-mips.cc View 2 chunks +16 lines, -2 lines 0 comments Download
M src/full-codegen/mips64/full-codegen-mips64.cc View 1 2 chunks +16 lines, -2 lines 0 comments Download
M src/full-codegen/ppc/full-codegen-ppc.cc View 2 chunks +14 lines, -2 lines 0 comments Download
M src/full-codegen/x64/full-codegen-x64.cc View 2 chunks +17 lines, -4 lines 0 comments Download
M src/full-codegen/x87/full-codegen-x87.cc View 2 chunks +15 lines, -2 lines 0 comments Download
M src/harmony-array.js View 8 chunks +8 lines, -8 lines 0 comments Download
M src/harmony-array-includes.js View 1 chunk +1 line, -1 line 0 comments Download
M src/harmony-object.js View 2 chunks +2 lines, -2 lines 0 comments Download
M src/hydrogen.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/hydrogen.cc View 1 2 3 1 chunk +159 lines, -0 lines 0 comments Download
M src/i18n.js View 7 chunks +7 lines, -7 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/ia32/interface-descriptors-ia32.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/interface-descriptors.h View 1 2 2 chunks +11 lines, -0 lines 0 comments Download
M src/interface-descriptors.cc View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M src/macros.py View 1 chunk +1 line, -1 line 0 comments Download
M src/messages.js View 1 chunk +1 line, -1 line 0 comments Download
M src/mips/builtins-mips.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M src/mips/code-stubs-mips.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M src/mips/interface-descriptors-mips.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/mips64/builtins-mips64.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M src/mips64/code-stubs-mips64.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M src/mips64/interface-descriptors-mips64.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/ppc/builtins-ppc.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M src/ppc/code-stubs-ppc.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M src/ppc/interface-descriptors-ppc.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/runtime.js View 6 chunks +1 line, -24 lines 0 comments Download
M src/runtime/runtime.h View 3 chunks +2 lines, -3 lines 0 comments Download
M src/runtime/runtime-object.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M src/runtime/runtime-simd.cc View 3 chunks +3 lines, -11 lines 0 comments Download
M src/runtime/runtime-symbol.cc View 1 chunk +0 lines, -8 lines 0 comments Download
M src/string.js View 1 chunk +2 lines, -2 lines 0 comments Download
M src/string-iterator.js View 1 chunk +1 line, -1 line 0 comments Download
M src/symbol.js View 1 chunk +1 line, -1 line 0 comments Download
M src/v8natives.js View 14 chunks +17 lines, -17 lines 0 comments Download
M src/x64/builtins-x64.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/x64/interface-descriptors-x64.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/x87/builtins-x87.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M src/x87/code-stubs-x87.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/x87/interface-descriptors-x87.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (3 generated)
Benedikt Meurer
Hey Michael, Yang, This is the CL I was referring to. It's basically the initial ...
5 years, 4 months ago (2015-07-31 10:53:19 UTC) #2
Yang
full codegen and builtins lgtm.
5 years, 4 months ago (2015-07-31 10:58:41 UTC) #3
mvstanton
LGTM one nit. :) https://codereview.chromium.org/1266013006/diff/1/src/ia32/interface-descriptors-ia32.cc File src/ia32/interface-descriptors-ia32.cc (right): https://codereview.chromium.org/1266013006/diff/1/src/ia32/interface-descriptors-ia32.cc#newcode109 src/ia32/interface-descriptors-ia32.cc:109: Register registers[] = {eax}; You ...
5 years, 4 months ago (2015-07-31 11:04:57 UTC) #4
Benedikt Meurer
Thanks for the reviews. https://codereview.chromium.org/1266013006/diff/1/src/ia32/interface-descriptors-ia32.cc File src/ia32/interface-descriptors-ia32.cc (right): https://codereview.chromium.org/1266013006/diff/1/src/ia32/interface-descriptors-ia32.cc#newcode109 src/ia32/interface-descriptors-ia32.cc:109: Register registers[] = {eax}; Done. ...
5 years, 4 months ago (2015-07-31 11:18:11 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1266013006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1266013006/60001
5 years, 4 months ago (2015-07-31 12:11:21 UTC) #8
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 4 months ago (2015-07-31 12:25:35 UTC) #9
commit-bot: I haz the power
5 years, 4 months ago (2015-07-31 12:25:53 UTC) #10
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/4fc6f5472441523c1a46d0d273ba8b216f96250f
Cr-Commit-Position: refs/heads/master@{#29953}

Powered by Google App Engine
This is Rietveld 408576698