# HG changeset patch # User Jan Vrany # Date 1439548023 -3600 # Node ID 86de1611e013fbe2c2eb36c16dd7cf4dda4e179e # Parent e698efa3708bf45837c8bf9c577b19848647a6ca Introduced a CBoolNode to model C99's _bool and map it to FFI's #bool type. This would allow to pass true and false directly to FFI callouts without need to convert it to 0 / 1 smallints. diff -r e698efa3708b -r 86de1611e013 Cface__CBoolNode.st --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Cface__CBoolNode.st Fri Aug 14 11:27:03 2015 +0100 @@ -0,0 +1,29 @@ +"{ Package: 'jv:cface' }" + +"{ NameSpace: Cface }" + +CIntNode subclass:#CBoolNode + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + category:'Cface-C AST' +! + +!CBoolNode methodsFor:'accessing'! + +cName + "superclass Cface::CBuiltinNode says that I am responsible to implement this method" + + ^ '_bool' + + "Created: / 14-08-2015 / 11:17:36 / Jan Vrany " +! + +ffiTypeSymbol + "superclass Cface::CTypeNode says that I am responsible to implement this method" + + ^ #bool + + "Created: / 14-08-2015 / 11:16:54 / Jan Vrany " +! ! + diff -r e698efa3708b -r 86de1611e013 Cface__CDerivedTypeNode.st --- a/Cface__CDerivedTypeNode.st Thu Aug 13 06:01:15 2015 +0100 +++ b/Cface__CDerivedTypeNode.st Fri Aug 14 11:27:03 2015 +0100 @@ -166,6 +166,11 @@ ^ '$Id$' ! +version_HG + + ^ '$Changeset: $' +! + version_SVN ^ '$Id$' ! ! diff -r e698efa3708b -r 86de1611e013 Make.proto --- a/Make.proto Thu Aug 13 06:01:15 2015 +0100 +++ b/Make.proto Fri Aug 14 11:27:03 2015 +0100 @@ -195,6 +195,7 @@ $(OUTDIR)Cface__CTypedefNode.$(O) Cface__CTypedefNode.$(H): Cface__CTypedefNode.st $(INCLUDE_TOP)/jv/cface/Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CDerivedTypeNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CTypeNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)Cface__CVoidNode.$(O) Cface__CVoidNode.$(H): Cface__CVoidNode.st $(INCLUDE_TOP)/jv/cface/Cface__CBuiltinNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CTypeNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)Cface__CWCharNode.$(O) Cface__CWCharNode.$(H): Cface__CWCharNode.st $(INCLUDE_TOP)/jv/cface/Cface__CBuiltinNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CTypeNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) +$(OUTDIR)Cface__CBoolNode.$(O) Cface__CBoolNode.$(H): Cface__CBoolNode.st $(INCLUDE_TOP)/jv/cface/Cface__CBuiltinNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CIntNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CTypeNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)Cface__CStructNode.$(O) Cface__CStructNode.$(H): Cface__CStructNode.st $(INCLUDE_TOP)/jv/cface/Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CDerivedTypeNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CStructuredNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CTypeNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)Cface__CUnionNode.$(O) Cface__CUnionNode.$(H): Cface__CUnionNode.st $(INCLUDE_TOP)/jv/cface/Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CDerivedTypeNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CStructuredNode.$(H) $(INCLUDE_TOP)/jv/cface/Cface__CTypeNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR) $(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Stream.$(H) $(STCHDR) diff -r e698efa3708b -r 86de1611e013 Make.spec --- a/Make.spec Thu Aug 13 06:01:15 2015 +0100 +++ b/Make.spec Fri Aug 14 11:27:03 2015 +0100 @@ -99,6 +99,7 @@ Cface::CTypedefNode \ Cface::CVoidNode \ Cface::CWCharNode \ + Cface::CBoolNode \ Cface::CStructNode \ Cface::CUnionNode \ @@ -154,6 +155,7 @@ $(OUTDIR_SLASH)Cface__CTypedefNode.$(O) \ $(OUTDIR_SLASH)Cface__CVoidNode.$(O) \ $(OUTDIR_SLASH)Cface__CWCharNode.$(O) \ + $(OUTDIR_SLASH)Cface__CBoolNode.$(O) \ $(OUTDIR_SLASH)Cface__CStructNode.$(O) \ $(OUTDIR_SLASH)Cface__CUnionNode.$(O) \ $(OUTDIR_SLASH)extensions.$(O) \ diff -r e698efa3708b -r 86de1611e013 abbrev.stc --- a/abbrev.stc Thu Aug 13 06:01:15 2015 +0100 +++ b/abbrev.stc Fri Aug 14 11:27:03 2015 +0100 @@ -49,5 +49,6 @@ Cface::CTypedefNode Cface__CTypedefNode jv:cface 'Cface-C AST' 0 Cface::CVoidNode Cface__CVoidNode jv:cface 'Cface-C AST' 0 Cface::CWCharNode Cface__CWCharNode jv:cface 'Cface-C AST' 0 +Cface::CBoolNode Cface__CBoolNode jv:cface 'Cface-C AST' 0 Cface::CStructNode Cface__CStructNode jv:cface 'Cface-C AST' 0 Cface::CUnionNode Cface__CUnionNode jv:cface 'Cface-C AST' 0 diff -r e698efa3708b -r 86de1611e013 bc.mak --- a/bc.mak Thu Aug 13 06:01:15 2015 +0100 +++ b/bc.mak Fri Aug 14 11:27:03 2015 +0100 @@ -120,6 +120,7 @@ $(OUTDIR)Cface__CTypedefNode.$(O) Cface__CTypedefNode.$(H): Cface__CTypedefNode.st $(INCLUDE_TOP)\jv\cface\Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CDerivedTypeNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CTypeNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)Cface__CVoidNode.$(O) Cface__CVoidNode.$(H): Cface__CVoidNode.st $(INCLUDE_TOP)\jv\cface\Cface__CBuiltinNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CTypeNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)Cface__CWCharNode.$(O) Cface__CWCharNode.$(H): Cface__CWCharNode.st $(INCLUDE_TOP)\jv\cface\Cface__CBuiltinNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CTypeNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) +$(OUTDIR)Cface__CBoolNode.$(O) Cface__CBoolNode.$(H): Cface__CBoolNode.st $(INCLUDE_TOP)\jv\cface\Cface__CBuiltinNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CIntNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CTypeNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)Cface__CStructNode.$(O) Cface__CStructNode.$(H): Cface__CStructNode.st $(INCLUDE_TOP)\jv\cface\Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CDerivedTypeNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CStructuredNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CTypeNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)Cface__CUnionNode.$(O) Cface__CUnionNode.$(H): Cface__CUnionNode.st $(INCLUDE_TOP)\jv\cface\Cface__CDefinitionNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CDerivedTypeNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CStructuredNode.$(H) $(INCLUDE_TOP)\jv\cface\Cface__CTypeNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR) $(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Stream.$(H) $(STCHDR) diff -r e698efa3708b -r 86de1611e013 jv_cface.st --- a/jv_cface.st Thu Aug 13 06:01:15 2015 +0100 +++ b/jv_cface.st Fri Aug 14 11:27:03 2015 +0100 @@ -124,6 +124,7 @@ #'Cface::CTypedefNode' #'Cface::CVoidNode' #'Cface::CWCharNode' + #'Cface::CBoolNode' #'Cface::CStructNode' #'Cface::CUnionNode' ) diff -r e698efa3708b -r 86de1611e013 libInit.cc --- a/libInit.cc Thu Aug 13 06:01:15 2015 +0100 +++ b/libInit.cc Fri Aug 14 11:27:03 2015 +0100 @@ -75,6 +75,7 @@ _Cface__CTypedefNode_Init(pass,__pRT__,snd); _Cface__CVoidNode_Init(pass,__pRT__,snd); _Cface__CWCharNode_Init(pass,__pRT__,snd); +_Cface__CBoolNode_Init(pass,__pRT__,snd); _Cface__CStructNode_Init(pass,__pRT__,snd); _Cface__CUnionNode_Init(pass,__pRT__,snd);