mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Merge remote-tracking branch 'origin/trunk' into divTruncate
This commit is contained in:
commit
bd98ac6dc7
33 changed files with 2455 additions and 1155 deletions
|
@ -83,6 +83,7 @@ const FLOATS = [_]type{ f32, f64 };
|
|||
const NUMBERS = INTEGERS ++ FLOATS;
|
||||
|
||||
comptime {
|
||||
exportNumFn(num.divCeil, "div_ceil");
|
||||
exportNumFn(num.bytesToU16C, "bytes_to_u16");
|
||||
exportNumFn(num.bytesToU32C, "bytes_to_u32");
|
||||
|
||||
|
|
|
@ -57,6 +57,10 @@ pub fn exportRound(comptime T: type, comptime name: []const u8) void {
|
|||
@export(f, .{ .name = name ++ @typeName(T), .linkage = .Strong });
|
||||
}
|
||||
|
||||
pub fn divCeil(numerator: i64, denominator: i64) callconv(.C) i64 {
|
||||
return @call(.{ .modifier = always_inline }, math.divCeil, .{ i64, numerator, denominator }) catch unreachable;
|
||||
}
|
||||
|
||||
pub fn bytesToU16C(arg: RocList, position: usize) callconv(.C) u16 {
|
||||
return @call(.{ .modifier = always_inline }, bytesToU16, .{ arg, position });
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue