00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include "setup.h"
00031
00032 #if OBJECT_SYSTEM && CONSTRUCT_COMPILER && (! RUN_TIME)
00033
00034 #include "conscomp.h"
00035 #include "classcom.h"
00036 #include "classfun.h"
00037 #include "classini.h"
00038 #include "cstrncmp.h"
00039 #include "envrnmnt.h"
00040 #include "objrtfnx.h"
00041 #include "sysdep.h"
00042
00043 #define _OBJCMP_SOURCE_
00044 #include "objcmp.h"
00045
00046
00047
00048
00049
00050
00051 #define MODULEI 0
00052 #define CLASSI 1
00053 #define LINKI 2
00054 #define SLOTI 3
00055 #define TSLOTI 4
00056 #define OSLOTI 5
00057 #define HANDLERI 6
00058 #define OHANDLERI 7
00059
00060 #define SAVE_ITEMS 8
00061
00062
00063
00064
00065
00066
00067 #define ClassPrefix() ConstructPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem)
00068 #define ClassLinkPrefix() ArbitraryPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem,2)
00069 #define SlotPrefix() ArbitraryPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem,3)
00070 #define TemplateSlotPrefix() ArbitraryPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem,4)
00071 #define OrderedSlotPrefix() ArbitraryPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem,5)
00072 #define HandlerPrefix() ArbitraryPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem,6)
00073 #define OrderedHandlerPrefix() ArbitraryPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem,7)
00074 #define SlotNamePrefix() ArbitraryPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem,8)
00075 #define SlotNameHashPrefix() ArbitraryPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem,9)
00076 #define ClassHashPrefix() ArbitraryPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem,10)
00077 #define ClassIDPrefix() ArbitraryPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem,11)
00078 #define MaxClassIDPrefix() ArbitraryPrefix(ObjectCompilerData(theEnv)->ObjectCodeItem,12)
00079
00080 typedef struct
00081 {
00082 long classCount;
00083 unsigned short currentPartition;
00084 unsigned short slotCount;
00085 int maxIndices;
00086 } MARK_INFO;
00087
00088 typedef union
00089 {
00090 struct
00091 {
00092 unsigned thePartition : 16;
00093 unsigned theOffset : 16;
00094 } theLocation;
00095 long theLong;
00096 } PACKED_LOCATION_INFO;
00097
00098
00099
00100
00101
00102
00103
00104 static void ReadyObjectsForCode(void *);
00105 static void MarkDefclassAndSlots(void *,struct constructHeader *,void *);
00106 static void PrintSlotNameReference(void *,FILE *,SLOT_NAME *,int,int);
00107 static void InitObjectsCode(void *,FILE *,int,int);
00108 static int ObjectsToCode(void *,char *,char *,char *,int,FILE *,int,int);
00109 static int ClassIDMapToCode(void *,char *,char *,char *,int,FILE *,int,int,int *);
00110 static int ClassHashTableToCode(void *,char *,char *,char *,int,FILE *,int,int,int *);
00111 static int SlotNameHashTableToCode(void *,char *,char *,char *,int,FILE *,int,int,int *);
00112 static int SlotNameEntriesToCode(void *,char *,char *,char *,int,FILE *,int,int,int *);
00113 static void CloseObjectFiles(void *,FILE *[SAVE_ITEMS],int [SAVE_ITEMS],
00114 struct CodeGeneratorFile [SAVE_ITEMS],int);
00115 static void DefclassModuleToCode(void *,FILE *,struct defmodule *,int,int);
00116 static void SingleDefclassToCode(void *,FILE *,int,int,DEFCLASS *,int,
00117 int,int,int,int,int,int,
00118 int,int,int,int,int,int);
00119 static intBool InheritanceLinksToCode(void *,FILE **,char *,char *,char *,int,int,FILE *,
00120 int *,int,DEFCLASS *,int *,
00121 int *,int *,struct CodeGeneratorFile *);
00122 static intBool SlotsToCode(void *,FILE **,char *,char *,char *,int,int,FILE *,
00123 int *,int,DEFCLASS *,int *,
00124 int *,int *,struct CodeGeneratorFile *);
00125 static intBool TemplateSlotsToCode(void *,FILE **,char *,char *,char *,int,int,FILE *,
00126 int *,int,DEFCLASS *,int *,
00127 int *,int *,struct CodeGeneratorFile *);
00128 static intBool OrderedSlotsToCode(void *,FILE **,char *,char *,char *,int,int,FILE *,
00129 int *,int,DEFCLASS *,int *,
00130 int *,int *,struct CodeGeneratorFile *);
00131 static intBool HandlersToCode(void *,FILE **,char *,char *,char *,int,int,FILE *,
00132 int *,int,DEFCLASS *,int *,
00133 int *,int *,struct CodeGeneratorFile *);
00134 static intBool OrderedHandlersToCode(void *,FILE **,char *,char *,char *,int,int,FILE *,
00135 int *,int,DEFCLASS *,int *,
00136 int *,int *,struct CodeGeneratorFile *);
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153 globle void SetupObjectsCompiler(
00154 void *theEnv)
00155 {
00156 AllocateEnvironmentData(theEnv,OBJECT_COMPILER_DATA,sizeof(struct objectCompilerData),NULL);
00157
00158 ObjectCompilerData(theEnv)->ObjectCodeItem = AddCodeGeneratorItem(theEnv,"objects",0,ReadyObjectsForCode,
00159 InitObjectsCode,ObjectsToCode,13);
00160 }
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175 globle void PrintClassReference(
00176 void *theEnv,
00177 FILE *fp,
00178 DEFCLASS *cls,
00179 int imageID,
00180 int maxIndices)
00181 {
00182 if (cls == NULL)
00183 fprintf(fp,"NULL");
00184 else
00185 fprintf(fp,"&%s%d_%d[%d]",
00186 ClassPrefix(),
00187 imageID,
00188 (int) ((cls->header.bsaveID / maxIndices) + 1),
00189 (int) (cls->header.bsaveID % maxIndices));
00190 }
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205 globle void DefclassCModuleReference(
00206 void *theEnv,
00207 FILE *theFile,
00208 int count,
00209 int imageID,
00210 int maxIndices)
00211 {
00212 fprintf(theFile,"MIHS &%s%d_%d[%d]",
00213 ModulePrefix(ObjectCompilerData(theEnv)->ObjectCodeItem),
00214 imageID,
00215 (count / maxIndices) + 1,
00216 (count % maxIndices));
00217 }
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235 static void ReadyObjectsForCode(
00236 void *theEnv)
00237 {
00238 MARK_INFO markInfo;
00239 register long i;
00240 register int j;
00241 SLOT_NAME *snp;
00242
00243 markInfo.classCount = 0L;
00244 markInfo.currentPartition = 1;
00245 markInfo.slotCount = 0;
00246
00247
00248
00249
00250
00251 markInfo.maxIndices = ConstructCompilerData(theEnv)->MaxIndices;
00252 DoForAllConstructs(theEnv,MarkDefclassAndSlots,DefclassData(theEnv)->DefclassModuleIndex,
00253 FALSE,(void *) &markInfo);
00254 i = 0L;
00255 for (j = 0 ; j < SLOT_NAME_TABLE_HASH_SIZE ; j++)
00256 for (snp = DefclassData(theEnv)->SlotNameTable[j] ; snp != NULL ; snp = snp->nxt)
00257 snp->bsaveIndex = i++;
00258 }
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283 #if WIN_BTC
00284 #pragma argsused
00285 #endif
00286 static void MarkDefclassAndSlots(
00287 void *theEnv,
00288 struct constructHeader *vTheDefclass,
00289 void *vTheBuffer)
00290 {
00291 DEFCLASS *theDefclass = (DEFCLASS *) vTheDefclass;
00292 MARK_INFO *markInfo = (MARK_INFO *) vTheBuffer;
00293 long i;
00294 PACKED_LOCATION_INFO theLocationInfo;
00295 #if MAC_MCW || WIN_MCW || MAC_XCD
00296 #pragma unused(theEnv)
00297 #endif
00298
00299 theDefclass->header.bsaveID = markInfo->classCount++;
00300 for (i = 0 ; i < theDefclass->slotCount ; i++)
00301 {
00302 theLocationInfo.theLocation.thePartition = markInfo->currentPartition;
00303 theLocationInfo.theLocation.theOffset = markInfo->slotCount;
00304 theDefclass->slots[i].bsaveIndex = theLocationInfo.theLong;
00305 markInfo->slotCount++;
00306 if (markInfo->slotCount >= markInfo->maxIndices)
00307 {
00308 markInfo->currentPartition++;
00309 markInfo->slotCount = 0;
00310 }
00311 }
00312 }
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326 static void PrintSlotNameReference(
00327 void *theEnv,
00328 FILE *fp,
00329 SLOT_NAME *snp,
00330 int imageID,
00331 int maxIndices)
00332 {
00333 if (snp == NULL)
00334 fprintf(fp,"NULL");
00335 else
00336 fprintf(fp,"&%s%d_%d[%d]",
00337 SlotNamePrefix(),
00338 imageID,
00339 (int) ((snp->bsaveIndex / maxIndices) + 1),
00340 (int) (snp->bsaveIndex % maxIndices));
00341 }
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355 #if WIN_BTC
00356 #pragma argsused
00357 #endif
00358 static void InitObjectsCode(
00359 void *theEnv,
00360 FILE *initFP,
00361 int imageID,
00362 int maxIndices)
00363 {
00364 #if MAC_MCW || WIN_MCW || MAC_XCD
00365 #pragma unused(maxIndices)
00366 #endif
00367
00368 fprintf(initFP," ObjectsRunTimeInitialize(theEnv,%s%d_1,%s%d_1,%s%d_1,%s%d);\n",
00369 ClassHashPrefix(),imageID,SlotNameHashPrefix(),imageID,
00370 ClassIDPrefix(),imageID,MaxClassIDPrefix(),imageID);
00371 }
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389 static int ObjectsToCode(
00390 void *theEnv,
00391 char *fileName,
00392 char *pathName,
00393 char *fileNameBuffer,
00394 int fileID,
00395 FILE *headerFP,
00396 int imageID,
00397 int maxIndices)
00398 {
00399 int fileCount = 1;
00400 struct defmodule *theModule;
00401 DEFCLASS *theDefclass;
00402 register int i;
00403 int moduleCount = 0;
00404 int itemArrayCounts[SAVE_ITEMS];
00405 int itemArrayVersions[SAVE_ITEMS];
00406 FILE *itemFiles[SAVE_ITEMS];
00407 int itemReopenFlags[SAVE_ITEMS];
00408 struct CodeGeneratorFile itemCodeFiles[SAVE_ITEMS];
00409
00410 for (i = 0 ; i < SAVE_ITEMS ; i++)
00411 {
00412 itemArrayCounts[i] = 0;
00413 itemArrayVersions[i] = 1;
00414 itemFiles[i] = NULL;
00415 itemReopenFlags[i] = FALSE;
00416 itemCodeFiles[i].filePrefix = NULL;
00417 itemCodeFiles[i].pathName = pathName;
00418 itemCodeFiles[i].fileNameBuffer = fileNameBuffer;
00419 }
00420 fprintf(headerFP,"#include \"classcom.h\"\n");
00421 fprintf(headerFP,"#include \"classini.h\"\n");
00422 if (ClassIDMapToCode(theEnv,fileName,pathName,fileNameBuffer,fileID,headerFP,imageID,maxIndices,&fileCount)
00423 == FALSE)
00424 return(0);
00425 if (ClassHashTableToCode(theEnv,fileName,pathName,fileNameBuffer,fileID,headerFP,imageID,maxIndices,&fileCount)
00426 == FALSE)
00427 return(0);
00428 if (SlotNameHashTableToCode(theEnv,fileName,pathName,fileNameBuffer,fileID,headerFP,imageID,maxIndices,&fileCount)
00429 == FALSE)
00430 return(0);
00431 if (SlotNameEntriesToCode(theEnv,fileName,pathName,fileNameBuffer,fileID,headerFP,imageID,maxIndices,&fileCount)
00432 == FALSE)
00433 return(0);
00434
00435
00436
00437
00438
00439 theModule = (struct defmodule *) EnvGetNextDefmodule(theEnv,NULL);
00440
00441 while (theModule != NULL)
00442 {
00443 EnvSetCurrentModule(theEnv,(void *) theModule);
00444
00445 itemFiles[MODULEI] =
00446 OpenFileIfNeeded(theEnv,itemFiles[MODULEI],fileName,pathName,fileNameBuffer,fileID,imageID,&fileCount,
00447 itemArrayVersions[MODULEI],headerFP,
00448 "DEFCLASS_MODULE",ModulePrefix(ObjectCompilerData(theEnv)->ObjectCodeItem),
00449 itemReopenFlags[MODULEI],&itemCodeFiles[MODULEI]);
00450 if (itemFiles[MODULEI] == NULL)
00451 goto ObjectCodeError;
00452
00453 DefclassModuleToCode(theEnv,itemFiles[MODULEI],theModule,imageID,maxIndices);
00454 itemFiles[MODULEI] =
00455 CloseFileIfNeeded(theEnv,itemFiles[MODULEI],&itemArrayCounts[MODULEI],
00456 &itemArrayVersions[MODULEI],maxIndices,
00457 &itemReopenFlags[MODULEI],&itemCodeFiles[MODULEI]);
00458
00459 for (theDefclass = (DEFCLASS *) EnvGetNextDefclass(theEnv,NULL) ;
00460 theDefclass != NULL ;
00461 theDefclass = (DEFCLASS *) EnvGetNextDefclass(theEnv,(void *) theDefclass))
00462 {
00463 itemFiles[CLASSI] =
00464 OpenFileIfNeeded(theEnv,itemFiles[CLASSI],fileName,pathName,fileNameBuffer,fileID,imageID,&fileCount,
00465 itemArrayVersions[CLASSI],headerFP,
00466 "DEFCLASS",ClassPrefix(),
00467 itemReopenFlags[CLASSI],&itemCodeFiles[CLASSI]);
00468 if (itemFiles[CLASSI] == NULL)
00469 goto ObjectCodeError;
00470 SingleDefclassToCode(theEnv,itemFiles[CLASSI],imageID,maxIndices,
00471 theDefclass,moduleCount,
00472 itemArrayVersions[LINKI],itemArrayCounts[LINKI],
00473 itemArrayVersions[SLOTI],itemArrayCounts[SLOTI],
00474 itemArrayVersions[TSLOTI],itemArrayCounts[TSLOTI],
00475 itemArrayVersions[OSLOTI],itemArrayCounts[OSLOTI],
00476 itemArrayVersions[HANDLERI],itemArrayCounts[HANDLERI],
00477 itemArrayVersions[OHANDLERI],itemArrayCounts[OHANDLERI]);
00478 itemArrayCounts[CLASSI]++;
00479 itemFiles[CLASSI] =
00480 CloseFileIfNeeded(theEnv,itemFiles[CLASSI],&itemArrayCounts[CLASSI],
00481 &itemArrayVersions[CLASSI],maxIndices,
00482 &itemReopenFlags[CLASSI],&itemCodeFiles[CLASSI]);
00483
00484 if (InheritanceLinksToCode(theEnv,&itemFiles[LINKI],fileName,pathName,fileNameBuffer,fileID,imageID,
00485 headerFP,&fileCount,maxIndices,theDefclass,
00486 &itemArrayVersions[LINKI],&itemArrayCounts[LINKI],
00487 &itemReopenFlags[LINKI],&itemCodeFiles[LINKI])
00488 == FALSE)
00489 goto ObjectCodeError;
00490
00491 if (SlotsToCode(theEnv,&itemFiles[SLOTI],fileName,pathName,fileNameBuffer,fileID,imageID,
00492 headerFP,&fileCount,maxIndices,theDefclass,
00493 &itemArrayVersions[SLOTI],&itemArrayCounts[SLOTI],
00494 &itemReopenFlags[SLOTI],&itemCodeFiles[SLOTI])
00495 == FALSE)
00496 goto ObjectCodeError;
00497
00498 if (TemplateSlotsToCode(theEnv,&itemFiles[TSLOTI],fileName,pathName,fileNameBuffer,fileID,imageID,
00499 headerFP,&fileCount,maxIndices,theDefclass,
00500 &itemArrayVersions[TSLOTI],&itemArrayCounts[TSLOTI],
00501 &itemReopenFlags[TSLOTI],&itemCodeFiles[TSLOTI])
00502 == FALSE)
00503 goto ObjectCodeError;
00504
00505 if (OrderedSlotsToCode(theEnv,&itemFiles[OSLOTI],fileName,pathName,fileNameBuffer,fileID,imageID,
00506 headerFP,&fileCount,maxIndices,theDefclass,
00507 &itemArrayVersions[OSLOTI],&itemArrayCounts[OSLOTI],
00508 &itemReopenFlags[OSLOTI],&itemCodeFiles[OSLOTI])
00509 == FALSE)
00510 goto ObjectCodeError;
00511
00512 if (HandlersToCode(theEnv,&itemFiles[HANDLERI],fileName,pathName,fileNameBuffer,fileID,imageID,
00513 headerFP,&fileCount,maxIndices,theDefclass,
00514 &itemArrayVersions[HANDLERI],&itemArrayCounts[HANDLERI],
00515 &itemReopenFlags[HANDLERI],&itemCodeFiles[HANDLERI])
00516 == FALSE)
00517 goto ObjectCodeError;
00518
00519 if (OrderedHandlersToCode(theEnv,&itemFiles[OHANDLERI],fileName,pathName,fileNameBuffer,fileID,imageID,
00520 headerFP,&fileCount,maxIndices,theDefclass,
00521 &itemArrayVersions[OHANDLERI],&itemArrayCounts[OHANDLERI],
00522 &itemReopenFlags[OHANDLERI],&itemCodeFiles[OHANDLERI])
00523 == FALSE)
00524 goto ObjectCodeError;
00525 }
00526
00527 theModule = (struct defmodule *) EnvGetNextDefmodule(theEnv,theModule);
00528 moduleCount++;
00529 itemArrayCounts[MODULEI]++;
00530 }
00531
00532 CloseObjectFiles(theEnv,itemFiles,itemReopenFlags,itemCodeFiles,maxIndices);
00533 return(1);
00534
00535 ObjectCodeError:
00536 CloseObjectFiles(theEnv,itemFiles,itemReopenFlags,itemCodeFiles,maxIndices);
00537 return(0);
00538 }
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552 static int ClassIDMapToCode(
00553 void *theEnv,
00554 char *fileName,
00555 char *pathName,
00556 char *fileNameBuffer,
00557 int fileID,
00558 FILE *headerFP,
00559 int imageID,
00560 int maxIndices,
00561 int *fileCount)
00562 {
00563 FILE *classIDMapFile = NULL;
00564 int classIDMapArrayCount,
00565 classIDMapArrayVersion = 1;
00566
00567 classIDMapFile = OpenFileIfNeeded(theEnv,classIDMapFile,fileName,pathName,fileNameBuffer,fileID,imageID,fileCount,
00568 classIDMapArrayVersion,headerFP,
00569 "DEFCLASS *",ClassIDPrefix(),FALSE,NULL);
00570 if (classIDMapFile == NULL)
00571 return(FALSE);
00572 for (classIDMapArrayCount = 0 ;
00573 classIDMapArrayCount < DefclassData(theEnv)->MaxClassID ;
00574 classIDMapArrayCount++)
00575 {
00576 if (classIDMapArrayCount > 0)
00577 fprintf(classIDMapFile,",\n");
00578 PrintClassReference(theEnv,classIDMapFile,DefclassData(theEnv)->ClassIDMap[classIDMapArrayCount],
00579 imageID,maxIndices);
00580 }
00581 fprintf(classIDMapFile,"};\n\n");
00582 fprintf(classIDMapFile,"unsigned %s%d = %u;\n",
00583 MaxClassIDPrefix(),imageID,(unsigned) DefclassData(theEnv)->MaxClassID);
00584 fprintf(headerFP,"extern unsigned %s%d;\n",MaxClassIDPrefix(),imageID);
00585 GenClose(theEnv,classIDMapFile);
00586 return(TRUE);
00587 }
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601 static int ClassHashTableToCode(
00602 void *theEnv,
00603 char *fileName,
00604 char *pathName,
00605 char *fileNameBuffer,
00606 int fileID,
00607 FILE *headerFP,
00608 int imageID,
00609 int maxIndices,
00610 int *fileCount)
00611 {
00612 FILE *classHashFile = NULL;
00613 int classHashArrayCount,
00614 classHashArrayVersion = 1;
00615
00616 classHashFile = OpenFileIfNeeded(theEnv,classHashFile,fileName,pathName,fileNameBuffer,fileID,imageID,fileCount,
00617 classHashArrayVersion,headerFP,
00618 "DEFCLASS *",ClassHashPrefix(),FALSE,NULL);
00619 if (classHashFile == NULL)
00620 return(FALSE);
00621 for (classHashArrayCount = 0 ;
00622 classHashArrayCount < CLASS_TABLE_HASH_SIZE ;
00623 classHashArrayCount++)
00624 {
00625 if (classHashArrayCount > 0)
00626 fprintf(classHashFile,",\n");
00627 PrintClassReference(theEnv,classHashFile,DefclassData(theEnv)->ClassTable[classHashArrayCount],
00628 imageID,maxIndices);
00629 }
00630
00631 CloseFileIfNeeded(theEnv,classHashFile,&classHashArrayCount,
00632 &classHashArrayVersion,classHashArrayCount,NULL,NULL);
00633 return(TRUE);
00634 }
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648 static int SlotNameHashTableToCode(
00649 void *theEnv,
00650 char *fileName,
00651 char *pathName,
00652 char *fileNameBuffer,
00653 int fileID,
00654 FILE *headerFP,
00655 int imageID,
00656 int maxIndices,
00657 int *fileCount)
00658 {
00659 FILE *slotNameHashFile = NULL;
00660 int slotNameHashArrayCount,
00661 slotNameHashArrayVersion = 1;
00662
00663 slotNameHashFile = OpenFileIfNeeded(theEnv,slotNameHashFile,fileName,pathName,fileNameBuffer,fileID,
00664 imageID,fileCount,
00665 slotNameHashArrayVersion,headerFP,
00666 "SLOT_NAME *",SlotNameHashPrefix(),FALSE,NULL);
00667 if (slotNameHashFile == NULL)
00668 return(FALSE);
00669 for (slotNameHashArrayCount = 0 ;
00670 slotNameHashArrayCount < SLOT_NAME_TABLE_HASH_SIZE ;
00671 slotNameHashArrayCount++)
00672 {
00673 if (slotNameHashArrayCount > 0)
00674 fprintf(slotNameHashFile,",\n");
00675 PrintSlotNameReference(theEnv,slotNameHashFile,DefclassData(theEnv)->SlotNameTable[slotNameHashArrayCount],
00676 imageID,maxIndices);
00677 }
00678 CloseFileIfNeeded(theEnv,slotNameHashFile,&slotNameHashArrayCount,
00679 &slotNameHashArrayVersion,slotNameHashArrayCount,
00680 NULL,NULL);
00681 return(TRUE);
00682 }
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696 static int SlotNameEntriesToCode(
00697 void *theEnv,
00698 char *fileName,
00699 char *pathName,
00700 char *fileNameBuffer,
00701 int fileID,
00702 FILE *headerFP,
00703 int imageID,
00704 int maxIndices,
00705 int *fileCount)
00706 {
00707 FILE *slotNameFile = NULL;
00708 int slotNameArrayCount = 0,
00709 slotNameArrayVersion = 1;
00710 SLOT_NAME *snp;
00711 register unsigned i;
00712
00713 for (i = 0 ; i < SLOT_NAME_TABLE_HASH_SIZE ; i++)
00714 {
00715 for (snp = DefclassData(theEnv)->SlotNameTable[i] ; snp != NULL ; snp = snp->nxt)
00716 {
00717 slotNameFile = OpenFileIfNeeded(theEnv,slotNameFile,fileName,pathName,fileNameBuffer,fileID,
00718 imageID,fileCount,
00719 slotNameArrayVersion,headerFP,
00720 "SLOT_NAME",SlotNamePrefix(),FALSE,NULL);
00721 if (slotNameFile == NULL)
00722 return(FALSE);
00723 fprintf(slotNameFile,"{ %u,1,%d,",snp->hashTableIndex,snp->id);
00724 PrintSymbolReference(theEnv,slotNameFile,snp->name);
00725 fprintf(slotNameFile,",");
00726 PrintSymbolReference(theEnv,slotNameFile,snp->putHandlerName);
00727 fprintf(slotNameFile,",");
00728 PrintSlotNameReference(theEnv,slotNameFile,snp->nxt,imageID,maxIndices);
00729 fprintf(slotNameFile,",0L }");
00730 slotNameArrayCount++;
00731 slotNameFile = CloseFileIfNeeded(theEnv,slotNameFile,&slotNameArrayCount,
00732 &slotNameArrayVersion,maxIndices,NULL,NULL);
00733 }
00734 }
00735 if (slotNameFile != NULL)
00736 CloseFileIfNeeded(theEnv,slotNameFile,&slotNameArrayCount,
00737 &slotNameArrayVersion,slotNameArrayCount,NULL,NULL);
00738 return(TRUE);
00739 }
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757 static void CloseObjectFiles(
00758 void *theEnv,
00759 FILE *itemFiles[SAVE_ITEMS],
00760 int itemReopenFlags[SAVE_ITEMS],
00761 struct CodeGeneratorFile itemCodeFiles[SAVE_ITEMS],
00762 int maxIndices)
00763 {
00764 int count = maxIndices;
00765 int arrayVersion = 0;
00766 register int i;
00767
00768 for (i = 0 ; i < SAVE_ITEMS ; i++)
00769 {
00770 count = maxIndices;
00771 itemFiles[i] = CloseFileIfNeeded(theEnv,itemFiles[i],&count,&arrayVersion,
00772 maxIndices,&itemReopenFlags[i],
00773 &itemCodeFiles[i]);
00774 }
00775 }
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790 static void DefclassModuleToCode(
00791 void *theEnv,
00792 FILE *theFile,
00793 struct defmodule *theModule,
00794 int imageID,
00795 int maxIndices)
00796 {
00797 fprintf(theFile,"{");
00798 ConstructModuleToCode(theEnv,theFile,theModule,imageID,maxIndices,
00799 DefclassData(theEnv)->DefclassModuleIndex,ClassPrefix());
00800 fprintf(theFile,"}");
00801 }
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828
00829
00830
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841 static void SingleDefclassToCode(
00842 void *theEnv,
00843 FILE *theFile,
00844 int imageID,
00845 int maxIndices,
00846 DEFCLASS *theDefclass,
00847 int moduleCount,
00848 int classLinkArrayVersion,
00849 int classLinkArrayCount,
00850 int slotArrayVersion,
00851 int slotArrayCount,
00852 int templateSlotArrayVersion,
00853 int templateSlotArrayCount,
00854 int orderedSlotArrayVersion,
00855 int orderedSlotArrayCount,
00856 int handlerArrayVersion,
00857 int handlerArrayCount,
00858 int orderedHandlerArrayVersion,
00859 int orderedHandlerArrayCount)
00860 {
00861
00862
00863
00864 fprintf(theFile,"{");
00865 ConstructHeaderToCode(theEnv,theFile,&theDefclass->header,imageID,maxIndices,moduleCount,
00866 ModulePrefix(ObjectCompilerData(theEnv)->ObjectCodeItem),ClassPrefix());
00867
00868
00869
00870
00871 fprintf(theFile,",1,%u,%u,%u,0,0,%u,0,%u,\n ",
00872 theDefclass->system,theDefclass->abstract,
00873 theDefclass->reactive,(unsigned) theDefclass->id,
00874 theDefclass->hashTableIndex);
00875
00876 if (theDefclass->directSuperclasses.classCount > 0)
00877 fprintf(theFile,"{ %u,&%s%d_%d[%d] },",
00878 (unsigned) theDefclass->directSuperclasses.classCount,
00879 ClassLinkPrefix(),
00880 imageID,classLinkArrayVersion,classLinkArrayCount);
00881 else
00882 fprintf(theFile,"{ 0,NULL },");
00883 classLinkArrayCount += theDefclass->directSuperclasses.classCount;
00884
00885 if (theDefclass->directSubclasses.classCount > 0)
00886 fprintf(theFile,"{ %u,&%s%d_%d[%d] },",
00887 (unsigned) theDefclass->directSubclasses.classCount,
00888 ClassLinkPrefix(),
00889 imageID,classLinkArrayVersion,classLinkArrayCount);
00890 else
00891 fprintf(theFile,"{ 0,NULL },");
00892 classLinkArrayCount += theDefclass->directSubclasses.classCount;
00893
00894 if (theDefclass->allSuperclasses.classCount > 0)
00895 fprintf(theFile,"{ %u,&%s%d_%d[%d] },",
00896 (unsigned) theDefclass->allSuperclasses.classCount,
00897 ClassLinkPrefix(),
00898 imageID,classLinkArrayVersion,classLinkArrayCount);
00899 else
00900 fprintf(theFile,"{ 0,NULL },\n ");
00901
00902 if (theDefclass->slots != NULL)
00903 fprintf(theFile,"&%s%d_%d[%d],",
00904 SlotPrefix(),imageID,
00905 slotArrayVersion,slotArrayCount);
00906 else
00907 fprintf(theFile,"NULL,");
00908
00909 if (theDefclass->instanceTemplate != NULL)
00910 fprintf(theFile,"&%s%d_%d[%d],",
00911 TemplateSlotPrefix(),imageID,
00912 templateSlotArrayVersion,templateSlotArrayCount);
00913 else
00914 fprintf(theFile,"NULL,");
00915
00916 if (theDefclass->slotNameMap != NULL)
00917 fprintf(theFile,"&%s%d_%d[%d],",
00918 OrderedSlotPrefix(),imageID,
00919 orderedSlotArrayVersion,orderedSlotArrayCount);
00920 else
00921 fprintf(theFile,"NULL,");
00922
00923 fprintf(theFile,"%hd,%hd,%hd,%hd,NULL,NULL,\n ",
00924 theDefclass->slotCount,theDefclass->localInstanceSlotCount,
00925 theDefclass->instanceSlotCount,theDefclass->maxSlotNameID);
00926
00927 if (theDefclass->handlers != NULL)
00928 fprintf(theFile,"&%s%d_%d[%d],",
00929 HandlerPrefix(),imageID,
00930 handlerArrayVersion,handlerArrayCount);
00931 else
00932 fprintf(theFile,"NULL,");
00933
00934 if (theDefclass->handlerOrderMap != NULL)
00935 fprintf(theFile,"&%s%d_%d[%d],",
00936 OrderedHandlerPrefix(),imageID,
00937 orderedHandlerArrayVersion,orderedHandlerArrayCount);
00938 else
00939 fprintf(theFile,"NULL,");
00940
00941 fprintf(theFile,"%hd,",theDefclass->handlerCount);
00942 PrintClassReference(theEnv,theFile,theDefclass->nxtHash,imageID,maxIndices);
00943 fprintf(theFile,",");
00944 PrintBitMapReference(theEnv,theFile,theDefclass->scopeMap);
00945 fprintf(theFile,",\"\"}");
00946 }
00947
00948
00949
00950
00951
00952
00953
00954
00955
00956
00957
00958
00959
00960
00961
00962
00963
00964
00965
00966
00967
00968
00969
00970
00971
00972
00973
00974
00975
00976
00977 static intBool InheritanceLinksToCode(
00978 void *theEnv,
00979 FILE **classLinkFile,
00980 char *fileName,
00981 char *pathName,
00982 char *fileNameBuffer,
00983 int fileID,
00984 int imageID,
00985 FILE *headerFP,
00986 int *fileCount,
00987 int maxIndices,
00988 DEFCLASS *theDefclass,
00989 int *classLinkArrayVersion,
00990 int *classLinkArrayCount,
00991 int *reopenClassLinkFile,
00992 struct CodeGeneratorFile *classLinkCodeFile)
00993 {
00994 long i;
00995 int inheritanceLinkCount,
00996 linkPrinted = FALSE;
00997
00998 inheritanceLinkCount = theDefclass->directSuperclasses.classCount +
00999 theDefclass->directSubclasses.classCount +
01000 theDefclass->allSuperclasses.classCount;
01001
01002 if (inheritanceLinkCount == 0)
01003 return(TRUE);
01004
01005 *classLinkFile = OpenFileIfNeeded(theEnv,*classLinkFile,fileName,pathName,fileNameBuffer,fileID,
01006 imageID,fileCount,
01007 *classLinkArrayVersion,headerFP,
01008 "DEFCLASS *",ClassLinkPrefix(),
01009 *reopenClassLinkFile,classLinkCodeFile);
01010 if (*classLinkFile == NULL)
01011 return(FALSE);
01012
01013 for (i = 0 ; i < theDefclass->directSuperclasses.classCount ; i++)
01014 {
01015 if (linkPrinted)
01016 fprintf(*classLinkFile,",");
01017 PrintClassReference(theEnv,*classLinkFile,
01018 theDefclass->directSuperclasses.classArray[i],
01019 imageID,maxIndices);
01020 linkPrinted = TRUE;
01021 }
01022 for (i = 0 ; i < theDefclass->directSubclasses.classCount ; i++)
01023 {
01024 if (linkPrinted)
01025 fprintf(*classLinkFile,",");
01026 PrintClassReference(theEnv,*classLinkFile,
01027 theDefclass->directSubclasses.classArray[i],
01028 imageID,maxIndices);
01029 linkPrinted = TRUE;
01030 }
01031 for (i = 0 ; i < theDefclass->allSuperclasses.classCount ; i++)
01032 {
01033 if (linkPrinted)
01034 fprintf(*classLinkFile,",");
01035 PrintClassReference(theEnv,*classLinkFile,
01036 theDefclass->allSuperclasses.classArray[i],
01037 imageID,maxIndices);
01038 linkPrinted = TRUE;
01039 }
01040 *classLinkArrayCount += inheritanceLinkCount;
01041 *classLinkFile = CloseFileIfNeeded(theEnv,*classLinkFile,classLinkArrayCount,
01042 classLinkArrayVersion,maxIndices,
01043 reopenClassLinkFile,classLinkCodeFile);
01044 return(TRUE);
01045 }
01046
01047
01048
01049
01050
01051
01052
01053
01054
01055
01056
01057
01058
01059
01060
01061
01062
01063
01064
01065
01066
01067
01068
01069
01070
01071
01072
01073
01074
01075 static intBool SlotsToCode(
01076 void *theEnv,
01077 FILE **slotFile,
01078 char *fileName,
01079 char *pathName,
01080 char *fileNameBuffer,
01081 int fileID,
01082 int imageID,
01083 FILE *headerFP,
01084 int *fileCount,
01085 int maxIndices,
01086 DEFCLASS *theDefclass,
01087 int *slotArrayVersion,
01088 int *slotArrayCount,
01089 int *reopenSlotFile,
01090 struct CodeGeneratorFile *slotCodeFile)
01091 {
01092 long i;
01093 SLOT_DESC *sd;
01094 EXPRESSION *tmpexp;
01095 PACKED_LOCATION_INFO theLocationInfo;
01096
01097 if (theDefclass->slotCount == 0)
01098 return(TRUE);
01099
01100 *slotFile = OpenFileIfNeeded(theEnv,*slotFile,fileName,pathName,fileNameBuffer,fileID,
01101 imageID,fileCount,
01102 *slotArrayVersion,headerFP,
01103 "SLOT_DESC",SlotPrefix(),
01104 *reopenSlotFile,slotCodeFile);
01105 if (*slotFile == NULL)
01106 return(FALSE);
01107
01108 for (i = 0 ; i < theDefclass->slotCount ; i++)
01109 {
01110 sd = &theDefclass->slots[i];
01111 if (i > 0)
01112 fprintf(*slotFile,",\n");
01113 fprintf(*slotFile,"{ %u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,%u,",
01114 sd->shared,sd->multiple,
01115 sd->composite,sd->noInherit,
01116 sd->noWrite,sd->initializeOnly,
01117 sd->dynamicDefault,sd->defaultSpecified,
01118 sd->noDefault,sd->reactive,
01119 sd->publicVisibility,sd->createReadAccessor,
01120 sd->createWriteAccessor,sd->overrideMessageSpecified);
01121 PrintClassReference(theEnv,*slotFile,sd->cls,imageID,maxIndices);
01122 fprintf(*slotFile,",");
01123 PrintSlotNameReference(theEnv,*slotFile,sd->slotName,imageID,maxIndices);
01124 fprintf(*slotFile,",\n ");
01125 PrintSymbolReference(theEnv,*slotFile,sd->overrideMessage);
01126 if (sd->defaultValue != NULL)
01127 {
01128 fprintf(*slotFile,",(void *) ");
01129 if (sd->dynamicDefault)
01130 ExpressionToCode(theEnv,*slotFile,(EXPRESSION *) sd->defaultValue);
01131 else
01132 {
01133 tmpexp = ConvertValueToExpression(theEnv,(DATA_OBJECT *) sd->defaultValue);
01134 ExpressionToCode(theEnv,*slotFile,tmpexp);
01135 ReturnExpression(theEnv,tmpexp);
01136 }
01137 }
01138 else
01139 fprintf(*slotFile,",NULL");
01140 fprintf(*slotFile,",");
01141 PrintConstraintReference(theEnv,*slotFile,sd->constraint,imageID,maxIndices);
01142 fprintf(*slotFile,",0,0L,");
01143 if (sd->shared)
01144 {
01145 theLocationInfo.theLong = sd->sharedValue.desc->bsaveIndex;
01146 fprintf(*slotFile,"{ &%s%d_%u[%u],0,0,0,NULL } }",
01147 SlotPrefix(),imageID,
01148 theLocationInfo.theLocation.thePartition,
01149 theLocationInfo.theLocation.theOffset);
01150 }
01151 else
01152 fprintf(*slotFile,"{ NULL,0,0,0,NULL } }");
01153 }
01154 *slotArrayCount += (int) theDefclass->slotCount;
01155 *slotFile = CloseFileIfNeeded(theEnv,*slotFile,slotArrayCount,
01156 slotArrayVersion,maxIndices,
01157 reopenSlotFile,slotCodeFile);
01158 return(TRUE);
01159 }
01160
01161
01162
01163
01164
01165
01166
01167
01168
01169
01170
01171
01172
01173
01174
01175
01176
01177
01178
01179
01180
01181
01182
01183
01184
01185
01186
01187
01188
01189
01190 static intBool TemplateSlotsToCode(
01191 void *theEnv,
01192 FILE **templateSlotFile,
01193 char *fileName,
01194 char *pathName,
01195 char *fileNameBuffer,
01196 int fileID,
01197 int imageID,
01198 FILE *headerFP,
01199 int *fileCount,
01200 int maxIndices,
01201 DEFCLASS *theDefclass,
01202 int *templateSlotArrayVersion,
01203 int *templateSlotArrayCount,
01204 int *reopenTemplateSlotFile,
01205 struct CodeGeneratorFile *templateSlotCodeFile)
01206 {
01207 long i;
01208 SLOT_DESC *sd;
01209 PACKED_LOCATION_INFO theLocationInfo;
01210
01211 if (theDefclass->instanceSlotCount == 0)
01212 return(TRUE);
01213
01214 *templateSlotFile = OpenFileIfNeeded(theEnv,*templateSlotFile,fileName,pathName,fileNameBuffer,fileID,
01215 imageID,fileCount,
01216 *templateSlotArrayVersion,headerFP,
01217 "SLOT_DESC *",TemplateSlotPrefix(),
01218 *reopenTemplateSlotFile,templateSlotCodeFile);
01219 if (*templateSlotFile == NULL)
01220 return(FALSE);
01221
01222 for (i = 0 ; i < theDefclass->instanceSlotCount ; i++)
01223 {
01224 sd = theDefclass->instanceTemplate[i];
01225 if (i > 0)
01226 fprintf(*templateSlotFile,",");
01227 theLocationInfo.theLong = sd->bsaveIndex;
01228 fprintf(*templateSlotFile,"&%s%d_%u[%u]",
01229 SlotPrefix(),imageID,
01230 theLocationInfo.theLocation.thePartition,
01231 theLocationInfo.theLocation.theOffset);
01232 }
01233 *templateSlotArrayCount += (int) theDefclass->instanceSlotCount;
01234 *templateSlotFile = CloseFileIfNeeded(theEnv,*templateSlotFile,templateSlotArrayCount,
01235 templateSlotArrayVersion,maxIndices,
01236 reopenTemplateSlotFile,templateSlotCodeFile);
01237 return(TRUE);
01238 }
01239
01240
01241
01242
01243
01244
01245
01246
01247
01248
01249
01250
01251
01252
01253
01254
01255
01256
01257
01258
01259
01260
01261
01262
01263
01264
01265
01266
01267
01268
01269 static intBool OrderedSlotsToCode(
01270 void *theEnv,
01271 FILE **orderedSlotFile,
01272 char *fileName,
01273 char *pathName,
01274 char *fileNameBuffer,
01275 int fileID,
01276 int imageID,
01277 FILE *headerFP,
01278 int *fileCount,
01279 int maxIndices,
01280 DEFCLASS *theDefclass,
01281 int *orderedSlotArrayVersion,
01282 int *orderedSlotArrayCount,
01283 int *reopenOrderedSlotFile,
01284 struct CodeGeneratorFile *orderedSlotCodeFile)
01285 {
01286 long i;
01287
01288 if (theDefclass->instanceSlotCount == 0)
01289 return(TRUE);
01290
01291 *orderedSlotFile = OpenFileIfNeeded(theEnv,*orderedSlotFile,fileName,pathName,fileNameBuffer,fileID,
01292 imageID,fileCount,
01293 *orderedSlotArrayVersion,headerFP,
01294 "unsigned",OrderedSlotPrefix(),
01295 *reopenOrderedSlotFile,orderedSlotCodeFile);
01296 if (*orderedSlotFile == NULL)
01297 return(FALSE);
01298
01299 for (i = 0 ; i <= theDefclass->maxSlotNameID ; i++)
01300 {
01301 if (i > 0)
01302 fprintf(*orderedSlotFile,",");
01303 fprintf(*orderedSlotFile,"%u",theDefclass->slotNameMap[i]);
01304 }
01305 *orderedSlotArrayCount += (int) theDefclass->maxSlotNameID + 1;
01306 *orderedSlotFile = CloseFileIfNeeded(theEnv,*orderedSlotFile,orderedSlotArrayCount,
01307 orderedSlotArrayVersion,maxIndices,
01308 reopenOrderedSlotFile,orderedSlotCodeFile);
01309 return(TRUE);
01310 }
01311
01312
01313
01314
01315
01316
01317
01318
01319
01320
01321
01322
01323
01324
01325
01326
01327
01328
01329
01330
01331
01332
01333
01334
01335
01336
01337
01338
01339
01340 static intBool HandlersToCode(
01341 void *theEnv,
01342 FILE **handlerFile,
01343 char *fileName,
01344 char *pathName,
01345 char *fileNameBuffer,
01346 int fileID,
01347 int imageID,
01348 FILE *headerFP,
01349 int *fileCount,
01350 int maxIndices,
01351 DEFCLASS *theDefclass,
01352 int *handlerArrayVersion,
01353 int *handlerArrayCount,
01354 int *reopenHandlerFile,
01355 struct CodeGeneratorFile *handlerCodeFile)
01356 {
01357 long i;
01358 HANDLER *hnd;
01359
01360 if (theDefclass->handlerCount == 0)
01361 return(TRUE);
01362
01363 *handlerFile = OpenFileIfNeeded(theEnv,*handlerFile,fileName,pathName,fileNameBuffer,fileID,
01364 imageID,fileCount,
01365 *handlerArrayVersion,headerFP,
01366 "HANDLER",HandlerPrefix(),*reopenHandlerFile,
01367 handlerCodeFile);
01368 if (*handlerFile == NULL)
01369 return(FALSE);
01370
01371 for (i = 0 ; i < theDefclass->handlerCount ; i++)
01372 {
01373 if (i > 0)
01374 fprintf(*handlerFile,",\n");
01375 hnd = &theDefclass->handlers[i];
01376 fprintf(*handlerFile,"{ %u,%u,0,0,0,",hnd->system,hnd->type);
01377 PrintSymbolReference(theEnv,*handlerFile,hnd->name);
01378 fprintf(*handlerFile,",");
01379 PrintClassReference(theEnv,*handlerFile,hnd->cls,imageID,maxIndices);
01380 fprintf(*handlerFile,",%hd,%hd,%hd,",hnd->minParams,hnd->maxParams,
01381 hnd->localVarCount);
01382 ExpressionToCode(theEnv,*handlerFile,hnd->actions);
01383 fprintf(*handlerFile,",NULL }");
01384 }
01385 *handlerArrayCount += (int) theDefclass->handlerCount;
01386 *handlerFile = CloseFileIfNeeded(theEnv,*handlerFile,handlerArrayCount,
01387 handlerArrayVersion,maxIndices,
01388 reopenHandlerFile,handlerCodeFile);
01389 return(TRUE);
01390 }
01391
01392
01393
01394
01395
01396
01397
01398
01399
01400
01401
01402
01403
01404
01405
01406
01407
01408
01409
01410
01411
01412
01413
01414
01415
01416
01417
01418
01419
01420
01421 static intBool OrderedHandlersToCode(
01422 void *theEnv,
01423 FILE **orderedHandlerFile,
01424 char *fileName,
01425 char *pathName,
01426 char *fileNameBuffer,
01427 int fileID,
01428 int imageID,
01429 FILE *headerFP,
01430 int *fileCount,
01431 int maxIndices,
01432 DEFCLASS *theDefclass,
01433 int *orderedHandlerArrayVersion,
01434 int *orderedHandlerArrayCount,
01435 int *reopenOrderedHandlerFile,
01436 struct CodeGeneratorFile *orderedHandlerCodeFile)
01437 {
01438 long i;
01439
01440 if (theDefclass->handlerCount == 0)
01441 return(TRUE);
01442
01443 *orderedHandlerFile = OpenFileIfNeeded(theEnv,*orderedHandlerFile,fileName,pathName,fileNameBuffer,fileID,
01444 imageID,fileCount,
01445 *orderedHandlerArrayVersion,headerFP,
01446 "unsigned",OrderedHandlerPrefix(),
01447 *reopenOrderedHandlerFile,
01448 orderedHandlerCodeFile);
01449 if (*orderedHandlerFile == NULL)
01450 return(FALSE);
01451
01452 for (i = 0 ; i < theDefclass->handlerCount ; i++)
01453 {
01454 if (i > 0)
01455 fprintf(*orderedHandlerFile,",");
01456 fprintf(*orderedHandlerFile,"%u",theDefclass->handlerOrderMap[i]);
01457 }
01458 *orderedHandlerArrayCount += (int) theDefclass->handlerCount;
01459 *orderedHandlerFile = CloseFileIfNeeded(theEnv,*orderedHandlerFile,orderedHandlerArrayCount,
01460 orderedHandlerArrayVersion,maxIndices,
01461 reopenOrderedHandlerFile,
01462 orderedHandlerCodeFile);
01463 return(TRUE);
01464 }
01465
01466 #endif
01467
01468