Commit Graph

42078 Commits

Author SHA1 Message Date
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
Mircea Trofin
172d6f50e5 [wasm] Test and fix for module with no functions
Initialize the code table with a valid default (e.g. illegal builtin),
otherwise we're invalidating assumptions when relocating.

Bug: chromium:757217
Change-Id: I77890f1fe0e31534d9844d2e91694df1ec185110
Reviewed-on: https://chromium-review.googlesource.com/630097
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47560}
2017-08-24 00:10:52 +00:00
Alexey Kozyatinskiy
c5f675d022 [inspector] improved Runtime.queryObjects
- simplify prototype traversal.
- use V8InspectorClient::isInspectableHeapObject since some embedders
  on JavaScript heap contains not inspectable objects, e.g. wrapper
  boilerplates in blink.
- Runtime.queryObjects takes prototype object as argument for more
  flexibility.

R=alph@chromium.org

Bug: v8:6732
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I06f0d5c987150c80c3e9b05e7f6ad195985fc539
Reviewed-on: https://chromium-review.googlesource.com/627577
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47559}
2017-08-23 20:19:19 +00:00
Anisha Rohra
d9f67c587a s390: Remove deprecated CompareIC stub support.
Port 10f73face8

R=bjaideep@ca.ibm.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ia5b50df98cb26bc332e3e2b114861740bae19d3d
Reviewed-on: https://chromium-review.googlesource.com/629217
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47558}
2017-08-23 18:19:58 +00:00
Brad Nelson
f11d49f85d Adding mstarzinger to asmjs OWNERS.
BUG=
R=ahaas@chromium.org,mstarzinger@chromium.org

Change-Id: Ida7ac441722d778946b7ac92e8f6c7fe5ea15cdc
Reviewed-on: https://chromium-review.googlesource.com/628821
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47557}
2017-08-23 18:15:38 +00:00
Jaideep Bajwa
4274e71caa PPC/S390: Fix to use 32 bit load
The testcase was failing on BE, fix to use 32bit load
before calling testbit.

R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
Log=N

Bug: 
Change-Id: I075666b47dd90b6341ba7b4031cd4be96e8c1bf9
Reviewed-on: https://chromium-review.googlesource.com/628659
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47556}
2017-08-23 17:47:28 +00:00
Georg Neis
1169f55bbc Remove obsolete kNumber binop feedback.
With the removal of Crankshaft, kNumber has become obsolete as
BinaryOperationFeedback. Turbofan uses kNumberOrOddball.

Bug: 
Change-Id: If577f5efcc81d7c08f43908f2764ff0ec6f8747c
Reviewed-on: https://chromium-review.googlesource.com/628376
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47555}
2017-08-23 16:21:08 +00:00
Adam Klein
ac0a2df30e [ignition] Fix return value of delete on global lexical variables
BytecodeGenerator previously assumed that any UNALLOCATED variable
must be a global object property, but that's incorrect for global
lexical variables declared in a different script.

This patch fixes the behavior by always falling back to the runtime
to deal with deleting UNALLOCATED variables. This is sub-optimal,
but should be correct, and it's unclear if speed is important for
this case.

Bug: v8:6733
Change-Id: I83c2a0b6e30e5e5f4c79bfe14ebf196529816c71
Reviewed-on: https://chromium-review.googlesource.com/627636
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47554}
2017-08-23 16:17:48 +00:00
Adam Klein
d9fdc86cf9 [parser] Remove bit of unnecessary for-loop desugaring logic
V8 used to erroneously allow ForStatements to contain a function
declaration, but that hasn't been true since we shipped the
"--harmony-restrictive-declarations" flag 1.5 years ago.

Bug: v8:4824
Change-Id: I893b45aed468017f89c0c5964df2091bea030327
Reviewed-on: https://chromium-review.googlesource.com/621871
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47553}
2017-08-23 16:07:28 +00:00
Ulan Degenbaev
70c4eda572 [heap] Fix more cctests that require ManualGCScope
Bug: chromium:694255
Change-Id: Ic21368f68e103ee1278b4e975255c6941f23a2d0
Reviewed-on: https://chromium-review.googlesource.com/629058
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47552}
2017-08-23 15:50:39 +00:00
Ulan Degenbaev
d8d47effe1 [heap] Port concurrent marking flag to GYP.
This enables concurrent marking for x86 and x64 on GYP builds.

Bug: chromium:694255
Change-Id: I371b38e72ce0e8f7ad5b0eed4e29b223b9ed1cf4
Reviewed-on: https://chromium-review.googlesource.com/628836
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47551}
2017-08-23 15:26:43 +00:00
Michael Lippautz
a1e53d13fb [heap] Remove dead code DoubleAlignForDeserialization
Bug: 
Change-Id: I8db893ac46ad82e52ff2918336107d55600789a5
Reviewed-on: https://chromium-review.googlesource.com/628542
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47550}
2017-08-23 14:54:30 +00:00
Jochen Eisinger
03850446dc Remove deprecated tracing methods from v8::Platform
Embedders should implement them via the v8::TracingController interface
and return a pointer to an instance of that interface from
v8::Platform::GetTracingController

BUG=v8:6511
R=fmeawad@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: If17b013c7ce4cf540a186767fd6e1b5e00e0dab2
Reviewed-on: https://chromium-review.googlesource.com/554770
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47549}
2017-08-23 13:31:30 +00:00
Ulan Degenbaev
7d2c222e32 [heap] Fix cctest/test/heap tests that require ManualGCScope.
This fixed IncrementalMarkingStepMakesBigProgressWithLargeObjects
and MapRetaining.

Change-Id: I3a91684fa1f0635e94dc1883b105ce8d3381a7d2
Reviewed-on: https://chromium-review.googlesource.com/628416
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47548}
2017-08-23 11:45:29 +00:00
Marja Hölttä
3f37b8cc0b [parser] Pass PreParserIdentifier / Expression by const&.
Now that they contain more than just one member variable, this might make
sense (and at least doesn't do any harm).

BUG=v8:6092

Change-Id: Ibd150bedf542580f69946f62f8aca47bce945499
Reviewed-on: https://chromium-review.googlesource.com/623748
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47547}
2017-08-23 11:12:07 +00:00
peterwmwong
415c72dd9a [builtins] Port String.prototype.includes to CSA
- Convert S.p.includes builtin from CPP to TFJ
  - Fast paths S.p.includes(str) and S.p.includes(str, smi)
- Add Runtime kStringIncludes
- Add StringIncludesIndexOfAssembler (Generate is based on
  StringPrototypeIndexOf builtin)
- S.p.includes and S.p.indexOf both use StringIncludesIndexOfAssembler

Quick measurements show 3x improvement for S.p.includes(str).
More about the measurements: https://gist.github.com/peterwmwong/7a2a96f3171a52f16ca8125a089f38e7

Bug: v8:6680
Change-Id: I79cb8dbe2b79e6df15aa734e128eee25c7e6aaf5
Reviewed-on: https://chromium-review.googlesource.com/620150
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47546}
2017-08-23 11:04:16 +00:00
Jaroslav Sevcik
cf65162ae6 [turbofan] Work around lowering uninhabited ReferenceEqual.
This change prevents constant folding of uninhabited RefenceEqual node
because that could widen a type (from None type to the type of the
boolean constant).

Hopefully, this is a temporary workaround that will be replaced
by a better dead code elimination.

Bug: v8:6631
Change-Id: Ie25e7d710aaf1d37c9adba60f92438570843dd5d
Reviewed-on: https://chromium-review.googlesource.com/627916
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47545}
2017-08-23 10:45:26 +00:00
Mostyn Bramley-Moore
66ae347963 jumbo: Include src/compiler/*linkage.cc in jumbo compilation units
BUG=chromium:752428

Change-Id: I0d1f3a09ecd2ffb7bfd8120b212e88fd00008fc0
Reviewed-on: https://chromium-review.googlesource.com/608961
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@opera.com>
Cr-Commit-Position: refs/heads/master@{#47544}
2017-08-23 10:27:44 +00:00
jgruber
27fd52abad [regexp] Send sticky @@splits to the slow path
Due to shortcuts we take on the RegExp.p[@@split] fast path (we don't allocate
a new instance), we need to send sticky regexps to the slow path.

The problem is a slight impedance mismatch between the spec and our fast-path
implementation.

Spec: Creates a new regexp instance `splitter` that is guaranteed to be sticky,
uses `splitter.lastIndex` to advance the search range, advances by itself using
AdvanceStringIndex if `splitter` did not match at the current position.

Our fast path: Uses the given regexp instance and does not modify stickyness,
uses last_match_info to advance search range, returns (and assumes no more
matches) once RegExpExecInternal fails to match.

This is fine if the given regexp is non-sticky, since 1. the value of lastIndex
is ignored, and 2. non-sticky regexps match if a match is found anywhere in the
string, not just exactly at the current lastIndex.

Sticky regexps though are a problem. If no match is found exactly at the current
position, @@split assumes no more matches and exits.

In a follow-up, we could explore other options, such as allocating a new
instance or saving/restoring flags and lastIndex.

Bug: v8:6706
Change-Id: I6da2266df72b2f80f00c1ce3cd7c8655de91f680
Reviewed-on: https://chromium-review.googlesource.com/626065
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47543}
2017-08-23 09:55:21 +00:00
Michael Starzinger
baa7bc0fbc [heap] Remove dead RecordCodeTargetPatch support.
R=mlippautz@chromium.org
BUG=v8:6409

Change-Id: I0cdba60385c8b481a3fd7b1b5c3b2ba1b0b8367b
Reviewed-on: https://chromium-review.googlesource.com/628059
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47542}
2017-08-23 09:54:16 +00:00
Ulan Degenbaev
8bbc224243 [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}
2017-08-23 09:40:23 +00:00
Georg Neis
61e700767a [cleanup] Move modules-related code into src/objects/.
This moves Module and other module-related classes and definitions out
of src/objects{.h,-inl.h,.cc} into src/objects/module{.h,-inl.h,.cc}.

Also moves the contents of src/objects/module-info.h there.

R=marja@chromium.org

Bug: v8:1569, v8:5402
Change-Id: I49064bb4a5c5a6f409274c287e06e8dda351d615
Reviewed-on: https://chromium-review.googlesource.com/626818
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47540}
2017-08-23 09:28:03 +00:00
Jaroslav Sevcik
e26e6d8857 Revert "Reland "[turbofan] Polymorphic inlining - try merge map check dispatch with function call dispatch.""
This reverts commit 4cee9fbc9f.

Reason for revert: Breaks on clusterfuzz.

Original change's description:
> Reland "[turbofan] Polymorphic inlining - try merge map check dispatch with function call dispatch."
> 
> This reverts commit 57af681191.
> 
> This adds the checkpoint between the call and the polymorphic load.
> I thought that JSCall with constant target cannot cause eager deopt,
> but Canary seems to disagree (http://crbug.com/718019).
> 
> Bug: v8:5267,chromium:718019
> Change-Id: I552b850db6beb93e733b371ad0e7204513da1dc4
> Reviewed-on: https://chromium-review.googlesource.com/622867
> Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47521}

TBR=jarin@chromium.org,tebbi@chromium.org,bmeurer@chromium.org

Change-Id: Ib333883fa27b79fcd766c33997cb0ce46547bb94
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5267, chromium:718019
Reviewed-on: https://chromium-review.googlesource.com/628076
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47539}
2017-08-23 09:21:25 +00:00
Peter Marshall
b9ddcce311 [snapshot] Remove the remaining uses of List in src/snapshot.
Bug: v8:6333
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I50d4357a7e7a0e8f2d04d5d34952cf524c012d5f
Reviewed-on: https://chromium-review.googlesource.com/625740
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47538}
2017-08-23 09:18:40 +00:00
Georg Neis
0cd2ea7cd8 [modules] Fix bug in module initialization.
The initialization code of all modules must have been run
before running any module's main code. This should have been
fixed quite a while ago as part of another CL but somehow
wasn't.

In the process of fixing it now, I'm also moving the initialization
phase out of Evaluate into Instantiatiate. This corresponds more
closely to the specification and avoids confusion.

Bug: v8:1569
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I3ea5d6be0f5d371e6a4c641778c51762f1867dc8
Reviewed-on: https://chromium-review.googlesource.com/620653
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47537}
2017-08-23 09:07:49 +00:00