on master help sign in
SystemInfo primitive added to Java Backend
fca147bJan Bessai
src/IRTS/Java/JTypes.hs+2−1
@@ -305,6 +305,7 @@ sourceTypes (LStdErr) = []
305sourceTypes (LAllocate) = [addressType]
305sourceTypes (LAllocate) = [addressType]
306sourceTypes (LAppendBuffer) =
306sourceTypes (LAppendBuffer) =
307 [bufferType, addressType, addressType, addressType, addressType, bufferType]
307 [bufferType, addressType, addressType, addressType, addressType, bufferType]
308+sourceTypes (LSystemInfo) = [integerType]
308sourceTypes (LAppend nt _) = [bufferType, intTyToJType nt, addressType]
309sourceTypes (LAppend nt _) = [bufferType, intTyToJType nt, addressType]
309sourceTypes (LPeek _ _) = [bufferType, addressType]
310sourceTypes (LPeek _ _) = [bufferType, addressType]
310sourceTypes (LFork) = [objectType]
311sourceTypes (LFork) = [objectType]
@@ -319,7 +320,7 @@ sourceTypes (LNoOp) = repeat objectType
319endiannessConstant :: Endianness -> Exp
320endiannessConstant :: Endianness -> Exp
320endiannessConstant c =
321endiannessConstant c =
321 ExpName . Name . map Ident $ ["java", "nio", "ByteOrder", endiannessConstant' c]
322 ExpName . Name . map Ident $ ["java", "nio", "ByteOrder", endiannessConstant' c]
322− where
323+ where
323 endiannessConstant' BE = "BIG_ENDIAN"
324 endiannessConstant' BE = "BIG_ENDIAN"
324 endiannessConstant' LE = "LITTLE_ENDIAN"
325 endiannessConstant' LE = "LITTLE_ENDIAN"
325 endiannessConstant' (IRTS.Lang.Native) = endiannessConstant' BE
326 endiannessConstant' (IRTS.Lang.Native) = endiannessConstant' BE