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

Issue 1612323003: Introduce {FAST,SLOW}_STRING_WRAPPER_ELEMENTS (Closed)

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

Description

Introduce {FAST,SLOW}_STRING_WRAPPER_ELEMENTS String wrappers (new String("foo")) are special objects: their string characters are accessed like elements, and they also have an elements backing store. This used to require a bunch of explicit checks like: if (obj->IsJSValue() && JSValue::cast(obj)->value()->IsString()) { /* Handle string characters */ } // Handle regular elements (for string wrappers and other objects) obj->GetElementsAccessor()->Whatever(...); This CL introduces new ElementsKinds for string wrapper objects (one for fast elements, one for dictionary elements), which allow folding the special-casing into new StringWrapperElementsAccessors. No observable change in behavior is intended. Committed: https://crrev.com/f4872f7477e34ae090e1cb862f22b3b89fba7329 Cr-Commit-Position: refs/heads/master@{#33616}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 18

Patch Set 4 : addressed comments #

Patch Set 5 : rebased to ToT #

Patch Set 6 : make MSVS and test262 happy #

Patch Set 7 : one more DCHECK fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+656 lines, -333 lines) Patch
M src/bootstrapper.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M src/builtins.cc View 1 2 3 4 6 chunks +40 lines, -4 lines 0 comments Download
M src/code-stubs.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/code-stubs.cc View 1 1 chunk +2 lines, -22 lines 0 comments Download
M src/contexts-inl.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/crankshaft/arm/lithium-codegen-arm.cc View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M src/crankshaft/arm64/lithium-codegen-arm64.cc View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M src/crankshaft/hydrogen.cc View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download
M src/crankshaft/ia32/lithium-codegen-ia32.cc View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M src/crankshaft/mips/lithium-codegen-mips.cc View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M src/crankshaft/mips64/lithium-codegen-mips64.cc View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M src/crankshaft/ppc/lithium-codegen-ppc.cc View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M src/crankshaft/x64/lithium-codegen-x64.cc View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M src/crankshaft/x87/lithium-codegen-x87.cc View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M src/debug/liveedit.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/elements.h View 6 chunks +13 lines, -43 lines 0 comments Download
M src/elements.cc View 1 2 3 4 5 37 chunks +354 lines, -97 lines 0 comments Download
M src/elements-kind.h View 1 4 chunks +17 lines, -3 lines 0 comments Download
M src/elements-kind.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M src/factory.h View 1 2 chunks +5 lines, -5 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M src/ic/ic.cc View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download
M src/ic/ic-compiler.cc View 2 chunks +1 line, -1 line 0 comments Download
M src/interpreter/bytecode-array-iterator.cc View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M src/key-accumulator.h View 1 chunk +4 lines, -6 lines 0 comments Download
M src/lookup.cc View 1 2 3 4 5 chunks +21 lines, -40 lines 0 comments Download
M src/objects.h View 1 2 3 4 7 chunks +9 lines, -7 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 27 chunks +69 lines, -49 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 4 chunks +7 lines, -3 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 9 chunks +27 lines, -29 lines 0 comments Download
M src/objects-printer.cc View 1 2 3 4 3 chunks +5 lines, -1 line 0 comments Download
M src/runtime/runtime-proxy.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M test/cctest/interpreter/test-interpreter.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-inobject-slack-tracking.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/test-unboxed-doubles.cc View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 31 (16 generated)
Jakob Kummerow
PTAL. The meat of the change is in elements.cc; the benefit is mostly in lookup.cc. ...
4 years, 11 months ago (2016-01-26 14:21:24 UTC) #2
Hannes Payer (out of office)
On 2016/01/26 14:21:24, Jakob wrote: > PTAL. The meat of the change is in elements.cc; ...
4 years, 11 months ago (2016-01-26 14:39:42 UTC) #3
Yang
On 2016/01/26 14:39:42, Hannes Payer wrote: > On 2016/01/26 14:21:24, Jakob wrote: > > PTAL. ...
4 years, 11 months ago (2016-01-26 15:45:11 UTC) #4
rmcilroy
interpreter LGTM. https://codereview.chromium.org/1612323003/diff/40001/src/interpreter/bytecode-array-iterator.cc File src/interpreter/bytecode-array-iterator.cc (right): https://codereview.chromium.org/1612323003/diff/40001/src/interpreter/bytecode-array-iterator.cc#newcode110 src/interpreter/bytecode-array-iterator.cc:110: Handle<FixedArray> constants = handle(bytecode_array()->constant_pool()); Just skip the ...
4 years, 11 months ago (2016-01-26 15:53:28 UTC) #6
Toon Verwaest
I'm not such a fan of the changes to Fixed(Double)Array::get; but I won't block it ...
4 years, 11 months ago (2016-01-27 15:02:22 UTC) #8
Jakob Kummerow
Thanks for the reviews. Addressed comments. https://codereview.chromium.org/1612323003/diff/40001/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1612323003/diff/40001/src/builtins.cc#newcode839 src/builtins.cc:839: case SLOW_SLOPPY_ARGUMENTS_ELEMENTS: On ...
4 years, 10 months ago (2016-01-29 14:31:27 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1612323003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1612323003/80001
4 years, 10 months ago (2016-01-29 14:44:05 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: v8_win_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_rel_ng/builds/2105)
4 years, 10 months ago (2016-01-29 14:49:08 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1612323003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1612323003/120001
4 years, 10 months ago (2016-01-29 17:52:05 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: v8_win_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_rel_ng/builds/2112) v8_win_rel_ng_triggered on tryserver.v8 (JOB_FAILED, ...
4 years, 10 months ago (2016-01-29 18:07:36 UTC) #20
adamk
DBC: Please give this a more detailed CL description before landing.
4 years, 10 months ago (2016-01-29 18:16:20 UTC) #22
Jakob Kummerow
On 2016/01/29 18:16:20, adamk wrote: > DBC: Please give this a more detailed CL description ...
4 years, 10 months ago (2016-01-29 18:17:44 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1612323003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1612323003/140001
4 years, 10 months ago (2016-01-29 18:31:24 UTC) #27
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 10 months ago (2016-01-29 18:57:32 UTC) #29
commit-bot: I haz the power
4 years, 10 months ago (2016-01-29 18:58:12 UTC) #31
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/f4872f7477e34ae090e1cb862f22b3b89fba7329
Cr-Commit-Position: refs/heads/master@{#33616}

Powered by Google App Engine
This is Rietveld 408576698