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

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

Issue 338017: Remove --check-stack flag from V8. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 1 month 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/codegen-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 __ cmpq(rsp, rax); 1202 __ cmpq(rsp, rax);
1203 __ j(above, &no_preempt); 1203 __ j(above, &no_preempt);
1204 1204
1205 SafeCall(&check_preempt_label_); 1205 SafeCall(&check_preempt_label_);
1206 1206
1207 __ bind(&no_preempt); 1207 __ bind(&no_preempt);
1208 } 1208 }
1209 1209
1210 1210
1211 void RegExpMacroAssemblerX64::CheckStackLimit() { 1211 void RegExpMacroAssemblerX64::CheckStackLimit() {
1212 if (FLAG_check_stack) { 1212 Label no_stack_overflow;
1213 Label no_stack_overflow; 1213 ExternalReference stack_limit =
1214 ExternalReference stack_limit = 1214 ExternalReference::address_of_regexp_stack_limit();
1215 ExternalReference::address_of_regexp_stack_limit(); 1215 __ load_rax(stack_limit);
1216 __ load_rax(stack_limit); 1216 __ cmpq(backtrack_stackpointer(), rax);
1217 __ cmpq(backtrack_stackpointer(), rax); 1217 __ j(above, &no_stack_overflow);
1218 __ j(above, &no_stack_overflow);
1219 1218
1220 SafeCall(&stack_overflow_label_); 1219 SafeCall(&stack_overflow_label_);
1221 1220
1222 __ bind(&no_stack_overflow); 1221 __ bind(&no_stack_overflow);
1223 }
1224 } 1222 }
1225 1223
1226 1224
1227 void RegExpMacroAssemblerX64::FrameAlign(int num_arguments) { 1225 void RegExpMacroAssemblerX64::FrameAlign(int num_arguments) {
1228 // TODO(lrn): Since we no longer use the system stack arbitrarily (but we do 1226 // TODO(lrn): Since we no longer use the system stack arbitrarily (but we do
1229 // use it, e.g., for SafeCall), we know the number of elements on the stack 1227 // use it, e.g., for SafeCall), we know the number of elements on the stack
1230 // since the last frame alignment. We might be able to do this simpler then. 1228 // since the last frame alignment. We might be able to do this simpler then.
1231 int frameAlignment = OS::ActivationFrameAlignment(); 1229 int frameAlignment = OS::ActivationFrameAlignment();
1232 ASSERT(frameAlignment != 0); 1230 ASSERT(frameAlignment != 0);
1233 // Make stack end at alignment and make room for num_arguments pointers 1231 // Make stack end at alignment and make room for num_arguments pointers
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 Operand(rsi, rdi, times_1, cp_offset * sizeof(uc16))); 1283 Operand(rsi, rdi, times_1, cp_offset * sizeof(uc16)));
1286 } 1284 }
1287 } 1285 }
1288 } 1286 }
1289 1287
1290 #undef __ 1288 #undef __
1291 1289
1292 #endif // V8_NATIVE_REGEXP 1290 #endif // V8_NATIVE_REGEXP
1293 1291
1294 }} // namespace v8::internal 1292 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698