Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/ia32/regexp-macro-assembler-ia32.cc

Issue 3812012: Revert revision 5657. (Closed)
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ia32/regexp-macro-assembler-ia32.h ('k') | src/interpreter-irregexp.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 } 126 }
127 127
128 128
129 int RegExpMacroAssemblerIA32::stack_limit_slack() { 129 int RegExpMacroAssemblerIA32::stack_limit_slack() {
130 return RegExpStack::kStackLimitSlack; 130 return RegExpStack::kStackLimitSlack;
131 } 131 }
132 132
133 133
134 void RegExpMacroAssemblerIA32::AdvanceCurrentPosition(int by) { 134 void RegExpMacroAssemblerIA32::AdvanceCurrentPosition(int by) {
135 if (by != 0) { 135 if (by != 0) {
136 Label inside_string;
136 __ add(Operand(edi), Immediate(by * char_size())); 137 __ add(Operand(edi), Immediate(by * char_size()));
137 } 138 }
138 } 139 }
139 140
140 141
141 void RegExpMacroAssemblerIA32::AdvanceRegister(int reg, int by) { 142 void RegExpMacroAssemblerIA32::AdvanceRegister(int reg, int by) {
142 ASSERT(reg >= 0); 143 ASSERT(reg >= 0);
143 ASSERT(reg < num_registers_); 144 ASSERT(reg < num_registers_);
144 if (by != 0) { 145 if (by != 0) {
145 __ add(register_location(reg), Immediate(by)); 146 __ add(register_location(reg), Immediate(by));
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 void RegExpMacroAssemblerIA32::ReadCurrentPositionFromRegister(int reg) { 957 void RegExpMacroAssemblerIA32::ReadCurrentPositionFromRegister(int reg) {
957 __ mov(edi, register_location(reg)); 958 __ mov(edi, register_location(reg));
958 } 959 }
959 960
960 961
961 void RegExpMacroAssemblerIA32::ReadStackPointerFromRegister(int reg) { 962 void RegExpMacroAssemblerIA32::ReadStackPointerFromRegister(int reg) {
962 __ mov(backtrack_stackpointer(), register_location(reg)); 963 __ mov(backtrack_stackpointer(), register_location(reg));
963 __ add(backtrack_stackpointer(), Operand(ebp, kStackHighEnd)); 964 __ add(backtrack_stackpointer(), Operand(ebp, kStackHighEnd));
964 } 965 }
965 966
966 void RegExpMacroAssemblerIA32::SetCurrentPositionFromEnd(int by) {
967 NearLabel after_position;
968 __ cmp(edi, -by * char_size());
969 __ j(above_equal, &after_position);
970 __ mov(edi, -by * char_size());
971 // On RegExp code entry (where this operation is used), the character before
972 // the current position is expected to be already loaded.
973 // We have advenced the position, so it's safe to read backwards.
974 LoadCurrentCharacterUnchecked(-1, 1);
975 __ bind(&after_position);
976 }
977 967
978 void RegExpMacroAssemblerIA32::SetRegister(int register_index, int to) { 968 void RegExpMacroAssemblerIA32::SetRegister(int register_index, int to) {
979 ASSERT(register_index >= num_saved_registers_); // Reserved for positions! 969 ASSERT(register_index >= num_saved_registers_); // Reserved for positions!
980 __ mov(register_location(register_index), Immediate(to)); 970 __ mov(register_location(register_index), Immediate(to));
981 } 971 }
982 972
983 973
984 void RegExpMacroAssemblerIA32::Succeed() { 974 void RegExpMacroAssemblerIA32::Succeed() {
985 __ jmp(&success_label_); 975 __ jmp(&success_label_);
986 } 976 }
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 } 1236 }
1247 1237
1248 1238
1249 #undef __ 1239 #undef __
1250 1240
1251 #endif // V8_INTERPRETED_REGEXP 1241 #endif // V8_INTERPRETED_REGEXP
1252 1242
1253 }} // namespace v8::internal 1243 }} // namespace v8::internal
1254 1244
1255 #endif // V8_TARGET_ARCH_IA32 1245 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/regexp-macro-assembler-ia32.h ('k') | src/interpreter-irregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698