swarm-support
[Top][All Lists]
Advanced

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

Re: What's all this about Swarm modifying the runtime?


From: Paul E Johnson
Subject: Re: What's all this about Swarm modifying the runtime?
Date: Mon, 30 Sep 2002 10:27:42 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020918

Perrone Alessandro wrote:
Hi

I don't even really know what "runtime" means, so take this with a grain of salt.


The Next-runtime has been coded in Assembler, so it is faster than the gnu-runtime. It is not compatible, due to the fact that it has been coded in a period in which there was not "love" between Apple (Next) and Gnu.

Does Swarm really use a different runtime?


Yes. I used, longitme ago, when the first versions of Unix-like were born on Macintosh platform (Machten ppc), to compile swarm, a version of objc modified from gcc (POC, portable objective-C compiler), and after a couple of weeks of hard work, with the help of the Poc-programmer, I had a minimal version of Swarm 1.4.1. I remember that the problems were in some objc-gnu code, that the POC programmer helped me to convert.

I mean, "does Swarm use a different runtime than the gnu objective-C runtime?" Since we get that from gcc, and gnustep also uses it, wouldn't that be the right path?

Bill and others have been writing as though Swarm hacks the gnu runtime, and since I don't understand really what a runtime is, I don't know if I understand that claim.

I attach to this message 3 patches which I think are needed if you want to compile Swarm from CVS (or 2002-05-14). These only work if you have the gcc snapshot 2002-09-09 (or newer, I guess). These are needed because gcc has better/stronger type checking and protocol checking.

Summary:

ObjectSaver.patch: declare + (void)_crash_: anObject in ObjectSaver.h

Customize.patch:  declare/implement "fake" method for createBegin.

Signs.patch: series of changes caused by compiler objecting against comparison of int and unsigned int.

I have not checked these into Swarm CVS, but will if development by the gcc team stabilized enough. The Customize.patch has this thing that is a "fake" method so the compiler does not complain that Customize can't find the factory method createBegin:

 + createBegin: aZone
 {
      [self subclassResponsibility: @selector(createBegin:)];
      return nil;
 }

I have not found any less intrusive way to make the error go away, but I'm glad to hear if you do. One of the experts in the gcc list who was making revisions in gcc in response to my difficulty suggested I create a category for that method, but I don't have enough documentation/examples to know what that would entail. So I did the thing I could understand.

pj


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700
diff -rc swarm-2.1.140.20020514/src/simtools/ObjectSaver.h 
swarm-2.1.140.20020514-fixed/src/simtools/ObjectSaver.h
*** swarm-2.1.140.20020514/src/simtools/ObjectSaver.h   Sun Apr 14 06:09:44 2002
--- swarm-2.1.140.20020514-fixed/src/simtools/ObjectSaver.h     Tue Sep  3 
16:00:03 2002
***************
*** 36,41 ****
--- 36,43 ----
  - setTemplateProbeMap: (id <ProbeMap>)aProbeMap;
  - saveObject: anObject;
  
+ + (void)_crash_: anObject;
+ 
  - (void)_crash_: anObject;
  
  @end

diff -rc swarm-2.1.140.20020514/src/defobj/Customize.h 
swarm-2.1.140.20020514-fixed/src/defobj/Customize.h
*** swarm-2.1.140.20020514/src/defobj/Customize.h       Sun Apr 14 05:02:59 2002
--- swarm-2.1.140.20020514-fixed/src/defobj/Customize.h Tue Sep  3 15:33:50 2002
***************
*** 41,46 ****
--- 41,47 ----
  // Customize_s -- superclass impleemntation of create-phase customization
  //
  @interface Customize_s: Object_s
+ + createBegin: aZone;
  /*** methods in Customize_s (inserted from .m file by m2h) ***/
  + customizeBegin: aZone;
  - customizeEnd;
Only in swarm-2.1.140.20020514-fixed/src/defobj: Customize.h~
diff -rc swarm-2.1.140.20020514/src/defobj/Customize.m 
swarm-2.1.140.20020514-fixed/src/defobj/Customize.m
*** swarm-2.1.140.20020514/src/defobj/Customize.m       Sun Apr 14 05:02:59 2002
--- swarm-2.1.140.20020514-fixed/src/defobj/Customize.m Tue Sep  3 15:35:57 2002
***************
*** 94,99 ****
--- 94,107 ----
  
  PHASE(Creating)
  
+ 
+ + createBegin: aZone
+ {
+      [self subclassResponsibility: @selector(createBegin:)];
+      return nil; 
+ }
+ 
+ 
  //
  // customizeBegin: -- begin customization to define future create
  //

diff -rc swarm-2.1.140.20020514/libobjc/ChangeLog 
swarm-2.1.140.20020514-fixed/libobjc/ChangeLog
*** swarm-2.1.140.20020514/libobjc/ChangeLog    Tue Nov  6 01:43:55 2001
--- swarm-2.1.140.20020514-fixed/libobjc/ChangeLog      Fri Sep 13 16:32:27 2002
***************
*** 1,3 ****
--- 1,8 ----
+ 2002-09-13    <address@hidden>
+ 
+       * mframe.m (mframe_next_arg): max_size and max_align should be unsigned.
+       (mframe_build_return_opts): retsize is now unsigned
+ 
  2001-11-05    <address@hidden>
  
        * Makefile.am: Don't use libgcc -L. 
Only in swarm-2.1.140.20020514-fixed/libobjc: ChangeLog~
diff -rc swarm-2.1.140.20020514/libobjc/mframe.m 
swarm-2.1.140.20020514-fixed/libobjc/mframe.m
*** swarm-2.1.140.20020514/libobjc/mframe.m     Fri Jun 22 11:19:38 2001
--- swarm-2.1.140.20020514-fixed/libobjc/mframe.m       Fri Sep 13 16:32:30 2002
***************
*** 396,403 ****
  
        case _C_UNION_B:
        {
!         int   max_size = 0;
!         int   max_align = 0;
  
          /*
           *    Skip "<name>=" stuff.
--- 396,403 ----
  
        case _C_UNION_B:
        {
!         unsigned      max_size = 0;
!         unsigned      max_align = 0;
  
          /*
           *    Skip "<name>=" stuff.
***************
*** 1241,1247 ****
    /* A pointer to the memory that will hold the return value. */
    retval_t retframe = NULL;
    /* The size, in bytes, of memory pointed to by RETFRAME. */
!   int retsize;
    /* Which argument number are we processing now? */
    int argnum;
    /* Type qualifier flags; see <objc/objc-api.h>. */
--- 1241,1247 ----
    /* A pointer to the memory that will hold the return value. */
    retval_t retframe = NULL;
    /* The size, in bytes, of memory pointed to by RETFRAME. */
!   unsigned retsize;
    /* Which argument number are we processing now? */
    int argnum;
    /* Type qualifier flags; see <objc/objc-api.h>. */
Only in swarm-2.1.140.20020514-fixed/libobjc: mframe.m~
diff -rc swarm-2.1.140.20020514/src/analysis/ChangeLog 
swarm-2.1.140.20020514-fixed/src/analysis/ChangeLog
*** swarm-2.1.140.20020514/src/analysis/ChangeLog       Sun Apr 14 05:41:39 2002
--- swarm-2.1.140.20020514-fixed/src/analysis/ChangeLog Fri Sep 13 16:24:35 2002
***************
*** 1,3 ****
--- 1,10 ----
+ 2002-09-13    <address@hidden>
+ 
+       * EZBin.m ([EZBin -createEnd]): changed i to unsigned.
+       ([EZBin -reset]): ditto
+       ([EZBin -update]): ditto
+       ([EZBin -outputToFile]): ditto
+ 
  2002-04-14  Alex Lancaster  <address@hidden>
  
        * ActiveGraph.h, ActiveGraph.m, ActiveOutFile.h, ActiveOutFile.m,
Only in swarm-2.1.140.20020514-fixed/src/analysis: ChangeLog.rej
Only in swarm-2.1.140.20020514-fixed/src/analysis: ChangeLog~
diff -rc swarm-2.1.140.20020514/src/analysis/EZBin.m 
swarm-2.1.140.20020514-fixed/src/analysis/EZBin.m
*** swarm-2.1.140.20020514/src/analysis/EZBin.m Sun Apr 14 05:41:39 2002
--- swarm-2.1.140.20020514-fixed/src/analysis/EZBin.m   Fri Sep 13 16:24:35 2002
***************
*** 129,135 ****
  
  - createEnd
  {
!   int i;
    double step;
    
    if (collection == nil)
--- 129,135 ----
  
  - createEnd
  {
!   unsigned i;
    double step;
    
    if (collection == nil)
***************
*** 220,226 ****
  
  - (void)reset
  {
!   int i;
    
    count = 0;
    outliers = 0;
--- 220,226 ----
  
  - (void)reset
  {
!   unsigned i;
    
    count = 0;
    outliers = 0;
***************
*** 244,250 ****
        iter = [collection begin: getZone (self)];
        while ((obj = [iter next]))
          {
!           int i;
            double v = [mp doubleDynamicCallOn: obj];
            
            if (v > max || v < min)
--- 244,250 ----
        iter = [collection begin: getZone (self)];
        while ((obj = [iter next]))
          {
!           unsigned i;
            double v = [mp doubleDynamicCallOn: obj];
            
            if (v > max || v < min)
***************
*** 330,336 ****
  
  - (void)outputToFile 
  {
!   int i;
    
    if (fileOutput)
      {
--- 330,336 ----
  
  - (void)outputToFile 
  {
!   unsigned i;
    
    if (fileOutput)
      {
Only in swarm-2.1.140.20020514-fixed/src/analysis: EZBin.m~
diff -rc swarm-2.1.140.20020514/src/collections/Array.m 
swarm-2.1.140.20020514-fixed/src/collections/Array.m
*** swarm-2.1.140.20020514/src/collections/Array.m      Tue Apr 23 15:25:25 2002
--- swarm-2.1.140.20020514-fixed/src/collections/Array.m        Fri Sep 13 
16:24:35 2002
***************
*** 471,477 ****
  
  - (void)_lispOut_: outputCharStream deep: (BOOL)deepFlag
  {
!   int i;
    id member;
  
    [outputCharStream catStartMakeInstance: [self getTypeName]];
--- 471,477 ----
  
  - (void)_lispOut_: outputCharStream deep: (BOOL)deepFlag
  {
!   unsigned i;
    id member;
  
    [outputCharStream catStartMakeInstance: [self getTypeName]];
Only in swarm-2.1.140.20020514-fixed/src/collections: Array.m~
diff -rc swarm-2.1.140.20020514/src/collections/ChangeLog 
swarm-2.1.140.20020514-fixed/src/collections/ChangeLog
*** swarm-2.1.140.20020514/src/collections/ChangeLog    Tue May 14 17:43:46 2002
--- swarm-2.1.140.20020514-fixed/src/collections/ChangeLog      Fri Sep 13 
16:24:35 2002
***************
*** 1,3 ****
--- 1,7 ----
+ 2002-09-13    <address@hidden>
+ 
+       * Array.m ([Array_c -_lispOut_:deep:]): i must be unsigned
+ 
  2002-05-14  Marcus G. Daniels  <address@hidden>
  
        * collections.h (Array, List, Map): Adopt Serialization.
Only in swarm-2.1.140.20020514-fixed/src/collections: ChangeLog~
diff -rc swarm-2.1.140.20020514/src/defobj/Customize.m 
swarm-2.1.140.20020514-fixed/src/defobj/Customize.m
*** swarm-2.1.140.20020514/src/defobj/Customize.m       Fri Sep 13 16:34:47 2002
--- swarm-2.1.140.20020514-fixed/src/defobj/Customize.m Fri Sep 13 16:33:52 2002
***************
*** 97,104 ****
  
  + createBegin: aZone
  {
!      [self subclassResponsibility: @selector(createBegin:)];
!      return nil; 
  }
  
  
--- 97,103 ----
  
  + createBegin: aZone
  {
!   [self subclassResponsibility: @selector(createBegin:)];
!   return nil; 
  }
 
diff -rc swarm-2.1.140.20020514/src/objectbase/ChangeLog 
swarm-2.1.140.20020514-fixed/src/objectbase/ChangeLog
*** swarm-2.1.140.20020514/src/objectbase/ChangeLog     Sun Apr 14 05:50:49 2002
--- swarm-2.1.140.20020514-fixed/src/objectbase/ChangeLog       Fri Sep 13 
16:24:35 2002
***************
*** 1,3 ****
--- 1,9 ----
+ 2002-09-13    <address@hidden>
+ 
+       * VarProbe.m ([VarProbe -_setupObjcVarProbe_]): Change i from unsigned
+       to int to allow comparison without compiler warning.
+       * ProbeMap.m ([ProbeMap -addObjcFields:]): ditto.
+ 
  2002-04-14  Alex Lancaster  <address@hidden>
  
        * CompleteProbeMap.h, CompleteProbeMap.m, CompleteVarMap.h,
Only in swarm-2.1.140.20020514-fixed/src/objectbase: ChangeLog~
diff -rc swarm-2.1.140.20020514/src/objectbase/ProbeMap.m 
swarm-2.1.140.20020514-fixed/src/objectbase/ProbeMap.m
*** swarm-2.1.140.20020514/src/objectbase/ProbeMap.m    Sun Apr 14 05:50:49 2002
--- swarm-2.1.140.20020514-fixed/src/objectbase/ProbeMap.m      Fri Sep 13 
16:24:35 2002
***************
*** 402,408 ****
  
    if ((ivarList = aClass->ivars))
      {
!       unsigned i;
        
        for (i = 0; i < ivarList->ivar_count; i++)
            [self _addVarProbeForClass_: aClass
--- 402,408 ----
  
    if ((ivarList = aClass->ivars))
      {
!       int i;
        
        for (i = 0; i < ivarList->ivar_count; i++)
            [self _addVarProbeForClass_: aClass
Only in swarm-2.1.140.20020514-fixed/src/objectbase: ProbeMap.m~
diff -rc swarm-2.1.140.20020514/src/objectbase/VarProbe.m 
swarm-2.1.140.20020514-fixed/src/objectbase/VarProbe.m
*** swarm-2.1.140.20020514/src/objectbase/VarProbe.m    Sun Apr 14 05:50:48 2002
--- swarm-2.1.140.20020514-fixed/src/objectbase/VarProbe.m      Fri Sep 13 
16:24:35 2002
***************
*** 180,186 ****
  - _setupObjcVarProbe_
  {
    IvarList_t ivarList;
!   unsigned i;
    
    ivarList = probedClass->ivars;
    
--- 180,186 ----
  - _setupObjcVarProbe_
  {
    IvarList_t ivarList;
!   int i;
    
    ivarList = probedClass->ivars;
    
Only in swarm-2.1.140.20020514-fixed/src/objectbase: VarProbe.m~
diff -rc swarm-2.1.140.20020514/src/simtoolsgui/ChangeLog 
swarm-2.1.140.20020514-fixed/src/simtoolsgui/ChangeLog
*** swarm-2.1.140.20020514/src/simtoolsgui/ChangeLog    Sun Apr 14 06:13:20 2002
--- swarm-2.1.140.20020514-fixed/src/simtoolsgui/ChangeLog      Fri Sep 13 
16:24:35 2002
***************
*** 1,3 ****
--- 1,7 ----
+ 2002-09-13    <address@hidden>
+ 
+       * MessageProbeWidget.m ([MessageProbeWidget -drop]): changed i to int.
+ 
  2002-04-14  Alex Lancaster  <address@hidden>
  
        * ActionCache.h, ActionCache.m, ActionHolder.h, ActionHolder.m,
Only in swarm-2.1.140.20020514-fixed/src/simtoolsgui: ChangeLog~
diff -rc swarm-2.1.140.20020514/src/simtoolsgui/MessageProbeWidget.m 
swarm-2.1.140.20020514-fixed/src/simtoolsgui/MessageProbeWidget.m
*** swarm-2.1.140.20020514/src/simtoolsgui/MessageProbeWidget.m Sun Apr 14 
06:13:20 2002
--- swarm-2.1.140.20020514-fixed/src/simtoolsgui/MessageProbeWidget.m   Fri Sep 
13 16:24:35 2002
***************
*** 217,223 ****
  
  - (void)drop
  {
!   unsigned i;
  
    for (i = 0; i < argCount; i++)
      [myWidgets[i] drop];
--- 217,223 ----
  
  - (void)drop
  {
!   int i;
  
    for (i = 0; i < argCount; i++)
      [myWidgets[i] drop];
Only in swarm-2.1.140.20020514-fixed/src/simtoolsgui: MessageProbeWidget.m~
diff -rc swarm-2.1.140.20020514/tools/ChangeLog 
swarm-2.1.140.20020514-fixed/tools/ChangeLog
*** swarm-2.1.140.20020514/tools/ChangeLog      Sun Apr 14 08:04:30 2002
--- swarm-2.1.140.20020514-fixed/tools/ChangeLog        Fri Sep 13 16:24:35 2002
***************
*** 1,3 ****
--- 1,8 ----
+ 2002-09-13    <address@hidden>
+ 
+       * findImp.m (main): argn and i have to be an int to allow
+       comparison against ints.
+ 
  2002-04-14  Alex Lancaster  <address@hidden>
  
        * findImp.m, print-hdf5.in, print-table.scm, swarm.scm: Add
Only in swarm-2.1.140.20020514-fixed/tools: ChangeLog~
diff -rc swarm-2.1.140.20020514/tools/findImp.m 
swarm-2.1.140.20020514-fixed/tools/findImp.m
*** swarm-2.1.140.20020514/tools/findImp.m      Sun Apr 14 07:05:40 2002
--- swarm-2.1.140.20020514-fixed/tools/findImp.m        Fri Sep 13 16:24:35 2002
***************
*** 37,43 ****
  {
    Class impClass;
    IMP imp;
!   unsigned argn;
  
    initSwarmBatch (1, argv);
  
--- 37,43 ----
  {
    Class impClass;
    IMP imp;
!   int argn; 
  
    initSwarmBatch (1, argv);
  
***************
*** 45,51 ****
    if (!impClass)
      abort ();
  
!   for (argn = 2; argn < argc; argn++)
      {
        Class class;
        SEL sel;
--- 45,51 ----
    if (!impClass)
      abort ();
  
!   for (argn = 2; argn <  argc; argn++)
      {
        Class class;
        SEL sel;
***************
*** 70,76 ****
            
            while (methods)
              {
!               unsigned i;
                
                for (i = 0; i < methods->method_count; i++)
                  {
--- 70,76 ----
            
            while (methods)
              {
!               int i;
                
                for (i = 0; i < methods->method_count; i++)
                  {
Only in swarm-2.1.140.20020514-fixed/tools: findImp.m~

reply via email to

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