mirror of
https://github.com/ziglang/zig.git
synced 2026-02-20 16:24:51 +00:00
ran zig fmt on stdlib
This commit is contained in:
parent
29e6541db1
commit
14ae23326e
@ -84,7 +84,9 @@ pub fn BloomFilter(
|
||||
pub fn add(self: *Self, item: []const u8) void {
|
||||
comptime var i = 0;
|
||||
inline while (i < K) : (i += 1) {
|
||||
var K_th_bit: packed struct { x: Index } = undefined;
|
||||
var K_th_bit: packed struct {
|
||||
x: Index,
|
||||
} = undefined;
|
||||
hash(std.mem.asBytes(&K_th_bit), i, item);
|
||||
incrementCell(self, K_th_bit.x);
|
||||
}
|
||||
@ -93,7 +95,9 @@ pub fn BloomFilter(
|
||||
pub fn contains(self: Self, item: []const u8) bool {
|
||||
comptime var i = 0;
|
||||
inline while (i < K) : (i += 1) {
|
||||
var K_th_bit: packed struct { x: Index } = undefined;
|
||||
var K_th_bit: packed struct {
|
||||
x: Index,
|
||||
} = undefined;
|
||||
hash(std.mem.asBytes(&K_th_bit), i, item);
|
||||
if (getCell(self, K_th_bit.x) == cellEmpty)
|
||||
return false;
|
||||
|
||||
@ -2415,7 +2415,8 @@ stdcallcc fn handleSegfaultWindows(info: *windows.EXCEPTION_POINTERS) c_long {
|
||||
}
|
||||
|
||||
pub fn dumpStackPointerAddr(prefix: []const u8) void {
|
||||
const sp = asm ("" : [argc] "={rsp}" (-> usize));
|
||||
const sp = asm (""
|
||||
: [argc] "={rsp}" (-> usize)
|
||||
);
|
||||
std.debug.warn("{} sp = 0x{x}\n", prefix, sp);
|
||||
}
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ pub extern fn clone(func: extern fn (arg: usize) u8, stack: usize, flags: u32, a
|
||||
// that to llvm via zig, see https://github.com/ziglang/zig/issues/2883.
|
||||
// LLVM expects libc to provide this function as __aeabi_read_tp, so it is exported if needed from special/c.zig.
|
||||
pub extern fn getThreadPointer() usize {
|
||||
return asm volatile("mrc p15, 0, %[ret], c13, c0, 3"
|
||||
return asm volatile ("mrc p15, 0, %[ret], c13, c0, 3"
|
||||
: [ret] "=r" (-> usize)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,7 +234,8 @@ fn parseTopLevelDecl(arena: *Allocator, it: *TokenIterator, tree: *Tree) !?*Node
|
||||
|
||||
if (extern_export_inline_token) |token| {
|
||||
if (tree.tokens.at(token).id == .Keyword_inline or
|
||||
tree.tokens.at(token).id == .Keyword_noinline) {
|
||||
tree.tokens.at(token).id == .Keyword_noinline)
|
||||
{
|
||||
putBackToken(it, token);
|
||||
return null;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user