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

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

Issue 14194: * Generate quick checks based on mask and compare for... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years 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 | Annotate | Revision Log
« no previous file with comments | « src/regexp-macro-assembler-tracer.h ('k') | test/mjsunit/regexp.js » ('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 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 159
160 void RegExpMacroAssemblerTracer::ReadStackPointerFromRegister(int reg) { 160 void RegExpMacroAssemblerTracer::ReadStackPointerFromRegister(int reg) {
161 PrintF(" ReadStackPointerFromRegister(register=%d);\n", reg); 161 PrintF(" ReadStackPointerFromRegister(register=%d);\n", reg);
162 assembler_->ReadStackPointerFromRegister(reg); 162 assembler_->ReadStackPointerFromRegister(reg);
163 } 163 }
164 164
165 165
166 void RegExpMacroAssemblerTracer::LoadCurrentCharacter(int cp_offset, 166 void RegExpMacroAssemblerTracer::LoadCurrentCharacter(int cp_offset,
167 Label* on_end_of_input) { 167 Label* on_end_of_input,
168 PrintF(" LoadCurrentCharacter(cp_offset=%d, label[%08x]);\n", 168 bool check_bounds,
169 int characters) {
170 const char* check_msg = check_bounds ? "" : " (unchecked)";
171 PrintF(" LoadCurrentCharacter(cp_offset=%d, label[%08x]%s (%d chars));\n",
169 cp_offset, 172 cp_offset,
170 on_end_of_input); 173 on_end_of_input,
171 assembler_->LoadCurrentCharacter(cp_offset, on_end_of_input); 174 check_msg,
172 } 175 characters);
173 176 assembler_->LoadCurrentCharacter(cp_offset,
174 177 on_end_of_input,
175 void RegExpMacroAssemblerTracer::LoadCurrentCharacterUnchecked(int cp_offset) { 178 check_bounds,
176 PrintF(" LoadCurrentCharacterUnchecked(cp_offset=%d);\n", 179 characters);
177 cp_offset);
178 assembler_->LoadCurrentCharacterUnchecked(cp_offset);
179 } 180 }
180 181
181 182
182 void RegExpMacroAssemblerTracer::CheckCharacterLT(uc16 limit, Label* on_less) { 183 void RegExpMacroAssemblerTracer::CheckCharacterLT(uc16 limit, Label* on_less) {
183 PrintF(" CheckCharacterLT(c='u%04x', label[%08x]);\n", limit, on_less); 184 PrintF(" CheckCharacterLT(c='u%04x', label[%08x]);\n", limit, on_less);
184 assembler_->CheckCharacterLT(limit, on_less); 185 assembler_->CheckCharacterLT(limit, on_less);
185 } 186 }
186 187
187 188
188 void RegExpMacroAssemblerTracer::CheckCharacterGT(uc16 limit, 189 void RegExpMacroAssemblerTracer::CheckCharacterGT(uc16 limit,
189 Label* on_greater) { 190 Label* on_greater) {
190 PrintF(" CheckCharacterGT(c='u%04x', label[%08x]);\n", limit, on_greater); 191 PrintF(" CheckCharacterGT(c='u%04x', label[%08x]);\n", limit, on_greater);
191 assembler_->CheckCharacterGT(limit, on_greater); 192 assembler_->CheckCharacterGT(limit, on_greater);
192 } 193 }
193 194
194 195
195 void RegExpMacroAssemblerTracer::CheckCharacter(uc16 c, Label* on_equal) { 196 void RegExpMacroAssemblerTracer::CheckCharacter(uint32_t c, Label* on_equal) {
196 PrintF(" CheckCharacter(c='u%04x', label[%08x]);\n", c, on_equal); 197 PrintF(" CheckCharacter(c='u%04x', label[%08x]);\n", c, on_equal);
197 assembler_->CheckCharacter(c, on_equal); 198 assembler_->CheckCharacter(c, on_equal);
198 } 199 }
199 200
200 201
201 void RegExpMacroAssemblerTracer::CheckNotAtStart(Label* on_not_at_start) { 202 void RegExpMacroAssemblerTracer::CheckNotAtStart(Label* on_not_at_start) {
202 PrintF(" CheckNotAtStart(label[%08x]);\n", on_not_at_start); 203 PrintF(" CheckNotAtStart(label[%08x]);\n", on_not_at_start);
203 assembler_->CheckNotAtStart(on_not_at_start); 204 assembler_->CheckNotAtStart(on_not_at_start);
204 } 205 }
205 206
206 207
207 void RegExpMacroAssemblerTracer::CheckNotCharacter(uc16 c, 208 void RegExpMacroAssemblerTracer::CheckNotCharacter(uint32_t c,
208 Label* on_not_equal) { 209 Label* on_not_equal) {
209 PrintF(" CheckNotCharacter(c='u%04x', label[%08x]);\n", c, on_not_equal); 210 PrintF(" CheckNotCharacter(c='u%04x', label[%08x]);\n", c, on_not_equal);
210 assembler_->CheckNotCharacter(c, on_not_equal); 211 assembler_->CheckNotCharacter(c, on_not_equal);
211 } 212 }
212 213
213 214
214 void RegExpMacroAssemblerTracer::CheckNotCharacterAfterOr(uc16 c, uc16 mask, 215 void RegExpMacroAssemblerTracer::CheckCharacterAfterAnd(
215 Label* on_not_equal) { 216 uint32_t c,
216 PrintF(" CheckNotCharacterAfterOr(c='u%04x', mask=0x%04x, label[%08x]);\n", c, 217 uint32_t mask,
217 mask, on_not_equal); 218 Label* on_equal) {
218 assembler_->CheckNotCharacterAfterOr(c, mask, on_not_equal); 219 PrintF(" CheckCharacterAfterAnd(c='u%04x', mask=0x%04x, label[%08x]);\n",
220 c,
221 mask,
222 on_equal);
223 assembler_->CheckCharacterAfterAnd(c, mask, on_equal);
219 } 224 }
220 225
221 226
222 void RegExpMacroAssemblerTracer::CheckNotCharacterAfterMinusOr( 227 void RegExpMacroAssemblerTracer::CheckNotCharacterAfterAnd(
223 uc16 c, 228 uint32_t c,
224 uc16 mask, 229 uint32_t mask,
225 Label* on_not_equal) { 230 Label* on_not_equal) {
226 PrintF(" CheckNotCharacterAfterMinusOr(c='u%04x', mask=0x%04x, " 231 PrintF(" CheckNotCharacterAfterAnd(c='u%04x', mask=0x%04x, label[%08x]);\n",
227 "label[%08x]);\n", c, mask, on_not_equal); 232 c,
228 assembler_->CheckNotCharacterAfterMinusOr(c, mask, on_not_equal); 233 mask,
234 on_not_equal);
235 assembler_->CheckNotCharacterAfterAnd(c, mask, on_not_equal);
229 } 236 }
230 237
231 238
239 void RegExpMacroAssemblerTracer::CheckNotCharacterAfterMinusAnd(
240 uc16 c,
241 uc16 minus,
242 uc16 mask,
243 Label* on_not_equal) {
244 PrintF(" CheckNotCharacterAfterMinusAnd(c='u%04x', minus=%04x, mask=0x%04x, "
245 "label[%08x]);\n",
246 c,
247 minus,
248 mask,
249 on_not_equal);
250 assembler_->CheckNotCharacterAfterMinusAnd(c, minus, mask, on_not_equal);
251 }
252
253
232 void RegExpMacroAssemblerTracer::CheckNotBackReference(int start_reg, 254 void RegExpMacroAssemblerTracer::CheckNotBackReference(int start_reg,
233 Label* on_no_match) { 255 Label* on_no_match) {
234 PrintF(" CheckNotBackReference(register=%d, label[%08x]);\n", start_reg, 256 PrintF(" CheckNotBackReference(register=%d, label[%08x]);\n", start_reg,
235 on_no_match); 257 on_no_match);
236 assembler_->CheckNotBackReference(start_reg, on_no_match); 258 assembler_->CheckNotBackReference(start_reg, on_no_match);
237 } 259 }
238 260
239 261
240 void RegExpMacroAssemblerTracer::CheckNotBackReferenceIgnoreCase( 262 void RegExpMacroAssemblerTracer::CheckNotBackReferenceIgnoreCase(
241 int start_reg, 263 int start_reg,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 return assembler_->Implementation(); 366 return assembler_->Implementation();
345 } 367 }
346 368
347 369
348 Handle<Object> RegExpMacroAssemblerTracer::GetCode(Handle<String> source) { 370 Handle<Object> RegExpMacroAssemblerTracer::GetCode(Handle<String> source) {
349 PrintF(" GetCode(%s);\n", *(source->ToCString())); 371 PrintF(" GetCode(%s);\n", *(source->ToCString()));
350 return assembler_->GetCode(source); 372 return assembler_->GetCode(source);
351 } 373 }
352 374
353 }} // namespace v8::internal 375 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « src/regexp-macro-assembler-tracer.h ('k') | test/mjsunit/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698