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

Unified Diff: src/jsregexp.cc

Issue 141042: Fix regexp bug reported on iit.edu. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regexp-captures.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jsregexp.cc
===================================================================
--- src/jsregexp.cc (revision 2231)
+++ src/jsregexp.cc (working copy)
@@ -404,7 +404,9 @@
// Prepare space for the return values.
int number_of_capture_registers =
- (IrregexpNumberOfCaptures(FixedArray::cast(jsregexp->data())) + 1) * 2;
+ UseNativeRegexp() ?
+ (IrregexpNumberOfCaptures(FixedArray::cast(jsregexp->data())) + 1) * 2 :
Lasse Reichstein 2009/06/22 12:32:49 Seems this have different meanings for the two imp
+ IrregexpNumberOfRegisters(FixedArray::cast(jsregexp->data()));
OffsetsVector offsets(number_of_capture_registers);
#ifdef DEBUG
@@ -896,12 +898,13 @@
// The "+1" is to avoid a push_limit of zero if stack_limit_slack() is 1.
const int push_limit = (assembler->stack_limit_slack() + 1) / 2;
+ // Count pushes performed to force a stack limit check occasionally.
+ int pushes = 0;
+
for (int reg = 0; reg <= max_register; reg++) {
if (!affected_registers.Get(reg)) {
continue;
}
- // Count pushes performed to force a stack limit check occasionally.
- int pushes = 0;
// The chronologically first deferred action in the trace
// is used to infer the action needed to restore a register
« no previous file with comments | « no previous file | test/mjsunit/regexp-captures.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698