# HG changeset patch # User Claus Gittinger # Date 1257531323 -3600 # Node ID 5e7bafbb37c074b629aa8af5df8b6af9e3110fe7 # Parent b9d82cb3eccec16fef981fcf73fb9550736fad2d added: #withConstantValueDo: constant value evaluation (for true ifTrue:) diff -r b9d82cb3ecce -r 5e7bafbb37c0 ConstantNode.st --- a/ConstantNode.st Fri Nov 06 19:14:56 2009 +0100 +++ b/ConstantNode.st Fri Nov 06 19:15:23 2009 +0100 @@ -325,10 +325,22 @@ isConstant ^ true +! + +withConstantValueDo:aBlock + "return true, if this evaluates to a constant value + and evaluate aBlock with it" + + aBlock value:value. + ^ true ! ! !ConstantNode class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libcomp/ConstantNode.st,v 1.43 2008-10-20 15:10:47 cg Exp $' + ^ '$Header: /cvs/stx/stx/libcomp/ConstantNode.st,v 1.44 2009-11-06 18:15:23 cg Exp $' +! + +version_CVS + ^ '$Header: /cvs/stx/stx/libcomp/ConstantNode.st,v 1.44 2009-11-06 18:15:23 cg Exp $' ! !