Bootstrapped in use of q{} QuoteMacro syntax to replace ##().
[cslatevm.git] / src / llvm / lib.slate
blob179da1332a01884d598ffdf1ee18fdaa71df066f
1 Lib ::= ExternalInterface newForLibrary: 'llvm-lib' primitives: q{
2 "Create and destroy modules"
3     (Pointer LLVMModuleCreateWithName(CString))
4     (Void LLVMDisposeModule(Pointer))
5     (Int LLVMVerifyModule(Pointer Int Bytes))
6     (Void LLVMDumpModule(Pointer))
7     (Int LLVMWriteBitcodeToFile(Pointer CString))
8     (CString LLVMGetDataLayout(Pointer))
9     (Void LLVMGetDataLayout(Pointer CString))
10     (CString LLVMGetTarget(Pointer))
11     (Void LLVMSetTarget(Pointer CString))
12     (Void LLVMDeleteTypeName(Pointer CString))
13     (Int LLVMAddTypeName(Pointer CString Pointer))
15 "Operations on global variables"
16     (Pointer LLVMAddGlobal(Pointer Pointer CString))
17     (Pointer LLVMGetNamedGlobal(Pointer CString))
19 "Operations on function variables"
20     (Pointer LLVMAddFunction(Pointer CString Pointer))
21     (Pointer LLVMGetNamedFunction(Pointer CString))
23 "Operations on integer types"
24     (Pointer LLVMInt1Type())
25     (Pointer LLVMInt8Type())
26     (Pointer LLVMInt16Type())
27     (Pointer LLVMInt32Type())
28     (Pointer LLVMInt64Type())
29     (Pointer LLVMIntType(Int))
31 "Operations on function types "
32     (Pointer LLVMFunctionType(Pointer Bytes Int Boolean))
33     (Pointer LLVMGetReturnType(Pointer))
35 "Operations on other types"
36     (Pointer LLVMVoidType())
37     (Pointer LLVMLabelType())
38     (Pointer LLVMOpaqueType())
40 "Operations on struct types"
41     (Pointer LLVMStructType(Bytes Int Boolean))
42     (Void LLVMRefineType(Pointer Pointer))
44 "Operations on array, pointer, and vector types (sequence types)"
45     (Pointer LLVMPointerType(Pointer Int))
46     (Pointer LLVMArrayType(Pointer Int))
47     (Pointer LLVMVectorType(Pointer Int))
49 "Operations on type handles"
50     (Pointer LLVMCreateTypeHandle(Pointer))
51     (Void LLVMDisposeTypeHandle(Pointer))
52     (Pointer LLVMResolveTypeHandle(Pointer))
54 "Instruction builders"
55     (Pointer LLVMCreateBuilder())
56     (Void LLVMDisposeBuilder(Pointer))
57     (Void LLVMPositionBuilderAtEnd(Pointer Pointer))
58     
59 "Terminators"
60     (Pointer LLVMBuildRetVoid(Pointer))
61     (Pointer LLVMBuildRet(Pointer Pointer))
62     
63 "Arithmetic"
64     (Pointer LLVMBuildAdd(Pointer Pointer Pointer CString))
66 "Miscellaneous instructions"
67     (Pointer LLVMBuildCall(Pointer Pointer Bytes Int CString))
69 "Operations on all values"
70     (CString LLVMGetValueName(Pointer))
71     (Void LLVMSetValueName(Pointer CString))
73 "Operations on parameters"
74     (Int LLVMCountParams(Pointer))
75     (Pointer LLVMGetParam(Pointer Int))
77 "Operations on scalar constants"
78     (Pointer LLVMConstInt(Pointer Int Boolean))
80 "Operations on basic blocks"
81     (Pointer LLVMAppendBasicBlock(Pointer CString))
83 "Operations on functions"
84     (Boolean LLVMVerifyFunction(Pointer Int))
85     
86 "Error handling"
87     (Void LLVMDisposeMessage(Pointer))
89 "Constant expressions"
90     (Pointer LLVMConstIntToPtr(Pointer Pointer))
92 "Memory instructions"
93     (Pointer LLVMBuildAlloca(Pointer Pointer CString))
94     (Pointer LLVMBuildStore(Pointer Pointer Pointer))
95     (Pointer LLVMBuildLoad(Pointer Pointer CString))
98 Lib enable.
100 Wrapper ::= ExternalInterface newForLibrary: 'llvm-wrapper' primitives: q{
103 Wrapper enable.