Commit Graph

42102 Commits

Author SHA1 Message Date
Michael Lippautz
f152f83224 [heap] Fix dead-lock between scavenger and sweeper
The deadlock can happen when two scavenging tasks process two different
pages for their old->new sets and at the same time try to allocate in
old space which triggers sweeping of the other task's page.

Bug: v8:6754
Change-Id: I6087553631e198d5ecfb8ab37925ac41cd6995bd
Reviewed-on: https://chromium-review.googlesource.com/635843
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47610}
2017-08-25 14:54:15 +00:00
Jakob Gruber
c7a7bf6af0 [regexp] Pass correct limit to Runtime::kRegExpSplit
The Uint32(limit) conversion can end up transitioning the regexp
instance to slow mode. In this case we need to bail out to runtime while
ensuring that ToUint32 is not observably called a second time. We do
this by passing the already-converted value to runtime.

This particular path was broken and we ended up passing the original
maybe_limit value to runtime instead.

TBR=yangguo@chromium.org

Bug: chromium:758763
Change-Id: If7f23b452d2e134ad9be3d4ef1d78d1c946fcef0
Reviewed-on: https://chromium-review.googlesource.com/635588
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47609}
2017-08-25 13:59:43 +00:00
Albert Mingkun Yang
b20390c0a1 [Fix] Allow LazyInstance to support classes with virtual members
Change the signature of `Construct` so that no casting is required on
calling it. The casting would fire control flow integrity check if the
class contains virtual members.

Bug: chromium:758925
Change-Id: Iefc711c634b36efd051e245e2df13b28d5563f45
Reviewed-on: https://chromium-review.googlesource.com/635563
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Albert Mingkun Yang <albertnetymk@google.com>
Cr-Commit-Position: refs/heads/master@{#47608}
2017-08-25 12:45:24 +00:00
Michael Lippautz
f048b4b18e [heap] ExternalStringTable: Replace List with std::vector
Bug: v8:6333
Change-Id: I0f5a21a66bbad6c56b3dd84d301b85e64f05cbc1
Reviewed-on: https://chromium-review.googlesource.com/635683
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47607}
2017-08-25 12:33:03 +00:00
Michael Lippautz
234d4307d7 [heap] Refactor and simplify pretenuring infrastructure
Bug: 
Change-Id: I81132af45d8fb649d4239fa0e0ef75b95e148208
Reviewed-on: https://chromium-review.googlesource.com/633604
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47606}
2017-08-25 11:51:03 +00:00
Mythri
08bfcb293c [TurboFan] Do not allow direct recursive inlining
Do not allow recursive inlining when function calls itself. i.e.f() -> f()
This is because we only get some static information for the first level
of inlining and it may not be very beneficial to just duplicate the entire
function. However, we still allow indirect recursion f() -> g() -> f() -> g1().
This helps in cases where f() is a small dispatch function. For example,
in rayTrace class.create -> obj.initialize -> class.create -> obj1.initialize.

Bug: chromium:757798
Change-Id: I0a5d9e62eabd7681849f900997b4df061b5f8ed5
Reviewed-on: https://chromium-review.googlesource.com/632622
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47605}
2017-08-25 11:24:45 +00:00
Georg Neis
fdecfd7f5c Fix comments on AccessorPair.
R=ishell@chromium.org

Bug: 
Change-Id: I7175176900c95fb676f633b405fffd5a55ffa4b5
Reviewed-on: https://chromium-review.googlesource.com/635323
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47604}
2017-08-25 11:15:24 +00:00
Camillo Bruni
8a7ce927a6 Don't look at abandoned prototype maps when looking for root maps
Bug: chromium:757199, chromium:758773, chromium:758821
Change-Id: I70644853770501b13992bd7bf78d168ca2308d64
Reviewed-on: https://chromium-review.googlesource.com/635223
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47603}
2017-08-25 10:44:29 +00:00
Clemens Hammacher
c8543c1f71 [wasm] [cleanup] More constexpr, less lazy initialization
The allocator for determining the location (reg/stack) for parameters
and return values can be constexpr. This avoids lazy initialization,
saving code size and execution time, and simplifying the implementation
significantly.

R=ahaas@chromium.org
CC=titzer@chromium.org

Change-Id: I295623cb1dad0f1537f7292dcf044f3d509588bb
Reviewed-on: https://chromium-review.googlesource.com/635163
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47602}
2017-08-25 10:36:39 +00:00
Michael Lippautz
b6158eb6be [heap] Move gc callbacks from List to std::vector
Bug: v8:6333
Change-Id: I4434c6cc59f886f1e37dfd315a3ad5fee28d3f63
Reviewed-on: https://chromium-review.googlesource.com/634907
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47601}
2017-08-25 10:28:59 +00:00
Andreas Haas
c693c81861 [wasm] Use the trap-location.js test with both sync and async compilation
Compile the module created in trap-location.js with both synchronous and
asynchronous compilation. Thereby I can reuse the test for streaming
compilation later.

R=clemensh@chromium.org

Change-Id: Id2e0c70886ddd1b11d51f614d02757099541aedd
Reviewed-on: https://chromium-review.googlesource.com/635165
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47600}
2017-08-25 10:21:58 +00:00
Ross McIlroy
5716fe8de7 [Interpreter] Saving bytecode offset for the prefix bytecode on wide bytecodes
For wide bytecodes, save the bytecode offset as the offset of the prefix
bytecode, rather than the bytecode itself. This means that any code that reads
the bytecode can explicitly know the width of the bytecode at the offset
without having to iterate through the complete bytecode array.

Also simplifies some code in the bytecode analysis that had to work around
the previous approach.

BUG=chromium:753705

Change-Id: I8a42e7cfff27791e39f3452e2b9e52c0608d28cb
Reviewed-on: https://chromium-review.googlesource.com/634003
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47599}
2017-08-25 10:05:28 +00:00
Michael Starzinger
8d2a8e0c05 [asm.js] Fail gracefully on overly large buffers.
This makes sure instantiate of asm.js modules fails gracefully on heap
buffers exceeding the uint32_t range supported by WebAssembly.

R=clemensh@chromium.org
TEST=mjsunit/regress/regress-crbug-754175
BUG=chromium:754175

Change-Id: I4a9c6791beaab6da826b5b6b5a495f97e9d3b4e9
Reviewed-on: https://chromium-review.googlesource.com/632618
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47598}
2017-08-25 09:52:58 +00:00
Michael Starzinger
77c7ef6750 [asm.js] Remove some dead AsmType subclasses.
R=clemensh@chromium.org

Change-Id: I5bdb91d2e82105bb301c2b97abfb1b074b710a64
Reviewed-on: https://chromium-review.googlesource.com/632680
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47597}
2017-08-25 09:50:29 +00:00
Jakob Gruber
49e3bfd572 [snapshot] Move builtins to dedicated snapshot area
As a first step towards lazy builtin deserialization, this CL moves
builtins to their own dedicated area in the snapshot blob, physically
located after startup data and before context-specific data.

The startup- and partial serializers now serialize all seen builtins as
references, i.e. they only encode the relevant builtin id (taking care
to preserve special behavior around the interpreter trampoline and
CompileLazy). Builtins are later fully serialized by the
BuiltinSerializer. The separate blobs are finally glued together by
CreateSnapshotBlob.

Deserialization takes the same steps: when we see builtin reference
bytecodes before builtins have been deserialized, we push to a list of
deferred builtin references. After builtin deserialization, this list is
iterated and all builtin references are fixed up.

Bug: v8:6624
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Idee42fa9c92bdbe8d5b8c4b8bf3ca9dd39634004
Reviewed-on: https://chromium-review.googlesource.com/610225
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47596}
2017-08-25 09:34:38 +00:00
Michael Lippautz
7571de3acf [heap] Worklist cleanups
- Create bottleneck for filtering in crash dumps
- Smaller fixes

Bug: 
Change-Id: I19e8a1ed6013af487c87b7132418b4c9b292946b
Reviewed-on: https://chromium-review.googlesource.com/633943
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47595}
2017-08-25 09:02:29 +00:00
Camillo Bruni
0582f029df Revert "[runtime] Deprecate old prototype maps"
This reverts commit 8974b75bce.

Reason for revert: In hindsight, the CL made only partially sense and causes unnecessary IC-misses.

Original change's description:
> [runtime] Deprecate old prototype maps
> 
> Bug: chromium:757199
> Change-Id: I5936fab1784ebf8de6eddd3b2bec0e2cf1b73f82
> Reviewed-on: https://chromium-review.googlesource.com/632317
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47581}

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

Change-Id: I9f43a5f8c5242f575346f47c24377dd832eeccd1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:757199
Reviewed-on: https://chromium-review.googlesource.com/634906
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47594}
2017-08-25 08:59:20 +00:00
Ulan Degenbaev
2ee967d253 [heap] Remove unused InvalidateCode function.
Bug: 
Change-Id: I7dacb2f4cbb66f0daebd3948c2239846af129f9a
Reviewed-on: https://chromium-review.googlesource.com/632621
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47593}
2017-08-25 08:31:30 +00:00
Peter Marshall
42ccbd33e9 [cleanup] Replace List with std::vector in runtime and builtins.
Bug: v8:6333
Change-Id: Iad2fdb7670dd01d19ed25c48a0091969cddb01c8
Reviewed-on: https://chromium-review.googlesource.com/632257
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47592}
2017-08-25 08:14:23 +00:00
jgruber
2d8a3c823a [regexp] In fuzzer, clear exception after failed string creation
Tentative fix for the CF crashes in https://crbug.com/754422.

Bug: chromium:754422
Change-Id: I0dcb6b8860cb0bf20b3566ffba08e6772398ee65
Reviewed-on: https://chromium-review.googlesource.com/632176
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47591}
2017-08-25 07:09:23 +00:00
Shiyu Zhang
ce1639d8ca [builtins] Create new builtins to set up args for CPP/API builtins
The CPP builtins execute the same piece of code to prepare context before
jumping into CEntryStub. By creating new ASM builtin to execute that common
piece of code, ~7KB code size (tested on x64) of snapshot_blob.bin can be 
reduced without any negative performance impact.

BUG=

Change-Id: I744369e8723dcd902b61dc50645db66bea884441
Reviewed-on: https://chromium-review.googlesource.com/595119
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47590}
2017-08-25 05:44:13 +00:00
Sathya Gunasekaran
f38c92a994 [Collections] Replace GenericHash runtime call with fast C call
Bug: v8:5717
Change-Id: I3775001a6148e25f15b11410449a6f8b7693f122
Reviewed-on: https://chromium-review.googlesource.com/625276
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47589}
2017-08-25 05:31:03 +00:00
v8-autoroll
734d173453 Update V8 DEPS.
Rolling v8/build: a35cf9a..a2b7113

Rolling v8/third_party/catapult: 92387bc..e37aa9d

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

Change-Id: I5d7b8b212c66df540c930688c10606f112c5b7af
Reviewed-on: https://chromium-review.googlesource.com/633137
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47588}
2017-08-25 03:41:24 +00:00
Jaideep Bajwa
8153807599 PPC: disable SimdLoadStoreLoad
Disable test on big endian PPC for now, since it
is missing load/store reverse byte instructions.

R=machenbach@chromium.org, jkummerow@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com
BUG=
LOG=N

Change-Id: Iaf12a14678bc9d113dc4d11998ea5bad158c20fd
Reviewed-on: https://chromium-review.googlesource.com/634271
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47587}
2017-08-25 02:26:25 +00:00
Adam Klein
9315aa4b7e [js-perf-tests] Add more property accesses to module namespace micro-benchmark
Change-Id: Id9f60cdafc486de2b04684de84174f9765637c12
Reviewed-on: https://chromium-review.googlesource.com/601328
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47586}
2017-08-24 23:56:08 +00:00
Adam Klein
f9a3a5af2a Simplify usage of runtime hashing functions in weak-collection.js
This also removes the IS_GLOBAL macro from macros.py, which did
not work correctly for Remote objects/contexts.

Bug: v8:6413
Change-Id: I90690bdd0d8e8fed581bc4c9f5c60168d785f096
Reviewed-on: https://chromium-review.googlesource.com/633872
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47585}
2017-08-24 23:31:37 +00:00
Kevin Gibbons
46cb812fa1 [parser] Turn on --harmony-template-escapes by default
This flag allows invalid escape sequences in tagged templates, which is
a stage-4 TC39 proposal shipping in other browsers.

Bug: v8:5546
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I3e7c374c9b547f62d5976f76a7208d05fe9decf8
Reviewed-on: https://chromium-review.googlesource.com/581885
Commit-Queue: Kevin Gibbons <bakkot@gmail.com>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47584}
2017-08-24 20:05:03 +00:00
Marja Hölttä
4e45342994 [script streaming] Fix U+feff handling.
U+feff is the UTF BOM but if it occurs inside the text, it's a "zero-width
no-break space". However, the UTF-8 decoder in script streaming still thought
it's a BOM and skipped it. The correct way to handle it would be to create a
U+feff code point instead - the Scanner will then handle it as whitespace.

This is a discrepancy between the Blink UTF-8 decoder and the V8 UTF-8 decoder,
and caused the source positions be off by one. This bug went unnoticed, since
normally off-by-one in this situation doesn't make the code to break.

BUG=chromium:758508,chromium:758236

Change-Id: Ib92a3ee65c402e21b77e42537db2a021cff55379
Reviewed-on: https://chromium-review.googlesource.com/632096
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47583}
2017-08-24 19:35:12 +00:00
Eric Holk (eholk)
04d3b60ead [wasm] Disable V8.WasmExecutionTimeMicroseconds timing
This timer imposes a high overhead and does not give us the data we'd
like. Disabling for now until we can develop a better solution.

Bug: v8:6514
Change-Id: I73b15131a71d7b6750556f82907cb2a0e6edd321
Reviewed-on: https://chromium-review.googlesource.com/633703
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47582}
2017-08-24 18:26:32 +00:00
Camillo Bruni
8974b75bce [runtime] Deprecate old prototype maps
Bug: chromium:757199
Change-Id: I5936fab1784ebf8de6eddd3b2bec0e2cf1b73f82
Reviewed-on: https://chromium-review.googlesource.com/632317
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47581}
2017-08-24 16:55:13 +00:00
Michael Lippautz
6475ae2025 Remove left-over handling for StaticVisitors
Bug: chromium:738368
Change-Id: I4867b90c639d8d5315e0caa22285e7ddbdab44f9
Reviewed-on: https://chromium-review.googlesource.com/632682
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47580}
2017-08-24 15:56:32 +00:00
Juliana Franco
f6a83e36cd [Test] Test case to investigate the impact of removing the weak list
of optimized JS functions.

Bug: v8:6637
Change-Id: Ice94a4a2187f98adcbf25ac1832e13d4b7529f34
Reviewed-on: https://chromium-review.googlesource.com/628198
Commit-Queue: Juliana Patricia Vicente Franco <jupvfranco@google.com>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47579}
2017-08-24 15:02:48 +00:00
Camillo Bruni
0852770d08 [printing] Add custom Brief printing for Structs
Change-Id: Ic9dffa7f94b471824f18170c72df8568dd47cfcd
Reviewed-on: https://chromium-review.googlesource.com/631959
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47578}
2017-08-24 14:44:38 +00:00
Albert Mingkun Yang
caff0dddcd Allow CSA stubs to restrict the set of allocatable registers.
This is useful for the RecordWrite stub that can now specify the set
of allocatable registers in its call descriptor interface. 
During register allocation a custom register configuration is used to
ensure that the register are allocated from the given set.

This makes calling RecordWrite stub less expensive as we need to save/restore
only the allocatable registers instead all registers.

Bug: chromium:749486
Change-Id: If4d73f1fd525e480970ea92600fb811e63677eb5
Reviewed-on: https://chromium-review.googlesource.com/624734
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Albert Mingkun Yang <albertnetymk@google.com>
Cr-Commit-Position: refs/heads/master@{#47577}
2017-08-24 14:31:18 +00:00
Leszek Swirski
f71d6a1938 [tools] Various small adb-d8.py enhancements
* Only pass -t to adb if running with stdout as a tty (prevents weird
   tty output processing, .e.g replacing '\n' with '\r\n')
 * Allow passing a device directory for d8 (useful for testing multiple
   builds against each other)
 * Allow specifying additional allowed paths (useful for e.g. running
   files from /tmp)

Change-Id: I90b8bba6f3c248105927c800b8b5b601692adf6c
Reviewed-on: https://chromium-review.googlesource.com/629079
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47576}
2017-08-24 14:20:55 +00:00
Camillo Bruni
d8f4e1e1c9 Do not inline V8_Fatal in the hope for better stack traces
Several stack traces from crash reports in https://crbug.com/754490 have
wrong magic signatures. Even though we're supposed to be failing in a V8_Fatal
the signature doesn't show up on the stack trace.

Change-Id: I35c8f27e36fd2a0ec474095a6cf5557a76fe7d26
Reviewed-on: https://chromium-review.googlesource.com/631878
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47575}
2017-08-24 14:16:43 +00:00
Camillo Bruni
46fc2af0bd [builtins] Speed up Array.prototype.forEach for dictionary elements
We can avoid the ToString conversion before doing the HasProperty check.
This avoid a costly Smi to String conversion which is unecessary for the
following lookups.
For very large dictionary elements this is a significant slow down as we
will no longer hit the GetNumberStringCache.

Change-Id: I5a0eb13470ab3d3d8a87ee36d28ce7be5cbc2b2e
Reviewed-on: https://chromium-review.googlesource.com/626056
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47574}
2017-08-24 13:57:02 +00:00
jgruber
a653d26984 [mksnapshot] Add v8_enable_fast_mksnapshot
The v8_enable_fast_mksnapshot gn flag reduces time spent in mksnapshot
on x64 debug builds from 19s to 6s by disabling far jump rewrites and
register allocation verification. This flag should only be used locally
for development.

Bug: v8:6688
Change-Id: I02e8546a6a329b9cb377b95ab586d5857a3c6731
Reviewed-on: https://chromium-review.googlesource.com/632258
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47573}
2017-08-24 13:47:32 +00:00
Yuki Shiino
25decc66ae Set the current context to the function's context when entering to LAP.
In case of LAP(lazy accessor pair), the function's creation context
must be equal to the accessor holder's creation context, so this CL
changes the current context to the accessor holder's creation context.

Note that this is the second attempt after https://crrev.com/2770003002

The change from the previous attempt is to skip looking for the
object's constructor if the object itself is a function.

Also some of Blink's LAP-context-sensitive tests got updated at
https://crrev.com/c/597990 and the rest of the tests will get
temporarily disabled at https://crrev.com/c/605408 .

TBR=verwaest@chromium.org

Bug: v8:6156
Change-Id: I09709a90995d82a03996d0347e5a1d8425b5db9c
Reviewed-on: https://chromium-review.googlesource.com/563152
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47572}
2017-08-24 12:04:19 +00:00
Michael Starzinger
c56957142b [stubs] Reduce overhead of deferred CSA-assert blocks.
This further reduces the footprint of the deferred blocks used as part
of our CSA-asserts by marking the {DebugAbort} calls as unreachable.
This allows us to elide (un)spilling because re-entry into the normal
instruction stream is removed.

R=jgruber@chromium.org
BUG=v8:6688

Change-Id: Ib00362fbe34427b3c8f8c8f5fcea0b83028f81b2
Reviewed-on: https://chromium-review.googlesource.com/632056
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47571}
2017-08-24 11:19:20 +00:00
Yang Guo
06c3f2b71d [snapshot] remove support for deoptimization entries.
We no longer include hydrogen stubs in the snapshot.

R=jgruber@chromium.org

Change-Id: Id268b416ed839f55d297a1888444ef6323ec9dd9
Reviewed-on: https://chromium-review.googlesource.com/631956
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47570}
2017-08-24 10:06:45 +00:00
Yang Guo
92713cc3da [debug] remove some dead code.
R=jgruber@chromium.org

Change-Id: I07b748990f3e23cfedb0fd0cf8dce62f21a309bd
Reviewed-on: https://chromium-review.googlesource.com/631722
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47569}
2017-08-24 10:05:40 +00:00
Michael Starzinger
9cd0c8ea64 [turbofan] Introduce {DebugAbort} backend instruction.
This introduces a {DebugAbort} machine-level operator as well as the
corresponding {ArchDebugAbort} backend instruction. The goal of this is
to speed up snapshot generation due to cheaper "CSA-asserts".

R=jgruber@chromium.org
BUG=v8:6688

Bug: v8:6688
Change-Id: If45f7da0652d4bb920c51ab7a7c41f9670434bbb
Also-By: jgruber@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/628560
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47568}
2017-08-24 09:45:39 +00:00
Yang Guo
39eacf6417 [snapshot] consistently use uint32_t and little endian encoding.
Bug: v8:6747
Change-Id: If4b9c1ccd23c3ef1ed5e173f0143d2cc85581154
Reviewed-on: https://chromium-review.googlesource.com/631678
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47567}
2017-08-24 09:43:09 +00:00
Alexandre Talon
237f0f3271 [Turbofan] Updating the name of a variable after removing the AstGraphBuilder
Since the AST graph builder is gone, no variable should be named osr_ast_id.
This CL replaces it with osr_offset. It designates the offset of the bytecode
where the OSRing was triggered.

Bug: 
Change-Id: Ia53a83b09f917fcd0174da685a18edd3ee3aa01f
Reviewed-on: https://chromium-review.googlesource.com/621008
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47566}
2017-08-24 09:25:59 +00:00
Michael Lippautz
94e1437f76 [heap] Disable TestOfInitialHeap in DEBUG builds
DEBUG builds pull in all sorts of instrumentation infrastructure that
leads to larger heaps. The check for intial size is only useful for
release builds.

Bug: v8:6746
Change-Id: I5ab220d21167e69d7fb32c9db68045368c4ef178
R: ulan@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/631876
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47565}
2017-08-24 09:12:00 +00:00
Michael Hablich
f165dfdd5c Revert "[heap] Enable concurrent marking for x86 and x64."
This reverts commit 8bbc224243.

Reason for revert: On Canary 3195.

Original change's description:
> [heap] Enable concurrent marking for x86 and x64.
> 
> This is an experiment and will be reverted after getting canary
> coverage.
> 
> Bug: chromium:694255
> Change-Id: I40388d8c6db0e46e2ce64e88aba04c5ac8822e94
> Reviewed-on: https://chromium-review.googlesource.com/625959
> Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47541}

TBR=ulan@chromium.org,mlippautz@chromium.org

Change-Id: I642c1f778267a795bf1e1a6bba863552394ad1d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:694255
Reviewed-on: https://chromium-review.googlesource.com/631717
Reviewed-by: Michael Hablich <hablich@chromium.org>
Commit-Queue: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47564}
2017-08-24 07:52:10 +00:00
Clemens Hammacher
ad014fb61c [wasm] Avoid constructing OOB WireBytesRef
The {WireBytesRef} constructor checks that {offset + length} does not
overflow. Hence we need to check for illegal sizes before constructing
the {WireBytesRef}.

The {consume_bytes} function already does that, so remove the
redundant hand-written checking.

R=titzer@chromium.org

Bug: chromium:752781
Change-Id: If3a2946a62fa38cc668695ed7186b9751a1f356f
Reviewed-on: https://chromium-review.googlesource.com/605894
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47563}
2017-08-24 07:06:17 +00:00
v8-autoroll
5e5d69e130 Update V8 DEPS.
Rolling v8/build: 337452a..a35cf9a

Rolling v8/third_party/catapult: 810d9d2..92387bc

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

Change-Id: I55630210fe41f252dfaf6d1df91c8de98d4cd1df
Reviewed-on: https://chromium-review.googlesource.com/630142
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47562}
2017-08-24 03:51:41 +00:00
Alexey Kozyatinskiy
d01fc272fc [inspector] improved queryObjects command line API
API resolves functions to its .prototype property to make possible
queries like queryObjects(Object), queryObjects(HTMLElement), e.t.c.

R=dgozman@chromium.org

Bug: v8:6732
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie8dc2288fa7e59c69f9b2647a9d5e35f0ac9215f
Reviewed-on: https://chromium-review.googlesource.com/630244
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47561}
2017-08-24 00:50:52 +00:00