Commit Graph

42147 Commits

Author SHA1 Message Date
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
jgruber
6c3d86d8c8 [regexp] Fold allocations for JSRegExpResult
This folds the allocation of the JSRegExpResult (basically a JSArray)
together with its elements fixed array.

Bug: v8:6741
Change-Id: I027c4fce7169c1bd6a17637619fdf3890e3f7f24
Reviewed-on: https://chromium-review.googlesource.com/625877
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47536}
2017-08-23 08:50:39 +00:00
Ross McIlroy
8bf15bf1aa Reland "[Compiler] Remove code aging support."
> This reverts commit 42d3d36bc3.
> 
> Original change's description:
> > [Compiler] Remove code aging support.
> > 
> > Code aging is no longer supported by any remaining compilers now
> > that full codegen has been removed. This CL removes all vestiges of
> > code aging.
> > 
> > BUG=v8:6409
> > 
> > Change-Id: I945ebcc20c7c55120550c8ee36188bfa042ea65e
> > Reviewed-on: https://chromium-review.googlesource.com/619153
> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> > Reviewed-by: Yang Guo <yangguo@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Reviewed-by: Marja Hölttä <marja@chromium.org>
> > Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#47501}
> 
> TBR=ulan@chromium.org,rmcilroy@chromium.org,marja@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,rodolph.perfetta@arm.com
> 
> Change-Id: I9d8b2985e2d472697908270d93a35eb7ef9c88a8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:6409
> Reviewed-on: https://chromium-review.googlesource.com/625998
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47506}

TBR=ulan@chromium.org,rmcilroy@chromium.org,marja@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,rodolph.perfetta@arm.com

Change-Id: I68785c6be7686e874b3848103e3a34483eaeb519
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6409
Reviewed-on: https://chromium-review.googlesource.com/625919
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47535}
2017-08-23 08:24:08 +00:00
Michael Starzinger
10f73face8 [ic] Remove deprecated CompareIC stub support.
R=ishell@chromium.org
BUG=v8:6409

Change-Id: Ic01d4f1a8b251bb5480840d4943d9ebec713b9c1
Reviewed-on: https://chromium-review.googlesource.com/626016
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47534}
2017-08-23 08:05:28 +00:00
Yang Guo
ae1fc792c4 [inspector] add flag to specify coverage granularity.
Add "detailed" flag to Profiler.startPreciseCoverage to specify
granularity (block coverage vs function coverage).

The default value is currently set to FLAG_block_coverage, which
is currently true. This is so that the V8 roll does not break
LayoutTests. I'll set it to false once I made changes to Blink.

R=jgruber@chromium.org, pfeldman@chromium.org

Bug: v8:6738
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I7242e897ab02713188a5292ca8c8bb58985e3a9b
Reviewed-on: https://chromium-review.googlesource.com/625616
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47533}
2017-08-23 07:44:39 +00:00
jgruber
c65fac58d8 [regexp] Extract CSA::AllocateRegExpResult
This is a simple move of CSA::AllocateRegExpResult to
RegExpBuiltinsAssembler. There's no reason for this method to be in CSA,
and this way we save a bit of binary size since code in builtins-*-gen
is not shipped.

Bug: v8:6741
Change-Id: I89507a0bfa4e0e922d92b9fcd0604ce86efea293
Reviewed-on: https://chromium-review.googlesource.com/626078
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47532}
2017-08-23 07:32:58 +00:00
pan.deng@intel.com
093dcd9dad [X64] replace far jump by near jump
Code size in snapshot can be reduced ~41KB

Contributed by kanghua.yu@intel.com

Bug: None
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ib73af39fe97cd38728affea40c593236f15bf6e5
Reviewed-on: https://chromium-review.googlesource.com/588751
Commit-Queue: Pan Deng <pan.deng@intel.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47531}
2017-08-23 05:12:02 +00:00
Sathya Gunasekaran
cb3befad02 Reland "[runtime] Rename PropertyArray::kLengthOffset to kLengthAndHashOffset"
This is a reland of 942c61ab75
Original change's description:
> [runtime] Rename PropertyArray::kLengthOffset to kLengthAndHashOffset
> 
> LengthAndHashOffset describes the value stored in the offset better.
> 
> Bug: v8:6404
> Change-Id: Ie5ea2a362c54aa03e0a4e314d1adb8b91d74a044
> Reviewed-on: https://chromium-review.googlesource.com/624458
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47503}

TBR=jkummerow@chromium.org, mstarzinger@chromium.org

Bug: v8:6404
Change-Id: Ied55fa6145ccc788581703db991b2f78d59a7408
Reviewed-on: https://chromium-review.googlesource.com/627075
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47530}
2017-08-23 04:13:32 +00:00
v8-autoroll
c3bebf09c8 Update V8 DEPS.
Rolling v8/build: fedc7df..337452a

Rolling v8/third_party/catapult: 837e443..810d9d2

Rolling v8/tools/clang: f0379f8..40f6966

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

Change-Id: I08a518bc0dab57e6a6b1b844c97cb491f71dbc04
Reviewed-on: https://chromium-review.googlesource.com/627128
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47529}
2017-08-23 03:46:42 +00:00
Sathya Gunasekaran
6b915106c6 [runtime] Compare against masked_hash while creating identity hash
A random hash could potential have top 10 bits be non zero which would
pass the hash != PropertyArray::kNoHashSentinel test but fail the
masked_hash != PropertyArray::kNoHashSentinel.


Bug: v8:6404, chromium:757750
Change-Id: Iade531fefc75dd76bd7a89b377d17e59532087d8
Reviewed-on: https://chromium-review.googlesource.com/627380
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47528}
2017-08-22 22:34:11 +00:00
Deepti Gandluri
f0e07e4ba8 [wasm] Remove redundant table size relocation
BUG=chromium:752423

Change-Id: Ifea2fba7e002cb88dd6e53170fe98d3fd4af686a
Reviewed-on: https://chromium-review.googlesource.com/609445
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47527}
2017-08-22 22:28:47 +00:00
Dmitry Gozman
dc26486cf3 [inspector] Issue Debugger.paused during Debugger.enable if already paused
Bug: chromium:590878
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Id94d3557980522d98c136aa444615930bee2e3ba
Reviewed-on: https://chromium-review.googlesource.com/625159
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47526}
2017-08-22 21:43:27 +00:00
Sathya Gunasekaran
d3229deed5 [esnext] Clean up Promise.prototype.finally implementation
Split the PromiseFinallyContextSlot enum into two separate enums
because the spec requires additional slot to store the Promise
constructor in the Promise.prototype.finally builtin. This will be
added in a follow on patch.

Inline the various context creation functions into their callsites since
they're only a single line and have only one callsite.

Bug: v8:5967
Change-Id: I2834c9c3d4940b8fbbdb7c162f42323d0fe0939f
Reviewed-on: https://chromium-review.googlesource.com/624543
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47525}
2017-08-22 20:23:27 +00:00
Adam Klein
35e4bcb677 [parser] Avoid redundant rewriting of arrow params
This fixed a TODO from cec289ea by marking RewritableExpressions as
rewritten in AddArrowFunctionFormalParameters when decomposing
Assignments into pattern/initializer.

Also added a set_rewritten() helper method to RewritableExpression
to simplify callsites.

Change-Id: Ifa36c9fb6c79193cbbcb168eedf7f782dc73a77b
Reviewed-on: https://chromium-review.googlesource.com/622353
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47524}
2017-08-22 20:03:57 +00:00
Anisha Rohra
c652a9eb2d PPC/s390: Cleanup of deoptimization structures, removal of lazy deopt patching.
Port aa7bf1cf54

Original Commit Message:

  This CL:
  - removes the trampoline pc from deoptimization input
  data and deoptimization state. This is no longer needed given
  that we added this information to the safepoint table in
  https://chromium-review.googlesource.com/c/v8/v8/+/596027).
  This should also fixed the regression mentioned in
  https://bugs.chromium.org/p/chromium/issues/detail?id=752873
  - searches for the  exception handler in the safepoint table.
  - removes the code used for patching which is no longer needed.

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

Change-Id: I27672961ec9b20bbbff7a2e994080065d01c85c0
Reviewed-on: https://chromium-review.googlesource.com/627197
Reviewed-by: Jaideep Bajwa <bjaideep@ca.ibm.com>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47523}
2017-08-22 19:58:57 +00:00
Adam Klein
1385f95fed Revert "[api] Use query interceptor in Object.keys()."
It caused crashes in the extension process on Canary.

This reverts commit b6059a67ca.

Also revert followup test CL:

  "[api] Add test for EnumeratorCallback and for...in."

as it depends on the logic in the reverted change.

This reverts commit 56772de7f9.

Bug: chromium:757371, v8:6627
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Id110128e6dc858a5a60ffc0175e8bb927b90bfc5
Reviewed-on: https://chromium-review.googlesource.com/626720
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47522}
2017-08-22 18:42:17 +00:00
Jaroslav Sevcik
4cee9fbc9f 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}
2017-08-22 18:21:48 +00:00
Ulan Degenbaev
d58937b88f [heap] Fix runtimestats scope for top-level GC tasks.
Perf sheriffs: this is going to increase GC time in v8.runtimestats
benchmarks. That time was not accounted before.

Change-Id: I656aed7ec7f4fd9f29dd4a2eff44eb25a60f21ad
Reviewed-on: https://chromium-review.googlesource.com/626636
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47520}
2017-08-22 18:14:38 +00:00
Marja Hölttä
3710fd4a3d Revert "[parser] Tentative: turn on FLAG_preparser_scope_analysis."
This reverts commit fe50e8178f.

Reason for revert: Too close to branch point

Original change's description:
> [parser] Tentative: turn on FLAG_preparser_scope_analysis.
> 
> The main motivation is to get bug reports / crashes from Canary.
> 
> This commit is expected to break all kinds of things! The most typical failure
> modes are crashes, CHECK failures and JavaScript executing incorrectly.
> 
> BUG=v8:5516
> 
> Change-Id: Ifa02b420ad4e8eda46002b334bed2665c8ceeeb2
> Reviewed-on: https://chromium-review.googlesource.com/623751
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47502}

TBR=adamk@chromium.org,marja@chromium.org,cbruni@chromium.org

Change-Id: I98d2d186cbde6e185b05ef0d3460115a654b6b45
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5516
Reviewed-on: https://chromium-review.googlesource.com/626796
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47519}
2017-08-22 17:30:50 +00:00
Adam Klein
000ef276b1 [parser] Remove unused PreParserIdentifier types and support code
Also remove a few bits of related dead code in Parser.

Bug: v8:6092
Change-Id: I310936341fe3e6193e36983723985a190d5d278b
Reviewed-on: https://chromium-review.googlesource.com/621958
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47518}
2017-08-22 17:11:26 +00:00
Jaideep Bajwa
43c60aeb06 PPC/s390: Refactor of AssembleDeoptimizerCall.
Port 2d858519f7

Original Commit Message:

    There's no need for this code to be completely architecture specific.

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

Change-Id: I33d4eaff8309e6684cf9ab003f57aeac15e4a56e
Reviewed-on: https://chromium-review.googlesource.com/626318
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47517}
2017-08-22 16:42:40 +00:00
Michael Lippautz
ee86863ea3 [heap] Remove recursive marking in full MC
In a parallel marker world the recursion just avoids proper work
stealing.

It is removed in a separate CL to see the impact of recursive marking on
the benchmarks.

Bug: chromium:750084
Change-Id: Id37ae029e386b45c94e5fecbf349b31d2573d5c0
Reviewed-on: https://chromium-review.googlesource.com/625881
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47516}
2017-08-22 16:34:26 +00:00
Ulan Degenbaev
424f5b9da5 [heap] Clear from-space live bytes in concurrent marker after scavenge.
Bug: chromium:757843
Change-Id: Ia3cf4e2126cbe567ae6f32fe4ccef631e028eaf9
Reviewed-on: https://chromium-review.googlesource.com/625879
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47515}
2017-08-22 16:13:47 +00:00
Camillo Bruni
8673108d48 [turbofan] Enable optimizing the empty object literal again
Since we don't create an AllocationSite for the empty object literal, the
TF lowering bailed out early and used the slow runtime call as a fallback.

Bug: chromium:757596, v8:6211
Change-Id: I68307ff2d0870c35f07c3aad4cd10cf08e378686
Reviewed-on: https://chromium-review.googlesource.com/625619
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47514}
2017-08-22 16:11:18 +00:00
Leszek Swirski
4c54a218de [d8] Allow reading files from a TCP socket
Reland of https://chromium-review.googlesource.com/c/v8/v8/+/623790

Add a --read-from-tcp flag to d8, which makes file reads (including
reading files from arguments, and the load and read builtins) read the
file contents off a TCP socket using a simple request/response protocol.

On top of this, add a script for transparently running d8 on an android
device using adb. The script loads d8 onto the device, starts a file
server providing the above protocol, and uses the above flag to run a d8
which loads javascript sources off the computer rather than off the
device.

Change-Id: I82a25be900c7608ed4c3a35828757a870ca2e115
Reviewed-on: https://chromium-review.googlesource.com/626396
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47513}
2017-08-22 16:06:16 +00:00
Leszek Swirski
de87b87960 Revert "[d8] Allow reading files from a TCP socket"
This reverts commit 29ad123568.

Reason for revert: https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/19576

Original change's description:
> [d8] Allow reading files from a TCP socket
> 
> Add a --read-from-tcp flag to d8, which makes file reads (including
> reading files from arguments, and the load and read builtins) read the
> file contents off a TCP socket using a simple request/response protocol.
> 
> On top of this, add a script for transparently running d8 on an android
> device using adb. The script loads d8 onto the device, starts a file
> server providing the above protocol, and uses the above flag to run a d8
> which loads javascript sources off the computer rather than off the
> device.
> 
> Change-Id: Icaa0577beb9bcd4f93476faa3ad8fb8b0a165e6e
> Reviewed-on: https://chromium-review.googlesource.com/623790
> Commit-Queue: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47511}

TBR=rmcilroy@chromium.org,leszeks@chromium.org

Change-Id: I2de4a12aa8cb0d228df3e5793d997b9145f4da42
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/626017
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47512}
2017-08-22 15:28:14 +00:00
Leszek Swirski
29ad123568 [d8] Allow reading files from a TCP socket
Add a --read-from-tcp flag to d8, which makes file reads (including
reading files from arguments, and the load and read builtins) read the
file contents off a TCP socket using a simple request/response protocol.

On top of this, add a script for transparently running d8 on an android
device using adb. The script loads d8 onto the device, starts a file
server providing the above protocol, and uses the above flag to run a d8
which loads javascript sources off the computer rather than off the
device.

Change-Id: Icaa0577beb9bcd4f93476faa3ad8fb8b0a165e6e
Reviewed-on: https://chromium-review.googlesource.com/623790
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47511}
2017-08-22 15:13:44 +00:00
Michael Starzinger
6dd1251e4e Handlify FrameFunctionIterator to allow for GCs.
R=tebbi@chromium.org
TEST=mjsunit/regress/regress-crbug-755044
BUG=chromium:755044

Change-Id: I909eeeccaf4e4e9757a2f952c00f557ee6c495ee
Reviewed-on: https://chromium-review.googlesource.com/625878
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47510}
2017-08-22 15:00:03 +00:00
Jochen Eisinger
749b9c062e Remove deprecated allow code-gen callback
BUG=chromium:732736
R=marja@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I2c0a96b76ae977e53a418d22175bcc487f548786
Reviewed-on: https://chromium-review.googlesource.com/543238
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47509}
2017-08-22 13:42:56 +00:00
Ulan Degenbaev
13fd663eea [heap] Fix flushing of live bytes in concurrent marker.
Bug: chromium:694255
Change-Id: I8a3856d9b9c5d1ee701286dacf5c0c8ad400d91d
Reviewed-on: https://chromium-review.googlesource.com/626120
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47508}
2017-08-22 13:09:16 +00:00
Juliana Franco
aa7bf1cf54 Cleanup of deoptimization structures, removal of lazy deopt patching.
This CL:
- removes the trampoline pc from deoptimization input
data and deoptimization state. This is no longer needed given
that we added this information to the safepoint table in
https://chromium-review.googlesource.com/c/v8/v8/+/596027).
This should also fixed the regression mentioned in
https://bugs.chromium.org/p/chromium/issues/detail?id=752873
- searches for the  exception handler in the safepoint table. 
- removes the code used for patching which is no longer needed.


Bug: v8:6563
Change-Id: I6cedc18c371f5707b7e0e1a8da409375ce1ebe5e
Reviewed-on: https://chromium-review.googlesource.com/595547
Commit-Queue: Juliana Patricia Vicente Franco <jupvfranco@google.com>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47507}
2017-08-22 12:29:29 +00:00
Ross McIlroy
42d3d36bc3 Revert "[Compiler] Remove code aging support."
This reverts commit a205117c6e.

Reason for revert: breaks Arm64

Original change's description:
> [Compiler] Remove code aging support.
> 
> Code aging is no longer supported by any remaining compilers now
> that full codegen has been removed. This CL removes all vestiges of
> code aging.
> 
> BUG=v8:6409
> 
> Change-Id: I945ebcc20c7c55120550c8ee36188bfa042ea65e
> Reviewed-on: https://chromium-review.googlesource.com/619153
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47501}

TBR=ulan@chromium.org,rmcilroy@chromium.org,marja@chromium.org,yangguo@chromium.org,mstarzinger@chromium.org,rodolph.perfetta@arm.com

Change-Id: I9d8b2985e2d472697908270d93a35eb7ef9c88a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6409
Reviewed-on: https://chromium-review.googlesource.com/625998
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47506}
2017-08-22 12:27:03 +00:00