Commit Graph

9562 Commits

Author SHA1 Message Date
Junliang Yan
497b6746be [wasm] skip big-endian failing tests across all big-endian platforms
Bug: v8:6020
Change-Id: If121d2813e81e11773c42c36893b63ff98fc0247
Reviewed-on: https://chromium-review.googlesource.com/1101840
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53772}
2018-06-15 17:58:22 +00:00
Vasili Skurydzin
f0da6bc459 s390: Optimize branches by brxh/brxhg
Change-Id: Icb92a52112f5e709c3cdbc6f1a5555674633cb89
Reviewed-on: https://chromium-review.googlesource.com/1093554
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53771}
2018-06-15 17:56:23 +00:00
Alexey Kozyatinskiy
4363a69335 [inspector] fixed location of top level function return
We should pass false as has_braces argument to create FunctionLiteral
for top level function.

R=dgozman@chromium.org,bmeurer@chromium.org
TBR=bmeurer@chromium.org

Bug: none
Change-Id: I397f31b562d32c71f3a12bfc9ceeed16c367aa80
Reviewed-on: https://chromium-review.googlesource.com/1098018
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53769}
2018-06-15 15:11:27 +00:00
Clemens Hammacher
b9401e42d1 [wasm] Create managed together with the module object
We currently create a managed object holding a shared reference to the
WasmModule, and pass this to the factory method for the
WasmModuleObject. Instead, we can just create it inside that factory
method, removing code duplication.

R=herhut@chromium.org

Change-Id: I3cea858ba445971dc8dbeb693061ef5684bc02da
Reviewed-on: https://chromium-review.googlesource.com/1102336
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53763}
2018-06-15 12:45:26 +00:00
Georg Neis
9480117e41 [turbofan] Use the heap broker in JSContextSpecialization.
No longer access the heap directly, as policed by Disallow*
scopes in JSContextSpecialization::Reduce.

Bug: v8:7790
Change-Id: I40f1c500b04b96152421fd5de631747ba386bca1
Reviewed-on: https://chromium-review.googlesource.com/1101322
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53759}
2018-06-15 12:00:26 +00:00
Yang Guo
23b8d2fd40 Revert "[debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes."
This reverts commit 9e27d4735f.

Reason for revert: Layout Test failures: https://ci.chromium.org/buildbot/client.v8.fyi/V8-Blink%20Linux%2064/24123

Original change's description:
> [debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes.
> 
> This CL also bottlenecks all current scope handling in the ScopeIterator, and cleans up frame handling in debug-frames and the deoptimizer.
> 
> Change-Id: I061922a356ce17794262f8d77d5d7c824558fc50
> Reviewed-on: https://chromium-review.googlesource.com/1095094
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53741}

TBR=yangguo@chromium.org,jarin@chromium.org,neis@chromium.org,jgruber@chromium.org,verwaest@chromium.org

Change-Id: I892856056258e3c68b36409b8b2d69e7686fc385
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1102377
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53756}
2018-06-15 11:07:46 +00:00
Toon Verwaest
4936efb0c6 Reland "[debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes."
This is a reland of 9e27d4735f

Original change's description:
> [debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes.
> 
> This CL also bottlenecks all current scope handling in the ScopeIterator, and cleans up frame handling in debug-frames and the deoptimizer.
> 
> Change-Id: I061922a356ce17794262f8d77d5d7c824558fc50
> Reviewed-on: https://chromium-review.googlesource.com/1095094
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53741}

Change-Id: I05262fef66d852876b9bb2869339053629c9b51d
Reviewed-on: https://chromium-review.googlesource.com/1102297
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53751}
2018-06-15 09:51:45 +00:00
Clemens Hammacher
9f7abe66dc Revert "[debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes."
This reverts commit 9e27d4735f.

Reason for revert: Fails MSan (use of uninitialized value): https://ci.chromium.org/buildbot/client.v8/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/21562

Original change's description:
> [debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes.
> 
> This CL also bottlenecks all current scope handling in the ScopeIterator, and cleans up frame handling in debug-frames and the deoptimizer.
> 
> Change-Id: I061922a356ce17794262f8d77d5d7c824558fc50
> Reviewed-on: https://chromium-review.googlesource.com/1095094
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53741}

TBR=yangguo@chromium.org,jarin@chromium.org,neis@chromium.org,jgruber@chromium.org,verwaest@chromium.org

Change-Id: Ief87c1e79fa2ec40f52fd747ec4ebbacf0da798b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1101377
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53743}
2018-06-14 17:34:09 +00:00
Toon Verwaest
9e27d4735f [debugger] Rewrite the ScopeIterator/DebugEvaluate to use Scope rather than ScopeInfo for inner scopes.
This CL also bottlenecks all current scope handling in the ScopeIterator, and cleans up frame handling in debug-frames and the deoptimizer.

Change-Id: I061922a356ce17794262f8d77d5d7c824558fc50
Reviewed-on: https://chromium-review.googlesource.com/1095094
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53741}
2018-06-14 16:28:53 +00:00
Clemens Hammacher
8e2e125791 Reland "Introduce StdoutStream which prints to Android log or stdout"
This is a reland of 0909dbe3d6.
Added missing V8_EXPORT_PRIVATE to AndroidLogStream.

TBR=mstarzinger@chromium.org

Original change's description:
> Introduce StdoutStream which prints to Android log or stdout
>
> The often used construct {OFStream(stdout)} does not work on Android.
> This CL introduces an {StdoutStream} which behaves exactly like
> {OFStream(stdout)} on non-android platforms, and redirects to the
> Android log on appropriate systems and configurations.
>
> R=mstarzinger@chromium.org
>
> Bug: v8:7820
> Change-Id: Ia682fdf6d064e37c605c19b032f5a10b96ac825b
> Reviewed-on: https://chromium-review.googlesource.com/1088911
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53692}

Bug: v8:7820
Change-Id: I8164bad78a401dbe4246c9ffcacd050fe511ed58
Reviewed-on: https://chromium-review.googlesource.com/1100636
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53733}
2018-06-14 13:29:01 +00:00
Leszek Swirski
d5b02187cb [GetIsolate] Remove GetIsolate from src/ast/*
Bug: v8:7786
Change-Id: Id6a2e38e99fdaeaa619c7ec3e18865c3f64a2a47
Reviewed-on: https://chromium-review.googlesource.com/1095112
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53731}
2018-06-14 11:14:20 +00:00
Michael Achenbach
d2e1620cd4 Revert "Introduce StdoutStream which prints to Android log or stdout"
This reverts commit 0909dbe3d6.

Reason for revert: Blocks roll:
https://chromium-review.googlesource.com/c/chromium/src/+/1099143

Original change's description:
> Introduce StdoutStream which prints to Android log or stdout
> 
> The often used construct {OFStream(stdout)} does not work on Android.
> This CL introduces an {StdoutStream} which behaves exactly like
> {OFStream(stdout)} on non-android platforms, and redirects to the
> Android log on appropriate systems and configurations.
> 
> R=​mstarzinger@chromium.org
> 
> Bug: v8:7820
> Change-Id: Ia682fdf6d064e37c605c19b032f5a10b96ac825b
> Reviewed-on: https://chromium-review.googlesource.com/1088911
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53692}

TBR=mstarzinger@chromium.org,jarin@chromium.org,jgruber@chromium.org,clemensh@chromium.org,bmeurer@chromium.org

Change-Id: Iadadd9a0df10dca0fad647138a83db50148e864d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7820
Reviewed-on: https://chromium-review.googlesource.com/1100635
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53725}
2018-06-14 06:23:17 +00:00
Aseem Garg
0091973e82 Reland "[wasm] Add simd mem and shift ops to interpreter"
This is a reland of 2338a2fd63

Original change's description:
> [wasm] Add simd mem and shift ops to interpreter
>
> R=clemensh@chromium.org
> BUG=v8:6020
>
> Change-Id: I5d95e4c23240ae4e174d896d31e1b9b1d89d9418
> Reviewed-on: https://chromium-review.googlesource.com/1096493
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53717}

Bug: v8:6020
Change-Id: I38a73f5e389617a05a12e0a9477544c4e3aa2883
Reviewed-on: https://chromium-review.googlesource.com/1099895
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53722}
2018-06-13 22:03:46 +00:00
Sathya Gunasekaran
76cc2ad07e Revert "[wasm] Add simd mem and shift ops to interpreter"
This reverts commit 2338a2fd63.

Reason for revert: broke mips

see https://ci.chromium.org/buildbot/client.v8.ports/V8%20Mips%20-%20builder/17573

Original change's description:
> [wasm] Add simd mem and shift ops to interpreter
> 
> R=​clemensh@chromium.org
> BUG=v8:6020
> 
> Change-Id: I5d95e4c23240ae4e174d896d31e1b9b1d89d9418
> Reviewed-on: https://chromium-review.googlesource.com/1096493
> Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53717}

TBR=aseemgarg@chromium.org,clemensh@chromium.org

Change-Id: I8e5b2e9a9c1c09d035335ba6681bbe3e1ce5abfb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6020
Reviewed-on: https://chromium-review.googlesource.com/1099776
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53718}
2018-06-13 21:10:18 +00:00
Aseem Garg
2338a2fd63 [wasm] Add simd mem and shift ops to interpreter
R=clemensh@chromium.org
BUG=v8:6020

Change-Id: I5d95e4c23240ae4e174d896d31e1b9b1d89d9418
Reviewed-on: https://chromium-review.googlesource.com/1096493
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53717}
2018-06-13 19:42:03 +00:00
Camillo Bruni
9718d079e9 [CSA] Fix Array.prototype.reduceRight CAS_ASSERT
- Add typed IsHeapNumberPositive, IsNumberNonNegativeSafeInteger, IsInteger,
  IsSafeInteger and IsHeapNumberUint32 helpers on CodeStubAssembler
- Type NumberIsInteger and NumberIsSafeInteger builtin

Bug: chromium:847204, v8:6949
Change-Id: I27d3ab79bd17312c223209ed0b221c174024126e
Reviewed-on: https://chromium-review.googlesource.com/1087961
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53707}
2018-06-13 15:38:01 +00:00
Dominik Inführ
2aa166a633 [heap] Clear ephemeron worklist when tearing down
Bug: chromium:852308, chromium:844008
Change-Id: I99551c1f75d5916edfb780998963140b8282a570
Reviewed-on: https://chromium-review.googlesource.com/1099065
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53706}
2018-06-13 15:28:21 +00:00
Clemens Hammacher
b9b4b8798f [wasm] Merge {WasmSharedModuleData} with {WasmModuleObject}
The {WasmSharedModuleData} struct was introduced to hold data common to
all wasm instances belonging to the same module. The idea was to keep
"internal state" separate from the JS-facing {WasmModuleObject}. Since
this objective has no real value, and we already store some internal
data on the {WasmModuleObject}, this CL merges these two objects.

R=titzer@chromium.org, mstarzinger@chromium.org

Bug: v8:7754
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I04f6d07bf5d812bc4717af26f0f64231345861f9
Reviewed-on: https://chromium-review.googlesource.com/1097491
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53698}
2018-06-13 13:10:19 +00:00
Clemens Hammacher
0909dbe3d6 Introduce StdoutStream which prints to Android log or stdout
The often used construct {OFStream(stdout)} does not work on Android.
This CL introduces an {StdoutStream} which behaves exactly like
{OFStream(stdout)} on non-android platforms, and redirects to the
Android log on appropriate systems and configurations.

R=mstarzinger@chromium.org

Bug: v8:7820
Change-Id: Ia682fdf6d064e37c605c19b032f5a10b96ac825b
Reviewed-on: https://chromium-review.googlesource.com/1088911
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53692}
2018-06-13 09:57:29 +00:00
Ben L. Titzer
d775c9561f [wasm] Remove the isolate_ field from WasmCodeManager
The isolate is mainly used for accounting purposes. As such, it
doesn't need a field in the WasmCodeManager, and cannot have one
if it is to be made isolate independent. Instead, pass the isolate
explicitly in the appropriate cases.

R=mstarzinger@chromium.org
BUG=v8:7424

Change-Id: I539c2b33692e57605a280530bd704ef25269ad0f
Reviewed-on: https://chromium-review.googlesource.com/1073412
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53676}
2018-06-12 16:46:06 +00:00
Anna Henningsen
4da05e97ad [SAB] Fix flake in Atomics.wait
As specified in https://tc39.github.io/ecma262/#sec-atomics-wait, the
critical section must occur before the load and comparison.

This slightly changes the `AtomicsWaitCallback` API, but in a
direction that arguably makes it more consistent.

As a drive-by fix, reset `node->waiting_` in case there
was an exception from the first callback.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/1095814
Bug: v8:7836
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I577cdf76cedfe39bc61f783203b543c7c68fc238
Reviewed-on: https://chromium-review.googlesource.com/1096236
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53673}
2018-06-12 15:46:37 +00:00
Sigurd Schneider
a062708467 [turbofan] Change handling of empty basic blocks
This CL inserts NOP instructions a little bit earlier into empty
blocks; this ensures that instructions keep their initial position.

Bug: v8:7327
Change-Id: Idee5269f4fd7fc15c44bda83a2be74e8cff62df8
Reviewed-on: https://chromium-review.googlesource.com/1097078
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53672}
2018-06-12 15:10:26 +00:00
jgruber
686c7769ef Skip further serializer tests for crbug/v8/7718
These tests are also affected by duplicate builtin copies (on- and
off-heap).

TBR=yangguo@chromium.org

Bug: v8:6666, v8:7718
Change-Id: I8adfe8b8b63fb5f539cdff5e709e9358a47dfc7e
Reviewed-on: https://chromium-review.googlesource.com/1097088
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53668}
2018-06-12 13:30:37 +00:00
Daniel Clifford
bbbfd81cfc [torque] Turn implicit converts/unsafe_casts into generics
In the process:
  - Add strict ordering of Types so that name mangling is consistent
    and build time. Previously, the UnionType stored the union's
    types in a std::set<const Type*>, which did not have a consistent
    ordering of the types in the set.
  - Add a int31 type to enable consistency and correctness of
    handling of 'constexpr int31' values on the C++ side.
  - By removing the "implicit" keyword for operators, there is now
    one less difference between operators and calls, another
    incremental step in unifying operators and calls.
  - Enable external (i.e. C++-defined) generic specializations
  - Add CSA support for checking double ElementsKinds, including
    tests.
  - Clean up some constexpr/non-constexpr handling of ElementsKinds.

Bug: v8:7793
Change-Id: I27699aba70b98ebf5466e5b62b045d7b1dad62c8
Reviewed-on: https://chromium-review.googlesource.com/1091155
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53664}
2018-06-12 11:54:57 +00:00
jing.bao
d4f7d87bdf [wasm] Improve unpacking operations in simd lowering
Add explicit lowered type.
Distinguish operations for low/high.
Shl + Shr is equal to Mask.
Enable WASM_SIMD_COMPILED_AND_LOWERED_TEST for unpacking.

Change-Id: I0492318deb7c0ea0f4b30975ab107eedd446314a
Reviewed-on: https://chromium-review.googlesource.com/1079989
Reviewed-by: Aseem Garg <aseemgarg@chromium.org>
Commit-Queue: Jing Bao <jing.bao@intel.com>
Cr-Commit-Position: refs/heads/master@{#53654}
2018-06-12 03:33:12 +00:00
Sathya Gunasekaran
294dbf49bc [intl] Add GetOption
This patch ports over the spec defined operation `GetOption` from
JavaScript to C++:
https://tc39.github.io/ecma402/#sec-getoption

The JS implementation will be deleted once all it's
users are migrated.

Refactors LocaleConstructor to use this method which fixes some test262
tests. The test262 test status file is updated to reflect this.

Bug: v8:5751, v8:7684
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ief5eae9b69dcea50062825163ca7658ed20bd0cf
Reviewed-on: https://chromium-review.googlesource.com/1094201
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53652}
2018-06-11 22:19:22 +00:00
Bill Budge
bcb4fbd4ad [wasm simd] Handle more shuffles
- Shuffle canonicalization improved to reverse operands to match
  more architectural shuffles.
- Handles shuffles where the order of operands is reversed.
- Adds tests for non-canonical shuffles, and for swizzles.
- Improves TryMatchConcat method.
- Substantially rewrites shuffles on ia32 to better handle swizzles
  and fix bugs on reversed shuffles where source registers are
  overwritten.
- Adds Palignr macro-assembler instructions for ia32.

Bug: v8:6020
Change-Id: I8e43a1e7650057c66690af1504b67509a1437d75
Reviewed-on: https://chromium-review.googlesource.com/1070934
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53648}
2018-06-11 18:40:24 +00:00
Hannes Payer
43886bc305 [heap] Cleanup heap creation a bit.
Change-Id: I7f2d0ba0e544267a9f97838e2904d8dfeecd9a99
Reviewed-on: https://chromium-review.googlesource.com/1095615
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53647}
2018-06-11 18:21:36 +00:00
Leszek Swirski
d6c49a7251 [GetIsolate] Remove GetIsolate in simple cases
Whenever an Isolate is available on a variable, field, or method
parameter, use that instead of GetIsolate(). Also convert simple
cases of the one-argument handle constructor to either use an
available Isolate, or use GetIsolate() if their first parameter
is a variable.

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I52805905a9ca8729615ead78859f43d5e8f605f1
Reviewed-on: https://chromium-review.googlesource.com/1092853
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53629}
2018-06-11 11:02:59 +00:00
Matheus Marchini
b20faffb07 [log] fix ExistingCodeLogger behavior on edge case
ExistingCodeLogger was behaving incorrectly when the CodeEventHandler
API was used in combination with --interpreted-frames-native-stack.
Instead of collecting copied trampolines as InterpretedFunction:functionName,
they were being collected as Builtin:IntepreterEntryTrampolines.
This patch adds special handling for copied trampolines when
using ExistingCodeLogger.

R=yangguo@google.com

Change-Id: I3ee4be03800122d28d53b51b20c60dcf6263e4c1
Reviewed-on: https://chromium-review.googlesource.com/1087813
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53624}
2018-06-11 08:32:13 +00:00
jgruber
41b2d783e5 [builtins] Disallow internal references in embedded builtins
Internal references create absolute pointers within the code and must
therefore be disallowed for embedded builtins to remain
position-independent.

Drive-by: remove related cctest. This test used to be relevant before
embedding was fully implemented, but by now it is useless and rather
misleading since it gives a false sense of safety.

Bug: v8:6666
Change-Id: I57a62274b57c3ef1303d5114c68e2a9b1f92bda4
Reviewed-on: https://chromium-review.googlesource.com/1092732
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53623}
2018-06-11 07:41:58 +00:00
Sathya Gunasekaran
da02f095d3 [hash-table] Introduce OrderedHashTableHandler
OrderedHashTableHandler (to be renamed to OrderedHashTable) is the
interface that abstracts away the two different ordered hash tables.

All operations on the two ordered hash tables must be performed
through this new interface so that we can seamlessly migrate from one
table to another behind the scenes.

Bug: v8:6443, v8:7569
Change-Id: Ifc0a38974605b63e0a2a36b4aafb8dc68a081f4a
Reviewed-on: https://chromium-review.googlesource.com/1059865
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53622}
2018-06-11 00:22:12 +00:00
Igor Sheludko
a17041d022 [test] Make IsValidPositiveSmi test independent of Smi representation.
Change-Id: I308c05feace7b1bb69d12a35243340724a96a49b
Reviewed-on: https://chromium-review.googlesource.com/1090491
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53605}
2018-06-08 09:15:23 +00:00
Aseem Garg
63b32e2747 [wasm] disable SIMD interpreter tests for mips
The globals tests for simd are failing on mips big endian. Will re-enable
after fixing.

R=clemensh@chromium.org
BUG=v8:6020

Change-Id: I8a8a17c4e947b69ccc2eb6bbe79c308b1129d1af
Reviewed-on: https://chromium-review.googlesource.com/1089814
Commit-Queue: Aseem Garg <aseemgarg@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53595}
2018-06-07 19:53:57 +00:00
Vasili Skurydzin
81e75305de s390: assembler-s390 instruction format cleanup
Change-Id: I7736314257bba44b4336d584020744c05874aa64
Reviewed-on: https://chromium-review.googlesource.com/1067607
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#53591}
2018-06-07 18:23:01 +00:00
Dominik Inführ
3db0672cc4 Use EphemeronHashTable as backing store for JSWeakCollection
JSWeakCollection should use EphemeronHashTable as backing store instead of
ObjectHashTable such that the GC can handle these structures differently in
the future.

Bug: chromium:844008
Change-Id: Icc6df60c975a942877e2507ef45e0d235e5f72be
Reviewed-on: https://chromium-review.googlesource.com/1089063
Commit-Queue: Dominik Inführ <dinfuehr@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53572}
2018-06-07 09:04:37 +00:00
Jaroslav Sevcik
6ee715264c [turbofan] Introduce JS heap broker.
As a first step towards moving accesses to the broker, this moves
heap accesses from BitsetType::Lub to the broker.

Bug: v8:7790
Change-Id: Ie240b84b979717caae42cb8aa06ee8d9877a446d
Reviewed-on: https://chromium-review.googlesource.com/1088695
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53571}
2018-06-07 07:45:16 +00:00
Hannes Payer
5e31f9ffdf [heap] Cleanup Heap SetUp/TearDown a bit.
Change-Id: Ieec4dccdf8a5241f439bde9fffc75f4f300930e1
Reviewed-on: https://chromium-review.googlesource.com/1089333
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53567}
2018-06-07 06:37:54 +00:00
Anna Henningsen
555c811c0d [api] Switch from SetBuildEmbedderGraphCallback to AddBuildEmbedderGraphCallback
`SetBuildEmbedderGraphCallback`, unlike `SetWrapperClassInfoProvider`,
assumes a monolithic embedder that can provide all necessary information.
That is not the case for e.g. Node.js, which can e.g. provide multiple Node.js
instances per V8 Isolate, as well as native addons that may allocate resources
on their own.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ib53dfde82416dd69934b08623e27d674a483ac2d
Reviewed-on: https://chromium-review.googlesource.com/1082441
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53545}
2018-06-06 09:46:57 +00:00
Clemens Hammacher
423b8a2011 [ia32] Add disassembler support for 'pause'
R=mstarzinger@chromium.org

Bug: chromium:849656
Change-Id: I34effca4770f732216b93b5e4e8c28383f2f9963
Reviewed-on: https://chromium-review.googlesource.com/1087271
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53534}
2018-06-05 19:12:14 +00:00
Alexey Kozyatinskiy
0b3e8e184c [inspector] postpone API interrupts during creation of injected script
DevTools may process another protocol message during API interrupt this
API may lead to createInjectedScript reentrance and will fail.
Let's postpone interrupts.

Bug: chromium:846099
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ia06e034a6287087e4674559d8911d2f4a0b1b459
Reviewed-on: https://chromium-review.googlesource.com/1086372
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53531}
2018-06-05 18:04:44 +00:00
Alexey Kozyatinskiy
8205786a4b [inspector] decouple debugger delegate and async stacks delegate
Currently we enable instrumentation if debugger is active. With this
approach we can not:
- capture async stack when debugger is disabled,
- avoid async instrumentation overhead when debugger is enabled and
  async stacks are disabled.

R=dgozman@chromium.org,yangguo@chromium.org

Bug: none
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I19400c4c4e12b6c9b5a980fb6bd3293bac6e6a64
Reviewed-on: https://chromium-review.googlesource.com/1081494
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53530}
2018-06-05 17:39:22 +00:00
Mathias Bynens
0a237ffe5b Remove always-true --harmony-optional-catch-binding runtime flag
It was shipped in Chrome 66.

Bug: v8:6889
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I6333ee20ab913b281674b911d525d2851f4694c9
Reviewed-on: https://chromium-review.googlesource.com/1086928
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53527}
2018-06-05 16:24:20 +00:00
Tobias Tebbi
a938ab5685 [torque] add hex literals
Bug: v8:7793
Change-Id: I69e27cb1e8477ca0d64ad7a96ab256cae96339f4
Reviewed-on: https://chromium-review.googlesource.com/1086801
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53521}
2018-06-05 11:48:53 +00:00
Igor Sheludko
d123f30b6d [ptr-compr] Support 31-bit Smis in lower half-word on 64-bit architectures.
This CL introduces a new gn argument: v8_enable_pointer_compression which is
false by default. All the changes done in this CL are made under this flag.

Upper half-word of a Smi word must be properly sign-extended according to the
sign of the lower-half containing the actual Smi value.

Bug: v8:7703
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2b52ab49cd18c7c613130705de445fef44c30ac5
Reviewed-on: https://chromium-review.googlesource.com/1061175
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53519}
2018-06-05 11:37:35 +00:00
Dan Elphick
4ce2adc326 [explicit isolates] Eliminate GetIsolate from transitions.cc
Removes all explicit calls to GetIsolate() in transitions.cc by passing
it through calling functions and implicit calls via the single argument
Handle constructor and handle function.

Unfortunately in the interests of making these changes vaguely
manageable, I've also pushed some new GetIsolates down into
objects-debug.cc, objects-printer.cc and objects.cc.

Bug: v8:7786
Change-Id: I1f98530dec6c004e17dc3336f3cef09fbb446bae
Reviewed-on: https://chromium-review.googlesource.com/1085451
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53518}
2018-06-05 11:00:43 +00:00
Anna Henningsen
5eaa03b2d3 [api] Add AtomicsWaitCallback for diagnostics
Add an inspection callback for embedders that allows tracking
of `Atomics.wait()` calls in order to enable diagnostic tooling
around it, as well as providing a way to break out of an
`Atomics.wait()` call without having to fully terminate execution.

The motivation here is that this allows embedders to perform
somewhat customizable deadlock detection.

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ib6346747aa3cbffb07cf6abd12645e2d98584f0f
Reviewed-on: https://chromium-review.googlesource.com/1080788
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53517}
2018-06-05 10:11:13 +00:00
Mythri
9461aa5619 [Interpreter] Enable sharing of load / store named property feedback
This cl enables sharing of feedback slots for load / sotre named property.
This is a follow up cl of
https://chromium-review.googlesource.com/c/v8/v8/+/966302 that introduces
this feature.

Bug: v8:7530
Change-Id: I0c056b7a3608117db2fc99ebcd6836dfeed471d8
Reviewed-on: https://chromium-review.googlesource.com/1065737
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53515}
2018-06-05 09:21:59 +00:00
Dan Elphick
6cddfd50db [parsing] Remove most GetIsolate calls
Removes most[1] explicit calls to GetIsolate() in parsing/ by passing
it through calling function functions and implicit calls via the single
argument Handle constructor and handle function.

[1] One remains in preparsed-scope-data.cc:
data_->GetIsolate()->PushStackTraceAndDie()

Bug: v8:7786
Change-Id: I4c445995a73c19bdf4649b65487b7443d56ddd2a
Reviewed-on: https://chromium-review.googlesource.com/1085057
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53513}
2018-06-05 08:54:58 +00:00
jgruber
8e8638c319 Reland "[csa] Ensure the requested allocation size fits in a Smi"
This is a reland of 515cc07d28

Original change's description:
> [csa] Ensure the requested allocation size fits in a Smi
>
> In CSA::AllocateRaw, ensure that the given allocation size fits into a
> Smi.
>
> Bug: chromium:848672
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
> Change-Id: I4e74791296163188b1ca77cae8226a9833fba8ef
> Reviewed-on: https://chromium-review.googlesource.com/1084930
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53495}

TBR=yangguo@chromium.org,ishell@chromium.org

Bug: chromium:848672
Change-Id: I135868390784a0ee95ff42224dd00f66f3bf2d80
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1086828
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53512}
2018-06-05 08:50:38 +00:00