Commit Graph

157 Commits

Author SHA1 Message Date
yangguo@chromium.org
0f6f621522 Assert external strings in external string table. Remove TODOs.
R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16440 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-30 07:48:04 +00:00
mstarzinger@chromium.org
3e8effb0bd Fix migration checks and extend them to the Scavenger.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-21 18:31:13 +00:00
yangguo@chromium.org
925375520c Rip out infrastructure for deferred stack trace formatting.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-23 07:41:46 +00:00
mvstanton@chromium.org
67d9051bcd Create AllocationSite objects, pointed to by AllocationSiteInfo.
This creates a platform where we can do additional things with allocation sites,
other than just aid in reducing array transitions.

BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-08 10:02:16 +00:00
loislo@chromium.org
53eb53f4af CPUProfiler: It is not clear why we are using Handle<Object> for scriptId. Lets flip it into Smi/int.
By the nature it is integer. So we can work with it as with Smi internaly and use int in the external API.

BUG=none
TEST=existing tests
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15327 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-25 14:57:47 +00:00
mstarzinger@chromium.org
ade5b02606 Lower limit for external allocation and improve tracing.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-19 17:01:43 +00:00
danno@chromium.org
61a23ceb4d Refactor only: Rename JSGlobaPropertyCell to PropertyCell
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-14 16:06:12 +00:00
danno@chromium.org
1b89cbf817 Separate Cell and PropertyCell spaces
This makes it possible to store additional information on property cells, for example Type and optimized Code dependencies.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-12 15:03:44 +00:00
yangguo@chromium.org
7f8a3d803c Make assertion scopes thread safe.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-06-03 15:32:22 +00:00
mvstanton@chromium.org
2d902c12a7 Parallel compilation fix: the optimizer thread shouldn't change the allow allocation state on AssertNoAllocation scopes.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14551 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-06 10:59:17 +00:00
dcarney@chromium.org
2e856d2c16 expose AssertNoAllocation to api
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-05-02 20:28:02 +00:00
yangguo@chromium.org
49ce7642be Do not dereference handles during relocation.
R=hpayer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-26 07:35:07 +00:00
ulan@chromium.org
dcb3c6301b Propagate OOM exception instead of crashing in CALL_HEAP_FUNCTION_PASS_EXCEPTION macro.
R=jkummerow@chromium.org
BUG=webkit/fast/js/concat-large-strings-crash.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14358 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-19 15:55:34 +00:00
ulan@chromium.org
5a21512936 Handle retry-after-gc failures within KeyedLoadIC::Load and KeyedStoreIC::Store.
Returning retry-after-gc failure from these functions causes them to be
re-executed after ic state change, which breaks stub computation assumptions.

R=verwaest@chromium.org
BUG=222301
TEST=mjsunit/array-bounds-check-removal.js --gc_interval=10 in x64.debug

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-18 08:14:59 +00:00
jkummerow@chromium.org
586c4e74b6 Replace OS::MemCopy with OS::MemMove (just as fast but more flexible).
Review URL: https://codereview.chromium.org/13932006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14280 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-16 12:30:51 +00:00
hpayer@chromium.org
2345bdbeb3 Implement direct allocation in old data space infrastructure.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-15 11:52:34 +00:00
rossberg@chromium.org
2657e432e4 ES6 symbols: implement name property
Adds string-valued name property to symbols, and uses it for pretty-printing.

Requires allocating symbols in pointer space, with a custom iterator to skip the unboxed hash.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-22 16:51:28 +00:00
dcarney@chromium.org
fbe34d4ba5 remove latin-1 flag
R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-13 20:04:50 +00:00
hpayer@chromium.org
b9989623a7 Added pretenuring of array literals test.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-07 14:00:53 +00:00
mvstanton@chromium.org
c4caf766bf Allocation Info Tracking, continued.
Addresses missing cases for array literals.
Adds support for "new Array()" call sites. This isn't complete yet, I have to run with --noinline_new.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 16:06:34 +00:00
rossberg@chromium.org
55f93b5532 Renamed "symbols" to "internalized strings" throughout the code base,
in preparation of the introduction of ES6 'symbols' (aka private/unique names).

The SymbolTable became the StringTable. I also made sure to adapt all comments. The only remaining use of the term "symbol" (other than unrelated uses in the parser and such) is now 'NewSymbol' in the API and the 'V8.KeyedLoadGenericSymbol' counter, changing which might break embedders.

The one functional change in this CL is that I removed the former 'empty_string' constant, since it is redundant given the 'empty_symbol' constant that we also had (and both were used inconsistently).

R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 17:03:34 +00:00
ulan@chromium.org
744d61ebe7 Fix clearing of dead dependent codes and verify weak embedded maps on full GC.
BUG=172488,172489
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-04 10:56:50 +00:00
yangguo@chromium.org
451ed2f2cf Remove some ascii checks in advance of latin-1 release
BUG=

Review URL: https://chromiumcodereview.appspot.com/11880017
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13399 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-16 12:52:27 +00:00
yangguo@chromium.org
eadcc1c10c Reland r13188, r13194, r13256 (Deferred formatting of error stack trace during GC).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-14 13:19:27 +00:00
jkummerow@chromium.org
aee9febccc Some more instrumentation to narrow down Failure leaks.
The basic idea is to tag OOM-Failure objects with an ID indicating where they were created. This requires changes to equality comparisons.

Note to MIPS folks: I'm planning to revert this CL in a couple of days, so feel free to skip porting the platform-specific changes.

BUG=chromium:156010

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-09 12:29:06 +00:00
yangguo@chromium.org
45f20e366a Introduce ENABLE_LATIN_1 compile flag
Mostly a bunch of renaming when flag is disabled.

R=yangguo@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11759008
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-09 10:30:54 +00:00
yangguo@chromium.org
61f4012989 Use C++ style type casts.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13326 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-01-07 15:02:56 +00:00
yangguo@chromium.org
2f821f1ed9 Revert r13188, r13194, r13256 (Deferred formatting of error stack trace during GC).
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-27 13:12:27 +00:00
yangguo@chromium.org
9569b20db2 Replace the use CharacterStreams in Heap::AllocateSymbolInternal and String::ComputeHash
R=yangguo@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/11593007
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-19 13:27:20 +00:00
yangguo@chromium.org
72dfb27909 Fire 'stack' getter of error objects after GC.
BUG=v8:2340

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-11 10:14:01 +00:00
ulan@chromium.org
8a1a926e07 Correctly handle AdjustAmountOfExternalAllocatedMemory(0).
R=yangguo@chromium.org
BUG=v8:2440

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-12-03 14:31:11 +00:00
yangguo@chromium.org
36f5b6d41f Rename IsAsciiRepresentation
This is a straight rename:

IsAsciiRepresentation -> IsOneByteRepresentation
IsAsciiRepresentationUnderneath -> IsOneByteRepresentationUnderneath
AllocateRawAsciiString -> AllocateRawOneByteString
AllocateStringFromAscii -> AllocateStringFromOneByte

R=yangguo@chromium.org,
BUG=

Review URL: https://chromiumcodereview.appspot.com/11308066
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-21 10:01:05 +00:00
yangguo@chromium.org
3699616609 Rename SeqAsciiString
This is a straight rename:

NewRawAsciiString -> NewRawOneByteString
SeqAscii -> SeqOneByte

SeqOneByteString cannot yet take non-ascii data.

R=yangguo@chromium.org,
BUG=

Review URL: https://chromiumcodereview.appspot.com/11411005
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-15 13:31:27 +00:00
mstarzinger@chromium.org
b55988625d Get rid of obsolete unchecked accessors.
R=yangguo@chromium.org
BUG=v8:1490

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 11:52:37 +00:00
verwaest@chromium.org
d04a1fff1f Keep track of the first non-ascii word/char to avoid redoing the work.
Review URL: https://chromiumcodereview.appspot.com/11194053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 15:08:11 +00:00
verwaest@chromium.org
72424b3987 Move DescriptorArray into the map.
Review URL: https://chromiumcodereview.appspot.com/11188031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 13:04:49 +00:00
mvstanton@chromium.org
b3c0ed8245 Enable --verify-heap in release mode
R=mstarzinger@chromium.org
BUG=v8:2120

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 11:41:14 +00:00
erik.corry@gmail.com
5a8d1764bc Refactoring of snapshots. This simplifies and improves
the speed of deserializing code.  The current startup
time improvement for V8 is around 6%, but code deserialization
is speeded up disproportionately, and we will soon have more
code in the snapshot.
* Removed support for deserializing into large object space.
  The regular pages are 1Mbyte now and that is plenty.  This
  is a big simplification.
* Instead of reserving space for the snapshot we actually
  allocate it now.  This removes some special casing from
  the memory management and simplifies deserialization since
  we are just bumping a pointer rather than calling the
  normal allocation routines during deserialization.
* Record in the snapshot how much we need to boot up and
  allocate it instead of just assuming that allocations in
  a new VM will always be linear.
* In the snapshot we always address an object as a negative
  offset from the current allocation point.  We used to
  sometimes address from the start of the deserialized data,
  but this is less useful now that we have good support for
  roots and repetitions in the deserialization data.
* Code objects were previously deserialized (like other
  objects) by alternating raw data (deserialized with memcpy)
  and pointers (to external references, other objects, etc.).
  Now we deserialize code objects with a single memcpy,
  followed by a series of skips and pointers that partially
  overwrite the code we memcopied out of the snapshot.
  The skips are sometimes merged into the following
  instruction in the deserialization data to reduce dispatch
  time.
* Integers in the snapshot were stored in a variable length
  format that gives a compact representation for small positive
  integers.  This is still the case, but the new encoding can
  be decoded without branches or conditional instructions,
  which is faster on a modern CPU.
Review URL: https://chromiumcodereview.appspot.com/10918067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 11:16:56 +00:00
yangguo@chromium.org
5ac2a5d22e Revert r12430, r12432, r12433 (basic support for Latin1).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-04 12:23:22 +00:00
yangguo@chromium.org
74f06b1f99 Add basic support for Latin1 to the API.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 15:06:36 +00:00
ulan@chromium.org
fb7345cdfd Add flag to trace the amount of external memory.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 14:17:35 +00:00
ulan@chromium.org
b49b32599b Make AdjustAmountOfExternalAllocatedMemory() more robust.
Do not crash if called from a thread without V8 isolate, reset the external
memory counters in case of overflow, bump the external allocation limit.

This will allow us to track typed array allocation and deallocation in WebKit.

BUG=v8:2022,122097,42342
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 13:49:13 +00:00
mstarzinger@chromium.org
3bb994c4e4 Make test-serialize resilient against --gc-interval.
R=erik.corry@gmail.com
TEST=cctest/test-serialize (--gc-interval=100)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 09:43:05 +00:00
sanjoy@chromium.org
693c7643d2 Optimize functions on a second thread.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 18:58:23 +00:00
yangguo@chromium.org
50063d30c4 Ensure integrity of ASCII strings.
BUG=v8:2128
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-05-22 12:49:20 +00:00
erik.corry@gmail.com
a3629daa2c Fix external allocated memory accounting to use 64 bit values on
64 bit architectures.
Review URL: https://chromiumcodereview.appspot.com/10020032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-11 09:23:57 +00:00
yangguo@chromium.org
5ce562cda8 Reland r10908 (Ensure consistent result of transcendental function0.)
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-05 08:17:16 +00:00
yangguo@chromium.org
f2699b66cf Revert r10908 due to flakiness and crashes.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-02 15:00:52 +00:00
yangguo@chromium.org
12f2099993 Ensure consistent result of transcendental functions.
BUG=
TEST=regress-transcendental.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-02 14:33:15 +00:00
vegorov@chromium.org
fbc230e42b Ensure that executable pages are properly guarded.
Split executable memory chunks into two pieces: header with all metadata (protection: RW) and body (protection: RWX). Separate header from metadata with a guard page and add a guard page after the page body.

R=erik.corry@gmail.com
BUG=http://crbug.com/115151

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-23 12:11:24 +00:00