Commit Graph

42214 Commits

Author SHA1 Message Date
Peter Marshall
5694ac2210 [cpu-profiler] Fix a TSAN false-positive by using std::atomic
TSAN was flakily detecting a race in the Add/RemoveSampler functions.
It could also be fixed by moving the USE(atomic_->Value()); line below
the do loop in the constructor of AtomicGuard.

Given that base::AtomicValue is deprecated and std::atomic has a
compare_exchange operation with std::memory_order_seq_cst, we can just
use std::atomic_bool to fix the TSAN false-positive.

Bug: v8:7702
Change-Id: Id2038ea1ccced7339f45991263e944394e935454
Reviewed-on: https://chromium-review.googlesource.com/c/1288814
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56794}
2018-10-18 21:35:45 +00:00
Alexei Filippov
e5b4229bd1 [heap profiler] Provide detailed samples information in heap profiler
Make heap profiler provide information about each sample currently
alive. That information can be used to build diagrams of memory
allocations over time.

BUG=chromium:889545

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ibcbe2f5302263d0b3976ee4cd3601eff11375cae
Reviewed-on: https://chromium-review.googlesource.com/c/1285130
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56793}
2018-10-18 20:50:15 +00:00
Frank Tang
4555961efa Reland "[Intl] Move Intl.getCanonicalLocales to C++"
This is a reland of 30729e82a2
Also change the intl.js to remove the ", utils"

Original change's description:
> [Intl] Move Intl.getCanonicalLocales to C++
>
> Bug: v8:5751
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: I20dc0e7eda58f2d9211d0e569d553dd6fcc14fd3
> Reviewed-on: https://chromium-review.googlesource.com/c/1275807
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56747}

Bug: v8:5751
Change-Id: I0bbd5392234d23790e8c405a55e97b764d42507e
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1286956
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56792}
2018-10-18 20:39:15 +00:00
Sathya Gunasekaran
1fc8452bdf [class] Ship instance and static public class fields
Bug: v8:5367
Change-Id: I92a73692e9714b929316d8971a2258e3241bc8c6
Reviewed-on: https://chromium-review.googlesource.com/c/1288643
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56790}
2018-10-18 18:14:52 +00:00
Benedikt Meurer
39e68c5e40 [turbofan] Optimize JSResolvePromise with unreliable resolution maps.
When InferReceiverMaps doesn't provide us with reliable maps for the
resolution, we can still utilize the information if all the maps that
are found are stable - aka leaf - maps. But in that case we need to
make sure that we add proper dependencies on the stability of these
maps.

Bug: v8:7253
Change-Id: I6f5825583acc3f2575e83a244d55609ac64d04d3
Reviewed-on: https://chromium-review.googlesource.com/c/1288633
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56789}
2018-10-18 18:09:44 +00:00
Sergey Ulanov
2e70a9f7ee [Fuchsia] Use ZX_VMO_NON_RESIZABLE for zx_vmo_create()
By default zx_vmo_create() creates resizable VMOs, which may be
hazardous in some cases. It's safer to use ZX_VMO_NON_RESIZABLE unless
VMO needs to be resizable. It doesn't make much difference in
OS::Allocate() because it drops the VMO handle immediately after
mapping it, still it's better to use ZX_VMO_NON_RESIZABLE for
consistency.

Change-Id: I688ee44b08042a9df7e3fae0b1b3298271b53b1c
Reviewed-on: https://chromium-review.googlesource.com/c/1277605
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56788}
2018-10-18 18:04:43 +00:00
Ross McIlroy
d0ac176dc0 [Compiler] Avoid flaky crashes for aborted compiler dispatcher jobs.
Make sure we wait for the worker thread to finish compilation before removing
aborted jobs.

BUG=v8:8317,v8:8041

Change-Id: I42f30c4d430b7787ea5e724bdfda6460e5461233
Reviewed-on: https://chromium-review.googlesource.com/c/1288812
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56787}
2018-10-18 17:29:19 +00:00
Toon Verwaest
3cdb812c7c [parser] Reuse expression classifier across conditional lhs/rhs
Change-Id: Ibf0ee76cc19799be405f45bcba7a1d3a7c5c4d38
Reviewed-on: https://chromium-review.googlesource.com/c/1288390
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56786}
2018-10-18 17:25:02 +00:00
Toon Verwaest
6392442ee1 [parser] Only validate expressions when we have to
Since ValidateExpression just throws the only queued (first) expression error,
we can delay throwing it until the latest possible moment. That's right before
the matching expression classifier dies (goes out of scope or accumulates).

Change-Id: I4538de333b789ae786278b94b76b4799ccdf4903
Reviewed-on: https://chromium-review.googlesource.com/c/1286678
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56785}
2018-10-18 16:49:50 +00:00
Alexey Kozyatinskiy
b2b7e8deb4 inspector: do not report async tail in Debugger.scriptParsed event
Async tail might be long. On frontend side we use only top frame so
we can report tail using id.

R=dgozman@chromium.org

Bug: chromium:873865
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie9e6b5c4c000cc6bedce2d5fec9f3fa22ea21768
Reviewed-on: https://chromium-review.googlesource.com/c/1286959
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56784}
2018-10-18 16:16:57 +00:00
Toon Verwaest
236b8e9ca1 [parser] Refactor ParseMemberExpression
- Use token-range checks
- Delay ValidateExpression until after the loop
- Only queue classifier errors at the beginning
- Only inline Token-range check rather than the entire
  ParseMemberExpressionContinuation to reduce binary size.

Change-Id: Ib81ce071851fe5c13b4bb405cd883df7a82c84c9
Reviewed-on: https://chromium-review.googlesource.com/c/1286677
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56783}
2018-10-18 15:40:28 +00:00
Toon Verwaest
b95614a512 [parser] Cleanup Expect/Consume/Check usage
This also changes Consume to bypass the stackoverflow check. Otherwise the
following pattern wouldn't work:

if (peek() == expected) {
  f()
}

f() {
  Consume(expected);
}

since the call to f can cause the overflow.

Change-Id: If2fd3181ecdf1fd681f584b630e83e0af4e4bf9d
Reviewed-on: https://chromium-review.googlesource.com/c/1286684
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56782}
2018-10-18 15:34:44 +00:00
Toon Verwaest
59bed93352 [zone] Simplify and inline Zone::New
This separates the fast-non-asan path from the asan path so it can be inlined.
Additionally avoid updating allocation_size_ on each Zone::New call.
Inlining Zone::New actually reduces binary size by 50kb...

Change-Id: Ie5d58638284e5a1a5e0198c24080b0f600d79092
Reviewed-on: https://chromium-review.googlesource.com/c/1288641
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56780}
2018-10-18 14:23:11 +00:00
Toon Verwaest
c732801267 [parser] Introduce a range for automatic semicolon insertion tokens
Change-Id: Ib41ddbf15c6f9395b747b78c081e466a9f2e44bd
Reviewed-on: https://chromium-review.googlesource.com/c/1286682
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56779}
2018-10-18 14:12:33 +00:00
Benedikt Meurer
d5ee4622dd [turbofan] Infer maps of JSPerformPromiseThen and JSCreatePromise.
Teach TurboFan about the maps produced by JSPerformPromiseThen and
JSCreatePromise, which yields a ~1-2% improvement on the doxbee
promises benchmark by removing the redundant checks from the optimized
code with promise chaining.

Bug: v8:7253
Change-Id: If0edce8ba15917c1b7e76b9d06490cfffe911650
Reviewed-on: https://chromium-review.googlesource.com/c/1288639
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56778}
2018-10-18 13:33:06 +00:00
peterwmwong
350af13cd7 [builtins] Fix Array.p.join overflow detection
Additionally, introduce IntPtrDiv to CodeAssembler.

Change-Id: I9396f77b90a2fadb0179028d44475e616be3d081
Reviewed-on: https://chromium-review.googlesource.com/c/1285400
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56776}
2018-10-18 12:59:48 +00:00
Benedikt Meurer
d0ae91ee7e [turbofan] Fix Promise.resolve() lowering.
It seems that the Promise.resolve() lowering in JSCallReducer was no
longer called.

Bug: v8:7253
Change-Id: I3c80aed085d15fb54d88245b9d71b9caed7de075
Reviewed-on: https://chromium-review.googlesource.com/c/1288452
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56773}
2018-10-18 11:35:07 +00:00
Marja Hölttä
e9ac3ec88f [js weak refs] Fix cleanup task scheduling
If the user's cleanup function didn't iterate all available WeakCells, we need
to schedule the cleanup task again at some point. The previous condition
resulted it never being scheduled.

BUG=v8:8179

Change-Id: I8f5f4c01d1eb6a3cca8bd21bdc52c38663889882
Reviewed-on: https://chromium-review.googlesource.com/c/1286686
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56772}
2018-10-18 11:33:13 +00:00
Hai Dang
04941522e2 [cleanup] Use more LoadElementsKind in array generator.
Change-Id: Ic7d90d479b090670339200e4b6255fb1fb2441a5
Reviewed-on: https://chromium-review.googlesource.com/c/1288352
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56770}
2018-10-18 11:00:33 +00:00
peterwmwong
7cb6c81b8f [builtins] Fix Array.p.join handling of an index getter with side effects
When creating the buffer for the fall back, the initial entry was not
considered when calculating the size.

Bug: chromium:896181
Change-Id: I7f15bb1bdf31b3255db91b1fe8dcd68c76033980
Reviewed-on: https://chromium-review.googlesource.com/c/1286957
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#56768}
2018-10-18 10:46:23 +00:00
Sigurd Schneider
42591305d6 [ia32,root] Temporarily allow calls through slot
This is necessary for the arguments adaptor, as there are only
5 gp registers available and a call to the arguments adaptor
trampoline that does not have the trampoline address as a immediate
needs 6 (4 arguments + esi as context + register to call through).

Bug: v8:6666
Change-Id: Ie96cf0352c323e07e0daf369953df8f4ee9acb81
Reviewed-on: https://chromium-review.googlesource.com/c/1283050
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56767}
2018-10-18 10:43:03 +00:00
Georg Neis
5bc6d2413d [turbofan] Remove unnecessary line.
I had forgotten to upload this to my previous CL.

TBR: mslekova@chromium.org
Change-Id: I1195ffd947ad82226af41cd7103b389a6733f4e4
Reviewed-on: https://chromium-review.googlesource.com/c/1288590
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56766}
2018-10-18 10:03:05 +00:00
Sigurd Schneider
f6ed1f9626 [ia32] Remove ShouldGenerateIsolateIndependentCode helper
Change-Id: I4464932425f1fa0f05a644983262742fe7f25364
Bug: v8:6666
Reviewed-on: https://chromium-review.googlesource.com/c/1286679
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56765}
2018-10-18 09:31:06 +00:00
Peter Marshall
b6a351afaa [cleanup] Remove explicit from 2-arg constructor
Change-Id: I42697b4692ff30c390ded25568b8d424b03bbf19
Reviewed-on: https://chromium-review.googlesource.com/c/1288450
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56764}
2018-10-18 09:24:06 +00:00
Georg Neis
a67e37e687 [turbofan] Give each ObjectRef subclass its own object() getter.
This lets us remove the unsafe object<T>() getter.

Bug: v8:7790
Change-Id: Ie438c68d4c96f1525eee5afd252523b222dc8f53
Reviewed-on: https://chromium-review.googlesource.com/c/1288411
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56761}
2018-10-18 09:04:45 +00:00
Toon Verwaest
06d4d1e8e7 [parser] Use scope instead of explicit discarding of classifier
Change-Id: I8f5da41d11df5fce7df4f7757717fb165a6043d9
Reviewed-on: https://chromium-review.googlesource.com/c/1288391
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56760}
2018-10-18 08:50:23 +00:00
Hai Dang
779d102ca8 Use slow path in IterableToList for big input strings.
AllocateJSArray always allocates in new space, so we bailout of the fast
path for strings if the new array does not fit in new space.

Bug found by ClusterFuzz. Regression test added.

This also switches to the BranchIf pattern to avoid materialize a bool.

Bug: chromium:895860, v8:7980
Change-Id: Ic7c41268c394ac2796b7694252390ab50fd74838
Reviewed-on: https://chromium-review.googlesource.com/c/1286337
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Hai Dang <dhai@google.com>
Cr-Commit-Position: refs/heads/master@{#56759}
2018-10-18 08:44:21 +00:00
Benedikt Meurer
98aaeed699 [turbofan] Strength reduce JSResolvePromise to JSFulfillPromise.
We can strength-reduce JSResolvePromise(p,v) to JSFulfillPromise(p,v)
if the v is known to be a primitive. This not only avoids the dynamic
checks for v inside JSResolvePromise, but also removes the need to
have a frame state, as the JSFulfillPromise operation cannot call
back into arbitrary JavaScript, and thus cannot deoptimize lazily.

This triggers for example for async functions where the return value
is known (to TurboFan) to be a primitive value.

Bug: v8:7253
Change-Id: I4698d6026e0632ab3e2fef6c7f4aaacf6c2a508c
Reviewed-on: https://chromium-review.googlesource.com/c/1288449
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56758}
2018-10-18 08:43:02 +00:00
Frank Tang
bf95c6fa67 [Intl] Add Intl.Segmenter.prototype.segment
Design doc https://goo.gl/fgc2Cp

Bug: v8:6891

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I8bc5ea3137fd1b66213403ae9ea3461f40efc977
Reviewed-on: https://chromium-review.googlesource.com/c/1257923
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56757}
2018-10-18 08:08:37 +00:00
Georg Neis
829760a561 [turbofan] Don't type-check in ObjectRef cast.
We use the object<T>() getter to extract the handle from an ObjectRef
instance and cast it to Handle<T>. In DEBUG mode, the cast does a type
check which accesses the heap. We must not access the heap though. This
CL is a quick fix that skips the type check. Eventually we should
replace the templatized accessor with a subclass-specific one to have
some safety.

Bug: v8:7790, v8:8316
Change-Id: I71048be2bc36570cce33b0e680824dd6bc407d14
Reviewed-on: https://chromium-review.googlesource.com/c/1282963
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56756}
2018-10-18 07:59:09 +00:00
Toon Verwaest
785b466af2 [parser] Remove explicit EOS/ILLEGAL handling from template literal parsing
We'll automatically figure out that we can't parse an expression at the EOS
anyway.

Change-Id: I663e3b9d030ee048b28472710071778bfc511747
Reviewed-on: https://chromium-review.googlesource.com/c/1286681
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56755}
2018-10-18 07:51:28 +00:00
Georg Neis
51688352e5 [turbofan] Serialize array_constructor and string_length protectors.
We forgot to eliminate the read accesses of these two cells.

Bug: v8:7790, v8:8315
Change-Id: Id175e4d96461f88759b2d29ab1d407ba4c54e733
Reviewed-on: https://chromium-review.googlesource.com/c/1286680
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56752}
2018-10-18 07:35:17 +00:00
Michael Lippautz
fe76251df3 [heap] Add GC sum counters
Adds reporting for
- V8.GCMarkCompactor as sum of V8 mark-compact events

Bug: chromium:843903
Change-Id: I5e8a80c8d1a9c5bf696635b54659ac56403f52d5
Reviewed-on: https://chromium-review.googlesource.com/c/1256764
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56750}
2018-10-17 19:42:30 +00:00
Frank Tang
05b7a1cb3f Revert "[Intl] Move Intl.getCanonicalLocales to C++"
This reverts commit 30729e82a2.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [Intl] Move Intl.getCanonicalLocales to C++
> 
> Bug: v8:5751
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: I20dc0e7eda58f2d9211d0e569d553dd6fcc14fd3
> Reviewed-on: https://chromium-review.googlesource.com/c/1275807
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#56747}

TBR=jshin@chromium.org,gsathya@chromium.org,ftang@chromium.org

Change-Id: I236e183288f0546b8bbdca4804a1d02421c8c714
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/c/1286955
Reviewed-by: Frank Tang <ftang@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56749}
2018-10-17 19:28:41 +00:00
Junliang Yan
c7a22ed71c PPC/s390: fix compilation error for incompatible types
Change-Id: I4f4c95c92925c8778ce915d5b37517ad6e0a6145
Reviewed-on: https://chromium-review.googlesource.com/c/1286538
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#56748}
2018-10-17 17:56:54 +00:00
Frank Tang
30729e82a2 [Intl] Move Intl.getCanonicalLocales to C++
Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I20dc0e7eda58f2d9211d0e569d553dd6fcc14fd3
Reviewed-on: https://chromium-review.googlesource.com/c/1275807
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56747}
2018-10-17 17:42:52 +00:00
Sigurd Schneider
60f94823d2 [ia32] Implement PC-relative calls for snapshot code
Bug: v8:6666
Change-Id: I3e89fd09e2c8de568bf5dffdad3a5d8a9ef39ff5
Reviewed-on: https://chromium-review.googlesource.com/c/1286676
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56744}
2018-10-17 16:02:12 +00:00
Predrag Rudic
221305e98f MIPS[64]: Fix failing several Liftoff tests
Failing test are: cctest/cctest/test-run-wasm/RunWasmLiftoff*.
Test started to fail after this commit: 56b8ab5d07
This patch also fixes MIPS big endian build failure.

Change-Id: I333450f2a8f9c9a61db9aea18e5e973f48742d52
Reviewed-on: https://chromium-review.googlesource.com/c/1286348
Reviewed-by: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#56742}
2018-10-17 14:32:37 +00:00
Jakob Gruber
708be823a1 [root] Refactor root offset accessors in TurboAssembler
Some confusion has crept in over time, specifically around
the distinction between an offset to an external reference's
address and an offset to its entry in the external reference
table. This CL unifies naming and interfaces.

Drive-by: Fix formatting in macro-assembler-x64.

Bug: v8:6666
Change-Id: Iade98ca28a7304aba0254b92b553343826a08e41
Reviewed-on: https://chromium-review.googlesource.com/c/1286674
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56741}
2018-10-17 14:30:17 +00:00
Peter Marshall
d1943e9b85 [cpu-profiler] Make ProfilerEventsProcessor the CodeEventObserver.
Currently ProfilerListener channels the code events to Processor
via CpuProfiler - we don't need this indirection and can just hook
it up directly. This also makes it easier to test because we don't need
a CpuProfiler object just to test the Processor.

Drive-by cleanup:
- Remove NUMBER_OF_TYPES from CodeEventRecord as it is not used.
- Remove Isolate* parameter from AddDeoptStack and AddCurrentStack as
  a Processor object is only ever for one Isolate. Store the Isolate*
  on the ProfilerEventsProcessor object itself.
- Remove the default case from switch in ProcessCodeEvent().

Bug: v8:5193
Change-Id: I26c1a46b0eec34b5248b707d1997c3a9409a9604
Reviewed-on: https://chromium-review.googlesource.com/c/1286341
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56740}
2018-10-17 14:24:50 +00:00
Jakob Gruber
90cb014493 [ia32,root] Make remainining builtins isolate-independent
Drive-by: Fix ExternalReferenceAddressAsOperand. Now it correctly
returns an operand to within the external reference table.

Bug: v8:6666
Change-Id: I8226257f27a2747584d37fd948d66c6e9b0d7ecf
Reviewed-on: https://chromium-review.googlesource.com/c/1286671
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56739}
2018-10-17 14:23:49 +00:00
Toon Verwaest
f6eb53ed9e [parser] Output has_spread instead of first_spread_loc from ParseArguments
Change-Id: I4ceb1455875cc27c193554681b9bb3aa07bd805e
Reviewed-on: https://chromium-review.googlesource.com/c/1286345
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56735}
2018-10-17 13:25:10 +00:00
Georg Neis
9bd4ee795b [turbofan] Store native_context rather than global_proxy for JSFunction.
This will also be useful for JSCallReducer.

In order to avoid extra work, the CL restricts one path of the JSCall
lowering to functions from the own native context.

Bug: v8:7790
Change-Id: I9f3a478969d641da59661ff196fdedae8195d680
Reviewed-on: https://chromium-review.googlesource.com/c/1286335
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56733}
2018-10-17 13:09:36 +00:00
Georg Neis
4c0b56af2b Ship --harmony-namespace-exports.
This enables by the default the
  export * as foo from "bar"
syntax in modules.

Bug: v8:8101
Change-Id: I98b07d217ae08ff6a556e69cb3bf6e8f4bd46a07
Reviewed-on: https://chromium-review.googlesource.com/c/1282972
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56732}
2018-10-17 13:08:30 +00:00
Toon Verwaest
c7a8378aef [parser] Better separate arrow head and argument parsing
Change-Id: I25250eefe4ab3bbc007c9943a4a4420a8e573a8b
Reviewed-on: https://chromium-review.googlesource.com/c/1286342
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56730}
2018-10-17 12:54:27 +00:00
Jakob Gruber
1849b47ce1 [ia32,root] Make more builtins isolate-independent
This bundles a bunch of miscellaneous things to make more builtins
isolate-independent (e.g.: using tasm::Move instead of asm::mov
methods).

Drive-by: The isolate-independence whitelist was changed to a blacklist.

Bug: v8:6666
Change-Id: I7e0fbe8bb2ca3dc751ad070f1a92aebb88b43125
Reviewed-on: https://chromium-review.googlesource.com/c/1286331
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56728}
2018-10-17 12:24:44 +00:00
Takuto Ikuta
6f21893444 Specify const for operator() in LiveRangeOrdering
This is a preparation CL to remove -Wno-user-defined-warnings warning suppression.

Bug: chromium:683349
Change-Id: If883c24ebac66292329abaf01c5d328bfd51c5c9
Reviewed-on: https://chromium-review.googlesource.com/c/1286391
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56727}
2018-10-17 11:40:50 +00:00
Florian Sattler
02100d560f Compress memory by reordering members and storing bits in pointers.
Store the bits of a small type into the lower bits
of a pointer type that are free due to alignment.
Furthermore, reordering of members to reduce size of some classes.

Change-Id: I3c619cb74053f64995ea7d0cb395e8edda604f18
Reviewed-on: https://chromium-review.googlesource.com/c/1273019
Commit-Queue: Florian Sattler <sattlerf@google.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56726}
2018-10-17 11:39:05 +00:00
Deepti Gandluri
6cde186b21 [atomics] Fix I64AtomicStore/I64AtomicExchange for ia32
Change-Id: I54b34635842e62f08ff06c68b965f2e38155bad8
Bug: v8:8202
Reviewed-on: https://chromium-review.googlesource.com/c/1282932
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56725}
2018-10-17 11:35:34 +00:00
Predrag Rudic
132d2672c5 MIPS: Fix call RecordRelocInfo with mode NONE.
Calling RecordRelocInfo with NONE mode causes DCHECK in
ShouldRecordRelocInfo to fail.

Change-Id: I2525d3178c8f1f61cb6f58e7e257c206a94f0af0
Reviewed-on: https://chromium-review.googlesource.com/c/1283078
Reviewed-by: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#56724}
2018-10-17 11:28:26 +00:00