diff -r 51ac97a0e87d -r 0933f973bc22 LLVMObject.st --- 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 + + + 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 " +! ! + !LLVMObject class methodsFor:'queries'! isAbstract @@ -53,75 +63,82 @@ !LLVMObject methodsFor:'assertions'! assertIsBasicBlock: value - + self assert:(value isKindOf: LLVMBasicBlock) message: 'value is not an LLVM basic block' "Created: / 15-08-2015 / 23:45:49 / Jan Vrany " + "Modified: / 14-09-2015 / 11:08:53 / Jan Vrany " ! assertIsBasicBlockValue:value - + self assert:value isLLVMValue. self assert:value isBasicBlockValue "Created: / 08-08-2015 / 02:43:57 / Jan Vrany " + "Modified: / 14-09-2015 / 11:08:57 / Jan Vrany " ! assertIsBoolean: value - + self assert: value isBoolean message: 'value is not a boolean'. "Created: / 13-08-2015 / 06:52:51 / Jan Vrany " + "Modified: / 14-09-2015 / 11:08:59 / Jan Vrany " ! assertIsFunctionValue: value - + self assert: value isLLVMFunction message: 'value is not an LLVMFunction'. "Created: / 10-08-2015 / 18:55:49 / Jan Vrany " + "Modified: / 14-09-2015 / 11:09:02 / Jan Vrany " ! assertIsInteger64Unsigned:value - + 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 " + "Modified: / 14-09-2015 / 11:09:05 / Jan Vrany " ! assertIsIntegerOrIntegerVectorValue:value - + 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 " + "Modified: / 14-09-2015 / 11:09:08 / Jan Vrany " ! assertIsIntegerUnsigned:value - + 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 " + "Modified: / 14-09-2015 / 11:09:10 / Jan Vrany " ! assertIsMetadata: value - + self assert: value isLLVMMetadata message: 'value is not an LLVMMetadata'. "Created: / 14-08-2015 / 08:50:28 / Jan Vrany " + "Modified: / 14-09-2015 / 11:09:13 / Jan Vrany " ! assertIsMetadataArray: values - + 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 " + "Modified: / 14-09-2015 / 11:09:15 / Jan Vrany " ! assertIsString:aString - + - 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 " - "Modified: / 13-08-2015 / 07:01:44 / Jan Vrany " + "Modified: / 14-09-2015 / 11:09:22 / Jan Vrany " ! assertIsType: type - + self assert: type isLLVMType message: 'value is not an LLVMType'. "Created: / 10-08-2015 / 06:26:37 / Jan Vrany " + "Modified: / 14-09-2015 / 11:09:25 / Jan Vrany " ! assertIsTypeArray: types - + 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 " + "Modified: / 14-09-2015 / 11:09:29 / Jan Vrany " ! assertIsValue: value - + self assert: value isLLVMValue message: 'value is not an LLVMValue'. "Created: / 08-08-2015 / 03:11:16 / Jan Vrany " + "Modified: / 14-09-2015 / 11:09:31 / Jan Vrany " ! assertIsValue: value ofKind: kind - + 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 " + "Modified: / 14-09-2015 / 11:09:34 / Jan Vrany " ! assertIsValue: value ofType: type - + 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 " + "Modified: / 14-09-2015 / 11:09:36 / Jan Vrany " ! assertIsValueArray: values - + 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 " + "Modified: / 14-09-2015 / 11:09:38 / Jan Vrany " ! assertIsValueOfSameType:value1 as:value2 - + self assert: value1 type = value2 type message:'types of values differ!!' "Created: / 07-08-2015 / 18:37:29 / Jan Vrany " - "Modified: / 08-08-2015 / 02:57:28 / Jan Vrany " + "Modified: / 14-09-2015 / 11:09:41 / Jan Vrany " ! !