From 66871a8103bd274b40381b286f633b741457a3d5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 10 Nov 2002 07:04:07 +0000 Subject: [PATCH] (AT_DATA_TRIANGULAR_GRAMMAR, AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR, AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x)) abort ();'. This reduces the runtime of the "Many lookaheads" test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III. --- tests/torture.at | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/torture.at b/tests/torture.at index b9032d0..c02be2f 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -51,7 +51,6 @@ print < #include -#include #define YYERROR_VERBOSE 1 #define YYDEBUG 1 @@ -76,8 +75,8 @@ for my $size (1 .. $max) print < #include -#include #define YYERROR_VERBOSE 1 #define YYDEBUG 1 @@ -272,7 +270,6 @@ print < #include -#include #define YYERROR_VERBOSE 1 #define YYDEBUG 1 @@ -303,17 +300,17 @@ for my $count (1 .. $max) print < #include -#include ]$1[ static int yylex (void); static void yyerror (const char *msg); @@ -423,7 +419,8 @@ yylex (void) int main (int argc, const char **argv) { - assert (argc == 2); + if (argc != 2) + abort (); yylval = atoi (argv[1]); yydebug = 1; return yyparse (); -- 2.7.4