From 57c1920c80dcc7d52cda771affde1c4a2e451028 Mon Sep 17 00:00:00 2001 From: ronny Date: Fri, 23 Feb 2001 13:06:31 +0000 Subject: temporary hack: redirect basic type Dynamic to DynamicTemp from StdDynamic git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@302 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- backendC/CleanCompilerSources/backend.c | 21 +++++++++++++++++++++ backendC/CleanCompilerSources/backend.icl | 16 ++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) (limited to 'backendC/CleanCompilerSources') 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; -- cgit v1.2.3