Commit Graph

28209 Commits

Author SHA1 Message Date
jkummerow
6da816198e Fix one more DCHECK for FAST_STRING_WRAPPER_ELEMENTS
This is a follow-up fix to f4872f74 / r33616.

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

Cr-Commit-Position: refs/heads/master@{#33667}
2016-02-02 10:14:46 +00:00
jacob.bramley
7c8e32cfd8 [arm][arm64] Minor improvements to MathMaxMin.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33666}
2016-02-02 10:03:52 +00:00
rmcilroy
a37158393e [Interpreter] Group ignition cctest failures by error.
Also changes SKIP to FAIL to ensure we know when we have fixed a test.

BUG=v8:4280,v8:4680
LOG=N
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_arm64_dbg,v8_linux_arm_dbg

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

Cr-Commit-Position: refs/heads/master@{#33665}
2016-02-02 09:58:38 +00:00
danno
1f28904b24 [compiler] Extend the functionality of CodeStubAssembler
After this change, the functionality of the CodeStubAssembler should be
sufficient to generate non-trivial stubs (e.g. the KeyedLoadIC) with control
flow, variables and probing of internal meta data structures.

Specifically this patch:

* introduces a Label class, which allows stubs to construct graphs that don't
  have linear control graphs.
* introduces a Variable class. Variables can be bound to Node* values at
  different points in a non-linear control flow graph. In conjunction with the
  Label machinery, the CodeStubAssembler ensures that Phi nodes are inserted at
  the "minimal" set of merge points.
* adds Tail calling support to other Stubs and to any arbitrary code whose
  interface can be described by a CallInterfaceDescriptor.
* provides new macros for accessing FixedArray elements that are optimized for
  use with Smi values.

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

Cr-Commit-Position: refs/heads/master@{#33664}
2016-02-02 09:42:54 +00:00
rmcilroy
df1964a08e [WATCHLIST] Add BytecodeGraphBuilder and InterpreterAssembler to interpreter watchlist.
Review URL: https://codereview.chromium.org/1657683002

Cr-Commit-Position: refs/heads/master@{#33663}
2016-02-02 09:40:34 +00:00
mlippautz
062fc9abcf [heap] Slightly optimize Heap::UpdateAllocationSite()
This function is called for every live object in new space.  We statically know
which version to call, so let's use templates here and eliminite a branch at
runtime.

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33662}
2016-02-02 09:28:51 +00:00
yangguo
4da26845d0 [regexp, fuzzer] improve regexp fuzzer coverage.
R=jochen@chromium.org, machenbach@chromium.org
BUG=chromium:577261
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33661}
2016-02-02 09:23:42 +00:00
bmeurer
8c04a35c83 [intrinsics] Remove %_IsFunction inline intrinsic.
There's no point in having %_IsFunction as inline intrinsic, as it
is only used in non performance critical code, which is already full
of runtime calls anyway, so %IsFunction will do the trick as well.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33660}
2016-02-02 09:14:07 +00:00
bmeurer
329c1e5397 [turbofan] Properly call %TraceExit on explicit return.
So far TurboFan only calls %TraceExit for the implicit
return of undefined, when the function contains no explicit
return statement. To make --trace useful, we also need to
call %TraceExit for ReturnStatement.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33659}
2016-02-02 09:12:25 +00:00
jochen
ae1f32a1cc Don't schedule second pass callbacks if there are no callbacks
BUG=none
R=haraken@chromium.org,hpayer@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33658}
2016-02-02 08:59:21 +00:00
bmeurer
c4d366fb0c [turbofan] Optimize dynamic variable load of global constant.
Don't insert a JSLoadGlobal node in the fast case of a dynamic variable
load if the target is a global constant.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33657}
2016-02-02 08:23:46 +00:00
jarin
ef35f11c43 Remove the template magic from types.(h|cc), remove types-inl.h.
This CL removes the Config templatization from the types. It is not
necessary anymore, after the HeapTypes have been removed.

The CL also changes the type hierarchy - the specific type kinds are
not inner classes of the Type class and they do not inherit from Type.
This is partly because it seems impossible to make this work without
templates. Instead, a new TypeBase class is introduced and all the
structural (i.e., non-bitset) types inherit from it.

The bitset type still requires the bit-munging hack and some nasty
reinterpret-casts to pretend bitsets are of type Type*. Additionally,
there is now the same hack for TypeBase - all pointers to the sub-types
of TypeBase are reinterpret-casted to Type*. This is to keep the type
constructors in inline method definitions (although it is unclear how
much that actually buys us).

In future, we would like to move to a model where we encapsulate Type*
into a class (or possibly use Type where we used to use Type*). This
would loosen the coupling between bitset size and pointer size, and
eventually we would be able to have more bits.

TBR=bradnelson@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33656}
2016-02-02 07:26:06 +00:00
yangguo
eea1a4c003 [regexp] implement /ui to mirror the implementation for /i.
R=erik.corry@gmail.com, erikcorry@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33655}
2016-02-02 07:09:36 +00:00
bmeurer
1f85ff077d [turbofan] Constant-fold ToNumber conversions.
We can constant-fold JSToNumber conversions during typed lowering
if the input is a known primitive constant (i.e. a string, oddball
or number). I.e. JSToNumber("123") can be constant-folded to 123.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33654}
2016-02-02 07:02:09 +00:00
v8-autoroll
0211c634f4 Update V8 DEPS.
Rolling v8/third_party/icu to 2b12f8775d66568f2b2e2bd8246efcfdff40d563

Rolling v8/tools/clang to fc5dab2a77e5a2c69f0095faba5f903d520f0bb5

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

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

Cr-Commit-Position: refs/heads/master@{#33653}
2016-02-02 05:32:59 +00:00
zhengxing.li
8944d36fd5 X87: [builtins] Make Math.max and Math.min fast by default.
port cb9b801069 (r33582)

  original commit message:
  The previous versions of Math.max and Math.min made it difficult to
  optimize those (that's why we already have custom code in Crankshaft),
  and due to lack of ideas what to do about the variable number of
  arguments, we will probably need to stick in special code in TurboFan
  as well; so inlining those builtins is off the table, hence there's no
  real advantage in having them around as "not quite JS" with extra work
  necessary in the optimizing compilers to still make those builtins
  somewhat fast in cases where we cannot inline them (also there's a
  tricky deopt loop in Crankshaft related to Math.min and Math.max, but
  that will be dealt with later).

  So to sum up: Instead of trying to make Math.max and Math.min semi-fast
  in the optimizing compilers with weird work-arounds support %_Arguments
  %_ArgumentsLength, we do provide the optimal code as native builtins
  instead and call it a day (which gives a nice performance boost on some
  benchmarks).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33652}
2016-02-02 02:47:46 +00:00
caitpotter88
15da984326 [parser] report invalid rest parameter errors in Arrow functions
Based on vogelheim's CL at https://codereview.chromium.org/1657783002/

BUG=chromium:582626, v8:2700
LOG=N
R=adamk@chromium.org, rossberg@chromium.org, vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33651}
2016-02-02 00:33:07 +00:00
littledan
11e8c03f94 Add UseCounters for some nonstandard JavaScript features
This patch adds a UseCounter for each of the following:
- Allowing duplicate sloppy-mode block-scoped function declarations
  in the exact same scope
- for-in loops with an initializer

The patch also refactors some of the declaration code to clean it up and
enable the first counter, and adds additional unit tests to nail down
the semantics of edge cases of sloppy-mode block-scoped function declarations.

BUG=v8:4693,chromium:579395
LOG=N
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#33650}
2016-02-01 23:01:59 +00:00
mtrofin
0eb083155c [tools] Flexible perf runner path.
Improved flexibility for the perf runner, by adding option to
specify precisely shell binary.

NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#33649}
2016-02-01 20:27:47 +00:00
sigurds
6298f4fc5b [turbofan] Improve some heuristics in escape analysis
BUG=v8:4586
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33648}
2016-02-01 19:59:10 +00:00
Adam Klein
2f813aa669 Also skip allocation-limit test on tsan builders
TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33647}
2016-02-01 19:58:22 +00:00
Adam Klein
37e2bb0109 Skip test262/built-ins/ArrayBuffer/allocation-limit under msan
BUG=v8:4639
LOG=n
TBR=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33646}
2016-02-01 19:52:17 +00:00
littledan
bce83db2e2 Test262 roll to the state as of 2016-19-1
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#33645}
2016-02-01 19:03:32 +00:00
bradnelson
4529cb7b6f Adding flag for simd.js + asm->wasm.
Make it possible to switch on simd.js support when combined with asm.js
in the asm->wasm path.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=test-asm-validator
R=gdeepti@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33644}
2016-02-01 18:25:38 +00:00
adamk
8f89ad740f Remove unnecessary ClassLiteral name member and simplify Function.name handling
A class's name is its constructor's name, so there's no need to treat it separately,
either in the parser or in code generation. The main parser use of the name is
for ES2015 Function.name handling, and this patch also cleans up handling there
by adding a new IsAnonymousFunctionDefinition() method to Expression (the name
comes from the spec).

Also removed unused ParserTraits::DefaultConstructor method.

BUG=v8:3699
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33643}
2016-02-01 17:44:42 +00:00
mbrandy
c3ff68b6b7 Detect cache line size on Linux for PPC hosts.
In the interest of generalization, this change:
- Consolidates cache line size detection for all interested
  architectures under base::CPU (currently leveraged by only
  PPC and ARM64).
- Differentiates between instruction vs data cache line sizes.

R=rmcilroy@chromium.org, jochen@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33642}
2016-02-01 15:03:21 +00:00
mstarzinger
8420d57524 [interpreter] Fix re-throw to not have frame-state.
The runtime call to Runtime::kReThrow does not need a frame-state node
attached, the frame-state input count is zero. This restructures the
graph builder to not instantiate a FrameStateBeforeAndAfter for it.

R=jarin@chromium.org
TEST=cctest/test-run-bytecode-graph-builder
BUG=v8:4674
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33641}
2016-02-01 14:02:02 +00:00
yangguo
9f5dca8faa [regexp] add fuzzer support for regexp parser and compiler.
R=jochen@chromium.org
BUG=chromium:577261
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33640}
2016-02-01 14:00:38 +00:00
mstarzinger
7d07a6c489 [interpreter] Deprecate notion of an unreachable environment.
The notion of an unreachable environment is useful for a recursive
descent iteration (e.g. over an AST) where nodes are created on the
ascent path as well. For a flat iteration (e.g. over bytecode stream)
environments become unreachable at the end of a visitation function.
Hence any unreachable path can be represented by nulling the tracked
environment completely. This further reduces the number of redundant
nodes being created.

R=oth@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33639}
2016-02-01 12:18:13 +00:00
rmcilroy
d81edba721 [Interpreter] Set bytecode array in Runtime_SetCode.
Set the bytecode array correctly in Runtime_SetCode.
This fixes issues with building the snapshot with ignition enabled.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33638}
2016-02-01 12:13:21 +00:00
yangguo
ca6587c007 [regexp] do not store flags as bitfield in the parser.
This reverts a small part of e709aa24c0 in an attempt to recover
lost page_cycler performance.

R=jkummerow@chromium.org
BUG=chromium:580973
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33637}
2016-02-01 10:55:52 +00:00
zhengxing.li
a1a8dd141e X87: Change num_double_registers() to num_allocatable_double_registers() for TestStackSlot.
Although x87 has 8 registers, it use only 1 double register in TurboFan code generation for some limitations.

  So for TestStackSlot() function, use the num_allocatable_double_registers() to check the avaliable double registers
  of TurboFan is more suitable than num_double_registers().

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33636}
2016-02-01 10:54:33 +00:00
mstarzinger
c207f10b09 [interpreter] Simplify BytecodeBranchAnalysis to minimum.
This simplifies the branch analysis we perform on the bytecode stream
down to the bare minimum that we need to build graphs. Note that we
still record all branch targets, even though only the backwards ones
would be needed, but this is essentially for free and might be useful
eventually.

R=oth@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33635}
2016-02-01 10:47:33 +00:00
mstarzinger
83a2c8ed7f [interpreter] Reachability is implied by live environment.
The reachability of a bytecode is implied by a live environment reaching
the bytecode during the abstract control flow simulation of the bytecode
iteration perfromed by the graph builder. There is no need to compute it
upfront anymore.

Also, the upfront computation was only an approximation when it came to
the reachability of an exception handler. This is why several tests for
translation of exception handlers can now be enabled.

R=oth@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33634}
2016-02-01 10:19:13 +00:00
mstarzinger
ee5b58d9f9 [interpreter] Simplify graph builder control flow simulation.
This simplifies how the BytecodeGraphBuilder simulates control flow by
reversing the propagation direction to forwards propagation. This is the
same direction as the data flow which is also a forward propagation. In
this way the analysis information needed at merge points is drastically
reduced while still retaining the same simulation power.

In short: We push down environments instead of pulling them.

R=oth@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33633}
2016-02-01 09:47:42 +00:00
nikolaos
077d70f0fe Avoid multiple rewriting of object key expressions
NonPatternRewrite was called more than once for the same AST
in the case of (computed) key expressions present in object
literals.  As an example, in:

   var x = { [[...42]]: 17 };

the array containing the spread would be desugared first and
then the resulting do-expression would again be desugared.

This could be problematic if a computed key expression contains
large nested array/object literals.

R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33632}
2016-02-01 09:18:41 +00:00
ahaas
a17bd3f3bc [wasm] Initialize the root register for WASM tests.
The root register is needed (at least on x64) to access
ExternalReferences.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33631}
2016-02-01 09:17:20 +00:00
zhengxing.li
587ad6fcc0 X87: Change the test case for X87 RunRoundInt32ToFloat32.
The CL #33347 (https://codereview.chromium.org/1589363002) added the RunRoundInt32ToFloat32 test case and X87 failed at it.

 The reason is same as the CL #31808 (issue 1430943002, X87: Change the test case for X87 float operations), please refer: https://codereview.chromium.org/1430943002/.

 Here is the key comments from CL #31808
 Some new test cases use CheckFloatEq(...) and CheckDoubleEq(...) function for result check. When GCC compiling the CheckFloatEq() and CheckDoubleEq() function,
 those inlined functions has different behavior comparing with GCC ia32 build and x87 build.
 The major difference is sse float register still has single precision rounding semantic. While X87 register has no such rounding precsion semantic when directly use register value.
 The V8 turbofan JITTed has exactly same result in both X87 and IA32 port.

 For CHECK_EQ(a, b) function, if a and b are doubles, it will has similar behaviors like CheckFloatEq(...) and CheckDoubleEq(...) function when compiled by GCC and causes the test case
 fail.

 So we add the following sentence to do type case to keep the same precision for RunRoundInt32ToFloat32. Such as: volatile double expect = static_cast<float>(*i).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33630}
2016-02-01 08:27:56 +00:00
littledan
4e982c0d35 Ship RegExp subclassing
This patch ships the first part of RegExp subclassing--defining
Symbol.{match,replace,search,split}, but keeping their original
definitions which are restricted to a RegExp receiver and do not
call out to the core 'exec' method. This is being shipped separately
because the two sets of extension points are separate features with
separate functionality. The amount of behavior which is held behind
the flag is very small, just exposing the symbols as properties of
Symbol--the behavior that the String methods call out to these Symbol
properties has already been shipping unflagged.

R=yangguo@chromium.org
BUG=v8:4305,v8:4343,v8:4344,v8:4345
LOG=Y
CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#33629}
2016-02-01 07:22:48 +00:00
yangguo
a6aef2373c [regexp] fix indentation and variable shadowing.
TBR=brucedawson@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33628}
2016-02-01 07:20:53 +00:00
yangguo
835b038331 [debugger] correctly find function context.
In the debugger we are interested in getting the context for the
current frame, which is usually a function context. To do that,
we used to call Context::declaration_context, which may also
return a block context. This is wrong and can lead to crashes.
Instead, we now use a newly introduced Context::closure_context,
which skips block contexts. This works fine for the debugger,
since we have other means to find and materialize block contexts.

R=rossberg@chromium.org
BUG=chromium:582051
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33627}
2016-02-01 07:03:44 +00:00
v8-autoroll
f8593be201 Update V8 DEPS.
Rolling v8/tools/clang to 667833c8778efe12d3d749f5f5dfd4b10a1388a0

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

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

Cr-Commit-Position: refs/heads/master@{#33626}
2016-02-01 04:24:04 +00:00
v8-autoroll
77e8903566 Update V8 DEPS.
Rolling v8/tools/clang to f1b8960790c46bf022d178a85a88210a7b10a2a5

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

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

Cr-Commit-Position: refs/heads/master@{#33625}
2016-01-31 09:14:03 +00:00
v8-autoroll
04ddea8466 Update V8 DEPS.
Rolling v8/base/trace_event/common to 3b14e6554b07defdad00c17d162c6e7121f71fbf

Rolling v8/buildtools to 389b7143dbd63da3a9725e304d286b02805fc170

Rolling v8/tools/clang to 7548b22debe829cb92047725def34c50fb88ca01

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

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

Cr-Commit-Position: refs/heads/master@{#33624}
2016-01-30 04:27:34 +00:00
bradnelson
83744a4bee Switching foreign function to be marked as functions at call sites.
On further reflection, marking the variable proxy at call sites
for foreign functions as a function is ok. Switching this.

Fixed a few IntersectResults that probably should be an explicit set_bounds.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=test-asm-validator
R=aseemgarg@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33623}
2016-01-30 02:38:38 +00:00
bradnelson
43be96989f Accurately type foreign functions, and variables (attempt 2).
Associate a type with foreign functions at their callsite.
Associate a type with foreign variables.
More pervasively forbid computation in the module body.
Confirm foreign call arguments are exports.

Pass zone to more Type constructors, for consistency.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=test-asm-validator
R=aseemgarg@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33622}
2016-01-29 22:33:04 +00:00
thestig
bb96455b61 Change .gitignore to ignore /base instead of /base/trace_event/common.
BUG=581960
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33621}
2016-01-29 22:12:29 +00:00
mbrandy
21bb9c6a39 PPC: Refactor checks for minus zero.
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33620}
2016-01-29 20:40:37 +00:00
mbrandy
ceb2d18d82 PPC: Fix "Implement the function.sent proposal."
StoreP needs a scratch register for unaligned immediate offset.

R=neis@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4700
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33619}
2016-01-29 19:34:36 +00:00
mbrandy
3641a44883 PPC: [builtins] Make Math.max and Math.min fast by default.
Port cb9b801069

Original commit message:
    The previous versions of Math.max and Math.min made it difficult to
    optimize those (that's why we already have custom code in Crankshaft),
    and due to lack of ideas what to do about the variable number of
    arguments, we will probably need to stick in special code in TurboFan
    as well; so inlining those builtins is off the table, hence there's no
    real advantage in having them around as "not quite JS" with extra work
    necessary in the optimizing compilers to still make those builtins
    somewhat fast in cases where we cannot inline them (also there's a
    tricky deopt loop in Crankshaft related to Math.min and Math.max, but
    that will be dealt with later).

    So to sum up: Instead of trying to make Math.max and Math.min semi-fast
    in the optimizing compilers with weird work-arounds support %_Arguments
    %_ArgumentsLength, we do provide the optimal code as native builtins
    instead and call it a day (which gives a nice performance boost on some
    benchmarks).

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

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

Cr-Commit-Position: refs/heads/master@{#33618}
2016-01-29 19:33:05 +00:00