Commit 867591c0 authored by John van Groningen's avatar John van Groningen
Browse files

use BEGetIntFromArray instead of BECopyInts to fix a problem if integers

have different sizes in clean and c
parent 27acd96d
......@@ -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);
......
......@@ -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"
......
......@@ -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
......@@ -121,6 +121,7 @@
/EXPORT: BESetMainDclModuleN
/EXPORT: BEStrictPositions
/EXPORT: BECopyInts
/EXPORT: BEGetIntFromArray
/EXPORT: BEDeclareDynamicTypeSymbol
/EXPORT: BEDynamicTempTypeSymbol
/EXPORT: BEInsertForeignExport
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment