Commit Graph

17461 Commits

Author SHA1 Message Date
Jakob Kummerow
17b97fe928 [bigint] Fix mjsunit pretty-printing of Numbers
Implicit case-fallthrough strikes again.

Bug: v8:6791
Change-Id: Iee6422a67797f8958527507bac538bcdac2ebddc
Reviewed-on: https://chromium-review.googlesource.com/747075
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49057}
2017-10-31 19:13:03 +00:00
Jakob Kummerow
a5b0d640c2 Fix DCHECK in HasFastProperties
Objects with both dictionary and non-dictionary maps can store their
hash in the {properties} field when they have no other properties.

Bug: chromium:778952
Change-Id: I8ac8c31eaac32116415e3c65cef8dee260dca2c9
Reviewed-on: https://chromium-review.googlesource.com/747272
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49056}
2017-10-31 18:06:43 +00:00
Junliang Yan
dd26478efe PPC: Skip regress-740784 test on sim run
Takes too long on bots to run

Bug: 
Change-Id: Ia99717fe943ff6437497425abd3a3cb9999d7564
Reviewed-on: https://chromium-review.googlesource.com/746533
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#49055}
2017-10-31 17:27:33 +00:00
Leszek Swirski
531af2f4c1 [parser] Use n-ary addition for template strings
When closing untagged template string literals, create a single n-ary
addition operation, instead of a tree of binary operations.

As a clean-up, this also entirely removes the "second" field from n-ary
operations. This was proving to be too confusing an API when building
an n-ary operation incrementally from a single expression (rather than
converting a binary operation).

Bug: v8:6964
Change-Id: I8f2a395d413cf345bab0a1a347b47f412cde83b1
Reviewed-on: https://chromium-review.googlesource.com/739821
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49054}
2017-10-31 16:02:53 +00:00
Benedikt Meurer
6dc35ab46f [ic] Add OOB support to KeyedLoadIC.
This adds support to the KeyedLoadIC to ignore out of bounds accesses
for Strings and return undefined instead. We add a dedicated bit to the
Smi handler to encode the OOB state and have TurboFan generate appropriate
code for that case as well. This is mostly useful when programs
accidentially access past the length of a string, which was observed and
fixed for example in Babel recently, see

  https://github.com/babel/babel/pull/6589

for details. The idea is to also extend this mechanism to Arrays and
maybe other receivers, as reading beyond the length is also often used
in jQuery and other popular libraries.

Note that this is considered a mitigation for a performance cliff and
not a general optimization of OOB accesses. These should still be
avoided and handled properly instead.

This seems to further improve the babel test on the web-tooling-benchmark
by around 1%, because the OOB access no longer turns the otherwise
MONOMORPHIC access into MEGAMORPHIC state.

Bug: v8:6936, v8:7014
Change-Id: I9df03304e056d7001a65da8e9621119f8e9bb55b
Reviewed-on: https://chromium-review.googlesource.com/744022
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49049}
2017-10-31 11:25:53 +00:00
Adam Klein
6d56874868 Revert "[runtime] Slightly optimize creation of class literals."
This reverts commit 521fa16e02.

Reason for revert: fails tests under code-serializer:

https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug/builds/17691

Original change's description:
> [runtime] Slightly optimize creation of class literals.
> 
> TBR=bmeurer@chromium.org
> 
> Bug: v8:5799
> Change-Id: I61de5f8b3333db174dadf76ed983950acb39742b
> Reviewed-on: https://chromium-review.googlesource.com/649509
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49044}

TBR=rmcilroy@chromium.org,yangguo@chromium.org,mythria@chromium.org,gsathya@chromium.org,ishell@chromium.org,verwaest@chromium.org

Change-Id: I994edb855a8a0aa6e7e7476b0b013a46aac6f2e7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:5799
Reviewed-on: https://chromium-review.googlesource.com/745581
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49046}
2017-10-31 01:04:20 +00:00
Igor Sheludko
521fa16e02 [runtime] Slightly optimize creation of class literals.
TBR=bmeurer@chromium.org

Bug: v8:5799
Change-Id: I61de5f8b3333db174dadf76ed983950acb39742b
Reviewed-on: https://chromium-review.googlesource.com/649509
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49044}
2017-10-31 00:08:26 +00:00
Sathya Gunasekaran
c3458a8672 [parser] Add new FunctionNameInferrer state before parsing param
Create new state before parsing FormalParameter because we don't
want to use any of the parameters as an inferred function name.

Previously the stacktrace was:
  test.js:3: Error: boom
      throw new Error('boom');
      ^
  Error: boom
      at param (test.js:3:11)
      at test.js:4:5
      at test.js:6:3

The stacktrace with this patch:
  test.js:3: Error: boom
      throw new Error('boom');
      ^
  Error: boom
      at test.js:3:11
      at test.js:4:5
      at test.js:6:3


Bug: v8:6822, v8:6513
Change-Id: Ifbadc660fc4e85248af405acd67c025f11662bd4
Reviewed-on: https://chromium-review.googlesource.com/742657
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49042}
2017-10-30 20:04:38 +00:00
Camillo Bruni
949734f73a [log] Support logging basic function events
This CL contains the base implementation for logging function events.
Currently only compiler events are support (compile, compile-lazy...),
future CLs will enable log events for parsing and first-time exeuction
of functions.

Bug: chromium:757467
Change-Id: Ia705979190a3ebc1009989610483a7a141bc504b
Reviewed-on: https://chromium-review.googlesource.com/743921
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49040}
2017-10-30 15:58:48 +00:00
Igor Sheludko
ef45d789d2 [proxy] Properly handle exceptions from Object::ToName().
... when storing to proxies.

Bug: chromium:772897
Change-Id: Ia91e69f35dc3b1f67b67038bd8206e508149e9a3
Reviewed-on: https://chromium-review.googlesource.com/744041
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49039}
2017-10-30 15:06:38 +00:00
peterwmwong
7ae0a2f9f1 [builtins] Port WeakMap.p.set and WeakSet.p.add to CSA from JS
- Add WeakMapPrototypeSet and WeakSetPrototypeAdd TFJ builtins
  - Fast paths for...
    1) existing key
    2) new key when ObjectHashTable has a "sufficient capacity"
- Create WeakCollectionsBuiltinsAssembler to consolidate common WeakMap/WeakSet code generation
- Convert existing WeakMapLookupHashIndex to use WeakCollectionsBuiltinsAssembler

Some quick benchmarks shows performance gains of...
- 1.56x - 1.98x for WeakMap constructor
- 1.66x - 2.06x for WeakSet constructor
- 1.50x - 2.11x for WeakMap.p.set
- 1.54x - 2.26x for WeakSet.p.add

https: //github.com/peterwmwong/v8-perf/blob/master/weakcollection-set/README.md
Bug: v8:5049, v8:6604
Change-Id: I3499d46be6b2b3b1d8d46720ebe86cc5142ee542
Reviewed-on: https://chromium-review.googlesource.com/737935
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49036}
2017-10-30 13:36:47 +00:00
Camillo Bruni
574d51d5b4 [cctest] Adding console.timeXX log test
Test that console.time/End/Stamp properly show up in the log file.

Change-Id: I99904e20fc98811ed3e3b5e5a9d186b459b8d4be
Reviewed-on: https://chromium-review.googlesource.com/743020
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49035}
2017-10-30 12:48:10 +00:00
Leszek Swirski
27b1c47351 [ignition] Support n-ary logical ops
Following up on adding n-ary nodes, this extends the parser and
interpreter to support n-ary logical operations.

Bug: v8:6964
Bug: chromium:731861
Change-Id: Ife2141c389b9abccd917ab2aaddf399c436ef777
Reviewed-on: https://chromium-review.googlesource.com/735497
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49029}
2017-10-30 11:20:43 +00:00
Jakob Kummerow
3286cf763b [bigint] Adapt Number() to convert BigInts
Bug: v8:6791
Change-Id: Id85bd701eaa574eea1335cdc916323810616cef9
Reviewed-on: https://chromium-review.googlesource.com/738936
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49014}
2017-10-28 01:59:32 +00:00
Adam Klein
317cf32131 [ast] Move AstValue implementation into Literal
This eliminates the AstValue class, effectively moving its
implementation into the Literal AstNode. This should cause
no difference in behavior, but it does signal some shifts
in the underlying system. Biggest changes include:

  - Reduction in AST memory usage
  - No duplicate HeapNumbers in Ignition constant pools
  - Non-String values are allocated either at constant pool
    creation time (or at boilerplate creation time for literals),
    rather than at AstValueFactory::Internalize() time.

There are a variety of test-only/debug-only changes due to these
switches as well.

Bug: v8:6984
Change-Id: I5f178040ce2796d4e7370c24d1063419e1c843a1
Reviewed-on: https://chromium-review.googlesource.com/731111
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49013}
2017-10-27 20:21:29 +00:00
Bill Budge
419924a28b [cctest] Merge identical platform tests, and run on all platforms.
- Moves platform-specific platform tests to test-platform.cc.
- Moves all tests into v8::internal namespace.

Bug: chromium:756050
Change-Id: Ic67d6b84dda07a9d5f6a0cc6489bfae90c52c0f2
Reviewed-on: https://chromium-review.googlesource.com/739983
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49012}
2017-10-27 18:58:06 +00:00
Sathya Gunasekaran
753edc417c [Class] Remove initializer function call desugaring
Instead of creating a runtime call for the static class field
initializer in the AST, we do it in the bytecode generator.

This adds the initializer function to the ClassLiteral AST node.

Bug: v8:5367
Change-Id: Iffaa6531511023812011ee19fc96cea9e5c9d3f3
Reviewed-on: https://chromium-review.googlesource.com/736315
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49008}
2017-10-27 17:25:04 +00:00
Ross McIlroy
488faeb676 [asm.js] Delay reporting warnings until finalization.
To avoid accessing the heap during asm.js compilation, use the pending
error handler to store the pending warnings such that they can be reported
later during finalization.

As part of this change, refactor PendingCompilationErrorHandler to have a
MessageDetails class holding details of either error or warning messages.

BUG=v8:5203

Change-Id: I5b09254f8899b8dc57d94f1986c7183da847eae3
Reviewed-on: https://chromium-review.googlesource.com/735607
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49007}
2017-10-27 16:23:23 +00:00
Michael Achenbach
0a35d6f985 [test] Let flags from test case have precedence
The status-file flags and the flags from the test case's source code
must always overwrite extra flags set by bots.

Bug: v8:6924
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I0e2aabb69da7cfb8ba6c1c79bd3851462071a6ac
Reviewed-on: https://chromium-review.googlesource.com/732656
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49001}
2017-10-27 13:22:39 +00:00
Andreas Rossberg
776d6e9d5c [wasm] Int64 lowering for return values
R=titzer@chromium.org

Change-Id: Ie8c361efb48b56dc65719f09dfc79d505e0f3459
Reviewed-on: https://chromium-review.googlesource.com/735610
Commit-Queue: Andreas Rossberg <rossberg@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49000}
2017-10-27 11:34:14 +00:00
Toon Verwaest
07de62ca18 [lazy-accessor-pairs] Don't take the fast paths if the context needs to be switched
(This is a reland of cb84b6f624)

This works in the ICs since compiled handlers are not shared anymore.

Bug: chromium:759734
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I3b7d6ae34bb4cfa213f679354fac56fb51bfd5ed
Reviewed-on: https://chromium-review.googlesource.com/739822
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48999}
2017-10-27 11:31:34 +00:00
Ben L. Titzer
17a9caf302 [wasm/test] Split test/mjsunit/wasm/user-properties.js into smaller tests.
Because this test uses heap verification, it is quite slow. Split it
into 4 smaller tests to avoid test timeout and allow them to be run
in parallel.

R=ahaas@chromium.org

Bug: 
Change-Id: Ie4ac841d1d8215019bb5cfcc335daea6b10ab789
Reviewed-on: https://chromium-review.googlesource.com/738146
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48998}
2017-10-27 10:37:55 +00:00
Clemens Hammacher
6d1522d500 [wasm] Test the --liftoff flag
This adds two tests to verify that the --liftoff flag has the indented
effect, and that Liftoff compilation is off by default.

R=titzer@chromium.org

Bug: v8:6600
Change-Id: Ie7e13184b5068f572b78dbdf7abbcded6d859fc5
Reviewed-on: https://chromium-review.googlesource.com/733561
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48995}
2017-10-27 08:55:46 +00:00
Benedikt Meurer
c78a98bbc2 [turbofan] Introduce SameValue operator.
We now represent the SameValue operation explicitly in TurboFan and the
operation can thus participate in all kinds of optimizations. Especially
we get rid of the JSCall node in the general case, which blocks several
optimizations across the call. The general, baseline performance is now
always on par with StrictEqual.

Once the StrictEqual operator is also a simplified operator, we should
start unifying the type based optimizations in SimplifiedLowering.

In the micro-benchmark we go from

  testStrictEqual: 1422 ms.
  testObjectIs: 1520 ms.
  testManualSameValue: 1759 ms.

to

  testStrictEqual: 1426 ms.
  testObjectIs: 1357 ms.
  testManualSameValue: 1766 ms.

which gives the expected result.

Bug: v8:7007
Change-Id: I0de3ff6ff6209ab4c3edb69de6a16e387295a9c8
Reviewed-on: https://chromium-review.googlesource.com/741228
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48994}
2017-10-27 08:03:26 +00:00
Georg Neis
03035038b9 [bigint] Implement ToBigInt and NumberToBigInt.
... and use them to complete the BigInt function.

Bug: v8:6791
Change-Id: Ia36db86b92d1a0cfcb783516e04d6c0e3750f194
Reviewed-on: https://chromium-review.googlesource.com/737643
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48993}
2017-10-27 06:43:57 +00:00
Georg Neis
13802c8b09 [bigint] Adapt test/mjsunit/mjsunit.js.
R=jkummerow@chromium.org

Bug: v8:6791
Change-Id: I9eb5b9aeeb060d660ec41b7a3287089edd833197
Reviewed-on: https://chromium-review.googlesource.com/737796
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48992}
2017-10-27 06:10:53 +00:00
Jakob Kummerow
3942370c39 [bigint] Flatten string in Runtime_BigIntEqualToString
Bug: v8:6791, v8:6995
Change-Id: I79d04d9e8fbe156570875e3ecc2a1a87c9a794ee
Reviewed-on: https://chromium-review.googlesource.com/740918
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48991}
2017-10-27 05:51:23 +00:00
Camillo Bruni
c3ad1e9067 [log] Use log for --trace-maps
This is an intermediate CL to move the complete --trace-map infrastructure to
a log-based version.

Change-Id: I0673052b1b87fe338e38dc609434a52af6a0652d
Reviewed-on: https://chromium-review.googlesource.com/738835
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48988}
2017-10-27 03:33:49 +00:00
Alexei Filippov
e8636cd75b Reland "[heap-profiler] Do not treat WeakMap values as weak."
This is a reland of c34042cc64
Original change's description:
> [heap-profiler] Do not treat WeakMap values as weak.
> 
> For the WeakHashTable objects only mark keys as weak while leaving values as strong references.
> 
> BUG=chomium:773722
> 
> Change-Id: Iabd5ba293d05fe68a2af6503fcdd711ecc182482
> Reviewed-on: https://chromium-review.googlesource.com/730771
> Commit-Queue: Alexei Filippov <alph@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#48985}

TBR=ulan@chromium.org

Bug: chomium:773722
Change-Id: Icede16fde528d147cde5c3f6c72f2029876b099f
Reviewed-on: https://chromium-review.googlesource.com/740722
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48987}
2017-10-26 23:04:31 +00:00
Alexei Filippov
f5a3b75f9c Revert "[heap-profiler] Do not treat WeakMap values as weak."
This reverts commit c34042cc64.

Reason for revert: Wrong table type was used

Original change's description:
> [heap-profiler] Do not treat WeakMap values as weak.
> 
> For the WeakHashTable objects only mark keys as weak while leaving values as strong references.
> 
> BUG=chomium:773722
> 
> Change-Id: Iabd5ba293d05fe68a2af6503fcdd711ecc182482
> Reviewed-on: https://chromium-review.googlesource.com/730771
> Commit-Queue: Alexei Filippov <alph@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#48985}

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

Change-Id: Ia2ddef5b2422d4cbb8c4710e24ed0885a9a5b284
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chomium:773722
Reviewed-on: https://chromium-review.googlesource.com/740721
Reviewed-by: Alexei Filippov <alph@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48986}
2017-10-26 22:20:44 +00:00
Alexei Filippov
c34042cc64 [heap-profiler] Do not treat WeakMap values as weak.
For the WeakHashTable objects only mark keys as weak while leaving values as strong references.

BUG=chomium:773722

Change-Id: Iabd5ba293d05fe68a2af6503fcdd711ecc182482
Reviewed-on: https://chromium-review.googlesource.com/730771
Commit-Queue: Alexei Filippov <alph@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48985}
2017-10-26 20:58:49 +00:00
Georg Neis
401b39b1dd [bigint] Install Symbol.toStringTag and adapt O.p.toString.
Bug: v8:6791
Change-Id: I10bb316284ba3a0e326daad4f9b995f88d76c2a2
Reviewed-on: https://chromium-review.googlesource.com/739501
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48982}
2017-10-26 17:37:26 +00:00
Toon Verwaest
799cb6f371 Revert "[lazy-accessor-pairs] Don't take the fast paths if the context needs to be switched"
This reverts commit cb84b6f624.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [lazy-accessor-pairs] Don't take the fast paths if the context needs to be switched
> 
> This works in the ICs since compiled handlers are not shared anymore.
> 
> As drive-by cleanup I also removed custom code to deal with compiled handler sharing for primitive and access-checked objects.
> 
> Bug: chromium:759734
> Change-Id: Ifb394221c2398f42ea9305acc02845db6004c680
> Reviewed-on: https://chromium-review.googlesource.com/738381
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#48979}

TBR=jarin@chromium.org,ishell@chromium.org,verwaest@chromium.org

Change-Id: I9b7424252cbc3f18efd6b6b5b3818651c2863f5c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:759734
Reviewed-on: https://chromium-review.googlesource.com/739487
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48980}
2017-10-26 16:02:17 +00:00
Toon Verwaest
cb84b6f624 [lazy-accessor-pairs] Don't take the fast paths if the context needs to be switched
This works in the ICs since compiled handlers are not shared anymore.

As drive-by cleanup I also removed custom code to deal with compiled handler sharing for primitive and access-checked objects.

Bug: chromium:759734
Change-Id: Ifb394221c2398f42ea9305acc02845db6004c680
Reviewed-on: https://chromium-review.googlesource.com/738381
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48979}
2017-10-26 16:00:16 +00:00
Igor Sheludko
b4fdce5ae9 [cleanup] Prepare V8-internal AccessorInfo objects for sharing.
Rename |property_attributes| to |initial_property_attributes| and ensure
that it is used as a storage of values only for AccessorInfos installed in
API Templates (i.e. ObjectTemplate and FunctionTemplate).
When an AccessorInfo is installed directly into an existing JS object
(via JSObject::SetAccessor) or into a DescriptorArray (when certain V8
objects' shapes are configured) it is not necessary to thread attributes
being set through the AccessorInfo instance.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ibe61026f08c42549756f694129a286635ffe5769
Reviewed-on: https://chromium-review.googlesource.com/730425
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48978}
2017-10-26 15:21:46 +00:00
jgruber
1b2a341e02 [snapshot] Move bytecode handlers to builtins snapshot
This is the first step towards lazy-deserializing bytecode handlers.

Bytecode handler code objects are now serialized into the builtins
snapshot area (which, like many other related concepts, has become
somewhat of a misnomer now that it contains both builtins and
handlers).

Handlers are still eagerly-deserialized upon Isolate creation. This will
change in follow-up CLs.

Bug: v8:6624
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I7b257f76f5e9e90d5f7b183980bae7bc621171fc
Reviewed-on: https://chromium-review.googlesource.com/738030
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48977}
2017-10-26 15:08:36 +00:00
Daniel Clifford
7dd261c30e Fix Array.protoype.slice bug in argument object handling
Bug: chromium:778574
Change-Id: I014b16b9deabab07ca7dfb662ea8cb0dbf9c8987
Reviewed-on: https://chromium-review.googlesource.com/738148
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48975}
2017-10-26 14:32:56 +00:00
Ulan Degenbaev
d58b36b243 [jumbo] Fix collision between test-alloc.cc and test-spaces.cc.
This fixes jumbo build by renaming Pseudorandom function after
https://chromium-review.googlesource.com/738204

Bug: chromium:777177
Change-Id: I86aa403928ad85ddd7dd779a8a43af9e34161928
Reviewed-on: https://chromium-review.googlesource.com/737637
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48974}
2017-10-26 14:19:26 +00:00
Michael Starzinger
fdf6c2b134 [turbofan] Set {Code::stub_key} within the allocator.
This moves the initialization of the {Code::stub_key} field into the
allocator for {Code} objects, essentially making the field in question
immutable after allocation.

R=verwaest@chromium.org
BUG=v8:6792

Change-Id: I8ba2ffeea792d0d566995c08e3572ae63a7c1e94
Reviewed-on: https://chromium-review.googlesource.com/739141
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48971}
2017-10-26 13:50:06 +00:00
Junliang Yan
868b1b7446 PPC: Add 3 tests as slow test on sim run
Bug: 
Change-Id: I4ea086564ff4a7782c0c1bc232d9929fd73fd9f6
Reviewed-on: https://chromium-review.googlesource.com/738537
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#48969}
2017-10-26 12:54:43 +00:00
Ulan Degenbaev
7f8f283366 [heap] Fix top_on_previous_step_ check in PagedSpace::AllocateRaw.
Both the top_ pointer and the top_on_previous_step_ pointer can be one
byte beyond the current page. Page::FromAddress call should take that
into account.

Bug: chromium:777177
Change-Id: I9cbb5bc6eab932afc6d0c915fd70a9a7b20ba62c
Reviewed-on: https://chromium-review.googlesource.com/738204
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48962}
2017-10-26 11:10:57 +00:00
Georg Neis
9dbea83609 [bigint] Add a test for Bigint.prototype.valueOf.
We can already construct wrapper objects using Object().

R=jkummerow@chromium.org

Bug: v8:6791
Change-Id: Ic4079654ef1fcae2be4b588cb12c2645e199f4f7
Reviewed-on: https://chromium-review.googlesource.com/738089
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48955}
2017-10-26 08:40:18 +00:00
Clemens Hammacher
a74ee93311 [wasm] [interpreter] Tighten possible nondeterminism
The current implementation overapproximates the
possible_nondeterminism_ bit by setting it whenever a NaN value is
reinterpreted as integer, or stored to memory. This hides bugs in the
interpreter that are handled as possible nondeterminism even though
they are not.
This CL fixes this by only setting the bit if a binary floating point
operation is executed and one of the inputs is a NaN.

R=ahaas@chromium.org

Bug: v8:6954
Change-Id: Ib937ae7730dbb140c012d07fae23b40ae7ed3d6b
Reviewed-on: https://chromium-review.googlesource.com/735599
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48954}
2017-10-26 08:24:17 +00:00
Clemens Hammacher
913d5ba508 Split message tests in failing and non-failing
This way, we can also check the return code of d8. We currently have a
bug (6981) which makes failing tests not being detected, even though
the failure message is (sometimes) being printed.
After this refactoring, we can write tests for our mjsunit test
functions.

R=machenbach@chromium.org

Bug: v8:6981
Change-Id: I0aa0abcb0f9a4f622a1e1d1a4d826da1e6eb4f07
Reviewed-on: https://chromium-review.googlesource.com/737991
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48951}
2017-10-26 07:36:28 +00:00
Karl Schimpf
82ee3bcad0 [wasm] move protected instructions from RelocInfo To FixedArray
The motivation for this is that it greatly reduces the RelocInfo size.
This also results in a small improvement in compile time.

Note: This CL was based on https://codereview.chromium.org/2651833003,
and basically reverts that CL (but handles code changes and some
minor bugs in previous code).

Bug: chromium:772780
Change-Id: I55dd48d3bddd4b3d1c8eec13791b3ee4c485c604
Reviewed-on: https://chromium-review.googlesource.com/730649
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Reviewed-by: Eric Holk <eholk@chromium.org>
Commit-Queue: Karl Schimpf <kschimpf@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48947}
2017-10-25 21:15:49 +00:00
Jakob Kummerow
98df94cdd4 [bigint] Fix abstract equality with junk strings
Abstract equality comparison of a BigInt and a String converts the
latter to BigInt. This conversion can fail; since we do not want to
pass a context to the comparison function, we must signal such failure
without throwing an exception.
This CL uses the existing ShouldThrow enum to configure behavior of
String-to-BigInt conversion, moving it out of Object into globals.h.

Bug: v8:6791, v8:6979
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ibb98675079b8392cf03bbcbbbd5556108500a32d
Reviewed-on: https://chromium-review.googlesource.com/734172
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48946}
2017-10-25 20:56:09 +00:00
Adam Klein
e6d57a9f66 [esnext] Remove --harmony-object-rest-spread flag
This flag has been on by default since Chrome 61.

Bug: v8:5549
Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I81c34d1d3a7dbd219acce2cdf0cf4917eb484002
Reviewed-on: https://chromium-review.googlesource.com/738312
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48945}
2017-10-25 19:47:29 +00:00
Jakob Kummerow
9daf3e2039 [cleanup] Limit Token usage to Parser, AST, BytecodeGenerator
and use a newly-introduced "enum class Operation" in all
other places that so far passed Token::Values around.
Also delete some related dead code along the way.

Bug: v8:6921
Change-Id: I062f396d304aa62298cfeff202e3132a4a5597c1
Reviewed-on: https://chromium-review.googlesource.com/736851
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48944}
2017-10-25 18:15:26 +00:00
Adam Klein
56c0acfb11 [parser] Remove always-true flag --harmony-restrictive-generators
It's been on by default since Chrome 61.

Bug: v8:4806
Change-Id: I748d9008d29997667458649d7bf4999e15ff8615
Reviewed-on: https://chromium-review.googlesource.com/737416
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48943}
2017-10-25 18:08:40 +00:00
Jakob Kummerow
6f1c3b785d [bigint] Fix RightShift by 32
Bug: v8:6791
Change-Id: I9c1ebddfab9f3d73642e61e43c3fbfd739efd56c
Reviewed-on: https://chromium-review.googlesource.com/736722
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48942}
2017-10-25 18:03:18 +00:00