aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorjohnvg2006-01-05 13:44:32 +0000
committerjohnvg2006-01-05 13:44:32 +0000
commit089e19102f95ba3d2187a673138894d44c758e9f (patch)
treea7efe72353de1e8e56ed1fd6d7112b3d31adec5d /backend
parentport to 64 bit windows (diff)
use BEGetIntFromArray instead of BECopyInts to fix a problem if integers
have different sizes in clean and c git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1585 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'backend')
-rw-r--r--backend/backend.dcl4
-rw-r--r--backend/backend.icl9
-rw-r--r--backend/backendinterface.icl6
3 files changed, 17 insertions, 2 deletions
diff --git a/backend/backend.dcl b/backend/backend.dcl
index 07cfbfe..2c696be 100644
--- a/backend/backend.dcl
+++ b/backend/backend.dcl
@@ -283,8 +283,10 @@ BESetMainDclModuleN :: !Int !BackEnd -> BackEnd;
// void BESetMainDclModuleN (int main_dcl_module_n_parameter);
BEStrictPositions :: !Int !BackEnd -> (!Int,!Int,!BackEnd);
// void BEStrictPositions (int functionIndex,int* bits,int** positions);
-BECopyInts :: !Int !Int !Int -> Int;
+//BECopyInts :: !Int !Int !Int -> Int;
// int BECopyInts (int cLength,int* ints,int* cleanArray);
+BEGetIntFromArray :: !Int !Int -> Int;
+// int BEGetIntFromArray (int index,int* ints);
BEDeclareDynamicTypeSymbol :: !Int !Int !BackEnd -> BackEnd;
// void BEDeclareDynamicTypeSymbol (int typeIndex,int moduleIndex);
BEDynamicTempTypeSymbol :: !BackEnd -> (!BESymbolP,!BackEnd);
diff --git a/backend/backend.icl b/backend/backend.icl
index dbd4441..44653b0 100644
--- a/backend/backend.icl
+++ b/backend/backend.icl
@@ -775,13 +775,20 @@ BEStrictPositions a0 a1 = code {
ccall BEStrictPositions "I:VII:I"
}
// void BEStrictPositions (int functionIndex,int* bits,int** positions);
-
+/*
BECopyInts :: !Int !Int !Int -> Int;
BECopyInts a0 a1 a2 = code {
ccall BECopyInts "III:I"
}
+*/
// int BECopyInts (int cLength,int* ints,int* cleanArray);
+BEGetIntFromArray :: !Int !Int -> Int;
+BEGetIntFromArray a0 a1 = code {
+ ccall BEGetIntFromArray "II:I"
+}
+// int BEGetIntFromArray (int index,int* ints);
+
BEDeclareDynamicTypeSymbol :: !Int !Int !BackEnd -> BackEnd;
BEDeclareDynamicTypeSymbol a0 a1 a2 = code {
ccall BEDeclareDynamicTypeSymbol "II:V:I"
diff --git a/backend/backendinterface.icl b/backend/backendinterface.icl
index ca72776..9b08d0f 100644
--- a/backend/backendinterface.icl
+++ b/backend/backendinterface.icl
@@ -412,6 +412,7 @@ typeToClass {dtci_iclModuleIndex, dtci_iclModule, dtci_dclModules} {type_ident,
nIclClasses
= size dtci_iclModule.icl_common.com_class_defs
+/*
copyInts :: !Int !Int -> {#Int}
copyInts length cArray
= code {
@@ -422,3 +423,8 @@ copyInts length cArray
ccall BECopyInts "IIA-I"
pop_b 1
}
+*/
+
+copyInts :: !Int !Int -> {#Int}
+copyInts length cArray
+ = {BEGetIntFromArray i cArray \\ i<-[0..length-1]} \ No newline at end of file