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: https://v8.googlecode.com/svn/branches/bleeding_edge@20857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix breakage on V8 Linux - nosse2

This was introduced by https://code.google.com/p/v8/source/detail?r=20857

R=adamk@chromium.org
TBR=mstarzinger@chromium.org

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

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
MIPS: Serializer enable/disable flags need thread safety.

Port r20855 (ac70e129)

BUG=
R=plind44@gmail.com

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Update CheckBothSmi, CheckInteger32ValidSmiValue, CheckUInteger32ValidSmiValue, SmiAddConstant, SmiNot, AddSmiField and Test to support x32 port.

R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Return int64_t instead of intptr_t for RootRegisterDelta and support x32 as well.

R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Switch CPU profile start/stop markers to monotonic time.

LOG=N
BUG=363976
R=bmeurer@chromium.org, yurys@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix interpreted-regexp test.

TBR=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fix field type handling in load elimination.

Drive-by-fix: map_set() must return a pointer to the UniqueSet
instead of a copy.

R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Introduce exception object and remove some uses of MaybeObject::IsFailure().

R=bmeurer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Improve code generation for bounds checks.

R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Set code on the SharedFunctionInfo before creating the function.

BUG=
R=ishell@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Make sure to clear any previously collected field maps.

TEST=http://www.chaostoperfection.com/
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Cons string maps must be marked as unstable.

R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@20875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00