Commit Graph

53635 Commits

Author SHA1 Message Date
Jakob Kummerow
a8aa4b4ef2 [ubsan] Fix Clusterfuzz-found bugs
Smi::LexicographicCompare: signed integer overflow on negation.
Drive-by improvement: reduce number of branches.

RegExpQuantifier: signed integer overflow on multiplication.

DateCache::DaylightSavingsOffsetInMs: signed integer overflow
on addition.

Bug: v8:3770,chromium:923466,chromium:923642,chromium:923626
Change-Id: If7d995a13893d1315449ee0bab8b5f2553e170f5
Reviewed-on: https://chromium-review.googlesource.com/c/1436229
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59143}
2019-01-28 21:23:24 +00:00
Jakob Kummerow
cf330da43b [ubsan][regexp] Avoid out-of-range casts from int to enum Result
NativeRegExpMacroAssembler::Match() can return either a Result sentinel
or an int indicating the number of matches, so it should return a plain
int which we can only safely cast to Result or IrregexpResult when it's
guaranteed to be the former case.

Bug: v8:3770
Change-Id: I4c3447e0cdebd5f825964e086574ab504a1799cd
Reviewed-on: https://chromium-review.googlesource.com/c/1435735
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59142}
2019-01-28 21:22:19 +00:00
Jakob Kummerow
e8faf62ca0 [ubsan][compiler] Avoid OOB array accesses in Node::inputs_
Since we allocate raw zone memory for its inputs right behind the Node
object anyway, drop the previously OOB-accessed 1-element array within
the Node and use address computation to get to the inputs storage.
Note that this saves one pointer per Node, except for Nodes with zero
inputs, where it uses 1*sizeof(Use) more memory than before.

Bug: v8:3770
Change-Id: I7f5965c6f1b49013eb7f5a447b685d47decaa8fb
Reviewed-on: https://chromium-review.googlesource.com/c/1436218
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59141}
2019-01-28 21:15:59 +00:00
Jakob Kummerow
c640296e5a [ubsan] Avoid signed left shifts
The workaround is simple: cast to unsigned before shifting.

Bug: v8:3770
Change-Id: I5f0f7af697ec5db0ab1df3d061008940c83c5c56
Reviewed-on: https://chromium-review.googlesource.com/c/1436215
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59140}
2019-01-28 20:43:47 +00:00
Adam Klein
6b67620ca9 Revert "[turbofan] Support new.target in the serializer."
This reverts commit 3145505ad3.

Reason for revert: breaks jumbo build due to interpreter::Register using declaration

Original change's description:
> [turbofan] Support new.target in the serializer.
> 
> Bug: v8:7790
> Change-Id: Ie98cff6f8b1f184c8152952cc3d39e373c93565d
> Reviewed-on: https://chromium-review.googlesource.com/c/1435943
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59118}

TBR=neis@chromium.org,mslekova@chromium.org

Change-Id: I81369da5e7a9b3ec946737bbb2fc349b51e3bd7f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7790
Reviewed-on: https://chromium-review.googlesource.com/c/1440116
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59139}
2019-01-28 19:46:54 +00:00
Wez
afdd08acdd [Fuchsia] Use the read/write permission flag names when mapping VMOs.
The ZX_VM_FLAG_PERM_* names have been deprecated in favour of the
ZX_VM_PERM_* form, and will shortly be removed from the Fuchsia SDK.

Bug: chromium:925597
Change-Id: Ic05912cbf9758915e1bc97c41c682aee028a3b5d
Reviewed-on: https://chromium-review.googlesource.com/c/1437817
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59138}
2019-01-28 18:21:20 +00:00
Irina Yatsenko
faae9fe694 Small improvements in debugging experience on Windows
If running under debugger:
1. Output from _v8_internal_Print_Object into debugger's command window
2. Break into debugger before aborting

Change-Id: I49e4d83c817e6588c4679c9fb9766602927542db
Reviewed-on: https://chromium-review.googlesource.com/c/1435771
Commit-Queue: Irina Yatsenko <irinayat@microsoft.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59137}
2019-01-28 17:36:14 +00:00
Michael Starzinger
aff79f4eb1 [wasm][test] Simplify EXPECT_CALL function invocations.
R=clemensh@chromium.org

Change-Id: I40e8068630deda0396680e062d471cda0c4ef875
Reviewed-on: https://chromium-review.googlesource.com/c/1439416
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59136}
2019-01-28 17:22:36 +00:00
peterwmwong
8e13ddc680 [builtins] Port TypedArray TypedArrayInitializeWithBuffer to Torque
Two small changes were done as part of the port:
- Changes TypedArrayInitializeWithBuffer from a TFS builtin to a macro.
  It was only called from ConstructByArrayBuffer and this removes the
  overhead of the TFS call.
- Introduces a GetTypedArrayElementsInfo that retrieves both the element
  size and map. Instead of generating the elements kind switch code (
  DispatchTypedArrayByElementsKind) twice, just generate once at the
  beginning of CreateTypedArray.

This reduces overall builtins size by 364 bytes (Mac x64.release)
  - Before
    1364 - TypedArrayInitializeWithBuffer
    6468 - CreateTypedArray
  - After
    7468 - CreateTypedArray

This also improves performance of TypedArray JSPerf benchmarks
(SubarrayNoSpecies, ConstructByArrayBuffer) by 5-8%.

Bug: v8:7161
Change-Id: I68eed2ea4db103f44ad9751229c29fba9bc9d24d
Reviewed-on: https://chromium-review.googlesource.com/c/1437822
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59135}
2019-01-28 16:21:02 +00:00
Daniel Clifford
7215f6d632 [torque] Compile and error check all inlined macros
Previously, macros that returned true for "ShouldBeInlined" were only
compiled if they were called, which made it impossible to
type/semantic check all Torque code (e.g. newly added methods to
structs). One might argue that all code should be tested (and thus
through inlining compiled), but for prototyping, the skipped
compilations were definitely annoying.

As part of this change, added a ShouldGenerateExternalCode method to
declarables (by default returns !ShouldBeInlined) that makes it
possible to suppresses C++ code generation for any method. To
support this at the lowest level, a NullOStream classes is added as
part of this patch.

Finally, added support for generating C++ for passing structs as label
parameters to run previously inlined methods through the
implementation-visitor for non-inlined compilation.

Bug: v8:7793
Change-Id: I8ce23382e12ddc25f46222c25729c82433040a73
Reviewed-on: https://chromium-review.googlesource.com/c/1434378
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59134}
2019-01-28 16:17:21 +00:00
Clemens Hammacher
c302fafbe9 [wasm] Create error objects later
Store the WasmError longer and only creating the heap Error object (via
ErrorThrower) right before it's being used. This prevents a
DeferredHandleScope and simplifies code a lot.

R=mstarzinger@chromium.org

Bug: v8:8689
Change-Id: Iad98f6facaf1914e4d31edde4221ed8789c1fbfa
Reviewed-on: https://chromium-review.googlesource.com/c/1439116
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59133}
2019-01-28 16:11:02 +00:00
Michael Starzinger
9771ca3b0a [heap] Remove obsolete write barrier header inclusion.
R=mlippautz@chromium.org

Change-Id: I8ca8b899212786f78a0d42753aedbad02c211c06
Reviewed-on: https://chromium-review.googlesource.com/c/1426120
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59132}
2019-01-28 16:08:23 +00:00
Michael Starzinger
2dd3264422 [wasm] Preliminary interpreter support for exceptions.
This adds preliminary support for exception handling to the interpreter.
Note that due to missing reference type support, the exception object is
not yet correctly put onto the operand stack. Also exceptions raised by
call operations are not handled properly yet.

R=clemensh@chromium.org
TEST=cctest/test-run-wasm-exceptions
BUG=v8:8091

Change-Id: Ie68ca9448c7beafe8967dff5bb5de6642edcc9e4
Reviewed-on: https://chromium-review.googlesource.com/c/1436017
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59131}
2019-01-28 16:03:56 +00:00
Mythri
c21f952d40 Return early if the context is strict when inferring the language mode
If the context is in strict mode, then we can avoid iterating the
stack since we cannot go stricter than that.

Bug: chromium:925289
Change-Id: I422176c85f2dfd9176a60bc7c3a7674f96238bd0
Reviewed-on: https://chromium-review.googlesource.com/c/1439396
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59130}
2019-01-28 16:02:51 +00:00
Leszek Swirski
ed15724846 [parser] Don't create proxies for vars without initialisers
Vars without initialisers don't need to allocate a VariableProxy, as the
proxy expression is not really needed for anything. So, we can special
case declaration parsing to look ahead for a '=' (plus a few other
cases), and skip the variable proxy allocation if it isn't there.

As a side-effect, variables that are only declared but never used are
no longer marked is_used, and thus not allocated. This saves on
generating dead code.

Change-Id: Ie4f04c6b5c1138df4c2e17acf1f0150459b3b571
Reviewed-on: https://chromium-review.googlesource.com/c/1434376
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59129}
2019-01-28 15:54:40 +00:00
Toon Verwaest
c484b014df [parser] Skip checks in the parser that are guaranteed by the preparser
Change-Id: I8971d1e2ab47599bba4db8cac8631bcf39058593
Reviewed-on: https://chromium-review.googlesource.com/c/1436024
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59128}
2019-01-28 15:45:30 +00:00
Michael Starzinger
0324d2270b [test][x64] Reenable some DisasmX64 test lines.
R=clemensh@chromium.org
TEST=cctest/test-disasm-x64

Change-Id: I704537886b80701921eeae918a1f867f42ad305b
Reviewed-on: https://chromium-review.googlesource.com/c/1437289
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59127}
2019-01-28 15:15:10 +00:00
Michael Achenbach
7e93c3bf87 [release] Temporarily remove two gpu bots from V8 auto-roller
TBR=mslekova@chromium.org
NOTRY=true

Bug: chromium:925750
Change-Id: I6700ce261e2e083867b71874dfe4c308ccc0d764
Reviewed-on: https://chromium-review.googlesource.com/c/1437117
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59126}
2019-01-28 14:31:17 +00:00
Clemens Hammacher
e532e84362 [Liftoff] Fix KIntConst typo
Now that I saw the typo I cannot unsee it anymore, but somehow this
typo went unrecognized for nearly 12 months (since
https://crrev.com/c/904443).

R=ahaas@chromium.org

Bug: v8:8562
Change-Id: Iafaeb2313dcfa305007c3c87e8f0440d8b15980e
Reviewed-on: https://chromium-review.googlesource.com/c/1436021
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59125}
2019-01-28 14:23:55 +00:00
Georg Neis
d9784e11b8 [turbofan] Add JSFunctionRef::feedback_vector.
Bug: v8:7790
Change-Id: I834dd74803d610666d40fdb50f7e9671aa99d215
Reviewed-on: https://chromium-review.googlesource.com/c/1437288
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59124}
2019-01-28 14:01:56 +00:00
peterwmwong
7ed0d4b8fa [torque] Cleanup uses of torque generated class definitions.
Bug: v8:7793
Change-Id: I5e682ba555d79be533e325bed12e87aabf90b311
Reviewed-on: https://chromium-review.googlesource.com/c/1437989
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Cr-Commit-Position: refs/heads/master@{#59123}
2019-01-28 13:46:45 +00:00
Clemens Hammacher
5b1c8b6b63 [api][wasm] Remove deprecated objects and methods
The API for serialized modules changed a bit in version 7.3. The old
API is deprecated, hence remove it in 7.4.

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

Bug: chromium:912031

Change-Id: Ib1a55dc88db9e98aef03006caf8cdc1be4f85b9f
Reviewed-on: https://chromium-review.googlesource.com/c/1436020
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59122}
2019-01-28 13:14:38 +00:00
Ben L. Titzer
3a638a57cf [wasm] 0-count is out-of-bounds for table.*
The spec wasn't clear (or I misunderstood). As per
(https://github.com/WebAssembly/bulk-memory-operations/issues/11),
zero-count table operations are also out of bounds.

R=mstarzinger@chromium.org
CC=binji@chromium.org
BUG=v8:7747

Change-Id: Iac689b93a040eb6eb06975bc2ba0facb85d24756
Reviewed-on: https://chromium-review.googlesource.com/c/1436022
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59121}
2019-01-28 13:13:34 +00:00
Camillo Bruni
a1efb4134e [parser] Various Scope and Context speedups
- Dehandlify ScopeInfo::ContextSlotIndex
- Dehandlify ScriptContextTable::Lookup
- Introduce function-kind.h with range-based helper methods
- Spread usage of Scope::is_script_scope and friends

Change-Id: I8ed1d82cc5bb9ea3fce856e16e9eafe194fb57ba
Reviewed-on: https://chromium-review.googlesource.com/c/1430100
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59120}
2019-01-28 13:06:03 +00:00
Anton Bikineev
1658dc82d3 [builtins] Prevent result truncation when formatting dates
The ToDateString builtin now uses StringStream to format dates
instead of SNPrintF. The patch also implements a new allocator
based on SSO that's able to expand automatically.

Bug: v8:7770
Change-Id: I23e03ec06fcfc7bda1e5abb1ac82637e5c9ddc95
Reviewed-on: https://chromium-review.googlesource.com/c/1425905
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59119}
2019-01-28 12:09:59 +00:00
Georg Neis
3145505ad3 [turbofan] Support new.target in the serializer.
Bug: v8:7790
Change-Id: Ie98cff6f8b1f184c8152952cc3d39e373c93565d
Reviewed-on: https://chromium-review.googlesource.com/c/1435943
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59118}
2019-01-28 11:55:04 +00:00
Simon Zünd
147d05011d [refactor] Change method names in FrameArrayIterator
This CL changes 'HasNext' to 'HasFrame' and 'Next' to 'Advance' to
better reflect the semantics of the iterator.
'Next' usually returns the next element.

R=jgruber@chromium.org

Bug: v8:8562
Change-Id: Idbd1c084c39dd4a10c1c6a6db7782637b9b16cc4
Reviewed-on: https://chromium-review.googlesource.com/c/1436023
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59117}
2019-01-28 11:51:27 +00:00
Clemens Hammacher
7613345248 [api] Remove deprecated PropertyDescriptor constructor
The implicit constructor is deprecated since version 7.3, hence can be
removed in 7.4.

R=ulan@chromium.org

Change-Id: I54a530240648c1721924195d7fccc157d483e6d8
Reviewed-on: https://chromium-review.googlesource.com/c/1436018
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59116}
2019-01-28 11:50:22 +00:00
Ulan Degenbaev
dbd368b773 [heap] Remove unused write-barrier functions in macro-assemblers.
Change-Id: I927eed8354fdb3eba2d8ab94caafa89b1ce02016
Reviewed-on: https://chromium-review.googlesource.com/c/1436019
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59115}
2019-01-28 11:19:17 +00:00
Clemens Hammacher
a11a236f6e Revert "Infer the language mode instead of passing it as a parameter to builtins"
This reverts commit c9616b0fcb.

Reason for revert: Fails gc-stress tests: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Mac64%20GC%20Stress/5460

Original change's description:
> Infer the language mode instead of passing it as a parameter to builtins
> 
> It is better to infer the language mode from the context and the closure
> instead of getting it from the feedback vector. This will allow us to use
> some of these builtins even when feedback vectors are not allocated.
> Language mode is only needed to decide if we need to throw an exception
> when a store fails. This is on a slow path and hence deriving the language
> mode is not on critical path.
> 
> Bug: v8:8580
> Change-Id: Id0d8e78d35046f015b5cdc15d5fc3f8a17dd8757
> Reviewed-on: https://chromium-review.googlesource.com/c/1421924
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59113}

TBR=mythria@chromium.org,verwaest@chromium.org

Change-Id: I584b41ca4d396165a3a294b7facee30f0c4f4a7f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8580
Reviewed-on: https://chromium-review.googlesource.com/c/1436025
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59114}
2019-01-28 11:11:48 +00:00
Mythri
c9616b0fcb Infer the language mode instead of passing it as a parameter to builtins
It is better to infer the language mode from the context and the closure
instead of getting it from the feedback vector. This will allow us to use
some of these builtins even when feedback vectors are not allocated.
Language mode is only needed to decide if we need to throw an exception
when a store fails. This is on a slow path and hence deriving the language
mode is not on critical path.

Bug: v8:8580
Change-Id: Id0d8e78d35046f015b5cdc15d5fc3f8a17dd8757
Reviewed-on: https://chromium-review.googlesource.com/c/1421924
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59113}
2019-01-28 10:38:15 +00:00
Camillo Bruni
c3504034bc [parser] Only use write barriers conditionally in ScopeInfo::Create
Change-Id: Ia082e676e2cabab07c99b424f80b91e9459f1d3d
Reviewed-on: https://chromium-review.googlesource.com/c/1430070
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59112}
2019-01-28 10:16:15 +00:00
Georg Neis
1bc801a15c Fix a comparison with negative 0.
No difference in behavior because the other branch of the condition
already allowed positive 0.

Change-Id: Ia31d3366f882b5eaf004f17d26e4213f8de57794
Reviewed-on: https://chromium-review.googlesource.com/c/1435936
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59111}
2019-01-28 10:01:03 +00:00
v8-ci-autoroll-builder
0152536def Update V8 DEPS.
Rolling v8/build: 4c3ae01..a041d21

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: Ie68dccacbecc99a6de4fdb50b7fd754d84ac60b8
Reviewed-on: https://chromium-review.googlesource.com/c/1438558
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#59110}
2019-01-28 04:03:17 +00:00
v8-ci-autoroll-builder
5505bc15a1 Update V8 DEPS.
Rolling v8/build: 75934e6..4c3ae01

Rolling v8/third_party/depot_tools: eb2767b..bdb1123

Rolling v8/third_party/googletest/src: 9518a57..5ec7f0c

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: I390a19b67d4cafbad6e0cca72b3a28728d0cd3f1
Reviewed-on: https://chromium-review.googlesource.com/c/1438337
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59109}
2019-01-27 12:11:31 +00:00
v8-ci-autoroll-builder
17b185c000 Update test262.
Rolling v8/test/test262/data: 116c95d..1068137

TBR=adamk@chromium.org,gsathya@chromium.org

Change-Id: I1572b3b1f27b09fba4169903c3df46c3f0d178d3
Reviewed-on: https://chromium-review.googlesource.com/c/1437819
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#59108}
2019-01-26 14:44:39 +00:00
Michael Achenbach
222510ed94 [test] Run test262 on mac on more shards
The test runner is stuck on start-up otherwise.

TBR=sergiyb@chromium.org
NOTRY=true

Bug: v8:8552
Change-Id: Ief2632ce168f83ae33bc9ae1f7edee152505cae9
Reviewed-on: https://chromium-review.googlesource.com/c/1437276
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59107}
2019-01-26 14:25:39 +00:00
Ross McIlroy
b9a87f0168 [Flags] Enable bytecode flushing.
BUG=v8:8395

Change-Id: Ie900be7d146d3a7ded13565b94b192807bc7eb28
Reviewed-on: https://chromium-review.googlesource.com/c/1417930
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59106}
2019-01-26 10:24:28 +00:00
peterwmwong
b0a5217f99 [builtins] Port TypedArray CreateTypedArray to Torque
This is part of an effort to improve the performance of TA#subarray.

Bug: v8:7161
Change-Id: Iffd469ca6528710c28cc454604a725ca9748359d
Reviewed-on: https://chromium-review.googlesource.com/c/1435768
Commit-Queue: Peter Wong <peter.wm.wong@gmail.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59105}
2019-01-26 05:47:53 +00:00
v8-ci-autoroll-builder
2e3fca435a Update V8 DEPS.
Rolling v8/build: 018911f..75934e6

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/b000c21..514fe3e

Rolling v8/third_party/depot_tools: 80b9cf7..eb2767b

Rolling v8/tools/clang: 3a16568..361dfd1

TBR=machenbach@chromium.org,hablich@chromium.org,sergiyb@chromium.org

Change-Id: Iea12f7b105b94293ca32ac4933b7338d07c0864e
Reviewed-on: https://chromium-review.googlesource.com/c/1437816
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#59104}
2019-01-26 03:53:07 +00:00
Jakob Kummerow
8310864010 Roll inspector_protocol to 8515c2a1c5c016646b61221586cd4e5839f425ee
This roll includes:
8515c2a1c UBSan fix
9977c471b (does not touch files imported into V8)
9cba74155 (does not touch files imported into V8)

Bug: v8:3770
Change-Id: If5ae5e7c6a7a81a246c8376545c4437cacaf1dc3
Reviewed-on: https://chromium-review.googlesource.com/c/1436230
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59103}
2019-01-25 22:41:26 +00:00
Jakob Kummerow
828342dd7f [ubsan][compiler] Avoid out-of-range casts to IrOpcode::Value
An enum-typed value should never have a value outside of that enum's
range.
This patch enforces that in Debug mode, while in Release mode keeping
the previous behavior of returning "UnknownOpcode" as the mnemonic for
illegal IrOpcode values to ease debugging.

Bug: v8:3770
Change-Id: I83a5a356f1fb7a266921940a4495f1d39a1823cd
Reviewed-on: https://chromium-review.googlesource.com/c/1436221
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59102}
2019-01-25 20:55:25 +00:00
Jakob Kummerow
1df72c6fa1 [ubsan] Don't call memcpy with nullptr arguments
Not even when copying 0 bytes. Same for memmove and memcmp.

Bug: v8:3770
Change-Id: I3ed45a4572467ec7a9fc697ac28c004aa9b8b274
Reviewed-on: https://chromium-review.googlesource.com/c/1436217
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59101}
2019-01-25 20:53:45 +00:00
Jakob Kummerow
67392e9d22 [ubsan][ia32][x64] Assemblers: safely access unaligned memory locations
The Memory<T>(address) helper requires the address to be aligned. Since
values embedded into ia32/x64 code can in general be unaligned, we must
use ReadUnalignedValue/WriteUnalignedValue to manipulate them.

Bug: v8:3770
Change-Id: I12c3fc6aa09062dcc9188b6782ed4a35e1d684bd
Reviewed-on: https://chromium-review.googlesource.com/c/1436223
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59100}
2019-01-25 18:47:36 +00:00
Andreas Haas
258371bd44 [wasm][anyref] Support anyref stack parameters
Anyref parameters can exist across GC runs. Therefore the GC has to
know where anyref parameters are on the stack so that it can mark them
in its marking phase, and update them in the compaction phase.

Already in a previous CL we grouped all anyref parameters so that they
can be found more easily in a stack frame, see
https://crrev.com/c/1371827. In this CL we implement the stack scanning
itself.

Note that anyref parameters are not scanned while iterating over the
caller's frame (to which they actually belong), but while iterating
over the callee's frame. The reason is that with tail-calls, only the
callee knows how many tagged stack parameters (aka anyref parameters)
there are.

R=mstarzinger@chromium.org
also-by=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: I7a41ce11d06c0d420146fdb0bb8d5606f28824d7
Reviewed-on: https://chromium-review.googlesource.com/c/1424955
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59099}
2019-01-25 18:00:46 +00:00
Tobias Tebbi
76394d6b34 [torque] add general down-cast intrinsic
Bug: v8:7793
Change-Id: If79b3d760406e44530da5656459ece6db3eff7ab
Reviewed-on: https://chromium-review.googlesource.com/c/1435935
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59098}
2019-01-25 14:16:33 +00:00
Simon Zünd
9514f0d62a [array] Add check for --force-slow-path to Array#sort
This CL changes Array#sort to use the generic path for fast elements
kinds if --force-slow-path is present. Note that the IsFastJSArray macro
includes this check but not the Cast itself.

R=jgruber@chromium.org

Bug: v8:8215
Change-Id: I1135ab9db15effd86020f49f4ae23ba1e1da07f8
Reviewed-on: https://chromium-review.googlesource.com/c/1435940
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59097}
2019-01-25 13:20:50 +00:00
Michael Starzinger
8a3c4d9eec [wasm][arm] Fix {Word32Shr} instruction selection.
This fixes a corner case with the matching for a {UBFX} instruction.
According to the ISA reference "UBFX Rd, Rn, #lsb, #width" is only valid
for "#width" in the [1;32-#lsb] range. Specifically a "#width" of 0 is
invalid but was not checked against by the instruction selector.

R=ahaas@chromium.org
TEST=mjsunit/regress/wasm/regress-924905
BUG=chromium:924905

Change-Id: I470671282b215be62dfd147a619a0d317f7cc746
Reviewed-on: https://chromium-review.googlesource.com/c/1435939
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59096}
2019-01-25 13:08:10 +00:00
Toon Verwaest
5a72c6b69b [parser] Use Token::INIT for hoisted sloppy block functions when possible
Change-Id: I83dc3bed644361be1b94063daefd890b10ba50cd
Reviewed-on: https://chromium-review.googlesource.com/c/1433772
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59095}
2019-01-25 12:24:46 +00:00
Mythri
592aeefa8d Defer inferring language mode as far as possible
Inferring the language mode involves iterating the stack to find the
closure. This is an expensive operation and should be done only when
required. This cl changes the implementation to infer the language
mode only when we can't defer it any further. Currently, we infer the
language mode when throwing an exception or when passing this
information to PropertyCallbackArguments.

This cl also changes the language mode parameter to SetProperty
related methods to Maybe<ShouldThrow>. We only use the language mode to
decide if we need to throw and using ShouldThrow instead of language
mode simplifies the code by avoiding conversions from Maybe<ShouldThrow>
to Maybe<LanguageMode> and vice-versa.

Bug: v8:8580, chromium:923820, chromium:925289
Change-Id: I72497497f62fe0d86fcecd57b06b3183b7531f7b
Reviewed-on: https://chromium-review.googlesource.com/c/1425912
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59094}
2019-01-25 11:53:19 +00:00