Commit Graph

200 Commits

Author SHA1 Message Date
cbruni
061e2a9b2b elements.cc cleanup
Reuse code for copying arguments and pushing/shifting elements.

BUG=

Review URL: https://codereview.chromium.org/1346013005

Cr-Commit-Position: refs/heads/master@{#30825}
2015-09-18 11:15:49 +00:00
cbruni
007eac94a1 Improve JSReceiver::GetKeys Speed
The core bottleneck lies in N-square cost of array union. Depending on the size
of the arrays involved it makes sense to rely on a hash-set/table for the lookup.

LOG=N
BUG=v8:2904

Review URL: https://codereview.chromium.org/1316213008

Cr-Commit-Position: refs/heads/master@{#30797}
2015-09-17 12:52:51 +00:00
cbruni
053d7f49e5 builtins.cc return PackedElementsKind where applicable
Returning a result array with holey elements kind in where we actually have a packed kind causes performance regressions.

LOG=N
BUG=chromium:531357

Review URL: https://codereview.chromium.org/1340033002

Cr-Commit-Position: refs/heads/master@{#30736}
2015-09-15 09:08:43 +00:00
cbruni
43a04030b8 elements.cc CopyDoubleToObjectElements: avoid excessive HandleScopes
BUG=

Review URL: https://codereview.chromium.org/1341763002

Cr-Commit-Position: refs/heads/master@{#30717}
2015-09-14 14:30:00 +00:00
cbruni
28235e94cf Using GetMoreGeneralElementsKind in more places
BUG=

Review URL: https://codereview.chromium.org/1338983003

Cr-Commit-Position: refs/heads/master@{#30715}
2015-09-14 12:17:12 +00:00
cbruni
cbdb13533e Adding ElementsAccessor::Concat
- Moving parts of ArrayConcat from builtins.cc to the ElementsAccessor
- Removing ArrayConcat Runtime Function

BUG=v8:4317
LOG=N

Review URL: https://codereview.chromium.org/1330483003

Cr-Commit-Position: refs/heads/master@{#30619}
2015-09-07 13:45:02 +00:00
cbruni
a369ab1838 Adding ElementsAccessor::Shift
- Use the new ElementsAccessor methods
- improve test coverage

BUG=

Review URL: https://codereview.chromium.org/1317053006

Cr-Commit-Position: refs/heads/master@{#30546}
2015-09-02 15:29:40 +00:00
cbruni
fb44484ffd ElementsAccessor Array Builtins Cleanup
Repeat the same signatures for future refactoring

BUG=

Review URL: https://codereview.chromium.org/1302413006

Cr-Commit-Position: refs/heads/master@{#30532}
2015-09-02 06:42:09 +00:00
cbruni
ec2518eedb Adding ElementsAccessor::Unshift
Move BackingStore specific implementation from builtins.cc tp ElementsAccessor

BUG=

Review URL: https://codereview.chromium.org/1322803002

Cr-Commit-Position: refs/heads/master@{#30526}
2015-09-01 21:19:53 +00:00
cbruni
ca8134c834 Adding ElementsAccessor::Pop
Moving FastElements path to ElementsAccessor.

BUG=

Review URL: https://codereview.chromium.org/1325483002

Cr-Commit-Position: refs/heads/master@{#30477}
2015-08-31 15:18:08 +00:00
cbruni
f68dcc924b Adding ElementsAccessor::Slice
- Move fast paths from builtins.cc ArraySlice to ElementsAccessor
- Handle more argument types in the fast path

BUG=

Review URL: https://codereview.chromium.org/1321773002

Cr-Commit-Position: refs/heads/master@{#30471}
2015-08-31 12:19:28 +00:00
cbruni
8198610d5d Adding ElementsAccessor Splice
- remove the Backing-Store specific code from builtins.cc and put it in elements.cc.
- adding tests to improve coverage of the splice method

BUG=

Review URL: https://codereview.chromium.org/1312033003

Cr-Commit-Position: refs/heads/master@{#30410}
2015-08-27 13:06:05 +00:00
hablich
cfdcc874a9 Revert of Moving ArraySplice Builtin to ElementsAccessor (patchset #8 id:140001 of https://codereview.chromium.org/1293683005/ )
Reason for revert:
Fails layout tests: http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2032/builds/1450

Original issue's description:
> - remove the Backing-Store specific code from builtins.cc and put it in elements.cc.
> - adding tests to improve coverage of the splice method
>
> BUG=
>
> Committed: https://crrev.com/8533d4b5433d3a9e9fb1015f206997bd6d869fe3
> Cr-Commit-Position: refs/heads/master@{#30269}
>
> Committed: https://crrev.com/07a4a6cb8e2ab940b28a7151a925c796da023524
> Cr-Commit-Position: refs/heads/master@{#30326}

TBR=mvstanton@chromium.org,cbruni@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1315823004

Cr-Commit-Position: refs/heads/master@{#30351}
2015-08-25 11:18:39 +00:00
cbruni
12ad2554fb Revert of Array.prototype.unshift builtin improvements (patchset #3 id:40001 of https://codereview.chromium.org/1311343002/ )
Reason for revert:
https://codereview.chromium.org/1315823004/

Original issue's description:
> Array.prototype.unshift builtin improvements
>
> Moving unshift to ElementAccessor and increasing the range of arguments
> handled directly in C++, namely directly supporting FastDoubleElementsKind.
> This should yield a factor 19 speedup for unshift on fast double arrays.
>
> BUG=
>
> Committed: https://crrev.com/bf6764e6c1197e50ae148755488307a423b1d9b4
> Cr-Commit-Position: refs/heads/master@{#30347}

TBR=yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1311363003

Cr-Commit-Position: refs/heads/master@{#30350}
2015-08-25 11:11:30 +00:00
cbruni
bf6764e6c1 Array.prototype.unshift builtin improvements
Moving unshift to ElementAccessor and increasing the range of arguments
handled directly in C++, namely directly supporting FastDoubleElementsKind.
This should yield a factor 19 speedup for unshift on fast double arrays.

BUG=

Review URL: https://codereview.chromium.org/1311343002

Cr-Commit-Position: refs/heads/master@{#30347}
2015-08-25 09:45:38 +00:00
cbruni
07a4a6cb8e - remove the Backing-Store specific code from builtins.cc and put it in elements.cc.
- adding tests to improve coverage of the splice method

BUG=

Committed: https://crrev.com/8533d4b5433d3a9e9fb1015f206997bd6d869fe3
Cr-Commit-Position: refs/heads/master@{#30269}

Review URL: https://codereview.chromium.org/1293683005

Cr-Commit-Position: refs/heads/master@{#30326}
2015-08-24 10:55:13 +00:00
cbruni
6d67f7db37 Revert of Moving ArraySplice Builtin to ElementsAccessor (patchset #6 id:100001 of https://codereview.chromium.org/1293683005/ )
Reason for revert:
failing bot http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/builds/3827

Original issue's description:
> - remove the Backing-Store speficic code from builtins.cc and put it in elements.cc.
> - adding tests to improve coverage of the splice method
>
> BUG=
>
> Committed: https://crrev.com/8533d4b5433d3a9e9fb1015f206997bd6d869fe3
> Cr-Commit-Position: refs/heads/master@{#30269}

TBR=mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1305763002

Cr-Commit-Position: refs/heads/master@{#30271}
2015-08-20 13:51:15 +00:00
cbruni
8533d4b543 - remove the Backing-Store speficic code from builtins.cc and put it in elements.cc.
- adding tests to improve coverage of the splice method

BUG=

Review URL: https://codereview.chromium.org/1293683005

Cr-Commit-Position: refs/heads/master@{#30269}
2015-08-20 12:55:05 +00:00
mstarzinger
98a0fe0f32 Remove grab-bag includes of v8.h from everywhere.
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1285183010

Cr-Commit-Position: refs/heads/master@{#30263}
2015-08-20 07:44:15 +00:00
jkummerow
df9822f45a [IC] Make SeededNumberDictionary::UpdateMaxNumberKey prototype aware
Only walk the heap clearing KeyedStoreICs when the dictionary in question belongs to an object that's used as a prototype.
This is a temporary mitigation until we have a way to clear such ICs without having to walk the heap.

BUG=v8:4335
LOG=y
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1275363002

Cr-Commit-Position: refs/heads/master@{#30076}
2015-08-07 22:45:13 +00:00
cbruni
ffb3a92759 Array Builtin Refactoring: Creating API methods on ElementsAccessor
BUG=

Review URL: https://codereview.chromium.org/1260283002

Cr-Commit-Position: refs/heads/master@{#29958}
2015-07-31 16:10:51 +00:00
jochen
fded08f694 Reland of "Remove ExternalArray, derived types, and element kinds"
Original issue's description:
> Remove ExternalArray, derived types, and element kinds
>
> BUG=v8:3996
> R=jarin@chromium.org, mvstanton@chromium.org, bmeurer@chromium.org
> LOG=y
>
> Committed: https://crrev.com/607ef7c6009a24ebf195b4cab7b0b436c5afd21c
> Cr-Commit-Position: refs/heads/master@{#29872}

BUG=v8:3996
R=bmeurer@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1262583002

Cr-Commit-Position: refs/heads/master@{#29893}
2015-07-28 09:29:55 +00:00
machenbach
814048a04f Revert of Remove ExternalArray, derived types, and element kinds (patchset #5 id:80001 of https://codereview.chromium.org/1254623002/)
Reason for revert:
[Sheriff] Breaks several layout tests, e.g.:
http://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2032/builds/1067

Several output lines change from PASS to FAIL. If the changes are intended, please land a needsmanualrebaseline change in blink first.

Original issue's description:
> Remove ExternalArray, derived types, and element kinds
>
> BUG=v8:3996
> R=jarin@chromium.org, mvstanton@chromium.org, bmeurer@chromium.org
> LOG=y
>
> Committed: https://crrev.com/607ef7c6009a24ebf195b4cab7b0b436c5afd21c
> Cr-Commit-Position: refs/heads/master@{#29872}

TBR=bmeurer@chromium.org,hpayer@chromium.org,jarin@chromium.org,mvstanton@chromium.org,jochen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3996

Review URL: https://codereview.chromium.org/1257223002

Cr-Commit-Position: refs/heads/master@{#29883}
2015-07-27 20:32:16 +00:00
jochen
607ef7c600 Remove ExternalArray, derived types, and element kinds
BUG=v8:3996
R=jarin@chromium.org, mvstanton@chromium.org, bmeurer@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1254623002

Cr-Commit-Position: refs/heads/master@{#29872}
2015-07-27 13:19:36 +00:00
verwaest
047b4bfbb4 Fix non-standard element handling
BUG=

Review URL: https://codereview.chromium.org/1228113003

Cr-Commit-Position: refs/heads/master@{#29677}
2015-07-15 12:06:31 +00:00
verwaest
377ea53470 Update the context if Set on slow-mode argument targets an aliased arguments entry
BUG=v8:4177
LOG=n

Review URL: https://codereview.chromium.org/1233493007

Cr-Commit-Position: refs/heads/master@{#29575}
2015-07-10 15:52:10 +00:00
verwaest
7b5eab583f Use entry rather than index in ElementsAccessor::Get
BUG=v8:4137, v8:4177
LOG=n

Review URL: https://codereview.chromium.org/1230213002

Cr-Commit-Position: refs/heads/master@{#29574}
2015-07-10 14:13:45 +00:00
verwaest
f87af94a46 Use entry rather than index in ElementsAccessor::Set
BUG=v8:4137,v8:4177
LOG=n

Review URL: https://codereview.chromium.org/1232463005

Cr-Commit-Position: refs/heads/master@{#29571}
2015-07-10 12:56:41 +00:00
verwaest
44dcc0a2c0 Delete from non-array end by trimming the backing store
Review URL: https://codereview.chromium.org/1218663009

Cr-Commit-Position: refs/heads/master@{#29521}
2015-07-07 16:02:42 +00:00
verwaest
ca7feba733 Index -> Entry and Key -> Index in elements.[cc|h]
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1224643004

Cr-Commit-Position: refs/heads/master@{#29514}
2015-07-07 11:53:04 +00:00
verwaest
9599bad420 Wrap elements.cc in an anonymous namespace
BUG=

Review URL: https://codereview.chromium.org/1221363002

Cr-Commit-Position: refs/heads/master@{#29484}
2015-07-06 10:40:38 +00:00
verwaest
dba715ec6a Cleanup Delete backend implementation.
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1218813012

Cr-Commit-Position: refs/heads/master@{#29477}
2015-07-06 08:53:51 +00:00
verwaest
e7d64b3f60 Remove obsolete GetAccessorPair from ElementsAccessor
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1224533003

Cr-Commit-Position: refs/heads/master@{#29467}
2015-07-03 12:39:01 +00:00
verwaest
9d0cd81da9 Move slow classes above fast to directly call ReconfigureImpl, remove friends, make things public
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1225493002

Cr-Commit-Position: refs/heads/master@{#29455}
2015-07-02 16:44:33 +00:00
verwaest
c8211b64cd Distinguish slow from fast sloppy arguments
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1221713003

Cr-Commit-Position: refs/heads/master@{#29447}
2015-07-02 14:38:53 +00:00
verwaest
efbb4c6cdc Back off normalizing on set length in sync with adding a property
BUG=

Review URL: https://codereview.chromium.org/1211833002

Cr-Commit-Position: refs/heads/master@{#29298}
2015-06-25 15:04:59 +00:00
verwaest
3f336d4144 Only try to delete dictionary elements if the length is actually reduced
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1209983002

Cr-Commit-Position: refs/heads/master@{#29297}
2015-06-25 14:46:04 +00:00
verwaest
4eed4970fd Move Add to the elements accessor for everything but dictionary-arguments
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1205913002

Cr-Commit-Position: refs/heads/master@{#29295}
2015-06-25 14:17:19 +00:00
verwaest
f461c7a67a Move reconfiguration into the elements accessor
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1207613005

Cr-Commit-Position: refs/heads/master@{#29289}
2015-06-25 11:26:06 +00:00
verwaest
dee4895d0a Cleanup adding elements and in particular dictionary elements
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1196163005

Cr-Commit-Position: refs/heads/master@{#29232}
2015-06-23 13:35:12 +00:00
verwaest
046e91dd1a Move SetFastElementsCapacity into GrowCapacityAndConvert
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1197133003

Cr-Commit-Position: refs/heads/master@{#29222}
2015-06-23 09:44:28 +00:00
verwaest
55a6a49777 Remove duplicate isolate
BUG=

Review URL: https://codereview.chromium.org/1196533004

Cr-Commit-Position: refs/heads/master@{#29204}
2015-06-22 19:57:56 +00:00
verwaest
6c7449a636 Move SetFastDoubleElementsCapacity into GrowCapacityAndConvert
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1193343002

Cr-Commit-Position: refs/heads/master@{#29182}
2015-06-22 11:24:19 +00:00
verwaest
57a3810280 Get rid of JSArray::Expand and friends
BUG=

Review URL: https://codereview.chromium.org/1194943004

Cr-Commit-Position: refs/heads/master@{#29180}
2015-06-22 10:44:24 +00:00
verwaest
7028e4b531 Inline SetLengthWithoutNormalize into its callers
BUG=

Review URL: https://codereview.chromium.org/1194943002

Cr-Commit-Position: refs/heads/master@{#29165}
2015-06-19 18:59:25 +00:00
verwaest
8076d6ee2d More cleanup related to setting array.length
BUG=

Review URL: https://codereview.chromium.org/1191313003

Cr-Commit-Position: refs/heads/master@{#29152}
2015-06-19 14:57:11 +00:00
verwaest
be8528b3bd Split setting array length from handling new Array(non-number)
BUG=

Review URL: https://codereview.chromium.org/1193673002

Cr-Commit-Position: refs/heads/master@{#29144}
2015-06-19 11:21:37 +00:00
verwaest
0f1522f4c2 Remove handles from ElementsAccessor::Set and friends
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1196543003

Cr-Commit-Position: refs/heads/master@{#29139}
2015-06-19 09:25:22 +00:00
verwaest
691de97b3f Cleanup typed array setters, the property is guaranteed to be there.
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1180753005

Cr-Commit-Position: refs/heads/master@{#29129}
2015-06-18 19:49:39 +00:00
verwaest
72d6ed749b Return void from array setters since the return value needs to be ignored
BUG=v8:4137
LOG=n

Review URL: https://codereview.chromium.org/1188073003

Cr-Commit-Position: refs/heads/master@{#29113}
2015-06-18 12:52:00 +00:00