v8/test/cctest
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
..
cctest.cc Fixed a few lifetime/ownership issues in cctest/test-api. 2014-01-31 07:29:25 +00:00
cctest.gyp Extend GCMole to also cover cctest files. 2014-04-17 11:57:08 +00:00
cctest.h Update tests to use the new compilation API + related fixes. 2014-04-04 12:36:23 +00:00
cctest.status MIPS: Add big-endian support for MIPS. 2014-04-15 16:39:21 +00:00
gay-fixed.cc Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
gay-fixed.h Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
gay-precision.cc Added precision mode to fast-dtoa. 2010-09-20 09:18:00 +00:00
gay-precision.h Added precision mode to fast-dtoa. 2010-09-20 09:18:00 +00:00
gay-shortest.cc Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
gay-shortest.h Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
log-eq-of-logging-and-traversal.js Fix test-log/EquivalenceOfLoggingAndTraversal 2013-08-26 14:56:23 +00:00
OWNERS Add per-file OWNERS for MIPS-specific cctests 2014-02-04 09:53:26 +00:00
print-extension.cc Various extension-related cleanup and simplifications. 2014-01-17 10:52:00 +00:00
print-extension.h Various extension-related cleanup and simplifications. 2014-01-17 10:52:00 +00:00
profiler-extension.cc Deprecate Start/StopCpuProfiling methods 2014-03-28 09:24:49 +00:00
profiler-extension.h Deprecate Start/StopCpuProfiling methods 2014-03-28 09:24:49 +00:00
test-accessors.cc api accessor store ics should return passed value 2014-02-14 14:13:06 +00:00
test-alloc.cc Make Heap::AllocateRaw*String private. 2014-04-17 14:58:03 +00:00
test-api.cc Grow old generation slower on low-memory devices. 2014-04-17 11:27:45 +00:00
test-assembler-arm64.cc Handlify code allocation. 2014-04-16 11:38:56 +00:00
test-assembler-arm.cc Handlify code allocation. 2014-04-16 11:38:56 +00:00
test-assembler-ia32.cc Handlify code allocation. 2014-04-16 11:38:56 +00:00
test-assembler-mips.cc Handlify code allocation. 2014-04-16 11:38:56 +00:00
test-assembler-x64.cc Handlify code allocation. 2014-04-16 11:38:56 +00:00
test-ast.cc Zonify types in compiler frontend 2014-01-21 16:22:52 +00:00
test-atomicops.cc Introduced Atomic8 and added no-barrier Atomic8 accessors. 2014-04-09 08:20:10 +00:00
test-bignum-dtoa.cc Fix X64 compilation on Windows. 2011-02-03 11:13:04 +00:00
test-bignum.cc Bignum implementation of Strtod. 2010-11-08 11:49:47 +00:00
test-circular-queue.cc Rename some of SamplingCircularQueue methods 2013-09-05 10:31:18 +00:00
test-code-stubs-arm64.cc Rename A64 port to ARM64 port 2014-03-21 09:28:26 +00:00
test-code-stubs-arm.cc Drop IsPregenerated() and allow_stub_calls flag. 2013-11-29 20:49:15 +00:00
test-code-stubs-ia32.cc Drop IsPregenerated() and allow_stub_calls flag. 2013-11-29 20:49:15 +00:00
test-code-stubs-mips.cc MIPS: Add missing cctests of DoubleToIStub (r16322). 2014-01-22 13:44:00 +00:00
test-code-stubs-x64.cc Introduce leap, movzxbp, movzxwp, repmovsp and xchgp for x64 port 2014-03-26 11:17:53 +00:00
test-code-stubs.cc A64 support for DoubleToIStub (truncating). 2014-02-17 15:09:46 +00:00
test-code-stubs.h Arm support for DoubleToIStub (truncating). 2013-08-26 12:24:03 +00:00
test-compiler.cc Heap::AllocateStringFromOneByte() and major part of its callers handlified. 2014-04-17 13:27:02 +00:00
test-condition-variable.cc Improve cctest/test-condition-variable. 2013-09-03 11:27:02 +00:00
test-constantpool.cc Differentate between code target pointers and heap pointers in constant pools. 2014-03-10 19:05:43 +00:00
test-conversions.cc Add support for explicit octal and binary integer literals 2013-07-19 09:57:35 +00:00
test-cpu-ia32.cc Fix the CPU feature detection. 2013-08-26 09:37:39 +00:00
test-cpu-profiler.cc Heap::AllocateStringFromOneByte() and major part of its callers handlified. 2014-04-17 13:27:02 +00:00
test-cpu-x64.cc Fix the CPU feature detection. 2013-08-26 09:37:39 +00:00
test-cpu.cc Replace OS::NumberOfCores() with CPU::NumberOfProcessorsOnline(). 2013-08-28 12:32:56 +00:00
test-dataflow.cc bulk replace Isolate::Current in tests 2013-09-19 09:17:13 +00:00
test-date.cc Use a per-isolate cache for the date object JS bits 2014-03-11 09:04:14 +00:00
test-debug.cc Reland "Move functions from handles.cc to where they belong." 2014-04-16 13:28:11 +00:00
test-declarative-accessors.cc Revert r18451 "Revert r18449 "Reland r18383: More API cleanup." and r18450 "Unbreak build."" since necessary WebKit changes are rolled in Chromium. 2014-01-03 14:31:17 +00:00
test-decls.cc Add --es-staging flag 2014-03-05 10:07:07 +00:00
test-deoptimization.cc Allow map check hoisting in GVN for stable maps. 2014-02-13 10:47:00 +00:00
test-dictionary.cc Use OrderedHashTables as the backing store of JSSet and JSMap 2014-04-08 20:06:35 +00:00
test-disasm-arm64.cc ARM64: Fix cctest/test-disasm-arm64/debug on real hardware. 2014-04-02 15:45:13 +00:00
test-disasm-arm.cc Fix fixed-point vcvt_f64_s32 immediate value encoding 2014-04-04 11:12:40 +00:00
test-disasm-ia32.cc Fix unused variable warnings. 2014-04-16 11:50:24 +00:00
test-disasm-mips.cc bulk replace Isolate::Current in tests 2013-09-19 09:17:13 +00:00
test-disasm-x64.cc Fix unused variable warnings. 2014-04-16 11:50:24 +00:00
test-diy-fp.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-double.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-dtoa.cc Fix compilation on 64-bit Windows, update Visual Studio projects. 2011-02-03 13:29:10 +00:00
test-fast-dtoa.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-fixed-dtoa.cc Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
test-flags.cc Add flags to force or prevent setting of isolate.is_memory_constrained. 2013-09-17 13:48:17 +00:00
test-func-name-inference.cc Heap::AllocateStringFromOneByte() and major part of its callers handlified. 2014-04-17 13:27:02 +00:00
test-fuzz-arm64.cc Rename A64 port to ARM64 port 2014-03-21 09:28:26 +00:00
test-global-handles.cc Remove some uses of MaybeObject methods. 2014-04-16 07:26:34 +00:00
test-global-object.cc Revert r18451 "Revert r18449 "Reland r18383: More API cleanup." and r18450 "Unbreak build."" since necessary WebKit changes are rolled in Chromium. 2014-01-03 14:31:17 +00:00
test-hashing.cc Heap::AllocateStringFromOneByte() and major part of its callers handlified. 2014-04-17 13:27:02 +00:00
test-hashmap.cc Make the hash map test run faster by doing less work. 2009-05-15 13:49:00 +00:00
test-heap-profiler.cc Heap::AllocateStringFromOneByte() and major part of its callers handlified. 2014-04-17 13:27:02 +00:00
test-heap.cc Make Heap::AllocateRaw private. 2014-04-17 13:53:06 +00:00
test-javascript-arm64.cc Rename A64 port to ARM64 port 2014-03-21 09:28:26 +00:00
test-js-arm64-variables.cc Rename A64 port to ARM64 port 2014-03-21 09:28:26 +00:00
test-libplatform-task-queue.cc [platform] Implement a worker pool 2013-12-20 07:52:58 +00:00
test-libplatform-worker-thread.cc [platform] Implement a worker pool 2013-12-20 07:52:58 +00:00
test-libplatform.h [platform] Implement a worker pool 2013-12-20 07:52:58 +00:00
test-list.cc revert thread isolate in PreallocatedStorageAllocationPolicy 2013-09-02 11:39:23 +00:00
test-liveedit.cc bulk replace Isolate::Current in tests 2013-09-19 09:17:13 +00:00
test-lockers.cc Remove usage of deprecated APIs from cctests 2013-11-22 12:43:17 +00:00
test-log-stack-tracer.cc Various extension-related cleanup and simplifications. 2014-01-17 10:52:00 +00:00
test-log.cc New Compilation API, part 1, try 2 2014-03-14 10:20:33 +00:00
test-macro-assembler-arm.cc Handlify code allocation. 2014-04-16 11:38:56 +00:00
test-macro-assembler-ia32.cc Add a utility method to the ia32 macro assembler to move a double immediate into an XMM register. 2014-03-21 12:16:37 +00:00
test-macro-assembler-mips.cc Handlify code allocation. 2014-04-16 11:38:56 +00:00
test-macro-assembler-x64.cc Introduce rolp, rorp, rclp, rcrp, shlp, shrp and sarp for x64 port 2014-03-28 04:55:00 +00:00
test-mark-compact.cc Bump up the boot-up memory limit. 2014-04-17 13:58:51 +00:00
test-mementos.cc Return MaybeHandle from NewRaw???String. 2014-04-03 12:30:08 +00:00
test-microtask-delivery.cc Revert 20313 - "Ship promises and weak collections" 2014-03-31 12:40:32 +00:00
test-mutex.cc Cleanup Mutex and related classes. 2013-08-29 09:58:30 +00:00
test-object-observe.cc Reland "Move functions from handles.cc to where they belong." 2014-04-16 13:28:11 +00:00
test-ordered-hash-table.cc ES6: Add support for Map/Set forEach 2014-04-17 17:45:32 +00:00
test-parsing.cc Heap::AllocateStringFromOneByte() and major part of its callers handlified. 2014-04-17 13:27:02 +00:00
test-platform-linux.cc Revert r16648, r16641, r16638 and r16637. 2013-09-11 18:30:01 +00:00
test-platform-macos.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-platform-tls.cc Keep two empty lines between declarations for cpp files 2013-07-05 09:52:11 +00:00
test-platform-win32.cc Revert r16648, r16641, r16638 and r16637. 2013-09-11 18:30:01 +00:00
test-platform.cc MIPS: Add big-endian support for MIPS. 2014-04-15 16:39:21 +00:00
test-profile-generator.cc Make LeakSanitizer happy, part 1. 2014-02-06 07:16:41 +00:00
test-random-number-generator.cc Fix clang C++11 compiler warning. 2013-09-10 13:39:53 +00:00
test-regexp.cc Heap::AllocateStringFromOneByte() and major part of its callers handlified. 2014-04-17 13:27:02 +00:00
test-reloc-info.cc Replace 'operator*' with explicit 'get' method on SmartPointer 2013-12-09 07:41:20 +00:00
test-representation.cc Generate TypedArrayInitialize builtin in hydrogen. 2013-11-25 14:41:46 +00:00
test-semaphore.cc Fix Mac llvm-gcc42 build after commit r16473. 2013-09-02 12:36:08 +00:00
test-serialize.cc Serializer enable/disable flags need thread safety. 2014-04-17 14:45:06 +00:00
test-socket.cc Cleanup Socket class and remove it from the platform files. 2013-09-04 10:41:51 +00:00
test-spaces.cc Remove Heap::MaxRegularSpaceAllocationSize and use Page::MaxRegularHeapObjectSize instead. 2014-01-23 13:02:27 +00:00
test-strings.cc Heap::AllocateStringFromOneByte() and major part of its callers handlified. 2014-04-17 13:27:02 +00:00
test-strtod.cc Improve reproducibility of test runs. 2014-04-10 07:25:49 +00:00
test-symbols.cc Add filler at the new space top when forcing scavenge. 2014-02-18 16:34:52 +00:00
test-thread-termination.cc Prepare removal of ObjectTemplate::New without Isolate parameter. 2014-01-08 06:53:31 +00:00
test-threads.cc Make LeakSanitizer happy, part 1. 2014-02-06 07:16:41 +00:00
test-time.cc Use std:: on symbols declared in C++-style C headers. 2014-01-14 09:57:05 +00:00
test-types.cc Fix handlification bug in test 2014-04-17 09:30:41 +00:00
test-unbound-queue.cc Make sure files end with exactly one new line and police this in presubmit. 2013-11-22 13:50:39 +00:00
test-unique.cc Make sure files end with exactly one new line and police this in presubmit. 2013-11-22 13:50:39 +00:00
test-utils-arm64.cc Rename A64 port to ARM64 port 2014-03-21 09:28:26 +00:00
test-utils-arm64.h Rename A64 port to ARM64 port 2014-03-21 09:28:26 +00:00
test-utils.cc Remove unused function MoveBytes(). 2013-10-28 09:59:15 +00:00
test-version.cc Update V8 to version 3.0 (re-land r5920). 2010-12-07 11:31:57 +00:00
test-weakmaps.cc Don't run tests that rely on compaction when compaction is turned off. 2014-04-14 13:52:41 +00:00
test-weaksets.cc Don't run tests that rely on compaction when compaction is turned off. 2014-04-14 13:52:41 +00:00
test-weaktypedarrays.cc Mark deprecated APIs with relatively little use as deprecated 2013-11-28 08:21:26 +00:00
testcfg.py Fix test serialization path for windows. 2014-03-26 07:40:32 +00:00
trace-extension.cc Various extension-related cleanup and simplifications. 2014-01-17 10:52:00 +00:00
trace-extension.h Various extension-related cleanup and simplifications. 2014-01-17 10:52:00 +00:00