Commit Graph

40860 Commits

Author SHA1 Message Date
Clemens Hammacher
f17d44a247 [wasm] Cleanup memory allocation for array buffers
Instead of calling {TryAllocateBackingStore} with
{enable_guard_regions==false}, we just directly call
{array_buffer_allocator->Allocate}.
Drive-by optimization: Don't allocate if the size is 0.

R=titzer@chromium.org

Change-Id: Iabf7af7e0f1bc970c03efcd9ee4c23e5307a7095
Reviewed-on: https://chromium-review.googlesource.com/548398
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46218}
2017-06-26 14:26:11 +00:00
Michael Achenbach
1ec6671f32 [build] Add gcov coverage to GN configs
This prepares switching the gcov coverage bot to GN.

We skip instrumenting test executables explicitly in gn configs.
In gyp, we did the same through an extra compiler wrapper script.

NOTRY=true

Bug: chromium:645890
Change-Id: I663fb479347063ae9228598d356bb654ca2a496c
Reviewed-on: https://chromium-review.googlesource.com/548275
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46217}
2017-06-26 13:50:28 +00:00
jarin
bdf1b0a84a [turbofan] Fix an assertion in representation selection for BooleanNot.
BUG=chromium:736567

Review-Url: https://codereview.chromium.org/2962503002
Cr-Commit-Position: refs/heads/master@{#46216}
2017-06-26 13:49:06 +00:00
Michael Starzinger
969ad75256 [deoptimizer] Remove arguments object materialization.
This removes specialized support for materializing arguments objects.
For TurboFan we use the generic escape analysis mechanism when such
objects are materialized already, only Crankshaft used this deprecated
mechanism.

R=jarin@chromium.org
BUG=v8:6408

Change-Id: Ibed52a028752e667b05a60fa7cf0275a6a372897
Reviewed-on: https://chromium-review.googlesource.com/548595
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46215}
2017-06-26 13:43:23 +00:00
georgia.kouveli
118958f517 [arm64] Share constant pool entries in snapshot.
Port c15b3ffc77 and
6a99238b90 to arm64.

This reduces the snapshot size for arm64 by about 5.5%.

BUG=

Review-Url: https://codereview.chromium.org/2937413002
Cr-Commit-Position: refs/heads/master@{#46214}
2017-06-26 13:03:01 +00:00
Michael Lippautz
c221758770 [heap] Speed up instance visitor
- Allow disabling filtering of objects
- Allow disabling visitation of map pointer
- Strongly suggest to compiler to inline visitation.

Bug: v8:736641
Change-Id: I1894eaf86b4fd368b66d75b8deca1c9ab273059d
Reviewed-on: https://chromium-review.googlesource.com/547716
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46213}
2017-06-26 12:47:52 +00:00
Michael Starzinger
c751e79ec3 [crankshaft] Remove Crankshaft.
R=danno@chromium.org
BUG=v8:6408

Change-Id: I6613557e474f415293feb164a30c15485d81ff2c
Reviewed-on: https://chromium-review.googlesource.com/547717
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46212}
2017-06-26 12:33:53 +00:00
Tobias Tebbi
f030838700 [runtime] clear array elements when right trimming while leaving free space
Bug: chromium:734314
Change-Id: I4e1bd1264c2c4088ce9fdcdbe3b9e233faa516df
Reviewed-on: https://chromium-review.googlesource.com/544990
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46211}
2017-06-26 12:02:27 +00:00
Andreas Haas
cd2dda8d50 [wasm] Refactor GetNextUncompiledFunctionId and CompileAndSchedule
The only difference between GetNextUncompiledFunctionId +
CompileAndSchedule and FetchAndExecuteCompilationUnit is that
FetchAndExecuteCompilationUnit potentially calls a callback if
it detects that no finishing task is executing. With this CL
I replace the two functions again with
FetchAndExecuteCompilationUnit. I add a flag so that no callback
is called when the flag is not set. If no callback is called,
FetchAndExecuteCompilationUnit behaves exactly the same
as the other two functions together.

R=clemensh@chromium.org

Change-Id: I17318381eec2d17b13d0902984f2620b909c7ea0
Reviewed-on: https://chromium-review.googlesource.com/544954
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46210}
2017-06-26 11:56:54 +00:00
Leszek Swirski
c950963be3 [base] Allow BitVector to store data inline
If the data to be stored in a BitVector is small enough (less than the
pointer size), it can be stored directly on the BitVector instead of the
pointer. This patch makes the data field of the BitVector a union
between a pointer and uintptr_t, and uses the latter is the data length
is 0.

Change-Id: I24c1920f2c16373c883cf69b123bf59812fef28e
Reviewed-on: https://chromium-review.googlesource.com/541307
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46209}
2017-06-26 11:38:24 +00:00
Igor Sheludko
baef1a4f63 [tests] Fix test-native-method-names.js in noi18n mode.
Change-Id: Ie0d3be6c36d13b073df2e59890ef6c714c529011
Reviewed-on: https://chromium-review.googlesource.com/548055
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46208}
2017-06-26 11:00:46 +00:00
Ulan Degenbaev
7dc3b0b829 [heap] Support clear and update operation in worklist.
BUG=chromium:694255

Change-Id: Ie4f14e62afa63339c586c3872d6acfa2bf4833d8
Reviewed-on: https://chromium-review.googlesource.com/545717
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46207}
2017-06-26 10:59:41 +00:00
Jaroslav Sevcik
13dc483ce1 [turbofan] Redundancy elimination of String.to(Lower|Upper)Case().
This is mainly to enable optimization of case-insensitive maps, where
we see the pattern

if (m.has(key.toLowerCase())) { return m.get(key.toLowerCase()) } ...

Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I8c78a185401c51e8a53ae2932a158eaafa169495
Reviewed-on: https://chromium-review.googlesource.com/547057
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46206}
2017-06-26 10:35:05 +00:00
Clemens Hammacher
a2f5a74041 [cleanup] Remove the V8_NORETURN macro
There were only two uses. Replace them by [[noreturn]] directly.

R=jarin@chromium.org
BUG=v8:6474

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I965f74f5b3493cfef9efd698f24bf00216442fd8
Reviewed-on: https://chromium-review.googlesource.com/544845
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46205}
2017-06-26 09:53:07 +00:00
Ross McIlroy
db31bd6f8f [TurboFan] Type internalized string constants as either Empty or NonEmpty.
Previously any object with maps INTERNALIZED_STRING_TYPE or
ONE_BYTE_INTERNALIZED_STRING_TYPE would be typed as kInternalizedString.
This meant that non-empty constants weren't typed as such. This causes the
following issues:
  - StringConcat couldn't be typed lowered to inline cons string allocation
    if there were string constants after the first two operands, since these
    constants would be typed as possibly empty (even if known not to be).
  - When inlining, a heap constant could end up becoming the input to a
    ToPrimitiveToString operand. If the ToPrimitiveToString is speculatively
    lowered to a CheckNonEmpty, then the verifier would fail since the
    typer can't deal well with intersecting a bitset type (NonEmpty) with
    a HeapConstantType - the end result type would be (None | HeapConstant..)
    but the HeapConstantType would retain it's LUB of kInternalizedSeqString,
    (which includes the EmptyString type) and so the verifier would fail
    since the output of CheckNonEmpty would still include the EmptyString.

To address this, when typing an actual object, check for the empty
string and return EmptyString if it is, otherwise type as normal but
remove the EmptyString bit since we know it's non-empty.

BUG=v8:6243

Change-Id: I2b34ca24e9b488199dce0d2c092d2701c2b22791
Reviewed-on: https://chromium-review.googlesource.com/544988
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46204}
2017-06-26 09:43:05 +00:00
Georg Neis
b29e2db603 [cleanup] Remove some unused functions.
R=mstarzinger@chromium.org

Bug: 
Change-Id: Ica169da6e095abb79967687ae9a18db5c833f72e
Reviewed-on: https://chromium-review.googlesource.com/546356
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46203}
2017-06-26 09:39:55 +00:00
Michael Starzinger
9bb8da1ccb [stubs] Remove support for HydrogenCodeStub generation.
R=jarin@chromium.org
BUG=v8:6408

Change-Id: Ic3337c072d1d2bb93f5b65f23e4888f65a55874f
Reviewed-on: https://chromium-review.googlesource.com/541220
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46202}
2017-06-26 08:58:09 +00:00
Toon Verwaest
679ed0f00e [hashtable] Get rid of HashTable::Has, use FindEntry != NotFound instead
Bug: 
Change-Id: I483903e0a62363098370aeae154bbc6c52318741
Reviewed-on: https://chromium-review.googlesource.com/547956
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46201}
2017-06-26 08:45:52 +00:00
Igor Sheludko
eccc60e35f [tests] Added a test for built-in functions' name and length values.
This is a regression test that will ensure that follow-up CLs that will
touch native function definitions will not brake anything.

Bug: v8:6459
Change-Id: Iceafd38462f2d9de14e119b6aa48be2b9bff1d33
Reviewed-on: https://chromium-review.googlesource.com/545935
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46200}
2017-06-26 08:29:42 +00:00
Michael Achenbach
5d39f7c13b [test] Add flag for concurrent-marking trybot to try_perf
NOTRY=true
TBR=ulan@chromium.org

Bug: chromium:735951
Change-Id: Ic5cf6692988ede915aabdc1c44eea52b42bf7f45
Reviewed-on: https://chromium-review.googlesource.com/547426
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46199}
2017-06-26 07:33:48 +00:00
Michael Achenbach
79619e94c1 [build] Deprecate using gold plugin
https://codereview.chromium.org/2957523002 deprecated using the gold
plugin on the chromium side.

TBR=mstarzinger@chromium.org
NOTRY=true

Bug: v8:6524
Change-Id: Id82ac677c9c858725cc89ec7a87a8917fb29a451
Reviewed-on: https://chromium-review.googlesource.com/547058
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46198}
2017-06-26 07:21:18 +00:00
Peter Marshall
c81a1eee2c [mips64] Use Dsubu in InterpreterPushArgs.
Bug: v8:6488
Change-Id: Icc1e8a71f32592f670f262eb588976c07af41a22
Reviewed-on: https://chromium-review.googlesource.com/541283
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46197}
2017-06-26 07:06:19 +00:00
Michael Achenbach
f7d60ab798 Revert "Remove DCHECK for isolate->counters()"
This reverts commit ee0e295d8e.

Suspect for http://crbug.com/736676
Another dcheck fails, starting after the reverted CL, e.g.:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/8666

BUG=chromium:736676,v8:6361
TBR=kschimpf@chromium.org,mtrofin@chromium.org
NOTRY=true
NOPRESUBMIT=true

Change-Id: I160b996a07d77f90a96864f3ae84f861f495ed42
Reviewed-on: https://chromium-review.googlesource.com/547425
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46196}
2017-06-26 06:41:57 +00:00
machenbach
410a753ba2 Revert of Make some functions that are hit during renderer startup available for inlining (patchset #3 id:40001 of https://codereview.chromium.org/2950993002/ )
Reason for revert:
Blocks roll:
https://codereview.chromium.org/2954833002/

E.g.:
https://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/449680
https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_ng/builds/324953

Please include those chromium trybots on reland. Maybe missing symbol export?

Original issue's description:
> Make some functions that are hit during renderer startup available for inlining
>
> This is towards closing the perf gap between the MSVC build (which uses link-
> time optimization) and Clang (where LTO isn't ready on Windows yet). We did
> a study (see bug) to see which non-inlined functions are hit a lot during render
> start-up, and which would be inlined during LTO. This should benefit performance
> in all builds which currently don't use LTO (Android, Linux, Mac) as well as
> the Win/Clang build.
>
> The binary size of chrome_child.dll increases by 2KB with this.
>
> BUG=chromium:728324
>
> Review-Url: https://codereview.chromium.org/2950993002
> Cr-Commit-Position: refs/heads/master@{#46191}
> Committed: d00d52be1f

TBR=jochen@chromium.org,mstarzinger@chromium.org,rmcilroy@chromium.org,vogelheim@chromium.org,marja@chromium.org,mlippautz@chromium.org,thakis@chromium.org,hans@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:728324
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2955793002
Cr-Commit-Position: refs/heads/master@{#46195}
2017-06-25 20:34:35 +00:00
v8-autoroll
75f676f992 Update V8 DEPS.
Rolling v8/third_party/catapult: 28f796f..d4f2d77

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

Change-Id: Iddd29943ce0e5ed59b957106313e235c32d56e3d
Reviewed-on: https://chromium-review.googlesource.com/547096
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46194}
2017-06-25 03:31:54 +00:00
v8-autoroll
b0ec69cf2f Update V8 DEPS.
Rolling v8/build: a4ae1b7..564be75

Rolling v8/buildtools: 38477c2..7f2cacb

Rolling v8/third_party/catapult: e810453..28f796f

Rolling v8/tools/clang: 9bb118e..ad52f33

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

Change-Id: I9e0e4ebca5fcf782b11bf8e4c4348b46e3f90c80
Reviewed-on: https://chromium-review.googlesource.com/547296
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46193}
2017-06-24 03:32:50 +00:00
sampsong
24bf7ef590 PPC/s390: Remove TypeFeedbackId parameters from assembler and full-code.
Port a42473abb7

Original Commit Message:

    These are no longer being used.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:6408
LOG=N

Review-Url: https://codereview.chromium.org/2949103005
Cr-Commit-Position: refs/heads/master@{#46192}
2017-06-23 21:16:39 +00:00
hans
d00d52be1f Make some functions that are hit during renderer startup available for inlining
This is towards closing the perf gap between the MSVC build (which uses link-
time optimization) and Clang (where LTO isn't ready on Windows yet). We did
a study (see bug) to see which non-inlined functions are hit a lot during render
start-up, and which would be inlined during LTO. This should benefit performance
in all builds which currently don't use LTO (Android, Linux, Mac) as well as
the Win/Clang build.

The binary size of chrome_child.dll increases by 2KB with this.

BUG=chromium:728324

Review-Url: https://codereview.chromium.org/2950993002
Cr-Commit-Position: refs/heads/master@{#46191}
2017-06-23 21:12:13 +00:00
kschimpf
ee0e295d8e Remove DCHECK for isolate->counters()
This is a fix to https://codereview.chromium.org/2929853003 that got
reverted. The DCHECK checked to see that it was not in a background
thread. While this is a property we want for v8, it is also used
by blink, and blink violates this property.

Therefore, this CL removes the DCHECK for now.

BUG=v8:6361

Review-Url: https://codereview.chromium.org/2961443002
Cr-Commit-Position: refs/heads/master@{#46190}
2017-06-23 20:17:03 +00:00
Jaideep Bajwa
b6224c8fc0 PPC/s390: [turbofan] Introduce new JSConstructWithArrayLike operator.
Port 217012973c

Original Commit Message:

    Add a new JSConstructWithArrayLike operator that is backed by the
    ConstructWithArrayLike builtin (similar to what was done before
    for the JSCallWithArrayLike operator), and use that operator to
    optimize Reflect.construct inlining in TurboFan. This is handled
    uniformly with JSConstructWithSpread in the JSCallReducer.

    Also add missing test coverage for Reflect.construct in optimized
    code, especially for some interesting corner cases.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4587,v8:5269
LOG=N

Change-Id: Idaf247317036ddec74b9aa3addd2e7d75b65bfaf
Reviewed-on: https://chromium-review.googlesource.com/546716
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#46189}
2017-06-23 19:47:28 +00:00
Jaideep Bajwa
b09ff25cfd PPC/s390: [turbofan] Introduce new JSCallWithArrayLike operator.
Port 767ce78871

Original Commit Message:

    Add a new JSCallWithArrayLike operator that is backed by the
    CallWithArrayLike builtin, and use that operator for both
    Function.prototype.apply and Reflect.apply inlining. Also unify
    the handling of JSCallWithArrayLike and JSCallWithSpread in
    the JSCallReducer to reduce the copy&paste overhead.

    Function.prototype.apply in optimized code, especially for some
    corner cases, which was missing so far.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4587,v8:5269
LOG=N

Change-Id: I930845df7e87b8962588cc79f6069477865fa086
Reviewed-on: https://chromium-review.googlesource.com/546735
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#46188}
2017-06-23 19:19:57 +00:00
Jaideep Bajwa
789f9592de PPC/s390: [runtime] Port SpreadCall code to CSA.
Port a971a64d1c

Original Commit Message:

    We can remove a lot of native code and rely on CallOrConstructVarargs
    to do the stack manipulation for us.

    This will also take advantage of the fast-path for double arrays in
    CallOrConstructDoubleVarargs.

    We can also remove Runtime_SpreadIterableFixed because it isn't used
    anymore. We just call directly into spread_iterable from CSA.

R=petermarshall@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Idad830c9aace4151db866c9f863158cd7525e881
Reviewed-on: https://chromium-review.googlesource.com/546575
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#46187}
2017-06-23 18:17:37 +00:00
jgruber
44e578e4c4 [debug] Only create stack frames for user JS code
Each frame within an optimized frame needs to be re-verified as being
subject to debugging. The specific crash from the linked bug was caused
by the fact that non-user JS frames don't necessarily have an associated
script. We'd ignore that and attempt to call
Script::GetPositionInfo() on the Undefined constant.

BUG=chromium:732408

Change-Id: Ib2982890529623d150092fa57e26fcb237fef59f
Reviewed-on: https://chromium-review.googlesource.com/545895
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46186}
2017-06-23 17:23:38 +00:00
Georg Neis
1982604218 [d8] Fix file name resolution for dynamic imports.
When executing a script that does import("foo"), "foo" should be
relative to the script's directory, not relative to the current working
directory of the d8 process.

R=gsathya@chromium.org

Bug: v8:5785
Change-Id: Id6ceccb242905bd6b54b07038ece60b93d92e4a0
Reviewed-on: https://chromium-review.googlesource.com/546375
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46185}
2017-06-23 17:16:08 +00:00
Leszek Swirski
d14426f6f9 [bits] Define 32/64 bit overloads in bits using templates
In bits.h, instead of relying on C++ overloading for 32/64 bits integers
(which can be ambiguous when the input isn't the exact type typedef-ed
by uint64_t or uint32_t), use templates and std::enable_if to switch
between integers of different sizes.

This means that we can get rid of an awkward sizeof check in
bit-vector.cc, which was necessary to compile on Mac.

Change-Id: Id0eaf0f855cdbd2dc4d7bc1c481037fcd9b73953
Reviewed-on: https://chromium-review.googlesource.com/543480
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46184}
2017-06-23 15:48:23 +00:00
Leszek Swirski
87f71769c5 [ignition] Merge bytecode array builder and writer
Move bytecode array writing logic into the array builder, allowing us to
remove the bytecode array writer and bytecode node, and convert runtime
operand writing to compile-time bytecode operand writing using the
information statically known at compile time.

Bug: v8:6474
Change-Id: I210cd9897fd41293745614e4a253c7c251dfffc9
Reviewed-on: https://chromium-review.googlesource.com/533055
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46183}
2017-06-23 14:52:20 +00:00
Ulan Degenbaev
28291a38fc [heap] Change VisitFixedArrayIncremental to not use unshift operation.
BUG=chromium:694255

Change-Id: I80657c5ec11fb36766a79af8584c1f1e3afaa497
Reviewed-on: https://chromium-review.googlesource.com/545595
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46182}
2017-06-23 14:45:48 +00:00
Michael Achenbach
1ce8bba296 [test] Remove obsolete lsan suppressions
Bug: chromium:662388
Change-Id: Ia50889a6f4313270f1aadd19cc3f91eb25989c96
Reviewed-on: https://chromium-review.googlesource.com/544882
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46181}
2017-06-23 14:18:05 +00:00
Toon Verwaest
efcdc59c1e [dictionary] drop unnecessary constants
Bug: 
Change-Id: Ice0781822308ba44934abbe5802585a70e744eb0
Reviewed-on: https://chromium-review.googlesource.com/544994
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46180}
2017-06-23 14:03:29 +00:00
Toon Verwaest
8cd842bf91 [elements] Don't duplicate overallocation of elements dict in SlowArrayConcat
Bug: v8:126
Change-Id: I13d42f0dccb0899f0aad572d33501e856073db9d
Reviewed-on: https://chromium-review.googlesource.com/544968
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46179}
2017-06-23 13:47:28 +00:00
Ulan Degenbaev
66e9152fe6 [heap] Rename MarkingDeque to MarkingWorklist.
This prepares ground for switching mark-compactor to use
Worklist data-structure instead of the existing marking deque.

BUG=chromium:694255

Change-Id: I0ac4c563018a9619962fb4bf388b5f3cceffb86d
Reviewed-on: https://chromium-review.googlesource.com/544933
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46178}
2017-06-23 13:43:59 +00:00
Toon Verwaest
ef1a80d67f [runtime] Remove out-dated TODO
Bug: 
Change-Id: I0415b3946e6efd97c3b2fb770fda7dba265ee8cd
Reviewed-on: https://chromium-review.googlesource.com/545000
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46177}
2017-06-23 13:15:22 +00:00
Marja Hölttä
28d6d14ad5 [iwyu] Include isolate.h less.
This removes the include from:
assembler.h (moved Isolate::AddressId to globals.h / IsolateAddressId)
counters.h (ditto)
elements.h (trivial)
keys.h (trivial + iwyu fixes)
property.h (trivial)
transitions.h (trivial)
vm-state.h (trivial)
heap/code-stats.h (trivial + drive-by iwyuing)

BUG=v8:5294

Change-Id: I36b8c07d4edf4177f1a987a393569f5191167ed3
Reviewed-on: https://chromium-review.googlesource.com/532879
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46176}
2017-06-23 13:14:17 +00:00
Ulan Degenbaev
2a614f95bd [heap] Fix a data race in layout descriptor.
The race happens when the layout descriptor is evacuated at the same
time as an object that has this layout descriptor is evacuated.

Change-Id: I0a5fc545cf359fdfe738d8b6359713f5ea170986
Reviewed-on: https://chromium-review.googlesource.com/544953
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46175}
2017-06-23 13:13:12 +00:00
Camillo Bruni
c503b80595 [runtime] Enable eager boilerplate creation again
This partially reverts commit 015edc60ff.

Reason for revert: Performance regression on richards

Bug: v8:6211
Change-Id: Ib69a1ed90b2015addcc54d7f299bdd654d964b54
Reviewed-on: https://chromium-review.googlesource.com/544992
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46174}
2017-06-23 13:12:06 +00:00
Toon Verwaest
2b99d09e62 [elements] Support dictionary-mode in initialize_elements and remove ResetElements
Bug: 
Change-Id: I240356157c71a544d94f8898029d54010b2f4d37
Reviewed-on: https://chromium-review.googlesource.com/544309
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46173}
2017-06-23 13:10:58 +00:00
Michael Achenbach
8822219978 [build] Add concurrent-marking builder
NOTRY=true
NOTREECHECKS=true
TBR=ulan@chromium.org

Bug: chromium:735951
Change-Id: I8b54ba272d353b1fb499fcfccef1f49b9c47a137
Reviewed-on: https://chromium-review.googlesource.com/544828
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46172}
2017-06-23 13:00:40 +00:00
Michael Achenbach
4441809338 Revert "[parser] moved load property position after dot"
This reverts commit 217d654c9b.

Reason for revert: Changes layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/16520

Original change's description:
> [parser] moved load property position after dot
> 
> Currently LdaNamedProperty bytecode for expressions like a.b has position before dot. This CL moves this location after dot.
> It's important for later removing of Nop bytecodes in expressions like a.b() where a is local variable, property call and property load should have the same position.
> 
> R=​jgruber@chromium.org
> 
> Bug: v8:6425
> Change-Id: I528c5007de52215beba80851ab04693ecec038e2
> Reviewed-on: https://chromium-review.googlesource.com/543047
> Reviewed-by: Marja Hölttä <marja@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46163}

TBR=marja@chromium.org,kozyatinskiy@chromium.org,jgruber@chromium.org

Change-Id: I94543526f39f0a20452fbce1a7bc6744cac66621
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6425
Reviewed-on: https://chromium-review.googlesource.com/544993
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46171}
2017-06-23 12:46:57 +00:00
Andreas Haas
54e9f3e6ab [wasm] In the FunctionBody, replace {base} by {offset}
For correct error positions, the FunctionBody struct stored a {base}
pointer to the beginning of the wasm module bytes, in addition to the
{start} and {end} pointer of the function body within the module bytes.
For streaming compilation, we do not have all module bytes in a single
chunk of memory. Therefore this CL changes the FunctionBody such that it
does not store the base pointer but the offset of the function body
within the module. I did the same change already some time ago for the
{Decoder}.

R=clemensh@chromium.org, mtrofin@chromium.org

Change-Id: I5138fbe270d0f5166a7dcc5cb8f3fe78a298bff6
Reviewed-on: https://chromium-review.googlesource.com/544863
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46170}
2017-06-23 11:34:19 +00:00
Marja Hölttä
2c260da393 [parser] Skipping inner funcs: fix destructuring catch variables.
Make PreParser match what Parser does.

BUG=v8:5516

Change-Id: I2801206fd17b9a5047bc43c6112f4945971596b7
Reviewed-on: https://chromium-review.googlesource.com/544949
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46169}
2017-06-23 11:26:49 +00:00