v8/test/cctest
vogelheim@chromium.org a42612b4a7 Change ScriptCompiler::CompileOptions to allow for two 'cache' modes
(parser or code) and to be explicit about cache consumption or production
(rather than making presence of cached_data imply one or the other.)

Also add a --cache flag to d8, to allow testing the functionality.

-----------------------------
API change

Reason: Currently, V8 supports a 'parser cache' for repeatedly executing the same script. We'd like to add a 2nd mode that would cache code, and would like to let the embedder decide which mode they chose (if any).

Note: Previously, the 'use cached data' property was implied by the presence of the cached data itself. (That is, kNoCompileOptions and source->cached_data != NULL.) That is no longer sufficient, since the presence of data is no longer sufficient to determine /which kind/ of data is present.

Changes from old behaviour:

- If you previously didn't use caching, nothing changes.
Example:
  v8::CompileUnbound(isolate, source, kNoCompileOptions);

- If you previously used caching, it worked like this:

  - 1st run:
  v8::CompileUnbound(isolate, source, kProduceToCache);
  Then, source->cached_data would contain the
  data-to-be cached. This remains the same, except you
  need to tell V8 which type of data you want.
  v8::CompileUnbound(isolate, source, kProduceParserCache);

  - 2nd run:
  v8::CompileUnbound(isolate, source, kNoCompileOptions);
  with source->cached_data set to the data you received in
  the first run. This will now ignore the cached data, and
  you need to explicitly tell V8 to use it:
  v8::CompileUnbound(isolate, source, kConsumeParserCache);
-----------------------------

BUG=
R=marja@chromium.org, yangguo@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-07-16 12:18:33 +00:00
..
cctest.cc Buildfix for windows after r22180 2014-07-03 07:57:29 +00:00
cctest.gyp Add mips64 port. 2014-07-09 11:08:26 +00:00
cctest.h Change ScriptCompiler::CompileOptions to allow for two 'cache' modes 2014-07-16 12:18:33 +00:00
cctest.status Disabling flakes.Filed 3433, 3434, 3435. 2014-07-11 11:20:37 +00:00
DEPS Add DEPS files and run checkdeps in presubmit check 2014-06-03 13:39:42 +00:00
gay-fixed.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
gay-fixed.h Dtoa for fixed notation. 2010-05-05 13:51:27 +00:00
gay-precision.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
gay-precision.h Added precision mode to fast-dtoa. 2010-09-20 09:18:00 +00:00
gay-shortest.cc Use full include paths everywhere 2014-06-03 08:12:43 +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 Use full include paths everywhere 2014-06-03 08:12:43 +00:00
print-extension.h Use full include paths everywhere 2014-06-03 08:12:43 +00:00
profiler-extension.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
profiler-extension.h Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-accessors.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-alloc.cc Only create arguments-maps in the bootstrapper, remove now obsolete ValueType flag. 2014-07-07 13:27:37 +00:00
test-api.cc Change ScriptCompiler::CompileOptions to allow for two 'cache' modes 2014-07-16 12:18:33 +00:00
test-assembler-arm64.cc ARM64: Reland faster immediate check 2014-07-02 09:52:23 +00:00
test-assembler-arm.cc More OStreamsUse OStreams more often. 2014-07-07 09:57:29 +00:00
test-assembler-ia32.cc More OStreamsUse OStreams more often. 2014-07-07 09:57:29 +00:00
test-assembler-mips64.cc Add mips64 port. 2014-07-09 11:08:26 +00:00
test-assembler-mips.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-assembler-x64.cc More OStreamsUse OStreams more often. 2014-07-07 09:57:29 +00:00
test-assembler-x87.cc X87: More OStreamsUse OStreams more often 2014-07-08 05:24:52 +00:00
test-ast.cc New try: Parser: Delay internalizing strings and values 2014-06-24 14:03:24 +00:00
test-atomicops.cc Move atomic ops and related files to base library 2014-06-05 12:14:47 +00:00
test-bignum-dtoa.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-bignum.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-circular-queue.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-code-stubs-arm64.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-code-stubs-arm.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-code-stubs-ia32.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-code-stubs-mips64.cc Add mips64 port. 2014-07-09 11:08:26 +00:00
test-code-stubs-mips.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-code-stubs-x64.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-code-stubs-x87.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-code-stubs.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-code-stubs.h Introduce x87 port 2014-05-23 16:37:27 +00:00
test-compiler.cc Change ScriptCompiler::CompileOptions to allow for two 'cache' modes 2014-07-16 12:18:33 +00:00
test-condition-variable.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-constantpool.cc Add support for extended constant pool arrays. 2014-06-03 16:22:10 +00:00
test-conversions.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-cpu-ia32.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-cpu-profiler.cc Unflake and speedup JsNative*Sample cpu profile tests 2014-07-11 09:06:12 +00:00
test-cpu-x64.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-cpu-x87.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-cpu.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-dataflow.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-date.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-debug.cc Change ScriptCompiler::CompileOptions to allow for two 'cache' modes 2014-07-16 12:18:33 +00:00
test-declarative-accessors.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-decls.cc This CL simplifies var / const by ensuring the behavior is consistent in itself, and with regular JS semantics; between regular var/const and eval-ed var/const. 2014-07-14 14:01:04 +00:00
test-deoptimization.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-dictionary.cc Check alpha-sorting of includes during presubmit. 2014-06-20 08:40:11 +00:00
test-disasm-arm64.cc Check alpha-sorting of includes during presubmit. 2014-06-20 08:40:11 +00:00
test-disasm-arm.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-disasm-ia32.cc More OStreamsUse OStreams more often. 2014-07-07 09:57:29 +00:00
test-disasm-mips64.cc Add mips64 port. 2014-07-09 11:08:26 +00:00
test-disasm-mips.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-disasm-x64.cc More OStreamsUse OStreams more often. 2014-07-07 09:57:29 +00:00
test-disasm-x87.cc X87: More OStreamsUse OStreams more often 2014-07-08 05:24:52 +00:00
test-diy-fp.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-double.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-dtoa.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-fast-dtoa.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-fixed-dtoa.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-flags.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-func-name-inference.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-fuzz-arm64.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-global-handles.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-global-object.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-hashing.cc Add mips64 port. 2014-07-09 11:08:26 +00:00
test-hashmap.cc Check alpha-sorting of includes during presubmit. 2014-06-20 08:40:11 +00:00
test-heap-profiler.cc Support ES6 Map and Set in heap profiler 2014-07-10 10:54:47 +00:00
test-heap.cc Remove sequential sweeping mode and perform lazy sweeping when no sweeper threads are active. 2014-07-15 08:24:44 +00:00
test-hydrogen-types.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-javascript-arm64.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-js-arm64-variables.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-libplatform-default-platform.cc Add an API to pump the message loop to libplatform 2014-07-03 09:33:36 +00:00
test-libplatform-task-queue.cc Move libplatform files into v8::platform namespace 2014-07-01 08:15:09 +00:00
test-libplatform-worker-thread.cc Move libplatform files into v8::platform namespace 2014-07-01 08:15:09 +00:00
test-libplatform.h Move libplatform files into v8::platform namespace 2014-07-01 08:15:09 +00:00
test-list.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-liveedit.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-lockers.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-log-stack-tracer.cc CPU profiler: increase the max number of captured frames. 2014-06-24 16:00:51 +00:00
test-log.cc Check alpha-sorting of includes during presubmit. 2014-06-20 08:40:11 +00:00
test-macro-assembler-arm.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-macro-assembler-ia32.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-macro-assembler-mips64.cc Add mips64 port. 2014-07-09 11:08:26 +00:00
test-macro-assembler-mips.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-macro-assembler-x64.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-macro-assembler-x87.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-mark-compact.cc Remove PropertyAttributes from SetProperty 2014-07-14 14:52:24 +00:00
test-mementos.cc Remove dependency on Vector from platform files 2014-06-13 16:43:27 +00:00
test-microtask-delivery.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-mutex.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-object-observe.cc Remove PropertyAttributes from SetProperty 2014-07-14 14:52:24 +00:00
test-ordered-hash-table.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-ostreams.cc Unbreak Win64 build (hopefully). 2014-06-27 10:01:44 +00:00
test-parsing.cc Change ScriptCompiler::CompileOptions to allow for two 'cache' modes 2014-07-16 12:18:33 +00:00
test-platform-linux.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-platform-macos.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-platform-tls.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-platform-win32.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-platform.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-profile-generator.cc Remove dependency on Vector from platform files 2014-06-13 16:43:27 +00:00
test-random-number-generator.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-regexp.cc Add mips64 port. 2014-07-09 11:08:26 +00:00
test-reloc-info.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-representation.cc Check alpha-sorting of includes during presubmit. 2014-06-20 08:40:11 +00:00
test-semaphore.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-serialize.cc Change ScriptCompiler::CompileOptions to allow for two 'cache' modes 2014-07-16 12:18:33 +00:00
test-spaces.cc Disable test-spaces/SizeOfFirstPageIsLargeEnough for snapshot=off build. 2014-07-01 11:54:57 +00:00
test-strings.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-strtod.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-symbols.cc More OStreamsUse OStreams more often. 2014-07-07 09:57:29 +00:00
test-thread-termination.cc Reland "Add mechanism to postpone interrupts selectively." 2014-07-02 08:05:40 +00:00
test-threads.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-time.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-types.cc Properly seed the RNG for cctest/test-types. 2014-07-07 07:04:16 +00:00
test-unbound-queue.cc Check alpha-sorting of includes during presubmit. 2014-06-20 08:40:11 +00:00
test-unique.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-utils-arm64.cc Check alpha-sorting of includes during presubmit. 2014-06-20 08:40:11 +00:00
test-utils-arm64.h Check alpha-sorting of includes during presubmit. 2014-06-20 08:40:11 +00:00
test-utils.cc Move platform abstraction to base library 2014-06-30 13:25:46 +00:00
test-version.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-weakmaps.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-weaksets.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
test-weaktypedarrays.cc Check alpha-sorting of includes during presubmit. 2014-06-20 08:40:11 +00:00
testcfg.py Fix test serialization path for windows. 2014-03-26 07:40:32 +00:00
trace-extension.cc Use full include paths everywhere 2014-06-03 08:12:43 +00:00
trace-extension.h Use full include paths everywhere 2014-06-03 08:12:43 +00:00