OLD | NEW |
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 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 ExternalReference stack_guard_limit = | 1093 ExternalReference stack_guard_limit = |
1094 ExternalReference::address_of_stack_guard_limit(); | 1094 ExternalReference::address_of_stack_guard_limit(); |
1095 __ mov(r0, Operand(stack_guard_limit)); | 1095 __ mov(r0, Operand(stack_guard_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 if (FLAG_check_stack) { | 1103 ExternalReference stack_limit = |
1104 ExternalReference stack_limit = | 1104 ExternalReference::address_of_regexp_stack_limit(); |
1105 ExternalReference::address_of_regexp_stack_limit(); | 1105 __ mov(r0, Operand(stack_limit)); |
1106 __ mov(r0, Operand(stack_limit)); | 1106 __ ldr(r0, MemOperand(r0)); |
1107 __ ldr(r0, MemOperand(r0)); | 1107 __ cmp(backtrack_stackpointer(), Operand(r0)); |
1108 __ cmp(backtrack_stackpointer(), Operand(r0)); | 1108 SafeCall(&stack_overflow_label_, ls); |
1109 SafeCall(&stack_overflow_label_, ls); | |
1110 } | |
1111 } | 1109 } |
1112 | 1110 |
1113 | 1111 |
1114 void RegExpMacroAssemblerARM::EmitBacktrackConstantPool() { | 1112 void RegExpMacroAssemblerARM::EmitBacktrackConstantPool() { |
1115 __ CheckConstPool(false, false); | 1113 __ CheckConstPool(false, false); |
1116 __ BlockConstPoolBefore( | 1114 __ BlockConstPoolBefore( |
1117 masm_->pc_offset() + kBacktrackConstantPoolSize * Assembler::kInstrSize); | 1115 masm_->pc_offset() + kBacktrackConstantPoolSize * Assembler::kInstrSize); |
1118 backtrack_constant_pool_offset_ = masm_->pc_offset(); | 1116 backtrack_constant_pool_offset_ = masm_->pc_offset(); |
1119 for (int i = 0; i < kBacktrackConstantPoolSize; i++) { | 1117 for (int i = 0; i < kBacktrackConstantPoolSize; i++) { |
1120 __ emit(0); | 1118 __ emit(0); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 __ mov(r0, sp); | 1220 __ mov(r0, sp); |
1223 __ Call(r5); | 1221 __ Call(r5); |
1224 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); | 1222 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); |
1225 } | 1223 } |
1226 | 1224 |
1227 #undef __ | 1225 #undef __ |
1228 | 1226 |
1229 #endif // V8_NATIVE_REGEXP | 1227 #endif // V8_NATIVE_REGEXP |
1230 | 1228 |
1231 }} // namespace v8::internal | 1229 }} // namespace v8::internal |
OLD | NEW |