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
26472647 return &instruction->base;
26482648}
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
26502661static IrInstruction *ir_build_atomic_rmw(IrBuilder *irb, Scope *scope, AstNode *source_node,
26512662 IrInstruction *operand_type, IrInstruction *ptr, IrInstruction *op, IrInstruction *operand,
26522663 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
11461146 fprintf(irp->f, ")");
11471147}
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
11491155static void ir_print_atomic_rmw(IrPrint *irp, IrInstructionAtomicRmw *instruction) {
11501156 fprintf(irp->f, "@atomicRmw(");
11511157 if (instruction->operand_type != nullptr) {
std/event.zig+4-4
......@@ -168,10 +168,10 @@ test "listen on a port, send bytes, receive bytes" {
168168 var socket = *_socket; // TODO https://github.com/zig-lang/zig/issues/733
169169 defer socket.close();
170170 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"),
172172 };
173 (await next_handler) catch |err| switch (err) {
174
173 (await next_handler) catch |err| {
174 std.debug.panic("unable to handle connection: {}\n", err);
175175 };
176176 suspend |p| { cancel p; }
177177 }
......@@ -184,7 +184,7 @@ test "listen on a port, send bytes, receive bytes" {
184184
185185 var adapter = std.io.FileOutStream.init(&socket);
186186 var stream = &adapter.stream;
187 try stream.print("hello from server\n") catch unreachable;
187 try stream.print("hello from server\n");
188188 }
189189 };
190190