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

Side by Side Diff: src/x64/regexp-macro-assembler-x64.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/x64/full-codegen-x64.cc ('k') | test/mjsunit/regress/regress-crbug-385002.js » ('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_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
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
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
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/regress/regress-crbug-385002.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698