Commit Graph

52266 Commits

Author SHA1 Message Date
Toon Verwaest
2e0523324c [parser] Cleanup pattern classification
This changes the split from AssignmentPattern and BindingPattern to Pattern and
BindingPattern. Pattern collects all errors that are invalid in both assignment
and binding pattern contexts. Binding pattern additionally collects errors for
binding pattern contexts (property access isn't a valid target). The
distinction is piggybacked on to distinguish assignment vs binding pattern
errors since binding pattern verification will first throw the binding pattern
error.

Since we don't throw pattern error as binding pattern as well, this can mean
that a later binding pattern syntax error will show up before an early pattern
error. Since that just changes the message to another syntax violation, I think
that's fine.

Change-Id: Ib6a22c8d11c49eacc6667ae8ee5e98bababadd43
Reviewed-on: https://chromium-review.googlesource.com/c/1349273
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57774}
2018-11-23 11:33:21 +00:00
Peter Marshall
f69dd4bf1b [cleanup] Use InstallFunctionAtSymbol everywhere in the bootstrapper
This helper cleans up the callsites of the Symbol.toPrimitive
installations. As a bonus, we can remove an unused CreateFunction
variant now.

Bug: v8:8238
Change-Id: I017acc9464d6179e8bf53767f8bbc953272b46ed
Reviewed-on: https://chromium-review.googlesource.com/c/1349275
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57773}
2018-11-23 11:28:21 +00:00
Daniel Clifford
ec8285799a [torque] fix bugs found by using implicit params in generics at scale
Bug: v8:7793
Change-Id: I2d5154eabd549c0518ca41dae6ef7bd047f3e1ef
Reviewed-on: https://chromium-review.googlesource.com/c/1348072
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57772}
2018-11-23 11:14:31 +00:00
Jakob Kummerow
56e161e811 [ubsan] Port Context to the new design
Bug: v8:3770
Change-Id: I07f48b1ee8814a006e6787ad8261fa8388b4298d
Reviewed-on: https://chromium-review.googlesource.com/c/1345327
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57771}
2018-11-23 11:03:54 +00:00
Michael Lippautz
81b5f713c8 Reland "[heap] Improve embedder tracing during incremental marking"
Add a path into embedder tracing on allocation. This is safe as as Blink
is not allowed to call into V8 during object construction.

This is a reland of caed2cc033.

Bug: chromium:843903
Change-Id: I7faa8413966f6b4d37f19b235d46bb09e4d47235
Bug: chromium:843903
Reviewed-on: https://chromium-review.googlesource.com/c/1349330
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57770}
2018-11-23 10:54:52 +00:00
Peter Marshall
c65712e1c8 [cleanup] Clean up InstallFunction variants in the bootstrapper
- Remove an unused param from InstallFunction
- Remove an InstallFunction variant which just rearranges the order of
  the arguments
- Consistently use const char* string literals as property names rather
  than e.g. factory->return_string() just write "return" because it is
  easier for humans to read. All the strings are internalized anyway and
  this happens at mksnapshot time, so there is no performance penalty.
- Remove the maybe_prototype arguments to CreateFunction. We always know
  at the callsite whether we have a prototype or not, so just call the
  variant that takes a prototype or the new CreateFunction variant which
  takes a Builtin::name.
- Rename a SimpleInstallFunction variant which was only used for symbols
  to InstallFunctionAtSymbol. This also makes it clear that this is the
  only case where property_name and function_name differ.

Bug: v8:8238
Change-Id: I2400de90ebe837694e777cff1419858037ee51cc
Reviewed-on: https://chromium-review.googlesource.com/c/1349271
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57769}
2018-11-23 10:44:10 +00:00
Yang Guo
ac85ab0a3d Revert "Reland "[turbofan] Use feedback when reducing global loads/stores.""
This reverts commit e64f7c0ae0.

Reason for revert: this breaks chromedriver_py_test on Mac and Windows. This blocks the roll.

Details:

- DEPS roll with V8 pointing to this commit fails: https://chromium-review.googlesource.com/c/chromium/src/+/1349251
- DEPS roll with V8 pointing to the parent of this commit succeeds: https://chromium-review.googlesource.com/c/chromium/src/+/1349214

Original change's description:
> Reland "[turbofan] Use feedback when reducing global loads/stores."
> 
> This is a reland of 9c91b6877a after
> fixing undefined behavior in numeric conversion that caused trouble
> on arm32.
> 
> Original change's description:
> > [turbofan] Use feedback when reducing global loads/stores.
> >
> > We already record the script context location or the property cell
> > as feedback of the global load/store IC, so Turbofan doesn't need
> > to do the lookups again.
> >
> > Change-Id: I6cbd2937de344729cd8e146b4ff85ddf3de6a56e
> > Reviewed-on: https://chromium-review.googlesource.com/c/1335691
> > Commit-Queue: Georg Neis <neis@chromium.org>
> > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#57555}
> 
> Change-Id: Ic2d09025de02f92199755ac860bb9e91fa08f4ec
> Reviewed-on: https://chromium-review.googlesource.com/c/1340043
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57649}

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I7c9364d6a0bea6681fe9e25b28206cfc2c8557a7
Reviewed-on: https://chromium-review.googlesource.com/c/1349272
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57768}
2018-11-23 10:28:43 +00:00
George Wort
15ca25a446 [liftoff][arm] Implement AssertUnreachable
This implements AssertUnreachable for the arm32 port of Liftoff.

Bug: v8:6600
Change-Id: I9aa5083dc1be175fc5f2f386d8aace021bab3b03
Reviewed-on: https://chromium-review.googlesource.com/c/1346335
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57767}
2018-11-23 10:24:32 +00:00
George Wort
940d6f33ee [liftoff][arm] Implement complex i32 functionality
This implements popcnt, division and remainder on i32 for the arm32 port of Liftoff.

Bug: v8:6600
Change-Id: I2aac78596ef9799bf8fcfc791c0e946a8388f62f
Reviewed-on: https://chromium-review.googlesource.com/c/1346497
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57766}
2018-11-23 10:11:12 +00:00
George Wort
8239c344fe [liftoff][arm] Implement basic i32 functionality
This implements arithmetic operations on i32, comparisons, and conditional
jumps for the arm32 port of Liftoff.

Bug: v8:6600
Change-Id: Ib8d6e4dd99c725d9c5bff06d31c64e7ba4639297
Reviewed-on: https://chromium-review.googlesource.com/c/1346334
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57765}
2018-11-23 10:01:22 +00:00
Jakob Kummerow
a1c88a4451 [ubsan] Port HashTableBase and subclasses to the new design
Bug: v8:3770
Change-Id: I9a3f289ac6236b88476167150565e8183d6f5461
Reviewed-on: https://chromium-review.googlesource.com/c/1345326
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57764}
2018-11-23 09:34:18 +00:00
Yang Guo
33713b5b61 Revert "[heap] Release dead young generation large objects in the Scavenger."
This reverts commit 40b448eadd.

Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64/27711

Original change's description:
> [heap] Release dead young generation large objects in the Scavenger.
> 
> Bug: chromium:852420
> Change-Id: Ieefbee7bfd625d62e9104950bdfa8e46d5f4270a
> Reviewed-on: https://chromium-review.googlesource.com/c/1348081
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Hannes Payer <hpayer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57761}

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

Change-Id: I6b57dd8ed92d85b5ce012da754611278ceaefe20
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:852420
Reviewed-on: https://chromium-review.googlesource.com/c/1349270
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57763}
2018-11-23 09:15:33 +00:00
Yang Guo
5fc7356c50 Update WATCHLIST wrt yangguo
R=jgruber@chromium.org

Change-Id: I49c08217d0c8e452afe84ad76ae6d60367802e82
Reviewed-on: https://chromium-review.googlesource.com/c/1348075
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57762}
2018-11-23 08:29:12 +00:00
Hannes Payer
40b448eadd [heap] Release dead young generation large objects in the Scavenger.
Bug: chromium:852420
Change-Id: Ieefbee7bfd625d62e9104950bdfa8e46d5f4270a
Reviewed-on: https://chromium-review.googlesource.com/c/1348081
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57761}
2018-11-23 08:04:49 +00:00
Dan Elphick
83fb2f8dd7 Reland "[cleanup] Move methods to V8_DEPRECATED"
This is a reland of a6e3cdd9b5

Now only changes ObjectTemplate::NewInstance.

Original change's description:
> [cleanup] Move methods to V8_DEPRECATED
>
> Updates ObjectTemplate::NewInstance and FunctionTemplate::GetFunction
> from V8_DEPRECATED_SOON to V8_DEPRECATED, now that they're unused in
> chrome.
>
> Bug: v8:7294, v8:7295, v8:8238
> Change-Id: Ic7cb2c410ff812f73cfd108551f2a1a20722df07
> Reviewed-on: https://chromium-review.googlesource.com/c/1344151
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57657}

Bug: v8:7294, v8:7295, v8:8238
Change-Id: I52ec021bc92600f67cf27791d5b2df2a4342a4d5
Reviewed-on: https://chromium-review.googlesource.com/c/1348079
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57760}
2018-11-23 07:46:50 +00:00
Yang Guo
cb93a308fc Revert "[heap] Improve embedder tracing during incremental marking"
This reverts commit caed2cc033.

Reason for revert: Breaks layout tests, e.g.

https://test-results.appspot.com/data/layout_results/V8-Blink_Linux_64__dbg_/14924/webkit_layout_tests%20%28with%20patch%29/layout-test-results/results.html

crash log for renderer (pid <unknown>):
STDOUT: <empty>
STDERR: 
STDERR: 
STDERR: #
STDERR: # Fatal error in ../../v8/src/base/platform/elapsed-timer.h, line 24
STDERR: # Debug check failed: !IsStarted().
STDERR: #
STDERR: #
STDERR: #
STDERR: #FailureMessage Object: 0x7ffc46707640#0 0x565409263b6f base::debug::StackTrace::StackTrace()
STDERR: #1 0x56540a8a32fb gin::(anonymous namespace)::PrintStackTrace()
STDERR: #2 0x56540a8980d8 V8_Fatal()
STDERR: #3 0x56540a897e35 v8::base::(anonymous namespace)::DefaultDcheckHandler()
STDERR: #4 0x565407971f02 v8::base::ElapsedTimer::Start()
STDERR: #5 0x565407d08edf v8::internal::TimedHistogram::Start()
STDERR: #6 0x565407e500d5 v8::internal::IncrementalMarking::AdvanceIncrementalMarkingOnAllocation()
STDERR: #7 0x565407e4f977 v8::internal::IncrementalMarking::Observer::Step()
STDERR: #8 0x565407e48092 v8::internal::AllocationObserver::AllocationStep()
STDERR: #9 0x565407eb0751 v8::internal::SpaceWithLinearArea::InlineAllocationStep()
STDERR: #10 0x565407eb3e44 v8::internal::NewSpace::EnsureAllocation()
STDERR: #11 0x565407e258ff v8::internal::NewSpace::AllocateRaw()
STDERR: #12 0x565407e06b2d v8::internal::Heap::AllocateRaw()
STDERR: #13 0x565407e432ef v8::internal::Heap::AllocateRawWithLightRetry()
STDERR: #14 0x565407e433cf v8::internal::Heap::AllocateRawWithRetryOrFail()
STDERR: #15 0x565407e04d48 v8::internal::Factory::NewFixedArrayWithFiller()
STDERR: #16 0x565407fd6339 v8::internal::HashTable<>::New()
STDERR: #17 0x565407fd7be8 v8::internal::HashTable<>::EnsureCapacity()
STDERR: #18 0x565407fc7e95 v8::internal::Dictionary<>::Add()
STDERR: #19 0x565407fcf453 v8::internal::BaseNameDictionary<>::Add()
STDERR: #20 0x565407f89ee4 v8::internal::LookupIterator::ApplyTransitionToDataProperty()
STDERR: #21 0x5654080036e2 v8::internal::Object::AddDataProperty()
STDERR: #22 0x56540793061f v8::internal::(anonymous namespace)::DefineDataProperty()
STDERR: #23 0x56540792da59 v8::internal::(anonymous namespace)::InstantiateObject()
STDERR: #24 0x56540792b75a v8::internal::(anonymous namespace)::InstantiateFunction()
STDERR: #25 0x56540792b4db v8::internal::ApiNatives::InstantiateFunction()
STDERR: #26 0x5654079594bf v8::FunctionTemplate::GetFunction()
STDERR: #27 0x56540a7af74e blink::V8ObjectConstructor::CreateInterfaceObject()
STDERR: #28 0x56540a7afe01 blink::V8PerContextData::ConstructorForTypeSlowCase()
STDERR: #29 0x56540a7afdd6 blink::V8PerContextData::ConstructorForTypeSlowCase()
STDERR: #30 0x56540a7afdd6 blink::V8PerContextData::ConstructorForTypeSlowCase()
STDERR: #31 0x56540a7afcb4 blink::V8PerContextData::CreateWrapperFromCacheSlowCase()
STDERR: #32 0x56540a7aef73 blink::V8DOMWrapper::CreateWrapper()
STDERR: #33 0x56540a7abf6b blink::ScriptWrappable::Wrap()
STDERR: #34 0x56540a677199 blink::V8Document::documentElementAttributeGetterCallback()
STDERR: #35 0x565407a0aec3 v8::internal::FunctionCallbackArguments::Call()
STDERR: #36 0x565407a097be v8::internal::(anonymous namespace)::HandleApiCallHelper<>()
STDERR: #37 0x565407a0877b v8::internal::Builtins::InvokeApiFunction()
STDERR: #38 0x565407fe785a v8::internal::Object::GetPropertyWithAccessor()
STDERR: #39 0x565407fe697e v8::internal::Object::GetProperty()
STDERR: #40 0x565407ec8c71 v8::internal::LoadIC::Load()
STDERR: #41 0x565407ed6401 v8::internal::__RT_impl_Runtime_LoadIC_Miss()
STDERR: #42 0x5654087593f2 <unknown>
STDERR: [16162:16185:1122/143518.356897:WARNING:crash_handler_host_linux.cc(341)] Could not translate tid, attempt = 1 retry ...


Original change's description:
> [heap] Improve embedder tracing during incremental marking
> 
> Add a path into embedder tracing on allocation. This is safe as as Blink
> is not allowed to call into V8 during object construction.
> 
> Bug: chromium:843903
> Change-Id: I5af053c3169f5a33778ebce5d7c5c43e4efb1aa4
> Reviewed-on: https://chromium-review.googlesource.com/c/1348749
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57757}

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

Change-Id: Ide2c0b284b52bee17573adcc89f14be4e40dab91
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:843903
Reviewed-on: https://chromium-review.googlesource.com/c/1349189
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57759}
2018-11-23 07:45:46 +00:00
v8-ci-autoroll-builder
c1b527f8f7 Update V8 DEPS.
Rolling v8/build: 05ea63b..cd7b727

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/aa21a92..4ed4737

Rolling v8/third_party/depot_tools: d66dad7..25c4fce

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

Change-Id: Id8608976646cb19b61698a6bc824977c5d55357a
Reviewed-on: https://chromium-review.googlesource.com/c/1349110
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#57758}
2018-11-23 03:44:51 +00:00
Michael Lippautz
caed2cc033 [heap] Improve embedder tracing during incremental marking
Add a path into embedder tracing on allocation. This is safe as as Blink
is not allowed to call into V8 during object construction.

Bug: chromium:843903
Change-Id: I5af053c3169f5a33778ebce5d7c5c43e4efb1aa4
Reviewed-on: https://chromium-review.googlesource.com/c/1348749
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57757}
2018-11-22 21:26:02 +00:00
Igor Sheludko
78ca705f47 [cleanup] Fix kPointerSize usages in src/objects/, part 2
Bug: v8:8477, v8:8238
Tbr: bmeurer@chromium.org
Change-Id: I03e6e83bc805c6880318161e00b367df0a3b4003
Reviewed-on: https://chromium-review.googlesource.com/c/1348434
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57756}
2018-11-22 19:36:09 +00:00
Hannes Payer
be77c3ef75 [heap] Handle young generation large objects by MC.
Bug: chromium:852420
Change-Id: Ice7548bf9993bc5dd57b301c410c019eb956daa5
Reviewed-on: https://chromium-review.googlesource.com/c/1348077
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57755}
2018-11-22 17:48:43 +00:00
Leszek Swirski
cd78a04587 [parser] Tighten CanBeKeywordCharacter
Use the list of keywords to tighten the CannotBeKeyword scan flag to
also exclude lower case letters which are not present in any of the
keywords.

Change-Id: I6a00b5f5ee8f47088539806f15890a7489441fea
Reviewed-on: https://chromium-review.googlesource.com/c/1347475
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57754}
2018-11-22 17:46:23 +00:00
Toon Verwaest
b03ae1870c [parser] Track duplicate formals through FormalParametersT
This simplifies the ExpressionClassifier a bit again, making it a little more
understandable.

Change-Id: I57bdd871b10409ea04b33748609160f2b40a498a
Reviewed-on: https://chromium-review.googlesource.com/c/1348431
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57753}
2018-11-22 17:32:08 +00:00
Daniel Clifford
2ccc921fd4 [torque] cleanup intrinsic-related names in parser
Bug: v8:7793
Change-Id: Iccf60ed192fd91456caa730d5ea98dd3abe3614e
Reviewed-on: https://chromium-review.googlesource.com/c/1348076
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57752}
2018-11-22 17:31:03 +00:00
Toon Verwaest
ae9a15fefe [parser] Remove some unneeded expression classifiers
If we're verifying/accumulating/throwing all possible classifier errors anyway,
we don't need our own classifier.

Change-Id: Ibfbdc4e5151190385598fc50bda9f9921b6aedce
Reviewed-on: https://chromium-review.googlesource.com/c/1348080
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57751}
2018-11-22 17:18:13 +00:00
Igor Sheludko
5bacc5aad3 [cleanup] Fix kPointerSize usages in src/objetcs/js-array-buffer.*
This CL also makes existence of the optional padding field in JSArrayBuffer
explicit and ensures that the field stays cleared after initialization.

Bug: v8:8477, v8:8238
Change-Id: Ic4c5f6b0066903651f15bea91fbfe32ba62fa0e6
Reviewed-on: https://chromium-review.googlesource.com/c/1347469
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57750}
2018-11-22 16:42:42 +00:00
Peter Marshall
f4bb38c321 [tools] Add an API for unwinding the V8 stack
This API allows the embedder to provide a stack and PC, FP and
SP registers. V8 will then attempt to unwind the stack to the C++ frame
that called into JS. This API is signal-safe, meaning it does not call
any signal-unsafe OS functions or read/write any V8 state.

Bug: v8:8116

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I7e3e73753b711737020b6a5f11946096658afa6f
Reviewed-on: https://chromium-review.googlesource.com/c/1186724
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57749}
2018-11-22 16:36:26 +00:00
Ulan Degenbaev
d1d35504bb [csa] Use high-level DescriptorArray accessors (Part 2).
Now the accessors do not use the LoadWeakFixedArrayElement function.

Bug: v8:8486
Change-Id: Icccf294c25bbedb118cb2dd7a422dc71d70c727b
Reviewed-on: https://chromium-review.googlesource.com/c/1348071
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57748}
2018-11-22 16:26:25 +00:00
Sergiy Byelozyorov
54a39f5dc2 [tools] Whitespace CL
TBR=sergiyb@chromium.org

Bug: chromium:903688
Change-Id: I006e0e47b64edabdafadf030b09864433b9486d6
Reviewed-on: https://chromium-review.googlesource.com/c/1340101
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57747}
2018-11-22 16:05:24 +00:00
Ben L. Titzer
4eb53245f0 [wasm/tools] Add import profiler
Add a profiler for functions imported to WASM instances. This profiler
is implemented entirely in JavaScript and monkey-patches
WebAssembly.instantiate() and new WebAssembly.Instance() to instrument
the imported functions to each instance in order to count their
invocations and cumulative time.

R=mstarzinger@chromium.org

Bug: v8:8423
Change-Id: If456355aba07dc69c5500bafbe35fc56b31486af
Reviewed-on: https://chromium-review.googlesource.com/c/1347488
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57746}
2018-11-22 15:36:21 +00:00
Junliang Yan
4fca7b00e8 PPC/s390: [test] Add cctest for i-cache coherency assumptions.
Port fed7bb501e

Original Commit Message:

    This test cases ensures that it is possible to maintain a coherent
    instruction cache by using {Assembler::FlushICache} in any order with
    respect to changing page permissions via {SetPermissions}.

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:6792
LOG=N

Change-Id: I23d5d0828dcbdd527aaa8708fa726a7cb5cbedfe
Reviewed-on: https://chromium-review.googlesource.com/c/1347511
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#57745}
2018-11-22 15:34:10 +00:00
Igor Sheludko
d8f2878f32 [cleanup] Cleanup the way we visit NativeContext
this will allow to add raw fields to the native context in a pointer compression
friendly way.

This CL also adds a microtask_queue field to native context which will be used
in a follow-up CL.

Bug: v8:8238, v8:7703
Change-Id: I5ecf72dbc52e8261b694551cbc8476f967967723
Reviewed-on: https://chromium-review.googlesource.com/c/1348073
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57744}
2018-11-22 15:29:30 +00:00
Toon Verwaest
71f59a23fc [parser] Drop ExpressionClassifier::ArrowFormalsParameterProduction and BP_to_AFP
Instead, simply track it as a valid binding pattern. To do this in the case of
parenthesized formals, we delay throwing the binding pattern error for
parenthesized (and async "calls") until we know it's not an arrow function head
by itself.

This guarantees that if an arrow head is a valid binding pattern, it's either a
valid parenthesized head or a valid identifier, or invalid pattern ("array" or
"object" literal style). We can detect the latter case by checking that the
current token is not a RPAREN and the expression isn't an identifier.
(Alternatively we could check that the curren token is RBRACE or RBRACK...)

Bug: chromium:907575
Change-Id: Ie40cc3235d3188f2620b6c089a0f49d93604dda6
Reviewed-on: https://chromium-review.googlesource.com/c/1348078
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57743}
2018-11-22 15:13:41 +00:00
George Wort
18d9bbb512 [liftoff][arm] Implement call functionality
This adds the function call functionality for the arm32 port of Liftoff.

Bug: v8:6600
Change-Id: I8ca00b370c629157c91fd9a905f34ea41ec53d29
Reviewed-on: https://chromium-review.googlesource.com/c/1346336
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57742}
2018-11-22 14:59:51 +00:00
George Wort
291a602973 [liftoff][arm] Fix overlapping of F32 and F64 registers in Liftoff
Add a check to bailout in the case when F32 parameters are used for Arm.

Bug: v8:6600, chromium:904026, chromium:904606
Change-Id: I7f70c0806994a89dca31ef7e0b68f91d68484936
Reviewed-on: https://chromium-review.googlesource.com/c/1346492
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57741}
2018-11-22 14:55:51 +00:00
Michael Starzinger
f2d39d190c [arm64] Enable write-protected code pages.
R=ulan@chromium.org
BUG=chromium:845877

Change-Id: If8a9e2f107bb775494b1d4a83c3fb045bb846b10
Reviewed-on: https://chromium-review.googlesource.com/c/1347482
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57740}
2018-11-22 14:09:58 +00:00
Jakob Gruber
d034d08824 [builtins] Unify builtin code and size printing mechanisms
There's no reason to scatter this all over when we have a single choke
point in Isolate::Init.

Drive-by: Remove unused DLH builtin kind.

Bug: v8:8238
Change-Id: I46373a1044e51d90d3a9c3e772f5930d57097937
Reviewed-on: https://chromium-review.googlesource.com/c/1347481
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57739}
2018-11-22 13:28:37 +00:00
Jaroslav Sevcik
5952f12aca [turbofan] Serialize descriptors before taking dependency.
Bug: v8:8361, v8:7790
Change-Id: I1d7a8cba1873efff9d49b12994a1561879d200de
Reviewed-on: https://chromium-review.googlesource.com/c/1347487
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57738}
2018-11-22 13:22:07 +00:00
Sigurd Schneider
619a464cc4 [turbolizer] Add comment about deployment
Notry: true
Change-Id: I06cbd9a2a49f602dafd43e2d3b4e386d65c7da23
Bug: v8:7327
Reviewed-on: https://chromium-review.googlesource.com/c/1348070
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57737}
2018-11-22 13:16:09 +00:00
Igor Sheludko
3f63baf61e [cleanup] Fix kPointerSize usages in src/objects/, part 1
Bug: v8:8477, v8:8238
Change-Id: I0b39b0c13c17acd08fc754db1897f00741466122
Reviewed-on: https://chromium-review.googlesource.com/c/1346337
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57736}
2018-11-22 13:06:57 +00:00
Toon Verwaest
23e99a95a1 [parser] Don't re-preparse when trying to find an unidentifiable error
Bug: chromium:907669
Change-Id: I7633780b1f3a1a290593818a3e558c5a1bb81502
Reviewed-on: https://chromium-review.googlesource.com/c/1347486
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57735}
2018-11-22 13:00:32 +00:00
Sergiy Byelozyorov
948cf2f642 [tools] Add FAIL_PHASE_ONLY status file modifier for test262 tests
R=machenbach@chromium.org, mathias@chromium.org

Bug: v8:8467
Change-Id: I7369fa993d0762cf9c3c6f55361d074d067a0eb5
Reviewed-on: https://chromium-review.googlesource.com/c/1338347
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57734}
2018-11-22 12:43:05 +00:00
Marja Hölttä
ce6e40fc31 [ubsan] Fix Map::PrintMapDetails.
Now that Map just contains a pointer, and is passed by value to
Logger::MapDetails, printing the this pointer in Map::PrintMapDetails no longer
makes sense, but we need to print the underlying pointer.

BUG=v8:3770

Change-Id: I87f41c796dbff7a8800731bb1d63a7482b9ff71c
Reviewed-on: https://chromium-review.googlesource.com/c/1347485
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57733}
2018-11-22 12:41:34 +00:00
Toon Verwaest
92e34290d4 [zone] Further simplify zone expansion, use single default page size
Change-Id: Ibe539f0c90fdcd93ba5da40240c6325138a05bac
Reviewed-on: https://chromium-review.googlesource.com/c/1347480
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57732}
2018-11-22 12:27:51 +00:00
Peter Marshall
4e3a17d040 [runtime] Reduce spread/apply call max arguments
Bug: chromium:906043
Change-Id: I308b29af0644c318d73926b27e65a94913c760c7
Reviewed-on: https://chromium-review.googlesource.com/c/1346115
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57731}
2018-11-22 12:08:17 +00:00
Ross McIlroy
38cd61d0e0 [Compiler] Ensure unoptimized code generation is context independent.
Now that Asm.js code is also context independent, move code to ensure context independence
from BytecodeGenerator to FinalizeUnoptimizedCode.

Change-Id: I7738eb3b347ea82764ecd3b5548dc82cb06d2f4e
Reviewed-on: https://chromium-review.googlesource.com/c/1347483
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57730}
2018-11-22 11:49:06 +00:00
George Wort
b544277a51 [liftoff][arm] Implement stack access
This adds stack access functionality for the arm32 port of Liftoff.

Bug: v8:6600
Change-Id: I163ab133efc63045f37d1387fd5f32be333bc501
Reviewed-on: https://chromium-review.googlesource.com/c/1346333
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57729}
2018-11-22 11:33:41 +00:00
Clemens Hammacher
7d6beb3f04 Add script to auto-generate object-macros-undef.h
We were missing a few undefs there. Add a script to auto-generate
object-macros-undef.h from object-macros.h and update
object-macros-undef.h with the output of that script.

R=marja@chromium.org

Bug: v8:5402, v8:8238
Change-Id: I6917940dcbfdf68039a25dc7fb8c219fe55adb10
Reviewed-on: https://chromium-review.googlesource.com/c/1345991
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57728}
2018-11-22 11:32:36 +00:00
Ulan Degenbaev
69cec109de [csa] Use high-level DescriptorArray accessors.
This fixes places that assume that DescriptorArray is a WeakFixedArray.

In addition to the existing:
 - LoadDetailsByKeyIndex
 - LoadValueByKeyIndex
 - LoadFieldTypeByKeyIndex
This introduces Load*ByDescriptorEntry versions and LoadKeyByKeyIndex.

Bug: v8:8486
Change-Id: I958867138df7756c715ae3d449b3206a32076514
Reviewed-on: https://chromium-review.googlesource.com/c/1346501
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57727}
2018-11-22 11:22:56 +00:00
Jakob Gruber
8c1248932e [builtins] Emit builtins as inline assembly on windows clang builds
We recently changed embedded builtins to be emitted as raw assembly
files during the build process in order to support MSVC (which doesn't
support inline assembly on x64). Ninja uses ml.exe / ml64.exe as the
assembler on all Windows builds (msvc & clang); these unfortunately
don't support large data streams well and can take over 5 minutes for
embedded.S.

With this CL we work around this by going back to inlined assembly for
clang Windows builds.

Bug: v8:6666, v8:8475
Change-Id: I33beb3f5a1df07de3299df0fc2be4e8983701db0
Reviewed-on: https://chromium-review.googlesource.com/c/1344114
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57726}
2018-11-22 11:08:36 +00:00
Dan Elphick
b0b5eae096 [objects] Shrink FunctionTemplateInfo
Adds a new field rare_data of type FunctionTemplateRareData to
FunctionTemplateInfo and moves 8 others which are unset on 90% of
FunctionTemplateInfo objects to this field.

Getters like prototype_template() are changed to GetPrototypeTemplate()
to indicate they're not trivial. The setters are replaced with static
methods (e.g. SetPrototypeTemplate) that take an Isolate and the
template object, since they can now perform allocation.

Bug: v8:8478
Change-Id: If72b132ade4ca4a3f803f913761c9caddc0e9dd6
Reviewed-on: https://chromium-review.googlesource.com/c/1342519
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57725}
2018-11-22 11:04:15 +00:00