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

Side by Side Diff: src/arm/regexp-macro-assembler-arm.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/arm/builtins-arm.cc ('k') | src/assembler.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 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 RegList argument_registers = r0.bit() | r1.bit() | r2.bit() | r3.bit(); 581 RegList argument_registers = r0.bit() | r1.bit() | r2.bit() | r3.bit();
582 __ stm(db_w, sp, argument_registers | registers_to_retain | lr.bit()); 582 __ stm(db_w, sp, argument_registers | registers_to_retain | lr.bit());
583 // Set frame pointer just above the arguments. 583 // Set frame pointer just above the arguments.
584 __ add(frame_pointer(), sp, Operand(4 * kPointerSize)); 584 __ add(frame_pointer(), sp, Operand(4 * kPointerSize));
585 __ push(r0); // Make room for "position - 1" constant (value is irrelevant). 585 __ push(r0); // Make room for "position - 1" constant (value is irrelevant).
586 586
587 // Check if we have space on the stack for registers. 587 // Check if we have space on the stack for registers.
588 Label stack_limit_hit; 588 Label stack_limit_hit;
589 Label stack_ok; 589 Label stack_ok;
590 590
591 ExternalReference stack_guard_limit = 591 ExternalReference stack_limit =
592 ExternalReference::address_of_stack_guard_limit(); 592 ExternalReference::address_of_stack_limit();
593 __ mov(r0, Operand(stack_guard_limit)); 593 __ mov(r0, Operand(stack_limit));
594 __ ldr(r0, MemOperand(r0)); 594 __ ldr(r0, MemOperand(r0));
595 __ sub(r0, sp, r0, SetCC); 595 __ sub(r0, sp, r0, SetCC);
596 // Handle it if the stack pointer is already below the stack limit. 596 // Handle it if the stack pointer is already below the stack limit.
597 __ b(ls, &stack_limit_hit); 597 __ b(ls, &stack_limit_hit);
598 // Check if there is room for the variable number of registers above 598 // Check if there is room for the variable number of registers above
599 // the stack limit. 599 // the stack limit.
600 __ cmp(r0, Operand(num_registers_ * kPointerSize)); 600 __ cmp(r0, Operand(num_registers_ * kPointerSize));
601 __ b(hs, &stack_ok); 601 __ b(hs, &stack_ok);
602 // Exit with OutOfMemory exception. There is not enough space on the stack 602 // Exit with OutOfMemory exception. There is not enough space on the stack
603 // for our working registers. 603 // for our working registers.
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 1083
1084 void RegExpMacroAssemblerARM::Pop(Register target) { 1084 void RegExpMacroAssemblerARM::Pop(Register target) {
1085 ASSERT(!target.is(backtrack_stackpointer())); 1085 ASSERT(!target.is(backtrack_stackpointer()));
1086 __ ldr(target, 1086 __ ldr(target,
1087 MemOperand(backtrack_stackpointer(), kPointerSize, PostIndex)); 1087 MemOperand(backtrack_stackpointer(), kPointerSize, PostIndex));
1088 } 1088 }
1089 1089
1090 1090
1091 void RegExpMacroAssemblerARM::CheckPreemption() { 1091 void RegExpMacroAssemblerARM::CheckPreemption() {
1092 // Check for preemption. 1092 // Check for preemption.
1093 ExternalReference stack_guard_limit = 1093 ExternalReference stack_limit =
1094 ExternalReference::address_of_stack_guard_limit(); 1094 ExternalReference::address_of_stack_limit();
1095 __ mov(r0, Operand(stack_guard_limit)); 1095 __ mov(r0, Operand(stack_limit));
1096 __ ldr(r0, MemOperand(r0)); 1096 __ ldr(r0, MemOperand(r0));
1097 __ cmp(sp, r0); 1097 __ cmp(sp, r0);
1098 SafeCall(&check_preempt_label_, ls); 1098 SafeCall(&check_preempt_label_, ls);
1099 } 1099 }
1100 1100
1101 1101
1102 void RegExpMacroAssemblerARM::CheckStackLimit() { 1102 void RegExpMacroAssemblerARM::CheckStackLimit() {
1103 ExternalReference stack_limit = 1103 ExternalReference stack_limit =
1104 ExternalReference::address_of_regexp_stack_limit(); 1104 ExternalReference::address_of_regexp_stack_limit();
1105 __ mov(r0, Operand(stack_limit)); 1105 __ mov(r0, Operand(stack_limit));
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 __ mov(r0, sp); 1220 __ mov(r0, sp);
1221 __ Call(r5); 1221 __ Call(r5);
1222 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); 1222 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex));
1223 } 1223 }
1224 1224
1225 #undef __ 1225 #undef __
1226 1226
1227 #endif // V8_NATIVE_REGEXP 1227 #endif // V8_NATIVE_REGEXP
1228 1228
1229 }} // namespace v8::internal 1229 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/builtins-arm.cc ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698