From a4fd096393b0f809aa4ed4dfbb6bae1c91b611dc Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Thu, 30 Aug 2018 05:32:18 +0200 Subject: [PATCH] Add dummy channel support --- compiler.go | 2 ++ src/runtime/chan.go | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 src/runtime/chan.go diff --git a/compiler.go b/compiler.go index b53e5242..2c2f5ade 100644 --- a/compiler.go +++ b/compiler.go @@ -462,6 +462,8 @@ func (c *Compiler) getLLVMType(goType types.Type) (llvm.Type, error) { default: return llvm.Type{}, errors.New("todo: unknown basic type: " + typ.String()) } + case *types.Chan: + return llvm.PointerType(c.mod.GetTypeByName("runtime.channel"), 0), nil case *types.Interface: return c.mod.GetTypeByName("runtime._interface"), nil case *types.Map: diff --git a/src/runtime/chan.go b/src/runtime/chan.go new file mode 100644 index 00000000..abd0b117 --- /dev/null +++ b/src/runtime/chan.go @@ -0,0 +1,8 @@ +package runtime + +// This file implements the 'chan' type and send/receive/select operations. + +// dummy + +type channel struct { +}