diff options
Diffstat (limited to 'backendC/CleanCompilerSources')
-rw-r--r-- | backendC/CleanCompilerSources/backend.c | 21 | ||||
-rw-r--r-- | backendC/CleanCompilerSources/backend.icl | 16 |
2 files changed, 35 insertions, 2 deletions
diff --git a/backendC/CleanCompilerSources/backend.c b/backendC/CleanCompilerSources/backend.c index f2023a6..b7a7785 100644 --- a/backendC/CleanCompilerSources/backend.c +++ b/backendC/CleanCompilerSources/backend.c @@ -133,6 +133,10 @@ STRUCT (be_state, BEState) SymbolP be_dontCareSymbol; SymbolP be_dictionarySelectFunSymbol; SymbolP be_dictionaryUpdateFunSymbol; + + // temporary hack + int be_dynamicTypeIndex; + int be_dynamicModuleIndex; }; static BEStateS gBEState = {False /* ... */}; @@ -2708,3 +2712,20 @@ BEFree (BackEnd backEnd) if (StdOutReopened) fclose (StdOut); } /* BEFree */ + + +// temporary hack + +void +BEDeclareDynamicTypeSymbol (int typeIndex, int moduleIndex) +{ + gBEState.be_dynamicTypeIndex = moduleIndex; + gBEState.be_dynamicModuleIndex = typeIndex; +} /* BEDeclareDynamicTypeSymbol */ + + +BESymbolP +BEDynamicTempTypeSymbol (void) +{ + return (BETypeSymbol (gBEState.be_dynamicTypeIndex, gBEState.be_dynamicModuleIndex)); +} /* BEDynamicTemp */ diff --git a/backendC/CleanCompilerSources/backend.icl b/backendC/CleanCompilerSources/backend.icl index b4c86f4..67c4c87 100644 --- a/backendC/CleanCompilerSources/backend.icl +++ b/backendC/CleanCompilerSources/backend.icl @@ -596,9 +596,21 @@ BESetMainDclModuleN a0 a1 = code { ccall BESetMainDclModuleN "I:V:I" }; // void BESetMainDclModuleN(int main_dcl_module_n_parameter); -kBEVersionCurrent:==0x02000204; + +BEDeclareDynamicTypeSymbol :: !Int !Int !BackEnd -> BackEnd; +BEDeclareDynamicTypeSymbol a0 a1 a2 = code { + ccall BEDeclareDynamicTypeSymbol "II:V:I" +}; +// void BEDeclareDynamicTypeSymbol(int typeIndex,int moduleIndex); + +BEDynamicTempTypeSymbol :: !BackEnd -> (!BESymbolP,!BackEnd); +BEDynamicTempTypeSymbol a0 = code { + ccall BEDynamicTempTypeSymbol ":I:I" +}; +// BESymbolP BEDynamicTempTypeSymbol(); +kBEVersionCurrent:==0x02000206; kBEVersionOldestDefinition:==0x02000204; -kBEVersionOldestImplementation:==0x02000204; +kBEVersionOldestImplementation:==0x02000206; kBEDebug:==1; kPredefinedModuleIndex:==1; BENoAnnot:==0; |