| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
| 10 #include "src/serialize.h" | 10 #include "src/serialize.h" |
| (...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 template <typename T> | 1176 template <typename T> |
| 1177 static T& frame_entry(Address re_frame, int frame_offset) { | 1177 static T& frame_entry(Address re_frame, int frame_offset) { |
| 1178 return reinterpret_cast<T&>(Memory::int32_at(re_frame + frame_offset)); | 1178 return reinterpret_cast<T&>(Memory::int32_at(re_frame + frame_offset)); |
| 1179 } | 1179 } |
| 1180 | 1180 |
| 1181 | 1181 |
| 1182 int RegExpMacroAssemblerX64::CheckStackGuardState(Address* return_address, | 1182 int RegExpMacroAssemblerX64::CheckStackGuardState(Address* return_address, |
| 1183 Code* re_code, | 1183 Code* re_code, |
| 1184 Address re_frame) { | 1184 Address re_frame) { |
| 1185 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate); | 1185 Isolate* isolate = frame_entry<Isolate*>(re_frame, kIsolate); |
| 1186 if (isolate->stack_guard()->IsStackOverflow()) { | 1186 StackLimitCheck check(isolate); |
| 1187 if (check.JsHasOverflowed()) { |
| 1187 isolate->StackOverflow(); | 1188 isolate->StackOverflow(); |
| 1188 return EXCEPTION; | 1189 return EXCEPTION; |
| 1189 } | 1190 } |
| 1190 | 1191 |
| 1191 // If not real stack overflow the stack guard was used to interrupt | 1192 // If not real stack overflow the stack guard was used to interrupt |
| 1192 // execution for another purpose. | 1193 // execution for another purpose. |
| 1193 | 1194 |
| 1194 // If this is a direct call from JavaScript retry the RegExp forcing the call | 1195 // If this is a direct call from JavaScript retry the RegExp forcing the call |
| 1195 // through the runtime system. Currently the direct call cannot handle a GC. | 1196 // through the runtime system. Currently the direct call cannot handle a GC. |
| 1196 if (frame_entry<int>(re_frame, kDirectCall) == 1) { | 1197 if (frame_entry<int>(re_frame, kDirectCall) == 1) { |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1434 } | 1435 } |
| 1435 } | 1436 } |
| 1436 | 1437 |
| 1437 #undef __ | 1438 #undef __ |
| 1438 | 1439 |
| 1439 #endif // V8_INTERPRETED_REGEXP | 1440 #endif // V8_INTERPRETED_REGEXP |
| 1440 | 1441 |
| 1441 }} // namespace v8::internal | 1442 }} // namespace v8::internal |
| 1442 | 1443 |
| 1443 #endif // V8_TARGET_ARCH_X64 | 1444 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |