Commit Graph

256 Commits

Author SHA1 Message Date
fschneider@chromium.org
1c99c90be7 Re-enable constructor inlining and inline === comparison with boolean constants.
This change reverts r10974 which disabled those two optimizations.
They were not responsible for the problem in earley-boyer.

BUG=v8:2009
Review URL: https://chromiumcodereview.appspot.com/9699117

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-19 07:51:37 +00:00
danno@chromium.org
6e1f8780f9 Add flag to always call DebugBreak on abort
R=vegorov@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9706097

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-16 13:43:04 +00:00
fschneider@chromium.org
35786621f2 Change --hydrogen-filter to allow specifying a negative filter for optimized functions.
When prepending a '-' to the function name, the function will not be optimized.

--hydrogen-filter=foo works as before.

--hydrogen-filter=-foo means don't optimize foo.
Review URL: https://chromiumcodereview.appspot.com/9691042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-14 09:45:17 +00:00
yangguo@chromium.org
235e9e20a7 Experimental Profiler: tweak type info threshold.
Also included: simplify String.slice.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9694033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-13 11:38:37 +00:00
fschneider@chromium.org
1f7d42efc9 Landing for pliard@chromium.org: Remove static initializers in v8.
This change includes two CLs by pliard@chromium.org:

1. http://codereview.chromium.org/9447052/ (Add CallOnce() and simple LazyInstance implementation):

Note that this implementation of LazyInstance does not handle global destructors (i.e. the lazy instances are never deleted).

This CL was initially reviewed on codereview.appspot.com:
http://codereview.appspot.com/5687064/



2.  http://codereview.chromium.org/9455088/ (Remove static initializers in v8):
This CL depends on CL 9447052 (adding CallOnce and LazyInstance).
It is based on a patch sent by Digit.

With this patch applied, we have only one static initializer left (in atomicops_internals_x86_gcc.cc). This static initializer populates a structure used by x86 atomic operations. It seems that we can hardly remove it. If possible, it will be removed in a next CL. 

This CL also modifies the presubmit script to check the number of static initializers.


BUG=v8:1859
Review URL: https://chromiumcodereview.appspot.com/9666052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 13:56:56 +00:00
vegorov@chromium.org
da03f56b1f Inline functions that use arguments object in f.apply(o, arguments) pattern.
Support arguments materialization after deoptimization in all frames (not only in topmost one).

R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9643001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-12 12:49:41 +00:00
jkummerow@chromium.org
efee39a075 Profiler experiments: update flag default values.
This doesn't enable the experimental profiler by default, it just tunes its behavior when it is enabled.

Review URL: https://chromiumcodereview.appspot.com/9668009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 17:55:54 +00:00
jkummerow@chromium.org
1d4221a4d3 Profiler experiments: merge self-optimization code into interrupt-at-exit
Review URL: https://chromiumcodereview.appspot.com/9633012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10991 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 16:23:06 +00:00
ulan@chromium.org
e6576f0938 Revert r10435 and r10923 because of failures.
r10435 CL: http://codereview.chromium.org/9195005
r10923 CL: https://chromiumcodereview.appspot.com/9601010

R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9653025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-09 09:04:39 +00:00
rossberg@chromium.org
448b620dad Basic interface inference for modules.
All module expressions, and all variables that might refer to modules,
are assigned interfaces (module types) that are resolved using
unification. This is necessary to deal with the highly recursive
nature of ES6 modules, which does not allow any kind of bottom-up
strategy for resolving module names and paths.

Error messages are rudimental right now. Probably need to track
more information to make them nicer.

R=svenpanne@chromium.org
BUG=v8:1569
TEST=

Review URL: https://chromiumcodereview.appspot.com/9615009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-08 13:03:07 +00:00
mstarzinger@chromium.org
c113ea7cf8 Enable constructor inlining by default again.
R=vegorov@chromium.org
TEST=mjsunit/compiler/inline-construct

Review URL: https://chromiumcodereview.appspot.com/9601010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-05 14:20:58 +00:00
vegorov@chromium.org
f416a684b2 Disable constructor inlining.
There are failures on Kraken.

R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9585011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-02 12:50:42 +00:00
mstarzinger@chromium.org
1009e414b6 MIPS: Implement inlined object allocation in Crankshaft.
Port r10881 (0d25c61e).

Original commit message:

Generates inlined code for object allocation specific to the initial map
of the given constructor function. Also forces completion of inobject
slack tracking while crankshafting to finalize instance size of these
objects.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9569008
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-01 12:38:58 +00:00
fschneider@chromium.org
a8980079a0 Add flag --trace-phase to selectively produce IR trace output.
By default --trace-hydrogen only generates the final IR (before
code generation). The other phases can be printed by specifying
them by their first letter. Currently H=HIR, L=LIR or Z=final IR (default)
are recognized.
Review URL: https://chromiumcodereview.appspot.com/9535009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-01 11:33:37 +00:00
erik.corry@gmail.com
9f375ea880 Fix secondary stub cache and add a test for the stub cache lookups.
Review URL: https://chromiumcodereview.appspot.com/9496010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10864 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-29 10:45:59 +00:00
mstarzinger@chromium.org
fb8eb04bfd Implement inlining of constructor calls.
R=vegorov@chromium.org,kmillikin@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9304001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-28 09:05:55 +00:00
vegorov@chromium.org
9b55ebaa3a When compiling for-in pass correct context value to the increment instruction.
Additionally force increment instruction to use int32 representation.

R=fschneider@google.com
BUG=http://crbug.com/115646
TEST=test/mjsunit/compiler/optimized-for-in.js

Review URL: https://chromiumcodereview.appspot.com/9463052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10844 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-27 14:37:27 +00:00
vegorov@chromium.org
53622335e3 Disable for-in support in Crankshaft while crashes and regressions are being investigated.
R=yangguo@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9463049

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-27 10:43:57 +00:00
jkummerow@chromium.org
75bf5e44d2 Profiler experiments: interrupt check at function exit
Review URL: https://chromiumcodereview.appspot.com/9432026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-22 15:18:29 +00:00
rossberg@chromium.org
958b3bf470 Parsing of basic module declarations (no imports/exports yet).
Module definitions are not compiled or otherwise executed yet.
Toplevel module identifiers are bound but never initialized.

R=kmillikin@chromium.org,mstarzinger@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9401008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 14:02:59 +00:00
rossberg@chromium.org
1336b913d0 Make built-ins strict mode conforming, and support a --use-strict flag.
* Turned all uses of 'const' into 'var'.
* Turned all uses of local 'function' into 'var'.
* Added a couple of missing toplevel 'var' declarations.

One consequence is that the properties on the builtin object  are no longer
non-writable, and I had to adapt one test. Is that a problem?

Unfortunately, we cannot actually switch the library scripts to strict mode
by default, because that makes observable things like poisoned .caller properties
for library functions.

Also removed dead flag code in Compiler::Compile.

R=yangguo@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9415010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 13:48:24 +00:00
jkummerow@chromium.org
0177aa62da Count ICs that have type information.
Hidden behind --type-info-threshold=X flag, usage dependent on experimental profiler.

Review URL: https://chromiumcodereview.appspot.com/9403009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-20 12:57:23 +00:00
danno@chromium.org
6f7d9d2312 Enable smi_only_arrays by default.
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9414007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-16 15:47:36 +00:00
jkummerow@chromium.org
866e0eeeb7 Small update to experimental profiler flags
Review URL: https://chromiumcodereview.appspot.com/9360041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-14 14:28:37 +00:00
jkummerow@chromium.org
4233bf8348 Initial support for count-based profiling
(behind FLAG_count_based_interrupts; only on ia32)

Review URL: https://chromiumcodereview.appspot.com/9373028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-14 14:00:31 +00:00
jkummerow@chromium.org
de510c3a58 Split experimental profiler flags
Review URL: https://chromiumcodereview.appspot.com/9374015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-09 13:30:01 +00:00
jkummerow@chromium.org
aa2e842134 Count-based profiling for primitive functions (hidden behind a flag)
Review URL: https://chromiumcodereview.appspot.com/9361026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-09 10:19:46 +00:00
vegorov@chromium.org
96baf602df Ensure that regexp code flushing correctly updates slots buffer.
Enable code compaction again.

R=erik.corry@gmail.com

Review URL: https://chromiumcodereview.appspot.com/9365019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 15:44:07 +00:00
erik.corry@gmail.com
53c6838cce Remove 5 unused flags.
Review URL: https://chromiumcodereview.appspot.com/9362014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 15:39:41 +00:00
kmillikin@chromium.org
e505a085e3 Remove the JSON AST printing support.
We are not currently maintaining or testing this.

R=danno@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9363019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10643 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 13:53:24 +00:00
rossberg@chromium.org
a0b287a3b1 Extend scanner with new Harmony module keywords (under flag).
R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9352013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 10:53:58 +00:00
fschneider@chromium.org
5bc8a69055 Remove another two unused flags.
Review URL: https://chromiumcodereview.appspot.com/9358019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10634 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 10:26:17 +00:00
kmillikin@chromium.org
9463c00d64 Remove unused --peephole-optimization flag.
R=danno@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9361022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-08 09:55:25 +00:00
vegorov@chromium.org
cc3c37ef61 Disable code compaction again.
Check failures are gone but now layout tests are failing.

R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9351019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 16:34:26 +00:00
vegorov@chromium.org
99fa8059c3 Try enabling (non-incremental) code compaction again.
This time include slot-recording fixes in code flushing that were accidentally omitted from the previous commit.

R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9348018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 14:43:51 +00:00
vegorov@chromium.org
9920e441fa Disable code compaction again while we investigate buildbot check failures.
Review URL: https://chromiumcodereview.appspot.com/9351013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 10:03:08 +00:00
vegorov@chromium.org
029aa9ef92 Enable non-incremental code compaction.
It is intended to bring memory usage down on idle notifications.

R=erik.corry@gmail.com
BUG=v8:1726

Review URL: https://chromiumcodereview.appspot.com/9323079

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-07 08:51:47 +00:00
fschneider@chromium.org
0ec7773680 Allow bailing out of the register allocator when running out of virtual registers.
1. Instead of checking upfront and estimating a limit for the number, we
now are able to stop register allocation and bailout when we don't
have enough virtual registers.

2. GCed some out-dated flags from flag-definition.h

3. Simplified the interface from the Lithium builder to the
register allocator in lithium-*.cc: For uses and definitions, we
just record the virtual register number given by the Hydrogen value id.
For temporaries, we request a new virtual register from the allocator.
For fixed temps, we don't need to do anything.

4. Increased number of deoptimization entries to 16K. Eventually we
probably want to make this array grow dynamically.
Review URL: https://chromiumcodereview.appspot.com/9325019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-03 12:05:08 +00:00
svenpanne@chromium.org
82d1f51534 Give uses within a loop a greater weight when doing representation inference.
Uses of a value are weighted by a factor of FLAG_loop_weight (default: 10) for
every loop they are in. This makes uses in inner loops "more important", which
should improve the result of the representation inference.

Review URL: https://chromiumcodereview.appspot.com/8277031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-01 08:49:18 +00:00
yangguo@chromium.org
f8115b345d Removing some dead flags.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9121075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-30 12:25:29 +00:00
rossberg@chromium.org
b05d7619c8 Do not turn on typeof null reform with --harmony switch.
R=yangguo@chromium.org
BUG=v8:1913
TEST=

Review URL: https://chromiumcodereview.appspot.com/9232047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-27 13:07:39 +00:00
erik.corry@gmail.com
dc9910f4a4 Minor cleanups of numeric seeded hashing patch.
Review URL: http://codereview.chromium.org/9155010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-10 13:24:18 +00:00
erik.corry@gmail.com
81a0271004 Randomize the seed used for string hashing. This helps guard against
CPU-eating DOS attacks against node.js servers.  Based on code from
Bert Belder.  This version only solves the issue for those that compile
V8 themselves or those that do not use snapshots.  A snapshot-based
precompiled V8 will still have predictable string hash codes.
Review URL: http://codereview.chromium.org/9086006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-01-04 15:12:15 +00:00
ulan@chromium.org
d61278da6d Do not reassign debug-only flag in release mode.
BUG=1871
TEST=

Review URL: http://codereview.chromium.org/9021011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-21 16:19:55 +00:00
yangguo@chromium.org
9821d28836 Change --print-all-code to include --code-comments.
Review URL: http://codereview.chromium.org/8968010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-16 08:38:52 +00:00
yangguo@chromium.org
4b05f743e0 Introduce --print-all-code flag and infrastructure for one flag to imply another flag.
Review URL: http://codereview.chromium.org/8957009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-12-15 17:00:27 +00:00
keuchel@chromium.org
1e9a7267ab Introduce extended mode.
This CL introduces a third mode next to the non-strict
(henceforth called 'classic mode') and 'strict mode'
which is called 'extended mode' as in the current
ES.next specification drafts. The extended mode is based on
the 'strict mode' and adds new functionality to it. This
means that most of the semantics of these two modes
coincide.

The 'extended mode' is entered instead of the 'strict mode'
during parsing when using the 'strict mode' directive
"use strict" and when the the harmony-scoping flag is
active. This should be changed once it is fully specified how the 'extended mode' is entered.

This change introduces a new 3 valued enum LanguageMode
(see globals.h) corresponding to the modes which is mostly
used by the frontend code. This includes the following
components:
* (Pre)Parser
* Compiler
* SharedFunctionInfo, Scope and ScopeInfo
* runtime functions: StoreContextSlot,
  ResolvePossiblyDirectEval, InitializeVarGlobal,
  DeclareGlobals

The old enum StrictModeFlag is still used in the backend
when the distinction between the 'strict mode' and the 'extended mode' does not matter. This includes:
* SetProperty runtime function, Delete builtin
* StoreIC and KeyedStoreIC
* StubCache

Review URL: http://codereview.chromium.org/8417035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-24 15:17:04 +00:00
erik.corry@gmail.com
5c1044bb54 Add flag --collect-megamorphic-maps-from-stub-cache to help diagnose a
memory leak.
Review URL: http://codereview.chromium.org/8599006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-18 14:08:57 +00:00
whesse@chromium.org
7a25c43a07 Remove stack height tracking from ia32 non-optimizing code generator.
Review URL: http://codereview.chromium.org/8340023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-11-01 12:20:46 +00:00
kmillikin@chromium.org
f077a41b12 MIPS: crankshaft implementation
BUG=
TEST=

Review URL: http://codereview.chromium.org/7934002
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-10-28 08:14:46 +00:00