Commit Graph

1720 Commits

Author SHA1 Message Date
Yang Guo
6eb66e1cbd Revert "Remove builtin-function-id in SFI"
This reverts commit f8a676707d.

Reason for revert: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/25576

I don't think I've seen MSAN being flaky. Chances are that the change to SFI's object layout indeed left some field uninitialized.

Original change's description:
> Remove builtin-function-id in SFI
> 
> builtin_function_id corresponded to BuiltinFunctionId (a manually maintained list of 'interesting' functionsmainly used during optimization). With this change, we nuke builtin-function-id in favor of builtin-id and 8 bits is freed up in SFI.
> 
> Bug: v8:6993
> Change-Id: Iee9b539475bc6531c9aa65b1904d1402a9ef30db
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1495898
> Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#60017}

TBR=ulan@chromium.org,jgruber@chromium.org,leszeks@chromium.org,bmeurer@chromium.org,duongn@microsoft.com

Change-Id: Ic3964ce182ddbd7ef529ddb8b78b9bdfb1be7887
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6993
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1499500
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60018}
2019-03-04 19:54:05 +00:00
Z Duong Nguyen-Huu
f8a676707d Remove builtin-function-id in SFI
builtin_function_id corresponded to BuiltinFunctionId (a manually maintained list of 'interesting' functionsmainly used during optimization). With this change, we nuke builtin-function-id in favor of builtin-id and 8 bits is freed up in SFI.

Bug: v8:6993
Change-Id: Iee9b539475bc6531c9aa65b1904d1402a9ef30db
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1495898
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60017}
2019-03-04 18:41:02 +00:00
Simon Zünd
f35ad6ecd4 [torque-ls] Port tests from cctest to unittest
Moving to gtest allows negative test cases as the current parser
implementation exits the process on a parser error. The CL adds two
small negative tests. The idea is less to get full coverage, but to
have a place for regression tests.

Drive-by-change: Lexer errors need a valid source position scope and
Json parser needs a valid SourceId, otherwise we read OOB when the
error message is generated.

R=petermarshall@chromium.org

Bug: v8:8880
Change-Id: I56c4b9e0a29c8333b2e5e44f8116e5178552d2f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1498472
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60014}
2019-03-04 17:04:02 +00:00
peterwmwong
acdaa4c713 [typedarray] Port TypedArray#slice to Torque.
Bug: v8:8906
Change-Id: I7a07482d2d5de13de11fa2611e3c6ae18439e820
Reviewed-on: https://chromium-review.googlesource.com/c/1493136
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60007}
2019-03-04 14:10:51 +00:00
Mike Stanton
40c9cce4dd [Torque] Move some TypedArray builtins to Torque
This CL moves the following builtins from CSA to Torque:

TypedArray.prototype.forEach
TypedArray.prototype.reduce
TypedArray.prototype.reduceRight

A space-saving decision was made in the design -- instead of emitting
versions of the central loop for each ElementsKind, a function
pointer which knows how to read from the appropriate TypedArray
ElementsKind is constructed at the outset, and passed into the
loop. This enormously reduces codesize for the TypedArray builtins.
We'll have to see if the overhead of the builtin call affects
performance too adversely.

BUG: v8:8906
Change-Id: I808cd70f58ddbde18f85e5b2a9be0b883a3f6647
Reviewed-on: https://chromium-review.googlesource.com/c/1484292
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59970}
2019-03-01 12:46:25 +00:00
Simon Zünd
9911fd13cc [torque-ls] Add prototype language server implementation for Torque
Design Doc: https://goo.gl/9G9d9k

The initial prototype consists of a few parts:

The VS Code extension is now built using TypeScript. The build artifact
is checked-in along side the extension. The extension now starts up
the language server when it is activated. The path to the LS
executable is configurable via VS Code settings.

The language server is a separate executable. It adds a light-weight
object model on top of a Json Parser for reading/writing LSP requests
and responses. The current server is very much bare-bones featurewise:
    - Tell the client that the server can handle "goto definition"
    - Recompile when Torque files change
    - Goto definition support for Macros/Builtins, local variables
      and arguments.

R=mathias@chromium.org, mvstanton@chromium.org, tebbi@chromium.org

Bug: v8:8880
Change-Id: Ie9b433e64ee63e9aa757b6bf71e5d52beb15b079
Reviewed-on: https://chromium-review.googlesource.com/c/1494354
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59960}
2019-03-01 09:30:47 +00:00
Maciej Goszczycki
b0bcd45d83 [heap] Isolate read-only space creation
This provides a single point where read-only space sharing will be
controlled. Eventually ReadOnlyDeserializer will take ReadOnlyHeap
instead of Isolate, first steps include
https://chromium-review.googlesource.com/c/v8/v8/+/1483054

Bug: v8:7464
Change-Id: I213819aeca6fca335235025c9195edf474230eda
Reviewed-on: https://chromium-review.googlesource.com/c/1489087
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59954}
2019-02-28 16:56:07 +00:00
Simon Zünd
3f057d44de [torque] Introduce LanguageServerData class
This CL introduces a new contextual 'LanguageSererData'. Its purpose
is to hold all the eagerly calculated data needed to answer
language server requests. The first thing collected are the
definitoins of some IdentifierExpresisons and macro/builtin
call-sites.

Collecting this data is not necessary for normal compilation, so it
is disabled by default and can be enabled via a Torque compiler
option. Since the holder class is a contextual for which no scope
exists during normal compilation, accidental collection of
unnecessary language server data *should* be prevented.

R=tebbi@chromium.org

Bug: v8:7793
Change-Id: Iffcebad4c420a0a51b1ed3c37a37c3475c6ab2e8
Reviewed-on: https://chromium-review.googlesource.com/c/1491594
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59941}
2019-02-28 12:11:24 +00:00
Michael Achenbach
459125197f [test] Skip test with gcc build
Also enable test runner to differentiate between clang and gcc.

Bug: v8:8919
Change-Id: Icdcae0aba3644a1b1b9ddc6c037eabde27d717f7
Reviewed-on: https://chromium-review.googlesource.com/c/1491634
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59906}
2019-02-27 14:46:02 +00:00
Mike Stanton
ada192fe21 [Torque] Port Array.prototype.find and findIndex to Torque
Happily, with the port of Array.prototype.find and findIndex, we can
remove a large set of library functions from array-builtins-gen.cc.

BUG: v8:7672
Change-Id: I74e07fe00162b34b2246c868386d4551ba4dc032
Reviewed-on: https://chromium-review.googlesource.com/c/1484296
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59902}
2019-02-27 14:12:38 +00:00
peterwmwong
1937e2b128 Reland "[typedarray] Port TA#subarray and TypedArraySpeciesCreate to Torque"
This is a reland of 19291bfc58

Same as original, but with ThrowTypeError/ThrowRange updated to use an implicit context.

Original change's description:
> [typedarray] Port TA#subarray and TypedArraySpeciesCreate to Torque
>
> Reduces TypedArrayPrototypeSubArray builtin size by 392 bytes:
>   - TFJ Builtin, TypedArrayPrototypeSubArray, 2448 -> 2056
>
> Small 3-4% perf increase on JSTests/TypedArrays/SubarrayNoSpecies benchmark
>
> Bug: v8:7161, v8:8906
> Change-Id: Ia2b906a93db7199ca4592c46c40638cca0a33eec
> Reviewed-on: https://chromium-review.googlesource.com/c/1485241
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#59894}

Bug: v8:7161, v8:8906
Change-Id: Ic3784e2d4db262b1968ba467b7b46b98203f11d4
Reviewed-on: https://chromium-review.googlesource.com/c/1491533
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59901}
2019-02-27 14:11:33 +00:00
Peter Wong
f0c90e2f9e Revert "[typedarray] Port TA#subarray and TypedArraySpeciesCreate to Torque"
This reverts commit 19291bfc58.

Reason for revert: https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8920369361383698384/+/steps/build/0/steps/compile/0/stdout

ThrowTypeError's method signature changed this morning


Original change's description:
> [typedarray] Port TA#subarray and TypedArraySpeciesCreate to Torque
> 
> Reduces TypedArrayPrototypeSubArray builtin size by 392 bytes:
>   - TFJ Builtin, TypedArrayPrototypeSubArray, 2448 -> 2056
> 
> Small 3-4% perf increase on JSTests/TypedArrays/SubarrayNoSpecies benchmark
> 
> Bug: v8:7161, v8:8906
> Change-Id: Ia2b906a93db7199ca4592c46c40638cca0a33eec
> Reviewed-on: https://chromium-review.googlesource.com/c/1485241
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
> Cr-Commit-Position: refs/heads/master@{#59894}

TBR=peter.wm.wong@gmail.com,jgruber@chromium.org,petermarshall@chromium.org,szuend@chromium.org

Change-Id: Ic0eaa07e57df3c365b52fb3c5de8eb7c3d9f71e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7161, v8:8906
Reviewed-on: https://chromium-review.googlesource.com/c/1491532
Reviewed-by: Peter Wong <peter.wm.wong@gmail.com>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59896}
2019-02-27 12:22:34 +00:00
peterwmwong
19291bfc58 [typedarray] Port TA#subarray and TypedArraySpeciesCreate to Torque
Reduces TypedArrayPrototypeSubArray builtin size by 392 bytes:
  - TFJ Builtin, TypedArrayPrototypeSubArray, 2448 -> 2056

Small 3-4% perf increase on JSTests/TypedArrays/SubarrayNoSpecies benchmark

Bug: v8:7161, v8:8906
Change-Id: Ia2b906a93db7199ca4592c46c40638cca0a33eec
Reviewed-on: https://chromium-review.googlesource.com/c/1485241
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59894}
2019-02-27 12:17:23 +00:00
Sigurd Schneider
31a8f21576 [cleanup] Move ZoneSplayTree to its own header
Change-Id: I4bd02bdb68727b6242b0fe4b81fd522813b13f39
Bug: v8:8834
Reviewed-on: https://chromium-review.googlesource.com/c/1488755
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59875}
2019-02-26 15:39:39 +00:00
Simon Zünd
45dfb6c340 [torque-ls] Implement basic Json parser for the language server
This CL contains a basic Json parser used to read and write the
Json-RPC messages of the language server protocol.

This CL is part of the initial language server implementation but
submitted separately for easier review.

R=tebbi@chromium.org

Bug: v8:8880
Change-Id: Icea040975e1ed1d587954c3342d8d876e01c26b8
Reviewed-on: https://chromium-review.googlesource.com/c/1479956
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59848}
2019-02-26 07:38:03 +00:00
Mike Stanton
45ed388d3b Reland "[Torque] Port Array.prototype.reduce and reduceRight to Torque"
A custom deoptimization continuation point erroneously cast a parameter
to a number. Tests added.

BUG: v8:7672
Change-Id: I59848aacdedc1de9fd7d83d55045618f37d39fb0
Reviewed-on: https://chromium-review.googlesource.com/c/1485974
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59841}
2019-02-25 17:05:23 +00:00
Sigurd Schneider
de0a8c789e Revert "[Torque] Port Array.prototype.reduce and reduceRight to Torque"
This reverts commit b3d8eeb6eb.

Reason for revert: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win7-rel/25961

Original change's description:
> [Torque] Port Array.prototype.reduce and reduceRight to Torque
> 
> BUG: v8:7672
> Change-Id: I8816ab9051e7900119fd65c239f9e207f5c3d417
> Reviewed-on: https://chromium-review.googlesource.com/c/1478697
> Commit-Queue: Michael Stanton <mvstanton@chromium.org>
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59807}

TBR=mvstanton@chromium.org,tebbi@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ib15bd4499618a22185d8ef173c4df7b7d55f54ce
Reviewed-on: https://chromium-review.googlesource.com/c/1485971
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59828}
2019-02-25 13:30:16 +00:00
Ross McIlroy
ec9aef3d1e [Runtime] Ensure template objects are retained if bytecode is flushed.
Template objects should be cached after they are first created and reused on
subsiquent calls to tag functions. Currently these cached objects are stored
on the feedback vector, which has appropriate lifetime, however with bytecode
flushing the feedback vector could be cleared when the bytecode is flushed,
causing the template object to be dropped.

In order to retain the cached template objects in the face of bytecode flushing,
this CL adds a weakmap for each native context that is (weakly) keyed by
shared function info, and holds a linked list of cached template objects
associated with that shared function info, indexed by feedback vector slot id.
Misses will check this weakmap, and if no entry is found, a new template object
is created and added into this weakmap alongside the feedback vector.

BUG=v8:8799,v8:8799,v8:8395

Change-Id: Ia95d5cfc394ce58dc9fe6a1e49780f05299acc17
Reviewed-on: https://chromium-review.googlesource.com/c/1477746
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59818}
2019-02-25 11:20:06 +00:00
Tobias Tebbi
05715e53a0 [build][torque] include src/globals.h in Torque
Bug: v8:8863
Change-Id: I8907b7b0b7dfa53a2e1e607c0bad26939d312f4e
Reviewed-on: https://chromium-review.googlesource.com/c/1485836
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59816}
2019-02-25 11:15:06 +00:00
Mike Stanton
b3d8eeb6eb [Torque] Port Array.prototype.reduce and reduceRight to Torque
BUG: v8:7672
Change-Id: I8816ab9051e7900119fd65c239f9e207f5c3d417
Reviewed-on: https://chromium-review.googlesource.com/c/1478697
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59807}
2019-02-23 03:56:32 +00:00
Simon Zünd
6b132181eb [torque] Extract compiler into separate function for easier reusability
R=tebbi@chromium.org

Bug: v8:7793
Change-Id: I948b77a50cead2d031d007d06e9a4892a55b2408
Reviewed-on: https://chromium-review.googlesource.com/c/1477223
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59717}
2019-02-20 06:17:07 +00:00
Sigurd Schneider
78fd0332b6 [cleanup] Improve dependency handling in gn targets
This is a step towards making gn check pass on v8 without third_party

Change-Id: I6a256d65159695e2ba2a5d44c0437cac9b28aa3a
Bug: v8:8834, v8:8855
Reviewed-on: https://chromium-review.googlesource.com/c/1475460
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59641}
2019-02-15 21:52:32 +00:00
Mike Stanton
9bf0c69674 [Torque] Implement Array.prototype.every and some in Torque
Just a straightforward port.

bug:v8:7672

Change-Id: Ie2511cda23d7b61775e3619d61dde43c8ae48c7f
Reviewed-on: https://chromium-review.googlesource.com/c/1425916
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59638}
2019-02-15 19:10:40 +00:00
Tobias Tebbi
6beea97e09 Reland^2 "[build] disable C++ optimization for mksnapshot code."
This is a reland of a6b95a6acf

In addition to UBSan, also ASAN needs optimizations.
So this CL doesn't disable optimizations for all sanitizer builds.

Original change's description:
> Reland "[build] disable C++ optimization for mksnapshot code."
>
> This is a reland of cee2f772c7
>
> Original change's description:
> > [build] disable C++ optimization for mksnapshot code.
> >
> > By disabling C++ optimizations for code that's only run in mksnapshot,
> > that is, CSA and Torque-generated code, we can save compile time.
> > I observed up to 2x improvements of compile time for some files,
> > while the mksnapshot time did not increase significantly.
> >
> > Bug: v8:7629
> > Change-Id: I96be2966611b2471b68023e0dd9e351d94f0013c
> > Reviewed-on: https://chromium-review.googlesource.com/c/1460941
> > Reviewed-by: Yang Guo <yangguo@chromium.org>
> > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#59585}
>
> Bug: v8:7629
> Change-Id: I8330f93173ab3d7b400e15ea4935bbe8256b250f
> Reviewed-on: https://chromium-review.googlesource.com/c/1473292
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59606}

Bug: v8:7629
Change-Id: I42175c472d8e41345573df81645dfe3accc9d8c4
Reviewed-on: https://chromium-review.googlesource.com/c/1475396
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59632}
2019-02-15 14:44:29 +00:00
Benedikt Meurer
e17e46fde6 [isolate] Move ThreadLocalTop into IsolateData.
This refactors the ThreadLocalTop into separate header and
implementation files, and moves it from the Isolate to the
IsolateData (with some tweaks to make the layout of the class
predictable). This has the advantage that all external references
referring to addresses in the ThreadLocalTop (like js_entry_sp,
c_function, c_entry_fp, etc.) need only a single memory access
to reach them. For example the CallApiCallback can now use

```
mov %rbp,0x8e40(%r13)
mov %rsi,0x8de0(%r13)
mov %rbx,0x8e50(%r13)
```

to setup the information about context, frame pointer, and C++
function pointer in the ThreadLocalTop instead of the previously
generated code

```
mov 0x2e28(%r13),%r10
mov %rbp,(%r10)
mov 0x2e38(%r13),%r10
mov %rsi,(%r10)
mov 0x2e30(%r13),%r10
mov %rbx,(%r10)
```

which always had to load the scratch register %r10 with the actual
address first. This has interesting performance impact. On the
test case mentioned in v8:8820 (with the `d8` patch applied), the
performance goes from

```
console.timeEnd: fnMono, 2290.012000
console.timeEnd: fnCall, 2604.954000
```

to

```
console.timeEnd: fnMono, 2062.743000
console.timeEnd: fnCall, 2477.556000
```

which is a pretty solid **10%** improvement for the monomorphic API
accessor case, and a **5%** improvement for calling into the API
accessor instead.

But there might as well be other places besides API callback calls
that will benefit from this change, which I haven't tested explicitly.

Although this change is supposed to be as minimal as possible without
any functional effects, some changes were necessary/logical. Eventually
we should reconsider changing the layout and the types for the fields
in the ThreadLocalTop to be more consistent with the other IsolateData
entities. But this can be done in separate follow-up CLs, as this will
be quite a bit of churn on the code base, depending on how we do that
exactly, and is orthogonal to this optimization.

Bug: v8:8820, v8:8848, chromium:913553
Change-Id: I4732c8e60231f0312eb7767358c48bae0338220d
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/1474230
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59624}
2019-02-15 09:55:56 +00:00
Jakob Kummerow
6cac1382f4 [cleanup] #include heap-inl.h less often
This takes heap-inl.h out of the "Giant Include Cluster".
Naturally, that means adding a bunch of explicit includes
in a bunch of places that relied on transitively including
them before.
As of this patch, no header file outside src/heap/ includes
heap-inl.h.

Bug: v8:8562,v8:8499
Change-Id: I65fa763f90e66afc30d105b9277792721f05a6d4
Reviewed-on: https://chromium-review.googlesource.com/c/1459659
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59617}
2019-02-15 06:22:53 +00:00
Michael Achenbach
0e229b9dbe Revert "Reland "[build] disable C++ optimization for mksnapshot code.""
This reverts commit a6b95a6acf.

Reason for revert:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Clusterfuzz%20Win64%20ASAN%20-%20release%20builder/6984

Original change's description:
> Reland "[build] disable C++ optimization for mksnapshot code."
> 
> This is a reland of cee2f772c7
> 
> Original change's description:
> > [build] disable C++ optimization for mksnapshot code.
> > 
> > By disabling C++ optimizations for code that's only run in mksnapshot,
> > that is, CSA and Torque-generated code, we can save compile time.
> > I observed up to 2x improvements of compile time for some files,
> > while the mksnapshot time did not increase significantly.
> > 
> > Bug: v8:7629
> > Change-Id: I96be2966611b2471b68023e0dd9e351d94f0013c
> > Reviewed-on: https://chromium-review.googlesource.com/c/1460941
> > Reviewed-by: Yang Guo <yangguo@chromium.org>
> > Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> > Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#59585}
> 
> Bug: v8:7629
> Change-Id: I8330f93173ab3d7b400e15ea4935bbe8256b250f
> Reviewed-on: https://chromium-review.googlesource.com/c/1473292
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59606}

TBR=yangguo@chromium.org,sigurds@chromium.org,tebbi@chromium.org

Change-Id: Ifdad207913a1814580c3055e57c6bfc2c6a53ae6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7629
Reviewed-on: https://chromium-review.googlesource.com/c/1473294
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59608}
2019-02-14 17:18:19 +00:00
Tobias Tebbi
a6b95a6acf Reland "[build] disable C++ optimization for mksnapshot code."
This is a reland of cee2f772c7

Original change's description:
> [build] disable C++ optimization for mksnapshot code.
> 
> By disabling C++ optimizations for code that's only run in mksnapshot,
> that is, CSA and Torque-generated code, we can save compile time.
> I observed up to 2x improvements of compile time for some files,
> while the mksnapshot time did not increase significantly.
> 
> Bug: v8:7629
> Change-Id: I96be2966611b2471b68023e0dd9e351d94f0013c
> Reviewed-on: https://chromium-review.googlesource.com/c/1460941
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59585}

Bug: v8:7629
Change-Id: I8330f93173ab3d7b400e15ea4935bbe8256b250f
Reviewed-on: https://chromium-review.googlesource.com/c/1473292
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59606}
2019-02-14 16:59:58 +00:00
Tobias Tebbi
754987938b Revert "[build] disable C++ optimization for mksnapshot code."
This reverts commit cee2f772c7.

Reason for revert: Breaks sanitizer builds: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20UBSan/4682

Original change's description:
> [build] disable C++ optimization for mksnapshot code.
> 
> By disabling C++ optimizations for code that's only run in mksnapshot,
> that is, CSA and Torque-generated code, we can save compile time.
> I observed up to 2x improvements of compile time for some files,
> while the mksnapshot time did not increase significantly.
> 
> Bug: v8:7629
> Change-Id: I96be2966611b2471b68023e0dd9e351d94f0013c
> Reviewed-on: https://chromium-review.googlesource.com/c/1460941
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59585}

TBR=yangguo@chromium.org,sigurds@chromium.org,tebbi@chromium.org

Change-Id: I50da40da167f49a14e3a8994377c4f9dafdfe2ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7629
Reviewed-on: https://chromium-review.googlesource.com/c/1472630
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59586}
2019-02-14 09:50:48 +00:00
Tobias Tebbi
cee2f772c7 [build] disable C++ optimization for mksnapshot code.
By disabling C++ optimizations for code that's only run in mksnapshot,
that is, CSA and Torque-generated code, we can save compile time.
I observed up to 2x improvements of compile time for some files,
while the mksnapshot time did not increase significantly.

Bug: v8:7629
Change-Id: I96be2966611b2471b68023e0dd9e351d94f0013c
Reviewed-on: https://chromium-review.googlesource.com/c/1460941
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59585}
2019-02-14 09:29:56 +00:00
Takuto Ikuta
acd2a7f1b0 small fix for BUILD.gn
Header generating action needs to be in public_deps if generated header is included from header file in the targets depending on the action target.

See below reference for more details.
https://gn.googlesource.com/gn/+/master/docs/reference.md#var_public_deps

Bug: chromium:931596
Change-Id: I198d9e09b8585b213ec4b375f10aecc6268f3bdd
Reviewed-on: https://chromium-review.googlesource.com/c/1469545
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59579}
2019-02-13 21:59:29 +00:00
Maciej Goszczycki
685a20cac0 [cleanup] Move comment closer to code it describes
Bug: v8:8562
Change-Id: I7f65b4cd92bb08434afe3a18512223adaf47feec
Reviewed-on: https://chromium-review.googlesource.com/c/1470112
Commit-Queue: Maciej Goszczycki <goszczycki@google.com>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59577}
2019-02-13 17:41:38 +00:00
Sigurd Schneider
b9ae3b7f1b Refactor how header defines are handled in V8 build files
TBR=yangguo@chromium.org

Change-Id: I28b549cc569e654482cc77f0de269eb33ea12569
Bug: v8:8788
Reviewed-on: https://chromium-review.googlesource.com/c/1463782
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59565}
2019-02-13 14:49:23 +00:00
Nico Weber
bff96cef06 v8: Fix -Wextra-semi warnings, enable warning.
For macros expanding to function definitions, I removed the spurious ; after
macro invocations. For macros expandign to function declarations, I made the ;
required and consistently inserted it.

No behavior change.

Bug: chromium:926235
Change-Id: Ib8085d85d913d74307e3481f7fee4b7dc78c7549
Reviewed-on: https://chromium-review.googlesource.com/c/1467545
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59558}
2019-02-13 14:11:28 +00:00
Simon Zünd
6e05eefe78 [stack trace] Introduce StackTraceFrame object
The StackTraceFrame object will be used in a future CL to replace
StackFrameInfo as the object returned by the inspector API, as well
as the object used in the stack_frame_cache.

The object itself is a simple wrapper around a reference to a
FrameArray plus an index, as well as a reference to a
StackFrameInfo object that will get lazily initialized.

This is the first step towards unifying stack trace representation
and collection.

R=jgruber@chromium.org

Bug: v8:8742
Change-Id: Iefc7d734fd274ffd164ddf6f43c226531aa26d4c
Reviewed-on: https://chromium-review.googlesource.com/c/1458017
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59544}
2019-02-13 07:24:18 +00:00
Sigurd Schneider
a4669ba16c Add target for common test headers
Change-Id: I2bd8027801e978a4469aa18daedf2d7b3a6a0322
Reviewed-on: https://chromium-review.googlesource.com/c/1463524
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59520}
2019-02-12 09:30:01 +00:00
Ujjwal Sharma
155ccadda6 [string] port String.p.endsWith to torque
Port String.prototype.endsWith from a CPP builtin to a Torque builtin.

Spec: https://tc39.github.io/ecma262/#sec-string.prototype.endswith
Bug: v8:8400
Change-Id: I4ac8cb92acb68389db844deaecc9ae1c6e7d6bd5
Reviewed-on: https://chromium-review.googlesource.com/c/1454677
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59441}
2019-02-07 15:39:18 +00:00
Sigurd Schneider
0c20a4c6aa [cleanup] Move Code class out of objects.cc
Drive-by: Refactor FlushInstructionCache to its own header. This removes
dependencies of objects.cc and code.cc

Bug: v8:8562
Change-Id: If23f3b9d4f2068e08c61c0f4b070ecfe1b9a6cc0
Reviewed-on: https://chromium-review.googlesource.com/c/1456081
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59435}
2019-02-07 12:37:06 +00:00
Daniel Bratell
db0165adc2 Removed reference to deleted assembler-arch-inl.h
src/assembler-arch-inl.h was deleted in November but it
remained in the build system. This patch also removes it from
the build system.

Change-Id: Ib384943861156d603636dc3069130cd6c5dfd4ef
Reviewed-on: https://chromium-review.googlesource.com/c/1456100
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#59396}
2019-02-06 12:51:01 +00:00
Ujjwal Sharma
44ffcca488 [string] port String.p.startsWith to torque
Port String.prototype.startsWith from a CPP builtin to a Torque builtin.

Spec: https://tc39.github.io/ecma262/#sec-string.prototype.startswith

Bug: v8:8400
Change-Id: I51aff0b3a4126c17ab4f89763019fd7e4ba665d9
Reviewed-on: https://chromium-review.googlesource.com/c/1361340
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59355}
2019-02-05 08:13:37 +00:00
Takuto Ikuta
bddc6aa556 Reland "Reland "Extract JSObject class from objects.cc""
This is a reland of 83908b865b

Fix: check V8_INTL_SUPPORT macro in js-objects.cc

Original change's description:
> Reland "Extract JSObject class from objects.cc"
>
> This is a reland of b8c821f4e2
>
> Fix: include src/string-stream.h for compile failure
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20builder/39320
>
> Original change's description:
> > Extract JSObject class from objects.cc
> >
> > I extracted following class member functions to js-objects.cc
> > * JSReceiver
> > * JSObject
> > * JSBoundFunction
> > * JSFunction
> > * JSGlobalObject
> > * JSDate
> > * JSMessageObject
> >
> > Declaration of all above class are in js-objects.h.
> >
> > I also moved AllocationSite::DigestTransitionFeedback used in JSObject::UpdateAllocationSite
> > and ShouldConvertToSlowElements used in JSObject and JSArray
> >
> > This patch makes compile time of objects.cc from 17.6s to 14.1s on Z840 Linux.
> > And js-objects.cc takes 8.69s for compile.
> >
> > Bug: v8:7629
> > Change-Id: I989f22363667445dd28d7f8c06c81ff79d6ed45f
> > Reviewed-on: https://chromium-review.googlesource.com/c/1447916
> > Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > Reviewed-by: Marja Hölttä <marja@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#59288}
>
> Bug: v8:7629
> Bug: v8:8562
> Change-Id: Iac2227c5f0c5a4072d16814ecae481fb4720e4f5
> Reviewed-on: https://chromium-review.googlesource.com/c/1449951
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59318}

Bug: v8:7629, v8:8562
Change-Id: If8870bd579d8597d08981a83492f60595e081a65
Reviewed-on: https://chromium-review.googlesource.com/c/1452097
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59329}
2019-02-04 10:53:56 +00:00
Takuto Ikuta
9023013f64 Revert "Reland "Extract JSObject class from objects.cc""
This reverts commit 83908b865b.

Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20noi18n%20-%20debug/25074

Original change's description:
> Reland "Extract JSObject class from objects.cc"
> 
> This is a reland of b8c821f4e2
> 
> Fix: include src/string-stream.h for compile failure
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20builder/39320
> 
> Original change's description:
> > Extract JSObject class from objects.cc
> >
> > I extracted following class member functions to js-objects.cc
> > * JSReceiver
> > * JSObject
> > * JSBoundFunction
> > * JSFunction
> > * JSGlobalObject
> > * JSDate
> > * JSMessageObject
> >
> > Declaration of all above class are in js-objects.h.
> >
> > I also moved AllocationSite::DigestTransitionFeedback used in JSObject::UpdateAllocationSite
> > and ShouldConvertToSlowElements used in JSObject and JSArray
> >
> > This patch makes compile time of objects.cc from 17.6s to 14.1s on Z840 Linux.
> > And js-objects.cc takes 8.69s for compile.
> >
> > Bug: v8:7629
> > Change-Id: I989f22363667445dd28d7f8c06c81ff79d6ed45f
> > Reviewed-on: https://chromium-review.googlesource.com/c/1447916
> > Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > Reviewed-by: Marja Hölttä <marja@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#59288}
> 
> Bug: v8:7629
> Bug: v8:8562
> Change-Id: Iac2227c5f0c5a4072d16814ecae481fb4720e4f5
> Reviewed-on: https://chromium-review.googlesource.com/c/1449951
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59318}

TBR=marja@chromium.org,mstarzinger@chromium.org,titzer@chromium.org,tikuta@chromium.org

Change-Id: I3260edecb1434bbf9c25d89c9f9a8af02d106855
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7629, v8:8562
Reviewed-on: https://chromium-review.googlesource.com/c/1452096
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59324}
2019-02-04 10:05:10 +00:00
Daniel Clifford
a177078acd [torque] Support non-tagged fields in classes
In the process add missing base	Torque functionality for 8-bit and
16-bit integers and Cast<> operators to make them easy to use.

As a poster child, port the field declarations of SharedFunctionInfo
to the class definition in base.tq.

As a drive by: Add the missing GN dependency on
class-definitions-from-dsl.h

Bug: v8:7793
Change-Id: I76a41c2e81ffd1cbb90ac7a4ef8d4003ac86e8dc
Reviewed-on: https://chromium-review.googlesource.com/c/1445882
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59321}
2019-02-04 09:32:59 +00:00
Takuto Ikuta
83908b865b Reland "Extract JSObject class from objects.cc"
This is a reland of b8c821f4e2

Fix: include src/string-stream.h for compile failure
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20builder/39320

Original change's description:
> Extract JSObject class from objects.cc
>
> I extracted following class member functions to js-objects.cc
> * JSReceiver
> * JSObject
> * JSBoundFunction
> * JSFunction
> * JSGlobalObject
> * JSDate
> * JSMessageObject
>
> Declaration of all above class are in js-objects.h.
>
> I also moved AllocationSite::DigestTransitionFeedback used in JSObject::UpdateAllocationSite
> and ShouldConvertToSlowElements used in JSObject and JSArray
>
> This patch makes compile time of objects.cc from 17.6s to 14.1s on Z840 Linux.
> And js-objects.cc takes 8.69s for compile.
>
> Bug: v8:7629
> Change-Id: I989f22363667445dd28d7f8c06c81ff79d6ed45f
> Reviewed-on: https://chromium-review.googlesource.com/c/1447916
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59288}

Bug: v8:7629
Bug: v8:8562
Change-Id: Iac2227c5f0c5a4072d16814ecae481fb4720e4f5
Reviewed-on: https://chromium-review.googlesource.com/c/1449951
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59318}
2019-02-04 09:18:58 +00:00
Clemens Hammacher
d0a754e0ea Revert "Extract JSObject class from objects.cc"
This reverts commit b8c821f4e2.

Reason for revert: compile errors, e.g. https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20builder/39320

Original change's description:
> Extract JSObject class from objects.cc
> 
> I extracted following class member functions to js-objects.cc
> * JSReceiver
> * JSObject
> * JSBoundFunction
> * JSFunction
> * JSGlobalObject
> * JSDate
> * JSMessageObject
> 
> Declaration of all above class are in js-objects.h.
> 
> I also moved AllocationSite::DigestTransitionFeedback used in JSObject::UpdateAllocationSite
> and ShouldConvertToSlowElements used in JSObject and JSArray
> 
> This patch makes compile time of objects.cc from 17.6s to 14.1s on Z840 Linux.
> And js-objects.cc takes 8.69s for compile.
> 
> Bug: v8:7629
> Change-Id: I989f22363667445dd28d7f8c06c81ff79d6ed45f
> Reviewed-on: https://chromium-review.googlesource.com/c/1447916
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59288}

TBR=marja@chromium.org,mstarzinger@chromium.org,titzer@chromium.org,tikuta@chromium.org

Change-Id: I18a8af8a7970f96b2ec3e56b2b1871b4f080ab01
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7629
Reviewed-on: https://chromium-review.googlesource.com/c/1449635
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59289}
2019-02-01 13:12:04 +00:00
Takuto Ikuta
b8c821f4e2 Extract JSObject class from objects.cc
I extracted following class member functions to js-objects.cc
* JSReceiver
* JSObject
* JSBoundFunction
* JSFunction
* JSGlobalObject
* JSDate
* JSMessageObject

Declaration of all above class are in js-objects.h.

I also moved AllocationSite::DigestTransitionFeedback used in JSObject::UpdateAllocationSite
and ShouldConvertToSlowElements used in JSObject and JSArray

This patch makes compile time of objects.cc from 17.6s to 14.1s on Z840 Linux.
And js-objects.cc takes 8.69s for compile.

Bug: v8:7629
Change-Id: I989f22363667445dd28d7f8c06c81ff79d6ed45f
Reviewed-on: https://chromium-review.googlesource.com/c/1447916
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59288}
2019-02-01 13:01:20 +00:00
Maya Lekova
5942be932e Revert "Reland "Enable 31bit Smis everywhere""
This reverts commit b43e9d5e75.

Reason for revert: Speculative revert, possibly breaking layout tests - https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8-Blink%20Linux%2064/29678

Original change's description:
> Reland "Enable 31bit Smis everywhere"
> 
> This is a reland of c1bf25bb68
> 
> Node bot will turn green after github.com/v8/node/pull/89/
> has landed.
> 
> Original change's description:
> > Enable 31bit Smis everywhere
> >
> > This is a experiment to see how performance is impacted. If we tank
> > too much, we can revert this change.
> >
> > Change-Id: I01be33f5dd78aee6a5beecdc62adbaa6c3850eb1
> > Bug: v8:8344
> > Reviewed-on: https://chromium-review.googlesource.com/c/1355279
> > Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> > Reviewed-by: Igor Sheludko <ishell@chromium.org>
> > Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58157}
> 
> Bug: v8:8344
> Change-Id: I85a6e5c479f1090f50df3df042571227279a0692
> Reviewed-on: https://chromium-review.googlesource.com/c/1448314
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59251}

TBR=jarin@chromium.org,sigurds@chromium.org,ishell@chromium.org

Change-Id: Ie388de7e1cc28fcf8bc576f564f3b463002bf1b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1449533
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59272}
2019-02-01 09:17:47 +00:00
Takuto Ikuta
238ccdef91 Extract Map class from objects.cc
I extracted following class member functions to map.cc
* Map
* NormalizedMapCache

Declaration of all above class are in map.h.

This patch makes compile time of objects.cc from 18.9s to 17.6s on Z840 Linux.
And map.cc takes 6.14s for compile.

Bug: v8:7629
Change-Id: Id1e45dff243ab3f5449c0a7e2a861fba0bc7abf6
Reviewed-on: https://chromium-review.googlesource.com/c/1447914
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59270}
2019-02-01 08:31:09 +00:00
Sigurd Schneider
b43e9d5e75 Reland "Enable 31bit Smis everywhere"
This is a reland of c1bf25bb68

Node bot will turn green after github.com/v8/node/pull/89/
has landed.

Original change's description:
> Enable 31bit Smis everywhere
>
> This is a experiment to see how performance is impacted. If we tank
> too much, we can revert this change.
>
> Change-Id: I01be33f5dd78aee6a5beecdc62adbaa6c3850eb1
> Bug: v8:8344
> Reviewed-on: https://chromium-review.googlesource.com/c/1355279
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58157}

Bug: v8:8344
Change-Id: I85a6e5c479f1090f50df3df042571227279a0692
Reviewed-on: https://chromium-review.googlesource.com/c/1448314
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59251}
2019-01-31 16:07:33 +00:00
Sigurd Schneider
0194eb5867 Fix pointer-compression related #defines
1) Ensure 31bit Smis are enabled if pointer compression is.
2) Enable some code for 31bit Smis

Bug: v8:8344
Change-Id: Ib1e68ebfcfd49e16d1548879b7670c88dc73449b
Reviewed-on: https://chromium-review.googlesource.com/c/1445979
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59248}
2019-01-31 15:27:16 +00:00