# HG changeset patch # User Jan Vrany # Date 1442225551 -3600 # Node ID 0933f973bc22963f242019999f192d0fee784fa9 # Parent 51ac97a0e87d5b453e8e6b03754188a36ebfeb4a Add assertion to LLVMModule>>newWithName: to check for nil name. Fixed skip-in-debugger pragma (typo) diff -r 51ac97a0e87d -r 0933f973bc22 LLVMAttribute.st --- a/LLVMAttribute.st Sun Sep 13 07:27:07 2015 +0100 +++ b/LLVMAttribute.st Mon Sep 14 11:12:31 2015 +0100 @@ -213,5 +213,12 @@ ^LLVMZExtAttribute ! ! +!LLVMAttribute class methodsFor:'documentation'! + +version_HG + + ^ '$Changeset: $' +! ! + LLVMAttribute initialize! diff -r 51ac97a0e87d -r 0933f973bc22 LLVMModule.st --- a/LLVMModule.st Sun Sep 13 07:27:07 2015 +0100 +++ b/LLVMModule.st Mon Sep 14 11:12:31 2015 +0100 @@ -48,10 +48,13 @@ "Created: / 03-09-2015 / 06:41:22 / Jan Vrany " ! -newWithName: name - ^ LLVM ModuleCreateWithName: name +newWithName: aString + + self assertIsString: aString. + ^ LLVM ModuleCreateWithName: aString "Created: / 07-07-2015 / 20:22:29 / Jan Vrany " + "Modified: / 14-09-2015 / 10:39:38 / Jan Vrany " ! ! !LLVMModule methodsFor:'accessing'! 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 " ! ! diff -r 51ac97a0e87d -r 0933f973bc22 bmake.bat --- a/bmake.bat Sun Sep 13 07:27:07 2015 +0100 +++ b/bmake.bat Mon Sep 14 11:12:31 2015 +0100 @@ -4,6 +4,9 @@ @REM do not edit - automatically generated from ProjectDefinition @REM ------- @SET DEFINES= +@REM Kludge got Mercurial, cannot be implemented in Borland make +@FOR /F "tokens=*" %i in ('hg root') do SET HGROOT=%i +@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%" make.exe -N -f bc.mak %DEFINES% %* diff -r 51ac97a0e87d -r 0933f973bc22 mingwmake.bat --- a/mingwmake.bat Sun Sep 13 07:27:07 2015 +0100 +++ b/mingwmake.bat Mon Sep 14 11:12:31 2015 +0100 @@ -4,6 +4,9 @@ @REM do not edit - automatically generated from ProjectDefinition @REM ------- @SET DEFINES= +@REM Kludge got Mercurial, cannot be implemented in Borland make +@FOR /F "tokens=*" %i in ('hg root') do SET HGROOT=%i +@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%" @pushd ..\..\stx\rules @call find_mingw.bat diff -r 51ac97a0e87d -r 0933f973bc22 tests/bmake.bat --- a/tests/bmake.bat Sun Sep 13 07:27:07 2015 +0100 +++ b/tests/bmake.bat Mon Sep 14 11:12:31 2015 +0100 @@ -4,6 +4,9 @@ @REM do not edit - automatically generated from ProjectDefinition @REM ------- @SET DEFINES= +@REM Kludge got Mercurial, cannot be implemented in Borland make +@FOR /F "tokens=*" %i in ('hg root') do SET HGROOT=%i +@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%" make.exe -N -f bc.mak %DEFINES% %* diff -r 51ac97a0e87d -r 0933f973bc22 tests/mingwmake.bat --- a/tests/mingwmake.bat Sun Sep 13 07:27:07 2015 +0100 +++ b/tests/mingwmake.bat Mon Sep 14 11:12:31 2015 +0100 @@ -4,6 +4,9 @@ @REM do not edit - automatically generated from ProjectDefinition @REM ------- @SET DEFINES= +@REM Kludge got Mercurial, cannot be implemented in Borland make +@FOR /F "tokens=*" %i in ('hg root') do SET HGROOT=%i +@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%" @pushd ..\..\..\stx\rules @call find_mingw.bat