OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/regexp/regexp-macro-assembler.h" | 5 #include "src/regexp/regexp-macro-assembler.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/isolate-inl.h" | 8 #include "src/isolate-inl.h" |
9 #include "src/regexp/regexp-stack.h" | 9 #include "src/regexp/regexp-stack.h" |
10 #include "src/simulator.h" | 10 #include "src/simulator.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 isolate->StackOverflow(); | 170 isolate->StackOverflow(); |
171 return_value = EXCEPTION; | 171 return_value = EXCEPTION; |
172 } else if (is_direct_call) { | 172 } else if (is_direct_call) { |
173 // If not real stack overflow the stack guard was used to interrupt | 173 // If not real stack overflow the stack guard was used to interrupt |
174 // execution for another purpose. If this is a direct call from JavaScript | 174 // execution for another purpose. If this is a direct call from JavaScript |
175 // retry the RegExp forcing the call through the runtime system. | 175 // retry the RegExp forcing the call through the runtime system. |
176 // Currently the direct call cannot handle a GC. | 176 // Currently the direct call cannot handle a GC. |
177 return_value = RETRY; | 177 return_value = RETRY; |
178 } else { | 178 } else { |
179 Object* result = isolate->stack_guard()->HandleInterrupts(); | 179 Object* result = isolate->stack_guard()->HandleInterrupts(); |
180 if (result->IsException()) return_value = EXCEPTION; | 180 if (result->IsException(isolate)) return_value = EXCEPTION; |
181 } | 181 } |
182 | 182 |
183 DisallowHeapAllocation no_gc; | 183 DisallowHeapAllocation no_gc; |
184 | 184 |
185 if (*code_handle != re_code) { // Return address no longer valid | 185 if (*code_handle != re_code) { // Return address no longer valid |
186 intptr_t delta = code_handle->address() - re_code->address(); | 186 intptr_t delta = code_handle->address() - re_code->address(); |
187 // Overwrite the return address on the stack. | 187 // Overwrite the return address on the stack. |
188 *return_address += delta; | 188 *return_address += delta; |
189 } | 189 } |
190 | 190 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 } | 347 } |
348 *stack_base = new_stack_base; | 348 *stack_base = new_stack_base; |
349 intptr_t stack_content_size = old_stack_base - stack_pointer; | 349 intptr_t stack_content_size = old_stack_base - stack_pointer; |
350 return new_stack_base - stack_content_size; | 350 return new_stack_base - stack_content_size; |
351 } | 351 } |
352 | 352 |
353 #endif // V8_INTERPRETED_REGEXP | 353 #endif // V8_INTERPRETED_REGEXP |
354 | 354 |
355 } // namespace internal | 355 } // namespace internal |
356 } // namespace v8 | 356 } // namespace v8 |
OLD | NEW |