swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] Problems with GCC 4


From: Paul Johnson
Subject: Re: [Swarm-Support] Problems with GCC 4
Date: Fri, 13 Jan 2006 14:17:53 -0600
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)

I did make quite a few changes in CVS to solve the worst of these warnings. I'm attaching the patches against Swarm-2, just incase you want to try them. Mostly, you will see that the goal is to make method declarations COMPLETELY IDENTICAL across files & classes. So if one class has a protocol specific cast on an input variable like (id <Grid2d>) then every other class that implements that method has to have that same detail, and you get the warning if you have (id) or (id <otherProtocol>).

I fixed most of the most bothersome ones, but did not get all of them because you only find about them by testing and reading the warnings. The generators are relatively abundant in these little wrinkles. That's why you see those warnings.

However, some you have to fix some things in your model. For example, where you have

- activateIn:

it is now necessary to make your code match the library

- (id <Activity>)activateIn: swarmContext

Now, here is the part where I THINK we agreed GCC is giving mistaken warnings. In inheritance of protocols, you get messages that warn that you in a way that clearly indicates GCC is incorrect. I mean, GCC is not finding the methods in ancestors of protocols

For example, a warning like this:

Output.m:150: warning: ‘EZGraph’ may not respond to ‘+createBegin:’

As far as I can understand the Swarm library, EZGraph does have access to +createBegin, but it is inherited.

If I declare:

id <EZGraph> policyGraph;

GCC ought to look in all protocols that EZGraph adopts for methods, but the compiler warnings indicate that it does not. It just looks in the immediate protocol.

Marcus: If you think this is a mistake and that these warnings can be silenced, then please tell me how and I'll do the work of fixing Swarm in CVS. I believe the NAs you are getting in your loader code are separate. I think those reflect C mistkes, probably subtle ones, that the "improvements" in GCC are just now exposing.

pj

Steve Railsback wrote:


Hi --

I know some other people have been having issues with GCC lately but I couldn't find an archived message that helped us.

Our sys admin just updated the SUSE machines to SUSE 10.0, which includes GCC 4.0.2. This version of GCC is causing us problems. It created a lot of scary warnings in compiling Swarm, but it did compile.

Then we had to make some changes in our Swarm model code to get it to compile. E.g., we had to move some import/include statements around (from the .m to the .h files).

We are still getting bizarre warnings; I include some examples below.

And we're finding that parameters we load using ObjectLoader are not all being read correctly- some are given absurd values or NaN.

Can anyone explain what's going on and/or suggest a solution?
(We tried compiling GCC 3.3.1 to revert to it and that failed for reasons we couldn't figure out.)

Thanks,

Steve Railsback & Steve Jackson


Example compiler warnings:

Trout.m: In function ‘-[Trout createEnd]’:
Trout.m:131: warning: ‘UniformDoubleDist’ may not respond to ‘+create:setGenerator:setDoubleMin:setMax:’
Trout.m:131: warning: (Messages without a matching method signature
Trout.m:131: warning: will be assumed to return ‘id’ and accept
Trout.m:131: warning: ‘...’ as arguments.)

Cell.m: In function ‘-[Cell initializeSurvProb]’:
Cell.m:1427: warning: ‘SurvMGR’ may not respond to ‘+createBegin:withHabitatObject:’
Cell.m:1427: warning: (Messages without a matching method signature
Cell.m:1427: warning: will be assumed to return ‘id’ and accept
Cell.m:1427: warning: ‘...’ as arguments.)
Cell.m:1641: warning: ‘SurvMGR’ may not respond to ‘+createBegin:withHabitatObject:’

TroutModelSwarm.m:1196: warning: multiple methods named ‘-activateIn:’ found /usr/local/include/activity.h:565: warning: using ‘-(id <Activity>)activateIn:(id)swarmContext’ /usr/local/include/objectbase/Swarm.h:30: warning: also found ‘-(id)activateIn:(id)swarmContext’ TroutModelSwarm.m:1197: warning: multiple methods named ‘-activateIn:’ found /usr/local/include/activity.h:565: warning: using ‘-(id <Activity>)activateIn:(id)swarmContext’ /usr/local/include/objectbase/Swarm.h:30: warning: also found ‘-(id)activateIn:(id)swarmContext’



diff -rc swarm-2.2-orig/src/activity/activity.h 
swarm-2.2/src/activity/activity.h
*** swarm-2.2-orig/src/activity/activity.h      2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/activity/activity.h   2005-01-21 17:47:45.000000000 -0600
***************
*** 199,205 ****
  - getControllingActivity;
  
  //M: Return top of activity tree running the local activity.
! - getTopLevelActivity;
  
  //M: Return most immediately containing Swarm activity.
  - getSwarmActivity;
--- 199,205 ----
  - getControllingActivity;
  
  //M: Return top of activity tree running the local activity.
! - (id <Activity>)getTopLevelActivity;
  
  //M: Return most immediately containing Swarm activity.
  - getSwarmActivity;
diff -rc swarm-2.2-orig/src/collections/Array.h 
swarm-2.2/src/collections/Array.h
*** swarm-2.2-orig/src/collections/Array.h      2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/collections/Array.h   2005-01-21 18:49:29.310200185 -0600
***************
*** 48,54 ****
  - atOffset: (unsigned)offset put: anObject;
  - getFirst;
  - getLast;
! - begin: aZone;
  - copy: aZone;
  - (void)describe: outputCharStream;
  - (void)mapAllocations: (mapalloc_t)mapalloc;
--- 48,54 ----
  - atOffset: (unsigned)offset put: anObject;
  - getFirst;
  - getLast;
! - (id <Index>)begin: (id <Zone>)aZone;
  - copy: aZone;
  - (void)describe: outputCharStream;
  - (void)mapAllocations: (mapalloc_t)mapalloc;
***************
*** 56,65 ****
  - lispIn: expr;
  - hdf5InCreate: hdf5Obj;
  - hdf5In: hdf5Obj;
! - (void)lispOutShallow: stream;
! - (void)lispOutDeep: stream;
! - (void)hdf5OutShallow: hdf5Obj;
! - (void)hdf5OutDeep: hdf5Obj;
  
  @end
  
--- 56,65 ----
  - lispIn: expr;
  - hdf5InCreate: hdf5Obj;
  - hdf5In: hdf5Obj;
! - (void)lispOutShallow: (id <OutputStream>)stream;
! - (void)lispOutDeep: (id <OutputStream>)stream;
! - (void)hdf5OutShallow: (id <HDF5>)hdf5Obj;
! - (void)hdf5OutDeep: (id <HDF5>)hdf5Obj;
  
  @end
  
diff -rc swarm-2.2-orig/src/collections/Array.m 
swarm-2.2/src/collections/Array.m
*** swarm-2.2-orig/src/collections/Array.m      2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/collections/Array.m   2005-01-21 18:03:51.000000000 -0600
***************
*** 380,386 ****
    return block[count - 1];
  }
  
! - begin: aZone
  {
    ArrayIndex_c *newIndex;
  
--- 380,386 ----
    return block[count - 1];
  }
  
! - (id <Index>)begin: (id <Zone>)aZone
  {
    ArrayIndex_c *newIndex;
  
***************
*** 506,517 ****
    [outputCharStream catEndExpr];
  }
  
! - (void)lispOutDeep: stream
  {
    [self _lispOut_: stream deep: YES];
  }
  
! - (void)lispOutShallow: stream
  {
    [self _lispOut_: stream deep: NO];
  }
--- 506,517 ----
    [outputCharStream catEndExpr];
  }
  
! - (void)lispOutDeep: (id <OutputStream>)stream
  {
    [self _lispOut_: stream deep: YES];
  }
  
! - (void)lispOutShallow: (id <OutputStream>)stream
  {
    [self _lispOut_: stream deep: NO];
  }
diff -rc swarm-2.2-orig/src/collections/Collection.h 
swarm-2.2/src/collections/Collection.h
*** swarm-2.2-orig/src/collections/Collection.h 2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/collections/Collection.h      2005-01-21 19:06:53.237861523 
-0600
***************
*** 48,54 ****
  - (void)setIndexFromMemberLoc: (int)byteOffset;
  - (BOOL)getReplaceOnly;
  - (int)getIndexFromMemberLoc;
! - beginPermuted: aZone;
  - (unsigned)getCount;
  - atOffset: (unsigned)offset;
  - atOffset: (unsigned)offset put: anObject;
--- 48,54 ----
  - (void)setIndexFromMemberLoc: (int)byteOffset;
  - (BOOL)getReplaceOnly;
  - (int)getIndexFromMemberLoc;
! - (id <PermutedIndex>)beginPermuted: (id <Zone>)aZone;
  - (unsigned)getCount;
  - atOffset: (unsigned)offset;
  - atOffset: (unsigned)offset put: anObject;
***************
*** 69,75 ****
  - _lispOutAttr_: stream;
  - (BOOL)_lispInAttr_: index;
  - copy: aZone;
! - begin: aZone;
  @end
  
  @interface Index_any: Object_s <Index>
--- 69,75 ----
  - _lispOutAttr_: stream;
  - (BOOL)_lispInAttr_: index;
  - copy: aZone;
! - (id <Index>)begin: (id <Zone>)aZone;
  @end
  
  @interface Index_any: Object_s <Index>
***************
*** 99,105 ****
    BOOL nextFlag;
  }
  + createBegin: aZone;
! - setCollection: collection;
  - setUniformRandom: rnd;
  - createEnd;
  - reshuffle;
--- 99,105 ----
    BOOL nextFlag;
  }
  + createBegin: aZone;
! - setCollection: (id <Collection>)aCollection;
  - setUniformRandom: rnd;
  - createEnd;
  - reshuffle;
diff -rc swarm-2.2-orig/src/collections/Collection.m 
swarm-2.2/src/collections/Collection.m
*** swarm-2.2-orig/src/collections/Collection.m 2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/collections/Collection.m      2005-01-21 19:06:34.062760188 
-0600
***************
*** 76,82 ****
  
  PHASE(Using)
  
! - begin: aZone
  {
    raiseEvent (SubclassMustImplement, "begin: not implemented");
    return nil;
--- 76,82 ----
  
  PHASE(Using)
  
! - (id <Index>)begin: (id <Zone>)aZone
  {
    raiseEvent (SubclassMustImplement, "begin: not implemented");
    return nil;
***************
*** 99,105 ****
      getField (bits, IndexFromMemberLoc_Shift, IndexFromMemberLoc_Mask) - 2044;
  }
  
! - beginPermuted: aZone
  {
    return [[[PermutedIndex_c createBegin: aZone]
            setCollection: self] createEnd];
--- 99,105 ----
      getField (bits, IndexFromMemberLoc_Shift, IndexFromMemberLoc_Mask) - 2044;
  }
  
! - (id <PermutedIndex>)beginPermuted: (id <Zone>)aZone
  {
    return [[[PermutedIndex_c createBegin: aZone]
            setCollection: self] createEnd];
***************
*** 437,443 ****
    return obj;
  }
  
! - setCollection: aCollection
  {
    [(id <Permutation>) collection setCollection: aCollection];
    return self;
--- 437,443 ----
    return obj;
  }
  
! - setCollection: (id <Collection>)aCollection
  {
    [(id <Permutation>) collection setCollection: aCollection];
    return self;
diff -rc swarm-2.2-orig/src/collections/collections.h 
swarm-2.2/src/collections/collections.h
*** swarm-2.2-orig/src/collections/collections.h        2005-01-21 
17:44:11.000000000 -0600
--- swarm-2.2/src/collections/collections.h     2005-01-21 19:38:33.208051008 
-0600
***************
*** 357,363 ****
  USING
  - reshuffle;
  @end;
! 
  @protocol Collection <Create, SetInitialValue, Copy, Drop, Offsets, ForEach>
  //S: A generic collection interface.
  
--- 357,363 ----
  USING
  - reshuffle;
  @end;
! 
  @protocol Collection <Create, SetInitialValue, Copy, Drop, Offsets, ForEach>
  //S: A generic collection interface.
  
***************
*** 1227,1233 ****
  //D: of contents of Permutation will not reflect on the original collection.
  
  CREATING
! - setCollection: (id <Collection>)collection;
  - setLastPermutation: (id <Permutation>)permutation;
  - setUniformRandom: rnd;
  @end
--- 1227,1233 ----
  //D: of contents of Permutation will not reflect on the original collection.
  
  CREATING
! - setCollection: (id <Collection>)aCollection;
  - setLastPermutation: (id <Permutation>)permutation;
  - setUniformRandom: rnd;
  @end
Only in swarm-2.2/src/collections: collections.h~
diff -rc swarm-2.2-orig/src/collections/List_GEN.h 
swarm-2.2/src/collections/List_GEN.h
*** swarm-2.2-orig/src/collections/List_GEN.h   2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/collections/List_GEN.h        2005-01-21 19:48:23.543421441 
-0600
***************
*** 59,65 ****
  - (void)addLast: anObject;
  - removeFirst;
  - removeLast;
! - (id <ListIndex>)begin: aZone;
  - (id <ListIndex>)listBegin: (id <Zone>)aZone;
  - _createIndex_: aZone forIndexSubclass: anIndexSubclass;
  - _createPermutedIndex_: aZone forIndexSubclass: anIndexSubclass;
--- 59,65 ----
  - (void)addLast: anObject;
  - removeFirst;
  - removeLast;
! - (id <ListIndex>)begin: (id <Zone>)aZone;
  - (id <ListIndex>)listBegin: (id <Zone>)aZone;
  - _createIndex_: aZone forIndexSubclass: anIndexSubclass;
  - _createPermutedIndex_: aZone forIndexSubclass: anIndexSubclass;
diff -rc swarm-2.2-orig/src/collections/List_GEN.m 
swarm-2.2/src/collections/List_GEN.m
*** swarm-2.2-orig/src/collections/List_GEN.m   2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/collections/List_GEN.m        2005-01-21 19:48:36.199519980 
-0600
***************
*** 236,242 ****
      }
  }
  
! - (id <ListIndex>)begin: aZone
  {
    TINDEX *newIndex;
  
--- 236,242 ----
      }
  }
  
! - (id <ListIndex>)begin: (id <Zone>)aZone
  {
    TINDEX *newIndex;
  
diff -rc swarm-2.2-orig/src/collections/List.h swarm-2.2/src/collections/List.h
*** swarm-2.2-orig/src/collections/List.h       2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/collections/List.h    2005-01-21 18:50:22.788366932 -0600
***************
*** 53,62 ****
  - lispIn: expr;
  - hdf5InCreate: hdf5Obj;
  - hdf5In: hdf5Obj;
! - (void)lispOutShallow: stream;
! - (void)lispOutDeep: stream;
! - (void)hdf5OutShallow: hdf5Obj;
! - (void)hdf5OutDeep: hdf5Obj;
  @end
  
  @interface ListIndex_any: Index_any
--- 53,62 ----
  - lispIn: expr;
  - hdf5InCreate: hdf5Obj;
  - hdf5In: hdf5Obj;
! - (void)lispOutShallow: (id <OutputStream>)stream;
! - (void)lispOutDeep: (id <OutputStream>)stream;
! - (void)hdf5OutShallow: (id <HDF5>)hdf5Obj;
! - (void)hdf5OutDeep: (id <HDF5>)hdf5Obj;
  @end
  
  @interface ListIndex_any: Index_any
diff -rc swarm-2.2-orig/src/collections/List_HDF5out.m 
swarm-2.2/src/collections/List_HDF5out.m
*** swarm-2.2-orig/src/collections/List_HDF5out.m       2005-01-21 
17:44:11.000000000 -0600
--- swarm-2.2/src/collections/List_HDF5out.m    2005-01-21 18:51:11.424238752 
-0600
***************
*** 1,4 ****
! - (void)hdf5OutDeep: hdf5Obj
  {
    id <Index> li = [self begin: getCZone (getZone (self))];
    id member;
--- 1,4 ----
! - (void)hdf5OutDeep: (id <HDF5>)hdf5Obj
  {
    id <Index> li = [self begin: getCZone (getZone (self))];
    id member;
***************
*** 29,35 ****
    [li drop];
  }
  
! - (void)hdf5OutShallow: hdf5Obj
  {
    if (![self allSameClass])
      raiseEvent (SaveError,
--- 29,35 ----
    [li drop];
  }
  
! - (void)hdf5OutShallow: (id <HDF5>)hdf5Obj
  {
    if (![self allSameClass])
      raiseEvent (SaveError,
diff -rc swarm-2.2-orig/src/collections/Map.h swarm-2.2/src/collections/Map.h
*** swarm-2.2-orig/src/collections/Map.h        2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/collections/Map.h     2005-01-21 19:47:38.072253135 -0600
***************
*** 60,66 ****
  - (void)forEachKey: (SEL)aSelector : arg1;
  - (void)forEachKey: (SEL)aSelector : arg1 : arg2;
  - (void)forEachKey: (SEL)aSelector : arg1 : arg2 : arg3;
! - (id <MapIndex>)begin: aZone;
  - (id <MapIndex>)mapBegin: (id <Zone>)aZone;
  - _createIndex_: aZone forIndexSubclass: anIndexSubclass;
  - _createPermutedIndex_: aZone forIndexSubclass: anIndexSubclass;
--- 60,66 ----
  - (void)forEachKey: (SEL)aSelector : arg1;
  - (void)forEachKey: (SEL)aSelector : arg1 : arg2;
  - (void)forEachKey: (SEL)aSelector : arg1 : arg2 : arg3;
! - (id <MapIndex>)begin: (id <Zone>)aZone;
  - (id <MapIndex>)mapBegin: (id <Zone>)aZone;
  - _createIndex_: aZone forIndexSubclass: anIndexSubclass;
  - _createPermutedIndex_: aZone forIndexSubclass: anIndexSubclass;
***************
*** 73,80 ****
  - (void)lispOutDeep: stream;
  - hdf5InCreate: hdf5Obj;
  - hdf5In: hdf5Obj;
! - (void)hdf5OutShallow: hdf5Obj;
! - (void)hdf5OutDeep: hdf5Obj;
  @end
  
  @interface MapIndex_c: Index_any <MapIndex>
--- 73,80 ----
  - (void)lispOutDeep: stream;
  - hdf5InCreate: hdf5Obj;
  - hdf5In: hdf5Obj;
! - (void)hdf5OutShallow: (id <HDF5>)hdf5Obj;
! - (void)hdf5OutDeep: (id <HDF5>)hdf5Obj;
  @end
  
  @interface MapIndex_c: Index_any <MapIndex>
diff -rc swarm-2.2-orig/src/collections/Map.m swarm-2.2/src/collections/Map.m
*** swarm-2.2-orig/src/collections/Map.m        2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/collections/Map.m     2005-01-21 19:51:49.682452044 -0600
***************
*** 642,648 ****
    [index drop];
  }
  
! - (id <MapIndex>)begin: aZone
  {
    MapIndex_c *newIndex;
    
--- 642,648 ----
    [index drop];
  }
  
! - (id <MapIndex>)begin: (id <Zone>)aZone
  {
    MapIndex_c *newIndex;
    
***************
*** 875,881 ****
      [hdf5Obj storeAttribute: COMPARE_FUNCTION value: COMPARE_CSTRING];
  }
  
! - (void)hdf5OutDeep: hdf5Obj 
  {
    id aZone = getZone (self);
    id key, value;
--- 875,881 ----
      [hdf5Obj storeAttribute: COMPARE_FUNCTION value: COMPARE_CSTRING];
  }
  
! - (void)hdf5OutDeep: (id <HDF5>)hdf5Obj 
  {
    id aZone = getZone (self);
    id key, value;
***************
*** 993,999 ****
      }
  }
    
! - (void)hdf5OutShallow: hdf5Obj
  {
    if (![self allSameClass])
      raiseEvent (SaveError,
--- 993,999 ----
      }
  }
    
! - (void)hdf5OutShallow: (id <HDF5>)hdf5Obj
  {
    if (![self allSameClass])
      raiseEvent (SaveError,
diff -rc swarm-2.2-orig/src/collections/Set.h swarm-2.2/src/collections/Set.h
*** swarm-2.2-orig/src/collections/Set.h        2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/collections/Set.h     2005-01-21 19:50:00.504854104 -0600
***************
*** 47,53 ****
  - (void)forEachKey: (SEL)aSelector : arg1;
  - (void)forEachKey: (SEL)aSelector : arg1 : arg2;
  - (void)forEachKey: (SEL)aSelector : arg1 : arg2 : arg3;
! - begin: aZone;
  - createIndex: aZone fromMember: anObject;
  - (void)mapAllocations: (mapalloc_t)mapalloc;
  @end
--- 47,53 ----
  - (void)forEachKey: (SEL)aSelector : arg1;
  - (void)forEachKey: (SEL)aSelector : arg1 : arg2;
  - (void)forEachKey: (SEL)aSelector : arg1 : arg2 : arg3;
! - (id <Index>)begin: (id <Zone>)aZone;
  - createIndex: aZone fromMember: anObject;
  - (void)mapAllocations: (mapalloc_t)mapalloc;
  @end
diff -rc swarm-2.2-orig/src/collections/Set.m swarm-2.2/src/collections/Set.m
*** swarm-2.2-orig/src/collections/Set.m        2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/collections/Set.m     2005-01-21 19:50:33.388913767 -0600
***************
*** 147,153 ****
    [self forEach: (SEL)aSelector: arg1 : arg2];
  }
  
! - begin: aZone
  {
    SetIndex_c *newIndex;
  
--- 147,153 ----
    [self forEach: (SEL)aSelector: arg1 : arg2];
  }
  
! - (id <Index>)begin: (id <Zone>)aZone
  {
    SetIndex_c *newIndex;
  
diff -rc swarm-2.2-orig/src/collections/StringObject.h 
swarm-2.2/src/collections/StringObject.h
*** swarm-2.2-orig/src/collections/StringObject.h       2005-01-21 
17:44:11.000000000 -0600
--- swarm-2.2/src/collections/StringObject.h    2005-01-21 19:23:18.636313194 
-0600
***************
*** 37,43 ****
  + createBegin: aZone;
  - createEnd;
  + create: aZone;
! + create: aZone setC: (const char *)cstring;
  - setLiteralFlag: (BOOL)literalFlag;
  - (void)setC: (const char *)cstring;
  - copy: aZone;
--- 37,43 ----
  + createBegin: aZone;
  - createEnd;
  + create: aZone;
! + create: (id <Zone>)aZone setC: (const char *)cstring;
  - setLiteralFlag: (BOOL)literalFlag;
  - (void)setC: (const char *)cstring;
  - copy: aZone;
***************
*** 50,58 ****
  - (BOOL)getLiteralFlag;
  - lispIn: expr;
  - hdf5In: hdf5Obj;
! - (void)lispOutShallow: stream;
! - (void)lispOutDeep: stream;
! - (void)hdf5OutShallow: hdf5Obj;
  - (void)describe: outputCharStream;
  - (void)mapAllocations: (mapalloc_t)mapalloc;
  @end
--- 50,58 ----
  - (BOOL)getLiteralFlag;
  - lispIn: expr;
  - hdf5In: hdf5Obj;
! - (void)lispOutShallow: (id <OutputStream>)stream;
! - (void)lispOutDeep: (id <OutputStream>)stream;
! - (void)hdf5OutShallow: (id <HDF5>)hdf5Obj;
  - (void)describe: outputCharStream;
  - (void)mapAllocations: (mapalloc_t)mapalloc;
  @end
diff -rc swarm-2.2-orig/src/collections/StringObject.m 
swarm-2.2/src/collections/StringObject.m
*** swarm-2.2-orig/src/collections/StringObject.m       2005-01-21 
17:44:11.000000000 -0600
--- swarm-2.2/src/collections/StringObject.m    2005-01-21 19:23:36.536626360 
-0600
***************
*** 66,72 ****
    return newString;
  }
  
! + create: aZone setC: (const char *)cstring
  {
    String_c *newString;
  
--- 66,72 ----
    return newString;
  }
  
! + create: (id <Zone>)aZone setC: (const char *)cstring
  {
    String_c *newString;
  
***************
*** 198,204 ****
    return self;
  }
  
! - (void)lispOutShallow: stream
  {
    if (literalFlag)
      [stream catString: string];
--- 198,204 ----
    return self;
  }
  
! - (void)lispOutShallow: (id <OutputStream>)stream
  {
    if (literalFlag)
      [stream catString: string];
***************
*** 212,218 ****
      }
  }
  
! - (void)lispOutDeep: stream
  {
    [self lispOutShallow: stream];
  }
--- 212,218 ----
      }
  }
  
! - (void)lispOutDeep: (id <OutputStream>)stream
  {
    [self lispOutShallow: stream];
  }
***************
*** 224,230 ****
    return self;
  }
  
! - (void)hdf5OutShallow: hdf5Obj
  {
    [hdf5Obj storeAsDataset: [hdf5Obj getHDF5Name]
             typeName: [self getTypeName]
--- 224,230 ----
    return self;
  }
  
! - (void)hdf5OutShallow: (id <HDF5>)hdf5Obj
  {
    [hdf5Obj storeAsDataset: [hdf5Obj getHDF5Name]
             typeName: [self getTypeName]
diff -rc swarm-2.2-orig/src/objectbase/Swarm.h swarm-2.2/src/objectbase/Swarm.h
*** swarm-2.2-orig/src/objectbase/Swarm.h       2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/objectbase/Swarm.h    2005-01-21 17:45:48.000000000 -0600
***************
*** 27,33 ****
  // Override these methods to make useful Swarm subclasses.
  - buildObjects;
  - buildActions;
! - activateIn: swarmContext;
  // You may also want to override createBegin and createEnd.
  
  // These methods are copied over from SwarmObject - probe support.
--- 27,33 ----
  // Override these methods to make useful Swarm subclasses.
  - buildObjects;
  - buildActions;
! - (id <Activity>)activateIn: swarmContext;
  // You may also want to override createBegin and createEnd.
  
  // These methods are copied over from SwarmObject - probe support.
diff -rc swarm-2.2-orig/src/objectbase/Swarm.m swarm-2.2/src/objectbase/Swarm.m
*** swarm-2.2-orig/src/objectbase/Swarm.m       2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/objectbase/Swarm.m    2005-01-21 17:51:40.000000000 -0600
***************
*** 44,50 ****
  //   [super activateIn: swarmContext];
  //   [myFancySchedule activateIn: self];
  //   return [self getSwarmActivity];
! - activateIn:  swarmContext
  {
    [super activateIn: swarmContext];
    return [self getSwarmActivity];
--- 44,50 ----
  //   [super activateIn: swarmContext];
  //   [myFancySchedule activateIn: self];
  //   return [self getSwarmActivity];
! - (id <Activity>)activateIn:  swarmContext
  {
    [super activateIn: swarmContext];
    return [self getSwarmActivity];
diff -rc swarm-2.2-orig/src/space/Discrete2d.h swarm-2.2/src/space/Discrete2d.h
*** swarm-2.2-orig/src/space/Discrete2d.h       2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/space/Discrete2d.h    2005-01-21 18:11:58.000000000 -0600
***************
*** 36,42 ****
    long *offsets;
  }
  
! + create: aZone setSizeX: (unsigned)x Y: (unsigned)y;
  - setSizeX: (unsigned)x Y: (unsigned)y;
  - createEnd;
  - makeOffsets;
--- 36,42 ----
    long *offsets;
  }
  
! + create: (id <Zone>)aZone setSizeX: (unsigned)x Y: (unsigned)y;
  - setSizeX: (unsigned)x Y: (unsigned)y;
  - createEnd;
  - makeOffsets;
***************
*** 69,76 ****
  - hdf5InCreate: hdf5Obj;
  - hdf5In: hdf5Obj;
  - (void)hdf5OutShallow: hdf5Obj;
! - (void)hdf5OutDeep: hdf5Obj;
! - (void)lispOutShallow: stream;
  - (void)lispOutDeep: stream;
  @end
  
--- 69,76 ----
  - hdf5InCreate: hdf5Obj;
  - hdf5In: hdf5Obj;
  - (void)hdf5OutShallow: hdf5Obj;
! - (void)hdf5OutDeep: (id <OutputStream>)hdf5Obj;
! - (void)lispOutShallow: (id <OutputStream>)stream;
  - (void)lispOutDeep: stream;
  @end
  
diff -rc swarm-2.2-orig/src/space/Discrete2d.m swarm-2.2/src/space/Discrete2d.m
*** swarm-2.2-orig/src/space/Discrete2d.m       2005-01-21 17:44:11.000000000 
-0600
--- swarm-2.2/src/space/Discrete2d.m    2005-01-21 18:11:26.000000000 -0600
***************
*** 35,41 ****
  
  PHASE(Creating)
  
! + create: aZone setSizeX: (unsigned)x Y: (unsigned)y
  {
    Discrete2d *obj = [self createBegin: aZone];
    obj->xsize = x;
--- 35,41 ----
  
  PHASE(Creating)
  
! + create: (id <Zone>)aZone setSizeX: (unsigned)x Y: (unsigned)y
  {
    Discrete2d *obj = [self createBegin: aZone];
    obj->xsize = x;
***************
*** 480,486 ****
    [stream catEndParse];
  }
  
! - (void)lispOutShallow: stream
  {
    [stream catStartMakeInstance: [self getTypeName]];
    [self lispOutVars: stream deep: NO];
--- 480,486 ----
    [stream catEndParse];
  }
  
! - (void)lispOutShallow: (id <OutputStream>)stream
  {
    [stream catStartMakeInstance: [self getTypeName]];
    [self lispOutVars: stream deep: NO];
diff -rc swarm-2.2-orig/src/activity/activity.h 
swarm-2.2/src/activity/activity.h
*** swarm-2.2-orig/src/activity/activity.h      2005-03-13 10:38:15.830355928 
-0600
--- swarm-2.2/src/activity/activity.h   2005-03-13 10:49:08.123481473 -0600
***************
*** 205,211 ****
  - getSwarmActivity;
  
  //M: Return most immediately containing Schedule activity.
! - getScheduleActivity;
  
  //M: Set serial execution mode.
  - setSerialMode: (BOOL)serialMode;
--- 205,211 ----
  - getSwarmActivity;
  
  //M: Return most immediately containing Schedule activity.
! - (id <Activity>)getScheduleActivity;
  
  //M: Set serial execution mode.
  - setSerialMode: (BOOL)serialMode;
diff -rc swarm-2.2-orig/src/activity/XActivity.h 
swarm-2.2/src/activity/XActivity.h
*** swarm-2.2-orig/src/activity/XActivity.h     2005-03-13 10:38:15.839354633 
-0600
--- swarm-2.2/src/activity/XActivity.h  2005-03-13 10:49:34.511684340 -0600
***************
*** 64,70 ****
  - (id <Activity>)getControllingActivity;
  - (id <Activity>)getTopLevelActivity;
  - (id <SwarmActivity>)getSwarmActivity;
! - (id <ScheduleActivity>)getScheduleActivity;
  - getSubactivities;
  - (void)setSerialMode: (BOOL)serialMode;
  - (BOOL)getSerialMode;
--- 64,70 ----
  - (id <Activity>)getControllingActivity;
  - (id <Activity>)getTopLevelActivity;
  - (id <SwarmActivity>)getSwarmActivity;
! - (id <Activity>)getScheduleActivity;
  - getSubactivities;
  - (void)setSerialMode: (BOOL)serialMode;
  - (BOOL)getSerialMode;
diff -rc swarm-2.2-orig/src/activity/XActivity.m 
swarm-2.2/src/activity/XActivity.m
*** swarm-2.2-orig/src/activity/XActivity.m     2005-03-13 10:38:15.840354489 
-0600
--- swarm-2.2/src/activity/XActivity.m  2005-03-13 10:49:52.756059086 -0600
***************
*** 587,593 ****
  //
  // getScheduleActivity -- return most immediately containing Schedule activity
  //
! - (id <ScheduleActivity>)getScheduleActivity
  {
    Activity_c  *activity;
  
--- 587,593 ----
  //
  // getScheduleActivity -- return most immediately containing Schedule activity
  //
! - (id <Activity>)getScheduleActivity
  {
    Activity_c  *activity;
  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]