25 class AstValueFactory;
33 if (
static_cast<unsigned>(c) <= 9)
return c;
34 c = (c | 0x20) - (
'a' -
'0');
35 if (
static_cast<unsigned>(c) <= 5)
return c + 10;
69 inline unsigned pos()
const {
return pos_; }
76 unsigned buffered_chars =
78 if (code_unit_count <= buffered_chars) {
80 pos_ += code_unit_count;
81 return code_unit_count;
171 static bool Match(
void* first,
void* second);
214 DCHECK(code_unit < 0x10000u);
393 return !strncmp(token, data, length);
403 *is_get = strncmp(token,
"get", 3) == 0;
404 *is_set = !*is_get && strncmp(token,
"set", 3) == 0;
495 free_buffer->
Reset();
static const unsigned kMaxChar
int AddNumber(Vector< const uint8_t > key, int value)
int AddTwoByteSymbol(Vector< const uint16_t > key, int value)
int AddOneByteSymbol(Vector< const uint8_t > key, int value)
static const int kBufferSize
int AddSymbol(Vector< const uint8_t > key, bool is_one_byte, int value)
static bool Match(void *first, void *second)
static uint32_t Hash(Vector< const uint8_t > key, bool is_one_byte)
uint8_t * BackupKey(Vector< const uint8_t > key, bool is_one_byte)
UnicodeCache * unicode_constants_
static bool IsNumberCanonical(Vector< const uint8_t > key)
DuplicateFinder(UnicodeCache *constants)
char number_buffer_[kBufferSize]
SequenceCollector< unsigned char > backing_store_
static const int kMaxGrowth
static const int kMinConversionSlack
static const int kGrowthFactory
INLINE(void AddChar(uint32_t code_unit))
Vector< const uint8_t > one_byte_literal() const
Vector< const uint16_t > two_byte_literal() const
static const int kInitialCapacity
Handle< String > Internalize(Isolate *isolate) const
bool is_contextual_keyword(Vector< const char > keyword) const
DISALLOW_COPY_AND_ASSIGN(LiteralBuffer)
int NewCapacity(int min_capacity)
Vector< byte > backing_store_
LiteralScope(Scanner *self)
void SeekForward(int pos)
Scanner(UnicodeCache *scanner_contants)
Token::Value peek() const
int FindNumber(DuplicateFinder *finder, int value)
bool has_multiline_comment_before_next_
UnicodeCache * unicode_cache()
Utf16CharacterStream * source_
Vector< const uint16_t > next_literal_two_byte_string()
Vector< const uint8_t > literal_one_byte_string()
bool is_literal_one_byte()
void Initialize(Utf16CharacterStream *source)
void SetHarmonyClasses(bool classes)
void SetHarmonyModules(bool modules)
UnicodeCache * unicode_cache_
bool HarmonyClasses() const
bool is_next_contextual_keyword(Vector< const char > keyword)
void SetHarmonyNumericLiterals(bool numeric_literals)
static const int kNoOctalLocation
bool HarmonyModules() const
Token::Value ScanString()
int FindSymbol(DuplicateFinder *finder, int value)
bool literal_contains_escapes() const
bool is_next_literal_one_byte()
Token::Value ScanNumber(bool seen_period)
void IsGetOrSet(bool *is_get, bool *is_set)
LiteralBuffer source_mapping_url_
Token::Value Select(uc32 next, Token::Value then, Token::Value else_)
Token::Value SkipMultiLineComment()
bool UnescapedLiteralMatches(const char *data, int length)
void SetHarmonyScoping(bool scoping)
Location peek_location() const
bool has_line_terminator_before_next_
bool HarmonyNumericLiterals() const
const LiteralBuffer * source_url() const
bool ScanRegExpPattern(bool seen_equal)
Token::Value current_token()
bool harmony_numeric_literals_
int literal_length() const
LiteralBuffer literal_buffer2_
bool ScanLiteralUnicodeEscape()
uc32 ScanOctalEscape(uc32 c, int length)
const LiteralBuffer * source_mapping_url() const
Token::Value ScanIdentifierOrKeyword()
LiteralBuffer source_url_
Token::Value SkipSourceURLComment()
uc32 ScanHexNumber(int expected_length)
bool IdentifierIsFutureStrictReserved(const AstRawString *string) const
bool HarmonyScoping() const
void clear_octal_position()
LiteralBuffer literal_buffer1_
void AddLiteralCharAdvance()
static const int kCharacterLookaheadBufferSize
Token::Value SkipSingleLineComment()
Vector< const uint8_t > next_literal_one_byte_string()
const AstRawString * NextSymbol(AstValueFactory *ast_value_factory)
Vector< const uint16_t > literal_two_byte_string()
uc32 ScanIdentifierUnicodeEscape()
INLINE(void AddLiteralChar(uc32 c))
Token::Value ScanIdentifierSuffix(LiteralScope *literal)
Location octal_position() const
bool is_literal_contextual_keyword(Vector< const char > keyword)
Token::Value ScanHtmlComment()
bool HasAnyLineTerminatorBeforeNext() const
Token::Value Select(Token::Value tok)
void TryToParseSourceURLComment()
int next_literal_length() const
Location location() const
const AstRawString * CurrentSymbol(AstValueFactory *ast_value_factory)
unibrow::Predicate< IdentifierStart, 128 > kIsIdentifierStart
bool IsIdentifierPart(unibrow::uchar c)
unibrow::Utf8Decoder< 512 > Utf8Decoder
bool IsLineTerminator(unibrow::uchar c)
bool IsWhiteSpace(unibrow::uchar c)
bool IsWhiteSpaceOrLineTerminator(unibrow::uchar c)
bool IsIdentifierStart(unibrow::uchar c)
StaticResource< Utf8Decoder > utf8_decoder_
StaticResource< Utf8Decoder > * utf8_decoder()
unibrow::Predicate< WhiteSpaceOrLineTerminator, 128 > kIsWhiteSpaceOrLineTerminator
unibrow::Predicate< unibrow::LineTerminator, 128 > kIsLineTerminator
unibrow::Predicate< WhiteSpace, 128 > kIsWhiteSpace
unibrow::Predicate< IdentifierPart, 128 > kIsIdentifierPart
DISALLOW_COPY_AND_ASSIGN(UnicodeCache)
virtual unsigned SlowSeekForward(unsigned code_unit_count)=0
virtual void PushBack(int32_t code_unit)=0
const uint16_t * buffer_end_
virtual ~Utf16CharacterStream()
virtual bool ReadBlock()=0
unsigned SeekForward(unsigned code_unit_count)
static const uc32 kEndOfInput
const uint16_t * buffer_cursor_
static Vector< T > New(int length)
enable harmony numeric enable harmony object literal extensions true
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS 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 enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK_NOT_NULL(p)
#define DCHECK(condition)
static LifetimePosition Min(LifetimePosition a, LifetimePosition b)
static LifetimePosition Max(LifetimePosition a, LifetimePosition b)
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))
void MemCopy(void *dest, const void *src, size_t size)
Debugger support for the V8 JavaScript engine.
static Location invalid()
LiteralBuffer * literal_chars