OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 RegExpMacroAssembler::IrregexpImplementation | 870 RegExpMacroAssembler::IrregexpImplementation |
871 RegExpMacroAssemblerIA32::Implementation() { | 871 RegExpMacroAssemblerIA32::Implementation() { |
872 return kIA32Implementation; | 872 return kIA32Implementation; |
873 } | 873 } |
874 | 874 |
875 | 875 |
876 void RegExpMacroAssemblerIA32::LoadCurrentCharacter(int cp_offset, | 876 void RegExpMacroAssemblerIA32::LoadCurrentCharacter(int cp_offset, |
877 Label* on_end_of_input, | 877 Label* on_end_of_input, |
878 bool check_bounds, | 878 bool check_bounds, |
879 int characters) { | 879 int characters) { |
880 ASSERT(cp_offset >= 0); | 880 ASSERT(cp_offset >= -1); // ^ and \b can look behind one character. |
881 ASSERT(cp_offset < (1<<30)); // Be sane! (And ensure negation works) | 881 ASSERT(cp_offset < (1<<30)); // Be sane! (And ensure negation works) |
882 CheckPosition(cp_offset + characters - 1, on_end_of_input); | 882 CheckPosition(cp_offset + characters - 1, on_end_of_input); |
883 LoadCurrentCharacterUnchecked(cp_offset, characters); | 883 LoadCurrentCharacterUnchecked(cp_offset, characters); |
884 } | 884 } |
885 | 885 |
886 | 886 |
887 void RegExpMacroAssemblerIA32::PopCurrentPosition() { | 887 void RegExpMacroAssemblerIA32::PopCurrentPosition() { |
888 Pop(edi); | 888 Pop(edi); |
889 } | 889 } |
890 | 890 |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1223 | 1223 |
1224 | 1224 |
1225 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, | 1225 void RegExpMacroAssemblerIA32::LoadConstantBufferAddress(Register reg, |
1226 ArraySlice* buffer) { | 1226 ArraySlice* buffer) { |
1227 __ mov(reg, buffer->array()); | 1227 __ mov(reg, buffer->array()); |
1228 __ add(Operand(reg), Immediate(buffer->base_offset())); | 1228 __ add(Operand(reg), Immediate(buffer->base_offset())); |
1229 } | 1229 } |
1230 | 1230 |
1231 #undef __ | 1231 #undef __ |
1232 }} // namespace v8::internal | 1232 }} // namespace v8::internal |
OLD | NEW |