From a186a8c4df3c302179c4bbf96b921bf3aa1bc6cf Mon Sep 17 00:00:00 2001 From: "waldemar%netscape.com" Date: Wed, 25 Sep 2002 23:49:53 +0000 Subject: [PATCH] Replaced fill-capture by the new repeat primitive git-svn-id: svn://10.0.0.236/trunk@130461 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js2/semantics/JS20/RegExp.lisp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mozilla/js2/semantics/JS20/RegExp.lisp b/mozilla/js2/semantics/JS20/RegExp.lisp index bd77147e260..65159ecc4b3 100644 --- a/mozilla/js2/semantics/JS20/RegExp.lisp +++ b/mozilla/js2/semantics/JS20/RegExp.lisp @@ -141,17 +141,13 @@ (begin (const m1 matcher ((gen-matcher :disjunction) 0)) (function (e (t r-e-input) (index integer)) r-e-result - (const x r-e-match (new r-e-match index (fill-capture (count-parens :disjunction)))) + (const x r-e-match (new r-e-match index (repeat capture undefined (count-parens :disjunction)))) (return (m1 t x success-continuation))) (return e))))) (%print-actions) (define (success-continuation (x r-e-match)) r-e-result (return x)) - (define (fill-capture (i integer)) (vector capture) - (if (= i 0) - (return (vector-of capture)) - (return (append (fill-capture (- i 1)) (vector-of capture undefined))))) (%heading 2 "Disjunctions") @@ -265,6 +261,7 @@ (%charclass :decimal-digit) + (deftag +infinity) (deftype limit (union integer (tag +infinity))) (define (reset-parens (x r-e-match) (p integer) (n-parens integer)) r-e-match