Commit Graph

212 Commits

Author SHA1 Message Date
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
kasperl@chromium.org
4abae7a728 Add an explicit API entry to notify V8 that one or more
contexts have been disposed. 
Review URL: http://codereview.chromium.org/661173

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 11:51:33 +00:00
kasperl@chromium.org
57f47e704f Add information about time spent in external callback to
traces produces with --trace-gc.
Review URL: http://codereview.chromium.org/661170

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 08:27:20 +00:00
sgjesse@chromium.org
05ae9effa3 Revert r3952
TBR=ager@chromium.org
Review URL: http://codereview.chromium.org/660086

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 15:43:27 +00:00
sgjesse@chromium.org
8398287070 Refactor the code cache to handle large number of properties on the global object.
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.

BUG=613
Review URL: http://codereview.chromium.org/652119

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-25 14:24:44 +00:00
lrn@chromium.org
3135110af8 IA32: Native access to TranscendentalCache for sin/cos.
Review URL: http://codereview.chromium.org/652041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-23 10:29:02 +00:00
whesse@chromium.org
2074e4847d Add integer casts to make v8 compile without warnings on 64-bit Visual Studio
Review URL: http://codereview.chromium.org/650140

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-22 11:42:46 +00:00
serya@chromium.org
862909e762 Review URL: http://codereview.chromium.org/561049
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-08 13:44:49 +00:00
serya@chromium.org
0045327b7d Review URL: http://codereview.chromium.org/555164
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-02 18:35:53 +00:00
erik.corry@gmail.com
90045ddd5e Another step on the way to context snapshots. We can now refer to
objects in the startup heap from a partial snapshot.  This happens
through the partial snapshot cache.  A startup snapshot and a
partial snapshot are created together so that the startup snapshot
contains the partial snapshot cache entries needed.
Review URL: http://codereview.chromium.org/548149

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-27 08:25:48 +00:00
antonm@chromium.org
29af9c54a4 Merge ObjectIterator::has_next and ObjectIterator::next methods.
This reduces chances of improper usage, see http://code.google.com/p/v8/issues/detail?id=586
for more details.

BUG=586

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3696 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-25 22:53:18 +00:00
erik.corry@gmail.com
bc334df1a8 * Improve the interface to the memory-reservation functionality.
* Add a test case that generates a serialization of a single flat string.
Review URL: http://codereview.chromium.org/542073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-14 14:46:31 +00:00
antonm@chromium.org
51a0cf8a71 Compact map space when doing mark-sweep if after collection size of map space would
drop below threshold.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-13 19:16:07 +00:00
erik.corry@gmail.com
612d9b82f0 Add some interfaces to the GC that allow us to reserve space. This is needed
for partial snapshots.  After reserving space we can be sure that allocations
will happen linearly (no GCs and no free-list allocation).  This change also
contains the start of the partial snapshot support, which, however is not yet
completed or tested.
Review URL: http://codereview.chromium.org/545026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-12 15:16:23 +00:00
bak@chromium.org
1f3eba4470 - Adjust the number to string cache based on the max semispace size.
Flushed at compacting mark sweep.
- Simplified FindEntry by eliminating the counter.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-01-06 11:19:28 +00:00
ager@chromium.org
2409b4b7ba Revert r3514 and r3515. The new cache is too large for some tests
that attempt to run with a small heap.  Additionally, it can
potentially keep a lot of string data alive and it is never flushed.
Can we make it grow dynamically if used so that we can still start the
VM with a small heap size?
Review URL: http://codereview.chromium.org/503081

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 13:07:27 +00:00
bak@chromium.org
6742d62c30 - Increased size of number string cache.
- Change the instruction order for inlined allocation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3514 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-22 11:35:05 +00:00
antonm@chromium.org
f8b9e6dd5b Force mark sweep instead of compcation if size of map space is too big to allow forward pointers encoding.
Review URL: http://codereview.chromium.org/507025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3497 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-18 13:38:09 +00:00
kasperl@chromium.org
914d4f801d Optimize the allocation of small, non-nested literal
arrays and argument objects on IA-32.
Review URL: http://codereview.chromium.org/503042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 15:35:15 +00:00
sgjesse@chromium.org
44b7c59eb5 Extend the maximum size map space
On 32-bit the maps are now aligned on a 32-byte boundary in order to encode more maps during compacting GC. The actual size of a map on 32-bit is 28 bytes making this change waste 4 bytes per map.

On 64-bit the encoding for compacting GC is now using more than 32-bits and the maps here are still pointer size aligned. The actual size of a map on 64-bit is 48 bytes and this change does not intruduce any waste.

My choice of 16 bits for kMapPageIndexBits for 64-bit should give the same maximum number of pages (8K) for map space. As maps on 64-bit are larger than on 32-bit the total number of maps on 64-bit will be smaller than on 32-bit. We could consider raising this to 17 or 18.

I moved the kPageSizeBits to globals.h as the calculation of the encoding really depended on this.

There are still an #ifdef/#endif in objects.h and this constant could be moved to globaks.h as well, but I kept it together with the related constants.

All the tests run in debug mode with additional options --gc-global --always-compact as well (except for a few tests on which also fails before this change when run with --gc-global --always-compact).

BUG=http://code.google.com/p/v8/issues/detail?id=524
BUG=http://crbug.com/29428
TEST=test/mjsunit/regress/regress-524.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3481 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-17 08:53:18 +00:00
kasperl@chromium.org
b1721d4c3e Improve performance of allocating closures for nested
functions by allocating them in new space without
entering the runtime system.
Review URL: http://codereview.chromium.org/506037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-16 15:43:20 +00:00
ager@chromium.org
483828660d Reapply keyed load cache probing in generated code. I introduced a
bug just before committing which broke snapshot builds.  The code is
nearly identical to the previous submit.

TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/491004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 15:10:50 +00:00
ager@chromium.org
1a6893cda9 Revert keyed load cache probing in generated code.
Crashes on Windows.

TBR=erik.corry@gmail.com
Review URL: http://codereview.chromium.org/488006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 12:52:28 +00:00
ager@chromium.org
87496c61aa Probe keyed load cache in generic keyed load stub.
Only implemented on ia32 and x64 for now.  The generic keyed load stub
on arm is falling behind and it is time to fix that, but that will be
a separate change.


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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-10 09:21:23 +00:00
vitalyr@chromium.org
41eb2f22d0 External string table.
Instead of weak handles external strings use a separate table.  This
table uses 5 times less memory than weak handles.  Moreover, since we
don't have to follow the weak handle callback protocol we can collect
the strings faster and even on scavenge collections.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-09 14:32:45 +00:00
christian.plesner.hansen@gmail.com
cbce986ff0 Changed recording of heap stats on OOM to store data directly in local
variables rather than in a stack-allocated struct.  The struct field
values turned out not to be available in minidumps.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-04 10:18:30 +00:00
ager@chromium.org
2707fc2eb8 Fix Windows build.
TBR=sgjesse@chromium.org
Review URL: http://codereview.chromium.org/466018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 11:34:45 +00:00
christian.plesner.hansen@gmail.com
1d9eac1b7c Added recording of heap and global handle stats in a stack-allocated
struct on fatal out of memory.  This should cause the information to
be included in minidumps so we can get a better idea of the state of
v8 on OOMs.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-12-03 10:16:37 +00:00
lrn@chromium.org
d4d2277e2e Fast-compiler: Add stack limit checks to back edges of while, do-while and for.
A few other tweaks.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3355 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-25 09:05:30 +00:00
sgjesse@chromium.org
eb4d261e24 Remove the different length string types
The different length string types was used to encode the string length and the hash in one field. This is now split into two fields one for length and one for hash. The hash field still encodes the array index of the string if it has one. If an array index is encoded in the hash field the string length is added to the top bits of the hash field to avoid a hash value of zero.

On 32-bit this causes an additional 4 bytes to be used for all string objects. On 64-bit this will be half on average dur to pointer alignment.
Review URL: http://codereview.chromium.org/436001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-24 14:10:06 +00:00
erik.corry@gmail.com
43e8d5fa7f Some optimizations for packer.js.
Review URL: http://codereview.chromium.org/409007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-20 10:11:45 +00:00
sgjesse@chromium.org
851b9b2f73 Remove sliced string string type
As a first step to reduce the complexity of the string hierachy the sliced string type is removed. Whenever a sub-string is created it is allocated as a fresh flat string.
Review URL: http://codereview.chromium.org/385004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-10 13:23:05 +00:00
christian.plesner.hansen@gmail.com
930ab041a8 Made iteration of global handles more efficient on scavenges.
Review URL: http://codereview.chromium.org/355041


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 15:12:36 +00:00
sgjesse@chromium.org
41d6cae46d Fix issue 493: Infinite loop when debug break is set when entering function.apply.
In the generated code for function.apply there was a loop checking the stack limit for interruption. This loop would call into the runtime system to handle interuption and keep running until there was no interruption. However if the interuption was debug break the runtime system would never clear the interruption as debug break is prevented in builtins are prevented and the assumption here was that returning with the debug break flag set would move execution forward.

Renamed initial_jslimit and initial_climit to real_jslimit and real_climit. Renamed a few external references related to the stack limit as well.

Exposed the real stack limit to generated code to make the stack check when entering function.apply use the real stack limit and not the stack limit which is changed to signal interruption.

Added the real stack limit to the roots array.

BUG=http://code.google.com/p/v8/issues/detail?id=493
TEST=cctest/test-debug/DebugBreakFunctionApply
Review URL: http://codereview.chromium.org/345048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-11-05 13:59:40 +00:00
erik.corry@gmail.com
fb2317b63b New snapshot framework. Doesn't work on ARM yet (code targets
are different).  Is able to deserialize the whole heap and run
some stuff.  Not available as the primary snapshot system yet.
Review URL: http://codereview.chromium.org/335009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-27 11:54:01 +00:00
mikhail.naganov@gmail.com
5379d81745 Heap profiler improvements.
- account code objects in retainers profile;
- differentiate between function boilerplates and closures;
- simplify code;

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-26 10:51:30 +00:00
ager@chromium.org
9ee631338e Allow resource constraints to specify the max committed new space size
when using snapshots.

The alignment of new space has to match the alignment in the snapshot,
but the max committed amount of memory does not.

For now, we assume that the default semispace size is always used in a
snapshot.
Review URL: http://codereview.chromium.org/300036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-21 15:03:34 +00:00
kbr@chromium.org
46e6297e3e Added infrastructure for optimizing new CanvasArray types in WebGL
specification under development. The optimizations are patterned after
those previously done for CanvasPixelArray. This CL adds all of the
necessary framework but continues to use the generic KeyedLoadIC and
KeyedStoreIC code, to create a baseline for benchmarking purposes. The
next CL will add the optimized ICs to ic-ia32.cc and ic-x64.cc.

These new CanvasArray types have different semantics than
CanvasPixelArray; out-of-range values are clamped via C cast
semantics, which is cheaper than the clamping behavior specified by
CanvasPixelArray. Out-of-range indices raise exceptions instead of
being silently ignored.

As part of this work, pulled FloatingPointHelper::AllocateHeapNumber
up to MacroAssembler on ia32 and x64 platforms. Slightly refactored
KeyedLoadIC and KeyedStoreIC. Fixed encoding for fistp_d on x64 and
added a few more instructions that are needed for the new ICs. The
test cases in test-api.cc have been verified by hand to exercise all
of the generated code paths in the forthcoming specialized ICs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 15:26:17 +00:00
ager@chromium.org
390fd2a3b8 Add an API to V8 to get simple heap statistics.
Review URL: http://codereview.chromium.org/261037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-20 07:51:49 +00:00
antonm@chromium.org
5e4ad0254c Do not do post GC processing for scavenges.
Typically there is no or few global handles to delete (only manually deleted, but those might be
reused).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-16 12:11:59 +00:00
whesse@chromium.org
35cf7a24ff Recommit coderanges putting code objects within a 2 GB range, reserving only a 256 MB range of virtual memory for the code range.
Review URL: http://codereview.chromium.org/243087

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-05 11:16:25 +00:00
christian.plesner.hansen@gmail.com
2c51696fc3 Changed Object.keys to return strings for element indices.
Review URL: http://codereview.chromium.org/246077


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3012 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-02 13:43:16 +00:00
whesse@chromium.org
1350d0cfb9 Revert change r3004, issue http://codereview.chromium.org/244022, because Linux 64-bit Chrome crashes with more than 10 tabs. Linux may not like 10 processes, each reserving 2 GB of virtual address space.
Review URL: http://codereview.chromium.org/246064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-01 15:18:05 +00:00
whesse@chromium.org
48e6d4706f Allocate all executable code within a 2 GB code range.
Review URL: http://codereview.chromium.org/244022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3004 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-10-01 09:29:38 +00:00
mikhail.naganov@gmail.com
abc0bd46f6 Add initial version of retainers heap profile.
The profile is taken together with constructors profile. In theory, it
should represent a complete heap graph. However, this takes a lot of memory,
so it is reduced to a more compact, but still useful form. Namely:

 - objects are aggregated by their constructors, except for Array and Object
   instances, that are too hetereogeneous;

 - for Arrays and Objects, initially every instance is concerned, but then
   they are grouped together based on their retainer graph paths similarity (e.g.
   if two objects has the same retainer, they are considered equal);

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-16 13:41:24 +00:00
erik.corry@gmail.com
be70d6fc4d Cache the results of slow math operations on machines that don't
have hardware fpu instructions to execute them.
Review URL: http://codereview.chromium.org/179059

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-09-01 09:03:58 +00:00
lrn@chromium.org
9230ad29eb ARM native regexps.
Review URL: http://codereview.chromium.org/173567


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-31 12:40:37 +00:00
erik.corry@gmail.com
369214c159 Use a root array register for constant loads and stack guards on x64.
This only wins us around 1% in performance, but it makes the code more
compact.  We don't currently have a way to represent in the virtual
frame that a slot contains a value from the root array.  Adding this
would probably make the code more compact.
Review URL: http://codereview.chromium.org/174639

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-31 08:57:36 +00:00
erik.corry@gmail.com
a29d4e6762 * Make stack/preemption guard faster on ARM by putting stack
limit in the roots array.
Review URL: http://codereview.chromium.org/174517

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 10:27:32 +00:00
ager@chromium.org
11b317d94f Only pass idle notifications on from the API if V8 has been
initialized.

Minor cleanups.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-26 08:13:27 +00:00
mike@belshe.com
6f3c50460a Update the Idle collector to do a full GC
after being idle for some time.

Remove the default argument from CollectAllGarbage.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-25 02:54:39 +00:00
erik.corry@gmail.com
038f9074bc Reapply ARM root array change to reduce const pool size
by using r10 to point to a list of common root objects.
This time we also disable a debugger test on ARM that
has never worked, but with this change sometimes
crashes.
Review URL: http://codereview.chromium.org/174317

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2744 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-24 11:57:57 +00:00
ager@chromium.org
fdf70d37fa Land change to bail out from post garbage collection processing if
another post gc processing was trigger because of weak callbacks.

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


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-21 08:52:24 +00:00
feng@chromium.org
855c654b25 Add LowMemoryNotification to the API on Android platform.
Android system provides a unique feature that it sends a notification to the
browser in low memory condition, and the browser cleans up cache and frees
resources. Forcing a GC in low memory condition can free DOM objects and also
can shrink the old spaces.

This patch addresses the last comment in 
http://codereview.chromium.org/173016/show

	
Mads Ager 2009/08/19 17:24:23 
I would prefer to not use the flags to signal that a compacting collection is
requested.

TBR = ager
Review URL: http://codereview.chromium.org/173102

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2725 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-20 00:07:19 +00:00
ager@chromium.org
0efbd40baf Add support for forceful termination of JavaScript execution.
The termination is achieved by throwing an exception that is uncatchable by JavaScript exception handlers.
Review URL: http://codereview.chromium.org/174056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-19 15:14:11 +00:00
whesse@chromium.org
e9365fb39b Increase new space size and limits on 64-bit platforms.
Review URL: http://codereview.chromium.org/171105

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2707 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 11:26:14 +00:00
feng@chromium.org
33fb11c12f Revert commit 2701 per Erik Corry's request.
Original CL:

http://codereview.chromium.org/171041
Review URL: http://codereview.chromium.org/171089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-18 00:12:26 +00:00
whesse@chromium.org
349dc04a5d Use root array to load roots in generated ARM code.
This cuts down on code size and reloc work.
Review URL: http://codereview.chromium.org/171041

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-17 14:31:49 +00:00
bak@chromium.org
bd5b5e52fc - Added simple memory reduction behavior for IdleNotification.
- This also include a one line change approved by lrh.
     http://codereview.chromium.org/164469

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-13 12:03:42 +00:00
lrn@chromium.org
fd8b376989 X64: Reenabled RSet.
Review URL: http://codereview.chromium.org/160453


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-08-03 11:05:26 +00:00
antonm@chromium.org
0d2c81584b Compile precanned answers for the case of failed interceptor for some combinations.
Review URL: http://codereview.chromium.org/140069

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2577 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-29 12:34:21 +00:00
iposva@chromium.org
1ce28eda0b - Expose CanvasPixelArray functionality directly in JavaScript
indexed property accesses.
- The IC stubs have not been updated to handle these directly, but
  at least we do not have to leave the VM to access bytes.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-28 08:43:51 +00:00
ager@chromium.org
2183309385 Introduce a external allocation limit.
If V8 is holding on to a lot of external memory, we attempt to clean
it up even if we do not get an allocation failure.  Since tiny V8
objects can hold on to a lot of external memory, we might run out of
external memory while waiting for a normal allocation failure.
Review URL: http://codereview.chromium.org/155916

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-22 10:01:25 +00:00
feng@chromium.org
d52990b2e2 Add a trace_gc_verbose flag.
The flag is only turned on when --trace_gc is one. It prints out used and available bytes in each space. To enable it, ENABLE_LOGGING_AND_PROFILING must be defined.

This is a mini version of --heap_stats, but don't need DEBUG macro to be turned on.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2449 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-13 21:24:54 +00:00
kmillikin@chromium.org
d0c35af612 Create a new paged heap space for global property cells. The new
space is similar to map space in that it has fixed-size objects.  A
common superclass for a space with fixed size objects is used for the
map space and cell space.

Allocate all cells in cell space.  Handle it during all GCs.  Modify
the free-list node representation (so that the size is not at a fixed
offset in all cells) to allow two-pointer free-list nodes.  Clean up
some stuff in the MC collector.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-09 11:13:08 +00:00
erik.corry@gmail.com
8f73ae0325 * Move almost all roots into an array ready for use by a constant-pool
register on ARM.
* Make some compile-time loops into run-time loops for compactness.
Review URL: http://codereview.chromium.org/149324

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-08 19:12:58 +00:00
whesse@chromium.org
d53e5f8d8a X64: Remove optimistic smi operations on non-smis. They cannot be undone on X64.
Review URL: http://codereview.chromium.org/151200

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-03 09:24:53 +00:00
bak@chromium.org
9aa0f380a6 Fixed arm/mac errors and presubmitting 2324.
Review URL: http://codereview.chromium.org/151193

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-02 06:50:43 +00:00
ager@chromium.org
e75a173ff7 Revert r2324 until we can fix build and test errors.
TBR=bak@chromium.org

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 16:49:54 +00:00
bak@chromium.org
5cbb209425 Removed virtual behavior from Dictionaries.
Review URL: http://codereview.chromium.org/150168

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2324 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2009-07-01 15:38:25 +00:00