50 static const KeywordToken keywords[] = {
51 #define KEYWORD(t, s, d) { s, i::Token::t },
54 {
NULL, i::Token::IDENTIFIER }
57 KeywordToken key_token;
60 for (
int i = 0; (key_token = keywords[i]).keyword !=
NULL; i++) {
62 reinterpret_cast<const i::byte*
>(key_token.keyword);
64 CHECK(static_cast<int>(
sizeof(buffer)) >= length);
84 static const char chars_to_append[] = {
'z',
'0',
'_' };
85 for (
int j = 0; j < static_cast<int>(
ARRAY_SIZE(chars_to_append)); ++j) {
86 memmove(buffer, keyword, length);
87 buffer[length] = chars_to_append[j];
96 memmove(buffer, keyword, length);
97 buffer[length - 1] =
'_';
118 const char* tests[] = {
120 "--> is eol-comment\nvar y = 37;\n",
121 "\n --> is eol-comment\nvar y = 37;\n",
122 "/* precomment */ --> is eol-comment\nvar y = 37;\n",
123 "\n/* precomment */ --> is eol-comment\nvar y = 37;\n",
125 "var x = 42;\n--> is eol-comment\nvar y = 37;\n",
126 "var x = 42;\n/* precomment */ --> is eol-comment\nvar y = 37;\n",
130 const char* fail_tests[] = {
131 "x --> is eol-comment\nvar y = 37;\n",
132 "\"\\n\" --> is eol-comment\nvar y = 37;\n",
133 "x/* precomment */ --> is eol-comment\nvar y = 37;\n",
134 "x/* precomment\n */ --> is eol-comment\nvar y = 37;\n",
135 "var x = 42; --> is eol-comment\nvar y = 37;\n",
136 "var x = 42; /* precomment\n */ --> is eol-comment\nvar y = 37;\n",
142 i::Isolate::Current()->stack_guard()->SetStackLimit(
143 reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
145 for (
int i = 0; tests[i]; i++) {
152 for (
int i = 0; fail_tests[i]; i++) {
164 : data_(data), length_(length) { }
166 const char*
data()
const {
return data_; }
167 size_t length()
const {
return length_; }
180 i::Isolate::Current()->stack_guard()->SetStackLimit(
181 reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
187 "function foo(a) { return function nolazy(b) { return a + b; } }"
188 "function bar(a) { if (a) return function lazy(b) { return b; } }"
189 "var z = {'string': 'string literal', bareword: 'propertyName', "
190 " 42: 'number literal', for: 'keyword as propertyName', "
191 " f\\u006fr: 'keyword propertyname with escape'};"
192 "var v = /RegExp Literal/;"
193 "var w = /RegExp Literal\\u0020With Escape/gin;"
194 "var y = { get getter() { return 42; }, "
195 " set setter(v) { this.value = v; }};";
197 const char* error_source =
"var x = y z;";
203 bool lazy_flag = i::FLAG_lazy;
212 i::FLAG_lazy =
false;
219 i::FLAG_lazy = lazy_flag;
227 i::Scanner::Location error_location =
230 CHECK_EQ(10, error_location.beg_pos);
231 CHECK_EQ(11, error_location.end_pos);
233 const char*
message = pre_impl->BuildMessage();
234 pre_impl->BuildArgs();
243 i::Isolate::Current()->stack_guard()->SetStackLimit(
244 reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
246 const char* programs[] = {
249 "function foo(x, y) { return x + y; }",
250 "%ArgleBargle(glop);",
251 "var x = new new Function('this.x = 42');",
255 uintptr_t stack_limit = i::Isolate::Current()->stack_guard()->real_climit();
256 for (
int i = 0; programs[i]; i++) {
257 const char* program = programs[i];
259 reinterpret_cast<const i::byte*>(program),
260 static_cast<unsigned>(strlen(program)));
262 i::Scanner scanner(i::Isolate::Current()->unicode_cache());
273 CHECK(!data.has_error());
278 TEST(StandAlonePreParserNoNatives) {
282 i::Isolate::Current()->stack_guard()->SetStackLimit(
283 reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
285 const char* programs[] = {
286 "%ArgleBargle(glop);",
287 "var x = %_IsSmi(42);",
291 uintptr_t stack_limit = i::Isolate::Current()->stack_guard()->real_climit();
292 for (
int i = 0; programs[i]; i++) {
293 const char* program = programs[i];
295 reinterpret_cast<const i::byte*>(program),
296 static_cast<unsigned>(strlen(program)));
298 i::Scanner scanner(i::Isolate::Current()->unicode_cache());
310 CHECK(data.has_error());
319 i::Isolate::Current()->stack_guard()->SetStackLimit(
320 reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
322 const char* program =
"var x = 'something';\n"
323 "escape: function() {}";
330 reinterpret_cast<const i::byte*>(program),
331 static_cast<unsigned>(strlen(program)));
347 i::Isolate::Current()->stack_guard()->SetStackLimit(
348 reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
350 const char* program =
351 "try { } catch (e) { var foo = function () { /* first */ } }"
352 "var bar = function () { /* second */ }";
359 CHECK(!data->HasError());
364 static_cast<int>(strstr(program,
"function") - program);
365 int first_lbrace = first_function +
i::StrLength(
"function () ");
366 CHECK_EQ(
'{', program[first_lbrace]);
367 i::FunctionEntry entry1 = data->GetFunctionEntry(first_lbrace);
368 CHECK(!entry1.is_valid());
370 int second_function =
371 static_cast<int>(strstr(program + first_lbrace,
"function") - program);
374 CHECK_EQ(
'{', program[second_lbrace]);
375 i::FunctionEntry entry2 = data->GetFunctionEntry(second_lbrace);
376 CHECK(entry2.is_valid());
377 CHECK_EQ(
'}', program[entry2.end_pos() - 1]);
386 i::Isolate::Current()->stack_guard()->SetStackLimit(
387 reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
389 size_t kProgramSize = 1024 * 1024;
391 reinterpret_cast<char*>(malloc(kProgramSize + 1)));
392 memset(*program,
'(', kProgramSize);
393 program[kProgramSize] =
'\0';
395 uintptr_t stack_limit = i::Isolate::Current()->stack_guard()->real_climit();
398 reinterpret_cast<const i::byte*>(*program),
399 static_cast<unsigned>(kProgramSize));
401 i::Scanner scanner(i::Isolate::Current()->unicode_cache());
417 : data_(data), length_(static_cast<size_t>(length)) { }
434 #define CHECK_EQU(v1, v2) CHECK_EQ(static_cast<int>(v1), static_cast<int>(v2))
440 if (end == 0) end = length;
441 unsigned sub_length = end - start;
444 for (
unsigned i = 0; i < length; i++) {
445 uc16_buffer[i] =
static_cast<i::uc16>(ascii_source[i]);
449 FACTORY->NewStringFromAscii(ascii_vector));
452 FACTORY->NewExternalStringFromTwoByte(&resource));
458 reinterpret_cast<const i::byte*>(ascii_source), end);
468 int32_t c1 = uc16_stream.Advance();
479 while (i > start + sub_length / 4) {
481 int32_t c0 = ascii_source[i - 1];
485 uc16_stream.PushBack(c0);
492 int32_t c1 = uc16_stream.Advance();
502 uc16_stream.PushBack(c0);
510 unsigned halfway = start + sub_length / 2;
511 uc16_stream.SeekForward(halfway - i);
525 int32_t c1 = uc16_stream.Advance();
537 int32_t c1 = uc16_stream.Advance();
552 static const unsigned kBigStringSize = 4096;
553 char buffer[kBigStringSize + 1];
554 for (
unsigned i = 0; i < kBigStringSize; i++) {
555 buffer[i] =
static_cast<char>(i & 0x7f);
568 static const int kMaxUC16Char =
static_cast<int>(kMaxUC16CharU);
570 static const int kAllUtf8CharsSize =
574 static const unsigned kAllUtf8CharsSizeU =
575 static_cast<unsigned>(kAllUtf8CharsSize);
577 char buffer[kAllUtf8CharsSizeU];
579 for (
int i = 0; i <= kMaxUC16Char; i++) {
584 ASSERT(cursor == kAllUtf8CharsSizeU);
588 for (
int i = 0; i <= kMaxUC16Char; i++) {
594 for (
int i = kMaxUC16Char; i >= 0; i--) {
600 while (stream.
pos() < kMaxUC16CharU) {
605 if (i <= kMaxUC16Char) {
621 i::Scanner scanner(i::Isolate::Current()->unicode_cache());
633 }
while (expected_tokens[i] != i::Token::ILLEGAL);
639 const char* str1 =
"{ foo get for : */ <- \n\n /*foo*/ bib";
641 static_cast<unsigned>(strlen(str1)));
644 i::Token::IDENTIFIER,
645 i::Token::IDENTIFIER,
652 i::Token::IDENTIFIER,
658 const char* str2 =
"case default const {THIS\nPART\nSKIPPED} do";
660 static_cast<unsigned>(strlen(str2)));
676 const char* str3 =
"{}}}}";
687 for (
int i = 0; i <= 4; i++) {
688 expectations3[6 - i] = i::Token::ILLEGAL;
689 expectations3[5 - i] = i::Token::EOS;
691 reinterpret_cast<const i::byte*>(str3),
692 static_cast<unsigned>(strlen(str3)));
700 reinterpret_cast<const i::byte*>(re_source),
701 static_cast<unsigned>(strlen(re_source)));
702 i::Scanner scanner(i::Isolate::Current()->unicode_cache());
711 for (
int i = 0; i < actual.length(); i++) {
757 int character_length = len;
758 for (
int i = 0; i < len; i++) {
759 unsigned char c = s[i];
760 int input_offset = 0;
761 int output_adjust = 0;
763 if (c < 0xc0)
continue;
770 if ((c & 7) == 0 && ((s[i + 1] & 0x30) == 0)) {
777 character_length -= 2;
778 }
else if (c >= 0xe0) {
779 if ((c & 0xf) == 0 && ((s[i + 1] & 0x20) == 0)) {
788 if ((c & 0x1e) == 0) {
798 for (
int j = 1; j <= input_offset; j++) {
799 if ((s[i + j] & 0xc0) != 0x80) {
808 character_length -= output_adjust;
812 return character_length;
824 const char* outer_prefix;
825 const char* inner_source;
826 const char* outer_suffix;
831 const SourceData source_data[] = {
834 {
" with ({}) ",
"{\n"
839 {
" with ({}) ",
"statement",
"\n"
842 " ",
"statement;",
"\n"
844 {
" try {} catch ",
"(e) { block; }",
" more;",
846 {
" try {} catch ",
"(e) { block; }",
"; more;",
848 {
" try {} catch ",
"(e) {\n"
852 {
" try {} catch ",
"(e) { block; }",
" finally { block; } more;",
864 " function fun",
"(a,b) { infunction; }",
" more;",
867 " function fun",
"(a,b) {\n"
871 {
" (function fun",
"(a,b) { infunction; }",
")();",
873 {
" for ",
"(let x = 1 ; x < 10; ++ x) { block; }",
" more;",
875 {
" for ",
"(let x = 1 ; x < 10; ++ x) { block; }",
"; more;",
877 {
" for ",
"(let x = 1 ; x < 10; ++ x) {\n"
881 {
" for ",
"(let x = 1 ; x < 10; ++ x) statement;",
" more;",
883 {
" for ",
"(let x = 1 ; x < 10; ++ x) statement",
"\n"
885 {
" for ",
"(let x = 1 ; x < 10; ++ x)\n"
888 {
" for ",
"(let x in {}) { block; }",
" more;",
890 {
" for ",
"(let x in {}) { block; }",
"; more;",
892 {
" for ",
"(let x in {}) {\n"
896 {
" for ",
"(let x in {}) statement;",
" more;",
898 {
" for ",
"(let x in {}) statement",
"\n"
900 {
" for ",
"(let x in {})\n"
906 {
" 'foo\355\240\201\355\260\211';\n"
907 " (function fun",
"(a,b) { infunction; }",
")();",
910 {
" 'foo\360\220\220\212';\n"
911 " (function fun",
"(a,b) { infunction; }",
")();",
914 {
" 'foo\340\277\277';\n"
915 " (function fun",
"(a,b) { infunction; }",
")();",
918 {
" 'foo\355\240\201\355\211';\n"
919 " (function fun",
"(a,b) { infunction; }",
")();",
922 {
" 'foo\340\277';\n"
923 " (function fun",
"(a,b) { infunction; }",
")();",
927 " (function fun",
"(a,b) { infunction; }",
")();",
930 {
" 'foo\340\203\277';\n"
931 " (function fun",
"(a,b) { infunction; }",
")();",
934 {
" 'foo\340\201\277';\n"
935 " (function fun",
"(a,b) { infunction; }",
")();",
938 {
" 'foo\355\240\201';\n"
939 " (function fun",
"(a,b) { infunction; }",
")();",
942 {
" 'foo\355\240\201\340\277\277';\n"
943 " (function fun",
"(a,b) { infunction; }",
")();",
947 {
" 'foo\355\240\201\360\215\260\211';\n"
948 " (function fun",
"(a,b) { infunction; }",
")();",
951 {
" 'foo\355\260\211';\n"
952 " (function fun",
"(a,b) { infunction; }",
")();",
955 {
" 'foo\303\277';\n"
956 " (function fun",
"(a,b) { infunction; }",
")();",
960 " (function fun",
"(a,b) { infunction; }",
")();",
963 {
" 'foo\301\277';\n"
964 " (function fun",
"(a,b) { infunction; }",
")();",
967 {
" 'foo\370\277\277\277\277';\n"
968 " (function fun",
"(a,b) { infunction; }",
")();",
971 {
" 'foo\374\277\277\277\277\277';\n"
972 " (function fun",
"(a,b) { infunction; }",
")();",
975 {
" 'foo\376\277\277\277\277\277\277';\n"
976 " (function fun",
"(a,b) { infunction; }",
")();",
979 {
" 'foo\377\277\277\277\277\277\277\277';\n"
980 " (function fun",
"(a,b) { infunction; }",
")();",
983 " (function fun",
"(a,b) { 'bar\355\240\201\355\260\213'; }",
")();",
986 " (function fun",
"(a,b) { 'bar\360\220\220\214'; }",
")();",
996 i::Isolate::Current()->stack_guard()->SetStackLimit(
997 reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
998 i::FLAG_harmony_scoping =
true;
1000 for (
int i = 0; source_data[i].outer_prefix; i++) {
1001 int kPrefixLen = Utf8LengthHelper(source_data[i].outer_prefix);
1002 int kInnerLen = Utf8LengthHelper(source_data[i].inner_source);
1003 int kSuffixLen = Utf8LengthHelper(source_data[i].outer_suffix);
1004 int kPrefixByteLen =
i::StrLength(source_data[i].outer_prefix);
1005 int kInnerByteLen =
i::StrLength(source_data[i].inner_source);
1006 int kSuffixByteLen =
i::StrLength(source_data[i].outer_suffix);
1007 int kProgramSize = kPrefixLen + kInnerLen + kSuffixLen;
1008 int kProgramByteSize = kPrefixByteLen + kInnerByteLen + kSuffixByteLen;
1011 source_data[i].outer_prefix,
1012 source_data[i].inner_source,
1013 source_data[i].outer_suffix);
1018 CHECK_EQ(source->length(), kProgramSize);
1028 i::Scope* scope =
function->scope();
1035 CHECK_EQ(inner_scope->type(), source_data[i].scope_type);
1036 CHECK_EQ(inner_scope->start_position(), kPrefixLen);
1039 CHECK_EQ(inner_scope->end_position(), kPrefixLen + kInnerLen);
1045 uintptr_t stack_limit = i::Isolate::Current()->stack_guard()->real_climit();
1050 i::Scanner scanner(i::Isolate::Current()->unicode_cache());
1056 &scanner, &log, flags, stack_limit);
1062 bool save_harmony_scoping = i::FLAG_harmony_scoping;
1063 i::FLAG_harmony_scoping = harmony_scoping;
1068 i::FLAG_harmony_scoping = save_harmony_scoping;
1071 if (
function ==
NULL) {
1074 CHECK(i::Isolate::Current()->has_pending_exception());
1075 i::MaybeObject* maybe_object = i::Isolate::Current()->pending_exception();
1077 CHECK(maybe_object->To(&exception));
1080 maybe_object = exception->
GetProperty(*type_symbol);
1081 CHECK(maybe_object->To(&type_string));
1085 if (data.has_error() &&
function !=
NULL) {
1087 "Preparser failed on:\n"
1091 "However, the parser succeeded",
1092 *source->ToCString(), data.BuildMessage());
1094 }
else if (!data.has_error() &&
function ==
NULL) {
1096 "Parser failed on:\n"
1100 "However, the preparser succeeded",
1101 *source->ToCString(), *type_string->
ToCString());
1106 if (
function ==
NULL) {
1109 "Expected parser and preparser to produce the same error on:\n"
1111 "However, found the following error messages\n"
1113 "\tpreparser: %s\n",
1114 *source->ToCString(), *type_string->
ToCString(), data.BuildMessage());
1122 static const int kFlagsCount = 6;
1123 const int flags[kFlagsCount] = {
1132 for (
int k = 0; k < kFlagsCount; ++k) {
1139 const char* context_data[][2] = {
1142 {
"if (true) ",
" else {}" },
1143 {
"if (true) {} else ",
"" },
1144 {
"if (true) ",
"" },
1145 {
"do ",
" while (false)" },
1146 {
"while (false) ",
"" },
1147 {
"for (;;) ",
"" },
1148 {
"with ({})",
"" },
1149 {
"switch (12) { case 12: ",
"}" },
1150 {
"switch (12) { default: ",
"}" },
1151 {
"switch (12) { ",
"case 12: }" },
1156 const char* statement_data[] = {
1164 "if (false) {} else ;",
1165 "if (false) {} else {}",
1166 "if (false) {} else 12",
1170 "do {} while (false)",
1186 "switch ({}) { default: }"
1191 "try {} catch(e) {}",
1192 "try {} finally {}",
1193 "try {} catch(e) {} finally {}",
1198 const char* termination_data[] = {
1212 i::Isolate::Current()->stack_guard()->SetStackLimit(
1213 reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
1215 for (
int i = 0; context_data[i][0] !=
NULL; ++i) {
1216 for (
int j = 0; statement_data[j] !=
NULL; ++j) {
1217 for (
int k = 0; termination_data[k] !=
NULL; ++k) {
1220 int kTerminationLen =
i::StrLength(termination_data[k]);
1222 int kProgramSize = kPrefixLen + kStatementLen + kTerminationLen
1228 "label: for (;;) { %s%s%s%s }",
1231 termination_data[k],
1232 context_data[i][1]);
1233 CHECK(length == kProgramSize);
1246 v8::internal::FLAG_min_preparse_length = 1;
1251 const char* script =
1252 "\"use strict\"; \n"
1253 "a = function() { \n"
1254 " b = function() { \n"
1261 CHECK_EQ(
"SyntaxError: Octal literals are not allowed in strict mode.",
bool is_global_scope() const
static Local< Script > Compile(Handle< String > source, ScriptOrigin *origin=NULL, ScriptData *pre_data=NULL, Handle< String > script_data=Handle< String >())
static ScriptDataImpl * PreParse(Utf16CharacterStream *source, v8::Extension *extension, int flags)
const char * data() const
#define CHECK_EQ(expected, value)
TestExternalResource(uint16_t *data, int length)
Local< Value > Exception() const
static const unsigned kMaxTwoByteChar
static V8EXPORT Local< String > New(const char *data, int length=-1)
void SetHarmonyScoping(bool scoping)
#define IGNORE_TOKEN(name, string, precedence)
#define ASSERT(condition)
void SetHarmonyModules(bool modules)
void SetLanguageMode(LanguageMode language_mode)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit 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 SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available 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 MIPS FPU instructions if expose natives in global object expose gc extension number of stack frames to capture disable builtin natives files print a stack trace if an assertion failure occurs use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations prepare for turning on always opt minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions automatically set the debug break flag when debugger commands are in the queue always cause a debug break before aborting 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 more details following each garbage collection print amount of external allocated memory after each time it is adjusted flush code that we expect not to use again before full gc do incremental marking steps track object counts and memory usage use caching Perform compaction on every full GC Never perform compaction on full GC testing only Compact code space on full incremental collections Default seed for initializing random allows verbose printing trace parsing and preparsing Check icache flushes in ARM and MIPS simulator Stack alingment in bytes in print stack trace when throwing exceptions randomize hashes to avoid predictable hash Fixed seed to use to hash property activate a timer that switches between V8 threads testing_bool_flag float flag Seed used for threading test randomness A filename with extra code to be included in the Print usage including flags
void TestStreamScanner(i::Utf16CharacterStream *stream, i::Token::Value *expected_tokens, int skip_pos=0, int skip_to=0)
FunctionLiteral * ParseProgram()
void TestParserSyncWithFlags(i::Handle< i::String > source)
SmartArrayPointer< char > ToCString(AllowNullsFlag allow_nulls, RobustnessFlag robustness_flag, int offset, int length, int *length_output=0)
static Local< Script > New(Handle< String > source, ScriptOrigin *origin=NULL, ScriptData *pre_data=NULL, Handle< String > script_data=Handle< String >())
int start_position() const
static ScriptData * PreCompile(const char *input, int length)
virtual bool HasError()=0
#define CHECK_EQU(v1, v2)
int Utf8LengthHelper(String *input, int from, int to, bool followed_by_surrogate, int max_recursion, bool *failure, bool *starts_with_surrogate)
static const char * String(Value tok)
ZoneList< Scope * > * inner_scopes()
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit 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 SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available 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 MIPS FPU instructions if expose natives in global object expose gc extension number of stack frames to capture disable builtin natives files print a stack trace if an assertion failure occurs use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations prepare for turning on always opt minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions automatically set the debug break flag when debugger commands are in the queue always cause a debug break before aborting 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 more details following each garbage collection print amount of external allocated memory after each time it is adjusted flush code that we expect not to use again before full gc do incremental marking steps track object counts and memory usage use caching Perform compaction on every full GC Never perform compaction on full GC testing only Compact code space on full incremental collections Default seed for initializing random allows verbose printing trace parsing and preparsing Check icache flushes in ARM and MIPS simulator Stack alingment in bytes in print stack trace when throwing exceptions randomize hashes to avoid predictable hash Fixed seed to use to hash property activate a timer that switches between V8 threads testing_bool_flag float flag Seed used for threading test randomness A filename with extra code to be included in the Print usage message
void SeekForward(int pos)
static Vector< T > New(int length)
#define CHECK_NE(unexpected, value)
void Initialize(Utf16CharacterStream *source)
Vector< const char > CStrVector(const char *data)
static unsigned Encode(char *out, uchar c, int previous)
int StrLength(const char *string)
static void Print(const char *format,...)
virtual Vector< unsigned > ExtractData()
static int SNPrintF(Vector< char > str, const char *format,...)
Location location() const
void TestCharacterStream(const char *ascii_source, unsigned length, unsigned start=0, unsigned end=0)
Scanner::Location MessageLocation()
MUST_USE_RESULT MaybeObject * GetProperty(String *key)
#define ASSERT_EQ(v1, v2)
static PreParseResult PreParseProgram(i::Scanner *scanner, i::ParserRecorder *log, int flags, uintptr_t stack_limit)
Vector< const char > literal_ascii_string()
static const unsigned kMaxThreeByteChar
void TestScanRegExp(const char *re_source, const char *expected)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit 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 SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available 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 MIPS FPU instructions if NULL
static const unsigned kMaxOneByteChar
const uint16_t * data() const
Token::Value peek() const
ScriptResource(const char *data, size_t length)
static Persistent< Context > New(ExtensionConfiguration *extensions=NULL, Handle< ObjectTemplate > global_template=Handle< ObjectTemplate >(), Handle< Value > global_object=Handle< Value >())
bool IsEqualTo(Vector< const char > str)
void TestParserSync(i::Handle< i::String > source, int flags)
static V8EXPORT Local< String > NewExternal(ExternalStringResource *resource)
unsigned SeekForward(unsigned code_unit_count)
bool ScanRegExpPattern(bool seen_equal)
static const int kNoPreviousCharacter
virtual void PushBack(uc32 character)