Commit Graph

32588 Commits

Author SHA1 Message Date
mvstanton
7da90ac408 Revert "Avoid creating weak cells for literal arrays that are empty of literals."
This fix was made to address a performance issue in
memory.long_running_idle_gmail_tbmv2, but it didn't improve things.

BUG=615831

Review-Url: https://codereview.chromium.org/2144183002
Cr-Commit-Position: refs/heads/master@{#37746}
2016-07-14 08:17:14 +00:00
jarin
97b886a2b0 [turbofan] Make sure value numbering only narrows types.
Review-Url: https://codereview.chromium.org/2145683004
Cr-Commit-Position: refs/heads/master@{#37745}
2016-07-14 08:10:21 +00:00
ahaas
778fe89387 Reland of [turbofan] Do not use the self reference for turbofan functions
This CL is just a rebase of the original CL
(https://codereview.chromium.org/2150523002).

The reason for reverting was: Dependency of the roll unblocking revert
https://codereview.chromium.org/2147883003/.

Original message:
The self reference requires the allocation of a handle in the macro
assembler, which is not possible if we instantiate the macro assembler
in a worker thread.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2151493002
Cr-Commit-Position: refs/heads/master@{#37744}
2016-07-14 07:33:55 +00:00
machenbach
8aaa91efe6 Revert of [interpreter] Reduce dependencies in bytecodes.{h,cc} (patchset #8 id:140001 of https://codereview.chromium.org/2135273002/ )
Reason for revert:
Breaks the roll, possibly win gn:
https://codereview.chromium.org/2148863002/

Original issue's description:
> [interpreter] Reduce dependencies in bytecodes.{h,cc}
>
> This CL reduces the number of dependencies bytecodes.{h,cc} to facilitate
> generating the bytecode peephole optimizer table during build. Specifically,
> it avoids depending on v8_base.
>
> BUG=v8:4280
> LOG=N
>
> Committed: https://crrev.com/4edebb1cd870ae6c1359ad54f83e618e185883b1
> Cr-Commit-Position: refs/heads/master@{#37715}

TBR=mstarzinger@chromium.org,rmcilroy@chromium.org,oth@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4280

Review-Url: https://codereview.chromium.org/2151693003
Cr-Commit-Position: refs/heads/master@{#37743}
2016-07-14 07:33:54 +00:00
machenbach
e6a195d4dd [cq] Reenable gcc trybot after infra fix
BUG=chromium:626622
NOTRY=true
NOPRESUBMIT=true
TBR=sergiyb@chromium.org

Review-Url: https://codereview.chromium.org/2147023003
Cr-Commit-Position: refs/heads/master@{#37742}
2016-07-14 07:16:05 +00:00
daniel.bevenius
f810ccc867 Updating the code example in FunctionTemplate class documentation
Currently the code example in the FunctionTemplate class documentation
is out of date. This commit updates the examples so they compile and run
without error.

BUG=

Review-Url: https://codereview.chromium.org/2127523003
Cr-Commit-Position: refs/heads/master@{#37741}
2016-07-14 06:34:26 +00:00
yangguo
c8a0c0bdad [builtins] move builtin files to src/builtins/.
R=bmeurer@chromium.org
BUG=v8:5197

Review-Url: https://codereview.chromium.org/2145023002
Cr-Commit-Position: refs/heads/master@{#37740}
2016-07-14 06:27:52 +00:00
v8-autoroll
d23c8a17d6 Update V8 DEPS.
Rolling v8/build to 0942801bf0d49016e44591d3e47ad3f41ad2d8a4

Rolling v8/buildtools to 031420bbafaaa8c33e2bc0623c22fb6181a57f47

Rolling v8/tools/mb to 18b92420fb0cb4378c9496b966507842b99d56b5

Rolling v8/tools/swarming_client to 7f63a272f7d9785ce41b6d10bb3106c49a968e57

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

Review-Url: https://codereview.chromium.org/2145303002
Cr-Commit-Position: refs/heads/master@{#37739}
2016-07-14 03:29:17 +00:00
zhengxing.li
a71ebb8829 X87: [turbofan] Support subtraction displacements in BaseWithIndexAndDisplacementMatcher.
port 574f6fe127 (r37701)

  original commit message:
  Previously, the following schedule fragment:

   1: Parameter[0](0)
   2: Parameter[1](0)
   7: Int32Constant[1]
   8: Int32Sub(2, 7)
   9: Load[kRepTagged|kTypeAny](1, 8)

  would generate the following code (on ia32):

   mov eax,[ebp+0x8]
   mov ecx,[ebp+0xc]
   sub eax,0x1
   mov eax,[eax+ecx*1]

  Now it generates:

   mov eax,[ebp+0x8]
   mov ecx,[ebp+0xc]
   mov eax,[eax+ecx*1-1]

  Similar pattern matching also now works on x64.

BUG=

Review-Url: https://codereview.chromium.org/2151753002
Cr-Commit-Position: refs/heads/master@{#37738}
2016-07-14 03:06:39 +00:00
zhengxing.li
a3b3888554 X87: [Interpreter] Collect type feedback for calls in the bytecode handler.
port fd420203ec (r37700)

  original commit message:
  Collect type feedback in the call bytecode handler. The current
  implementation only collects feedback for JS function objects. The other
  objects and Array functions do not collect any feedback. They will be
  marked Megamorphic.

BUG=

Review-Url: https://codereview.chromium.org/2149493005
Cr-Commit-Position: refs/heads/master@{#37737}
2016-07-14 02:56:53 +00:00
adamk
68f205b2a7 Revert of Don't compile functions in a context the caller doesn't have access to (patchset #9 id:160001 of https://codereview.chromium.org/2034083002/ )
Reason for revert:
Causes crashes on Canary

Original issue's description:
> Don't compile functions in a context the caller doesn't have access to
>
> Instead just return undefined
>
> A side effect of this is that it's no longer possible to compile
> functions in a detached context.
>
> BUG=chromium:541703
> R=verwaest@chromium.org,bmeurer@chromium.org
> CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng
>
> Committed: https://crrev.com/992e34c21635b179a993b82ac1d81753e7a6a57a
> Cr-Commit-Position: refs/heads/master@{#37657}

TBR=bmeurer@chromium.org,verwaest@chromium.org,jochen@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:541703, chromium:628053

Review-Url: https://codereview.chromium.org/2148163002
Cr-Commit-Position: refs/heads/master@{#37736}
2016-07-14 02:02:20 +00:00
ritesht
de33e4bad2 [wasm] Adding feature to JIT a wasm function at runtime and hook up the compiled code into the indirect function table
The runtime JIT function is passed in the function table to hook up the compiled code and the starting address of the memory to locate the bytes to be compiled.

BUG=5044

Review-Url: https://codereview.chromium.org/2137993003
Cr-Commit-Position: refs/heads/master@{#37735}
2016-07-14 01:13:50 +00:00
bradnelson
b0711ccc70 [wasm] Drop old typing-asm and its tests.
BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST= cctest/asmjs/test-asm-typer
LOG=N
R=jpp@chromium.org

Review-Url: https://codereview.chromium.org/2146853004
Cr-Commit-Position: refs/heads/master@{#37734}
2016-07-14 00:06:34 +00:00
bradnelson
304572c953 [wasm] Drop unused variables in asm-types-unittest.
BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST= cctest/asmjs/test-asm-typer
LOG=N
R=jpp@chromium.org

Review-Url: https://codereview.chromium.org/2147113002
Cr-Commit-Position: refs/heads/master@{#37733}
2016-07-13 23:53:39 +00:00
bbudge
a6ffe8efe1 Revert of [Turbofan] Change AlignSavedCalleeRegisterSlots to AlignFrame. (patchset #2 id:20001 of https://codereview.chromium.org/2124983004/ )
Reason for revert:
Speculative revert to fix perf regression:
https://bugs.chromium.org/p/chromium/issues/detail?id=627803

Original issue's description:
> [Turbofan] Change AlignSavedCalleeRegisterSlots to AlignFrame.
> Clean up call sites.
>
> LOG=N
> BUG=v8:4124
>
> Committed: https://crrev.com/d8d75782fb90da21b92ca3dda59cfa3088ad3912
> Cr-Commit-Position: refs/heads/master@{#37650}

TBR=bmeurer@chromium.org,mtrofin@chromium.org,danno@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2151563003
Cr-Commit-Position: refs/heads/master@{#37732}
2016-07-13 23:02:35 +00:00
jpp
08fed37ef1 V8. ASM-2-WASM. Fixes technical debt in asm-types.
BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST= cctest/asmjs/test-asm-typer
LOG=N

Review-Url: https://codereview.chromium.org/2148073002
Cr-Commit-Position: refs/heads/master@{#37731}
2016-07-13 22:11:24 +00:00
adamk
efefadc6ca Remove AstNode::PrettyPrint, --print-source, and --print-builtin-source
The PrettyPrinter may have been valuable once, but with all the desugaring
now done in the parser the output is far from readable, and for some nodes
it's next-to-impossible to recreate the source from the AST. --print-ast is a
much more sensible place to look for human-readable info on what the parser did.

Review-Url: https://codereview.chromium.org/1974623002
Cr-Commit-Position: refs/heads/master@{#37730}
2016-07-13 21:14:16 +00:00
jpp
aa91225289 V8. ASM-2-WASM. Migrates asm-wasm-builder to the new asm-typer.
BUG= https://bugs.chromium.org/p/v8/issues/detail?id=4203
TEST=mjsunit/wasm/*
LOG=N

Review-Url: https://codereview.chromium.org/2134333003
Cr-Commit-Position: refs/heads/master@{#37729}
2016-07-13 19:40:10 +00:00
bakkot
819fe04645 Reland of Add errors for declarations which conflict with catch parameters. (patchset #1 id:1 of https://codereview.chromium.org/2112223002/ )
Reason for revert:
Correcting issue.

Original issue's description:
> Revert of Add errors for declarations which conflict with catch parameters. (patchset #6 id:100001 of https://codereview.chromium.org/2109733003/ )
>
> Reason for revert:
> Fuzzer claims `try {  \"\" ; } catch(x) { let x1 = [1,,], x = x; }` causes a crash.
>
> Original issue's description:
> > Add errors for declarations which conflict with catch parameters.
> >
> > Catch parameters are largely treated as lexical declarations in the
> > block which contains their body for the purposes of early syntax errors,
> > with some exceptions outlined in B.3.5. This patch introduces most of
> > those errors, except those from `eval('for (var e of ...);')` inside of
> > a catch with a simple parameter named 'e'.
> >
> > Note that annex B.3.5 allows var declarations to conflict with simple
> > catch parameters, except when the variable declaration is the init of a
> > for-of statement.
> >
> > BUG=v8:5112,v8:4231
> >
> > Committed: https://crrev.com/2907c726b2bb5cf20b2bec639ca9e6a521585406
> > Cr-Commit-Position: refs/heads/master@{#37462}
>
> TBR=littledan@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=v8:5112,v8:4231
>
> Committed: https://crrev.com/8834d5ecb559001c87c42322969471da60574a8c
> Cr-Commit-Position: refs/heads/master@{#37464}

R=littledan@chromium.org
BUG=v8:5112,v8:4231

Review-Url: https://codereview.chromium.org/2119933002
Cr-Commit-Position: refs/heads/master@{#37728}
2016-07-13 19:29:11 +00:00
binji
a16ca012e0 [Atomics] Rename Atomics.futex*, remove Atomics.futexWakeOrRequeue
* Rename Atomics.futexWait -> Atomics.wait
* Rename Atomics.futexWake -> Atomics.wake
* Remove Atomics.futexWakeOrRequeue
* Return value of Atomics.wait is now a string: "ok", "not-equal" or
  "timed-out"
* Update comments that reference URL for ecmascript_sharedmem to
  https://github.com/tc39/ecmascript_sharedmem

Review-Url: https://codereview.chromium.org/2143443002
Cr-Commit-Position: refs/heads/master@{#37727}
2016-07-13 18:34:03 +00:00
jochen
906cb204d0 Flush the optimizing compilejob queue when doing memory pressure GCs
R=ulan@chromium.org,hpayer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2145683003
Cr-Commit-Position: refs/heads/master@{#37726}
2016-07-13 17:46:09 +00:00
bjaideep
31799674e2 PPC/s390: [ic] Initialize feedback slots for LoadGlobalIC in Runtime::kDeclareGlobals when possible to avoid misses.
Port b9a7b28163

    Fixed minor register mapping issue in ppc/s390 files.

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

BUG=chromium:576312
LOG=N

Review-Url: https://codereview.chromium.org/2146053002
Cr-Commit-Position: refs/heads/master@{#37725}
2016-07-13 17:01:17 +00:00
bjaideep
32d1314e63 PPC/s390: [Interpreter] Collect type feedback for calls in the bytecode handler
Port fd420203ec

Original commit message:

    Collect type feedback in the call bytecode handler. The current
    implementation only collects feedback for JS function objects. The other
    objects and Array functions do not collect any feedback. They will be
    marked Megamorphic.

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

BUG=v8:4280, v8:4780
LOG=N

Review-Url: https://codereview.chromium.org/2144643005
Cr-Commit-Position: refs/heads/master@{#37724}
2016-07-13 16:58:00 +00:00
mlippautz
d7321376ef [heap] ObjectStats: Use ieee754 log2
TBR=ulan@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2147983002
Cr-Commit-Position: refs/heads/master@{#37723}
2016-07-13 16:48:06 +00:00
mstarzinger
06b233c963 [runtime] Make %GetOptimizationStatus fuzzable.
This runtime function in question can indirectly be fuzzed by the two
assertion methods "assertOptimized" and "assertUnoptimized" that our
test harness provides for the "mjsunit" test suite.

R=ishell@chromium.org
BUG=chromium:627841

Review-Url: https://codereview.chromium.org/2145993002
Cr-Commit-Position: refs/heads/master@{#37722}
2016-07-13 16:03:14 +00:00
oth
62c21128d6 [interpreter] Fix Register const declarations.
BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/2143133004
Cr-Commit-Position: refs/heads/master@{#37721}
2016-07-13 16:03:13 +00:00
mlippautz
122df5115d [heap] Fix ObjectStats compile on Android/GN
NOTRY=true
TBR=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2150563002
Cr-Commit-Position: refs/heads/master@{#37720}
2016-07-13 15:59:44 +00:00
mstarzinger
a2f1519f68 [turbofan] Fix deopt point for [[ToName]] lazy bailout.
This fixes the deoptimization information for the lazy bailout point
after a [[ToName]] operation inserted for object literals and class
literals. The result value was erroneously ignored.

R=jarin@chromium.org
TEST=mjsunit/regress/regress-crbug-627828
BUG=chromium:627828

Review-Url: https://codereview.chromium.org/2149493003
Cr-Commit-Position: refs/heads/master@{#37719}
2016-07-13 15:18:10 +00:00
mlippautz
2b2a169490 [heap] Rework and improve object stats tracing
- Instead of tracing during marking we can now trace in a separate phase in MC.
  (Heap is iterable.)
- Add more subtypes for fixed arrays, reducing the unknown bucket to around ~8%
  (local run).
- Refactor collection calls to have a single bottleneck.
- Provide JSON-based output format that can be "easily" processed in JS.

BUG=
R=ulan@chromium.org,hpayer@chromium.org

Review-Url: https://codereview.chromium.org/2129173002
Cr-Commit-Position: refs/heads/master@{#37718}
2016-07-13 14:55:37 +00:00
hablich
f4ba2a483e Revert of Reland Implement .eh_frame writer and disassembler. (patchset #74 id:2070001 of https://codereview.chromium.org/2023503002/ )
Reason for revert:
Blocks roll https://codereview.chromium.org/2148743003/

See https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/244252/steps/compile%20%28with%20patch%29/logs/stdio for error message

Original issue's description:
> Reland Implement .eh_frame writer and disassembler.
>
> Original commit message:
>
>   Also, CodeGenerator::MakeCodeEpilogue now accepts an optional pointer
>   to a EhFrameWriter and will attach unwinding information to the code
>   object when passed one.
>
> Reason for reverting:
>
>   The STATIC_CONST_MEMBER_DEFINITION in eh-frame-writer-unittest.cc
>   causes a compiler error on V8 Win64 - clang buildbot.
>
>   Removing that bit.
>
> BUG=v8:4899
> LOG=N
>
> Committed: https://crrev.com/b413f0ebe1a5dde016bfb94bb80bf872ebc24372
> Cr-Commit-Position: refs/heads/master@{#37707}

TBR=rmcilroy@chromium.org,jarin@chromium.org,ssanfilippo@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4899

Review-Url: https://codereview.chromium.org/2147883003
Cr-Commit-Position: refs/heads/master@{#37717}
2016-07-13 14:23:46 +00:00
hablich
1b42dae4bb Revert of [turbofan] Do not use the self reference for turbofan functions. (patchset #2 id:20001 of https://codereview.chromium.org/2150523002/ )
Reason for revert:
Dependency of the roll unblocking revert https://codereview.chromium.org/2147883003/

Original issue's description:
> [turbofan] Do not use the self reference for turbofan functions.
>
> The self reference requires the allocation of a handle in the macro
> assembler, which is not possible if we instantiate the macro assembler
> in a worker thread.
>
> R=mstarzinger@chromium.org, bmeurer@chromium.org
>
> Committed: https://crrev.com/49ef529b3af50f5daadacdcdcd6be3a307c10af5
> Cr-Commit-Position: refs/heads/master@{#37713}

TBR=bmeurer@chromium.org,mstarzinger@chromium.org,jarin@chromium.org,ahaas@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/2147943002
Cr-Commit-Position: refs/heads/master@{#37716}
2016-07-13 14:20:31 +00:00
oth
4edebb1cd8 [interpreter] Reduce dependencies in bytecodes.{h,cc}
This CL reduces the number of dependencies bytecodes.{h,cc} to facilitate
generating the bytecode peephole optimizer table during build. Specifically,
it avoids depending on v8_base.

BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/2135273002
Cr-Commit-Position: refs/heads/master@{#37715}
2016-07-13 14:01:02 +00:00
bbudge
26ecb4a1d7 [Turbofan] Add ia32 support for 4 and 16 byte moves and swaps.
- Adds move/swap handling for 4 and 16 bytes to ia32.
- Register allocator now only requests 4 bytes for floats on ia32 and arm.
- We probably need similar support in mips.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2027043002
Cr-Commit-Position: refs/heads/master@{#37714}
2016-07-13 13:54:39 +00:00
ahaas
49ef529b3a [turbofan] Do not use the self reference for turbofan functions.
The self reference requires the allocation of a handle in the macro
assembler, which is not possible if we instantiate the macro assembler
in a worker thread.

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

Review-Url: https://codereview.chromium.org/2150523002
Cr-Commit-Position: refs/heads/master@{#37713}
2016-07-13 13:54:38 +00:00
ahaas
bc7f4e7a5d [x64] Fix a typo in a comment.
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2146853002
Cr-Commit-Position: refs/heads/master@{#37712}
2016-07-13 13:41:36 +00:00
bmeurer
04b4df2cad [turbofan] Extend undefined-to-number truncation to all oddballs.
Extends the truncation and type checks for NumberOrUndefined in
representation selection and truncation analysis to deal with all
oddballs not just undefined. Also extend the type hints to always
report NumberOrOddball. This is necessary for the bitwise and shift
operators where NUMBER feedback actually means NUMBER or ODDBALL.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2149583002
Cr-Commit-Position: refs/heads/master@{#37711}
2016-07-13 13:00:08 +00:00
ishell
7ae653f79b [builtins] Turn StoreIC_Miss and StoreIC_Slow builtins to TurboFan code stubs.
This CL also combines Runtime::GetGlobalInsideTypeof and Runtime::kGetGlobalNotInsideTypeof
to Runtime::GetGlobal with explicit typeof_mode parameter.

Drive-by-fix: tail call to correct Slow builtin from LoadCallback handlers when --runtime-call-stats is on.

BUG=chromium:576312

Review-Url: https://codereview.chromium.org/2144643004
Cr-Commit-Position: refs/heads/master@{#37710}
2016-07-13 12:12:41 +00:00
ishell
b9a7b28163 [ic] Initialize feedback slots for LoadGlobalIC in Runtime::kDeclareGlobals when possible to avoid misses.
BUG=chromium:576312

Review-Url: https://codereview.chromium.org/2107193002
Cr-Commit-Position: refs/heads/master@{#37709}
2016-07-13 11:34:24 +00:00
ishell
b449dc0b6f [ic] Split megamorphic stub cache in two caches (for loads and for stores).
After this CL we can avoid using Code::flags in hash computations for megamorphic
stub caches and therefore the unused ICState field can be finally removed from flags.

BUG=chromium:618701

Review-Url: https://codereview.chromium.org/2123983004
Cr-Commit-Position: refs/heads/master@{#37708}
2016-07-13 10:27:32 +00:00
ssanfilippo
b413f0ebe1 Reland Implement .eh_frame writer and disassembler.
Original commit message:

  Also, CodeGenerator::MakeCodeEpilogue now accepts an optional pointer
  to a EhFrameWriter and will attach unwinding information to the code
  object when passed one.

Reason for reverting:

  The STATIC_CONST_MEMBER_DEFINITION in eh-frame-writer-unittest.cc
  causes a compiler error on V8 Win64 - clang buildbot.

  Removing that bit.

BUG=v8:4899
LOG=N

Review-Url: https://codereview.chromium.org/2023503002
Cr-Commit-Position: refs/heads/master@{#37707}
2016-07-13 10:18:01 +00:00
jgruber
35e501bf15 Remove leftover declaration in isolate.h
R=yangguo@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2150483002
Cr-Commit-Position: refs/heads/master@{#37706}
2016-07-13 09:20:43 +00:00
marija.antic
edf8c03547 MIPS64: Implement Mips64And32, Mips64Or32, Mips64Nor32 and Mips64Xor32 operators.
If operands are loaded as unsigned 32-bit integer, they need to be sign extended to 64 bits.

TEST=cctest/test-run-machops/RunWord32AndAndWord32ShrP, cctest/test-run-machops/RunWord32OrP,
cctest/test-run-machops/RunWord32ShrP, cctest/test-run-machops/RunWord32XorP

BUG=

Review-Url: https://codereview.chromium.org/2147883002
Cr-Commit-Position: refs/heads/master@{#37705}
2016-07-13 09:04:33 +00:00
mstarzinger
04062e92cc [runtime] Fully remove RUNTIME_ASSERT for good.
This fully deprecates all uses of the RUNTIME_ASSERT macro and removes
the macro and underlying logging function in question. All uses have
been replaces with CHECK macros which crash safely even in production.

It makes sure we discover abuse of runtime functions in the wild early
and also abort the process safely. Breaking assumptions in any runtime
function can no longer accidentally be caught by JavaScript.

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

Review-Url: https://codereview.chromium.org/2132493002
Cr-Commit-Position: refs/heads/master@{#37704}
2016-07-13 08:36:04 +00:00
bmeurer
15ebec035f [turbofan] Introduce CheckedUint32Div and CheckUint32Mod operators.
Checked integer division and modulus can be done more efficiently
if we know that the inputs are in Unsigned32 range.

Drive-by-fix: Replace the TypeCheckKind on NodeInfo by a proper
restriction type, and thread the feedback type through binary
Number operations similar to what we do for their speculative
versions. Also deal with Unsigned32 inputs for integer multiplication.

R=jarin@chromium.org
BUG=v8:4583,v8:5141

Review-Url: https://codereview.chromium.org/2149493002
Cr-Commit-Position: refs/heads/master@{#37703}
2016-07-13 08:19:44 +00:00
mstarzinger
08843650db [turbofan] Respect catch prediction provided by parser.
This makes sure the {AstGraphBuilder} respects the catch-prediction that
is provided by the parser along with each {TryStatement}. This is needed
for try-blocks materialized by the parser not to influence predictions
users expect when using the debugger.

R=neis@chromium.org
TEST=mjsunit/debug-exceptions
BUG=v8:5183

Review-Url: https://codereview.chromium.org/2147573002
Cr-Commit-Position: refs/heads/master@{#37702}
2016-07-13 08:13:18 +00:00
danno
574f6fe127 [turbofan] Support subtraction displacements in BaseWithIndexAndDisplacementMatcher
Previously, the following schedule fragment:

 1: Parameter[0](0)
 2: Parameter[1](0)
 7: Int32Constant[1]
 8: Int32Sub(2, 7)
 9: Load[kRepTagged|kTypeAny](1, 8)

would generate the following code (on ia32):

 mov eax,[ebp+0x8]
 mov ecx,[ebp+0xc]
 sub eax,0x1
 mov eax,[eax+ecx*1]

Now it generates:

 mov eax,[ebp+0x8]
 mov ecx,[ebp+0xc]
 mov eax,[eax+ecx*1-1]

Similar pattern matching also now works on x64.

BUG=v8:5192
LOG=N

Review-Url: https://codereview.chromium.org/2137323003
Cr-Commit-Position: refs/heads/master@{#37701}
2016-07-13 08:03:38 +00:00
mythria
fd420203ec [Interpreter] Collect type feedback for calls in the bytecode handler
Collect type feedback in the call bytecode handler. The current
implementation only collects feedback for JS function objects. The other
objects and Array functions do not collect any feedback. They will be
marked Megamorphic.

BUG=v8:4280, v8:4780
LOG=N

Review-Url: https://codereview.chromium.org/2122183002
Cr-Commit-Position: refs/heads/master@{#37700}
2016-07-13 08:00:23 +00:00
bmeurer
3861e51322 [turbofan] Properly optimize JSToBoolean with Number inputs.
For JSToBoolean with Number inputs we still called out to the
ToBooleanStub, even though we easily handle them inline nowadays.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2145923002
Cr-Commit-Position: refs/heads/master@{#37699}
2016-07-13 08:00:22 +00:00
bmeurer
dae6320d1b [turbofan] Don't connect regular Phis into the effect chain.
When the effect control linearizer tries to clone a branch, it
accidentially connected regular Phis into the effect chain.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2146553006
Cr-Commit-Position: refs/heads/master@{#37698}
2016-07-13 05:21:41 +00:00
bmeurer
2a7b64d1c7 [turbofan] Ship type feedback for binary operators.
R=jarin@chromium.org
BUG=v8:4583

Review-Url: https://codereview.chromium.org/2146443003
Cr-Commit-Position: refs/heads/master@{#37697}
2016-07-13 04:49:53 +00:00