authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2019-09-25 18:17:29+03:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-09-25 12:44:11-04:00
log14ae23326ee3b20f706051b37c169c872337af8c
treee1d962adf539cac59fa6035b58905c3ab47bcfb6
parent29e6541db1ad79656a3a7743de65bd452ea64bce

ran zig fmt on stdlib


4 files changed, 13 insertions(+), 7 deletions(-)

std/bloom_filter.zig+6-2
......@@ -84,7 +84,9 @@ pub fn BloomFilter(
8484 pub fn add(self: *Self, item: []const u8) void {
8585 comptime var i = 0;
8686 inline while (i < K) : (i += 1) {
87 var K_th_bit: packed struct { x: Index } = undefined;
87 var K_th_bit: packed struct {
88 x: Index,
89 } = undefined;
8890 hash(std.mem.asBytes(&K_th_bit), i, item);
8991 incrementCell(self, K_th_bit.x);
9092 }
......@@ -93,7 +95,9 @@ pub fn BloomFilter(
9395 pub fn contains(self: Self, item: []const u8) bool {
9496 comptime var i = 0;
9597 inline while (i < K) : (i += 1) {
96 var K_th_bit: packed struct { x: Index } = undefined;
98 var K_th_bit: packed struct {
99 x: Index,
100 } = undefined;
97101 hash(std.mem.asBytes(&K_th_bit), i, item);
98102 if (getCell(self, K_th_bit.x) == cellEmpty)
99103 return false;
std/debug.zig+3-2
......@@ -2415,7 +2415,8 @@ stdcallcc fn handleSegfaultWindows(info: *windows.EXCEPTION_POINTERS) c_long {
24152415}
24162416
24172417pub fn dumpStackPointerAddr(prefix: []const u8) void {
2418 const sp = asm ("" : [argc] "={rsp}" (-> usize));
2418 const sp = asm (""
2419 : [argc] "={rsp}" (-> usize)
2420 );
24192421 std.debug.warn("{} sp = 0x{x}\n", prefix, sp);
24202422}
2421
std/os/linux/arm-eabi.zig+2-2
......@@ -90,7 +90,7 @@ pub extern fn clone(func: extern fn (arg: usize) u8, stack: usize, flags: u32, a
9090// that to llvm via zig, see https://github.com/ziglang/zig/issues/2883.
9191// LLVM expects libc to provide this function as __aeabi_read_tp, so it is exported if needed from special/c.zig.
9292pub extern fn getThreadPointer() usize {
93 return asm volatile("mrc p15, 0, %[ret], c13, c0, 3"
93 return asm volatile ("mrc p15, 0, %[ret], c13, c0, 3"
9494 : [ret] "=r" (-> usize)
9595 );
96}
\ No newline at end of file
96}
std/zig/parse.zig+2-1
......@@ -234,7 +234,8 @@ fn parseTopLevelDecl(arena: *Allocator, it: *TokenIterator, tree: *Tree) !?*Node
234234
235235 if (extern_export_inline_token) |token| {
236236 if (tree.tokens.at(token).id == .Keyword_inline or
237 tree.tokens.at(token).id == .Keyword_noinline) {
237 tree.tokens.at(token).id == .Keyword_noinline)
238 {
238239 putBackToken(it, token);
239240 return null;
240241 }