Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: src/ia32/regexp-macro-assembler-ia32.cc

Issue 339883002: Interrupts must not mask stack overflow. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_IA32 7 #if V8_TARGET_ARCH_IA32
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
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 RegExpMacroAssemblerIA32::CheckStackGuardState(Address* return_address, 1075 int RegExpMacroAssemblerIA32::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
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_IA32 1309 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698