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