38 static bool disable_automatic_dispose_ =
false;
41 bool CcTest::initialize_called_ =
false;
42 bool CcTest::isolate_used_ =
false;
47 const char* dependency,
bool enabled,
bool initialize)
48 : callback_(callback), name_(name), dependency_(dependency),
49 enabled_(enabled), initialize_(initialize), prev_(last_) {
51 char *basename = strrchr(const_cast<char *>(file),
'/');
53 basename = strrchr(const_cast<char *>(file),
'\\');
61 char *extension = strrchr(basename,
'.');
62 if (extension) *extension = 0;
78 if (isolate_ ==
NULL) {
93 int extension_count = 0;
94 #define CHECK_EXTENSION_FLAG(Name, Id) \
95 if (extensions.Contains(Name##_ID)) extension_names[extension_count++] = Id;
97 #undef CHECK_EXTENSION_FLAG
107 disable_automatic_dispose_ =
true;
111 static void PrintTestList(
CcTest* current) {
112 if (current ==
NULL)
return;
113 PrintTestList(current->
prev());
118 printf(
"%s/%s<\n", current->
file(), current->
name());
124 virtual void* Allocate(
size_t length) {
return malloc(length); }
125 virtual void* AllocateUninitialized(
size_t length) {
return malloc(length); }
126 virtual void Free(
void* data,
size_t length) { free(data); }
132 static void SuggestTestHarness(
int tests) {
133 if (tests == 0)
return;
134 printf(
"Running multiple tests in sequence is deprecated and may cause "
135 "bogus failure. Consider using tools/run-tests.py instead.\n");
139 int main(
int argc,
char* argv[]) {
143 v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv,
true);
156 bool print_run_count =
true;
157 for (
int i = 1; i < argc; i++) {
159 if (strcmp(arg,
"--list") == 0) {
161 print_run_count =
false;
165 char* testname = strchr(arg_copy,
'/');
170 char* file = arg_copy;
171 char*
name = testname + 1;
173 while (test !=
NULL) {
175 && strcmp(test->
file(), file) == 0
176 && strcmp(test->
name(),
name) == 0) {
177 SuggestTestHarness(tests_run++);
185 char* file_or_name = arg_copy;
187 while (test !=
NULL) {
189 && (strcmp(test->
file(), file_or_name) == 0
190 || strcmp(test->
name(), file_or_name) == 0)) {
191 SuggestTestHarness(tests_run++);
197 v8::internal::DeleteArray<char>(arg_copy);
200 if (print_run_count && tests_run != 1)
201 printf(
"Ran %i tests.\n", tests_run);
208 int RegisterThreadedTest::count_ = 0;
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
#define CHECK_EQ(expected, value)
CcTest(TestFunction *callback, const char *file, const char *name, const char *dependency, bool enabled, bool initialize)
void V8_EXPORT RegisterExtension(Extension *extension)
static void DisableAutomaticDispose()
const char * dependency()
static void SetCrashIfDefaultIsolateInitialized()
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in name
static v8::Local< v8::Context > NewContext(CcTestExtensionFlags extensions, v8::Isolate *isolate=CcTest::isolate())
static void SetArrayBufferAllocator(ArrayBuffer::Allocator *allocator)
#define EXTENSION_LIST(V)
static Local< Context > New(Isolate *isolate, ExtensionConfiguration *extensions=NULL, Handle< ObjectTemplate > global_template=Handle< ObjectTemplate >(), Handle< Value > global_object=Handle< Value >())
int main(int argc, char *argv[])
V8_INLINE bool IsEmpty() const
static bool InitializeICU(const char *icu_data_file=NULL)
#define CHECK_EXTENSION_FLAG(Name, Id)
char * StrDup(const char *str)