Author: zoltan
Date: 2006-04-03 08:15:13 -0400 (Mon, 03 Apr 2006)
New Revision: 58937
Modified:
trunk/mcs/jay/ChangeLog
trunk/mcs/jay/output.c
trunk/mcs/jay/skeleton
trunk/mcs/jay/skeleton.cs
Log:
2006-04-03 Zoltan Varga <[EMAIL PROTECTED]>
* output.c skeleton skeleton.cs: Initialize the jay debug tables
lazily. Fixes #77946.
Modified: trunk/mcs/jay/ChangeLog
===================================================================
--- trunk/mcs/jay/ChangeLog 2006-04-03 12:09:59 UTC (rev 58936)
+++ trunk/mcs/jay/ChangeLog 2006-04-03 12:15:13 UTC (rev 58937)
@@ -1,3 +1,8 @@
+2006-04-03 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * output.c skeleton skeleton.cs: Initialize the jay debug tables
+ lazily. Fixes #77946.
+
2006-03-10 Zoltan Varga <[EMAIL PROTECTED]>
* reader.c (copy_action): Applied patch from Axel T Schreiner ([EMAIL
PROTECTED]).
Modified: trunk/mcs/jay/output.c
===================================================================
--- trunk/mcs/jay/output.c 2006-04-03 12:09:59 UTC (rev 58936)
+++ trunk/mcs/jay/output.c 2006-04-03 12:15:13 UTC (rev 58937)
@@ -854,6 +854,9 @@
printf(" protected static %s int yyFinal = %d;\n", csharp ? "" : "final",
final_state);
++outline;
+ printf ("%s // Put this array into a separate class so it is only
initialized if debugging is actually used\n", prefix);
+ printf ("%s // Use MarshalByRefObject to disable inlining\n", prefix);
+ printf("%s class YYRules %s {\n", prefix, csharp ? ":
MarshalByRefObject" : "");
printf("%s public static %s string [] yyRule = {\n", prefix, csharp ?
"" : "final");
for (i = 2; i < nrules; ++i)
{
@@ -905,6 +908,10 @@
}
++ outline;
printf("%s };\n", prefix);
+ printf ("%s public static string getRule (int index) {\n", prefix);
+ printf ("%s return yyRule [index];\n", prefix);
+ printf ("%s }\n", prefix);
+ printf ("%s}\n", prefix);
max = 0;
for (i = 2; i < ntokens; ++i)
Modified: trunk/mcs/jay/skeleton
===================================================================
--- trunk/mcs/jay/skeleton 2006-04-03 12:09:59 UTC (rev 58936)
+++ trunk/mcs/jay/skeleton 2006-04-03 12:15:13 UTC (rev 58937)
@@ -228,7 +228,7 @@
. }
. int yyV = yyTop + 1-yyLen[yyN];
t if (yydebug != null)
-t yydebug.reduce(yyState, yyStates[yyV-1], yyN, yyRule[yyN],
yyLen[yyN]);
+t yydebug.reduce(yyState, yyStates[yyV-1], yyN, YYRules.getRule[yyN],
yyLen[yyN]);
. yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
. switch (yyN) {
Modified: trunk/mcs/jay/skeleton.cs
===================================================================
--- trunk/mcs/jay/skeleton.cs 2006-04-03 12:09:59 UTC (rev 58936)
+++ trunk/mcs/jay/skeleton.cs 2006-04-03 12:15:13 UTC (rev 58937)
@@ -210,7 +210,7 @@
. }
. int yyV = yyTop + 1-yyLen[yyN];
t if (debug != null)
-t debug.reduce(yyState, yyStates[yyV-1], yyN, yyRule[yyN],
yyLen[yyN]);
+t debug.reduce(yyState, yyStates[yyV-1], yyN, YYRules.getRule (yyN),
yyLen[yyN]);
. yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
. switch (yyN) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches