Commit Graph

255 Commits

Author SHA1 Message Date
yangguo@chromium.org
30e2802e12 Hide heap methods where possible.
Factory is already a friend class of Heap.
We introduce a TestHeap class in cctest.h to access protected methods.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21053 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-29 13:58:55 +00:00
yangguo@chromium.org
5534217099 Make CreateInitialObjects more concise.
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-29 08:25:24 +00:00
yangguo@chromium.org
14f132c2d9 Refactor calls to CALL_HEAP_FUNCTION.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-29 07:02:11 +00:00
yangguo@chromium.org
38b82f40d0 Remove some remnants of MaybeObjects in objects.*.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-28 15:33:16 +00:00
ishell@chromium.org
0628775c4e Fix for a GC-stress failures after r20987.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-25 16:02:50 +00:00
ishell@chromium.org
ce14ab9743 HashTableKey::AsObject() handlified.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-25 13:59:33 +00:00
ishell@chromium.org
fd02e1220c HashTable::New() handlified.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-25 13:06:21 +00:00
yangguo@chromium.org
cb2f43cb14 Always include debugger support.
Motivation: we do not have test coverage for debuggersupport=off.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-25 11:00:37 +00:00
ishell@chromium.org
c8d36c711c Dictionary::New() handlified.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20957 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-25 07:56:13 +00:00
ishell@chromium.org
c0ff5354d2 Reland r20932: "*NumberDictionary::AtNumberPut() handlified."
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-24 10:39:50 +00:00
ishell@chromium.org
7e8f53181f Revert "*NumberDictionary::AtNumberPut() handlified."
This reverts commit r20932 for breaking Mac build.

TBR=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20933 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-24 10:17:10 +00:00
ishell@chromium.org
b95ffe9067 *NumberDictionary::AtNumberPut() handlified.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-24 09:59:44 +00:00
jarin@chromium.org
8c57b45042 Fix C++ type of Factory::NewFixedDoubleArray.
The change fixes the C++ type of Factory::NewFixedDoubleArray to
reflect the empty array case, where we return an empty
FixedArray (rather than FixedDoubleArray).

R=mvstanton@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20918 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-24 05:29:00 +00:00
ishell@chromium.org
4591771820 StringTable::LookupKey() and all callers handlified.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-23 15:43:39 +00:00
verwaest@chromium.org
c9db6148a9 Set code on the SharedFunctionInfo before creating the function.
BUG=
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-22 08:30:09 +00:00
adamk@chromium.org
3308cb5857 ES6: Add support for Map/Set forEach
This implements MapIterator and SetIterator which matches
the same constructs in the ES6 spec. However, these 2
iterators are not exposed to user code yet. They are only
used internally to implement Map.prototype.forEach and
Set.prototype.forEach.

Each iterator has a reference to the OrderedHashTable where
it directly accesses the hash table's entries.

The OrderedHashTable has a reference to the newest iterator
and each iterator has a reference to the next and previous
iterator, effectively creating a double linked list.

When the OrderedHashTable is mutated (or replaced) all the
iterators are updated.

When the iterator iterates passed the end of the data table
it closes itself. Closed iterators no longer have a
reference to the OrderedHashTable and they are removed from
the double linked list. In the case of Map/Set forEach, we
manually call Close on the iterator in case an exception was
thrown so that the iterator never reached the end.

At this point the OrderedHashTable keeps all the non finished
iterators alive but since the only thing we currently expose
is forEach there are no unfinished iterators outside a forEach
call. Once we expose the iterators to user code we will need
to make the references from the OrderedHashTable to the
iterators weak and have some mechanism to close an iterator
when it is garbage collected.

BUG=1793, 2323
LOG=Y
R=adamk@chromium.org
TBR=mstarzinger@chromium.org

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

Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-17 17:45:32 +00:00
ishell@chromium.org
313844d842 Heap::AllocateStringFromOneByte() and major part of its callers handlified.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-17 13:27:02 +00:00
yangguo@chromium.org
c918ccd392 Allocate filler objects in the factory.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-17 13:15:22 +00:00
verwaest@chromium.org
49b19ecd20 Always pass in code to NewFunctionWithoutPrototype
BUG=
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-17 11:57:32 +00:00
verwaest@chromium.org
107a359080 Select function map based on prototype and shared function info.
BUG=
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-17 11:50:22 +00:00
adamk@chromium.org
91618cf1e9 Revert "ES6: Add support for Map/Set forEach"
This reverts https://code.google.com/p/v8/source/detail?r=20823

It broke Windows builds. Will need to find a Windows try bot to figure
out why.

TBR=mstarzinger@chromium.org,arv@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-16 21:19:25 +00:00
adamk@chromium.org
7c300d1f83 ES6: Add support for Map/Set forEach
This implements MapIterator and SetIterator which matches
the same constructs in the ES6 spec. However, these 2
iterators are not exposed to user code yet. They are only
used internally to implement Map.prototype.forEach and
Set.prototype.forEach.

Each iterator has a reference to the OrderedHashTable where
it directly accesses the hash table's entries.

The OrderedHashTable has a reference to the newest iterator
and each iterator has a reference to the next and previous
iterator, effectively creating a double linked list.

When the OrderedHashTable is mutated (or replaced) all the
iterators are updated.

When the iterator iterates passed the end of the data table
it closes itself. Closed iterators no longer have a
reference to the OrderedHashTable and they are removed from
the double linked list. In the case of Map/Set forEach, we
manually call Close on the iterator in case an exception was
thrown so that the iterator never reached the end.

At this point the OrderedHashTable keeps all the non finished
iterators alive but since the only thing we currently expose
is forEach there are no unfinished iterators outside a forEach
call. Once we expose the iterators to user code we will need
to make the references from the OrderedHashTable to the
iterators weak and have some mechanism to close an iterator
when it is garbage collected.

BUG=1793,2323
LOG=Y
TBR=mstarzinger@chromium.org

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

Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-16 21:12:27 +00:00
ishell@chromium.org
dd2062833e Reland r20772 "Handlifying clients of StringTable, step 1."
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-16 14:15:32 +00:00
yangguo@chromium.org
3abbb03c0a Handlify number-related allocators.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-16 14:04:54 +00:00
mstarzinger@chromium.org
e8ad0c3e53 Handlify six more allocators in from the Heap class.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-16 13:35:36 +00:00
mstarzinger@chromium.org
41f986e62b Handlify Heap::AllocateAllocationSite.
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-16 12:54:29 +00:00
dslomov@chromium.org
35a30a5a5f Handlify CodeCache.
R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-16 12:10:56 +00:00
yangguo@chromium.org
17b33fa1da Handlify code allocation.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-16 11:38:56 +00:00
adamk@chromium.org
a44e10cad6 Revert "ES6: Add support for Map/Set forEach"
This reverts commit https://code.google.com/p/v8/source/detail?r=20781.

It broke the Win32 builders.

TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-16 01:03:56 +00:00
adamk@chromium.org
a1af5a2a2f ES6: Add support for Map/Set forEach
This implements MapIterator and SetIterator which matches
the same constructs in the ES6 spec. However, these 2
iterators are not exposed to user code yet. They are only
used internally to implement Map.prototype.forEach and
Set.prototype.forEach.

Each iterator has a reference to the OrderedHashTable where
it directly accesses the hash table's entries.

The OrderedHashTable has a reference to the newest iterator
and each iterator has a reference to the next and previous
iterator, effectively creating a double linked list.

When the OrderedHashTable is mutated (or replaced) all the
iterators are updated.

When the iterator iterates passed the end of the data table
it closes itself. Closed iterators no longer have a
reference to the OrderedHashTable and they are removed from
the double linked list. In the case of Map/Set forEach, we
manually call Close on the iterator in case an exception was
thrown so that the iterator never reached the end.

At this point the OrderedHashTable keeps all the non finished
iterators alive but since the only thing we currently expose
is forEach there are no unfinished iterators outside a forEach
call. Once we expose the iterators to user code we will need
to make the references from the OrderedHashTable to the
iterators weak and have some mechanism to close an iterator
when it is garbage collected.

BUG=1793,2323
LOG=Y
R=adamk@chromium.org, mstarzinger@chromium.org

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

Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-16 00:40:03 +00:00
ishell@chromium.org
cc5c454573 Revert "Handlifying clients of StringTable, step 1."
This reverts commit r20772.

TBR=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-15 15:17:04 +00:00
ishell@chromium.org
be29476f64 Handlifying clients of StringTable, step 1.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-15 14:20:59 +00:00
ishell@chromium.org
610fcfa916 Function allocators, Heap::ReinitializeJSGlobalProxy() and Heap::ReinitializeJSReceiver() handlified. Factory::New<>() added.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-15 11:51:34 +00:00
yangguo@chromium.org
6376579f4d Remove direct calls to number-related allocators from runtime.cc.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-15 11:16:02 +00:00
yangguo@chromium.org
1a91d42058 Remove some direct uses of heap allocators from runtime.cc
R=jarin@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-15 10:59:38 +00:00
mstarzinger@chromium.org
8178dbd1f7 Handlify Heap::AllocateJSArrayStorage and friends.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-14 16:05:19 +00:00
yangguo@chromium.org
b44598b387 Handlify Object::ToObject.
R=bmeurer@chromium.org, mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-14 09:19:09 +00:00
mvstanton@chromium.org
c5eaf80707 Handlify Map::CopyDropDescriptors().
* And contain knowledge better in TransitionArray and DescriptorArray (for example WhitenessWitness is now private to DescriptorArray).
* And remove some factory methods
* And handlify some other things.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-11 12:13:53 +00:00
yangguo@chromium.org
380ae9810e Return MaybeHandle from Invoke.
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-11 10:41:09 +00:00
mvstanton@chromium.org
41b6c8a0f1 Handlefy Descriptor and other code in objects.cc
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20628 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-09 14:26:32 +00:00
mstarzinger@chromium.org
f1a22a0fd2 Handlify all context allocators from the Heap.
R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-09 08:51:46 +00:00
adamk@chromium.org
902ad4a17a Use OrderedHashTables as the backing store of JSSet and JSMap
This also deletes ObjectHashSet as it's no longer used.

BUG=v8:1793
LOG=N
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-08 20:06:35 +00:00
yangguo@chromium.org
4fcc06685f Handlify LookupSingleCharacterStringFromCode.
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20559 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-08 06:45:53 +00:00
svenpanne@chromium.org
c0301105d8 Revert "Handlify deoptimization data allocators."
This reverts r20552, it breaks with snapshot=off.

TBR=mstarzinger@chromium.org
BUG=cctest/test-lockers/ExtensionsRegistration
LOG=n

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-08 06:15:20 +00:00
mstarzinger@chromium.org
2e98bda0c0 Handlify deoptimization data allocators.
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-07 14:27:48 +00:00
mstarzinger@chromium.org
0a11d550c7 Handlify ten allocator functions from the Heap.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-07 12:43:35 +00:00
mstarzinger@chromium.org
87a9c8e93b Handlify six allocator functions from the Heap.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20533 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-07 10:12:54 +00:00
ishell@chromium.org
c9b0492bf5 Callers of ElementsAccessor::Validate() handlified.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20532 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-07 10:00:14 +00:00
adamk@chromium.org
8e9eebeba1 OrderedHashTable implementation with Set and Map interfaces
OrderedHashTable is an insertion-ordered HashTable based on
Jason Orendorff's writeup of a data structure attributed to Tyler Close:
https://wiki.mozilla.org/User:Jorend/Deterministic_hash_tables

It is intended as the new backing store for JSSet/JSMap, as ES6 requires
insertion-order-based iteration. Note, however, that in the interest of
keeping the initial check-in small this patch does not yet include any
iteration support.

This change also doesn't yet touch any existing behavior, but in
a branch I've verified that these structures pass the existing
JSSet/JSMap mjsunit tests.

BUG=v8:1793
LOG=N
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-04 20:41:57 +00:00
yangguo@chromium.org
dd7bb01688 Return MaybeHandle from SetProperty.
R=ishell@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-04 12:06:11 +00:00