[Commit]
nickle ChangeLog, 1.55, 1.56 compile.c, 1.153, 1.154 type.c,
1.62, 1.63 value.h, 1.102, 1.103
Keith Packard
commit at keithp.com
Wed May 26 01:59:25 PDT 2004
Committed by: keithp
Update of /local/src/CVS/nickle
In directory home.keithp.com:/tmp/cvs-serv16322
Modified Files:
ChangeLog compile.c type.c value.h
Log Message:
2004-05-26 Keith Packard <keithp at keithp.com>
version 2.36
* compile.c: (CompileDimensionStorage), (CompileArrayDimValue):
* type.c: (TypeArrayMark):
* value.h:
Distinguish between array types of static variables and
initializers within static scope -- dimension storage is different.
* debian/changelog:
update to version 2.36
Index: ChangeLog
===================================================================
RCS file: /local/src/CVS/nickle/ChangeLog,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- a/ChangeLog 26 May 2004 08:11:10 -0000 1.55
+++ b/ChangeLog 26 May 2004 08:59:23 -0000 1.56
@@ -1,4 +1,16 @@
2004-05-26 Keith Packard <keithp at keithp.com>
+version 2.36
+
+ * compile.c: (CompileDimensionStorage), (CompileArrayDimValue):
+ * type.c: (TypeArrayMark):
+ * value.h:
+ Distinguish between array types of static variables and
+ initializers within static scope -- dimension storage is different.
+
+ * debian/changelog:
+ update to version 2.36
+
+2004-05-26 Keith Packard <keithp at keithp.com>
version 2.35
* examples/menace2.5c:
Index: compile.c
===================================================================
RCS file: /local/src/CVS/nickle/compile.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -d -r1.153 -r1.154
--- a/compile.c 26 May 2004 08:01:41 -0000 1.153
+++ b/compile.c 26 May 2004 08:59:23 -0000 1.154
@@ -302,7 +302,7 @@
type->array.u.global = NewBox (True, False, 1, typeArrayInt);
break;
case class_static:
- type->array.storage = DimStorageLocal;
+ type->array.storage = DimStorageStatic;
type->array.u.frame.element = AddBoxType (&code->func.statics,
typeArrayInt);
type->array.u.frame.staticScope = True;
@@ -310,7 +310,7 @@
break;
case class_arg:
case class_auto:
- type->array.storage = DimStorageLocal;
+ type->array.storage = DimStorageAuto;
type->array.u.frame.element = AddBoxType (&CodeBody (code)->dynamics,
typeArrayInt);
type->array.u.frame.staticScope = code->func.inStaticInit;
@@ -3842,14 +3842,19 @@
BuildInst (obj, OpGlobal, inst, stat);
inst->box.box = type->array.u.global;
break;
- case DimStorageLocal:
+ case DimStorageStatic:
+ case DimStorageAuto:
d = 0;
for (c = code; c && c != type->array.u.frame.code; c = c->base.previous)
d++;
- /*
- * non-global array dimensions are always local
- */
- BuildInst (obj, OpLocal, inst, stat);
+ if (type->array.storage == DimStorageStatic)
+ {
+ BuildInst (obj, OpStatic, inst, stat);
+ }
+ else
+ {
+ BuildInst (obj, OpLocal, inst, stat);
+ }
inst->frame.staticLink = d;
inst->frame.element = type->array.u.frame.element;
break;
Index: type.c
===================================================================
RCS file: /local/src/CVS/nickle/type.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- a/type.c 16 Apr 2004 05:26:45 -0000 1.62
+++ b/type.c 26 May 2004 08:59:23 -0000 1.63
@@ -69,7 +69,8 @@
case DimStorageGlobal:
MemReference (ta->u.global);
break;
- case DimStorageLocal:
+ case DimStorageStatic:
+ case DimStorageAuto:
MemReference (ta->u.frame.code);
break;
}
Index: value.h
===================================================================
RCS file: /local/src/CVS/nickle/value.h,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- a/value.h 16 Apr 2004 21:41:52 -0000 1.102
+++ b/value.h 26 May 2004 08:59:23 -0000 1.103
@@ -386,7 +386,7 @@
} TypeFunc;
typedef enum _dimStorage {
- DimStorageNone, DimStorageGlobal, DimStorageLocal
+ DimStorageNone, DimStorageGlobal, DimStorageStatic, DimStorageAuto
} DimStorage;
typedef struct _typeArray {
More information about the Commit
mailing list