Commit Graph

32588 Commits

Author SHA1 Message Date
yangguo
986814218b Native try-catch syntax parsing should not crash.
R=littledan@chromium.org
BUG=chromium:630559

Review-Url: https://codereview.chromium.org/2176613002
Cr-Commit-Position: refs/heads/master@{#37996}
2016-07-25 05:32:28 +00:00
bmeurer
e3e347b85c [turbofan] Remove overly restrictive DCHECK.
The dead code elimination in SimplifiedLowering can eliminate pure nodes
if they don't have value uses. But some of those can indeed have control
inputs, i.e. Phi nodes do of course have a control input.

R=jarin@chromium.org
BUG=chromium:630923

Review-Url: https://codereview.chromium.org/2177133002
Cr-Commit-Position: refs/heads/master@{#37995}
2016-07-25 05:22:19 +00:00
jarin
a81d19d583 [turbofan] Handle impossible types (Type::None()) in the backend.
BUG=chromium:630611

Review-Url: https://codereview.chromium.org/2177483002
Cr-Commit-Position: refs/heads/master@{#37994}
2016-07-25 04:02:58 +00:00
cbruni
7ede61ed1d [elements] Omit fast path in PrependElementIndices
In PrependElementIndicesImpl we sort a FixedArray of indices potentially
containing HeapNumbers. During the string conversion we might trigger a GC.
This in turn might try to read a slot where we previously had a HeapNumber
but the sort sneaked a SMI in there which is not a valid pointer.

BUG=chromium:630561

Review-Url: https://codereview.chromium.org/2173653003
Cr-Commit-Position: refs/heads/master@{#37993}
2016-07-23 12:16:14 +00:00
v8-autoroll
348f69344c Update V8 DEPS.
Rolling v8/build to 2c67d4d74b6b3673228fab191918500a582ef3b0

Rolling v8/third_party/android_tools to e4d61eb8f463e6cb8d1e1269a15c22f7c9bbd122

Rolling v8/tools/clang to 496622ab4aaa5be7e5a9b80617013cb02f45dc87

Rolling v8/tools/mb to 0c4dc43c454f26936ddf3074ab8e9a41e3dc03a3

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

Review-Url: https://codereview.chromium.org/2173293002
Cr-Commit-Position: refs/heads/master@{#37992}
2016-07-23 03:22:20 +00:00
bjaideep
aed69fd919 PPC/s390: [turbofan] Change Float64Max/Float64Min to JavaScript semantics.
Port ba092fb09a

Original commit message:

    So far we don't have a useful way to inline Math.max or Math.min in
    TurboFan optimized code. This adds new operators NumberMax and NumberMin
    and changes the Float64Max/Float64Min operators to have JavaScript
    semantics instead of the C++ semantics that it had previously.

    This also removes support for recognizing the tenary case in the
    CommonOperatorReducer, since that doesn't seem to have any positive
    impact (and actually doesn't show up in regular JavaScript, where
    people use Math.max/Math.min instead).

    Drive-by-fix: Also nuke the unused Float32Max/Float32Min operators.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2179503003
Cr-Commit-Position: refs/heads/master@{#37991}
2016-07-23 01:10:13 +00:00
adamk
f77d1bfc36 Remove redundant Scope book-keeping
The uses_arguments() bool is not needed for correct
behavior, since that same information is available after scope analysis
based on whether we allocated the Scope::arguments_ var.

BUG=v8:5209

Review-Url: https://codereview.chromium.org/2168293002
Cr-Commit-Position: refs/heads/master@{#37990}
2016-07-22 23:50:53 +00:00
adamk
e9dea58fa2 Rescope arrow-function parameter lists by moving the delta to the parameter scope
This replaces the AstVisitor approach for scope rewriting with a Scope-only
solution, using a new Scope::Snapshot object that keeps track of inner scopes,
unresolved variables, and temps.

The only use of the AstVisitor is now for parameter varblock scopes introduced
due to sloppy eval in parameters, which greatly simplifies the rewriter
as it no longer needs to handle temps. A future CL may be able to
eliminate it altogether by taking a snapshot per function argument.

Based on verwaest's https://codereview.chromium.org/2166023002/.

BUG=v8:5226

Review-Url: https://codereview.chromium.org/2171703004
Cr-Commit-Position: refs/heads/master@{#37989}
2016-07-22 23:30:50 +00:00
ivica.bogosavljevic
580fdf3c05 Implement UnaligedLoad and UnaligedStore turbofan operators.
Implement UnalignedLoad and UnalignedStore optional
turbofan operators and use them in WasmCompiler for unaligned
memory access.

BUG=

Review-Url: https://codereview.chromium.org/2122853002
Cr-Commit-Position: refs/heads/master@{#37988}
2016-07-22 20:56:24 +00:00
caitp
122a9b7af0 [builtins] take slow path in IsConcatSpreadable if proxy in prototype
BUG=v8:5134
R=cbruni@chromium.org, littledan@chromium.org, neis@chromium.org

Review-Url: https://codereview.chromium.org/2131383002
Cr-Commit-Position: refs/heads/master@{#37987}
2016-07-22 18:43:19 +00:00
mark
7883414e8b Revert "Enable v8 backtrace support in all debug builds"
This reverts commit 3138862703.

BUG=chromium:630629

Review-Url: https://codereview.chromium.org/2171373002
Cr-Commit-Position: refs/heads/master@{#37986}
2016-07-22 18:15:40 +00:00
littledan
9f45c188dd [test262] Use standalone Test262 harness project
TC-39 recently decided to remove the Python-based testing harness from the
Test262 project [1]. The code has been duplicated in a standalone project;
update V8's dependencies to fetch from that new location. This is based on
an earlier patch by Mike Pennisi.

[1] 2b9722db9b/es7/2016-05/may-25.md

BUG=v8:5078

Review-Url: https://codereview.chromium.org/2131743002
Cr-Commit-Position: refs/heads/master@{#37985}
2016-07-22 15:25:32 +00:00
vogelheim
54f663e2f2 Revert of Re-land "Fix double-building of v8 in GN builds" (patchset #2 id:20001 of https://codereview.chromium.org/2171083003/ )
Reason for revert:
Reverted, because it breaks some funky android build.

Can reproduce breakage locally, w/ args.gn as follows:
disable_brotli_filter = true
disable_file_support = true
disable_ftp_support = true
enable_websockets = false
ffmpeg_branding = "Chrome"
is_component_build = false
is_debug = true
proprietary_codecs = true
symbol_level = 1
target_cpu = "x86"
target_os = "android"
use_goma = true
use_platform_icu_alternatives = true

This ends up building the mkpeephole tool w/ an architecture that won't run on the build machine.

Original issue's description:
> Re-land "Fix double-building of v8 in GN builds"
>
> This re-lands r37926 w/ the needed fix for cross-compiles; we
> can only re-use the default toolchain when the host can actually
> run it.
>
> R=machenbach@chromium.org
> BUG=629825
>
> Committed: https://crrev.com/5b762044b53f988fa9a534fe1a84f9938b3abd75
> Cr-Commit-Position: refs/heads/master@{#37970}

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

Review-Url: https://codereview.chromium.org/2175693003
Cr-Commit-Position: refs/heads/master@{#37984}
2016-07-22 13:22:21 +00:00
ishell
45f990c34f [ic] Remove unused ICStateField.
BUG=chromium:619016

Review-Url: https://codereview.chromium.org/2139373002
Cr-Commit-Position: refs/heads/master@{#37983}
2016-07-22 13:22:20 +00:00
jochen
cfdc8786e7 Add out.gn to .gitignore
TBR=machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2174613003
Cr-Commit-Position: refs/heads/master@{#37982}
2016-07-22 12:42:45 +00:00
cbruni
5afb2f7a12 [runtime] cleanup: use the factory() for handlified values
BUG=

Review-Url: https://codereview.chromium.org/2163823004
Cr-Commit-Position: refs/heads/master@{#37981}
2016-07-22 12:26:03 +00:00
jochen
b5b9dd730a Introduce a holder for compile jobs
Next step will be to add methods for parsing and then compiling.

BUG=v8:5215
R=marja@chromium.org

Review-Url: https://codereview.chromium.org/2171323002
Cr-Commit-Position: refs/heads/master@{#37980}
2016-07-22 12:22:37 +00:00
jochen
f4e142d1df Update heap constants from ToT
BUG=
R=hpayer@chromium.org

Review-Url: https://codereview.chromium.org/2171313002
Cr-Commit-Position: refs/heads/master@{#37979}
2016-07-22 11:49:17 +00:00
jgruber
89403e0316 Omit frames up to new target in Error constructor
BUG=v8:5216
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2175603003
Cr-Commit-Position: refs/heads/master@{#37978}
2016-07-22 11:45:50 +00:00
yangguo
871bb72897 Import inspector_protocol via DEPS.
This is not in use yet, but will be soon.

R=jochen@chromium.org, machenbach@chromium.org
BUG=chromium:580337

Review-Url: https://codereview.chromium.org/2175653002
Cr-Commit-Position: refs/heads/master@{#37977}
2016-07-22 11:29:08 +00:00
klaasb
220284638e [interpreter] Add a register operand to ToNumber
ToNumber's result is always directly stored to a register using a Star
bytecode. Fuse it into ToNumber.

BUG=v8:4280
LOG=n

Review-Url: https://codereview.chromium.org/2165953002
Cr-Commit-Position: refs/heads/master@{#37976}
2016-07-22 10:26:12 +00:00
jgruber
c8a0dce96c Begin porting CallSite to C++
Review-Url: https://codereview.chromium.org/2158303002
Cr-Commit-Position: refs/heads/master@{#37975}
2016-07-22 10:12:42 +00:00
jgruber
428dde9ac7 Move StringMatch to String::IndexOf
This will get a new call site in an upcoming commit, move it to String
so it's accessible from without runtime-strings.cc.

BUG=

Review-Url: https://codereview.chromium.org/2176553002
Cr-Commit-Position: refs/heads/master@{#37974}
2016-07-22 09:52:29 +00:00
rmcilroy
1df29e190f [Turbofan] Fix a race on CallInterfaceDescriptor initialization.
The effect control linearizer runs off-thread and needs the ToNumber
call descriptor. Add a hack to create this on the main thread to
ensure off-thread's don't race on it's construction. Also add a
DCHEK to the CallInterfaceDescriptor to ensure they are always
initilaized on the main thread.

Review-Url: https://codereview.chromium.org/2168843003
Cr-Commit-Position: refs/heads/master@{#37973}
2016-07-22 09:42:31 +00:00
hablich
06bfc8421b [Release] Update merge script to leverage auto-tag bot
The auto-tag bot removes the need to handle version changes
in each merge individually. As a result this 'feature' is
removed.

BUG=v8:4408
R=machenbach@chromium.org
LOG=N
NOTRY=true

Review-Url: https://codereview.chromium.org/1398033003
Cr-Commit-Position: refs/heads/master@{#37972}
2016-07-22 09:29:05 +00:00
bmeurer
ba092fb09a [turbofan] Change Float64Max/Float64Min to JavaScript semantics.
So far we don't have a useful way to inline Math.max or Math.min in
TurboFan optimized code. This adds new operators NumberMax and NumberMin
and changes the Float64Max/Float64Min operators to have JavaScript
semantics instead of the C++ semantics that it had previously.

This also removes support for recognizing the tenary case in the
CommonOperatorReducer, since that doesn't seem to have any positive
impact (and actually doesn't show up in regular JavaScript, where
people use Math.max/Math.min instead).

Drive-by-fix: Also nuke the unused Float32Max/Float32Min operators.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2170343002
Cr-Commit-Position: refs/heads/master@{#37971}
2016-07-22 08:25:11 +00:00
dpranke
5b762044b5 Re-land "Fix double-building of v8 in GN builds"
This re-lands r37926 w/ the needed fix for cross-compiles; we
can only re-use the default toolchain when the host can actually
run it.

R=machenbach@chromium.org
BUG=629825

Review-Url: https://codereview.chromium.org/2171083003
Cr-Commit-Position: refs/heads/master@{#37970}
2016-07-22 08:21:32 +00:00
jgruber
4feafee9d9 Eagerly format traces in captureStackTrace
This allows us to skip complicated logic for setting the accessors.

BUG=

Review-Url: https://codereview.chromium.org/2164903004
Cr-Commit-Position: refs/heads/master@{#37969}
2016-07-22 08:14:50 +00:00
yangguo
76c4b6ef6c Fix gcc build.
NOTRY=true
TBR=littledan@chromium.org

Review-Url: https://codereview.chromium.org/2171233002
Cr-Commit-Position: refs/heads/master@{#37968}
2016-07-22 07:48:22 +00:00
hpayer
b008a0d5a3 [heap] Remove black pages and use black areas instead.
BUG=630386
LOG=n

Review-Url: https://codereview.chromium.org/2160613002
Cr-Commit-Position: refs/heads/master@{#37967}
2016-07-22 07:02:24 +00:00
yangguo
6d0a420298 [debug] use catch prediction flag for promise rejections.
This is in preparation to implementing exception prediction for async
functions.  Each handler table entry can now predict "caught", "uncaught", or
"promise". The latter indicates that the exception will lead to a promise
rejection.

To mark the relevant try-catch blocks, we add a new native syntax.
try { } %catch (e) { } indicates a TryCatchStatement with the "promise"
prediction.

The previous implementation of using the function to tell the relevant
try-catch apart from inner try-catch blocks will not work for async functions
since these can have inner try-catch blocks inside the same function.

BUG=v8:5167

Review-Url: https://codereview.chromium.org/2161263003
Cr-Commit-Position: refs/heads/master@{#37966}
2016-07-22 06:04:54 +00:00
bmeurer
085ec5c25f [turbofan] Improve lowering for NumberAbs to Int32Abs.
We can compute the absolute integer value w/o any conditional execution
by using the bit trick formula

  let sign = input >> 31 in
  (input ^ sign) - sign

which generates fairly decent code on all supported architectures.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2169293002
Cr-Commit-Position: refs/heads/master@{#37965}
2016-07-22 04:34:45 +00:00
v8-autoroll
7b5f56ca60 Update V8 DEPS.
Rolling v8/build to 5782f1c84fc41934d265f69e5bd61badbf61e5c5

Rolling v8/tools/mb to c0f2da01e7e7e530fcbbf3823b7c7655632f05b1

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

Review-Url: https://codereview.chromium.org/2171153002
Cr-Commit-Position: refs/heads/master@{#37964}
2016-07-22 03:30:06 +00:00
zhengxing.li
abff40a485 X87: [fullcodegen] [crankshaft] Avoid jumping to the runtime for ForInFilter.
port 4b59bf5313 (r37934)

  original commit message:
  Use the ForInFilterStub directly. Hence we will only jump to the runtime for
  special receivers (instance_type <= LAST_SPECIAL_RECEIVER_TYPE) and for
  converting element indices which are not in the string cache.

BUG=

Review-Url: https://codereview.chromium.org/2176473002
Cr-Commit-Position: refs/heads/master@{#37963}
2016-07-22 03:13:21 +00:00
zhengxing.li
277838b1f0 X87: Reland of [builtins] Introduce a builtin for Abort().
port 66cb026f4a (r37929)

  original commit message:
  Original message:

  Calling Runtime::kAbort through a builtin instead of the c-entry stub
  will allow to generate the call in a background thread, because a
  builtin provides its own handle, whereas a code stub does not.

  @v8-mips-ports: Could you take a special look at the padding that is
  done in MacroAssembler::Abort()?

  Reason for revert:
  The reason for reverting is: Blocks roll:
  https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20debug/builds/1622

  The problem was that on arm64 the builtin for Abort() contained a call to
  Abort(). The problem is fixed by using a NoUseRealAbortsScope in the
  code generation of Abort().

BUG=

Review-Url: https://codereview.chromium.org/2172093002
Cr-Commit-Position: refs/heads/master@{#37962}
2016-07-22 02:43:38 +00:00
ritesht
b887013712 Revert "[wasm] Adding a convolution matrix filter test to highlight the performance advantages of JITing"
GC-Stress asserts in filter-jit.

This reverts commit ccfd224ec3.

BUG=v8:5044
R=bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2168343002
Cr-Commit-Position: refs/heads/master@{#37961}
2016-07-22 02:10:44 +00:00
bjaideep
0145ba864b PPC: [ic] [stubs] Don't use Code::flags in megamorphic stub cache hash computations.
Port 8aeb7439c9

     Fix for ppc file, using macro functions to xor and add to
     handle the case when kPrimaryMagic/kSecondaryMagic is > 16bits.

R=ishell@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2169183002
Cr-Commit-Position: refs/heads/master@{#37960}
2016-07-22 01:44:28 +00:00
jwolfe
3cfd80d6a2 Adjust whitespace to make tests oblivious to --harmony-function-tostring
See discussion in https://codereview.chromium.org/2156303002/#msg8

With the new --harmony-function-tostring behavior, these tests would
fail without this change. This change makes the tests pass regardless
of whether or not --harmony-function-tostring is used.

All of these changes are simply inserting a space after the "function"
keyword to match the current function toString behavior. When
--harmony-function-tostring is enabled, the toString behavior matches
the spacing used in the function declaration. With the declaration
matching the current formatting, the toString behavior becomes
unaffected by --harmony-function-tostring.

BUG=v8:4958
LOG=n

Review-Url: https://codereview.chromium.org/2161413002
Cr-Commit-Position: refs/heads/master@{#37959}
2016-07-22 00:18:41 +00:00
adamk
88707c98b4 [cleanup] Remove some leftover strong mode code from the parser
R=littledan@chromium.org

Review-Url: https://codereview.chromium.org/2172723003
Cr-Commit-Position: refs/heads/master@{#37958}
2016-07-21 22:53:00 +00:00
ritesht
ccfd224ec3 [wasm] Adding a convolution matrix filter test to highlight the performance advantages of JITing
This cl also fixes two bugs in the previous code:
    1) JITed functions were not allowed access to the heap because the module instance wasn't correctly synthesized. This wasn't discovered in the previous test.
    2) Decoding of functions with the JITSingleFunction opcode was off by 1 as the length of the opcode wasn't computed correctly.
BUG=5044

Review-Url: https://codereview.chromium.org/2168183002
Cr-Commit-Position: refs/heads/master@{#37957}
2016-07-21 22:39:41 +00:00
bjaideep
e6d12302e5 PPC/s390: [arm] Fix infinite loop in Math.pow(2,2147483648).
Port e83739c0ae

    Fix applies to PPC/s390 as well.

R=jacob.bramley@arm.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=v8:5214
LOG=N

Review-Url: https://codereview.chromium.org/2167273003
Cr-Commit-Position: refs/heads/master@{#37956}
2016-07-21 21:53:39 +00:00
ivica.bogosavljevic
eaa86cbf06 MIPS: Fix infinite loop in Math.pow(2,-2147483648)
BUG=v8:5213

Review-Url: https://codereview.chromium.org/2163963003
Cr-Commit-Position: refs/heads/master@{#37955}
2016-07-21 19:38:01 +00:00
jpp
6f31bc9ce8 [wasm] ASM-2-WASM. Enforces switch default clause appearing last.
BUG= https://bugs.chromium.org/p/chromium/issues/detail?id=628803
BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST= cctest/asmjs/test-asm-typer.cc
LOG= N

Review-Url: https://codereview.chromium.org/2172603002
Cr-Commit-Position: refs/heads/master@{#37954}
2016-07-21 19:03:40 +00:00
mattloring
fb2feee616 Fix objdump assembly truncations, d8 support
Update the custom objdump script to handle inline comments starting
with '--' or ';;'.

Load d8 code.asm file if present.

BUG=

Review-Url: https://codereview.chromium.org/2159103007
Cr-Commit-Position: refs/heads/master@{#37953}
2016-07-21 18:16:31 +00:00
rmcilroy
53e5f66bc8 [Interpreter] Add Mythri to OWNERS
Review-Url: https://codereview.chromium.org/2168913002
Cr-Commit-Position: refs/heads/master@{#37952}
2016-07-21 17:56:40 +00:00
dpranke
8526513ce5 Fix mips64el typo in snapshot_toolchain.gni.
I had written "mipsel64", not "mips64el".

R=machenbach@chromium.org, milko.leporis@imgtec.com
BUG=629057

Review-Url: https://codereview.chromium.org/2167873002
Cr-Commit-Position: refs/heads/master@{#37951}
2016-07-21 17:20:39 +00:00
jpp
d50998c480 V8. ASM-2-WASM. Enforces source code layout.
BUG= https://bugs.chromium.org/p/chromium/issues/detail?id=628450
BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST= cctest/asmjs/test-asm-typer.cc
TEST= mjsunit/wasm/*
LOG= N

Review-Url: https://codereview.chromium.org/2164273002
Cr-Commit-Position: refs/heads/master@{#37950}
2016-07-21 15:34:33 +00:00
jgruber
46e896e76d Remove stack overflow boilerplate
We no longer need to prepare the stack overflow error in advance now that
Errors are constructed in C++.

R=yangguo@chromium.org
BUG=

Committed: https://crrev.com/ba95d10ccbe13e2fca427228483b045576f2dc4c
Review-Url: https://codereview.chromium.org/2161953003
Cr-Original-Commit-Position: refs/heads/master@{#37923}
Cr-Commit-Position: refs/heads/master@{#37949}
2016-07-21 14:32:07 +00:00
yangguo
767d7fff61 [debugger] remove obsolete work-around for return position.
R=jgruber@chromium.org

Review-Url: https://codereview.chromium.org/2168883002
Cr-Commit-Position: refs/heads/master@{#37948}
2016-07-21 13:58:54 +00:00
machenbach
7f07809c2c [tools] Build generator script
Helper script to generate gn arguments based on common
developer defaults or builder configurations.

BUG=chromium:625791
NOTRY=true

Review-Url: https://codereview.chromium.org/2138693002
Cr-Commit-Position: refs/heads/master@{#37947}
2016-07-21 13:23:44 +00:00