| mstarzinger@chromium.org | 15613d0 | 2012-05-23 12:04:37 +0000 | [diff] [blame^] | 1 | // Copyright 2012 the V8 project authors. All rights reserved. |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 2 | // Redistribution and use in source and binary forms, with or without |
| 3 | // modification, are permitted provided that the following conditions are |
| 4 | // met: |
| 5 | // |
| 6 | // * Redistributions of source code must retain the above copyright |
| 7 | // notice, this list of conditions and the following disclaimer. |
| 8 | // * Redistributions in binary form must reproduce the above |
| 9 | // copyright notice, this list of conditions and the following |
| 10 | // disclaimer in the documentation and/or other materials provided |
| 11 | // with the distribution. |
| 12 | // * Neither the name of Google Inc. nor the names of its |
| 13 | // contributors may be used to endorse or promote products derived |
| 14 | // from this software without specific prior written permission. |
| 15 | // |
| 16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 17 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 18 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 20 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 21 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 28 | #include "v8.h" |
| 29 | #include "ast.h" |
| 30 | #include "assembler.h" |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 31 | #include "regexp-stack.h" |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 32 | #include "regexp-macro-assembler.h" |
| ager@chromium.org | c4c9272 | 2009-11-18 14:12:51 +0000 | [diff] [blame] | 33 | #include "simulator.h" |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 34 | |
| kasperl@chromium.org | 71affb5 | 2009-05-26 05:44:31 +0000 | [diff] [blame] | 35 | namespace v8 { |
| 36 | namespace internal { |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 37 | |
| mstarzinger@chromium.org | 15613d0 | 2012-05-23 12:04:37 +0000 | [diff] [blame^] | 38 | RegExpMacroAssembler::RegExpMacroAssembler() |
| 39 | : slow_safe_compiler_(false), |
| 40 | global_(false) { |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | |
| 44 | RegExpMacroAssembler::~RegExpMacroAssembler() { |
| 45 | } |
| 46 | |
| 47 | |
| ager@chromium.org | 18ad94b | 2009-09-02 08:22:29 +0000 | [diff] [blame] | 48 | bool RegExpMacroAssembler::CanReadUnaligned() { |
| 49 | #ifdef V8_HOST_CAN_READ_UNALIGNED |
| 50 | return true; |
| 51 | #else |
| 52 | return false; |
| 53 | #endif |
| 54 | } |
| 55 | |
| 56 | |
| ricow@chromium.org | c9c8082 | 2010-04-21 08:22:37 +0000 | [diff] [blame] | 57 | #ifndef V8_INTERPRETED_REGEXP // Avoid unused code, e.g., on ARM. |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 58 | |
| karlklose@chromium.org | 83a4728 | 2011-05-11 11:54:09 +0000 | [diff] [blame] | 59 | NativeRegExpMacroAssembler::NativeRegExpMacroAssembler() |
| 60 | : RegExpMacroAssembler() { |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 61 | } |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 62 | |
| 63 | |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 64 | NativeRegExpMacroAssembler::~NativeRegExpMacroAssembler() { |
| 65 | } |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 66 | |
| ager@chromium.org | 18ad94b | 2009-09-02 08:22:29 +0000 | [diff] [blame] | 67 | |
| 68 | bool NativeRegExpMacroAssembler::CanReadUnaligned() { |
| 69 | #ifdef V8_TARGET_CAN_READ_UNALIGNED |
| karlklose@chromium.org | 83a4728 | 2011-05-11 11:54:09 +0000 | [diff] [blame] | 70 | return !slow_safe(); |
| ager@chromium.org | 18ad94b | 2009-09-02 08:22:29 +0000 | [diff] [blame] | 71 | #else |
| 72 | return false; |
| 73 | #endif |
| 74 | } |
| 75 | |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 76 | const byte* NativeRegExpMacroAssembler::StringCharacterPosition( |
| 77 | String* subject, |
| 78 | int start_index) { |
| 79 | // Not just flat, but ultra flat. |
| 80 | ASSERT(subject->IsExternalString() || subject->IsSeqString()); |
| 81 | ASSERT(start_index >= 0); |
| 82 | ASSERT(start_index <= subject->length()); |
| 83 | if (subject->IsAsciiRepresentation()) { |
| 84 | const byte* address; |
| 85 | if (StringShape(subject).IsExternal()) { |
| erikcorry | 0ad885c | 2011-11-21 13:51:57 +0000 | [diff] [blame] | 86 | const char* data = ExternalAsciiString::cast(subject)->GetChars(); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 87 | address = reinterpret_cast<const byte*>(data); |
| 88 | } else { |
| 89 | ASSERT(subject->IsSeqAsciiString()); |
| 90 | char* data = SeqAsciiString::cast(subject)->GetChars(); |
| 91 | address = reinterpret_cast<const byte*>(data); |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 92 | } |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 93 | return address + start_index; |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 94 | } |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 95 | const uc16* data; |
| 96 | if (StringShape(subject).IsExternal()) { |
| erikcorry | 0ad885c | 2011-11-21 13:51:57 +0000 | [diff] [blame] | 97 | data = ExternalTwoByteString::cast(subject)->GetChars(); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 98 | } else { |
| 99 | ASSERT(subject->IsSeqTwoByteString()); |
| 100 | data = SeqTwoByteString::cast(subject)->GetChars(); |
| 101 | } |
| 102 | return reinterpret_cast<const byte*>(data + start_index); |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 103 | } |
| 104 | |
| ager@chromium.org | 3291210 | 2009-01-16 10:38:43 +0000 | [diff] [blame] | 105 | |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 106 | NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Match( |
| 107 | Handle<Code> regexp_code, |
| 108 | Handle<String> subject, |
| 109 | int* offsets_vector, |
| 110 | int offsets_vector_length, |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 111 | int previous_index, |
| 112 | Isolate* isolate) { |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 113 | |
| 114 | ASSERT(subject->IsFlat()); |
| 115 | ASSERT(previous_index >= 0); |
| 116 | ASSERT(previous_index <= subject->length()); |
| 117 | |
| 118 | // No allocations before calling the regexp, but we can't use |
| 119 | // AssertNoAllocation, since regexps might be preempted, and another thread |
| 120 | // might do allocation anyway. |
| 121 | |
| 122 | String* subject_ptr = *subject; |
| 123 | // Character offsets into string. |
| 124 | int start_offset = previous_index; |
| ricow@chromium.org | 4668a2c | 2011-08-29 10:41:00 +0000 | [diff] [blame] | 125 | int char_length = subject_ptr->length() - start_offset; |
| 126 | int slice_offset = 0; |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 127 | |
| ricow@chromium.org | 4668a2c | 2011-08-29 10:41:00 +0000 | [diff] [blame] | 128 | // The string has been flattened, so if it is a cons string it contains the |
| sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame] | 129 | // full string in the first part. |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 130 | if (StringShape(subject_ptr).IsCons()) { |
| sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame] | 131 | ASSERT_EQ(0, ConsString::cast(subject_ptr)->second()->length()); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 132 | subject_ptr = ConsString::cast(subject_ptr)->first(); |
| ricow@chromium.org | 4668a2c | 2011-08-29 10:41:00 +0000 | [diff] [blame] | 133 | } else if (StringShape(subject_ptr).IsSliced()) { |
| 134 | SlicedString* slice = SlicedString::cast(subject_ptr); |
| 135 | subject_ptr = slice->parent(); |
| 136 | slice_offset = slice->offset(); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 137 | } |
| ulan@chromium.org | 2efb900 | 2012-01-19 15:36:35 +0000 | [diff] [blame] | 138 | // Ensure that an underlying string has the same ASCII-ness. |
| lrn@chromium.org | 32d961d | 2010-06-30 09:09:34 +0000 | [diff] [blame] | 139 | bool is_ascii = subject_ptr->IsAsciiRepresentation(); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 140 | ASSERT(subject_ptr->IsExternalString() || subject_ptr->IsSeqString()); |
| 141 | // String is now either Sequential or External |
| 142 | int char_size_shift = is_ascii ? 0 : 1; |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 143 | |
| 144 | const byte* input_start = |
| ricow@chromium.org | 4668a2c | 2011-08-29 10:41:00 +0000 | [diff] [blame] | 145 | StringCharacterPosition(subject_ptr, start_offset + slice_offset); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 146 | int byte_length = char_length << char_size_shift; |
| 147 | const byte* input_end = input_start + byte_length; |
| 148 | Result res = Execute(*regexp_code, |
| ricow@chromium.org | 4668a2c | 2011-08-29 10:41:00 +0000 | [diff] [blame] | 149 | *subject, |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 150 | start_offset, |
| 151 | input_start, |
| 152 | input_end, |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 153 | offsets_vector, |
| mstarzinger@chromium.org | 15613d0 | 2012-05-23 12:04:37 +0000 | [diff] [blame^] | 154 | offsets_vector_length, |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 155 | isolate); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 156 | return res; |
| ager@chromium.org | a74f0da | 2008-12-03 16:05:52 +0000 | [diff] [blame] | 157 | } |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 158 | |
| 159 | |
| 160 | NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Execute( |
| 161 | Code* code, |
| ricow@chromium.org | 4668a2c | 2011-08-29 10:41:00 +0000 | [diff] [blame] | 162 | String* input, // This needs to be the unpacked (sliced, cons) string. |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 163 | int start_offset, |
| 164 | const byte* input_start, |
| 165 | const byte* input_end, |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 166 | int* output, |
| mstarzinger@chromium.org | 15613d0 | 2012-05-23 12:04:37 +0000 | [diff] [blame^] | 167 | int output_size, |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 168 | Isolate* isolate) { |
| 169 | ASSERT(isolate == Isolate::Current()); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 170 | // Ensure that the minimum stack has been allocated. |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 171 | RegExpStackScope stack_scope(isolate); |
| 172 | Address stack_base = stack_scope.stack()->stack_base(); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 173 | |
| fschneider@chromium.org | 0c20e67 | 2010-01-14 15:28:53 +0000 | [diff] [blame] | 174 | int direct_call = 0; |
| kmillikin@chromium.org | 49edbdf | 2011-02-16 12:32:18 +0000 | [diff] [blame] | 175 | int result = CALL_GENERATED_REGEXP_CODE(code->entry(), |
| ager@chromium.org | 18ad94b | 2009-09-02 08:22:29 +0000 | [diff] [blame] | 176 | input, |
| 177 | start_offset, |
| 178 | input_start, |
| 179 | input_end, |
| 180 | output, |
| mstarzinger@chromium.org | 15613d0 | 2012-05-23 12:04:37 +0000 | [diff] [blame^] | 181 | output_size, |
| fschneider@chromium.org | 0c20e67 | 2010-01-14 15:28:53 +0000 | [diff] [blame] | 182 | stack_base, |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 183 | direct_call, |
| 184 | isolate); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 185 | ASSERT(result >= RETRY); |
| 186 | |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 187 | if (result == EXCEPTION && !isolate->has_pending_exception()) { |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 188 | // We detected a stack overflow (on the backtrack stack) in RegExp code, |
| 189 | // but haven't created the exception yet. |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 190 | isolate->StackOverflow(); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 191 | } |
| 192 | return static_cast<Result>(result); |
| 193 | } |
| 194 | |
| 195 | |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 196 | const byte NativeRegExpMacroAssembler::word_character_map[] = { |
| sgjesse@chromium.org | b302e56 | 2010-02-03 11:26:59 +0000 | [diff] [blame] | 197 | 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 198 | 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 199 | 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 200 | 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 201 | |
| 202 | 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 203 | 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, |
| 204 | 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // '0' - '7' |
| 205 | 0xffu, 0xffu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, // '8' - '9' |
| 206 | |
| 207 | 0x00u, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'A' - 'G' |
| 208 | 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'H' - 'O' |
| 209 | 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'P' - 'W' |
| 210 | 0xffu, 0xffu, 0xffu, 0x00u, 0x00u, 0x00u, 0x00u, 0xffu, // 'X' - 'Z', '_' |
| 211 | |
| 212 | 0x00u, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'a' - 'g' |
| 213 | 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'h' - 'o' |
| 214 | 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, 0xffu, // 'p' - 'w' |
| 215 | 0xffu, 0xffu, 0xffu, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, // 'x' - 'z' |
| 216 | }; |
| 217 | |
| 218 | |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 219 | int NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16( |
| 220 | Address byte_offset1, |
| 221 | Address byte_offset2, |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 222 | size_t byte_length, |
| 223 | Isolate* isolate) { |
| 224 | ASSERT(isolate == Isolate::Current()); |
| 225 | unibrow::Mapping<unibrow::Ecma262Canonicalize>* canonicalize = |
| 226 | isolate->regexp_macro_assembler_canonicalize(); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 227 | // This function is not allowed to cause a garbage collection. |
| 228 | // A GC might move the calling generated code and invalidate the |
| 229 | // return address on the stack. |
| 230 | ASSERT(byte_length % 2 == 0); |
| 231 | uc16* substring1 = reinterpret_cast<uc16*>(byte_offset1); |
| 232 | uc16* substring2 = reinterpret_cast<uc16*>(byte_offset2); |
| 233 | size_t length = byte_length >> 1; |
| 234 | |
| 235 | for (size_t i = 0; i < length; i++) { |
| 236 | unibrow::uchar c1 = substring1[i]; |
| 237 | unibrow::uchar c2 = substring2[i]; |
| 238 | if (c1 != c2) { |
| 239 | unibrow::uchar s1[1] = { c1 }; |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 240 | canonicalize->get(c1, '\0', s1); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 241 | if (s1[0] != c2) { |
| 242 | unibrow::uchar s2[1] = { c2 }; |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 243 | canonicalize->get(c2, '\0', s2); |
| sgjesse@chromium.org | 911335c | 2009-08-19 12:59:44 +0000 | [diff] [blame] | 244 | if (s1[0] != s2[0]) { |
| 245 | return 0; |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | } |
| 250 | return 1; |
| 251 | } |
| 252 | |
| ager@chromium.org | 18ad94b | 2009-09-02 08:22:29 +0000 | [diff] [blame] | 253 | |
| 254 | Address NativeRegExpMacroAssembler::GrowStack(Address stack_pointer, |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 255 | Address* stack_base, |
| 256 | Isolate* isolate) { |
| 257 | ASSERT(isolate == Isolate::Current()); |
| 258 | RegExpStack* regexp_stack = isolate->regexp_stack(); |
| 259 | size_t size = regexp_stack->stack_capacity(); |
| 260 | Address old_stack_base = regexp_stack->stack_base(); |
| ager@chromium.org | 18ad94b | 2009-09-02 08:22:29 +0000 | [diff] [blame] | 261 | ASSERT(old_stack_base == *stack_base); |
| 262 | ASSERT(stack_pointer <= old_stack_base); |
| 263 | ASSERT(static_cast<size_t>(old_stack_base - stack_pointer) <= size); |
| sgjesse@chromium.org | ea88ce9 | 2011-03-23 11:19:56 +0000 | [diff] [blame] | 264 | Address new_stack_base = regexp_stack->EnsureCapacity(size * 2); |
| ager@chromium.org | 18ad94b | 2009-09-02 08:22:29 +0000 | [diff] [blame] | 265 | if (new_stack_base == NULL) { |
| 266 | return NULL; |
| 267 | } |
| 268 | *stack_base = new_stack_base; |
| 269 | intptr_t stack_content_size = old_stack_base - stack_pointer; |
| 270 | return new_stack_base - stack_content_size; |
| 271 | } |
| 272 | |
| ricow@chromium.org | c9c8082 | 2010-04-21 08:22:37 +0000 | [diff] [blame] | 273 | #endif // V8_INTERPRETED_REGEXP |
| 274 | |
| ager@chromium.org | 3291210 | 2009-01-16 10:38:43 +0000 | [diff] [blame] | 275 | } } // namespace v8::internal |