Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1166)

Unified Diff: src/regexp-macro-assembler.h

Issue 17416: * Move irregexp backtrack stack to external memory area, instead of the system stack. (Closed)
Patch Set: Added explicit stack check requests to push operations. Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/regexp-macro-assembler.h
diff --git a/src/regexp-macro-assembler.h b/src/regexp-macro-assembler.h
index 878a29715b235f7bc5f1c51b0ef07030f8b2f99f..08c295f6ac29e1ba911197cb4b26e63b59234a6c 100644
--- a/src/regexp-macro-assembler.h
+++ b/src/regexp-macro-assembler.h
@@ -30,7 +30,6 @@
namespace v8 { namespace internal {
-
struct DisjunctDecisionRow {
RegExpCharacterClass cc;
Label* on_match;
@@ -42,10 +41,21 @@ class RegExpMacroAssembler {
enum IrregexpImplementation {
kIA32Implementation,
kARMImplementation,
- kBytecodeImplementation};
+ kBytecodeImplementation
+ };
+
+ enum StackCheckFlag {
+ kNoStackLimitCheck = false,
+ kCheckStackLimit = true
+ };
RegExpMacroAssembler();
virtual ~RegExpMacroAssembler();
+ // The maximal number of pushes between stack checks. Users must supply
+ // kCheckStackLimit flag to push operations (instead of kNoStackLimitCheck)
+ // at least once for every stack_limit() pushes that are executed. More
+ // often is allowed (and encouraged)
Erik Corry 2009/01/12 11:50:13 Missing full stop, and I see no need to encourage
Lasse Reichstein 2009/01/12 13:03:59 Done.
+ virtual int stack_limit() = 0;
virtual void AdvanceCurrentPosition(int by) = 0; // Signed cp change.
virtual void AdvanceRegister(int reg, int by) = 0; // r[reg] += by.
virtual void Backtrack() = 0;
@@ -145,9 +155,11 @@ class RegExpMacroAssembler {
int characters = 1) = 0;
virtual void PopCurrentPosition() = 0;
virtual void PopRegister(int register_index) = 0;
- virtual void PushBacktrack(Label* label) = 0;
- virtual void PushCurrentPosition() = 0;
- virtual void PushRegister(int register_index) = 0;
+ virtual void PushBacktrack(Label* label,
+ StackCheckFlag check_stack_limit) = 0;
+ virtual void PushCurrentPosition(StackCheckFlag check_stack_limit) = 0;
+ virtual void PushRegister(int register_index,
+ StackCheckFlag check_stack_limit) = 0;
virtual void ReadCurrentPositionFromRegister(int reg) = 0;
virtual void ReadStackPointerFromRegister(int reg) = 0;
virtual void SetRegister(int register_index, int to) = 0;

Powered by Google App Engine
This is Rietveld 408576698