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 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 __ mov(edi, register_location(reg)); | 964 __ mov(edi, register_location(reg)); |
965 } | 965 } |
966 | 966 |
967 | 967 |
968 void RegExpMacroAssemblerIA32::ReadStackPointerFromRegister(int reg) { | 968 void RegExpMacroAssemblerIA32::ReadStackPointerFromRegister(int reg) { |
969 __ mov(backtrack_stackpointer(), register_location(reg)); | 969 __ mov(backtrack_stackpointer(), register_location(reg)); |
970 __ add(backtrack_stackpointer(), Operand(ebp, kStackHighEnd)); | 970 __ add(backtrack_stackpointer(), Operand(ebp, kStackHighEnd)); |
971 } | 971 } |
972 | 972 |
973 void RegExpMacroAssemblerIA32::SetCurrentPositionFromEnd(int by) { | 973 void RegExpMacroAssemblerIA32::SetCurrentPositionFromEnd(int by) { |
974 NearLabel after_position; | 974 Label after_position; |
975 __ cmp(edi, -by * char_size()); | 975 __ cmp(edi, -by * char_size()); |
976 __ j(greater_equal, &after_position); | 976 __ j(greater_equal, &after_position, Label::kNear); |
977 __ mov(edi, -by * char_size()); | 977 __ mov(edi, -by * char_size()); |
978 // On RegExp code entry (where this operation is used), the character before | 978 // On RegExp code entry (where this operation is used), the character before |
979 // the current position is expected to be already loaded. | 979 // the current position is expected to be already loaded. |
980 // We have advanced the position, so it's safe to read backwards. | 980 // We have advanced the position, so it's safe to read backwards. |
981 LoadCurrentCharacterUnchecked(-1, 1); | 981 LoadCurrentCharacterUnchecked(-1, 1); |
982 __ bind(&after_position); | 982 __ bind(&after_position); |
983 } | 983 } |
984 | 984 |
985 void RegExpMacroAssemblerIA32::SetRegister(int register_index, int to) { | 985 void RegExpMacroAssemblerIA32::SetRegister(int register_index, int to) { |
986 ASSERT(register_index >= num_saved_registers_); // Reserved for positions! | 986 ASSERT(register_index >= num_saved_registers_); // Reserved for positions! |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 } | 1255 } |
1256 | 1256 |
1257 | 1257 |
1258 #undef __ | 1258 #undef __ |
1259 | 1259 |
1260 #endif // V8_INTERPRETED_REGEXP | 1260 #endif // V8_INTERPRETED_REGEXP |
1261 | 1261 |
1262 }} // namespace v8::internal | 1262 }} // namespace v8::internal |
1263 | 1263 |
1264 #endif // V8_TARGET_ARCH_IA32 | 1264 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |