Issue 3741 in pharo: Decompiler hangs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 3741 in pharo: Decompiler hangs

pharo
Status: New
Owner: ----

New issue 3741 by [hidden email]: Decompiler hangs
http://code.google.com/p/pharo/issues/detail?id=3741

this method can't work, because ParseNode can't understand remoteTemps:

popIntoTemporaryVariable: offset
        | maybeTVTag tempVector start |
        maybeTVTag := stack last.
        ((maybeTVTag isMemberOf: Association)
         and: [maybeTVTag key == #pushNewArray]) ifTrue:
                [blockStartsToTempVars notNil "implies we were intialized with temp  
names."
                        ifTrue: "Use the provided temps"
                                [[(tempVector := tempVars at: offset + 1 ifAbsent: [ParseNode  
basicNew]) isTemp
                                                         and: [tempVector isIndirectTempVector
                                                         and: [tempVector remoteTemps size = maybeTVTag value size]]] assert]
                        ifFalse: "Synthesize some remote temps"
                                [tempVector := maybeTVTag value.
                                 offset + 1 <= tempVars size
                                        ifTrue:
                                                [start := 2.
                                                 tempVector at: 1 put: (tempVars at: offset + 1)]
                                        ifFalse:
                                                [tempVars := (Array new: offset + 1)
                                                                                replaceFrom: 1
                                                                                to: tempVars size
                                                                                with: tempVars.
                                                start := 1].
                                 start to: tempVector size do:
                                        [:i|
                                        tempVector
                                                at: i
                                                put: (constructor
                                                                codeTemp: numLocalTemps + offset + i - 1
                                                                named: 't', (tempVarCount + i) printString)].
                                tempVars at: offset + 1 put: (constructor codeRemoteTemp: offset + 1  
remoteTemps: tempVector)].
                 tempVarCount := tempVarCount + maybeTVTag value size.
                 stack removeLast.
                 ^self].
        self pushTemporaryVariable: offset; doStore: statements



I get the problem in PharoInstantMessenger ver.4 if you wanna test.

It's really annoying to spend a day on that, just because a variable is  
declared in a block.
For a 30yo language, it sucks


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3741 in pharo: Decompiler hangs

pharo

Comment #1 on issue 3741 by [hidden email]: Decompiler hangs
http://code.google.com/p/pharo/issues/detail?id=3741

ParseNode answers false to isTemp though, so the remoteTemps call should  
never be reached.

A description/reproducible case of what is wrong would be ncie.


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3741 in pharo: Decompiler hangs

pharo
Updates:
        Status: Closed

Comment #2 on issue 3741 by [hidden email]: Decompiler hangs
http://code.google.com/p/pharo/issues/detail?id=3741

Hello,

Can you check in the latest 1.3? I can not as there is not enough  
information to re-create the bug.