Better lowering of distinct types. Noreturn function call expr recognized as a "jump" for escape analysis. Preferring "def" in libs. To upper / to lower for ascii. Initial dynlib support.

This commit is contained in:
Christoffer Lerno
2023-05-21 21:25:33 +02:00
committed by Christoffer Lerno
parent a877d4458c
commit ddd0497922
55 changed files with 579 additions and 416 deletions

View File

@@ -6,7 +6,7 @@ $if !env::os_is_win32() && $defined(AddrInfo):
const int F_GETFL = 3;
const int F_SETFL = 4;
typedef NativeSocket = distinct int;
def NativeSocket = distinct int;
extern fn NativeSocket socket(int af, int type, int protocol) @extern("socket");
extern fn int getaddrinfo(ZString nodename, ZString servname, AddrInfo* hints, AddrInfo** res);

View File

@@ -22,7 +22,7 @@ struct AddrInfo
AddrInfo* ai_next;
}
typedef NativeSocket = distinct uptr;
def NativeSocket = distinct uptr;
extern fn int wsa_startup(int, void*) @extern("WSAStartup");
extern fn int ioctlsocket(NativeSocket, long cmd, ulong *argp);