diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-06-29 17:26:51 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-06-29 17:26:51 +0200 |
commit | 33af2720f26c2b25bc7f75ce7eb454ff99db6d35 (patch) | |
tree | 9a38f0c96420edf503eebd6325dd8d2d8249f653 /deps/v8/src/regexp-macro-assembler.h | |
parent | 6afdca885adeeeed9eef8cbb01c3d97af0bc084d (diff) | |
download | node-new-33af2720f26c2b25bc7f75ce7eb454ff99db6d35.tar.gz |
Upgrade V8 to 3.4.8
Diffstat (limited to 'deps/v8/src/regexp-macro-assembler.h')
-rw-r--r-- | deps/v8/src/regexp-macro-assembler.h | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/deps/v8/src/regexp-macro-assembler.h b/deps/v8/src/regexp-macro-assembler.h index ef85d27e52..0314c707c6 100644 --- a/deps/v8/src/regexp-macro-assembler.h +++ b/deps/v8/src/regexp-macro-assembler.h @@ -48,6 +48,7 @@ class RegExpMacroAssembler { enum IrregexpImplementation { kIA32Implementation, kARMImplementation, + kMIPSImplementation, kX64Implementation, kBytecodeImplementation }; @@ -129,7 +130,7 @@ class RegExpMacroAssembler { return false; } virtual void Fail() = 0; - virtual Handle<Object> GetCode(Handle<String> source) = 0; + virtual Handle<HeapObject> GetCode(Handle<String> source) = 0; virtual void GoTo(Label* label) = 0; // Check whether a register is >= a given constant and go to a label if it // is. Backtracks instead if the label is NULL. @@ -161,6 +162,13 @@ class RegExpMacroAssembler { virtual void WriteCurrentPositionToRegister(int reg, int cp_offset) = 0; virtual void ClearRegisters(int reg_from, int reg_to) = 0; virtual void WriteStackPointerToRegister(int reg) = 0; + + // Controls the generation of large inlined constants in the code. + void set_slow_safe(bool ssc) { slow_safe_compiler_ = ssc; } + bool slow_safe() { return slow_safe_compiler_; } + + private: + bool slow_safe_compiler_; }; @@ -190,30 +198,33 @@ class NativeRegExpMacroAssembler: public RegExpMacroAssembler { Handle<String> subject, int* offsets_vector, int offsets_vector_length, - int previous_index); + int previous_index, + Isolate* isolate); // Compares two-byte strings case insensitively. // Called from generated RegExp code. static int CaseInsensitiveCompareUC16(Address byte_offset1, Address byte_offset2, - size_t byte_length); + size_t byte_length, + Isolate* isolate); // 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 Address GrowStack(Address stack_pointer, Address* stack_top, + Isolate* isolate); static const byte* StringCharacterPosition(String* subject, int start_index); // Byte map of ASCII characters with a 0xff if the character is a word // character (digit, letter or underscore) and 0x00 otherwise. // Used by generated RegExp code. - static byte word_character_map[128]; + static const byte word_character_map[128]; static Address word_character_map_address() { - return &word_character_map[0]; + return const_cast<Address>(&word_character_map[0]); } static Result Execute(Code* code, @@ -221,7 +232,8 @@ class NativeRegExpMacroAssembler: public RegExpMacroAssembler { int start_offset, const byte* input_start, const byte* input_end, - int* output); + int* output, + Isolate* isolate); }; #endif // V8_INTERPRETED_REGEXP |