authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-03-08 10:07:21-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-04-08 18:30:54-04:00
logb85ef656caa4d6845996d60a091332e9113d17e2
tree6483ccf3d8b9639e8c862f2c473af8cbba373438
parent0d22a00f6fde79f851a7d19c2096c07f541ed0be

running into the llvm corosplit error again


3 files changed, 21 insertions(+), 4 deletions(-)

src/ir.cpp+11
...@@ -2647,6 +2647,17 @@ static IrInstruction *ir_build_coro_alloc_helper(IrBuilder *irb, Scope *scope, A...@@ -2647,6 +2647,17 @@ static IrInstruction *ir_build_coro_alloc_helper(IrBuilder *irb, Scope *scope, A
2647 return &instruction->base;2647 return &instruction->base;
2648}2648}
26492649
2650static IrInstruction *ir_build_add_implicit_return_type(IrBuilder *irb, Scope *scope, AstNode *source_node,
2651 IrInstruction *value)
2652{
2653 IrInstructionAddImplicitReturnType *instruction = ir_build_instruction<IrInstructionAddImplicitReturnType>(irb, scope, source_node);
2654 instruction->value = value;
2655
2656 ir_ref_instruction(value, irb->current_basic_block);
2657
2658 return &instruction->base;
2659}
2660
2650static IrInstruction *ir_build_atomic_rmw(IrBuilder *irb, Scope *scope, AstNode *source_node,2661static IrInstruction *ir_build_atomic_rmw(IrBuilder *irb, Scope *scope, AstNode *source_node,
2651 IrInstruction *operand_type, IrInstruction *ptr, IrInstruction *op, IrInstruction *operand,2662 IrInstruction *operand_type, IrInstruction *ptr, IrInstruction *op, IrInstruction *operand,
2652 IrInstruction *ordering, AtomicRmwOp resolved_op, AtomicOrder resolved_ordering)2663 IrInstruction *ordering, AtomicRmwOp resolved_op, AtomicOrder resolved_ordering)
src/ir_print.cpp+6
...@@ -1146,6 +1146,12 @@ static void ir_print_coro_alloc_helper(IrPrint *irp, IrInstructionCoroAllocHelpe...@@ -1146,6 +1146,12 @@ static void ir_print_coro_alloc_helper(IrPrint *irp, IrInstructionCoroAllocHelpe
1146 fprintf(irp->f, ")");1146 fprintf(irp->f, ")");
1147}1147}
11481148
1149static void ir_print_add_implicit_return_type(IrPrint *irp, IrInstructionAddImplicitReturnType *instruction) {
1150 fprintf(irp->f, "@addImplicitReturnType(");
1151 ir_print_other_instruction(irp, instruction->value);
1152 fprintf(irp->f, ")");
1153}
1154
1149static void ir_print_atomic_rmw(IrPrint *irp, IrInstructionAtomicRmw *instruction) {1155static void ir_print_atomic_rmw(IrPrint *irp, IrInstructionAtomicRmw *instruction) {
1150 fprintf(irp->f, "@atomicRmw(");1156 fprintf(irp->f, "@atomicRmw(");
1151 if (instruction->operand_type != nullptr) {1157 if (instruction->operand_type != nullptr) {
std/event.zig+4-4
...@@ -168,10 +168,10 @@ test "listen on a port, send bytes, receive bytes" {...@@ -168,10 +168,10 @@ test "listen on a port, send bytes, receive bytes" {
168 var socket = *_socket; // TODO https://github.com/zig-lang/zig/issues/733168 var socket = *_socket; // TODO https://github.com/zig-lang/zig/issues/733
169 defer socket.close();169 defer socket.close();
170 const next_handler = async errorableHandler(self, _addr, socket) catch |err| switch (err) {170 const next_handler = async errorableHandler(self, _addr, socket) catch |err| switch (err) {
171 error.OutOfMemory => return,171 error.OutOfMemory => @panic("unable to handle connection: out of memory"),
172 };172 };
173 (await next_handler) catch |err| switch (err) {173 (await next_handler) catch |err| {
174 174 std.debug.panic("unable to handle connection: {}\n", err);
175 };175 };
176 suspend |p| { cancel p; }176 suspend |p| { cancel p; }
177 }177 }
...@@ -184,7 +184,7 @@ test "listen on a port, send bytes, receive bytes" {...@@ -184,7 +184,7 @@ test "listen on a port, send bytes, receive bytes" {
184184
185 var adapter = std.io.FileOutStream.init(&socket);185 var adapter = std.io.FileOutStream.init(&socket);
186 var stream = &adapter.stream;186 var stream = &adapter.stream;
187 try stream.print("hello from server\n") catch unreachable;187 try stream.print("hello from server\n");
188 }188 }
189 };189 };
190190