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_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
10 #include "src/unicode.h" | 10 #include "src/unicode.h" |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 template <typename T> | 1037 template <typename T> |
1038 static T& frame_entry(Address re_frame, int frame_offset) { | 1038 static T& frame_entry(Address re_frame, int frame_offset) { |
1039 return reinterpret_cast<T&>(Memory::int32_at(re_frame + frame_offset)); | 1039 return reinterpret_cast<T&>(Memory::int32_at(re_frame + frame_offset)); |
1040 } | 1040 } |
1041 | 1041 |
1042 | 1042 |
1043 int RegExpMacroAssemblerARM::CheckStackGuardState(Address* return_address, | 1043 int RegExpMacroAssemblerARM::CheckStackGuardState(Address* return_address, |
1044 Code* re_code, | 1044 Code* re_code, |
1045 Address re_frame) { | 1045 Address re_frame) { |
1046 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate); | 1046 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate); |
1047 if (isolate->stack_guard()->IsStackOverflow()) { | 1047 StackLimitCheck check(isolate); |
| 1048 if (check.JsHasOverflowed()) { |
1048 isolate->StackOverflow(); | 1049 isolate->StackOverflow(); |
1049 return EXCEPTION; | 1050 return EXCEPTION; |
1050 } | 1051 } |
1051 | 1052 |
1052 // If not real stack overflow the stack guard was used to interrupt | 1053 // If not real stack overflow the stack guard was used to interrupt |
1053 // execution for another purpose. | 1054 // execution for another purpose. |
1054 | 1055 |
1055 // If this is a direct call from JavaScript retry the RegExp forcing the call | 1056 // If this is a direct call from JavaScript retry the RegExp forcing the call |
1056 // through the runtime system. Currently the direct call cannot handle a GC. | 1057 // through the runtime system. Currently the direct call cannot handle a GC. |
1057 if (frame_entry<int>(re_frame, kDirectCall) == 1) { | 1058 if (frame_entry<int>(re_frame, kDirectCall) == 1) { |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 } | 1269 } |
1269 | 1270 |
1270 | 1271 |
1271 #undef __ | 1272 #undef __ |
1272 | 1273 |
1273 #endif // V8_INTERPRETED_REGEXP | 1274 #endif // V8_INTERPRETED_REGEXP |
1274 | 1275 |
1275 }} // namespace v8::internal | 1276 }} // namespace v8::internal |
1276 | 1277 |
1277 #endif // V8_TARGET_ARCH_ARM | 1278 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |