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

Side by Side Diff: src/assembler-re2k.cc

Issue 11350: Add back references. Since "back references" is two words... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: Created 12 years, 1 month 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/assembler-re2k.h ('k') | src/ast.h » ('j') | src/jsregexp.cc » ('J')
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 206
207 void Re2kAssembler::CheckCharacterGT(uc16 limit, Label* on_greater) { 207 void Re2kAssembler::CheckCharacterGT(uc16 limit, Label* on_greater) {
208 Emit(BC_CHECK_GT); 208 Emit(BC_CHECK_GT);
209 Emit16(limit); 209 Emit16(limit);
210 EmitOrLink(on_greater); 210 EmitOrLink(on_greater);
211 } 211 }
212 212
213 213
214 void Re2kAssembler::CheckBackref(int capture_index, 214 void Re2kAssembler::CheckNotBackReference(int capture_index,
215 Label* on_mismatch) { 215 Label* on_mismatch) {
216 Emit(BC_CHECK_BACKREF); 216 Emit(BC_CHECK_NOT_BACK_REF);
217 Emit32(0);
218 Emit(capture_index); 217 Emit(capture_index);
219 EmitOrLink(on_mismatch); 218 EmitOrLink(on_mismatch);
220 } 219 }
221 220
222 221
223 void Re2kAssembler::CheckRegister(int byte_code, 222 void Re2kAssembler::CheckRegister(int byte_code,
224 int reg_index, 223 int reg_index,
225 uint16_t vs, 224 uint16_t vs,
226 Label* on_true) { 225 Label* on_true) {
227 Emit(byte_code); 226 Emit(byte_code);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 buffer_ = Vector<byte>::New(old_buffer.length() * 2); 310 buffer_ = Vector<byte>::New(old_buffer.length() * 2);
312 own_buffer_ = true; 311 own_buffer_ = true;
313 memcpy(buffer_.start(), old_buffer.start(), old_buffer.length()); 312 memcpy(buffer_.start(), old_buffer.start(), old_buffer.length());
314 if (old_buffer_was_our_own) { 313 if (old_buffer_was_our_own) {
315 old_buffer.Dispose(); 314 old_buffer.Dispose();
316 } 315 }
317 } 316 }
318 317
319 318
320 } } // namespace v8::internal 319 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler-re2k.h ('k') | src/ast.h » ('j') | src/jsregexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698