Issue 3457 in pharo: Cannot show new CompiledMethod's asString

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

Issue 3457 in pharo: Cannot show new CompiledMethod's asString

pharo
Status: Accepted
Owner: [hidden email]
Labels: Difficulty-Easy Milestone-1.2

New issue 3457 by [hidden email]: Cannot show new CompiledMethod's  
asString
http://code.google.com/p/pharo/issues/detail?id=3457

Pharo image: core
Pharo core version: Pharo1.2beta #12282
Virtual machine used: 4.0.2

Steps to reproduce:
1. Evaluate: CompiledMethod new asString

MessageNotUnderstood: receiver of "decompilerClass" is nil

Stack trace attached.


Attachments:
        PharoDebug.log  28.2 KB


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3457 in pharo: Cannot show new CompiledMethod's asString

pharo
Updates:
        Labels: -Milestone-1.2 Milestone-1.3

Comment #1 on issue 3457 by marcus.denker: Cannot show new CompiledMethod's  
asString
http://code.google.com/p/pharo/issues/detail?id=3457

Question how to fix that, as a CompiledMethod new is very much undefined  
(no class, no source, no nothing).
What should it do? return nil?

I think it is not for 1.2


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3457 in pharo: Cannot show new CompiledMethod's asString

pharo

Comment #2 on issue 3457 by [hidden email]: Cannot show new  
CompiledMethod's asString
http://code.google.com/p/pharo/issues/detail?id=3457

Over this problem there are a deep problem.

several question, that is really making sense? I mean why instantiate a  
CompiledMethod out of the context of a class (more general but include  
creating a empty compiledMethod)?

I personally think, we should protect not the compiledMethod empty asString  
but a instantiation of a compiledMethod out the context of a class.





Reply | Threaded
Open this post in threaded view
|

Re: Issue 3457 in pharo: Cannot show new CompiledMethod's asString

pharo
Updates:
        Status: FixProposed

Comment #3 on issue 3457 by [hidden email]: Cannot show new  
CompiledMethod's asString
http://code.google.com/p/pharo/issues/detail?id=3457

We should change CompiledMethod to give an error when doing a #new.

The comment reads:

        "This will not make a meaningful method, but it could be used
        to invoke some otherwise useful method in this class."

both #new: and basicNew: say:

self error: 'CompiledMethods may only be created with newMethod:header:'

The attached changeset removed both #new and #new: and adds #basicNew to  
raise an error.


Attachments:
        CompiledMethodInstantiation.1.cs  366 bytes


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3457 in pharo: Cannot show new CompiledMethod's asString

pharo
Updates:
        Status: Closed

Comment #4 on issue 3457 by [hidden email]: Cannot show new  
CompiledMethod's asString
http://code.google.com/p/pharo/issues/detail?id=3457

in 13092