--- a/LLVMObject.st Sun Sep 13 07:27:07 2015 +0100
+++ b/LLVMObject.st Mon Sep 14 11:12:31 2015 +0100
@@ -40,6 +40,16 @@
"
! !
+!LLVMObject class methodsFor:'asserting'!
+
+assertIsString:aString
+ <resource: #skipInDebuggersWalkBack>
+
+ self assert:(aString isSymbol or:[aString isSingleByteString]) message:'string is not a valid LLVM name (twine)'
+
+ "Created: / 14-09-2015 / 10:39:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!LLVMObject class methodsFor:'queries'!
isAbstract
@@ -53,75 +63,82 @@
!LLVMObject methodsFor:'assertions'!
assertIsBasicBlock: value
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert:(value isKindOf: LLVMBasicBlock) message: 'value is not an LLVM basic block'
"Created: / 15-08-2015 / 23:45:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:08:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsBasicBlockValue:value
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert:value isLLVMValue.
self assert:value isBasicBlockValue
"Created: / 08-08-2015 / 02:43:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:08:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsBoolean: value
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: value isBoolean message: 'value is not a boolean'.
"Created: / 13-08-2015 / 06:52:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:08:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsFunctionValue: value
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: value isLLVMFunction message: 'value is not an LLVMFunction'.
"Created: / 10-08-2015 / 18:55:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsInteger64Unsigned:value
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: value isInteger message: 'value is not an integer'.
self assert: (value between: 0 and: 16rFFFFFFFFFFFFFFFF) message: 'value out of range'
"Created: / 14-08-2015 / 07:32:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsIntegerOrIntegerVectorValue:value
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert:(value class == LLVMValue) message:'value is not an LLVMValue'.
self assert:(value isIntegerOrIntegerVectorValue)
- "Modified (format): / 08-08-2015 / 02:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsIntegerUnsigned:value
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: value isInteger message: 'value is not an integer'.
self assert: (value between: 0 and: 16rFFFFFFFF) message: 'value out of range'
"Created: / 13-08-2015 / 06:49:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsMetadata: value
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: value isLLVMMetadata message: 'value is not an LLVMMetadata'.
"Created: / 14-08-2015 / 08:50:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsMetadataArray: values
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: values isSequenceable message: 'values is not a sequenceable collection'.
values do:[:value |
@@ -129,27 +146,29 @@
].
"Created: / 14-08-2015 / 08:50:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsString:aString
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
- self assert:(aString isSymbol or:[aString isSingleByteString]) description:'string is not a valid LLVM name (twine)'
+ self assert:(aString isSymbol or:[aString isSingleByteString]) message:'string is not a valid LLVM name (twine)'
"Created: / 07-08-2015 / 18:38:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 13-08-2015 / 07:01:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsType: type
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: type isLLVMType message: 'value is not an LLVMType'.
"Created: / 10-08-2015 / 06:26:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsTypeArray: types
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: types isSequenceable message: 'types is not a sequenceable collection'.
types do:[:type |
@@ -157,36 +176,40 @@
].
"Created: / 10-08-2015 / 17:08:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsValue: value
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: value isLLVMValue message: 'value is not an LLVMValue'.
"Created: / 08-08-2015 / 03:11:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsValue: value ofKind: kind
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: value isLLVMValue message: 'value is not an LLVMValue'.
self assert: value type kind = kind message: 'value has incorrect kind'
"Created: / 10-08-2015 / 17:40:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsValue: value ofType: type
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: value isLLVMValue message: 'value is not an LLVMValue'.
self assert: value type = type message: 'value has incorrect type'
"Created: / 08-08-2015 / 02:49:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsValueArray: values
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: values isSequenceable message: 'values is not a sequenceable collection'.
values do:[:value |
@@ -194,14 +217,15 @@
].
"Created: / 10-08-2015 / 18:56:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
assertIsValueOfSameType:value1 as:value2
- <resource: #skipInDebuggersWalkback>
+ <resource: #skipInDebuggersWalkBack>
self assert: value1 type = value2 type message:'types of values differ!!'
"Created: / 07-08-2015 / 18:37:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 08-08-2015 / 02:57:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-09-2015 / 11:09:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !