OLD | NEW |
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 | 139 |
140 void RegExpMacroAssemblerIrregexp::ReadStackPointerFromRegister( | 140 void RegExpMacroAssemblerIrregexp::ReadStackPointerFromRegister( |
141 int register_index) { | 141 int register_index) { |
142 ASSERT(register_index >= 0); | 142 ASSERT(register_index >= 0); |
143 ASSERT(register_index <= kMaxRegister); | 143 ASSERT(register_index <= kMaxRegister); |
144 Emit(BC_SET_SP_TO_REGISTER, register_index); | 144 Emit(BC_SET_SP_TO_REGISTER, register_index); |
145 } | 145 } |
146 | 146 |
147 | 147 |
148 void RegExpMacroAssemblerIrregexp::SetCurrentPositionFromEnd(int by) { | |
149 ASSERT(is_uint24(by)); | |
150 Emit(BC_SET_CURRENT_POSITION_FROM_END, by); | |
151 } | |
152 | |
153 | |
154 void RegExpMacroAssemblerIrregexp::SetRegister(int register_index, int to) { | 148 void RegExpMacroAssemblerIrregexp::SetRegister(int register_index, int to) { |
155 ASSERT(register_index >= 0); | 149 ASSERT(register_index >= 0); |
156 ASSERT(register_index <= kMaxRegister); | 150 ASSERT(register_index <= kMaxRegister); |
157 Emit(BC_SET_REGISTER, register_index); | 151 Emit(BC_SET_REGISTER, register_index); |
158 Emit32(to); | 152 Emit32(to); |
159 } | 153 } |
160 | 154 |
161 | 155 |
162 void RegExpMacroAssemblerIrregexp::AdvanceRegister(int register_index, int by) { | 156 void RegExpMacroAssemblerIrregexp::AdvanceRegister(int register_index, int by) { |
163 ASSERT(register_index >= 0); | 157 ASSERT(register_index >= 0); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 own_buffer_ = true; | 455 own_buffer_ = true; |
462 memcpy(buffer_.start(), old_buffer.start(), old_buffer.length()); | 456 memcpy(buffer_.start(), old_buffer.start(), old_buffer.length()); |
463 if (old_buffer_was_our_own) { | 457 if (old_buffer_was_our_own) { |
464 old_buffer.Dispose(); | 458 old_buffer.Dispose(); |
465 } | 459 } |
466 } | 460 } |
467 | 461 |
468 #endif // V8_INTERPRETED_REGEXP | 462 #endif // V8_INTERPRETED_REGEXP |
469 | 463 |
470 } } // namespace v8::internal | 464 } } // namespace v8::internal |
OLD | NEW |