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

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

Issue 345048: Fix issue 493: Infinite loop when debug break is set when entering function.apply (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/ia32/fast-codegen-ia32.cc ('k') | src/serialize.cc » ('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 2008-2009 the V8 project authors. All rights reserved. 1 // Copyright 2008-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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 // kBackup_ebx etc. 591 // kBackup_ebx etc.
592 __ push(esi); 592 __ push(esi);
593 __ push(edi); 593 __ push(edi);
594 __ push(ebx); // Callee-save on MacOS. 594 __ push(ebx); // Callee-save on MacOS.
595 __ push(Immediate(0)); // Make room for "input start - 1" constant. 595 __ push(Immediate(0)); // Make room for "input start - 1" constant.
596 596
597 // Check if we have space on the stack for registers. 597 // Check if we have space on the stack for registers.
598 Label stack_limit_hit; 598 Label stack_limit_hit;
599 Label stack_ok; 599 Label stack_ok;
600 600
601 ExternalReference stack_guard_limit = 601 ExternalReference stack_limit =
602 ExternalReference::address_of_stack_guard_limit(); 602 ExternalReference::address_of_stack_limit();
603 __ mov(ecx, esp); 603 __ mov(ecx, esp);
604 __ sub(ecx, Operand::StaticVariable(stack_guard_limit)); 604 __ sub(ecx, Operand::StaticVariable(stack_limit));
605 // Handle it if the stack pointer is already below the stack limit. 605 // Handle it if the stack pointer is already below the stack limit.
606 __ j(below_equal, &stack_limit_hit, not_taken); 606 __ j(below_equal, &stack_limit_hit, not_taken);
607 // Check if there is room for the variable number of registers above 607 // Check if there is room for the variable number of registers above
608 // the stack limit. 608 // the stack limit.
609 __ cmp(ecx, num_registers_ * kPointerSize); 609 __ cmp(ecx, num_registers_ * kPointerSize);
610 __ j(above_equal, &stack_ok, taken); 610 __ j(above_equal, &stack_ok, taken);
611 // Exit with OutOfMemory exception. There is not enough space on the stack 611 // Exit with OutOfMemory exception. There is not enough space on the stack
612 // for our working registers. 612 // for our working registers.
613 __ mov(eax, EXCEPTION); 613 __ mov(eax, EXCEPTION);
614 __ jmp(&exit_label_); 614 __ jmp(&exit_label_);
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 ASSERT(!target.is(backtrack_stackpointer())); 1074 ASSERT(!target.is(backtrack_stackpointer()));
1075 __ mov(target, Operand(backtrack_stackpointer(), 0)); 1075 __ mov(target, Operand(backtrack_stackpointer(), 0));
1076 // Notice: This updates flags, unlike normal Pop. 1076 // Notice: This updates flags, unlike normal Pop.
1077 __ add(Operand(backtrack_stackpointer()), Immediate(kPointerSize)); 1077 __ add(Operand(backtrack_stackpointer()), Immediate(kPointerSize));
1078 } 1078 }
1079 1079
1080 1080
1081 void RegExpMacroAssemblerIA32::CheckPreemption() { 1081 void RegExpMacroAssemblerIA32::CheckPreemption() {
1082 // Check for preemption. 1082 // Check for preemption.
1083 Label no_preempt; 1083 Label no_preempt;
1084 ExternalReference stack_guard_limit = 1084 ExternalReference stack_limit =
1085 ExternalReference::address_of_stack_guard_limit(); 1085 ExternalReference::address_of_stack_limit();
1086 __ cmp(esp, Operand::StaticVariable(stack_guard_limit)); 1086 __ cmp(esp, Operand::StaticVariable(stack_limit));
1087 __ j(above, &no_preempt, taken); 1087 __ j(above, &no_preempt, taken);
1088 1088
1089 SafeCall(&check_preempt_label_); 1089 SafeCall(&check_preempt_label_);
1090 1090
1091 __ bind(&no_preempt); 1091 __ bind(&no_preempt);
1092 } 1092 }
1093 1093
1094 1094
1095 void RegExpMacroAssemblerIA32::CheckStackLimit() { 1095 void RegExpMacroAssemblerIA32::CheckStackLimit() {
1096 Label no_stack_overflow; 1096 Label no_stack_overflow;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 } 1159 }
1160 } 1160 }
1161 } 1161 }
1162 1162
1163 1163
1164 #undef __ 1164 #undef __
1165 1165
1166 #endif // V8_NATIVE_REGEXP 1166 #endif // V8_NATIVE_REGEXP
1167 1167
1168 }} // namespace v8::internal 1168 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/fast-codegen-ia32.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698