Index: src/regexp-macro-assembler.h |
diff --git a/src/regexp-macro-assembler.h b/src/regexp-macro-assembler.h |
index e59082768aa0140e02df6ec6f91a6a9b5a51234f..b6b7e5a853b3168e5de3e84685dbdbb325869cbd 100644 |
--- a/src/regexp-macro-assembler.h |
+++ b/src/regexp-macro-assembler.h |
@@ -195,6 +195,13 @@ class NativeRegExpMacroAssembler: public RegExpMacroAssembler { |
Address byte_offset2, |
size_t byte_length); |
+ // Called from RegExp if the backtrack stack limit is hit. |
+ // Tries to expand the stack. Returns the new stack-pointer if |
+ // successful, and updates the stack_top address, or returns 0 if unable |
+ // to grow the stack. |
+ // This function must not trigger a garbage collection. |
+ static Address GrowStack(Address stack_pointer, Address* stack_top); |
+ |
static const byte* StringCharacterPosition(String* subject, int start_index); |
static Result Execute(Code* code, |
@@ -205,7 +212,25 @@ class NativeRegExpMacroAssembler: public RegExpMacroAssembler { |
int* output, |
bool at_start); |
}; |
+ |
+ |
+// Enter C code from generated RegExp code in a way that allows |
+// the C code to fix the return address in case of a GC. |
+// Currently only needed on ARM. |
+class RegExpCEntryStub: public CodeStub { |
+ public: |
+ RegExpCEntryStub() {} |
+ virtual ~RegExpCEntryStub() {} |
+ void Generate(MacroAssembler* masm); |
+ |
+ private: |
+ Major MajorKey() { return RegExpCEntry; } |
+ int MinorKey() { return 0; } |
+ const char* GetName() { return "RegExpCEntryStub"; } |
+}; |
+ |
#endif // V8_NATIVE_REGEXP |
+ |
} } // namespace v8::internal |
#endif // V8_REGEXP_MACRO_ASSEMBLER_H_ |