Commit Graph

35807 Commits

Author SHA1 Message Date
jkummerow
c491489693 Reland of [cleanup] Refactor builtins-number.cc
Introducing a TF_BUILTIN macro that wraps CodeStubAssembler usage
into a convenient interface (using a subclass under the hood).

No changes since previous attempt; this was only reverted because it blocked another revert.
Original review: https://codereview.chromium.org/2517833005/

TBR=ishell@chromium.org

Review-Url: https://codereview.chromium.org/2529373002
Cr-Commit-Position: refs/heads/master@{#41315}
2016-11-28 12:46:29 +00:00
jarin
72b5a0d40e [deoptimizer] Use the correct function for handler lookup for bytecode.
BUG=chromium:668760

Review-Url: https://codereview.chromium.org/2530403002
Cr-Commit-Position: refs/heads/master@{#41314}
2016-11-28 12:45:29 +00:00
petermarshall
0a1dcadd05 [fullcodegen] Remove deprecated support for super constructor calls.
All super constructor calls go through the ignition + turbofan pipeline, so this is dead code.

BUG=v8:5657

Review-Url: https://codereview.chromium.org/2525233003
Cr-Commit-Position: refs/heads/master@{#41313}
2016-11-28 12:24:08 +00:00
yangguo
ee84d9f7f9 [debug] remove debug command processor from regress tests.
BUG=v8:5510
R=jgruber@chromium.org

Review-Url: https://codereview.chromium.org/2535733002
Cr-Commit-Position: refs/heads/master@{#41312}
2016-11-28 12:02:44 +00:00
yangguo
0398e5d5e4 [debug] remove debug command processor from scope tests.
BUG=v8:5510
R=jgruber@chromium.org

Review-Url: https://codereview.chromium.org/2536573002
Cr-Commit-Position: refs/heads/master@{#41311}
2016-11-28 12:01:44 +00:00
Jochen Eisinger
6c057947de Fix compilation in parser.cc
R=verwaest@chromium.org
TBR=marja@chromium.org, verwaest@chromium.org
BUG=

Review URL: https://codereview.chromium.org/2531233002 .

Cr-Commit-Position: refs/heads/master@{#41310}
2016-11-28 11:47:50 +00:00
jochen
cfebe6034c Assign unique IDs to FunctionLiterals
They're supposed to be stable across several parse passes, so we'll also
store them in the associated SharedFunctionInfos

To achieve this, the PreParser and Parser need to generated the same number of
FunctionLiterals. To achieve this, we teach the PreParser about desuggaring of
class literals.

For regular functions, the function IDs are assigned in the order they occur in
the source. For arrow functions, however, we only know that it's an arrow function
after parsing the parameter list, and so the ID assigned to the arrow function is
larger than the IDs assigned to functions defined in the parameter list. This
implies that we have to reset the function ID counter to before the parameter list
when re-parsing an arrow function. To be able to do this, we store the number of
function literals found in the parameter list of arrow functions as well.

BUG=v8:5589

Review-Url: https://codereview.chromium.org/2481163002
Cr-Commit-Position: refs/heads/master@{#41309}
2016-11-28 11:40:53 +00:00
yangguo
e1470db7a3 [debug] remove debug command processor from debug evaluate tests.
R=jgruber@chromium.org
BUG=v8:5510

Review-Url: https://codereview.chromium.org/2532893002
Cr-Commit-Position: refs/heads/master@{#41308}
2016-11-28 11:38:15 +00:00
marja
b31cbbd443 Parser: store parameters in a ThreadedList instead of ZoneList.
ThreadedList is more memory-efficient than ZoneList. This also enables
us to use ThreadedList when making Preparser track parameters (upcoming
work).

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2531593002
Cr-Commit-Position: refs/heads/master@{#41307}
2016-11-28 11:24:10 +00:00
jkummerow
0f48dc7cce Reland of [cleanup] CodeStubAssembler: s/compiler::Node/Node/
Reducing visual clutter.

No changes since previous attempt; this was only reverted because it blocked another revert.
Original review: https://codereview.chromium.org/2519093002/

TBR=ishell@chromium.org

Review-Url: https://codereview.chromium.org/2532063002
Cr-Commit-Position: refs/heads/master@{#41306}
2016-11-28 11:22:20 +00:00
cbruni
c81dbaf2b2 [tests] Skip RuntimeCallStatsTest due to flaky timers
R=machenbach@chromium.org
BUG=v8:5677
NOTRY=true

Review-Url: https://codereview.chromium.org/2528363002
Cr-Commit-Position: refs/heads/master@{#41305}
2016-11-28 10:51:20 +00:00
machenbach
1f74f551d0 [build] Link V8 as component in static library builds
BUG=v8:5435
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_dbg_ng;master.tryserver.chromium.android:android_clang_dbg_recipe

Review-Url: https://codereview.chromium.org/2373783002
Cr-Commit-Position: refs/heads/master@{#41304}
2016-11-28 10:42:21 +00:00
rmcilroy
195754cf31 [TurboFan] Always enable deoptimization for BytecodeGraphBuilder.
The BytecodeGraphBuilder assumes that deoptimization is always enabled,
so always enable it when compiling from bytecode.

BUG=chromium:668654

Review-Url: https://codereview.chromium.org/2531683004
Cr-Commit-Position: refs/heads/master@{#41303}
2016-11-28 10:29:52 +00:00
ahaas
5d5ccb6e45 [mjsunit] Change assertThrows such that it can check the exception message.
Up until now assertThrows allows to check the type field of an
exception, which is, however, a custom field introduced in a single
regression test. With the change assertThrows allows to check the
message field of an exception, which is set for standard V8 exceptions
by default.

I use the new assertThrows to refactor test/mjsunit/wasm/divrem-trap.js

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2525313003
Cr-Commit-Position: refs/heads/master@{#41302}
2016-11-28 10:26:44 +00:00
cbruni
a09e5eda26 [runtime] Add missing @@IsConcatSpreadable check for FAST_DOUBLE_ELEMENTS
A missing @@IsConcatSpreadable check caused the fast path inside the slow path
to be incorrect and follow the default concat strategy when the arguments
arrays contain only doubles.

BUG=chromium:668414

Review-Url: https://codereview.chromium.org/2527173002
Cr-Commit-Position: refs/heads/master@{#41301}
2016-11-28 10:06:17 +00:00
jochen
b1a49fc2c3 Only include debugger.gyp for isolation
R=yangguo@chromium.org,machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2529333002
Cr-Commit-Position: refs/heads/master@{#41300}
2016-11-28 10:03:17 +00:00
jgruber
a61585e9b2 [debug-wrapper] AsyncTaskEvent event type
AsyncTaskEvents are not exposed through the inspector interface.

BUG=v8:5530

Review-Url: https://codereview.chromium.org/2532693002
Cr-Commit-Position: refs/heads/master@{#41299}
2016-11-28 09:31:50 +00:00
bmeurer
65fd9c4306 [fullcodegen] Remove deprecated support for new.target and rest parameters.
This code is no longer used by full-codegen since all functions which
use new.target, rest parameters or the internal this function binding
now grow through Ignition first, and never tier up to fullcodegen.

BUG=v8:5657
R=rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2528293002
Cr-Commit-Position: refs/heads/master@{#41298}
2016-11-28 08:59:51 +00:00
machenbach
c69f8fbd78 [test] Don't run presubmit over deleted files.
BUG=v8:5603
NOTRY=true

Review-Url: https://codereview.chromium.org/2534813002
Cr-Commit-Position: refs/heads/master@{#41297}
2016-11-28 08:30:26 +00:00
machenbach
e96076ee42 [build] Landmine for flaky win compile problems.
BUG=chromium:668958
TBR=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2531183002
Cr-Commit-Position: refs/heads/master@{#41296}
2016-11-28 08:23:24 +00:00
bmeurer
ffdf474956 [turbofan] Add more typing rules for Array.prototype builtins.
For a couple of those Array builtins we can specify a useful type that
will help us to eliminate a couple of checks on their outputs.

R=yangguo@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2529233002
Cr-Commit-Position: refs/heads/master@{#41295}
2016-11-28 08:01:26 +00:00
bmeurer
ae14b6b721 [turbofan] Assign types to remaining builtins on String.prototype.
Assign types to the remaining builtins on the String.prototype where we
know a meaningful type, i.e. where the type is not dependent on some
callable function that is pass or loaded.

BUG=v8:5267
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2532463002
Cr-Commit-Position: refs/heads/master@{#41294}
2016-11-27 19:20:39 +00:00
rmcilroy
f666bff8d6 [asm] Don't try to always-opt code which has AsmWasm data.
If code has AsmWasm data we shouldn't try to optimize the JS as well, since
it will instead be optimized using the WASM data.

BUG=

Review-Url: https://codereview.chromium.org/2534463003
Cr-Commit-Position: refs/heads/master@{#41293}
2016-11-26 04:47:01 +00:00
ziyang
f5d373b012 PPC64: Changing test-spaces/SizeOfInitialHeap to accomodate 64K page size
Since the page size of PPC 64 bit machines is 64K, memory smaller than 64K
    cannot be freed causing the committed memory of code space to be
    exactly 2M. Changing the test case to accomodate this.

R=mlippautz@chromium.org, ulan@chromium.org, vogelheim@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2523293002
Cr-Commit-Position: refs/heads/master@{#41292}
2016-11-25 19:38:17 +00:00
bbudge
ef3f125d37 [Turbofan] Add ARM support for simd128 moves and swaps.
- Adds vmov, vswp instructions for QwNeonRegisters.
- Refactors existing vswp implementation, moves non-Neon adaption to
MacroAssembler.
- Adds simd128 support to CodeGenerator AssembleMove, AssembleSwap.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2523933002
Cr-Commit-Position: refs/heads/master@{#41291}
2016-11-25 19:37:04 +00:00
hpayer
2d3d66ab64 [heap] Use safe way to obtain page in PagedSpace::Contains(Address addr).
Review-Url: https://codereview.chromium.org/2531873003
Cr-Commit-Position: refs/heads/master@{#41290}
2016-11-25 17:08:14 +00:00
mlippautz
ecea1d1911 [heap] StaticNewSpaceVisitor: Add UNREACHABLE handlers for pre-tenured types
BUG=

Review-Url: https://codereview.chromium.org/2529113002
Cr-Commit-Position: refs/heads/master@{#41289}
2016-11-25 16:14:21 +00:00
mlippautz
0e74286133 [heap] Replace NewSpacePageRange with PageRange
Trivial parts of the reverted CL:
  https://codereview.chromium.org/2516303006/

BUG=

Review-Url: https://codereview.chromium.org/2531093002
Cr-Commit-Position: refs/heads/master@{#41288}
2016-11-25 15:44:32 +00:00
hpayer
618e8bef70 [heap] Remove unused PagedSpace::FindObject().
Review-Url: https://codereview.chromium.org/2531073002
Cr-Commit-Position: refs/heads/master@{#41287}
2016-11-25 15:18:00 +00:00
yangguo
552b480363 Presubmit should be able to handle files being deleted.
TBR=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2533583002
Cr-Commit-Position: refs/heads/master@{#41286}
2016-11-25 12:19:50 +00:00
jgruber
b034b71568 [js-perf-test] Add RegExp microbenchmarks
This adds microbenchmarks for:

* the RegExp constructor,
* flag accessors,
* and RegExp functions: exec, @@match, @@search, test, @@split, @@replace.

Each benchmark is further split to measure fast and slow paths.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2521263003
Cr-Commit-Position: refs/heads/master@{#41285}
2016-11-25 09:25:23 +00:00
marija.antic
daedefd3fc MIPS64: Port "Reland of "MIPS: Optimize load/store with large offset"".
Port 961a45da69

BUG=

Review-Url: https://codereview.chromium.org/2505923002
Cr-Commit-Position: refs/heads/master@{#41284}
2016-11-25 09:12:29 +00:00
yangguo
d5ada19ce7 [debug] mark more unused debug API as deprecated.
R=jgruber@chromium.org
BUG=v8:5510

Review-Url: https://codereview.chromium.org/2531543002
Cr-Commit-Position: refs/heads/master@{#41283}
2016-11-25 09:11:04 +00:00
rmcilroy
abf4c01d43 [fullcodegen] Remove deprecated support for class literals.
This code is no longer used in full-codegen or ast-graph-builder since all
functions which have class literals go through Ignition first.

BUG=v8:5657

Review-Url: https://codereview.chromium.org/2534463002
Cr-Commit-Position: refs/heads/master@{#41282}
2016-11-25 08:50:18 +00:00
jgruber
485067c66b [regexp] Add file-level typedefs to builtins-regexp.cc
This removes lots of boilerplate typedefs, with the caveat of renaming
CSA::Label and Variable to CLabel and CVariable within builtins-regexp.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2524363002
Cr-Commit-Position: refs/heads/master@{#41281}
2016-11-25 08:31:17 +00:00
yangguo
b6d2bacd66 Fix Number.prototype.toString with non-default radix wrt modulo.
TBR=tebbi@chromium.org
BUG=chromium:668510

Review-Url: https://codereview.chromium.org/2526223003
Cr-Commit-Position: refs/heads/master@{#41280}
2016-11-25 07:46:40 +00:00
mstarzinger
309b77f00d [fullcodegen] Remove exception handling support.
This removes support for try-catch as well as try-finally constructs
from the {FullCodeGenerator}. Consequently optimized code containing
such constructs must use the {BytecodeGraphBuilder} and can no longer
use the {AstGraphBuilder} for graph building.

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

Review-Url: https://codereview.chromium.org/2521233002
Cr-Commit-Position: refs/heads/master@{#41279}
2016-11-25 07:26:20 +00:00
clemensh
29ee62443d Revert of [base] Pass scalar arguments by value in CHECK/DCHECK (patchset #3 id:40001 of https://codereview.chromium.org/2524093002/ )
Reason for revert:
Seems to cause compile errors on Android. Will investigate on Monday.

Original issue's description:
> [base] Pass scalar arguments by value in CHECK/DCHECK
>
> This not only potentially improves performance, but also avoids weird
> linker errors, like the one below, where I used Smi::kMinValue in a
> DCHECK_EQ.
>
> > [421/649] LINK ./mksnapshot
> > FAILED: mksnapshot
> > src/base/logging.h|178| error: undefined reference to
>   'v8::internal::Smi::kMinValue'
>
> R=bmeurer@chromium.org, ishell@chromium.org
>
> Committed: https://crrev.com/76723502528c5af003fdffc3520632ea2a13fef3
> Cr-Commit-Position: refs/heads/master@{#41273}

TBR=bmeurer@chromium.org,ishell@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2527883004
Cr-Commit-Position: refs/heads/master@{#41278}
2016-11-24 23:03:16 +00:00
clemensh
0406620c6c Revert of [base] Define CHECK comparison for signed vs. unsigned (patchset #5 id:80001 of https://codereview.chromium.org/2526783002/ )
Reason for revert:
Need to revert previous CL because of Android compile error, and this one depends in it.

Original issue's description:
> [base] Define CHECK comparison for signed vs. unsigned
>
> The current CHECK/DCHECK implementation fails statically if a signed
> value is compared against an unsigned value. The common solution is to
> cast on each caller, which is tedious and error-prone (might hide bugs).
> This CL implements signed vs. unsigned comparisons by executing up to
> two comparisons. For example, if i is int32_t and u is uint_32_t, a
> DCHECK_LE(i, u) would create the check
> i <= 0 || static_cast<uint32_t>(i) <= u.
> For checks against constants, at least one of the checks can be removed
> by compiler optimizations.
>
> The tradeoff we have to make is to sometimes silently execute an
> additional comparison. And we increase code complexity of course, even
> though the usage is just as easy (or even easier) as before.
>
> The compile time impact seems to be minimal:
> I ran 3 full compilations for Optdebug on my local machine, one time on
> the current ToT, one time with this CL plus http://crrev.com/2524093002.
> Before: 143.72 +- 1.21 seconds
> Now: 144.18 +- 0.67 seconds
>
> In order to check that the new comparisons are working, I refactored
> some DCHECKs in wasm to use the new magic.
>
> R=bmeurer@chromium.org, titzer@chromium.org
>
> Committed: https://crrev.com/5925074a9dab5a8577766545b91b62f2c531d3dc
> Cr-Commit-Position: refs/heads/master@{#41275}

TBR=ishell@chromium.org,titzer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2531533003
Cr-Commit-Position: refs/heads/master@{#41277}
2016-11-24 19:51:09 +00:00
rmcilroy
4c14bbf97b [fullcodegen] Remove deprecated support for lookup variables, eval and with.
This code is no longer used by full-codegen since all functions which use with statments,
call eval or have lookup variable access now go through Ignition first.

BUG=v8:5657

Review-Url: https://codereview.chromium.org/2514393002
Cr-Commit-Position: refs/heads/master@{#41276}
2016-11-24 18:16:03 +00:00
clemensh
5925074a9d [base] Define CHECK comparison for signed vs. unsigned
The current CHECK/DCHECK implementation fails statically if a signed
value is compared against an unsigned value. The common solution is to
cast on each caller, which is tedious and error-prone (might hide bugs).
This CL implements signed vs. unsigned comparisons by executing up to
two comparisons. For example, if i is int32_t and u is uint_32_t, a
DCHECK_LE(i, u) would create the check
i <= 0 || static_cast<uint32_t>(i) <= u.
For checks against constants, at least one of the checks can be removed
by compiler optimizations.

The tradeoff we have to make is to sometimes silently execute an
additional comparison. And we increase code complexity of course, even
though the usage is just as easy (or even easier) as before.

The compile time impact seems to be minimal:
I ran 3 full compilations for Optdebug on my local machine, one time on
the current ToT, one time with this CL plus http://crrev.com/2524093002.
Before: 143.72 +- 1.21 seconds
Now: 144.18 +- 0.67 seconds

In order to check that the new comparisons are working, I refactored
some DCHECKs in wasm to use the new magic.

R=bmeurer@chromium.org, titzer@chromium.org

Review-Url: https://codereview.chromium.org/2526783002
Cr-Commit-Position: refs/heads/master@{#41275}
2016-11-24 17:53:37 +00:00
rmcilroy
49ea60ef9d [GC] Fix code flushing to use bytecode if it exists.
If code is flushed on a SFI, we can still use the bytecode if it was compiled,
since this never gets flushed.

This fixes a DCHECK where we were trying to compile the bytecode multiple
times after the baseline code was flushed.

BUG=chromium:668133

Review-Url: https://codereview.chromium.org/2526243002
Cr-Commit-Position: refs/heads/master@{#41274}
2016-11-24 17:27:04 +00:00
clemensh
7672350252 [base] Pass scalar arguments by value in CHECK/DCHECK
This not only potentially improves performance, but also avoids weird
linker errors, like the one below, where I used Smi::kMinValue in a
DCHECK_EQ.

> [421/649] LINK ./mksnapshot
> FAILED: mksnapshot
> src/base/logging.h|178| error: undefined reference to
  'v8::internal::Smi::kMinValue'

R=bmeurer@chromium.org, ishell@chromium.org

Review-Url: https://codereview.chromium.org/2524093002
Cr-Commit-Position: refs/heads/master@{#41273}
2016-11-24 17:26:02 +00:00
jkummerow
9be747666c Reland^2 of [stubs] KeyedStoreGeneric: inline dictionary property stores
For dictionary-mode receivers, the KeyedStoreGeneric stub can store
properties directly in most cases. Doing so avoids the need to have
an entry in the stub cache for every map/property combination.

Original review: https://codereview.chromium.org/2504403005/

Review-Url: https://codereview.chromium.org/2528883003
Cr-Commit-Position: refs/heads/master@{#41272}
2016-11-24 16:23:12 +00:00
verwaest
c4ccbaa3ea Fix zone in which temp-zone parsed data is allocated for the function scope on the boundary.
BUG=chromium:417697

Review-Url: https://codereview.chromium.org/2522223002
Cr-Commit-Position: refs/heads/master@{#41271}
2016-11-24 16:07:05 +00:00
jing.bao
c70a12449a [turbolizer] Fix distinguishing simplified nodes
BUG=

Review-Url: https://codereview.chromium.org/2523263003
Cr-Commit-Position: refs/heads/master@{#41270}
2016-11-24 15:32:42 +00:00
bjaideep
d5f253cc58 s390: preserve src register in MovIntToFloat
The conversion instr was being called twice and
the src register was not restored after the shift.

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

Review-Url: https://codereview.chromium.org/2527873003
Cr-Commit-Position: refs/heads/master@{#41269}
2016-11-24 15:06:47 +00:00
cbruni
4ec41c355c [elements] Add CreateFromArrayLike fast-path for JS_ARRAY_TYPE
Make apply calls with double array arguments such as
Math.min.apply(Math, [1.1, 2.2]) 1.6x faster.

Drive-by-fix: pass in the isolate to ElementsAccessor::GetImpl.

BUG=v8:4826

Review-Url: https://codereview.chromium.org/2521043005
Cr-Commit-Position: refs/heads/master@{#41268}
2016-11-24 14:48:29 +00:00
vogelheim
9d0f5ab745 Treat all functions in a 'comma sequence' the same for (pre-)parsing.
R=verwaest@chromium.org
BUG=v8:5643

Review-Url: https://codereview.chromium.org/2524263003
Cr-Commit-Position: refs/heads/master@{#41267}
2016-11-24 14:45:19 +00:00
vogelheim
56daccb836 Fix memory leak in cctest/parsing/test-scanner.
BUG=chromium:662388

Review-Url: https://codereview.chromium.org/2495533003
Cr-Commit-Position: refs/heads/master@{#41266}
2016-11-24 14:29:09 +00:00