Commit Graph

53366 Commits

Author SHA1 Message Date
kingwl
65bb02593f [objects] Correctly Object.isSeal for TypedArray
Add a special handle of TypedArray elements in TestElementsIntegrityLevel

Bug: v8:8082
Change-Id: I60be644801618b576b0b8b1883ac67bf0040c849
Reviewed-on: https://chromium-review.googlesource.com/c/1412133
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58874}
2019-01-17 10:46:29 +00:00
Maya Lekova
2600bba4d7 [turbofan] Enhance the serializer for background compilation phase
This CL adds handling for almost all calls, and for some load and store
bytecodes in the serializer and marks the relevant call targets as
"serialized for compilation".

Design doc:
https://docs.google.com/document/d/1vCQYhtFPqXafSMweSnGD8l0TKEIB6cPV5UGMHJtpy8k/edit?ts=5bf7d341

Bug: v8:7790
Change-Id: I2bd24c1b0541e83c108422b66902a5b979f1e1a8
Reviewed-on: https://chromium-review.googlesource.com/c/1351014
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58873}
2019-01-17 10:20:04 +00:00
tzik
fab59bbb08 Support non-default MicrotaskQueue on RunMicrotasks builtin
The previous implementation of MicrotaskQueue::RunMicrotasks() didn't
support non-default MicrotaskQueue as RunMicrotasks builtin couldn't
take a parameter.

This CL updates the entry trampoline for RunMicrotasks builtin to pass
a MicrotaskQueue parameter to support non-default one.

Bug: v8:8124
Change-Id: I817238cd9a1fd6c20dcd58022274736c5e86229a
Reviewed-on: https://chromium-review.googlesource.com/c/1369906
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58872}
2019-01-17 10:04:54 +00:00
Clemens Hammacher
314da8eed2 [wasm] Remove reachability checks from TF backend
The function body decoder already tracks reachability and only calls
the backend for reachable code. Thus the checks in the TF backend can
be skipped.
Note that there was already a DCHECK in place that checks whether
{SsaEnv::reached()} always returns true. This was to give fuzzers a
chance to prove the reachability analysis in the function body decoder
wrong. Since this did not happen, we can not remove the {reached()}
method from SsaEnv, since it always returned true anyway.

R=titzer@chromium.org

Bug: v8:8423, v8:8611
Change-Id: I2336aa7a092e381e3d94d87051b6e14db0dbab99
Reviewed-on: https://chromium-review.googlesource.com/c/1415493
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58871}
2019-01-17 09:32:40 +00:00
Ujjwal Sharma
2f543fad22 [test] add performance tests for String#startsWith
Add benchmarks for String.prototype.startsWith in order to keep track
of performance ahead of the torque port.

Bug: v8:8400
Change-Id: I0276b84b315024bba1a0d6f761ee2c6cf2c516a2
Reviewed-on: https://chromium-review.googlesource.com/c/1416070
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58870}
2019-01-17 08:23:06 +00:00
Clemens Hammacher
edab9a2021 Use forwarding constructors for MacroAssembler
and TurboAssembler. Instead of listing all the different combinations
of arguments (which is one more now, temporarily), just forward all
arguments down via MacroAssembler and TurboAssembler to
TurboAssemblerBase.
Interestingly, this requires more specific types sometimes (int instead
of size_t), since further down the forwarding chain, the compiler does
not recognize any more that the value is a constant, and emits a
warning about a possibly truncating implicit conversion.

R=mstarzinger@chromium.org

Bug: v8:8689, v8:8562
Change-Id: Ifd13d2210ee64251c0075c0d9b68cacd5107d9ab
Reviewed-on: https://chromium-review.googlesource.com/c/1414913
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@{#58869}
2019-01-17 08:20:36 +00:00
Michael Achenbach
7b01fe76d1 Update V8 DEPS.
Rolling v8/build: 7a1aacd..de8bef4

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/78448d9..a9729f3

Rolling v8/third_party/depot_tools: e229a0e..d1dba64

Rolling v8/third_party/googletest/src: 933e5df..879ac09

Rolling v8/tools/clang: a9c5056..9f413ce

This also ports:
https://crrev.com/c/1415130

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

Bug: chromium:922889
Change-Id: Ibf674eeefb82f9feb210107d6081c489cfba48db
Reviewed-on: https://chromium-review.googlesource.com/c/1416608
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#58868}
2019-01-17 08:14:47 +00:00
Alexei Filippov
defbef78d2 [inspector] An Error with no stack description should not be empty
Make the description return the class name as it used to be.

BUG=chromium:919292

Change-Id: Idbc07643f15014a39a08a545a5003be891d95bd3
Reviewed-on: https://chromium-review.googlesource.com/c/1416318
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58867}
2019-01-16 23:59:04 +00:00
tzik
ba363c755b Merge MicrotaskQueue::RunMicrotasks and Isolate::RunMicrotasks
This retires Isolate::RunMicrotasks in favor of using
MicrotaskQueue::RunMicrotasks.

Bug: v8:8124
Change-Id: I717dabce7c4127d7e4524bdb639f46c3d55df49b
Reviewed-on: https://chromium-review.googlesource.com/c/1385969
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58866}
2019-01-16 23:35:24 +00:00
Junliang Yan
943b5d029d PPC/s390: [assembler] Allow to pass custom buffer implementations
Port 1a3aab51f6

Original Commit Message:

    When generating an Assembler, you currently have two choices: Either
    let the Assembler allocate a growable internal buffer, which is owned
    by the Assembler. Or provide an externally allocated buffer, which
    cannot grow.
    This CL changes this interface to allow providing any implementation of
    a buffer. The provided buffer can be a view to an externally owned
    buffer, which still can grow.
    This will be used to split WebAssembly compilation and code submission.
    The buffer needs to be able to grow, but cannot be owned by the
    Assembler because it has to survive until the code is submitted.

R=clemensh@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Id9383db813b13ea1d9eab485724aeb55b08cdfee
Reviewed-on: https://chromium-review.googlesource.com/c/1416310
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58865}
2019-01-16 21:27:51 +00:00
Sergiy Belozorov
9378c6d1b1 [tools] Whitespace CL
TBR=sergiyb@chromium.org

No-Try: true
Bug: chromium:616879
Change-Id: I301af0a07f29c32c1ade23a7858455aa2632a847
Reviewed-on: https://chromium-review.googlesource.com/c/1407083
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58864}
2019-01-16 20:47:02 +00:00
Sven Sauleau
e65736241b [wasm] fix js-api global/value-get-set
Fix WebAssembly's global/value-get-set. The argument must not be
undefined.

mjsunit tests were updated.

Bug: v8:8319
Change-Id: Id3d3c9b18cbc8854e589481dfc7c52f35cfb7bf7
Cq-Include-Trybots: luci.chromium.try:linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/1411886
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Sven Sauleau <ssauleau@igalia.com>
Cr-Commit-Position: refs/heads/master@{#58863}
2019-01-16 18:56:51 +00:00
Clemens Hammacher
4064757cbf [cleanup] Clean up base::EnumSet
After moving to its own header, this CL cleans up some parts of the
interface. It fixes names and const-declarations of simple accessors,
and adds a named constructor to make it explicit that an EnumSet should
be constructed from an integral value.
Also refactor the use in cctest.h to have less statically declared
constants. Instead, just create the set of extensions in the individual
tests.

R=titzer@chromium.org

Bug: v8:8562
Change-Id: I6178d1aba25afa1d7f54c29ccf81505c165e7cd3
Reviewed-on: https://chromium-review.googlesource.com/c/1409366
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58862}
2019-01-16 18:17:35 +00:00
Johannes Henkel
7b0038ef40 [DevTools] Roll inspector_protocol to fdbdb154336fc1f15a0a6775349dd90243b8d3fc.
This should be a non-event, I'm just rolling it to line it up
with https://chromium.googlesource.com/deps/inspector_protocol/
again.

Change-Id: I84b0af31963bceb66084a579519412d47c3bbd40
Reviewed-on: https://chromium-review.googlesource.com/c/1413409
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58861}
2019-01-16 17:38:16 +00:00
Daniel Clifford
b615dfa550 [torque] Implement methods and constructors for structs and classes
With the changes in this patch,	it is now possible to add methods to
both Torque's class and struct types. As a special case, "constructor"
methods are used to initialize the values of classes and structs when
they are constructed.

The functionality in this patch	includes:

- The refactoring of class- and struct-handling code to share field
  and method declaration code between both.

- Addition of the "%Allocate" intrinsic that allocates raw bytes to be
  allocated from the V8 GC's NewSpace heap as the basis for freshly
  created, initialized class objects.

- An implementation of a CallMethodExpression AST node that enables
  calling methods and constructors, including special handling of
  passing through the "this" pointer for method calls on structs by
  reference. The syntax for struct construction using "{}" remains as
  before, but now calls the struct's matching constructor rather than
  implicitly initializing the struct fields with the initialization
  arguments. A new syntax for allocation classes is introduced: "new
  ClassName{constructor_param1, constructor_param1, ...}", which
  de-sugars to an %Allocate call followed by a call to the matching
  constructor.

- class	constructors can use the "super" keyword to initialize	their
  super class.

- If classes and struct do not have a constructor, Torque creates a
  default constructor for them based on their field declarations,
  where each field's initial value is assigned to a same-typed
  parameter to the the default constructor. The default constructor's
  parameters are in field-declaration order, and for derived classes,
  the default constructor automatically uses a "super" initialization
  call to initialize inherited fields.

- Class field declarations now automatically create ".field" and
  ".field=" operators that create CSA-compatible object accessors.

- Addition of a no-argument constructor for JSArrays that creates an
  empty, PACKED_SMI_ELEMENTS JSArray using the machinery added
  elsewhere in this patch.

Bug: v8:7793
Change-Id: I31ce5f4b444656ab999555d780aeeba605666bfa
Reviewed-on: https://chromium-review.googlesource.com/c/1392192
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58860}
2019-01-16 17:13:13 +00:00
Toon Verwaest
d5f321cb5a [parser] Check conflicting var declarations from eval at compile-time
Change-Id: I9195c7ffdc4b841f14701662527c97c9698bd472
Reviewed-on: https://chromium-review.googlesource.com/c/1411888
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58859}
2019-01-16 17:01:31 +00:00
Ben L. Titzer
8a40e88db3 [wasm] Implement table.copy bytecode
The table.copy bytecode copies a range of table entries in a similar
way to memcopy. This CL implements the behavior in a runtime call
that calls into the wasm engine.

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

Change-Id: I420451202b1b78ea92cbd10387a644ed57e111c8
Reviewed-on: https://chromium-review.googlesource.com/c/1414919
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58858}
2019-01-16 16:55:31 +00:00
Michael Starzinger
07cff327ed [wasm] Make --print-wasm-code skip runtime stubs.
This changes the existing --print-wasm-code to no longer print code for
runtime stubs (or any other stub code). The new --print-wasm-stub-code
can be used to specifically print such stubs. This does not affect the
existing --print-code behavior.

R=ahaas@chromium.org

Change-Id: I7a00722bf6e7cfbc210245cfd00dac16905f8902
Reviewed-on: https://chromium-review.googlesource.com/c/1411883
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58857}
2019-01-16 16:11:28 +00:00
Junliang Yan
ec0bf86cf5 PPC: disable VerifyTransitiveBuiltins sanity check on PPC
Bug: v8:8558

Change-Id: I69a36f070ffe4e28768a70b025de2f89e832782d
Reviewed-on: https://chromium-review.googlesource.com/c/1412499
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58856}
2019-01-16 15:57:48 +00:00
Clemens Hammacher
1887b30692 [cleanup] Remove redundant PipelineImpl::Run implementations
A minor cleanup I saw while working on related stuff.

R=mstarzinger@chromium.org

Bug: v8:8562
Change-Id: If11fe1dae3820e61ed3807cfefd33dc229903ffb
Reviewed-on: https://chromium-review.googlesource.com/c/1414915
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58855}
2019-01-16 15:36:28 +00:00
Andreas Haas
48624bc390 [api] Fix includes in trap handler API header files
R=yangguo@chromium.org

Bug: chromium:921971
Change-Id: Id6715637a883c7606d96d8c4352bae1346cb0ec2
Reviewed-on: https://chromium-review.googlesource.com/c/1411603
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58854}
2019-01-16 15:15:52 +00:00
Michael Starzinger
30882a5076 [wasm] Fix {OpcodeLength} for invalid br-on-exn opcodes.
R=clemensh@chromium.org
TEST=mjsunit/regress/wasm/regress-922432
BUG=chromium:922432

Change-Id: I3843eaee2027fff770fd77bc9205b70788fffa37
Reviewed-on: https://chromium-review.googlesource.com/c/1414917
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58853}
2019-01-16 14:50:13 +00:00
Dan Elphick
b121cde901 [api] Add Check method to Maybe
This new method returns no value and just verifies that the Maybe is not
Empty. This is intended to be used for functions like Object::Set that
return a Maybe<bool> but only use "emptiness" to indicate its result and
where ToLocalChecked() appears to be discarding information.

Also comments Object::Set to indicate that Check() is the preferred way
of asserting that the Set should always succeed.

R=yangguo

Bug: v8:8562
Change-Id: Ic3b45e42fa9ba0b53f1a764660a56041e64f087b
Reviewed-on: https://chromium-review.googlesource.com/c/1414912
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58852}
2019-01-16 14:25:13 +00:00
Junliang Yan
4f261e9a59 PPC: passing correct const pool offset for reloc
Change-Id: I17ab5dbf79acbba1c562ecaf585e919da6cfaf75
Reviewed-on: https://chromium-review.googlesource.com/c/1412632
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58851}
2019-01-16 14:22:24 +00:00
Toon Verwaest
f2303d9a34 [parser] Use cached kDynamic variable for eval-introduced vars
That makes the declaration in sync with how dynamic references are resolved,
avoiding duplicate variable creation in the likely case that the variable is
also referenced within the eval.

Bug: v8:5112, v8:5135, v8:8693
Change-Id: I0c55495f573fe8b5076b1627c139ff72d1adda74
Also-by: leszeks@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/1408890
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58850}
2019-01-16 14:18:33 +00:00
Benjamin Kramer
15a258b070 [assembler] Don't define the reserved name _xgetbv
_xgetbv is reserved for the implementation and shouldn't be used by user
code. Newer GCCs and clang trunk define _xgetbv, leading to a name
collision if xsaveintrin.h gets included transitively.

This unbreaks building v8 with clang trunk and libstdc++ 4.9, which
happens to pull in xsaveintrin.h transitively through <algorithm>. Newer
versions of libstdc++ don't seem to do that anymore which is why this
issue never showed up before.

R=bmeurer@chromium.org

Change-Id: If94efaf4798e5420738064bcbf26880f904c76a9
Reviewed-on: https://chromium-review.googlesource.com/c/1414858
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58849}
2019-01-16 13:52:03 +00:00
Clemens Hammacher
1a3aab51f6 [assembler] Allow to pass custom buffer implementations
When generating an Assembler, you currently have two choices: Either
let the Assembler allocate a growable internal buffer, which is owned
by the Assembler. Or provide an externally allocated buffer, which
cannot grow.
This CL changes this interface to allow providing any implementation of
a buffer. The provided buffer can be a view to an externally owned
buffer, which still can grow.
This will be used to split WebAssembly compilation and code submission.
The buffer needs to be able to grow, but cannot be owned by the
Assembler because it has to survive until the code is submitted.

R=mstarzinger@chromium.org

Bug: v8:8689
Change-Id: Ib6c5ebffc8b71d0778944abac34f02c5cc7dbd79
Reviewed-on: https://chromium-review.googlesource.com/c/1411347
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58848}
2019-01-16 13:31:12 +00:00
Peter Marshall
bc3dba57d9 [cpu-profiler] Use a non-static atomic_bool member in SamplerManager
This doesn't need to be static as the whole SamplerManager class has
only one static instance anyway, via instance().

This might also fix the weird lock behavior we are seeing on Nexus 5x
where the atomic_bool lock seems to never be released.

Bug: v8:8649
Change-Id: If44b6361c9e2a124265ca5b15b997538475a2ec9
Reviewed-on: https://chromium-review.googlesource.com/c/1414854
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58847}
2019-01-16 11:50:39 +00:00
Leszek Swirski
bfc9eb2e8c [scanner] Micro-optimize AdvanceUntil
Replace std::find_if in AdvanceUntil with a manual loop, which can
then return early, skipping the branch comparing to buffer_end_.

Change-Id: If49ed3667877751fcb0103a742750f03e5bd50db
Reviewed-on: https://chromium-review.googlesource.com/c/1411351
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58846}
2019-01-16 11:39:14 +00:00
Sergiy Belozorov
3c34f1a50c [tools] Add new swarming bots and remove support for Buildbot perf trybots
R=machenbach@chromium.org, tmrts@chromium.org

No-Try: true
Bug: chromium:616879
Change-Id: I1dbef7ca4ac69df2d3de654b381ab163d5be4214
Reviewed-on: https://chromium-review.googlesource.com/c/1409200
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58845}
2019-01-16 11:35:49 +00:00
Toon Verwaest
876a782c5b [debugger] Don't collect 'this' for the scope inspector
It's already added somewhere else, and otherwise it shows up twice. We only
need to collect it for DebugEvaluate.

Bug: chromium:921339
Change-Id: I8e8890ecf19e0c7d1196c32e9358962c984001da
Reviewed-on: https://chromium-review.googlesource.com/c/1414851
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58844}
2019-01-16 11:34:44 +00:00
Leszek Swirski
928417997c [parser] Declarations store Variables not proxies
Storing a VariableProxy in declarations means that a declaration and
initialisation assignment are tightly coupled to use the same var. In
particular, this means that Var declarations in with scopes have to
clone the VariableProxy to split the declaration and initializer LHS
lookup.

This patch changes declarations to point directly to the Variable, not
the VariableProxy. This will allow future refactoring to decouple
declarations and initialisations.

Change-Id: I0baa77bfd12fe175f9521d292740d7d712cffd37
Reviewed-on: https://chromium-review.googlesource.com/c/1406683
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58843}
2019-01-16 09:34:44 +00:00
Jon Kunkee
b12390b202 Add MSVC ARMASM capability to mksnapshot
When building v8 using MSVC (as for Node.js), clang-cl is not available
to act as an assembler. This change allows mksnapshot to accomodate this
fact by emitting assembly in the MSVC ARM assembler's format.

Incidentally, the MSVC ARM asm format is just the ARM, Holdings assembler's
asm format with a small handful of unimplemented features.

https://docs.microsoft.com/en-us/cpp/assembler/arm/arm-assembler-reference

Bug: chromium:893460,v8:8645
Change-Id: I1a6b765b0f9b4d117d7a6f100015a4f124442865
Reviewed-on: https://chromium-review.googlesource.com/c/1394758
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58842}
2019-01-16 09:25:04 +00:00
Michael Achenbach
84ff79a3b9 Update V8 DEPS.
Rolling v8/build: 02ccb16..7a1aacd

Rolling v8/buildtools: 9d61cbb..40194ab

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/96320b5..78448d9

Rolling v8/third_party/depot_tools: 8432ec2..e229a0e

Rolling v8/third_party/googletest/src: 879ac09..933e5df

This also ports https://crrev.com/c/1410527 for the gtest roll.

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

Bug: chromium:922379
Change-Id: I65347892b6d2df3b6b30d8688367b39f4e76e25a
Reviewed-on: https://chromium-review.googlesource.com/c/1413874
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#58841}
2019-01-16 09:12:26 +00:00
Stephan Herhut
7849747ca2 [regalloc] Also use bundles for splinters
With this change, splinters inherit the bundle from
their parent and hence get the same registers allocated
(if possible) that are used by the parent. This might
improve performance and should reduce code size.

Change-Id: I0f3b5211cf47976a16b37204a1ce34d92725bc33
Reviewed-on: https://chromium-review.googlesource.com/c/1403126
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58840}
2019-01-16 09:04:27 +00:00
Jakob Gruber
61cb1133f9 [nojit] Convert generated memcpy functions into builtins
On ia32, arm and mips we generate miscellaneous memcpy-related functions
at runtime:

arm: memcpy for uint8-uint8 and uint16-uint8 {dest-source} pairs.
ia32: memmove
mips: memcpy uint8-uint8

In jitless mode, runtime codegen is disallowed, so these must be
converted into builtins.

As far as I can tell, the mips64 files were dead code (#ifdef'd to
V8_HOST_ARCH_MIPS instead of MIPS64).

Note also the slightly changed implementation of ia32's MemMove's
jump tables.

Bug: v8:8675
Change-Id: I5dc2a50fcbad332ce9f78228425b987b0d9acdf3
Reviewed-on: https://chromium-review.googlesource.com/c/1407067
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58839}
2019-01-16 09:01:26 +00:00
Caitlin Potter
10a408a6a7 [esnext] add support for hashbang syntax
Implements https://tc39.github.io/proposal-hashbang/, which simply
ignores the first line of a source file if it begins with '#!'
(U+0023 U+0021).

The test cases are influenced by
https://github.com/tc39/test262/pull/1983, which have not been pulled
into test262 local-tests due to issues with parseTestRecord.

BUG=v8:8523
R=gsathya@chromium.org, adamk@chromium.org, littledan@chromium.org

Change-Id: I4ae40222298de768a170c7a1d45fec118ed5713c
Reviewed-on: https://chromium-review.googlesource.com/c/1409527
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58838}
2019-01-15 19:42:21 +00:00
Ulan Degenbaev
93283bf04a [heap, api] Add API for automatically restoring the heap limit.
Now the embedder can instruct V8 to restore the initial heap limit
once the heap size drops below the given percentage of the heap limit.

Bug: chromium:922038
Change-Id: Ib668406c5d59c02b45a8eae7de96527ebc3f2b4d
Reviewed-on: https://chromium-review.googlesource.com/c/1411606
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58837}
2019-01-15 18:08:07 +00:00
Yang Guo
62876856a6 [api] add test for nested isolates
R=petermarshall@chromium.org

Change-Id: Id15504e2df9fd63755dba6c1f8d9deb7aa341b0a
Reviewed-on: https://chromium-review.googlesource.com/c/1409422
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58836}
2019-01-15 17:31:26 +00:00
Junliang Yan
e53110f560 Fix Code::set_constant_pool_offset
constant_pool_offset can be equal to InstructionSize if the code doesn't
contains any extra entries.

Change-Id: I7340a0581cc9d97a802406b6c099412d38a673fc
Reviewed-on: https://chromium-review.googlesource.com/c/1412494
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58835}
2019-01-15 17:11:01 +00:00
Maya Lekova
77ed999370 Revert "Reland "[cpu-profiler] Add more logging to find flaky failure""
This reverts commit 48feba60e6.

Reason for revert: Some TSAN failures reoccurred - https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20TSAN/24456

Original change's description:
> Reland "[cpu-profiler] Add more logging to find flaky failure"
> 
> This is a reland of 138bcfc396
> 
> Fixed all the data races and ran TSAN locally to confirm.
> 
> Original change's description:
> > [cpu-profiler] Add more logging to find flaky failure
> >
> > There is a flaky 5x failure in the tree which I can't reproduce locally.
> > This extra logging will help flush out what the problem is.
> >
> > Bug: v8:8649
> >
> > Change-Id: If36d2ce0f4feb398d7d746d69b417bb55a714422
> > Reviewed-on: https://chromium-review.googlesource.com/c/1402787
> > Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> > Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#58796}
> 
> Bug: v8:8649
> Change-Id: I53e293ef85a54d4b2b39aa3b980832031201aa0c
> Reviewed-on: https://chromium-review.googlesource.com/c/1411633
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58833}

TBR=jgruber@chromium.org,petermarshall@chromium.org

Change-Id: Icd779b0bd0faf1db76a17736b70617e6b1d6584f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8649
Reviewed-on: https://chromium-review.googlesource.com/c/1412458
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58834}
2019-01-15 16:24:25 +00:00
Peter Marshall
48feba60e6 Reland "[cpu-profiler] Add more logging to find flaky failure"
This is a reland of 138bcfc396

Fixed all the data races and ran TSAN locally to confirm.

Original change's description:
> [cpu-profiler] Add more logging to find flaky failure
>
> There is a flaky 5x failure in the tree which I can't reproduce locally.
> This extra logging will help flush out what the problem is.
>
> Bug: v8:8649
>
> Change-Id: If36d2ce0f4feb398d7d746d69b417bb55a714422
> Reviewed-on: https://chromium-review.googlesource.com/c/1402787
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58796}

Bug: v8:8649
Change-Id: I53e293ef85a54d4b2b39aa3b980832031201aa0c
Reviewed-on: https://chromium-review.googlesource.com/c/1411633
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58833}
2019-01-15 15:16:01 +00:00
Michael Starzinger
aaee69584f [wasm] Switch to new 'catch' and 'br_on_exn' proposal.
This switches the experimental exception handling implementation to the
new proposal where 'catch' blocks behave in a catch-all fashion and a
new 'br_on_exn' operation is used to check for a certain exception type
and extract the exception values on a match.

R=clemensh@chromium.org
TEST=unittests/FunctionBodyDecoderTest,mjsunit/wasm/exceptions
BUG=v8:8091

Change-Id: Ib12ba28b3aa2a7d831312a83abcb00bf56d0adc3
Reviewed-on: https://chromium-review.googlesource.com/c/1409431
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58832}
2019-01-15 14:46:30 +00:00
Dan Elphick
bc3d729880 [api] Advance CreateDefaultPlatform deprecation
Change platform::CreateDefaultPlatform from V8_DEPRECATE_SOON to
V8_DEPRECATED.

Bug: v8:8562
Change-Id: I053ff29b27dcd454960007bfd6597a01e1b2e62a
Reviewed-on: https://chromium-review.googlesource.com/c/1411636
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58831}
2019-01-15 14:23:46 +00:00
Tobias Tebbi
d59c308a28 [csa] use Turbofan's AllocateRaw node and the MemoryOptimizer
A first step towards using Turbofan's MemoryOptimizer for CSA/Torque.

Change-Id: I2ce9eaa602ea6f19a679e1cf5516c309a5a5051b
Reviewed-on: https://chromium-review.googlesource.com/c/1406675
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58830}
2019-01-15 14:00:14 +00:00
Toon Verwaest
5f8a3e1e21 [parser] Clear parenthesized flag on collapsing nary expressions
The parenthesized flag guarantees that the contents was validated as a possible
arrow head. By collapsing a parenthesized expression with an outer binary
expression we invalidly kept the flag and invalidly assumed that the collapsed
expression was validated.

Bug: chromium:921382
Change-Id: I207dcbfd228a1ed216130226fdb7ea045b89b85a
Reviewed-on: https://chromium-review.googlesource.com/c/1412172
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58829}
2019-01-15 13:26:23 +00:00
Leszek Swirski
d92705e53b [profview] Use requestAnimationFrame to schedule a render
This is more idiomatic than using a Promise.

Change-Id: I61443e90ef1c0c589284851ea9be410153919eb5
Reviewed-on: https://chromium-review.googlesource.com/c/456278
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58828}
2019-01-15 13:08:46 +00:00
Clemens Hammacher
57fa8f5ba3 [wasm] Split Result/ResultBase in WasmError and Result
We often use ResultBase or VoidResult to store or pass wasm errors
(errors with locations). This CL extracts a WasmError class which can
store an error (can also be empty), and Result<T> which stores an error
or a T (exactly one of them).

R=titzer@chromium.org

Bug: v8:8689
Change-Id: I3f5203559984a0ae8757e0130a9184957fa28df5
Reviewed-on: https://chromium-review.googlesource.com/c/1409365
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58827}
2019-01-15 12:48:02 +00:00
Leszek Swirski
3b6d179b71 [objects] Print marker for internalized strings
In ShortPrint, print a # before a string's length if it is internalized

Change-Id: Ifed80b358a4502c72d8a3d08b3b9399afe308d0f
Reviewed-on: https://chromium-review.googlesource.com/c/1411539
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58826}
2019-01-15 12:34:46 +00:00
Stephan Herhut
acb896b51e [codegen] Align targets of switch in loops
The blazor benchmark wobbles around by 5% with seemingly unrelated
changes to the generated code. I suspect this is due to moving
target adresses of the switch statement for the interpreter.

Generally, it would make sense to align targets for switch statements
as per general optimization guidelines. To keep code growth in bounds,
this change only enables this for switch statements inside of loops.

Local measurements show an improvement of around 5% for blazor and
hopefully the benchmark will be more stable moving forward.

Bug: chromium:919986 chromium:921477
Change-Id: I69df38f902d4fcc65af9e95a63ca1f7f14e0fa09
Reviewed-on: https://chromium-review.googlesource.com/c/1411637
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58825}
2019-01-15 12:29:36 +00:00