summaryrefslogtreecommitdiff
path: root/deps/v8/src/regexp-macro-assembler.h
diff options
context:
space:
mode:
authorRyan <ry@tinyclouds.org>2009-09-02 11:13:46 +0200
committerRyan <ry@tinyclouds.org>2009-09-02 11:13:46 +0200
commit97ce138621b375f24db98280972a56e063be0b1d (patch)
tree3bc3aa651233955ade15b1f5a00678e042be1076 /deps/v8/src/regexp-macro-assembler.h
parent78bb53b009e04c94f142aa3241b06c640395b170 (diff)
downloadnode-new-97ce138621b375f24db98280972a56e063be0b1d.tar.gz
Upgrade V8 to 1.3.9
Diffstat (limited to 'deps/v8/src/regexp-macro-assembler.h')
-rw-r--r--deps/v8/src/regexp-macro-assembler.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/deps/v8/src/regexp-macro-assembler.h b/deps/v8/src/regexp-macro-assembler.h
index e59082768a..26aab2c72e 100644
--- a/deps/v8/src/regexp-macro-assembler.h
+++ b/deps/v8/src/regexp-macro-assembler.h
@@ -61,6 +61,7 @@ class RegExpMacroAssembler {
// kCheckStackLimit flag to push operations (instead of kNoStackLimitCheck)
// at least once for every stack_limit() pushes that are executed.
virtual int stack_limit_slack() = 0;
+ virtual bool CanReadUnaligned();
virtual void AdvanceCurrentPosition(int by) = 0; // Signed cp change.
virtual void AdvanceRegister(int reg, int by) = 0; // r[reg] += by.
// Continues execution from the position pushed on the top of the backtrack
@@ -182,6 +183,7 @@ class NativeRegExpMacroAssembler: public RegExpMacroAssembler {
NativeRegExpMacroAssembler();
virtual ~NativeRegExpMacroAssembler();
+ virtual bool CanReadUnaligned();
static Result Match(Handle<Code> regexp,
Handle<String> subject,
@@ -195,6 +197,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 +214,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_