Commit Graph

36704 Commits

Author SHA1 Message Date
adamk
45c1188792 [fullcodegen] Remove dead hole check logic
Variables requiring initialization are already forced into ignition,
so all the code supporting hole checks in full-codegen and
ast-graph-builder is dead.

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

Review-Url: https://codereview.chromium.org/2615033002
Cr-Commit-Position: refs/heads/master@{#42112}
2017-01-06 19:45:05 +00:00
adamk
02149d89a5 Include harmony-string-padding.js in the context snapshot
The attached chromium bug suggests that turning this on via a flag
regressed a perf test. Having previously run into slowdowns due
to experimental JS natives, my suspicion is that this regression
can be fixed by including the new builtins in the snapshot.
My intention is to land this patch to see if the regression
goes away on the bots.

Given the nature of this feature, it seems low-risk to remove
the runtime flag. If need be, it would be trivial to craft
a patch to remove these two methods from String.prototype
if we run into web compat issues during the release (note
that no release branch has yet picked up this feature).

BUG=v8:4954, chromium:677444

Review-Url: https://codereview.chromium.org/2610853010
Cr-Commit-Position: refs/heads/master@{#42111}
2017-01-06 18:56:00 +00:00
mtrofin
2c60a1facf [wasm] some const annotations
BUG=

Review-Url: https://codereview.chromium.org/2618743004
Cr-Commit-Position: refs/heads/master@{#42110}
2017-01-06 16:42:26 +00:00
gsathya
677bd40ea6 [promises] Add AllocatePromiseResolveThenableJobInfo to TF
Also moves most of the runtime function into TF. There are lots of
runtime calls but they happen only for the debug case so it's fine.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2611083002
Cr-Commit-Position: refs/heads/master@{#42109}
2017-01-06 15:29:09 +00:00
bjaideep
0a4f52972f PPC: fix smi compare in DoBoundsCheck
CmplSmiLiteral should be used to compare smi

R=joransiu@ca.ibm.com, jyan@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2614663009
Cr-Commit-Position: refs/heads/master@{#42108}
2017-01-06 14:41:09 +00:00
martyn.capewell
2bbcedb54e ARM: Remove unused variable
Remove unused size variable from disassembler.

BUG=

Review-Url: https://codereview.chromium.org/2615633004
Cr-Commit-Position: refs/heads/master@{#42107}
2017-01-06 13:45:30 +00:00
littledan
32c1a7933c [test] Presumbit check against missing tests in status files
Our test infrastructure ignores missing tests which are listed in
status files. Sometimes, tests are removed and status file lines
are not updated. This patch adds a presubmit check for status
files addressing JavaScript tests to not reference missing tests.
It also cleans up existing violations.

R=machenbach

Review-Url: https://codereview.chromium.org/2610353002
Cr-Commit-Position: refs/heads/master@{#42106}
2017-01-06 10:13:43 +00:00
mtrofin
a6402fd916 [wasm] Decoder had 2 representations for "end".
Removing "limit_", using just "end_".

BUG=

Review-Url: https://codereview.chromium.org/2613193002
Cr-Commit-Position: refs/heads/master@{#42105}
2017-01-06 08:02:10 +00:00
v8-autoroll
c8d8bf2150 Update V8 DEPS.
Rolling v8/build: 9cde9c9..87eca92

Rolling v8/tools/clang: 0ec6dce..5b3c04d

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

Review-Url: https://codereview.chromium.org/2619503002
Cr-Commit-Position: refs/heads/master@{#42104}
2017-01-06 04:27:02 +00:00
adamk
b54c825fd1 [cleanup] Remove unused runtime error functions/messages
R=gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2612373002
Cr-Commit-Position: refs/heads/master@{#42103}
2017-01-05 23:46:50 +00:00
gsathya
a40b7172fe [ESnext] Implement Object spread
This patch adds parsing of spread object property.

-- Changes ParsePropertyName to parse Token::ELLIPSIS.
-- Throws if rest is encountered by setting a pattern error.
-- Adds a new PropertyKind enum (SPREAD)
-- Adds a new ObjectLiteralProperty::kind (SPREAD)
-- Adds a new harmony-object-spread flag and protects the parser code
with it.
-- Adds a new runtime function called CopyDataProperties
-- Does not add any support for this feature in fullcodegen.
-- Ignition calls out to a runtime function CopyDataProperties to
perform spread operation.
-- Move FastAssign from builtins-objects.cc to objects.cc
-- Refactor Builtin_ObjectAssign to use SetOrCopyDataProperties

Object rest will be implemented in a follow on patch.

BUG=v8:5549

Review-Url: https://codereview.chromium.org/2606833002
Cr-Commit-Position: refs/heads/master@{#42102}
2017-01-05 23:44:25 +00:00
jyan
a5a376c530 s390: remove redundant instr in loadrepresentation
R=joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2617733003
Cr-Commit-Position: refs/heads/master@{#42101}
2017-01-05 23:13:03 +00:00
jyan
95040300ee s390: fix smi compare in DoBoundsCheck
CmpLogicalP only compares lower 32-bit, but smi is in upper 32-bit

R=joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2611193002
Cr-Commit-Position: refs/heads/master@{#42100}
2017-01-05 21:00:30 +00:00
jyan
130e12d020 [turbofan] Fix shift_left/right in unittest
x86 automatically truncates the shift amount to be 5-bits. But not
all architectures do that.

R=rossberg@chromium.org, jarin@chromium.org, joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2616743002
Cr-Commit-Position: refs/heads/master@{#42099}
2017-01-05 18:43:31 +00:00
adamk
3166d4293e [ignition] Avoid unnecessary ToName calls in VisitClassLiteralProperties
R=rmcilroy@chromium.org
BUG=v8:5799

Review-Url: https://codereview.chromium.org/2612903002
Cr-Commit-Position: refs/heads/master@{#42098}
2017-01-05 18:25:25 +00:00
adamk
1bc48138a6 [class fields] Remove a bit of dead code leftover from cleanup
R=littledan@chromium.org
BUG=v8:5367

Review-Url: https://codereview.chromium.org/2611063002
Cr-Commit-Position: refs/heads/master@{#42097}
2017-01-05 18:11:37 +00:00
adamk
6e0796c2b9 [fullcodegen] Remove unused EmitPropertyKey method
R=bmeurer@chromium.org
BUG=v8:5657

Review-Url: https://codereview.chromium.org/2609863006
Cr-Commit-Position: refs/heads/master@{#42096}
2017-01-05 18:02:52 +00:00
jochen
58afa27beb Disable non-predictable wasm/gc-frame test
TBR=machenbach@chromium.org
BUG=5803

Review-Url: https://codereview.chromium.org/2611143002
Cr-Commit-Position: refs/heads/master@{#42095}
2017-01-05 16:03:20 +00:00
rdevlin.cronin
2804502615 [V8] Run clang-tidy performance-for-range-copy check on src/
BUG=None

Review-Url: https://codereview.chromium.org/2609173005
Cr-Commit-Position: refs/heads/master@{#42094}
2017-01-05 16:01:54 +00:00
jochen
12d20bdd31 Add v8_enable_verify_predictable gn args (mirroring the gyp var)
R=machenbach@chromium.org
BUG=chromium:645890

Review-Url: https://codereview.chromium.org/2614983002
Cr-Commit-Position: refs/heads/master@{#42093}
2017-01-05 15:01:30 +00:00
epertoso
c16ca32e5f Revert of [turbofan] Improve codegen for 8- and 16-bit memory comparisons on Intel platforms (patchset #3 id:40001 of https://codereview.chromium.org/2605863002/ )
Reason for revert:
Breaks wasm benchmark (http://crbug.com/v8/5798).

Original issue's description:
> [turbofan] Improve codegen for 8- and 16-bit memory comparisons on Intel platforms
>
> Recognize and emit in-memory comparisons of 8-bit and 16-bit values with
> immediate values that fit.
>
> LOG=N
> R=epertoso@chromium.org
>
> Review-Url: https://codereview.chromium.org/2605863002
> Cr-Commit-Position: refs/heads/master@{#41971}
> Committed: be11812c53

TBR=danno@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.

Review-Url: https://codereview.chromium.org/2618443003
Cr-Commit-Position: refs/heads/master@{#42092}
2017-01-05 14:58:01 +00:00
jochen
a5440323a2 Add a flag for printf debugging the compiler dispatcher
BUG=v8:5215
R=vogelheim@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2618503002
Cr-Commit-Position: refs/heads/master@{#42091}
2017-01-05 12:28:26 +00:00
jochen
e2d2dd5318 Disable automatic handling of SEH exceptions in gtest
This turns hangs on win_dbg into actually crashes

R=machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2613033002
Cr-Commit-Position: refs/heads/master@{#42090}
2017-01-05 12:22:26 +00:00
jochen
48b06536a7 When resetting compile jobs, delete the zone last
The destructors of the parse info, compile info, and compilation job
might still access the zone

BUG=none
R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2616883003
Cr-Commit-Position: refs/heads/master@{#42089}
2017-01-05 12:11:06 +00:00
leszeks
68f1a37f8e [turbofan] Sparse representation for state values
Add a more efficient encoding for state values that have a large number of
optimized-out inputs.

Review-Url: https://codereview.chromium.org/2509623002
Cr-Commit-Position: refs/heads/master@{#42088}
2017-01-05 10:44:44 +00:00
marja
8bb2501e7f PreParsing inner funcs: declare arrow function parameters.
This makes the context allocation less pessimistic in case of name
clash.

This is also required for being able to skip inner functions.

BUG=v8:5501, v8:5516

Review-Url: https://codereview.chromium.org/2610823003
Cr-Commit-Position: refs/heads/master@{#42087}
2017-01-05 09:38:03 +00:00
jochen
4692d96f74 Fix building simple_fuzzer with v8_static_library
We can't have "main" in a static library. so just include the small
fuzzer.cc in all simple fuzzers

BUG=none
R=machenbach@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2608243005
Cr-Commit-Position: refs/heads/master@{#42086}
2017-01-05 09:27:40 +00:00
bmeurer
0957241060 [crankshaft] Fix abstract equality for receivers.
We need to check both sides for abstract equality of receivers in optimized
code, otherwise we don't handle implicit conversions and undetectable
objects correctly.

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

Review-Url: https://codereview.chromium.org/2612213002
Cr-Commit-Position: refs/heads/master@{#42085}
2017-01-05 09:26:30 +00:00
jochen
10453e85d4 Abort running compiler dispatcher tasks under memory pressure
BUG=v8:5215
R=marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2608163006
Cr-Commit-Position: refs/heads/master@{#42084}
2017-01-05 09:22:34 +00:00
franzih
b371b0b7e7 [runtime] Use DCHECK_EQ instead of DCHECK for number of args.
BUG=

Review-Url: https://codereview.chromium.org/2613723002
Cr-Commit-Position: refs/heads/master@{#42083}
2017-01-05 08:22:15 +00:00
franzih
81736c7161 [runtime] Collect IC feedback in DefineDataPropertyInLiteral.
Add a feedback vector slot for computed property names in object
and class literals. Introduce new slot kind for storing
computed property names.

Change StaDataPropertyInLiteral to use the accumulator (again), so
we don't exceed Bytecodes::kMaxOperands.

We assume that most computed property names are
symbols. Therefore we should see performance
improvements, even if we deal with monomorphic ICs only.

This CL only collects feedback but does not use
it in Reduce() yet.

BUG=v8:5624

Review-Url: https://codereview.chromium.org/2587393006
Cr-Commit-Position: refs/heads/master@{#42082}
2017-01-05 07:30:01 +00:00
zhengxing.li
c4e0b15981 X87: [Ignition] Teach CompileLazy about interpreted functions.
port 72c370767226cf573d316655b1d3e3d3d699cc9b(r42034)

  original commit message:
  Currently the CompileLazy builtin checks the SFI expliciltly for FCG code. This means
  if the SFI has bytecode we have to go through to the runtime to install the
  interpreter entry trampoline into the JSFunction object.

  Modify the builtin to always put the SFI code object into the JSFunction unless it's
  the lazy compile stub on the SFI as well.

BUG=

Review-Url: https://codereview.chromium.org/2614533003
Cr-Commit-Position: refs/heads/master@{#42081}
2017-01-05 07:07:40 +00:00
zhengxing.li
07a6449fb7 X87: [ic] Use StrictEqual/Equal builtins for CompareIC slow path.
port d3ed71ed87426046afe8938592588eeaa92ec7a9(r42021)

  original commit message:
  Don't fallback to the %StrictEqual / %Equal runtime functions for the
  generic CompareIC slow path, but use the (new) StrictEqual and Equal
  builtins instead. This avoids a performance cliff when mixing input
  types for strict equality sites.

BUG=

Review-Url: https://codereview.chromium.org/2612693002
Cr-Commit-Position: refs/heads/master@{#42080}
2017-01-05 06:54:03 +00:00
v8-autoroll
a2e88aab0f Update V8 DEPS.
Rolling v8/build: dd74acb..9cde9c9

Rolling v8/third_party/catapult: a067dd2..9e6944a

Rolling v8/tools/clang: 432074b..0ec6dce

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

Review-Url: https://codereview.chromium.org/2617683002
Cr-Commit-Position: refs/heads/master@{#42079}
2017-01-05 04:21:05 +00:00
mtrofin
9e5a064197 [tools] Include full benchmark measurement name in error reporting
For benchmarks with multiple measurements (e.g. runtime, compile
time, generated code size), in case of error, we'd get only the
last portion of the name ("Compile"), which is ambiguous and makes
debugging dificult. This change includes the full name, e.g.
"Unity/Physics/Compile".

BUG=

Review-Url: https://codereview.chromium.org/2615623003
Cr-Commit-Position: refs/heads/master@{#42078}
2017-01-04 23:36:06 +00:00
jyan
731af7a488 s390: optimize MathSqrt
R=joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2615683003
Cr-Commit-Position: refs/heads/master@{#42077}
2017-01-04 23:21:43 +00:00
adamk
e968595b42 Move all Symbol.species setup for builtin constructors to bootstrapper
This lets us share Builtins::kReturnReceiver, so should
every-so-slightly reduce the size of the context snapshot.

R=gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2614623003
Cr-Commit-Position: refs/heads/master@{#42076}
2017-01-04 23:19:27 +00:00
gsathya
79ae8f1744 [promises] Move Promise.resolve to TF
Add a more low level BranchIfFastPath to take the native_context and
promise_fun as args and change the existing one to use this.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2592933004
Cr-Commit-Position: refs/heads/master@{#42075}
2017-01-04 22:36:59 +00:00
adamk
e878ea9dce [cleanup] Remove unused JS helper utils.InstallGetterSetter
R=gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2615733002
Cr-Commit-Position: refs/heads/master@{#42074}
2017-01-04 22:04:11 +00:00
gsathya
a18de9cfa8 [promises] Move PromiseFulfill to TF
BUG=v8:5343

Review-Url: https://codereview.chromium.org/2614603003
Cr-Commit-Position: refs/heads/master@{#42073}
2017-01-04 21:59:06 +00:00
adamk
3e20d381ed [ignition] Only initialize [[HomeObject]] for class constructors if needed
This moves the initialization of [[HomeObject]] for constructors from
the %DefineClass runtime function into the bytecode generator, and
makes it conditional (resolving an old TODO). As part of this refactor,
avoid a load of "prototype" by returning the class prototype from
%DefineClass.

This is one of many steps in moving more of class definition into
bytecode.

R=rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2610683003
Cr-Commit-Position: refs/heads/master@{#42072}
2017-01-04 19:15:26 +00:00
rdevlin.cronin
f81590a1c8 Remove unnecessary v8:: prefixes in include/v8.h
Remove a bunch of unnecessary v8:: prefixes in include/v8.h.
Some are still necessary for disambiguation purposes (e.g., between
bool Value() and v8::Value, or between v8::Isolate and
v8::internal::Isolate), but many aren't.

BUG=None

Review-Url: https://codereview.chromium.org/2605103003
Cr-Commit-Position: refs/heads/master@{#42071}
2017-01-04 17:07:07 +00:00
gsathya
81dc09fb98 [csa] Refactor promises API
This removes all the promise allocation related methods from the CSA
and moves them PromiseBuiltinsAssembler with some edits.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2604273003
Cr-Commit-Position: refs/heads/master@{#42070}
2017-01-04 17:00:48 +00:00
gsathya
ba66892332 [promises] Remove unused runtime calls
R=adamk@chromium.org, littledan@chromium.org

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2609853004
Cr-Commit-Position: refs/heads/master@{#42069}
2017-01-04 16:59:38 +00:00
jochen
e426fdd52b Implement async AbortAll for the compiler dispatcher
BUG=v8:5215
R=marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2615603002
Cr-Commit-Position: refs/heads/master@{#42068}
2017-01-04 13:45:56 +00:00
clemensh
20defd29e0 [asm.js] [inspector-test] Avoid breakpoint on "use asm" statement
Ignition does not emit any byte code for some literal expression
statements, so avoid testing for it.

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

Review-Url: https://codereview.chromium.org/2612013002
Cr-Commit-Position: refs/heads/master@{#42067}
2017-01-04 13:29:35 +00:00
tebbi
5662f99b99 [turbofan] Teach escape analysis about StringCharAt
R=bmeurer@chromium.org
BUG=chromium:677757

Review-Url: https://codereview.chromium.org/2606383005
Cr-Commit-Position: refs/heads/master@{#42066}
2017-01-04 12:01:38 +00:00
marja
11d13027e8 PreParsing inner funcs: Do fewer variable name lookups.
It's unnecessarily to first lookup and then insert.

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2608333003
Cr-Commit-Position: refs/heads/master@{#42065}
2017-01-04 11:58:20 +00:00
danno
fcffcba725 Fix empty push bug in Array.push
BUG=chromium:670981
LOG=N
R=ishell@chromium.org

Review-Url: https://codereview.chromium.org/2609973002
Cr-Commit-Position: refs/heads/master@{#42064}
2017-01-04 10:57:26 +00:00
bmeurer
2a60fd49db [turbofan] Recognize and optimize flooring integer division.
Recognize the special

  NumberFloor(NumberDivide(lhs, rhs))

subgraph in TypedOptimization, where both lhs and rhs are in the
Unsigned32 range, and the result is a PlainNumber, and replace the
NumberFloor with a NumberToUint32 truncation.

This could be done in a cleaner way if we have a dedicated type for all
double values in the Unsigned32 range, but that would complicate the
type system quite a bit.

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

Review-Url: https://codereview.chromium.org/2614663002
Cr-Commit-Position: refs/heads/master@{#42063}
2017-01-04 10:24:48 +00:00