28 #ifndef V8_JSREGEXP_H_
29 #define V8_JSREGEXP_H_
40 class RegExpMacroAssembler;
43 class BoyerMooreLookahead;
49 #ifdef V8_INTERPRETED_REGEXP
61 bool* has_pending_exception);
87 int capture_register_count);
165 INLINE(
bool HasException()) {
return num_matches_ < 0; }
170 int current_match_index_;
171 int registers_per_match_;
174 int register_array_size_;
239 static bool CompileIrregexp(
241 static inline bool EnsureCompiledIrregexp(
319 bool Get(
unsigned value);
326 void Set(
unsigned value,
Zone* zone);
334 : first_(first), remaining_(remaining), successors_(
NULL) { }
336 ZoneList<unsigned>* remaining_;
337 ZoneList<OutSet*>* successors_;
352 : from_(from), to_(to), out_set_(out_set) { }
357 out_set_ = out_set_->
Extend(value, zone);
386 template <
typename Callback>
388 return tree()->ForEach(callback);
394 OutSet* empty() {
return &empty_; }
396 ZoneSplayTree<Config>* tree() {
return &tree_; }
397 ZoneSplayTree<Config> tree_;
401 #define FOR_EACH_NODE_TYPE(VISIT) \
405 VISIT(BackReference) \
410 #define FOR_EACH_REG_EXP_TREE_TYPE(VISIT) \
414 VISIT(CharacterClass) \
419 VISIT(BackReference) \
424 #define FORWARD_DECLARE(Name) class RegExp##Name;
426 #undef FORWARD_DECLARE
436 static TextElement Atom(RegExpAtom* atom);
437 static TextElement CharClass(RegExpCharacterClass* char_class);
448 ASSERT(text_type() == ATOM);
449 return reinterpret_cast<RegExpAtom*
>(tree());
453 ASSERT(text_type() == CHAR_CLASS);
454 return reinterpret_cast<RegExpCharacterClass*
>(tree());
458 TextElement(TextType text_type,
RegExpTree* tree)
459 : cp_offset_(-1), text_type_(text_type), tree_(tree) {}
541 cannot_match_(
false) { }
543 : characters_(characters),
546 cannot_match_(
false) { }
551 void Advance(
int by,
bool ascii);
565 ASSERT(index < characters_);
566 return positions_ + index;
568 uint32_t
mask() {
return mask_; }
592 bm_info_[0] = bm_info_[1] =
NULL;
605 virtual int EatsAtLeast(
int still_to_find,
int budget,
bool not_at_start) = 0;
611 bool preload_has_checked_bounds,
612 Label* on_possible_success,
614 bool fall_through_on_failure);
621 int characters_filled_in,
622 bool not_at_start) = 0;
679 return bm_info_[not_at_start ? 1 : 0];
691 bm_info_[not_at_start ? 1 : 0] = bm;
695 static const int kFirstCharBudget = 10;
716 if (that.from_ ==
kNone)
718 else if (from_ ==
kNone)
724 return (from_ <= value) && (value <= to_);
727 int from()
const {
return from_; }
728 int to()
const {
return to_; }
748 on_success_->
FillInBMInfo(offset, budget - 1, bm, not_at_start);
782 int clear_capture_count,
783 int clear_capture_from,
791 virtual int EatsAtLeast(
int still_to_find,
int budget,
bool not_at_start);
797 details, compiler, filled_in, not_at_start);
838 action_type_(action_type) { }
854 elms_->
Add(TextElement::CharClass(that),
zone());
858 virtual int EatsAtLeast(
int still_to_find,
int budget,
bool not_at_start);
861 int characters_filled_in,
876 enum TextEmitPassType {
878 SIMPLE_CHARACTER_MATCH,
879 NON_LETTER_CHARACTER_MATCH,
880 CASE_CHARACTER_MATCH,
881 CHARACTER_CLASS_MATCH
883 static bool SkipPass(
int pass,
bool ignore_case);
884 static const int kFirstRealPass = SIMPLE_CHARACTER_MATCH;
885 static const int kLastPass = CHARACTER_CLASS_MATCH;
886 void TextEmitPass(RegExpCompiler* compiler,
887 TextEmitPassType pass,
890 bool first_element_checked,
893 ZoneList<TextElement>* elms_;
923 virtual int EatsAtLeast(
int still_to_find,
int budget,
bool not_at_start);
936 enum IfPrevious { kIsNonWord, kIsWord };
937 void BacktrackIfPrevious(RegExpCompiler* compiler,
939 IfPrevious backtrack_if_previous);
952 start_reg_(start_reg),
953 end_reg_(end_reg) { }
963 int characters_filled_in,
987 bool not_at_start) {
return 0; }
990 int characters_filled_in,
1012 int clear_capture_count,
1013 int clear_capture_start,
1016 stack_pointer_register_(stack_pointer_reg),
1017 current_position_register_(position_reg),
1018 clear_capture_count_(clear_capture_count),
1019 clear_capture_start_(clear_capture_start) { }
1023 int stack_pointer_register_;
1024 int current_position_register_;
1025 int clear_capture_count_;
1026 int clear_capture_start_;
1062 class AlternativeGeneration;
1072 not_at_start_(
false),
1073 being_calculated_(
false) { }
1088 int characters_filled_in,
1112 int CalculatePreloadCharacters(
RegExpCompiler* compiler,
int eats_at_least);
1117 int preload_characters,
1118 bool next_expects_preload);
1123 bool being_calculated_;
1139 int characters_filled_in,
1146 offset, budget - 1, bm, not_at_start);
1164 continue_node_(
NULL),
1165 body_can_be_zero_length_(body_can_be_zero_length) { }
1172 int characters_filled_in,
1194 bool body_can_be_zero_length_;
1239 Interval new_range);
1251 for (
int i = 0; i <
kMapSize; i++) {
1252 map_->
Add(
false, zone);
1256 bool&
at(
int i) {
return map_->
at(i); }
1263 void Set(
int character);
1288 return bitmaps_->at(map_number)->map_count();
1293 void Set(
int map_number,
int character) {
1294 if (character > max_char_)
return;
1296 info->
Set(character);
1300 if (interval.
from() > max_char_)
return;
1302 if (interval.
to() > max_char_) {
1310 bitmaps_->at(map_number)->SetAll();
1314 for (
int i = from_map; i < length_; i++)
SetAll(i);
1329 int GetSkipTable(
int min_lookahead,
1332 bool FindWorthwhileInterval(
int* from,
int* to);
1333 int FindBestInterval(
1334 int max_number_of_chars,
int old_biggest_points,
int* from,
int* to);
1360 : action_type_(action_type), reg_(reg), next_(
NULL) { }
1377 is_capture_(is_capture) { }
1418 characters_preloaded_(0),
1419 bound_checked_up_to_(0),
1441 return backtrack_ ==
NULL &&
1444 characters_preloaded_ == 0 &&
1445 bound_checked_up_to_ == 0 &&
1469 new_action->next_ = actions_;
1470 actions_ = new_action;
1479 quick_check_performed_ = *d;
1485 int FindAffectedRegisters(
OutSet* affected_registers,
Zone* zone);
1488 OutSet& affected_registers,
1489 OutSet* registers_to_pop,
1490 OutSet* registers_to_clear,
1494 OutSet& registers_to_pop,
1495 OutSet& registers_to_clear);
1497 DeferredAction* actions_;
1501 int characters_preloaded_;
1502 int bound_checked_up_to_;
1512 #define DECLARE_VISIT(Type) \
1513 virtual void Visit##Type(Type##Node* that) = 0;
1515 #undef DECLARE_VISIT
1539 #define DECLARE_VISIT(Type) \
1540 virtual void Visit##Type(Type##Node* that);
1542 #undef DECLARE_VISIT
1570 : ignore_case_(ignore_case),
1571 is_ascii_(is_ascii),
1572 error_message_(
NULL) { }
1575 #define DECLARE_VISIT(Type) \
1576 virtual void Visit##Type(Type##Node* that);
1578 #undef DECLARE_VISIT
1584 return error_message_;
1593 const char* error_message_;
1595 DISALLOW_IMPLICIT_CONSTRUCTORS(
Analysis);
1619 : error_message(error_message),
1620 code(isolate->heap()->the_hole_value()),
1637 bool is_ascii,
Zone* zone);
1645 #endif // V8_JSREGEXP_H_
#define FORWARD_DECLARE(Name)
void SetInterval(const Interval &interval)
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
virtual RegExpNode * FilterASCII(int depth, bool ignore_case)
virtual void FillInBMInfo(int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start)
Analysis(bool ignore_case, bool is_ascii)
struct v8::internal::ActionNode::@17::@22 u_empty_match_check
#define FOR_EACH_REG_EXP_TREE_TYPE(VISIT)
int GreedyLoopTextLengthForAlternative(GuardedAlternative *alternative)
virtual void Accept(NodeVisitor *visitor)
int current_position_register
RegExpCharacterClass * char_class() const
static Vector< const int > GetWordBounds()
virtual bool try_to_emit_quick_check_for_alternative(int i)
static AssertionNode * AtStart(RegExpNode *on_success)
void SetInterval(int map_number, const Interval &interval)
static ActionNode * SetRegister(int reg, int val, RegExpNode *on_success)
static Code * IrregexpNativeCode(FixedArray *re, bool is_ascii)
void set(int index, Object *value)
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 true
RegExpNode * continue_node()
TextNode(RegExpCharacterClass *that, RegExpNode *on_success)
virtual void FillInBMInfo(int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start)
virtual void Emit(RegExpCompiler *compiler, Trace *trace)
DeferredCapture(int reg, bool is_capture, Trace *trace)
static ActionNode * BeginSubmatch(int stack_pointer_reg, int position_reg, RegExpNode *on_success)
virtual int EatsAtLeast(int still_to_find, int recursion_depth, bool not_at_start)
virtual void Emit(RegExpCompiler *compiler, Trace *trace)
void set_characters(int characters)
virtual RegExpNode * GetSuccessorOfOmnivorousTextNode(RegExpCompiler *compiler)
static Smi * FromInt(int value)
void set_at_start(bool at_start)
static const int kLastCaptureCount
virtual void FillInBMInfo(int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start)
GlobalCache(Handle< JSRegExp > regexp, Handle< String > subject, bool is_global, Isolate *isolate)
bool follows_word_interest
virtual void FillInBMInfo(int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start)
struct v8::internal::ActionNode::@17::@20 u_position_register
bool EmitQuickCheck(RegExpCompiler *compiler, Trace *trace, bool preload_has_checked_bounds, Label *on_possible_success, QuickCheckDetails *details_return, bool fall_through_on_failure)
void set_loop_label(Label *label)
static ActionNode * EmptyMatchCheck(int start_register, int repetition_register, int repetition_limit, RegExpNode *on_success)
Position * positions(int index)
virtual RegExpNode * GetSuccessorOfOmnivorousTextNode(RegExpCompiler *compiler)
bool replacement_calculated
LimitResult LimitVersions(RegExpCompiler *compiler, Trace *trace)
virtual void Emit(RegExpCompiler *compiler, Trace *trace)
static Handle< Object > CreateRegExpLiteral(Handle< JSFunction > constructor, Handle< String > pattern, Handle< String > flags, bool *has_pending_exception)
virtual int GreedyLoopTextLength()
void AddFromFollowing(NodeInfo *that)
static ActionNode * IncrementRegister(int reg, RegExpNode *on_success)
void AddRange(CharacterRange range, int value, Zone *zone)
static int IrregexpNumberOfCaptures(FixedArray *re)
virtual RegExpNode * FilterASCII(int depth, bool ignore_case)
RegExpNode * replacement_
static void Canonicalize(ZoneList< CharacterRange > *ranges)
virtual void GetQuickCheckDetails(QuickCheckDetails *details, RegExpCompiler *compiler, int characters_filled_in, bool not_at_start)
RegExpNode * FilterSuccessor(int depth, bool ignore_case)
void EnsureAnalyzed(RegExpNode *node)
void set_flush_budget(int to)
virtual void FillInBMInfo(int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start)
CompilationResult(Object *code, int registers)
static CharacterRange Everything()
DispatchTableConstructor(DispatchTable *table, bool ignore_case, Zone *zone)
#define DECLARE_VISIT(Type)
virtual bool try_to_emit_quick_check_for_alternative(int i)
CharacterRange(void *null)
void AddValue(int value, Zone *zone)
virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start)
#define ASSERT(condition)
static ActionNode * StorePosition(int reg, bool is_capture, RegExpNode *on_success)
virtual void FillInBMInfo(int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start)
void set_characters_preloaded(int count)
TextType text_type() const
void AdvanceCurrentPositionInTrace(int by, RegExpCompiler *compiler)
const char * error_message()
void BuildTable(ChoiceNode *node)
RegExpCompiler * compiler()
Interval(int from, int to)
virtual void GetQuickCheckDetails(QuickCheckDetails *details, RegExpCompiler *compiler, int characters_filled_in, bool not_at_start)
bool EmitSkipInstructions(RegExpMacroAssembler *masm)
ZoneList< TextElement > * elements()
DeferredSetRegister(int reg, int value)
void SetAll(int map_number)
virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start)
BoyerMoorePositionInfo * at(int i)
static void SetLastSubject(FixedArray *array, String *to)
struct v8::internal::ActionNode::@17::@21 u_submatch
virtual RegExpNode * FilterASCII(int depth, bool ignore_case)
static void Negate(ZoneList< CharacterRange > *src, ZoneList< CharacterRange > *dst, Zone *zone)
static const int kLastSubjectOffset
static Handle< Object > AtomExec(Handle< JSRegExp > regexp, Handle< String > subject, int index, Handle< JSArray > lastMatchInfo)
static Smi * cast(Object *object)
static const int kRegExpExecutableMemoryLimit
virtual void Emit(RegExpCompiler *compiler, Trace *trace)=0
static ActionNode * PositiveSubmatchSuccess(int stack_pointer_reg, int restore_reg, int clear_capture_count, int clear_capture_from, RegExpNode *on_success)
static void Split(ZoneList< CharacterRange > *base, Vector< const int > overlay, ZoneList< CharacterRange > **included, ZoneList< CharacterRange > **excluded, Zone *zone)
static const int kLastCaptureCountOffset
bool follows_start_interest
virtual RegExpNode * FilterASCII(int depth, bool ignore_case)
static void SetLastInput(FixedArray *array, String *to)
GuardedAlternative(RegExpNode *node)
virtual void FillInBMInfo(int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start)
static const int kRegWxpCompiledLimit
void Advance(int by, bool ascii)
void Merge(QuickCheckDetails *other, int from_index)
static int IrregexpPrepare(Handle< JSRegExp > regexp, Handle< String > subject)
RegExpTree * tree() const
NegativeLookaheadChoiceNode(GuardedAlternative this_must_fail, GuardedAlternative then_do_this, Zone *zone)
virtual void Emit(RegExpCompiler *compiler, Trace *trace)
static const int kRecursionBudget
virtual void FillInBMInfo(int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start)
static const unsigned kFirstLimit
void AddAlternative(GuardedAlternative node)
static const int kLastSubject
static void SetLastCaptureCount(FixedArray *array, int to)
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 only print modified registers Don t break for ASM_UNIMPLEMENTED_BREAK macros print stack trace when an illegal exception is thrown randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot testing_bool_flag testing_int_flag string flag tmp file in which to serialize heap Print the time it takes to lazily compile hydrogen code stubs concurrent_recompilation concurrent_sweeping Print usage including flags
void fail(const char *error_message)
static CharacterRange Range(uc16 from, uc16 to)
RegExpNode * replacement()
CharacterRange(uc16 from, uc16 to)
Interval Union(Interval that)
void set_bound_checked_up_to(int to)
virtual RegExpNode * FilterASCII(int depth, bool ignore_case)
void set_backtrack(Label *backtrack)
virtual void Accept(NodeVisitor *visitor)
virtual void GetQuickCheckDetails(QuickCheckDetails *details, RegExpCompiler *compiler, int characters_filled_in, bool not_at_start)
virtual void GetQuickCheckDetails(QuickCheckDetails *details, RegExpCompiler *compiler, int filled_in, bool not_at_start)
ChoiceNode(int expected_size, Zone *zone)
virtual void GetQuickCheckDetails(QuickCheckDetails *details, RegExpCompiler *compiler, int characters_filled_in, bool not_at_start)
static bool IsCanonical(ZoneList< CharacterRange > *ranges)
virtual void Accept(NodeVisitor *visitor)
QuickCheckDetails * quick_check_performed()
static Handle< JSArray > SetLastMatchInfo(Handle< JSArray > last_match_info, Handle< String > subject, int capture_count, int32_t *match)
void AddGuard(Guard *guard, Zone *zone)
virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start)
static int GetCapture(FixedArray *array, int index)
void set_bm_info(bool not_at_start, BoyerMooreLookahead *bm)
LoopChoiceNode(bool body_can_be_zero_length, Zone *zone)
void AddInverse(ZoneList< CharacterRange > *ranges)
virtual void VisitLoopChoice(LoopChoiceNode *that)
AssertionType assertion_type()
void AddCaseEquivalents(ZoneList< CharacterRange > *ranges, bool is_ascii, Zone *zone)
virtual void Emit(RegExpCompiler *compiler, Trace *trace)
virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start)
static void IrregexpInitialize(Handle< JSRegExp > re, Handle< String > pattern, JSRegExp::Flags flags, int capture_register_count)
static const int kFirstCapture
DeferredClearCaptures(Interval range)
static Handle< Object > Exec(Handle< JSRegExp > regexp, Handle< String > subject, int index, Handle< JSArray > lastMatchInfo)
virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start)
Entry(uc16 from, uc16 to, OutSet *out_set)
virtual int EatsAtLeast(int still_to_find, int recursion_depth, bool not_at_start)
RegExpAtom * atom() const
static int IrregexpExecRaw(Handle< JSRegExp > regexp, Handle< String > subject, int index, int32_t *output, int output_size)
ContainedInLattice Combine(ContainedInLattice a, ContainedInLattice b)
static const int kMapSize
bool determines_perfectly
EndNode(Action action, Zone *zone)
void add_action(DeferredAction *new_action)
static int Compare(uc16 a, uc16 b)
virtual void Emit(RegExpCompiler *compiler, Trace *trace)
int stack_pointer_register
static int GetLastCaptureCount(FixedArray *array)
virtual void Accept(NodeVisitor *visitor)
BoyerMooreLookahead(int length, RegExpCompiler *compiler, Zone *zone)
NegativeSubmatchSuccess(int stack_pointer_reg, int position_reg, int clear_capture_count, int clear_capture_start, Zone *zone)
void SaveBMInfo(BoyerMooreLookahead *bm, bool not_at_start, int offset)
static const int kLastInput
void AddRange(CharacterRange range)
void set_cp_offset(int cp_offset)
void set_being_calculated(bool b)
static void AtomCompile(Handle< JSRegExp > re, Handle< String > pattern, JSRegExp::Flags flags, Handle< String > match_pattern)
void ResetCompilationState()
int characters_preloaded()
DeferredAction * actions()
static const int kNodeIsTooComplexForGreedyLoops
DispatchTable * GetTable(bool ignore_case)
static int IrregexpMaxRegisterCount(FixedArray *re)
int EatsAtLeastHelper(int still_to_find, int budget, RegExpNode *ignore_this_node, bool not_at_start)
RegExpNode * on_success()
static void SetIrregexpMaxRegisterCount(FixedArray *re, int value)
BoyerMooreLookahead * bm_info(bool not_at_start)
static int AtomExecRaw(Handle< JSRegExp > regexp, Handle< String > subject, int index, int32_t *output, int output_size)
static Handle< String > ToString(Handle< Object > value)
virtual RegExpNode * FilterASCII(int depth, bool ignore_case)
static const int kLastMatchOverhead
INLINE(bool HasException())
struct v8::internal::ActionNode::@17::@19 u_increment_register
BoyerMoorePositionInfo(Zone *zone)
static const int kHeaderSize
void set_from(uc16 value)
int bound_checked_up_to()
virtual int GreedyLoopTextLength()
virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start)
void AddContinueAlternative(GuardedAlternative alt)
Guard(int reg, Relation op, int value)
bool GetStoredPosition(int reg, int *cp_offset)
virtual void FillInBMInfo(int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start)
static AssertionNode * AfterNewline(RegExpNode *on_success)
static AssertionNode * AtNonBoundary(RegExpNode *on_success)
BackReferenceNode(int start_reg, int end_reg, RegExpNode *on_success)
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 info
virtual void VisitLoopChoice(LoopChoiceNode *that)
static bool UsesNativeRegExp()
static const int kMaxCopiesCodeGenerated
virtual void GetQuickCheckDetails(QuickCheckDetails *details, RegExpCompiler *compiler, int characters_filled_in, bool not_at_start)
virtual void GetQuickCheckDetails(QuickCheckDetails *details, RegExpCompiler *compiler, int characters_filled_in, bool not_at_start)=0
static const int kFirstCaptureOffset
int Count(int map_number)
static const int kLastInputOffset
void MakeCaseIndependent(bool is_ascii)
virtual void Accept(NodeVisitor *visitor)
ZoneList< GuardedAlternative > * alternatives()
static const int kPayloadMask
void SetRest(int from_map)
static const int kStartMarker
#define ASSERT_EQ(v1, v2)
void ForEach(Callback *callback)
OutSet * Extend(unsigned value, Zone *zone)
static void DotPrint(const char *label, RegExpNode *node, bool ignore_case)
struct v8::internal::ActionNode::@17::@18 u_store_register
ZoneList< GuardedAlternative > * alternatives_
ContainedInLattice AddRange(ContainedInLattice containment, const int *ranges, int ranges_length, Interval new_range)
virtual int GreedyLoopTextLength()
static ByteArray * IrregexpByteCode(FixedArray *re, bool is_ascii)
virtual void Emit(RegExpCompiler *compiler, Trace *trace)
RegExpNode * set_replacement(RegExpNode *replacement)
static ActionNode * ClearCaptures(Interval range, RegExpNode *on_success)
void Set(int map_number, int character)
static int IrregexpNumberOfRegisters(FixedArray *re)
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
bool Rationalize(bool ascii)
virtual void GetQuickCheckDetails(QuickCheckDetails *details, RegExpCompiler *compiler, int characters_filled_in, bool not_at_start)
TextNode(ZoneList< TextElement > *elms, RegExpNode *on_success)
void AddLoopAlternative(GuardedAlternative alt)
DeferredIncrementRegister(int reg)
void set_choice_index(int value)
SeqRegExpNode(RegExpNode *on_success)
DispatchTable(Zone *zone)
virtual void Accept(NodeVisitor *visitor)=0
static Handle< Object > Compile(Handle< JSRegExp > re, Handle< String > pattern, Handle< String > flags)
ActionNode::ActionType action_type()
CompilationResult(Isolate *isolate, const char *error_message)
ZoneList< Guard * > * guards()
const char * error_message
virtual void Accept(NodeVisitor *visitor)
virtual void Emit(RegExpCompiler *compiler, Trace *trace)
static Handle< Object > IrregexpExec(Handle< JSRegExp > regexp, Handle< String > subject, int index, Handle< JSArray > lastMatchInfo)
bool Matches(NodeInfo *that)
#define FOR_EACH_NODE_TYPE(VISIT)
void set_on_success(RegExpNode *node)
bool body_can_be_zero_length()
virtual void Accept(NodeVisitor *visitor)
void Flush(RegExpCompiler *compiler, RegExpNode *successor)
int kUninitializedRegExpNodePlaceHolder
void set_quick_check_performed(QuickCheckDetails *d)
bool follows_newline_interest
struct v8::internal::ActionNode::@17::@23 u_clear_captures
void InvalidateCurrentCharacter()
bool IsEverything(uc16 max)
DeferredAction(ActionNode::ActionType action_type, int reg)
static const Entry NoValue()
static void AddClassEscape(uc16 type, ZoneList< CharacterRange > *ranges, Zone *zone)
virtual void FillInBMInfo(int offset, int budget, BoyerMooreLookahead *bm, bool not_at_start)
virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start)=0
static CharacterRange Singleton(uc16 value)
static AssertionNode * AtEnd(RegExpNode *on_success)
virtual void GetQuickCheckDetails(QuickCheckDetails *details, RegExpCompiler *compiler, int filled_in, bool not_at_start)
QuickCheckDetails(int characters)
void AddFromPreceding(NodeInfo *that)
void set_stop_node(RegExpNode *node)
static CompilationResult Compile(RegExpCompileData *input, bool ignore_case, bool global, bool multiline, Handle< String > pattern, Handle< String > sample_subject, bool is_ascii, Zone *zone)
static void SetCapture(FixedArray *array, int index, int to)
static AssertionNode * AtBoundary(RegExpNode *on_success)
bool mentions_reg(int reg)
void set_node(RegExpNode *node)