v8/test/cctest
mstarzinger@chromium.org d71678676f Refactor parser mode configuration for correctness
This patch refactors the parser and preparser interface to be more
readable and type-safe.  It has no behavior changes.

Previously, parsers and preparsers were configured via bitfield called
parser_flags in the Parser constructor, and flags in
PreParser::PreParseProgram, ParserApi::Parse, and ParserApi::PreParse.
This was error-prone in practice: six call sites passed incorrectly
typed values to this interface (a boolean FLAG value, a boolean false
and a boolean true value).  None of these errors were caught by the
compiler because it's just an "int".

The parser flags interface was also awkward because it encoded a
language mode, but the language mode was only used to turn on harmony
scoping or not -- it wasn't used to actually set the parser's language
mode.

Fundamentally these errors came in because of the desire for a
procedural parser interface, in ParserApi.  Because we need to be able
to configure the parser in various ways, the flags argument got added;
but no one understood how to use the flags properly.  Also they were
only used by constructors: callers packed bits, and the constructors
unpacked them into booleans on the parser or preparser.

The solution is to allow parser construction, configuration, and
invocation to be separated.  This patch does that.

It passes the existing tests.

BUG=

Review URL: https://codereview.chromium.org/13450007
Patch from Andy Wingo <wingo@igalia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14151 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-04-05 13:01:06 +00:00
..
cctest.cc Make the Isolate parameter mandatory in Locker and Unlocker classes. 2013-01-18 07:20:17 +00:00
cctest.gyp Runtime version of declarative native accessors. 2013-03-07 11:42:58 +00:00
cctest.h Make the GC stress builder go green. 2013-02-06 13:21:28 +00:00
cctest.status Temporarily disable deferred stack trace formatting. 2013-01-18 13:05:03 +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 Eliminate the need for code delete events in CPU profiler. 2011-09-14 11:47:03 +00:00
SConscript Runtime version of declarative native accessors. 2013-03-07 11:42:58 +00:00
test-accessors.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-alloc.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-api.cc Pass an isolate to GetCurrent() 2013-04-05 02:17:56 +00:00
test-assembler-arm.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-assembler-ia32.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-assembler-mips.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-assembler-x64.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-ast.cc One Zone per CompilationInfo. 2012-06-20 08:58:41 +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 Add missing license headers. 2013-03-07 11:12:26 +00:00
test-compiler.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-conversions.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-cpu-profiler.cc Isolatify CPU profiler public API 2013-04-02 08:16:53 +00:00
test-dataflow.cc One Zone per CompilationInfo. 2012-06-20 08:58:41 +00:00
test-date.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-debug.cc Pass Isolates explicitly in Deoptimizer-related code. 2013-03-18 13:57:49 +00:00
test-declarative-accessors.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-decls.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-deoptimization.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-dictionary.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-disasm-arm.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-disasm-ia32.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-disasm-mips.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-disasm-x64.cc Made Isolate a mandatory parameter for everything Handle-related. 2013-02-25 14:46:09 +00:00
test-diy-fp.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-double.cc Add missing license headers. 2013-03-07 11:12:26 +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 Ensure removing processed command line arguments. 2012-06-13 15:02:05 +00:00
test-func-name-inference.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-global-object.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-hashing.cc Continues Latin-1 support. All tests pass with ENABLE_LATIN_1 flag. 2013-01-09 15:47:53 +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 Isolatify HeapProfiler 2013-04-02 08:03:01 +00:00
test-heap.cc Simplify debug evaluate. 2013-03-21 08:50:29 +00:00
test-list.cc Progress towards making Zones independent of Isolates and Threads. 2012-06-04 14:42:58 +00:00
test-liveedit.cc One Zone per CompilationInfo. 2012-06-20 08:58:41 +00:00
test-lock.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-lockers.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-log-stack-tracer.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-log.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-macro-assembler-x64.cc Make the Isolate parameter mandatory for internal HandleScopes. 2013-02-15 09:27:10 +00:00
test-mark-compact.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-object-observe.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-parsing.cc Refactor parser mode configuration for correctness 2013-04-05 13:01:06 +00:00
test-platform-linux.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-platform-macos.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-platform-nullos.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-platform-tls.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-platform-win32.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-platform.cc Determine number of available cores on all platforms. 2013-02-15 12:38:59 +00:00
test-profile-generator.cc Isolatify CPU profiler public API 2013-04-02 08:16:53 +00:00
test-random.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-regexp.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-reloc-info.cc Merge experimental/gc branch to the bleeding_edge. 2011-09-19 18:36:47 +00:00
test-serialize.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-sockets.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-spaces.cc Use MemoryChunk-based allocation for deoptimization entry code 2013-01-29 09:09:55 +00:00
test-strings.cc Fix tests that fail on GC stress tests. 2013-03-20 10:33:26 +00:00
test-strtod.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-symbols.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-thread-termination.cc Maintain API compatibility with older versions of V8. 2013-03-21 14:42:17 +00:00
test-threads.cc Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
test-unbound-queue.cc Add missing license headers. 2013-03-07 11:12:26 +00:00
test-utils.cc Fix build errors. 2012-07-30 08:54:51 +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 Added a version of the v8::HandleScope constructor with an Isolate and use that consistently. 2013-03-15 12:06:53 +00:00
testcfg.py Fix test harness to correctly split extra flags. 2013-01-29 13:27:23 +00:00