diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-07-12 15:08:40 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-07-12 15:12:44 -0400 |
| commit | 687bd92f9c3d9f521c8fe5884627ef1b00320364 (patch) | |
| tree | 298cff9330e4c4d4914d0cb4d047805c5b15153d /std | |
| parent | ce11d6d16cf388ec7abff9680ee3a263185a9986 (diff) | |
| download | zig-687bd92f9c3d9f521c8fe5884627ef1b00320364.tar.gz zig-687bd92f9c3d9f521c8fe5884627ef1b00320364.zip | |
self-hosted: generate zig IR for simple function
no tests for this yet. I think the quickest path to testing will be
creating the .o files and linking with libc, executing, and then
comparing output.
Diffstat (limited to 'std')
| -rw-r--r-- | std/event/future.zig | 2 | ||||
| -rw-r--r-- | std/zig/ast.zig | 6 | ||||
| -rw-r--r-- | std/zig/parse.zig | 5 |
3 files changed, 1 insertions, 12 deletions
diff --git a/std/event/future.zig b/std/event/future.zig index b6ec861f77..23fa570c8f 100644 --- a/std/event/future.zig +++ b/std/event/future.zig @@ -57,7 +57,7 @@ test "std.event.Future" { const allocator = &da.allocator; var loop: Loop = undefined; - try loop.initSingleThreaded(allocator); + try loop.initMultiThreaded(allocator); defer loop.deinit(); const handle = try async<allocator> testFuture(&loop); diff --git a/std/zig/ast.zig b/std/zig/ast.zig index 63518c5182..004f9278b9 100644 --- a/std/zig/ast.zig +++ b/std/zig/ast.zig @@ -970,14 +970,8 @@ pub const Node = struct { pub const Defer = struct { base: Node, defer_token: TokenIndex, - kind: Kind, expr: *Node, - const Kind = enum { - Error, - Unconditional, - }; - pub fn iterate(self: *Defer, index: usize) ?*Node { var i = index; diff --git a/std/zig/parse.zig b/std/zig/parse.zig index 9f0371d4da..9842ba2a17 100644 --- a/std/zig/parse.zig +++ b/std/zig/parse.zig @@ -1041,11 +1041,6 @@ pub fn parse(allocator: *mem.Allocator, source: []const u8) !ast.Tree { const node = try arena.create(ast.Node.Defer{ .base = ast.Node{ .id = ast.Node.Id.Defer }, .defer_token = token_index, - .kind = switch (token_ptr.id) { - Token.Id.Keyword_defer => ast.Node.Defer.Kind.Unconditional, - Token.Id.Keyword_errdefer => ast.Node.Defer.Kind.Error, - else => unreachable, - }, .expr = undefined, }); const node_ptr = try block.statements.addOne(); |
