[Cuis] 4.1 to 4.2 migration question
Phil (list)
pbpublist at gmail.com
Mon Feb 16 21:15:29 CST 2015
On Mon, 2015-02-16 at 18:49 -0800, Casey Ransberger wrote:
> I think parserClass was there to give everyone a hook to implement
> their own parsers, because Smalltalk was (in part) a prog language
> research platform. Given that Cuis aims to be a minimal system,
> someone may have removed it as unnecessary. Also, when Juan changes
> some critical behavior, he tends to prefer coming up with a new name
> for the method and associated variables, so that folks with existing
> code aren't confused when their dependencies start behaving in
> unexpected ways; this might also be what happened.
I'm fine with it being removed... just wanted to understand why it was
removed. I know there's been a lot of cog/compiler/vm stuff going on
recently that I haven't kept up on so thought I'd check in before just
making the minimal changes to get it working again if something bigger
is going on.
> It would be interesting to look at what wants to refer to parserClass.
> Could be one of those packages is doing something very, very
> interesting:)
>
>
It's from OGLExtManager...
forwardExtMethod: aSelector
"Compile a forwarder method in OpenGL"
| code parser fwdCode |
code := self class sourceCodeAt: aSelector.
parser := self parserClass new.
parser parseSelector: code.
code := code copyFrom: 1 to: (parser endOfLastToken min: code size).
fwdCode := String streamContents:[:s|
s nextPutAll: code.
s newLineTab: 1; nextPutAll: '"This method was automatically
generated"'.
s newLineTab: 1; nextPutAll: '^glExt '; nextPutAll: code.
].
(OpenGL sourceCodeAt: aSelector ifAbsent:['']) = fwdCode
ifTrue:[^self]. "no change"
OpenGL compile: fwdCode classified: (self class organization
categoryOfElement: aSelector).
More information about the Cuis
mailing list