ClosureCompiler in 3.8#6665

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

ClosureCompiler in 3.8#6665

Duncan Mak-2
Hello,

I've been trying to get the ClosureCompiler installed on my image for a while. I have the nCompiler package installed at version 20, but when I try to install the ClosureCompiler, I get this error in Compiler>>compileDoIt:in:to:notifying:ifFail:log:

scope := aContext
        ifNotNil: [aContext doItScope]
        ifNil: [receiver class parseScope instanceScope].

receive class parseScope turns into a doesNotUnderstand, that's because receiver is nil.

The code that leads up to this stems from:

Compiler>>evaluate: textOrString logged: logFlag
    ^self evaluate: textOrString for: nil logged: logFlag

That nil argument to for: ultimately turns into the to: argument (receiver) in the method above.

Is there a known fix for this?

Duncan.


Reply | Threaded
Open this post in threaded view
|

Re: ClosureCompiler in 3.8#6665

Marcus Denker

On 03.02.2006, at 00:38, Duncan Mak wrote:

> Hello,
>
> I've been trying to get the ClosureCompiler installed on my image  
> for a while. I have the nCompiler package installed at version 20,  
> but when I try to install the ClosureCompiler, I get this error in  
> Compiler>>compileDoIt:in:to:notifying:ifFail:log:
>

I will check what's wrong... it used to work on 3.8. The best might  
be to go to 3.9a for the new compiler stuff
For 3.9a, the best is to load the latest from

http://www.squeaksource.com/NewCompiler.html

this depends on the AST package:
http://www.squeaksource.com/AST.html
So you need to load this first.

The mc package contains everything needed, but not the  
ClosureTestCase (mail me if you need it, I will
put it on SqueakMap later, too).

     Marcus

Reply | Threaded
Open this post in threaded view
|

Re: ClosureCompiler in 3.8#6665

Marcus Denker
In reply to this post by Duncan Mak-2
Hi,

I fixed the ClosureCompiler package on SqueakMap. So for 3.8, first  
install "nCompiler", then ClosureCompiler. But it is better to use  
3.9a for
this (for that, install AST + NewCompiler from SqueakSource), as this  
is what we use here. The 3.8 stuff is not really used, and thus there  
will
be not really a big motivation in putting time if there are any  
problems...

      Marcus


On 03.02.2006, at 00:38, Duncan Mak wrote:

> Hello,
>
> I've been trying to get the ClosureCompiler installed on my image  
> for a while. I have the nCompiler package installed at version 20,  
> but when I try to install the ClosureCompiler, I get this error in  
> Compiler>>compileDoIt:in:to:notifying:ifFail:log:
>
> scope := aContext
>         ifNotNil: [aContext doItScope]
>         ifNil: [receiver class parseScope instanceScope].
>
> receive class parseScope turns into a doesNotUnderstand, that's  
> because receiver is nil.
>
> The code that leads up to this stems from:
>
> Compiler>>evaluate: textOrString logged: logFlag
>     ^self evaluate: textOrString for: nil logged: logFlag
>
> That nil argument to for: ultimately turns into the to: argument  
> (receiver) in the method above.
>
> Is there a known fix for this?
>
> Duncan.


Reply | Threaded
Open this post in threaded view
|

Re: ClosureCompiler in 3.8#6665

Duncan Mak-2
On 2/7/06, Marcus Denker <[hidden email]> wrote:
> Hi,
>
> I fixed the ClosureCompiler package on SqueakMap. So for 3.8, first
> install "nCompiler", then ClosureCompiler.

In that case, I might look into switching to using a 3.9 image in the future.

I just tried your instructions. When installing the ClosureCompiler
(2.5), I see this error:

parseScope
        ^ ClassScope new class: self

The class 'ClassScope' does not exist.

Duncan

Reply | Threaded
Open this post in threaded view
|

Re: ClosureCompiler in 3.8#6665

Marcus Denker

On 08.02.2006, at 03:42, Duncan Mak wrote:


> I just tried your instructions. When installing the ClosureCompiler
> (2.5), I see this error:
>
> parseScope
> ^ ClassScope new class: self
>
> The class 'ClassScope' does not exist.
>

Did you install *first* nCompiler, *then* ClosureCompiler-ajh?

    Marcus

Reply | Threaded
Open this post in threaded view
|

Re: ClosureCompiler in 3.8#6665

Duncan Mak-2
On 2/8/06, Marcus Denker <[hidden email]> wrote:
>
> Did you install *first* nCompiler, *then* ClosureCompiler-ajh?
>

On SqueakMap, the entry for nCompiler shows:

nCompiler for 3.8 (20)

so I assumed that it's already using the latest version.

If I try to install it again, I get a Syntax Error for:

quickMethodPrim

        | i |
        self numArgs = 0 ifFalse: [^ 0].
        lastSpecialReturn ifNil: [^ 0].
        seqBytes size = 1 ifFalse: [^ 0].
        ^ lastSpecialReturn selector caseOf: {
                Association between 0-argument blocks required ->[#returnReceiver] -> [256].
                [#returnConstant:] -> [
                        (i _ SpecialConstants indexOf: lastSpecialReturn argument) > 0
                                ifTrue: [256 + i] ifFalse: [0]].
                [#returnInstVar:] -> [263 + lastSpecialReturn argument]
          }

Duncan.