This commit was manufactured by cvs2svn to create tag 'buildscript'.
[IRC.git] / Robust / src / Runtime / runtime.c
diff --git a/Robust/src/Runtime/runtime.c b/Robust/src/Runtime/runtime.c
deleted file mode 100644 (file)
index c91890a..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#include "runtime.h"
-#include "structdefs.h"
-#include <string.h>
-
-extern int classsize[];
-#ifdef BOEHM_GC
-#include "gc.h"
-#define FREEMALLOC(x) GC_malloc(x)
-#else
-#define FREEMALLOC(x) calloc(1,x)
-#endif
-
-#ifdef TASK
-int main(int argc, char **argv) {
-  int i;
-  /* Allocate startup object */
-  struct ___StartupObject___ *startupobject=(struct ___StartupObject___*) allocate_new(STARTUPTYPE);
-
-  /* Build array of strings */
-  struct ArrayObject * stringarray=allocate_newarray(STRINGARRAYTYPE, argc); 
-  startupobject->___parameters___=stringarray;
-
-  for(i=0;i<argc;i++) {
-    int length=strlen(argv[i]);
-    struct ___String___ *newstring=NewString(argv[i],length);
-    ((void **)(((char *)& stringarray->___length___)+sizeof(int)))[i]=newstring;  
-  }
-
-
-}
-#endif
-
-int ___Object______hashcode____(struct ___Object___ * ___this___) {
-  return (int) ___this___;
-}
-
-void ___System______printString____L___String___(struct ___String___ * s) {
-    struct ArrayObject * chararray=s->___string___;
-    int i;
-    for(i=0;i<chararray->___length___;i++) {
-       short s= ((short *)(((char *)& chararray->___length___)+sizeof(int)))[i];
-       putchar(s);
-    }
-}
-
-void * allocate_new(int type) {
-  void * v=FREEMALLOC(classsize[type]);
-  *((int *)v)=type;
-  return v;
-}
-
-struct ArrayObject * allocate_newarray(int type, int length) {
-  struct ArrayObject * v=FREEMALLOC(sizeof(struct ArrayObject)+length*classsize[type]);
-  v->type=type;
-  v->___length___=length;
-  return v;
-}
-
-struct ___String___ * NewString(char *str,int length) {
-  struct ArrayObject * chararray=allocate_newarray(CHARARRAYTYPE, length);
-  struct ___String___ * strobj=allocate_new(STRINGTYPE);
-  int i;
-  strobj->___string___=chararray;
-  for(i=0;i<length;i++) {
-    ((short *)(((char *)& chararray->___length___)+sizeof(int)))[i]=(short)str[i];  }
-  return strobj;
-}
-
-void failedboundschk() {
-  printf("Array out of bounds\n");
-  exit(-1);
-}
-
-void failednullptr() {
-  printf("Dereferenced a null pointer\n");
-  exit(-1);
-}