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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 template <typename T> | 1069 template <typename T> |
1070 static T& frame_entry(Address re_frame, int frame_offset) { | 1070 static T& frame_entry(Address re_frame, int frame_offset) { |
1071 return reinterpret_cast<T&>(Memory::int32_at(re_frame + frame_offset)); | 1071 return reinterpret_cast<T&>(Memory::int32_at(re_frame + frame_offset)); |
1072 } | 1072 } |
1073 | 1073 |
1074 | 1074 |
1075 int RegExpMacroAssemblerX87::CheckStackGuardState(Address* return_address, | 1075 int RegExpMacroAssemblerX87::CheckStackGuardState(Address* return_address, |
1076 Code* re_code, | 1076 Code* re_code, |
1077 Address re_frame) { | 1077 Address re_frame) { |
1078 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate); | 1078 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate); |
1079 if (isolate->stack_guard()->IsStackOverflow()) { | 1079 StackLimitCheck check(isolate); |
| 1080 if (check.JsHasOverflowed()) { |
1080 isolate->StackOverflow(); | 1081 isolate->StackOverflow(); |
1081 return EXCEPTION; | 1082 return EXCEPTION; |
1082 } | 1083 } |
1083 | 1084 |
1084 // If not real stack overflow the stack guard was used to interrupt | 1085 // If not real stack overflow the stack guard was used to interrupt |
1085 // execution for another purpose. | 1086 // execution for another purpose. |
1086 | 1087 |
1087 // If this is a direct call from JavaScript retry the RegExp forcing the call | 1088 // If this is a direct call from JavaScript retry the RegExp forcing the call |
1088 // through the runtime system. Currently the direct call cannot handle a GC. | 1089 // through the runtime system. Currently the direct call cannot handle a GC. |
1089 if (frame_entry<int>(re_frame, kDirectCall) == 1) { | 1090 if (frame_entry<int>(re_frame, kDirectCall) == 1) { |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 } | 1300 } |
1300 | 1301 |
1301 | 1302 |
1302 #undef __ | 1303 #undef __ |
1303 | 1304 |
1304 #endif // V8_INTERPRETED_REGEXP | 1305 #endif // V8_INTERPRETED_REGEXP |
1305 | 1306 |
1306 }} // namespace v8::internal | 1307 }} // namespace v8::internal |
1307 | 1308 |
1308 #endif // V8_TARGET_ARCH_X87 | 1309 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |