| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 8 | 8 |
| 9 #include "src/unicode.h" | 9 #include "src/unicode.h" |
| 10 #include "src/log.h" | 10 #include "src/log.h" |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 template <typename T> | 1097 template <typename T> |
| 1098 static T& frame_entry(Address re_frame, int frame_offset) { | 1098 static T& frame_entry(Address re_frame, int frame_offset) { |
| 1099 return reinterpret_cast<T&>(Memory::int32_at(re_frame + frame_offset)); | 1099 return reinterpret_cast<T&>(Memory::int32_at(re_frame + frame_offset)); |
| 1100 } | 1100 } |
| 1101 | 1101 |
| 1102 | 1102 |
| 1103 int RegExpMacroAssemblerMIPS::CheckStackGuardState(Address* return_address, | 1103 int RegExpMacroAssemblerMIPS::CheckStackGuardState(Address* return_address, |
| 1104 Code* re_code, | 1104 Code* re_code, |
| 1105 Address re_frame) { | 1105 Address re_frame) { |
| 1106 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate); | 1106 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate); |
| 1107 if (isolate->stack_guard()->IsStackOverflow()) { | 1107 StackLimitCheck check(isolate); |
| 1108 if (check.JsHasOverflowed()) { |
| 1108 isolate->StackOverflow(); | 1109 isolate->StackOverflow(); |
| 1109 return EXCEPTION; | 1110 return EXCEPTION; |
| 1110 } | 1111 } |
| 1111 | 1112 |
| 1112 // If not real stack overflow the stack guard was used to interrupt | 1113 // If not real stack overflow the stack guard was used to interrupt |
| 1113 // execution for another purpose. | 1114 // execution for another purpose. |
| 1114 | 1115 |
| 1115 // If this is a direct call from JavaScript retry the RegExp forcing the call | 1116 // If this is a direct call from JavaScript retry the RegExp forcing the call |
| 1116 // through the runtime system. Currently the direct call cannot handle a GC. | 1117 // through the runtime system. Currently the direct call cannot handle a GC. |
| 1117 if (frame_entry<int>(re_frame, kDirectCall) == 1) { | 1118 if (frame_entry<int>(re_frame, kDirectCall) == 1) { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 } | 1316 } |
| 1316 | 1317 |
| 1317 | 1318 |
| 1318 #undef __ | 1319 #undef __ |
| 1319 | 1320 |
| 1320 #endif // V8_INTERPRETED_REGEXP | 1321 #endif // V8_INTERPRETED_REGEXP |
| 1321 | 1322 |
| 1322 }} // namespace v8::internal | 1323 }} // namespace v8::internal |
| 1323 | 1324 |
| 1324 #endif // V8_TARGET_ARCH_MIPS | 1325 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |