Commit Graph

181 Commits

Author SHA1 Message Date
ager@chromium.org
ef8baf25fc Revert revisions 5041 and 5042 introducing virtual scavenge
behavior. It breaks debug builds with snapshots on my machine.

TBR=vegorov@chromium.org
Review URL: http://codereview.chromium.org/2983001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5046 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-12 16:57:07 +00:00
vegorov@chromium.org
ef6cb2dd0b Use virtually dispatched specialized scavengers instead of single generic ScavengeObjectSlow implementation.
Review URL: http://codereview.chromium.org/2895008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-07-12 12:47:09 +00:00
vegorov@chromium.org
8036035777 Don't make any decisions on old space limits after scavenges.
We just do not possess enough information at that point.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-25 08:59:52 +00:00
vegorov@chromium.org
1bb0ef0af4 Fix compilation failure on Win.
Review URL: http://codereview.chromium.org/2821016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-24 12:11:24 +00:00
vegorov@chromium.org
ae39e059c2 Take survival rates of young objects into account when choosing old generation limits.
Stable high survival rates of young objects both during partial and
full collection indicate that mutator is either building or modifying
a structure with a long lifetime.

In this case we aggressively raise old generation memory limits to
postpone subsequent mark-sweep collection and trade memory space
for the mutation speed.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-24 11:44:23 +00:00
vitalyr@chromium.org
3cafa65462 Track ascii-ness of data in externalized strings.
If a two-byte string only contains ascii characters, then we can save
memory when flattening a cons string containing it. Similarly we can
use this in Array.prototype.join implementation. To track this a new
bit is added to instance type. This bit is used as a hint in generated
code and in runtime functions.

To enable testing a new V8 extension is added controlled by
--expose-externalize-string flag.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-17 16:19:28 +00:00
ager@chromium.org
ed0fc41723 Change hash computation for transcendental cache to use arithmetic
shifts. Leads to fewer collisions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-16 08:29:25 +00:00
sgjesse@chromium.org
c7ab2b6aa3 Remove the SetExternalStringDiposeCallback API
Changed the disposal of external string resources to call a virtual Dispose method on the resource. The default inplementation of Dispose deletes the object and will capture the delete operator matching the new operator used to allocate the object.
Review URL: http://codereview.chromium.org/2658008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-08 09:35:47 +00:00
ricow@chromium.org
316092c364 Flushing of code from functions that we expect not to use again.
This adds an additional step to full gc, removing code from functions
that are no longer in the compilation cache. The code is replaced with
a lazy compile version enabling us to recompile the function in case
we do actually need it again.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 15:39:10 +00:00
sgjesse@chromium.org
09acdc8446 Add an API to control the disposal of external string resources
A new callback have been added which - if set - will be called to dispose of external string resources passed from the embedder to the V8 engine.
Review URL: http://codereview.chromium.org/2645004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-07 08:49:07 +00:00
vegorov@chromium.org
fc7c5f789a Cardmarking writebarrier.
Reapply r4715 with fixes reviewed in http://codereview.chromium.org/2276002.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-27 12:30:45 +00:00
vegorov@chromium.org
e268fbdaba Revert r4715.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2274001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 09:24:44 +00:00
vegorov@chromium.org
675e711f1c Cardmarking writebarrier.
- New сardmarking write barrier handles large objects and normal objects in a similar fashion (no more additional space for pointer tracking is required, no conditional branches in WB code).
- Changes to enable oldspaces iteration without maps decoding:
-- layout change for FixedArrays: length is stored as a smis (initial patch by
Kevin Millikin)
-- layout change for SharedFunctionInfo: integer fields are stored as smi on
arm, ia32 and rearranged on x64.
-- layout change for String: meaning of LSB bit is fliped (1 now means hash not
computed); on x64 padding is added.
-- layout of maps is _not_ changed. Map space is currently iterated in a special
way.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-25 13:15:16 +00:00
vegorov@chromium.org
2241d2af45 Reverting r4703.
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2073018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-21 17:37:47 +00:00
vegorov@chromium.org
8879691793 Cardmarking writebarrier.
Reapplication of r4685 (reviewed http://codereview.chromium.org/2101002) with minor modifications:

- Fix compilation problems on Win64.
- Improve heap verification pass: search for garbage pointers to new space not only in dirty regions but in all regions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-21 15:52:38 +00:00
vegorov@chromium.org
955828e437 Reverting r4685, r4686, r4687
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/2071020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 14:02:51 +00:00
vegorov@chromium.org
b38a0a719a - Changes to enable oldspaces iteration without maps decoding:
-- layout change for FixedArrays: length is stored as a smis (initial patch by Kevin Millikin)
-- layout change for SharedFunctionInfo: integer fields are stored as smi on arm, ia32 and rearranged on x64.
-- layout change for String: meaning of LSB bit is fliped (1 now means hash not computed); on x64 padding is added.
-- layout of maps is _not_ changed. Map space is currently iterated in a special way.
- Cardmarking write barrier. New barrier handles large objects and normal objects in a similar fashion (no more additional space for pointer tracking is required, no conditional branches in WB code).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4685 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-20 13:10:38 +00:00
vegorov@chromium.org
8fbac01b2c Improved GC statistics.
Collect cumulative (--print-cumulative-gc-stat) and per collection (--trace-gc-nvp) GC statistics and output it in a machine-readable name=value format.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4675 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-18 16:50:17 +00:00
antonm@chromium.org
a83a88cd58 Moving more code to lookup an item from the native cache into code generator.
To bypass expensive invocation of JS functions from C++ and omit runtime
call overhead for searching the cache, more elaborate deferred code is generated.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-07 12:48:18 +00:00
erik.corry@gmail.com
d18b73c2fe Add a single-element global positive and negative cache to
the implementation of instanceof.
Review URL: http://codereview.chromium.org/1765012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-06 09:35:18 +00:00
antonm@chromium.org
6617fac3d4 Clean JS function results cache on each major GC.
We don't want to retain cached objects for too long.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4582 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-04 16:42:11 +00:00
oleg@chromium.org
c98c930b1f Simplify double to number convertion.
Review URL: http://codereview.chromium.org/1694004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4550 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-29 14:01:37 +00:00
erik.corry@gmail.com
e1b3b92a2c Make not sucking at regexp the default
(remove V8_NATIVE_REGEXP flag, add
V8_INTERPRETED_REGEXP flag).
Review URL: http://codereview.chromium.org/1635001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 19:30:11 +00:00
ager@chromium.org
07db17ce1b Remove some remaining references to boilerplate functions.
Review URL: http://codereview.chromium.org/1605037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-19 12:39:07 +00:00
antonm@chromium.org
a713b27428 Introduce fast native caches and use it in String.search.
Review URL: http://codereview.chromium.org/1563005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 14:46:15 +00:00
ricow@chromium.org
8d524c0189 Changing byte_size from size_t to int in heap-inl.h (making win64 build work)
Review URL: http://codereview.chromium.org/1619017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 11:30:34 +00:00
vegorov@chromium.org
238b211274 Reapplying changes from r4318
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/1656003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-14 07:26:20 +00:00
lrn@chromium.org
285d5bc48a Native construction of RegExp result objects, with in-object index and input.
Avoid cloning using CloneRegExpResult for results that are just arrays.
Made a more direct path for string.match with string argument.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-13 09:31:03 +00:00
ager@chromium.org
c64b354e3a Remove redundant null oddball initialization.
Remove unneeded map argument to CreateOddball.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-12 13:36:52 +00:00
vegorov@chromium.org
82ddab5fd5 Reverting r4318 (merge of scavenge into sweeping pass of MSC garbage collector)
Review URL: http://codereview.chromium.org/1622016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-09 08:16:25 +00:00
sgjesse@chromium.org
c0976e9276 Add number string cache lookup for heap numbers to generatred code (on top of the already existing smi lookup)
Added a number to string runtime function which does not try to do a cache lookup as the number is known to not be in the cahce.
Review URL: http://codereview.chromium.org/1602010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-04-07 11:13:05 +00:00
vegorov@chromium.org
6d3cdbbf98 Merging scavenge into sweeping phase of mark-sweep(-compact) collector.
Should reduce full GC pauses. 
Review URL: http://codereview.chromium.org/1217011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-30 12:01:06 +00:00
lrn@chromium.org
845fd15dd6 Pre-create properties on JSRegExp objects
Initialize properties in single runtime call.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-26 14:19:47 +00:00
antonm@chromium.org
94a2a0956b Add a test to verify correctness of remembered set update for Heap::CopyJSObject.
Review URL: http://codereview.chromium.org/1256002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-25 15:32:58 +00:00
erik.corry@gmail.com
3672624b45 Fix pop push optimization to work with partial snapshots (correct
registration of external references in Proxy objects).
I moved the declaration of the two functions to stub-cache.h
because with all the types they use it's hard to declare them
anywhere else.  But the actual definition is still in runtime.cc
near to the place where they are used.
Review URL: http://codereview.chromium.org/1079012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 14:33:42 +00:00
mikhail.naganov@gmail.com
4d1f8cbfd6 New GCCallbacks with additional parameters.
Author: Ilya Tikhonovsky <loislo@chromium.org>
Original issue: http://codereview.chromium.org/1094002

TBR=sgjesse@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 13:11:44 +00:00
kasperl@chromium.org
7d6a3b433f Merge the partial_snapshots branch back into bleeding_edge. For
now, the custom call generator stuff is disabled.
Review URL: http://codereview.chromium.org/1094014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4217 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-23 11:40:38 +00:00
erik.corry@gmail.com
dda96b61c6 Fix formatting around * and &.
Review URL: http://codereview.chromium.org/1000007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4169 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-17 14:53:16 +00:00
vitalyr@chromium.org
6a10a837c0 Add heuristic for flattening strings before comparing them.
Also switched to using CompareChars instead of memcmp since it's
faster than gcc's builtin and on par with msvc's builtin.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-16 12:30:04 +00:00
peter.rybin@gmail.com
ad876956c0 LiveEdit: patch positions in function
Review URL: http://codereview.chromium.org/914003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-15 21:06:51 +00:00
sgjesse@chromium.org
504664365d Refactor the code cache to handle large number of properties on the global object (take 2).
A separate object type for the code cache have been added. This object has two different code caches. The first one (default_cache) is a fixed array organized in the same way as the as the code cache was before. The second cache (global_access_cache) is for code stubs to access the global object. This cache is organized as a hash table taking the property name and code flags as the key.

The reason for separating the global access stubs into a hash table representation is that the number of these is not bounded in the same was as the other types.

This is a remake of r3952 (http://codereview.chromium.org/652119) which have the additional ability to look for the index of code stubs for access to the global object.

BUG=http://code.google.com/p/v8/issues/detail?id=613

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 10:49:41 +00:00
kmillikin@chromium.org
3817a7ba6e Small simplification of #include dependencies.
Remove messages.h from v8.h and include it explicitly in only the few places
it is needed.  Many files relied on getting handles-inl.h implicitly from
messages.h through v8.h, so include handles-inl.h explicitly in v8.h
instead.

Remove zone-inl.h from header files where it is not needed, can be replaced
by a forward declaration, or can be replaced by zone.h (specifically,
factory.h and heap.h).  Include zone.h or zone-inl.h in header files where
it was implicitly included via heap.h or factory.h.  Prefer zone.h over
zone-inl.h in header files where possible by including zone-inl.h in .cc
files.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-09 06:38:33 +00:00
kasperl@chromium.org
95964bd95f Let the callers of V8::ContextDisposedNoticication() know
how many pending context disposals there are.
Review URL: http://codereview.chromium.org/669266

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-08 11:19:20 +00:00
vitalyr@chromium.org
05a74e8131 Add runtime function for string to array conversion.
Review URL: http://codereview.chromium.org/669060

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-04 14:03:08 +00:00
bak@chromium.org
1334adbd40 - Changed the initial size for HashTable.
- Pretenured large expanding hash tables.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-03 16:22:17 +00:00
kasperl@chromium.org
c309a63369 Remove the deprecated context disposal GC heuristic.
Review URL: http://codereview.chromium.org/661458

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-03 11:41:22 +00:00
mikhail.naganov@gmail.com
16b34b8c6e Parametrize C++ splay tree with allocator.
Thus, now there is a "generic" SplayTree and its Zone-bound
specialization ZoneSplayTree.

This is needed for my reimplementation of profiler tree generation in
C++. As generation is performed in a separate thread, Zone can't be
used, because it intentionally not thread-safe.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-02 10:03:38 +00:00
antonm@chromium.org
d4cb1ba3c5 Faster moving FixedArray elements around.
Review URL: http://codereview.chromium.org/660245

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 15:33:30 +00:00
kasperl@chromium.org
a60beefd1b Tweak the new context disposal GC heuristic to cleanly separate
it from the old heuristic (disabled if the new notications are 
used) and make sure to not force a GC if one has already happened
after V8 received the last context disposal notification.
Review URL: http://codereview.chromium.org/660267

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-03-01 08:49:33 +00:00
bak@chromium.org
4766a592ce - Pushed source code for functions into old space.
- Renamed TryFlattenIfNotFlat to TryFlatten.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 14:37:33 +00:00