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

Side by Side Diff: src/regexp-delay.js

Issue 17203: Periodic merge from bleeding_edge to experimental code generator... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/regexp-macro-assembler.h » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 var s = ToString(string); 171 var s = ToString(string);
172 var length = s.length; 172 var length = s.length;
173 var lastIndex = this.lastIndex; 173 var lastIndex = this.lastIndex;
174 var i = this.global ? TO_INTEGER(lastIndex) : 0; 174 var i = this.global ? TO_INTEGER(lastIndex) : 0;
175 175
176 if (i < 0 || i > s.length) { 176 if (i < 0 || i > s.length) {
177 this.lastIndex = 0; 177 this.lastIndex = 0;
178 return null; 178 return null;
179 } 179 }
180 180
181 %_Log('regexp', 'regexp-exec,%0r,%1S,%2i', [this, s, lastIndex]);
181 // matchIndices is an array of integers with length of captures*2, 182 // matchIndices is an array of integers with length of captures*2,
182 // each pair of integers specified the start and the end of index 183 // each pair of integers specified the start and the end of index
183 // in the string. 184 // in the string.
184 var matchIndices = DoRegExpExec(this, s, i); 185 var matchIndices = DoRegExpExec(this, s, i);
185 186
186 if (matchIndices == null) { 187 if (matchIndices == null) {
187 if (this.global) this.lastIndex = 0; 188 if (this.global) this.lastIndex = 0;
188 return matchIndices; // no match 189 return matchIndices; // no match
189 } 190 }
190 191
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 %DefineAccessor($RegExp, "$'", SETTER, NoOpSetter, DONT_ENUM | DONT_DELETE); 366 %DefineAccessor($RegExp, "$'", SETTER, NoOpSetter, DONT_ENUM | DONT_DELETE);
366 367
367 for (var i = 1; i < 10; ++i) { 368 for (var i = 1; i < 10; ++i) {
368 %DefineAccessor($RegExp, '$' + i, GETTER, RegExpMakeCaptureGetter(i), DONT_D ELETE); 369 %DefineAccessor($RegExp, '$' + i, GETTER, RegExpMakeCaptureGetter(i), DONT_D ELETE);
369 %DefineAccessor($RegExp, '$' + i, SETTER, NoOpSetter, DONT_DELETE); 370 %DefineAccessor($RegExp, '$' + i, SETTER, NoOpSetter, DONT_DELETE);
370 } 371 }
371 } 372 }
372 373
373 374
374 SetupRegExp(); 375 SetupRegExp();
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/regexp-macro-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698