1
1
mirror of https://github.com/tweag/asterius.git synced 2024-09-11 08:55:32 +03:00

kill memchr

This commit is contained in:
Cheng Shao 2020-10-15 14:33:24 +00:00
parent cb13f5faf6
commit e12d8aa8f0
3 changed files with 0 additions and 28 deletions

View File

@ -223,12 +223,6 @@ export class Memory {
}
}
memchr(_ptr, val, num) {
return Memory.tagData(
this.components.exports.memchr(Memory.unTag(_ptr), val, num)
);
}
memcpy(_dst, _src, n) {
return Memory.tagData(
this.components.exports.memcpy(Memory.unTag(_dst), Memory.unTag(_src), n)

View File

@ -157,7 +157,6 @@ rtsAsteriusModule opts =
<> printF64Function opts
<> assertEqI64Function opts
<> debugBelch2Function opts
<> memchrFunction opts
<> memcpyFunction opts
<> memsetFunction opts
<> memcmpFunction opts
@ -421,15 +420,6 @@ rtsFunctionImports debug =
returnTypes = []
}
},
FunctionImport
{ internalName = "__asterius_memchr",
externalModuleName = "Memory",
externalBaseName = "memchr",
functionType = FunctionType
{ paramTypes = [F64, F64, F64],
returnTypes = [F64]
}
},
FunctionImport
{ internalName = "__asterius_memcpy",
externalModuleName = "Memory",
@ -1323,17 +1313,6 @@ debugBelch2Function _ = runEDSL "debugBelch2" $ do
"__asterius_debugBelch2"
[convertUInt64ToFloat64 fmt, convertUInt64ToFloat64 str]
memchrFunction :: BuiltinsOptions -> AsteriusModule
memchrFunction _ = runEDSL "memchr" $ do
setReturnTypes [I64]
[ptr, val, num] <- params [I64, I64, I64]
p <-
callImport'
"__asterius_memchr"
(map convertUInt64ToFloat64 [ptr, val, num])
F64
emit $ truncUFloat64ToInt64 p
memcpyFunction :: BuiltinsOptions -> AsteriusModule
memcpyFunction _ = runEDSL "memcpy" $ do
setReturnTypes [I64]

View File

@ -32,7 +32,6 @@ defLibCOpts =
exports =
[ "aligned_alloc",
"free",
"memchr",
"memcpy",
"memmove",
"memcmp"