Permalink
Browse files

Conversion to unsafe: naming system

  • Loading branch information...
1 parent 1dc177d commit 4b32594d67f3542162644b3f87f571ce85496981 @endobson committed Sep 17, 2011
View
@@ -10,7 +10,7 @@
(provide (all-defined-out))
;/* Arithmetic */
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMBuildAdd
LLVMBuildNSWAdd
LLVMBuildNUWAdd
@@ -38,10 +38,10 @@
LLVMBuildXor)
(_fun LLVMBuilderRef LLVMValueRef LLVMValueRef _string -> LLVMValueRef))
-(define-llvm LLVMBuildBinOp
+(define-llvm-unsafe LLVMBuildBinOp
(_fun LLVMBuilderRef LLVMOpcode LLVMValueRef LLVMValueRef _string -> LLVMValueRef))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMBuildNeg
LLVMBuildNSWNeg
LLVMBuildNUWNeg
@@ -51,14 +51,14 @@
;/* Comparisons */
-(define-llvm LLVMBuildICmp
+(define-llvm-unsafe LLVMBuildICmp
(_fun LLVMBuilderRef
LLVMIntPredicate
LLVMValueRef
LLVMValueRef
_string -> LLVMValueRef))
-(define-llvm LLVMBuildFCmp
+(define-llvm-unsafe LLVMBuildFCmp
(_fun LLVMBuilderRef
LLVMRealPredicate
LLVMValueRef
@@ -9,58 +9,58 @@
(provide (all-defined-out))
-(define-llvm LLVMBlockAddress (_fun LLVMValueRef LLVMBasicBlockRef -> LLVMValueRef))
+(define-llvm-unsafe LLVMBlockAddress (_fun LLVMValueRef LLVMBasicBlockRef -> LLVMValueRef))
;/* Operations on basic blocks */
-(define-llvm LLVMBasicBlockAsValue (_fun LLVMBasicBlockRef -> LLVMValueRef))
-(define-llvm LLVMValueIsBasicBlock (_fun LLVMValueRef -> LLVMBool))
-(define-llvm LLVMValueAsBasicBlock (_fun LLVMValueRef -> LLVMBasicBlockRef))
-(define-llvm LLVMGetBasicBlockParent (_fun LLVMBasicBlockRef -> LLVMValueRef))
+(define-llvm-unsafe LLVMBasicBlockAsValue (_fun LLVMBasicBlockRef -> LLVMValueRef))
+(define-llvm-unsafe LLVMValueIsBasicBlock (_fun LLVMValueRef -> LLVMBool))
+(define-llvm-unsafe LLVMValueAsBasicBlock (_fun LLVMValueRef -> LLVMBasicBlockRef))
+(define-llvm-unsafe LLVMGetBasicBlockParent (_fun LLVMBasicBlockRef -> LLVMValueRef))
;(define-llvm LLVMGetBasicBlockTerminator (_fun LLVMBasicBlockRef -> LLVMValueRef))
;Not yet in my dev repo of llvm
-(define-llvm LLVMCountBasicBlocks (_fun LLVMValueRef -> _uint))
-(define-llvm LLVMGetBasicBlocks
+(define-llvm-unsafe LLVMCountBasicBlocks (_fun LLVMValueRef -> _uint))
+(define-llvm-unsafe LLVMGetBasicBlocks
(_fun (fun) ::
(fun : LLVMValueRef)
- (blocks : (_list o LLVMBasicBlockRef (LLVMCountBasicBlocks fun)))
+ (blocks : (_list o LLVMBasicBlockRef (unsafe:LLVMCountBasicBlocks fun)))
-> _void
-> blocks))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMGetEntryBasicBlock
LLVMGetFirstBasicBlock
LLVMGetLastBasicBlock)
(_fun LLVMValueRef -> LLVMBasicBlockRef))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMGetNextBasicBlock
LLVMGetPreviousBasicBlock)
(_fun LLVMBasicBlockRef -> LLVMBasicBlockRef))
-(define-llvm LLVMAppendBasicBlockInContext (_fun LLVMContextRef LLVMValueRef _string -> LLVMBasicBlockRef))
-(define-llvm LLVMInsertBasicBlockInContext (_fun LLVMContextRef LLVMBasicBlockRef _string -> LLVMBasicBlockRef))
+(define-llvm-unsafe LLVMAppendBasicBlockInContext (_fun LLVMContextRef LLVMValueRef _string -> LLVMBasicBlockRef))
+(define-llvm-unsafe LLVMInsertBasicBlockInContext (_fun LLVMContextRef LLVMBasicBlockRef _string -> LLVMBasicBlockRef))
-(define-llvm LLVMAppendBasicBlock
+(define-llvm-unsafe LLVMAppendBasicBlock
(_fun LLVMValueRef _string -> LLVMBasicBlockRef))
-(define-llvm LLVMInsertBasicBlock
+(define-llvm-unsafe LLVMInsertBasicBlock
(_fun LLVMBasicBlockRef _string -> LLVMBasicBlockRef))
-(define-llvm LLVMDeleteBasicBlock
+(define-llvm-unsafe LLVMDeleteBasicBlock
(_fun LLVMBasicBlockRef -> _void))
-;(define-llvm LLVMRemoveBasicBlockFromParent
+;(define-llvm-unsafe LLVMRemoveBasicBlockFromParent
; (_fun LLVMBasicBlockRef -> _void))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMMoveBasicBlockBefore
LLVMMoveBasicBlockAfter)
(_fun LLVMBasicBlockRef LLVMBasicBlockRef -> _void))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMGetFirstInstruction
LLVMGetLastInstruction)
(_fun LLVMBasicBlockRef -> LLVMValueRef))
View
@@ -14,32 +14,32 @@
; * exclusive means of building instructions using the C interface.
; */
-(define-llvm LLVMCreateBuilderInContext (_fun LLVMContextRef -> LLVMBuilderRef))
-(define-llvm LLVMCreateBuilder (_fun -> LLVMBuilderRef))
+(define-llvm-unsafe LLVMCreateBuilderInContext (_fun LLVMContextRef -> LLVMBuilderRef))
+(define-llvm-unsafe LLVMCreateBuilder (_fun -> LLVMBuilderRef))
-(define-llvm LLVMPositionBuilder (_fun LLVMBuilderRef LLVMBasicBlockRef LLVMValueRef -> _void))
-(define-llvm LLVMPositionBuilderBefore
+(define-llvm-unsafe LLVMPositionBuilder (_fun LLVMBuilderRef LLVMBasicBlockRef LLVMValueRef -> _void))
+(define-llvm-unsafe LLVMPositionBuilderBefore
(_fun LLVMBuilderRef LLVMValueRef -> _void))
-(define-llvm LLVMPositionBuilderAtEnd (_fun LLVMBuilderRef LLVMBasicBlockRef -> _void))
+(define-llvm-unsafe LLVMPositionBuilderAtEnd (_fun LLVMBuilderRef LLVMBasicBlockRef -> _void))
-(define-llvm LLVMGetInsertBlock (_fun LLVMBuilderRef -> LLVMBasicBlockRef))
+(define-llvm-unsafe LLVMGetInsertBlock (_fun LLVMBuilderRef -> LLVMBasicBlockRef))
-(define-llvm LLVMClearInsertionPosition
+(define-llvm-unsafe LLVMClearInsertionPosition
(_fun LLVMBuilderRef -> _void))
-(define-llvm LLVMInsertIntoBuilder
+(define-llvm-unsafe LLVMInsertIntoBuilder
(_fun LLVMBuilderRef LLVMValueRef -> _void))
-(define-llvm LLVMInsertIntoBuilderWithName
+(define-llvm-unsafe LLVMInsertIntoBuilderWithName
(_fun LLVMBuilderRef LLVMValueRef _string -> _void))
-(define-llvm LLVMDisposeBuilder (_fun LLVMBuilderRef -> _void))
+(define-llvm-unsafe LLVMDisposeBuilder (_fun LLVMBuilderRef -> _void))
;/* Metadata */
-(define-llvm LLVMGetCurrentDebugLocation (_fun LLVMBuilderRef -> LLVMValueRef))
-(define-llvm LLVMSetCurrentDebugLocation (_fun LLVMBuilderRef LLVMValueRef -> _void))
-(define-llvm LLVMSetInstDebugLocation (_fun LLVMBuilderRef LLVMValueRef -> _void))
+(define-llvm-unsafe LLVMGetCurrentDebugLocation (_fun LLVMBuilderRef -> LLVMValueRef))
+(define-llvm-unsafe LLVMSetCurrentDebugLocation (_fun LLVMBuilderRef LLVMValueRef -> _void))
+(define-llvm-unsafe LLVMSetInstDebugLocation (_fun LLVMBuilderRef LLVMValueRef -> _void))
View
@@ -9,7 +9,7 @@
(provide (all-defined-out))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMBuildTrunc
LLVMBuildZExt
LLVMBuildSExt
@@ -21,7 +21,7 @@
LLVMBuildFPExt)
(_fun LLVMBuilderRef LLVMValueRef LLVMTypeRef _string -> LLVMValueRef))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMBuildPtrToInt
LLVMBuildIntToPtr
LLVMBuildBitCast
@@ -33,5 +33,5 @@
LLVMBuildFPCast)
(_fun LLVMBuilderRef LLVMValueRef LLVMTypeRef _string -> LLVMValueRef))
-(define-llvm LLVMBuildCast
+(define-llvm-unsafe LLVMBuildCast
(_fun LLVMBuilderRef LLVMOpcode LLVMValueRef LLVMTypeRef _string -> LLVMValueRef))
View
@@ -10,8 +10,8 @@
(provide (all-defined-out))
;/* Operations on scalar constants */
-(define-llvm LLVMConstInt (_fun LLVMTypeRef _long LLVMBool -> LLVMValueRef))
-(define-llvm LLVMConstIntOfArbitraryPrecision
+(define-llvm-unsafe LLVMConstInt (_fun LLVMTypeRef _long LLVMBool -> LLVMValueRef))
+(define-llvm-unsafe LLVMConstIntOfArbitraryPrecision
(_fun (type words) ::
(type : LLVMTypeRef)
(_uint = (length words))
@@ -20,30 +20,30 @@
;/* Operations on constants of any type */
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMConstNull ; /* all zeroes */
LLVMConstAllOnes ; /* only for int/vector */
LLVMGetUndef
LLVMConstPointerNull)
(_fun LLVMTypeRef -> LLVMValueRef))
-(define-llvm LLVMConstIntOfString
+(define-llvm-unsafe LLVMConstIntOfString
(_fun LLVMTypeRef _string _uint8 -> LLVMValueRef))
-(define-llvm LLVMConstIntOfStringAndSize
+(define-llvm-unsafe LLVMConstIntOfStringAndSize
(_fun LLVMTypeRef _string _uint _uint8 -> LLVMValueRef))
-(define-llvm LLVMConstReal (_fun LLVMTypeRef _double* -> LLVMValueRef))
-(define-llvm LLVMConstRealOfString
+(define-llvm-unsafe LLVMConstReal (_fun LLVMTypeRef _double* -> LLVMValueRef))
+(define-llvm-unsafe LLVMConstRealOfString
(_fun LLVMTypeRef _string -> LLVMValueRef))
-(define-llvm LLVMConstRealOfStringAndSize
+(define-llvm-unsafe LLVMConstRealOfStringAndSize
(_fun LLVMTypeRef _string _uint -> LLVMValueRef))
-(define-llvm LLVMConstIntGetZExtValue (_fun LLVMValueRef -> _ulong))
-(define-llvm LLVMConstIntGetSExtValue (_fun LLVMValueRef -> _long))
+(define-llvm-unsafe LLVMConstIntGetZExtValue (_fun LLVMValueRef -> _ulong))
+(define-llvm-unsafe LLVMConstIntGetSExtValue (_fun LLVMValueRef -> _long))
;/* Operations on composite constants */
-(define-llvm LLVMConstStringInContext
+(define-llvm-unsafe LLVMConstStringInContext
(_fun (context str dnt) ::
(context : LLVMContextRef)
(str : _string)
@@ -52,7 +52,7 @@
-> LLVMValueRef))
-(define-llvm LLVMConstStructInContext
+(define-llvm-unsafe LLVMConstStructInContext
(_fun (context fields packed) ::
(context : LLVMContextRef)
(fields : (_list i LLVMValueRef))
@@ -61,7 +61,7 @@
-> LLVMValueRef))
-(define-llvm LLVMConstString
+(define-llvm-unsafe LLVMConstString
(_fun (str dnt) ::
(str : _string)
(_uint = (string-length str))
@@ -70,49 +70,49 @@
-(define-llvm LLVMConstStruct
+(define-llvm-unsafe LLVMConstStruct
(_fun (fields packed) ::
(fields : (_list i LLVMValueRef))
(_uint = (length fields))
(packed : LLVMBool)
-> LLVMValueRef))
-(define-llvm LLVMConstNamedStruct
+(define-llvm-unsafe LLVMConstNamedStruct
(_fun (type fields) ::
(type : LLVMTypeRef)
(fields : (_list i LLVMValueRef))
(_uint = (length fields))
-> LLVMValueRef))
-(define-llvm LLVMConstArray
+(define-llvm-unsafe LLVMConstArray
(_fun (type elements) ::
(type : LLVMTypeRef)
(elements : (_list i LLVMValueRef))
(_uint = (length elements))
-> LLVMValueRef))
-(define-llvm LLVMConstVector
+(define-llvm-unsafe LLVMConstVector
(_fun (elements) ::
(elements : (_list i LLVMValueRef))
(_uint = (length elements))
-> LLVMValueRef))
-(define-llvm LLVMGetConstOpcode (_fun LLVMValueRef -> LLVMOpcode))
-(define-llvm-multiple
+(define-llvm-unsafe LLVMGetConstOpcode (_fun LLVMValueRef -> LLVMOpcode))
+(define-llvm-multiple-unsafe
(LLVMAlignOf LLVMSizeOf) (_fun LLVMTypeRef -> LLVMValueRef))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMConstNeg
LLVMConstNSWNeg
LLVMConstNUWNeg
LLVMConstFNeg
LLVMConstNot)
(_fun LLVMValueRef -> LLVMValueRef))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMConstAdd
LLVMConstNSWAdd
LLVMConstNUWAdd
@@ -138,22 +138,22 @@
(_fun LLVMValueRef LLVMValueRef -> LLVMValueRef))
-(define-llvm LLVMConstICmp
+(define-llvm-unsafe LLVMConstICmp
(_fun LLVMIntPredicate LLVMValueRef LLVMValueRef -> LLVMValueRef))
-(define-llvm LLVMConstFCmp
+(define-llvm-unsafe LLVMConstFCmp
(_fun LLVMRealPredicate LLVMValueRef LLVMValueRef -> LLVMValueRef))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMConstShl LLVMConstLShr LLVMConstAShr)
(_fun LLVMValueRef LLVMValueRef -> LLVMValueRef))
-(define-llvm-multiple (LLVMConstGEP LLVMConstInBoundsGEP)
+(define-llvm-multiple-unsafe (LLVMConstGEP LLVMConstInBoundsGEP)
(_fun (ptr indices) ::
(ptr : LLVMValueRef)
(indices : (_list i LLVMValueRef))
(_uint = (length indices))
-> LLVMValueRef))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMConstTrunc
LLVMConstSExt
LLVMConstZExt
@@ -173,22 +173,22 @@
(_fun LLVMValueRef LLVMTypeRef -> LLVMValueRef))
-(define-llvm LLVMConstIntCast
+(define-llvm-unsafe LLVMConstIntCast
(_fun LLVMValueRef LLVMTypeRef LLVMBool -> LLVMValueRef))
-(define-llvm LLVMConstFPCast
+(define-llvm-unsafe LLVMConstFPCast
(_fun LLVMValueRef LLVMTypeRef -> LLVMValueRef))
-(define-llvm-multiple
+(define-llvm-multiple-unsafe
(LLVMConstSelect
LLVMConstInsertElement
LLVMConstShuffleVector)
(_fun LLVMValueRef LLVMValueRef LLVMValueRef -> LLVMValueRef))
-(define-llvm LLVMConstExtractElement
+(define-llvm-unsafe LLVMConstExtractElement
(_fun LLVMValueRef LLVMValueRef -> LLVMValueRef))
-(define-llvm LLVMConstExtractValue
+(define-llvm-unsafe LLVMConstExtractValue
(_fun (agg indices) ::
(agg : LLVMValueRef)
(indices : (_list i _uint))
@@ -197,7 +197,7 @@
LLVMValueRef))
-(define-llvm LLVMConstInsertValue
+(define-llvm-unsafe LLVMConstInsertValue
(_fun (agg elem indices) ::
(agg : LLVMValueRef)
(elem : LLVMValueRef)
@@ -206,4 +206,4 @@
->
LLVMValueRef))
-(define-llvm LLVMConstInlineAsm (_fun LLVMTypeRef _string _string LLVMBool LLVMBool -> LLVMValueRef))
+(define-llvm-unsafe LLVMConstInlineAsm (_fun LLVMTypeRef _string _string LLVMBool LLVMBool -> LLVMValueRef))
Oops, something went wrong.

0 comments on commit 4b32594

Please sign in to comment.