[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/cscc/bf bf_codegen.tc,1.1,1.2
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc/bf bf_codegen.tc,1.1,1.2 |
Date: |
Sat, 17 May 2003 11:25:16 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc/bf
In directory subversions:/tmp/cvs-serv16869/cscc/bf
Modified Files:
bf_codegen.tc
Log Message:
Allow class and method name of code to be passed in as command line params
Index: bf_codegen.tc
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/bf/bf_codegen.tc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** bf_codegen.tc 17 May 2003 12:47:46 -0000 1.1
--- bf_codegen.tc 17 May 2003 15:25:14 -0000 1.2
***************
*** 37,40 ****
--- 37,44 ----
const char * size=
CCStringListGetValue(extension_flags,num_extension_flags,
"max-array-size");
+ char * name = CCStringListGetValue(extension_flags, num_extension_flags
, "class-name");
+
+ char * method = CCStringListGetValue(extension_flags,
num_extension_flags , "method-name");
+
if(size)
{
***************
*** 46,57 ****
}
}
fprintf(info->asmOutput,
! ".class public bf extends [mscorlib] System.Object \n"
"{\n"
! ".method static public void main() il managed\n"
"{\n"
- "\t.entrypoint\n"
"\t.locals (int8[] bfarray, int32 bfarrayloc)\n"
! "\n");
ILGenWordInsn(info,IL_OP_LDC_I4 , maxArraySize);
--- 50,64 ----
}
}
+
+ if(!name) name = "brainfck";
+ if(!method) method = "Main";
+
fprintf(info->asmOutput,
! ".class public %s extends [mscorlib] System.Object \n"
"{\n"
! ".method static public void %s() il managed\n"
"{\n"
"\t.locals (int8[] bfarray, int32 bfarrayloc)\n"
! "\n",name,method);
ILGenWordInsn(info,IL_OP_LDC_I4 , maxArraySize);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc/bf bf_codegen.tc,1.1,1.2,
Gopal.V <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.2364,1.2365
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnet/cscc/common cc_options.c,1.14,1.15 cc_options.h,1.9,1.10
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnet ChangeLog,1.2364,1.2365
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnet/cscc/common cc_options.c,1.14,1.15 cc_options.h,1.9,1.10
- Index(es):