Commit 65b9ab93 authored by lrn@chromium.org's avatar lrn@chromium.org

Merged Scanner and JavaScriptScanner.

JavaScriptScanner had become the only concrete subclass of Scanner, so there
was no longer a need for the distinction.

Also fixed up comments.

Review URL: http://codereview.chromium.org/8384003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 85832072
...@@ -5302,7 +5302,7 @@ static ScriptDataImpl* DoPreParse(UC16CharacterStream* source, ...@@ -5302,7 +5302,7 @@ static ScriptDataImpl* DoPreParse(UC16CharacterStream* source,
int flags, int flags,
ParserRecorder* recorder) { ParserRecorder* recorder) {
Isolate* isolate = Isolate::Current(); Isolate* isolate = Isolate::Current();
JavaScriptScanner scanner(isolate->unicode_cache()); Scanner scanner(isolate->unicode_cache());
scanner.SetHarmonyScoping((flags & kHarmonyScoping) != 0); scanner.SetHarmonyScoping((flags & kHarmonyScoping) != 0);
scanner.Initialize(source); scanner.Initialize(source);
intptr_t stack_limit = isolate->stack_guard()->real_climit(); intptr_t stack_limit = isolate->stack_guard()->real_climit();
......
...@@ -486,7 +486,7 @@ class Parser { ...@@ -486,7 +486,7 @@ class Parser {
void ReportMessage(const char* message, Vector<const char*> args); void ReportMessage(const char* message, Vector<const char*> args);
bool inside_with() const { return top_scope_->inside_with(); } bool inside_with() const { return top_scope_->inside_with(); }
JavaScriptScanner& scanner() { return scanner_; } Scanner& scanner() { return scanner_; }
Mode mode() const { return mode_; } Mode mode() const { return mode_; }
ScriptDataImpl* pre_data() const { return pre_data_; } ScriptDataImpl* pre_data() const { return pre_data_; }
...@@ -726,7 +726,7 @@ class Parser { ...@@ -726,7 +726,7 @@ class Parser {
ZoneList<Handle<String> > symbol_cache_; ZoneList<Handle<String> > symbol_cache_;
Handle<Script> script_; Handle<Script> script_;
JavaScriptScanner scanner_; Scanner scanner_;
Scope* top_scope_; Scope* top_scope_;
......
...@@ -182,7 +182,7 @@ PreParserData Preparse(UnicodeInputStream* input, size_t max_stack) { ...@@ -182,7 +182,7 @@ PreParserData Preparse(UnicodeInputStream* input, size_t max_stack) {
internal::InputStreamUTF16Buffer buffer(input); internal::InputStreamUTF16Buffer buffer(input);
uintptr_t stack_limit = reinterpret_cast<uintptr_t>(&buffer) - max_stack; uintptr_t stack_limit = reinterpret_cast<uintptr_t>(&buffer) - max_stack;
internal::UnicodeCache unicode_cache; internal::UnicodeCache unicode_cache;
internal::JavaScriptScanner scanner(&unicode_cache); internal::Scanner scanner(&unicode_cache);
scanner.Initialize(&buffer); scanner.Initialize(&buffer);
internal::CompleteParserRecorder recorder; internal::CompleteParserRecorder recorder;
preparser::PreParser::PreParseResult result = preparser::PreParser::PreParseResult result =
......
...@@ -72,7 +72,7 @@ void PreParser::ReportUnexpectedToken(i::Token::Value token) { ...@@ -72,7 +72,7 @@ void PreParser::ReportUnexpectedToken(i::Token::Value token) {
if (token == i::Token::ILLEGAL && stack_overflow_) { if (token == i::Token::ILLEGAL && stack_overflow_) {
return; return;
} }
i::JavaScriptScanner::Location source_location = scanner_->location(); i::Scanner::Location source_location = scanner_->location();
// Four of the tokens are treated specially // Four of the tokens are treated specially
switch (token) { switch (token) {
...@@ -647,7 +647,7 @@ PreParser::Statement PreParser::ParseThrowStatement(bool* ok) { ...@@ -647,7 +647,7 @@ PreParser::Statement PreParser::ParseThrowStatement(bool* ok) {
Expect(i::Token::THROW, CHECK_OK); Expect(i::Token::THROW, CHECK_OK);
if (scanner_->HasAnyLineTerminatorBeforeNext()) { if (scanner_->HasAnyLineTerminatorBeforeNext()) {
i::JavaScriptScanner::Location pos = scanner_->location(); i::Scanner::Location pos = scanner_->location();
ReportMessageAt(pos, "newline_after_throw", NULL); ReportMessageAt(pos, "newline_after_throw", NULL);
*ok = false; *ok = false;
return Statement::Default(); return Statement::Default();
......
...@@ -116,7 +116,7 @@ class PreParser { ...@@ -116,7 +116,7 @@ class PreParser {
// success (even if parsing failed, the pre-parse data successfully // success (even if parsing failed, the pre-parse data successfully
// captured the syntax error), and false if a stack-overflow happened // captured the syntax error), and false if a stack-overflow happened
// during parsing. // during parsing.
static PreParseResult PreParseProgram(i::JavaScriptScanner* scanner, static PreParseResult PreParseProgram(i::Scanner* scanner,
i::ParserRecorder* log, i::ParserRecorder* log,
int flags, int flags,
uintptr_t stack_limit) { uintptr_t stack_limit) {
...@@ -449,7 +449,7 @@ class PreParser { ...@@ -449,7 +449,7 @@ class PreParser {
}; };
// Private constructor only used in PreParseProgram. // Private constructor only used in PreParseProgram.
PreParser(i::JavaScriptScanner* scanner, PreParser(i::Scanner* scanner,
i::ParserRecorder* log, i::ParserRecorder* log,
uintptr_t stack_limit, uintptr_t stack_limit,
bool allow_lazy, bool allow_lazy,
...@@ -619,7 +619,7 @@ class PreParser { ...@@ -619,7 +619,7 @@ class PreParser {
Identifier identifier, Identifier identifier,
bool* ok); bool* ok);
i::JavaScriptScanner* scanner_; i::Scanner* scanner_;
i::ParserRecorder* log_; i::ParserRecorder* log_;
Scope* scope_; Scope* scope_;
uintptr_t stack_limit_; uintptr_t stack_limit_;
......
...@@ -36,30 +36,26 @@ namespace v8 { ...@@ -36,30 +36,26 @@ namespace v8 {
namespace internal { namespace internal {
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Scanner::LiteralScope // Scanner
Scanner::LiteralScope::LiteralScope(Scanner* self)
: scanner_(self), complete_(false) {
self->StartLiteral();
}
Scanner::LiteralScope::~LiteralScope() { Scanner::Scanner(UnicodeCache* unicode_cache)
if (!complete_) scanner_->DropLiteral(); : unicode_cache_(unicode_cache),
} octal_pos_(Location::invalid()),
harmony_scoping_(false) { }
void Scanner::LiteralScope::Complete() { void Scanner::Initialize(UC16CharacterStream* source) {
scanner_->TerminateLiteral(); source_ = source;
complete_ = true; // Need to capture identifiers in order to recognize "get" and "set"
// in object literals.
Init();
// Skip initial whitespace allowing HTML comment ends just like
// after a newline and scan first token.
has_line_terminator_before_next_ = true;
SkipWhiteSpace();
Scan();
} }
// ----------------------------------------------------------------------------
// Scanner
Scanner::Scanner(UnicodeCache* unicode_cache)
: unicode_cache_(unicode_cache) { }
uc32 Scanner::ScanHexNumber(int expected_length) { uc32 Scanner::ScanHexNumber(int expected_length) {
ASSERT(expected_length <= 4); // prevent overflow ASSERT(expected_length <= 4); // prevent overflow
...@@ -88,29 +84,6 @@ uc32 Scanner::ScanHexNumber(int expected_length) { ...@@ -88,29 +84,6 @@ uc32 Scanner::ScanHexNumber(int expected_length) {
} }
// ----------------------------------------------------------------------------
// JavaScriptScanner
JavaScriptScanner::JavaScriptScanner(UnicodeCache* scanner_contants)
: Scanner(scanner_contants),
octal_pos_(Location::invalid()),
harmony_scoping_(false) { }
void JavaScriptScanner::Initialize(UC16CharacterStream* source) {
source_ = source;
// Need to capture identifiers in order to recognize "get" and "set"
// in object literals.
Init();
// Skip initial whitespace allowing HTML comment ends just like
// after a newline and scan first token.
has_line_terminator_before_next_ = true;
SkipWhiteSpace();
Scan();
}
// Ensure that tokens can be stored in a byte. // Ensure that tokens can be stored in a byte.
STATIC_ASSERT(Token::NUM_TOKENS <= 0x100); STATIC_ASSERT(Token::NUM_TOKENS <= 0x100);
...@@ -247,7 +220,7 @@ static const byte one_char_tokens[] = { ...@@ -247,7 +220,7 @@ static const byte one_char_tokens[] = {
}; };
Token::Value JavaScriptScanner::Next() { Token::Value Scanner::Next() {
current_ = next_; current_ = next_;
has_line_terminator_before_next_ = false; has_line_terminator_before_next_ = false;
has_multiline_comment_before_next_ = false; has_multiline_comment_before_next_ = false;
...@@ -279,7 +252,7 @@ static inline bool IsByteOrderMark(uc32 c) { ...@@ -279,7 +252,7 @@ static inline bool IsByteOrderMark(uc32 c) {
} }
bool JavaScriptScanner::SkipWhiteSpace() { bool Scanner::SkipWhiteSpace() {
int start_position = source_pos(); int start_position = source_pos();
while (true) { while (true) {
...@@ -319,7 +292,7 @@ bool JavaScriptScanner::SkipWhiteSpace() { ...@@ -319,7 +292,7 @@ bool JavaScriptScanner::SkipWhiteSpace() {
} }
Token::Value JavaScriptScanner::SkipSingleLineComment() { Token::Value Scanner::SkipSingleLineComment() {
Advance(); Advance();
// The line terminator at the end of the line is not considered // The line terminator at the end of the line is not considered
...@@ -335,7 +308,7 @@ Token::Value JavaScriptScanner::SkipSingleLineComment() { ...@@ -335,7 +308,7 @@ Token::Value JavaScriptScanner::SkipSingleLineComment() {
} }
Token::Value JavaScriptScanner::SkipMultiLineComment() { Token::Value Scanner::SkipMultiLineComment() {
ASSERT(c0_ == '*'); ASSERT(c0_ == '*');
Advance(); Advance();
...@@ -361,7 +334,7 @@ Token::Value JavaScriptScanner::SkipMultiLineComment() { ...@@ -361,7 +334,7 @@ Token::Value JavaScriptScanner::SkipMultiLineComment() {
} }
Token::Value JavaScriptScanner::ScanHtmlComment() { Token::Value Scanner::ScanHtmlComment() {
// Check for <!-- comments. // Check for <!-- comments.
ASSERT(c0_ == '!'); ASSERT(c0_ == '!');
Advance(); Advance();
...@@ -376,7 +349,7 @@ Token::Value JavaScriptScanner::ScanHtmlComment() { ...@@ -376,7 +349,7 @@ Token::Value JavaScriptScanner::ScanHtmlComment() {
} }
void JavaScriptScanner::Scan() { void Scanner::Scan() {
next_.literal_chars = NULL; next_.literal_chars = NULL;
Token::Value token; Token::Value token;
do { do {
...@@ -616,7 +589,7 @@ void JavaScriptScanner::Scan() { ...@@ -616,7 +589,7 @@ void JavaScriptScanner::Scan() {
} }
void JavaScriptScanner::SeekForward(int pos) { void Scanner::SeekForward(int pos) {
// After this call, we will have the token at the given position as // After this call, we will have the token at the given position as
// the "next" token. The "current" token will be invalid. // the "next" token. The "current" token will be invalid.
if (pos == next_.location.beg_pos) return; if (pos == next_.location.beg_pos) return;
...@@ -637,7 +610,7 @@ void JavaScriptScanner::SeekForward(int pos) { ...@@ -637,7 +610,7 @@ void JavaScriptScanner::SeekForward(int pos) {
} }
void JavaScriptScanner::ScanEscape() { void Scanner::ScanEscape() {
uc32 c = c0_; uc32 c = c0_;
Advance(); Advance();
...@@ -689,7 +662,7 @@ void JavaScriptScanner::ScanEscape() { ...@@ -689,7 +662,7 @@ void JavaScriptScanner::ScanEscape() {
// Octal escapes of the forms '\0xx' and '\xxx' are not a part of // Octal escapes of the forms '\0xx' and '\xxx' are not a part of
// ECMA-262. Other JS VMs support them. // ECMA-262. Other JS VMs support them.
uc32 JavaScriptScanner::ScanOctalEscape(uc32 c, int length) { uc32 Scanner::ScanOctalEscape(uc32 c, int length) {
uc32 x = c - '0'; uc32 x = c - '0';
int i = 0; int i = 0;
for (; i < length; i++) { for (; i < length; i++) {
...@@ -712,7 +685,7 @@ uc32 JavaScriptScanner::ScanOctalEscape(uc32 c, int length) { ...@@ -712,7 +685,7 @@ uc32 JavaScriptScanner::ScanOctalEscape(uc32 c, int length) {
} }
Token::Value JavaScriptScanner::ScanString() { Token::Value Scanner::ScanString() {
uc32 quote = c0_; uc32 quote = c0_;
Advance(); // consume quote Advance(); // consume quote
...@@ -736,13 +709,13 @@ Token::Value JavaScriptScanner::ScanString() { ...@@ -736,13 +709,13 @@ Token::Value JavaScriptScanner::ScanString() {
} }
void JavaScriptScanner::ScanDecimalDigits() { void Scanner::ScanDecimalDigits() {
while (IsDecimalDigit(c0_)) while (IsDecimalDigit(c0_))
AddLiteralCharAdvance(); AddLiteralCharAdvance();
} }
Token::Value JavaScriptScanner::ScanNumber(bool seen_period) { Token::Value Scanner::ScanNumber(bool seen_period) {
ASSERT(IsDecimalDigit(c0_)); // the first digit of the number or the fraction ASSERT(IsDecimalDigit(c0_)); // the first digit of the number or the fraction
enum { DECIMAL, HEX, OCTAL } kind = DECIMAL; enum { DECIMAL, HEX, OCTAL } kind = DECIMAL;
...@@ -827,7 +800,7 @@ Token::Value JavaScriptScanner::ScanNumber(bool seen_period) { ...@@ -827,7 +800,7 @@ Token::Value JavaScriptScanner::ScanNumber(bool seen_period) {
} }
uc32 JavaScriptScanner::ScanIdentifierUnicodeEscape() { uc32 Scanner::ScanIdentifierUnicodeEscape() {
Advance(); Advance();
if (c0_ != 'u') return -1; if (c0_ != 'u') return -1;
Advance(); Advance();
...@@ -944,7 +917,7 @@ static Token::Value KeywordOrIdentifierToken(const char* input, ...@@ -944,7 +917,7 @@ static Token::Value KeywordOrIdentifierToken(const char* input,
} }
Token::Value JavaScriptScanner::ScanIdentifierOrKeyword() { Token::Value Scanner::ScanIdentifierOrKeyword() {
ASSERT(unicode_cache_->IsIdentifierStart(c0_)); ASSERT(unicode_cache_->IsIdentifierStart(c0_));
LiteralScope literal(this); LiteralScope literal(this);
// Scan identifier start character. // Scan identifier start character.
...@@ -989,7 +962,7 @@ Token::Value JavaScriptScanner::ScanIdentifierOrKeyword() { ...@@ -989,7 +962,7 @@ Token::Value JavaScriptScanner::ScanIdentifierOrKeyword() {
} }
Token::Value JavaScriptScanner::ScanIdentifierSuffix(LiteralScope* literal) { Token::Value Scanner::ScanIdentifierSuffix(LiteralScope* literal) {
// Scan the rest of the identifier characters. // Scan the rest of the identifier characters.
while (unicode_cache_->IsIdentifierPart(c0_)) { while (unicode_cache_->IsIdentifierPart(c0_)) {
if (c0_ == '\\') { if (c0_ == '\\') {
...@@ -1012,7 +985,7 @@ Token::Value JavaScriptScanner::ScanIdentifierSuffix(LiteralScope* literal) { ...@@ -1012,7 +985,7 @@ Token::Value JavaScriptScanner::ScanIdentifierSuffix(LiteralScope* literal) {
} }
bool JavaScriptScanner::ScanRegExpPattern(bool seen_equal) { bool Scanner::ScanRegExpPattern(bool seen_equal) {
// Scan: ('/' | '/=') RegularExpressionBody '/' RegularExpressionFlags // Scan: ('/' | '/=') RegularExpressionBody '/' RegularExpressionFlags
bool in_character_class = false; bool in_character_class = false;
...@@ -1059,7 +1032,7 @@ bool JavaScriptScanner::ScanRegExpPattern(bool seen_equal) { ...@@ -1059,7 +1032,7 @@ bool JavaScriptScanner::ScanRegExpPattern(bool seen_equal) {
} }
bool JavaScriptScanner::ScanLiteralUnicodeEscape() { bool Scanner::ScanLiteralUnicodeEscape() {
ASSERT(c0_ == '\\'); ASSERT(c0_ == '\\');
uc32 chars_read[6] = {'\\', 'u', 0, 0, 0, 0}; uc32 chars_read[6] = {'\\', 'u', 0, 0, 0, 0};
Advance(); Advance();
...@@ -1089,7 +1062,7 @@ bool JavaScriptScanner::ScanLiteralUnicodeEscape() { ...@@ -1089,7 +1062,7 @@ bool JavaScriptScanner::ScanLiteralUnicodeEscape() {
} }
bool JavaScriptScanner::ScanRegExpFlags() { bool Scanner::ScanRegExpFlags() {
// Scan regular expression flags. // Scan regular expression flags.
LiteralScope literal(this); LiteralScope literal(this);
while (unicode_cache_->IsIdentifierPart(c0_)) { while (unicode_cache_->IsIdentifierPart(c0_)) {
......
This diff is collapsed.
...@@ -63,7 +63,7 @@ TEST(ScanKeywords) { ...@@ -63,7 +63,7 @@ TEST(ScanKeywords) {
CHECK(static_cast<int>(sizeof(buffer)) >= length); CHECK(static_cast<int>(sizeof(buffer)) >= length);
{ {
i::Utf8ToUC16CharacterStream stream(keyword, length); i::Utf8ToUC16CharacterStream stream(keyword, length);
i::JavaScriptScanner scanner(&unicode_cache); i::Scanner scanner(&unicode_cache);
// The scanner should parse 'let' as Token::LET for this test. // The scanner should parse 'let' as Token::LET for this test.
scanner.SetHarmonyScoping(true); scanner.SetHarmonyScoping(true);
scanner.Initialize(&stream); scanner.Initialize(&stream);
...@@ -73,7 +73,7 @@ TEST(ScanKeywords) { ...@@ -73,7 +73,7 @@ TEST(ScanKeywords) {
// Removing characters will make keyword matching fail. // Removing characters will make keyword matching fail.
{ {
i::Utf8ToUC16CharacterStream stream(keyword, length - 1); i::Utf8ToUC16CharacterStream stream(keyword, length - 1);
i::JavaScriptScanner scanner(&unicode_cache); i::Scanner scanner(&unicode_cache);
scanner.Initialize(&stream); scanner.Initialize(&stream);
CHECK_EQ(i::Token::IDENTIFIER, scanner.Next()); CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
CHECK_EQ(i::Token::EOS, scanner.Next()); CHECK_EQ(i::Token::EOS, scanner.Next());
...@@ -84,7 +84,7 @@ TEST(ScanKeywords) { ...@@ -84,7 +84,7 @@ TEST(ScanKeywords) {
memmove(buffer, keyword, length); memmove(buffer, keyword, length);
buffer[length] = chars_to_append[j]; buffer[length] = chars_to_append[j];
i::Utf8ToUC16CharacterStream stream(buffer, length + 1); i::Utf8ToUC16CharacterStream stream(buffer, length + 1);
i::JavaScriptScanner scanner(&unicode_cache); i::Scanner scanner(&unicode_cache);
scanner.Initialize(&stream); scanner.Initialize(&stream);
CHECK_EQ(i::Token::IDENTIFIER, scanner.Next()); CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
CHECK_EQ(i::Token::EOS, scanner.Next()); CHECK_EQ(i::Token::EOS, scanner.Next());
...@@ -94,7 +94,7 @@ TEST(ScanKeywords) { ...@@ -94,7 +94,7 @@ TEST(ScanKeywords) {
memmove(buffer, keyword, length); memmove(buffer, keyword, length);
buffer[length - 1] = '_'; buffer[length - 1] = '_';
i::Utf8ToUC16CharacterStream stream(buffer, length); i::Utf8ToUC16CharacterStream stream(buffer, length);
i::JavaScriptScanner scanner(&unicode_cache); i::Scanner scanner(&unicode_cache);
scanner.Initialize(&stream); scanner.Initialize(&stream);
CHECK_EQ(i::Token::IDENTIFIER, scanner.Next()); CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
CHECK_EQ(i::Token::EOS, scanner.Next()); CHECK_EQ(i::Token::EOS, scanner.Next());
...@@ -257,7 +257,7 @@ TEST(StandAlonePreParser) { ...@@ -257,7 +257,7 @@ TEST(StandAlonePreParser) {
reinterpret_cast<const i::byte*>(program), reinterpret_cast<const i::byte*>(program),
static_cast<unsigned>(strlen(program))); static_cast<unsigned>(strlen(program)));
i::CompleteParserRecorder log; i::CompleteParserRecorder log;
i::JavaScriptScanner scanner(i::Isolate::Current()->unicode_cache()); i::Scanner scanner(i::Isolate::Current()->unicode_cache());
scanner.Initialize(&stream); scanner.Initialize(&stream);
int flags = i::kAllowLazy | i::kAllowNativesSyntax; int flags = i::kAllowLazy | i::kAllowNativesSyntax;
...@@ -293,7 +293,7 @@ TEST(StandAlonePreParserNoNatives) { ...@@ -293,7 +293,7 @@ TEST(StandAlonePreParserNoNatives) {
reinterpret_cast<const i::byte*>(program), reinterpret_cast<const i::byte*>(program),
static_cast<unsigned>(strlen(program))); static_cast<unsigned>(strlen(program)));
i::CompleteParserRecorder log; i::CompleteParserRecorder log;
i::JavaScriptScanner scanner(i::Isolate::Current()->unicode_cache()); i::Scanner scanner(i::Isolate::Current()->unicode_cache());
scanner.Initialize(&stream); scanner.Initialize(&stream);
// Flags don't allow natives syntax. // Flags don't allow natives syntax.
...@@ -394,7 +394,7 @@ TEST(PreParseOverflow) { ...@@ -394,7 +394,7 @@ TEST(PreParseOverflow) {
reinterpret_cast<const i::byte*>(*program), reinterpret_cast<const i::byte*>(*program),
static_cast<unsigned>(kProgramSize)); static_cast<unsigned>(kProgramSize));
i::CompleteParserRecorder log; i::CompleteParserRecorder log;
i::JavaScriptScanner scanner(i::Isolate::Current()->unicode_cache()); i::Scanner scanner(i::Isolate::Current()->unicode_cache());
scanner.Initialize(&stream); scanner.Initialize(&stream);
...@@ -612,7 +612,7 @@ void TestStreamScanner(i::UC16CharacterStream* stream, ...@@ -612,7 +612,7 @@ void TestStreamScanner(i::UC16CharacterStream* stream,
i::Token::Value* expected_tokens, i::Token::Value* expected_tokens,
int skip_pos = 0, // Zero means not skipping. int skip_pos = 0, // Zero means not skipping.
int skip_to = 0) { int skip_to = 0) {
i::JavaScriptScanner scanner(i::Isolate::Current()->unicode_cache()); i::Scanner scanner(i::Isolate::Current()->unicode_cache());
scanner.Initialize(stream); scanner.Initialize(stream);
int i = 0; int i = 0;
...@@ -693,7 +693,7 @@ void TestScanRegExp(const char* re_source, const char* expected) { ...@@ -693,7 +693,7 @@ void TestScanRegExp(const char* re_source, const char* expected) {
i::Utf8ToUC16CharacterStream stream( i::Utf8ToUC16CharacterStream stream(
reinterpret_cast<const i::byte*>(re_source), reinterpret_cast<const i::byte*>(re_source),
static_cast<unsigned>(strlen(re_source))); static_cast<unsigned>(strlen(re_source)));
i::JavaScriptScanner scanner(i::Isolate::Current()->unicode_cache()); i::Scanner scanner(i::Isolate::Current()->unicode_cache());
scanner.Initialize(&stream); scanner.Initialize(&stream);
i::Token::Value start = scanner.peek(); i::Token::Value start = scanner.peek();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment