Compiler evaluate: -> Smalltalk evaluate:

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

Compiler evaluate: -> Smalltalk evaluate:

Andre Hora
Hello,

Recently in Pharo there was some tendency to replace Compiler evaluate: by Smalltalk evaluate:.
Stef does not seem to agree with that.
My question is which one is the correct convention to call #evaluate: ?

thanks in advance,

--
Andre Hora
Reply | Threaded
Open this post in threaded view
|

Re: Compiler evaluate: -> Smalltalk evaluate:

Marcus Denker-4

On 07 Apr 2014, at 12:15, Andre Hora <[hidden email]> wrote:

> Hello,
>
> Recently in Pharo there was some tendency to replace Compiler evaluate: by Smalltalk evaluate:.
> Stef does not seem to agree with that.
> My question is which one is the correct convention to call #evaluate: ?
>

The problem is that Compiler is the old Compiler.

There is Compiler and OpalCompiler.

If you now hard-code Compiler, then the old compiler is used.

Yes, this is not beautiful, but is is *very* hard to move a system to a new compiler
and new API without some ugliness while doing so.

In 4.0, we will remove the old compiler and then we can see how to make the API perfect.

        Marcus
Reply | Threaded
Open this post in threaded view
|

Re: Compiler evaluate: -> Smalltalk evaluate:

Sergi Reyner
2014-04-07 11:51 GMT+01:00 Marcus Denker <[hidden email]>:
In 4.0, we will remove the old compiler and then we can see how to make the API perfect.

Will it be able to decompile by then?

Cheers,
Sergi
Reply | Threaded
Open this post in threaded view
|

Re: Compiler evaluate: -> Smalltalk evaluate:

Clément Béra
Hello,

I do not like 'Smalltalk evaluate:' either.

One solution is to do 'self class compiler evaluate:'.


2014-04-07 5:02 GMT-07:00 Sergi Reyner <[hidden email]>:
2014-04-07 11:51 GMT+01:00 Marcus Denker <[hidden email]>:

In 4.0, we will remove the old compiler and then we can see how to make the API perfect.

Will it be able to decompile by then?

I believe we cannot remove the old compiler if we do not provide something to access the method's sources.

It will have either a decompiler or in-image sources if we achieve to compress them enough (recently a guy compressed the AST in 15Mb by sharing nodes, which is half the size of the sources).
  

Cheers,
Sergi

Reply | Threaded
Open this post in threaded view
|

Re: Compiler evaluate: -> Smalltalk evaluate:

camille teruel

On 7 avr. 2014, at 16:31, Clément Bera <[hidden email]> wrote:

Hello,

I do not like 'Smalltalk evaluate:' either.

One solution is to do 'self class compiler evaluate:'.

Yes IMO, calling #compiler on a class is the best solution since it returns a compiler with the options that the class defines.
 


2014-04-07 5:02 GMT-07:00 Sergi Reyner <[hidden email]>:
2014-04-07 11:51 GMT+01:00 Marcus Denker <[hidden email]>:

In 4.0, we will remove the old compiler and then we can see how to make the API perfect.

Will it be able to decompile by then?

I believe we cannot remove the old compiler if we do not provide something to access the method's sources.

It will have either a decompiler or in-image sources if we achieve to compress them enough (recently a guy compressed the AST in 15Mb by sharing nodes, which is half the size of the sources).
  

Cheers,
Sergi


Reply | Threaded
Open this post in threaded view
|

Re: Compiler evaluate: -> Smalltalk evaluate:

Andre Hora

Thanks guys!

On Apr 7, 2014 4:36 PM, "Camille Teruel" <[hidden email]> wrote:

On 7 avr. 2014, at 16:31, Clément Bera <[hidden email]> wrote:

Hello,

I do not like 'Smalltalk evaluate:' either.

One solution is to do 'self class compiler evaluate:'.

Yes IMO, calling #compiler on a class is the best solution since it returns a compiler with the options that the class defines.
 


2014-04-07 5:02 GMT-07:00 Sergi Reyner <[hidden email]>:
2014-04-07 11:51 GMT+01:00 Marcus Denker <[hidden email]>:

In 4.0, we will remove the old compiler and then we can see how to make the API perfect.

Will it be able to decompile by then?

I believe we cannot remove the old compiler if we do not provide something to access the method's sources.

It will have either a decompiler or in-image sources if we achieve to compress them enough (recently a guy compressed the AST in 15Mb by sharing nodes, which is half the size of the sources).
  

Cheers,
Sergi


Reply | Threaded
Open this post in threaded view
|

Re: Compiler evaluate: -> Smalltalk evaluate:

Marcus Denker-4
In reply to this post by Sergi Reyner

On 07 Apr 2014, at 14:02, Sergi Reyner <[hidden email]> wrote:

2014-04-07 11:51 GMT+01:00 Marcus Denker <[hidden email]>:
In 4.0, we will remove the old compiler and then we can see how to make the API perfect.

Will it be able to decompile by then?


Yes, we will solve that problem, too.

Marcus