Minification advice

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

Minification advice

sebastianconcept
Hi guys,

I was observing a little and thought about this and I need your advice.

This is what I did:

1. I took a copy of the uglyfied app.js of http://tasks.flowingconcept.com (apache gzips it a lot ~61KB I think, but without that it's not small ~528KB)
2. So I've manually started replacing long words I saw repeating often to check how much I can compress it by "manually minifying" (a one time thing experiment)
3. replaced 'smalltalk' with 'st' => 493KB
4. replaced 'withContext' with 'wc' => 461KB
5. replaced many others => ~433KB

and there is plenty of room because our repeated long class names.

I saw guys using grunt to automate minification of css, html and js having the js with long names shortened to one or two chars. Can we do that?

What's the advice to minify as we should?

If we do can make our Amber based apps snappier? <-- this one would actually require data, not guesses.

And ultimately, anyone automated grunt for generating the dist/ folder on css changes and/or commits?


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

Hannes Hirzel
Hello Sebastian

On 4/11/14, Sebastian Sastre <[hidden email]> wrote:
...
> 3. replaced 'smalltalk' with 'st' => 493KB
> 4. replaced 'withContext' with 'wc' => 461KB
> 5. replaced many others => ~433KB   ??? more examples?

This could probably be achieved by a patch on the compiler.

Siemen, any advice where to look for this as you have been reading
Amber compiler code this week?

--Hannes

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

Siemen Baader
Hi Hannes & Sebastian,

On 11 Apr 2014, at 10:06, H. Hirzel <[hidden email]> wrote:

> Hello Sebastian
>
> On 4/11/14, Sebastian Sastre <[hidden email]> wrote:
> ...
>> 3. replaced 'smalltalk' with 'st' => 493KB
>> 4. replaced 'withContext' with 'wc' => 461KB
>> 5. replaced many others => ~433KB   ??? more examples?
>
> This could probably be achieved by a patch on the compiler.
>
> Siemen, any advice where to look for this as you have been reading
> Amber compiler code this week?

Actually I didn't get to digging into it yet. I will keep it in mind when I do, but I'm afraid my mileage may vary - this will be my first Smalltalk compiler hack.

Do you have actual performance problems in production? If so, have you checked if you could just use require.js concatenation and / or some off-the-shelf compression tool like uglify? OTOH, this should be possible, and seems like a more modular approach than building minification into the Amber compiler. I have never looked at it personally, though.

best,
Siemen

>
> --Hannes

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

sebastianconcept
I do want Amber as simple as possible (meaning that not necessarily this should lead us to change much).

I just want Amber code being as minifyable as angular's meteor's or any other kid on the block

And for sure NOT less

Honestly I was expecting that minifyers were smarter but it's either they don't or I'm not using them rigth

sebastian

o/

> On 12/04/2014, at 09:02, Siemen Baader <[hidden email]> wrote:
>
> Hi Hannes & Sebastian,
>
>> On 11 Apr 2014, at 10:06, H. Hirzel <[hidden email]> wrote:
>>
>> Hello Sebastian
>>
>>> On 4/11/14, Sebastian Sastre <[hidden email]> wrote:
>>> ...
>>> 3. replaced 'smalltalk' with 'st' => 493KB
>>> 4. replaced 'withContext' with 'wc' => 461KB
>>> 5. replaced many others => ~433KB   ??? more examples?
>>
>> This could probably be achieved by a patch on the compiler.
>>
>> Siemen, any advice where to look for this as you have been reading
>> Amber compiler code this week?
>
> Actually I didn't get to digging into it yet. I will keep it in mind when I do, but I'm afraid my mileage may vary - this will be my first Smalltalk compiler hack.
>
> Do you have actual performance problems in production? If so, have you checked if you could just use require.js concatenation and / or some off-the-shelf compression tool like uglify? OTOH, this should be possible, and seems like a more modular approach than building minification into the Amber compiler. I have never looked at it personally, though.
>
> best,
> Siemen
>
>>
>> --Hannes
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

Herby Vojčík
In reply to this post by sebastianconcept
Well, I don't know what was the result when using minifier, but as smalltalk is local parameter, I would say it got replaced... OTOH, withContext is method name of the API of Amber kernel, and I doubt there is safe way to rename method names... the code in which the rename would have been done as a whole would work, but the problem would be with newly compiled methods (not necessarily by IDE, maybe some just in time compilation by code), and packa ges loaded later into the runtime would break as well. So, I would not go too far with optimization...
Of course, you can file an issue to officially rename withContext to, say, $wc, if it really helps significantly.

Herby

sebastian <[hidden email]>napísal/a:

>I do want Amber as simple as possible (meaning that not necessarily this should lead us to change much).
>
>I just want Amber code being as minifyable as angular's meteor's or any other kid on the block
>
>And for sure NOT less
>
>Honestly I was expecting that minifyers were smarter but it's either they don't or I'm not using them rigth
>
>sebastian
>
>o/
>
>> On 12/04/2014, at 09:02, Siemen Baader <[hidden email]> wrote:
>>
>> Hi Hannes & Sebastian,
>>
>>> On 11 Apr 2014, at 10:06, H. Hirzel <[hidden email]> wrote:
>>>
>>> Hello Sebastian
>>>
>>>> On 4/11/14, Sebastian Sastre <[hidden email]> wrote:
>>>> ...
>>>> 3. replaced 'smalltalk' with 'st' => 493KB
>>>> 4. replaced 'withContext' with 'wc' => 461KB
>>>> 5. replaced many others => ~433KB   ??? more examples?
>>>
>>> This could probably be achieved by a patch on the compiler.
>>>
>>> Siemen, any advice where to look for this as you have been reading
>>> Amber compiler code this week?
>>
>> Actually I didn't get to digging into it yet. I will keep it in mind when I do, but I'm afraid my mileage may vary - this will be my first Smalltalk compiler hack.
>>
>> Do you have actual performance problems in production? If so, have you checked if you could just use require.js concatenation and / or some off-the-shelf compression tool like uglify? OTOH, this should be possible, and seems like a more modular approach than building minification into the Amber compiler. I have never looked at it personally, though.
>>
>> best,
>> Siemen
>>
>>>
>>> --Hannes
>>
>> --
>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>
>--
>You received this message because you are subscribed to the Google Groups "amber-lang" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

sebastianconcept
the base code I’m using is resulting from an older Amber version so we should update this feedback

But for what’s worth:
all.js  528KB

string: occurrences:

addMethod 1302
smalltalk 7544
withContext 1635
messageSends 1307
method 1413
className 37
Smalltalk 180
fill 1636



So there are big wins to get from there.

Wonder what the results would be if using Closure compiler on a fresh amber




On Apr 12, 2014, at 2:00 PM, Herby Vojčík <[hidden email]> wrote:

> Well, I don't know what was the result when using minifier, but as smalltalk is local parameter, I would say it got replaced... OTOH, withContext is method name of the API of Amber kernel, and I doubt there is safe way to rename method names... the code in which the rename would have been done as a whole would work, but the problem would be with newly compiled methods (not necessarily by IDE, maybe some just in time compilation by code), and packa ges loaded later into the runtime would break as well. So, I would not go too far with optimization...
> Of course, you can file an issue to officially rename withContext to, say, $wc, if it really helps significantly.
>
> Herby
>
> sebastian <[hidden email]>napísal/a:
>
>> I do want Amber as simple as possible (meaning that not necessarily this should lead us to change much).
>>
>> I just want Amber code being as minifyable as angular's meteor's or any other kid on the block
>>
>> And for sure NOT less
>>
>> Honestly I was expecting that minifyers were smarter but it's either they don't or I'm not using them rigth
>>
>> sebastian
>>
>> o/
>>
>>> On 12/04/2014, at 09:02, Siemen Baader <[hidden email]> wrote:
>>>
>>> Hi Hannes & Sebastian,
>>>
>>>> On 11 Apr 2014, at 10:06, H. Hirzel <[hidden email]> wrote:
>>>>
>>>> Hello Sebastian
>>>>
>>>>> On 4/11/14, Sebastian Sastre <[hidden email]> wrote:
>>>>> ...
>>>>> 3. replaced 'smalltalk' with 'st' => 493KB
>>>>> 4. replaced 'withContext' with 'wc' => 461KB
>>>>> 5. replaced many others => ~433KB   ??? more examples?
>>>>
>>>> This could probably be achieved by a patch on the compiler.
>>>>
>>>> Siemen, any advice where to look for this as you have been reading
>>>> Amber compiler code this week?
>>>
>>> Actually I didn't get to digging into it yet. I will keep it in mind when I do, but I'm afraid my mileage may vary - this will be my first Smalltalk compiler hack.
>>>
>>> Do you have actual performance problems in production? If so, have you checked if you could just use require.js concatenation and / or some off-the-shelf compression tool like uglify? OTOH, this should be possible, and seems like a more modular approach than building minification into the Amber compiler. I have never looked at it personally, though.
>>>
>>> best,
>>> Siemen
>>>
>>>>
>>>> --Hannes
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

Herby Vojčík
In reply to this post by sebastianconcept
It seems 'smalltalk' wins by huge margin, and it is also the one which minifiers can safely replace. Others are method names, so there it is dangerous.

What can be done, is to monkey patch the shorter names of them at the beginning of each js file, like

    smalltalk.$am = smalltalk.addMethod

and use smalltalk.$am in the file itself. But again, I don't know if such thing is worth it.

Herby

sebastian <[hidden email]>napísal/a:

>the base code I’m using is resulting from an older Amber version so we should update this feedback
>
>But for what’s worth:
>all.js  528KB
>
>string: occurrences:
>
>addMethod 1302
>smalltalk 7544
>withContext 1635
>messageSends 1307
>method 1413
>className 37
>Smalltalk 180
>fill 1636
>…
>
>
>So there are big wins to get from there.
>
>Wonder what the results would be if using Closure compiler on a fresh amber
>
>
>
>
>On Apr 12, 2014, at 2:00 PM, Herby Vojčík <[hidden email]> wrote:
>
>> Well, I don't know what was the result when using minifier, but as smalltalk is local parameter, I would say it got replaced... OTOH, withContext is method name of the API of Amber kernel, and I doubt there is safe way to rename method names... the code in which the rename would have been done as a whole would work, but the problem would be with newly compiled methods (not necessarily by IDE, maybe some just in time compilation by code), and packa ges loaded later into the runtime would break as well. So, I would not go too far with optimization...
>> Of course, you can file an issue to officially rename withContext to, say, $wc, if it really helps significantly.
>>
>> Herby
>>
>> sebastian <[hidden email]>napísal/a:
>>
>>> I do want Amber as simple as possible (meaning that not necessarily this should lead us to change much).
>>>
>>> I just want Amber code being as minifyable as angular's meteor's or any other kid on the block
>>>
>>> And for sure NOT less
>>>
>>> Honestly I was expecting that minifyers were smarter but it's either they don't or I'm not using them rigth
>>>
>>> sebastian
>>>
>>> o/
>>>
>>>> On 12/04/2014, at 09:02, Siemen Baader <[hidden email]> wrote:
>>>>
>>>> Hi Hannes & Sebastian,
>>>>
>>>>> On 11 Apr 2014, at 10:06, H. Hirzel <[hidden email]> wrote:
>>>>>
>>>>> Hello Sebastian
>>>>>
>>>>>> On 4/11/14, Sebastian Sastre <[hidden email]> wrote:
>>>>>> ...
>>>>>> 3. replaced 'smalltalk' with 'st' => 493KB
>>>>>> 4. replaced 'withContext' with 'wc' => 461KB
>>>>>> 5. replaced many others => ~433KB   ??? more examples?
>>>>>
>>>>> This could probably be achieved by a patch on the compiler.
>>>>>
>>>>> Siemen, any advice where to look for this as you have been reading
>>>>> Amber compiler code this week?
>>>>
>>>> Actually I didn't get to digging into it yet. I will keep it in mind when I do, but I'm afraid my mileage may vary - this will be my first Smalltalk compiler hack.
>>>>
>>>> Do you have actual performance problems in production? If so, have you checked if you could just use require.js concatenation and / or some off-the-shelf compression tool like uglify? OTOH, this should be possible, and seems like a more modular approach than building minification into the Amber compiler. I have never looked at it personally, though.
>>>>
>>>> best,
>>>> Siemen
>>>>
>>>>>
>>>>> --Hannes
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>
>--
>You received this message because you are subscribed to the Google Groups "amber-lang" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

Siemen Baader
In reply to this post by sebastianconcept
Hi,


On 12 Apr 2014, at 18:16, sebastian <[hidden email]> wrote:

> I do want Amber as simple as possible (meaning that not necessarily this should lead us to change much).
>
> I just want Amber code being as minifyable as angular's meteor's or any other kid on the block

Sure. I overlooked your initial post, so I didn't see your step 1 :o/

>
> And for sure NOT less
>
> Honestly I was expecting that minifyers were smarter but it's either they don't or I'm not using them rigth

Peculiar indeed. Uglify should parse the generated js and indeed shorten all these variables [1]. Did you  still find them in the uglified output? If so, is there any system to it; eg are only class names non-minified?

1: https://github.com/mishoo/UglifyJS

-- Siemen

>
> sebastian
>
> o/
>
>> On 12/04/2014, at 09:02, Siemen Baader <[hidden email]> wrote:
>>
>> Hi Hannes & Sebastian,
>>
>>> On 11 Apr 2014, at 10:06, H. Hirzel <[hidden email]> wrote:
>>>
>>> Hello Sebastian
>>>
>>>> On 4/11/14, Sebastian Sastre <[hidden email]> wrote:
>>>> ...
>>>> 3. replaced 'smalltalk' with 'st' => 493KB
>>>> 4. replaced 'withContext' with 'wc' => 461KB
>>>> 5. replaced many others => ~433KB   ??? more examples?
>>>
>>> This could probably be achieved by a patch on the compiler.
>>>
>>> Siemen, any advice where to look for this as you have been reading
>>> Amber compiler code this week?
>>
>> Actually I didn't get to digging into it yet. I will keep it in mind when I do, but I'm afraid my mileage may vary - this will be my first Smalltalk compiler hack.
>>
>> Do you have actual performance problems in production? If so, have you checked if you could just use require.js concatenation and / or some off-the-shelf compression tool like uglify? OTOH, this should be possible, and seems like a more modular approach than building minification into the Amber compiler. I have never looked at it personally, though.
>>
>> best,
>> Siemen
>>
>>>
>>> --Hannes
>>
>> --
>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

Manfred Kröhnert
Hi,

once we get the all-in-one Amber.js file created with grunt it is totally trivial to push it through uglifyjs afterwards.
In general, the minifier should be able to shorten function names which are used very often.

Best,
Manfred



On Sat, Apr 12, 2014 at 8:37 PM, Siemen Baader <[hidden email]> wrote:
Hi,


On 12 Apr 2014, at 18:16, sebastian <[hidden email]> wrote:

> I do want Amber as simple as possible (meaning that not necessarily this should lead us to change much).
>
> I just want Amber code being as minifyable as angular's meteor's or any other kid on the block

Sure. I overlooked your initial post, so I didn't see your step 1 :o/

>
> And for sure NOT less
>
> Honestly I was expecting that minifyers were smarter but it's either they don't or I'm not using them rigth

Peculiar indeed. Uglify should parse the generated js and indeed shorten all these variables [1]. Did you  still find them in the uglified output? If so, is there any system to it; eg are only class names non-minified?

1: https://github.com/mishoo/UglifyJS

-- Siemen

>
> sebastian
>
> o/
>
>> On 12/04/2014, at 09:02, Siemen Baader <[hidden email]> wrote:
>>
>> Hi Hannes & Sebastian,
>>
>>> On 11 Apr 2014, at 10:06, H. Hirzel <[hidden email]> wrote:
>>>
>>> Hello Sebastian
>>>
>>>> On 4/11/14, Sebastian Sastre <[hidden email]> wrote:
>>>> ...
>>>> 3. replaced 'smalltalk' with 'st' => 493KB
>>>> 4. replaced 'withContext' with 'wc' => 461KB
>>>> 5. replaced many others => ~433KB   ??? more examples?
>>>
>>> This could probably be achieved by a patch on the compiler.
>>>
>>> Siemen, any advice where to look for this as you have been reading
>>> Amber compiler code this week?
>>
>> Actually I didn't get to digging into it yet. I will keep it in mind when I do, but I'm afraid my mileage may vary - this will be my first Smalltalk compiler hack.
>>
>> Do you have actual performance problems in production? If so, have you checked if you could just use require.js concatenation and / or some off-the-shelf compression tool like uglify? OTOH, this should be possible, and seems like a more modular approach than building minification into the Amber compiler. I have never looked at it personally, though.
>>
>> best,
>> Siemen
>>
>>>
>>> --Hannes
>>
>> --
>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

Siemen Baader
Hi,

On 13 Apr 2014, at 11:09, Manfred Kröhnert <[hidden email]> wrote:

Hi,

once we get the all-in-one Amber.js file created with grunt it is totally trivial to push it through uglifyjs afterwards.
In general, the minifier should be able to shorten function names which are used very often.

I agree. But wasn't that what Sebastian did?

best,
Siemen


Best,
Manfred



On Sat, Apr 12, 2014 at 8:37 PM, Siemen Baader <[hidden email]> wrote:
Hi,


On 12 Apr 2014, at 18:16, sebastian <[hidden email]> wrote:

> I do want Amber as simple as possible (meaning that not necessarily this should lead us to change much).
>
> I just want Amber code being as minifyable as angular's meteor's or any other kid on the block

Sure. I overlooked your initial post, so I didn't see your step 1 :o/

>
> And for sure NOT less
>
> Honestly I was expecting that minifyers were smarter but it's either they don't or I'm not using them rigth

Peculiar indeed. Uglify should parse the generated js and indeed shorten all these variables [1]. Did you  still find them in the uglified output? If so, is there any system to it; eg are only class names non-minified?

1: https://github.com/mishoo/UglifyJS

-- Siemen

>
> sebastian
>
> o/
>
>> On 12/04/2014, at 09:02, Siemen Baader <[hidden email]> wrote:
>>
>> Hi Hannes & Sebastian,
>>
>>> On 11 Apr 2014, at 10:06, H. Hirzel <[hidden email]> wrote:
>>>
>>> Hello Sebastian
>>>
>>>> On 4/11/14, Sebastian Sastre <[hidden email]> wrote:
>>>> ...
>>>> 3. replaced 'smalltalk' with 'st' => 493KB
>>>> 4. replaced 'withContext' with 'wc' => 461KB
>>>> 5. replaced many others => ~433KB   ??? more examples?
>>>
>>> This could probably be achieved by a patch on the compiler.
>>>
>>> Siemen, any advice where to look for this as you have been reading
>>> Amber compiler code this week?
>>
>> Actually I didn't get to digging into it yet. I will keep it in mind when I do, but I'm afraid my mileage may vary - this will be my first Smalltalk compiler hack.
>>
>> Do you have actual performance problems in production? If so, have you checked if you could just use require.js concatenation and / or some off-the-shelf compression tool like uglify? OTOH, this should be possible, and seems like a more modular approach than building minification into the Amber compiler. I have never looked at it personally, though.
>>
>> best,
>> Siemen
>>
>>>
>>> --Hannes
>>
>> --
>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

Manfred Kröhnert
Hi,


On Sun, Apr 13, 2014 at 1:57 PM, Siemen Baader <[hidden email]> wrote:
Hi,

On 13 Apr 2014, at 11:09, Manfred Kröhnert <[hidden email]> wrote:

Hi,

once we get the all-in-one Amber.js file created with grunt it is totally trivial to push it through uglifyjs afterwards.
In general, the minifier should be able to shorten function names which are used very often.

I agree. But wasn't that what Sebastian did?

sorry for the vague answer :-)

I was thinking of a completely integrated solution to get a minified all-in-one Amber.js.
The idea is to have a single command like 'grunt minified' which produces the final file by doing all the require.js optimization, uglification and what else can be thought of.

To get there some issues need to be resolved first.
 
best,
Siemen


Best,
Manfred 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

sebastianconcept

On Apr 13, 2014, at 9:34 AM, Manfred Kröhnert <[hidden email]> wrote:

once we get the all-in-one Amber.js file created with grunt it is totally trivial to push it through uglifyjs afterwards.
In general, the minifier should be able to shorten function names which are used very often.

I agree. But wasn't that what Sebastian did?

sorry for the vague answer :-)

I was thinking of a completely integrated solution to get a minified all-in-one Amber.js.
The idea is to have a single command like 'grunt minified' which produces the final file by doing all the require.js optimization, uglification and what else can be thought of.

To get there some issues need to be resolved first.

This sounds like the most Continuos Integration friendly approach, so I’m all for everything that helps to get automation right and easy

To clarify what I did, it was this:

1. For some reason that I didn’t investigate too much the Closure compiler wasn’t compiling my sources I activated Plan B: use the deploy files..
2. made a bash command to concatenate all the needed deploy files into static/app/sources.js
3. made another bash command to uglify
4. made a clear command to make it idempotent

It’s names uglify and here is how it looks:

#!/bin/bash

./clear
./concatenate
uglifyjs -v -mt -o service/static/app/$1 service/static/app/source.js


Below is a sample of the first ~20% of the resulting code so you can have an impression of the result:

Disclaimer: remember this thing is from october 2013 and using an even older Amber

if(typeof console==="undefined"){this.console={log:function(){},warn:function(){},info:function(){},debug:function(){},error:function(){}}}Array.prototype.addElement=function(t){if(typeof t==="undefined"){return}if(this.indexOf(t)==-1){this.push(t)}};Array.prototype.removeElement=function(t){var l=this.indexOf(t);if(l!==-1){this.splice(l,1)}};function SmalltalkObject(){}function SmalltalkBehavior(){}function SmalltalkClass(){}function SmalltalkMetaclass(){this.meta=true}function SmalltalkPackage(){}function SmalltalkMethod(){}function SmalltalkNil(){}function SmalltalkOrganizer(){}function SmalltalkPackageOrganizer(){this.elements=[]}function SmalltalkClassOrganizer(){this.elements=[]}function inherits(t,l){t.prototype=Object.create(l.prototype,{constructor:{value:t,enumerable:false,configurable:true,writable:true}})}inherits(SmalltalkBehavior,SmalltalkObject);inherits(SmalltalkClass,SmalltalkBehavior);inherits(SmalltalkMetaclass,SmalltalkBehavior);inherits(SmalltalkNil,SmalltalkObject);inherits(SmalltalkMethod,SmalltalkObject);inherits(SmalltalkPackage,SmalltalkObject);inherits(SmalltalkOrganizer,SmalltalkObject);inherits(SmalltalkPackageOrganizer,SmalltalkOrganizer);inherits(SmalltalkClassOrganizer,SmalltalkOrganizer);function Smalltalk(){var t=this;t.thisContext=undefined;t.reservedWords=["break","case","catch","continue","debugger","default","delete","do","else","finally","for","function","if","in","instanceof","new","return","switch","this","throw","try","typeof","var","void","while","with","class","const","enum","export","extends","import","super","implements","interface","let","package","private","protected","public","static","yield"];var l=false;var a=[];var e=[];var s={methods:[],selectors:[],get:function(l){var a=this.selectors.indexOf(l);if(a!==-1){return this.methods[a]}this.selectors.push(l);var e=t.selector(l);var s={jsSelector:e,fn:this.createHandler(e)};this.methods.push(s);return s},createHandler:function(t){return function(){var l=Array.prototype.slice.call(arguments);return p(this,t,l)}}};t.allSelectors=function(){return s.selectors};var n=0;t.nextId=function(){n+=1;return n};t.packages={};function o(t){var l=new SmalltalkPackage;l.pkgName=t.pkgName;l.organization=new SmalltalkPackageOrganizer;l.properties=t.properties||{};return l}function r(t){t=t||{};var l=i(t);var a=l.instanceClass;a.fn=t.fn||function(){};m(a,t);a.className=t.className;a.wrapped=t.wrapped||false;l.className=t.className+" class";if(t.superclass){a.superclass=t.superclass;l.superclass=t.superclass.klass}return a}function i(t){t=t||{};var l=new SmalltalkMetaclass;inherits(l.fn=function(){},t.superclass?t.superclass.klass.fn:SmalltalkClass);l.instanceClass=new l.fn;m(l);return l}function m(t,l){l=l||{};t.iVarNames=l.iVarNames||[];t.pkg=l.pkg;Object.defineProperty(t,"toString",{value:function(){return"Smalltalk "+this.className},enumerable:false,configurable:true,writable:false});t.organization=new SmalltalkClassOrganizer;t.organization.theClass=t;Object.defineProperty(t,"methods",{value:{},enumerable:false,configurable:true,writable:true});u(t)}t.method=function(t){var l=new SmalltalkMethod;l.selector=t.selector;l.jsSelector=t.jsSelector;l.args=t.args||{};l.category=t.category;l.source=t.source;l.messageSends=t.messageSends||[];l.referencedClasses=t.referencedClasses||[];l.fn=t.fn;return l};t.init=function(l){t.initClass(l);if(l.klass&&!l.meta){t.initClass(l.klass)}};t.initClass=function(l){if(l.wrapped){d(l)}else{c(l)}if(l===t.Object||l.wrapped){h(l)}};function u(t){Object.defineProperty(t.fn.prototype,"klass",{value:t,enumerable:false,configurable:true,writable:true})}function c(t){if(t.fn.prototype._yourself){return}if(t.superclass&&t.superclass!==nil){inherits(t.fn,t.superclass.fn);u(t);_(t)}}function d(t,l){for(l=l||t.superclass;l&&l!==nil;l=l.superclass){for(var a=Object.keys(l.methods),e=0;e<a.length;e++){k(l.methods[a[e]],t)}}}function f(t,l){Object.defineProperty(l.fn.prototype,t.jsSelector,{value:t.fn,enumerable:false,configurable:true,writable:true})}function k(t,l){if(!l.fn.prototype[t.jsSelector]){f(t,l)}}function _(t){for(var l=Object.keys(t.methods),a=0;a<l.length;a++){f(t.methods[l[a]],t)}}function h(t){var l=s.methods;for(var a=0;a<l.length;a++){k(l[a],t)}}function g(l){k(l,t.Object);for(var a=0;a<e.length;a++){k(l,e[a])}}t.packages.all=function(){var l=[];for(var a in t.packages){if(!t.packages.hasOwnProperty(a)||typeof t.packages[a]==="function")continue;l.push(t.packages[a])}return l};t.classes=function(){return a};t.wrappedClasses=function(){return e};t.subclasses=function(l){var a=[];var e=t.classes();for(var s=0;s<e.length;s++){var n=e[s];if(n.fn){if(n.superclass===l){a.push(n)}n=n.klass;if(n&&n.superclass===l){a.push(n)}}}return a};t.wrapClassName=function(l,s,n,o,i){if(i!==false){i=true}var m=t.addPackage(s);t[l]=r({className:l,superclass:o,pkg:m,fn:n,wrapped:i});a.addElement(t[l]);if(i){e.addElement(t[l])}m.organization.elements.addElement(t[l])};t.alias=function(l,a){t[a]=l};t.addPackage=function(l,a){if(!l){return nil}if(!t.packages[l]){t.packages[l]=o({pkgName:l,properties:a})}else{if(a){t.packages[l].properties=a}}return t.packages[l]};t.addClass=function(l,e,s,n){var o=t.addPackage(n);if(e==nil){e=null}if(t[l]&&t[l].superclass==e){t[l].superclass=e;t[l].iVarNames=s;t[l].pkg=o||t[l].pkg}else{if(t[l]){t.removeClass(t[l])}t[l]=r({className:l,superclass:e,pkg:o,iVarNames:s})}a.addElement(t[l]);o.organization.elements.addElement(t[l])};t.removeClass=function(l){l.pkg.organization.elements.removeElement(l);a.removeElement(l);delete t[l.className]};t.addMethod=function(l,a,e){if(typeof l==="string"){if(l!==t.selector(a.selector)){console.log("DISCREPANCY: arg, in_method");console.log(l);console.log(t.selector(a.selector));a.jsSelector=l}return v(a,e)}return v(l,a)};function v(a,e){if(!a.jsSelector){a.jsSelector=t.selector(a.selector)}f(a,e);e.methods[a.selector]=a;a.methodClass=e;e.organization.elements.addElement(a.category);for(var n=0;n<a.messageSends.length;n++){var o=s.get(a.messageSends[n]);if(l){g(o)}}}t.removeMethod=function(l){var a=l.category;var e=l.methodClass;delete e.fn.prototype[t.selector(l.selector)];delete e.methods[l.selector];var s=Object.keys(e.methods)};t.send=function(t,l,a,e){var s;if(t==null){t=nil}s=e?e.fn.prototype[l]:t.klass&&t[l];if(s){return s.apply(t,a)}else{return p(t,l,a)}};t.withContext=function(l,a){if(t.thisContext){t.thisContext.pc++;return C(l,a)}else{try{return C(l,a)}catch(e){if(e.smalltalkError){S(e)}else{var s=t.JavaScriptException._on_(e);try{s._signal()}catch(n){}s._context_(t.getThisContext());S(s)}t.thisContext=undefined;throw e}}};function C(t,l){var a=x(l);var e=t(a);M(a);return e}function S(l){t.ErrorHandler._current()._handleError_(l)}function p(l,a,e){if(l.klass===undefined||l.allowJavaScriptCalls){return w(l,a,e)}return l._doesNotUnderstand_(t.Message._new()._selector_(t.convertSelector(a))._arguments_(e))}function w(l,a,e){var s=a._asJavaScriptSelector();var n=l[s];if(typeof n==="function"&&!/^[A-Z]/.test(s)){return n.apply(l,e)}else if(n!==undefined){if(e[0]){l[s]=e[0];return nil}else{return n}}return t.send(t.JSObjectProxy._on_(l),a,e)}t.getThisContext=function(){if(t.thisContext){t.thisContext.init();return t.thisContext}else{return nil}};function x(l){return t.thisContext=new SmalltalkMethodContext(smalltalk.thisContext,l)}function M(l){t.thisContext=l.homeContext}t.selector=function(t){var l="_"+t;l=l.replace(/:/g,"_");l=l.replace(/[\&]/g,"_and");l=l.replace(/[\|]/g,"_or");l=l.replace(/[+]/g,"_plus");l=l.replace(/-/g,"_minus");l=l.replace(/[*]/g,"_star");l=l.replace(/[\/]/g,"_slash");l=l.replace(/[\\]/g,"_backslash");l=l.replace(/[\~]/g,"_tild");l=l.replace(/>/g,"_gt");l=l.replace(/</g,"_lt");l=l.replace(/=/g,"_eq");l=l.replace(/,/g,"_comma");l=l.replace(/[@]/g,"_at");return l};t.convertSelector=function(t){if(t.match(/__/)){return b(t)}else{return y(t)}};function y(t){return t.replace(/^_/,"").replace(/_/g,":")}function b(t){return t.replace(/^_/,"").replace(/_and/g,"&").replace(/_or/g,"|").replace(/_plus/g,"+").replace(/_minus/g,"-").replace(/_star/g,"*").replace(/_slash/g,"/").replace(/_backslash/g,"\\").replace(/_tild/g,"~").replace(/_gt/g,">").replace(/_lt/g,"<").replace(/_eq/g,"=").replace(/_comma/g,",").replace(/_at/g,"@")}t.readJSObject=function(l){var a=l;var e=l.constructor===Object;var s=l.constructor===Array;if(e){a=t.Dictionary._new()}for(var n in l){if(e){a._at_put_(n,t.readJSObject(l[n]))}if(s){a[n]=t.readJSObject(l[n])}}return a};t.assert=function(t){if(undefined!==t&&t.klass===smalltalk.Boolean){return t==true}else{smalltalk.NonBooleanReceiver._new()._object_(t)._signal()}};t.symbolFor=function(t){return t};t.initialize=function(){if(l){return}a.forEach(function(l){t.init(l)});a.forEach(function(t){t._initialize()});l=true}}inherits(Smalltalk,SmalltalkObject);function SmalltalkMethodContext(t,l){this.homeContext=t;this.setup=l||function(){};this.pc=0}SmalltalkMethodContext.prototype.locals={};SmalltalkMethodContext.prototype.receiver=null;SmalltalkMethodContext.prototype.selector=null;SmalltalkMethodContext.prototype.lookupClass=null;inherits(SmalltalkMethodContext,SmalltalkObject);SmalltalkMethodContext.prototype.fill=function(t,l,a,e){this.receiver=t;this.selector=l;this.locals=a||{};this.lookupClass=e};SmalltalkMethodContext.prototype.fillBlock=function(t,l){this.locals=t||{};this.methodContext=l};SmalltalkMethodContext.prototype.init=function(){var t=this.homeContext;if(t){t=t.init()}this.setup(this)};SmalltalkMethodContext.prototype.method=function(){var t;var l=this.lookupClass||this.receiver.klass;while(!t&&l){t=l.methods[smalltalk.convertSelector(this.selector)];l=l.superclass}return t};SmalltalkMethodContext.prototype.resume=function(){smalltalk.thisContext=this;return this.method.apply(receiver,temps)};var nil=new SmalltalkNil;var smalltalk=new Smalltalk;if(this.jQuery){this.jQuery.allowJavaScriptCalls=true}var _st=function(t){if(t==null){return nil}if(t.klass){return t}return smalltalk.JSObjectProxy._on_(t)};smalltalk.wrapClassName("Object","Kernel-Objects",SmalltalkObject,undefined,false);smalltalk.wrapClassName("Behavior","Kernel-Classes",SmalltalkBehavior,smalltalk.Object,false);smalltalk.wrapClassName("Metaclass","Kernel-Classes",SmalltalkMetaclass,smalltalk.Behavior,false);smalltalk.wrapClassName("Class","Kernel-Classes",SmalltalkClass,smalltalk.Behavior,false);smalltalk.Object.klass.superclass=smalltalk.Class;smalltalk.wrapClassName("Smalltalk","Kernel-Objects",Smalltalk,smalltalk.Object,false);smalltalk.wrapClassName("Package","Kernel-Objects",SmalltalkPackage,smalltalk.Object,false);smalltalk.wrapClassName("CompiledMethod","Kernel-Methods",SmalltalkMethod,smalltalk.Object,false);smalltalk.wrapClassName("Organizer","Kernel-Objects",SmalltalkOrganizer,smalltalk.Object,false);smalltalk.wrapClassName("PackageOrganizer","Kernel-Objects",SmalltalkPackageOrganizer,smalltalk.Organizer,false);smalltalk.wrapClassName("ClassOrganizer","Kernel-Objects",SmalltalkClassOrganizer,smalltalk.Organizer,false);smalltalk.wrapClassName("Number","Kernel-Objects",Number,smalltalk.Object);smalltalk.wrapClassName("BlockClosure","Kernel-Methods",Function,smalltalk.Object);smalltalk.wrapClassName("Boolean","Kernel-Objects",Boolean,smalltalk.Object);smalltalk.wrapClassName("Date","Kernel-Objects",Date,smalltalk.Object);smalltalk.wrapClassName("UndefinedObject","Kernel-Objects",SmalltalkNil,smalltalk.Object,false);smalltalk.addClass("Collection",smalltalk.Object,null,"Kernel-Collections");smalltalk.addClass("IndexableCollection",smalltalk.Collection,null,"Kernel-Collections");smalltalk.addClass("SequenceableCollection",smalltalk.IndexableCollection,null,"Kernel-Collections");smalltalk.addClass("CharacterArray",smalltalk.SequenceableCollection,null,"Kernel-Collections");smalltalk.wrapClassName("String","Kernel-Collections",String,smalltalk.CharacterArray);smalltalk.wrapClassName("Array","Kernel-Collections",Array,smalltalk.SequenceableCollection);smalltalk.wrapClassName("RegularExpression","Kernel-Collections",RegExp,smalltalk.Object);smalltalk.wrapClassName("Error","Kernel-Exceptions",Error,smalltalk.Object);smalltalk.wrapClassName("MethodContext","Kernel-Methods",SmalltalkMethodContext,smalltalk.Object,false);smalltalk.alias(smalltalk.Array,"OrderedCollection");smalltalk.alias(smalltalk.Date,"Time");smalltalk.addPackage("Kernel-Objects");smalltalk.addClass("Object",smalltalk.nil,[],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"->",fn:function(t){var l=this;function a(){return smalltalk.Association||(typeof Association=="undefined"?nil:Association)}return smalltalk.withContext(function(e){var s;s=_st(a())._key_value_(l,t);return s},function(a){a.fill(l,"->",{anObject:t},smalltalk.Object)})},messageSends:["key:value:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"=",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(l).__eq_eq(t);return e},function(a){a.fill(l,"=",{anObject:t},smalltalk.Object)})},messageSends:["=="]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"==",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(l)._identityHash()).__eq(_st(t)._identityHash());return e},function(a){a.fill(l,"==",{anObject:t},smalltalk.Object)})},messageSends:["=","identityHash"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"asJSON",fn:function(){var t=this;var l;function a(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}return smalltalk.withContext(function(e){var s;l=_st(a())._new();_st(_st(_st(t)._class())._allInstanceVariableNames())._do_(function(a){return smalltalk.withContext(function(e){return _st(l)._at_put_(a,_st(_st(t)._instVarAt_(a))._asJSON())},function(t){t.fillBlock({each:a},e)})});s=l;return s},function(a){a.fill(t,"asJSON",{variables:l},smalltalk.Object)})},messageSends:["new","do:","at:put:","asJSON","instVarAt:","allInstanceVariableNames","class"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"asJSONString",fn:function(){var t=this;function l(){return smalltalk.JSON||(typeof JSON=="undefined"?nil:JSON)}return smalltalk.withContext(function(a){var e;e=_st(l())._stringify_(_st(t)._asJSON());return e},function(l){l.fill(t,"asJSONString",{},smalltalk.Object)})},messageSends:["stringify:","asJSON"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"asJavascript",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._asString();return a},function(l){l.fill(t,"asJavascript",{},smalltalk.Object)})},messageSends:["asString"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"asString",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._printString();return a},function(l){l.fill(t,"asString",{},smalltalk.Object)})},messageSends:["printString"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"basicAt:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l[t];return l},function(a){a.fill(l,"basicAt:",{aString:t},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"basicAt:put:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){return a[t]=l;return a},function(e){e.fill(a,"basicAt:put:",{aString:t,anObject:l},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"basicDelete:",fn:function(t){var l=this;return smalltalk.withContext(function(a){delete l[t];return t;return l},function(a){a.fill(l,"basicDelete:",{aString:t},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"basicPerform:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(l)._basicPerform_withArguments_(t,[]);return e},function(a){a.fill(l,"basicPerform:",{aString:t},smalltalk.Object)})},messageSends:["basicPerform:withArguments:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"basicPerform:withArguments:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){return a[t].apply(a,l);return a},function(e){e.fill(a,"basicPerform:withArguments:",{aString:t,aCollection:l},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"class",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.klass;return t},function(l){l.fill(t,"class",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"copy",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st(t)._shallowCopy())._postCopy();return a},function(l){l.fill(t,"copy",{},smalltalk.Object)})},messageSends:["postCopy","shallowCopy"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"deepCopy",fn:function(){var t=this;return smalltalk.withContext(function(l){var a=t.klass._new();for(var e in t){if(/^@.+/.test(e)){a[e]=t[e]._deepCopy()}}return a;return t},function(l){l.fill(t,"deepCopy",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"deprecatedAPI",fn:function(){var t=this;return smalltalk.withContext(function(l){_st(console)._warn_(_st(_st(_st(_st(_st(smalltalk.getThisContext())._home())._asString()).__comma(" is deprecated! (in ")).__comma(_st(_st(_st(smalltalk.getThisContext())._home())._home())._asString())).__comma(")"));return t},function(l){l.fill(t,"deprecatedAPI",{},smalltalk.Object)})},messageSends:["warn:",",","asString","home"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"doesNotUnderstand:",fn:function(t){var l=this;function a(){return smalltalk.MessageNotUnderstood||(typeof MessageNotUnderstood=="undefined"?nil:MessageNotUnderstood)}return smalltalk.withContext(function(e){var s,n;s=_st(a())._new();_st(s)._receiver_(l);_st(s)._message_(t);n=_st(s)._signal();return l},function(a){a.fill(l,"doesNotUnderstand:",{aMessage:t},smalltalk.Object)})},messageSends:["receiver:","new","message:","signal"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"error:",fn:function(t){var l=this;function a(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}return smalltalk.withContext(function(e){_st(a())._signal_(t);return l},function(a){a.fill(l,"error:",{aString:t},smalltalk.Object)})},messageSends:["signal:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"halt",fn:function(){var t=this;return smalltalk.withContext(function(l){_st(t)._error_("Halt encountered");return t},function(l){l.fill(t,"halt",{},smalltalk.Object)})},messageSends:["error:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"identityHash",fn:function(){var t=this;return smalltalk.withContext(function(l){var a=t.identityHash;if(a)return a;a=smalltalk.nextId();Object.defineProperty(t,"identityHash",{value:a});return a;return t},function(l){l.fill(t,"identityHash",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"ifNil:",fn:function(t){var l=this;return smalltalk.withContext(function(t){var a;a=l;return a},function(a){a.fill(l,"ifNil:",{aBlock:t},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"ifNil:ifNotNil:",fn:function(t,l){var a=this;return smalltalk.withContext(function(t){var e;e=_st(l)._value_(a);return e},function(e){e.fill(a,"ifNil:ifNotNil:",{aBlock:t,anotherBlock:l},smalltalk.Object)})},messageSends:["value:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"ifNotNil:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(t)._value_(l);return e},function(a){a.fill(l,"ifNotNil:",{aBlock:t},smalltalk.Object)})},messageSends:["value:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"ifNotNil:ifNil:",fn:function(t,l){var a=this;return smalltalk.withContext(function(l){var e;e=_st(t)._value_(a);return e},function(e){e.fill(a,"ifNotNil:ifNil:",{aBlock:t,anotherBlock:l},smalltalk.Object)})},messageSends:["value:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"initialize",fn:function(){var t=this;return smalltalk.withContext(function(l){return t},function(l){l.fill(t,"initialize",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"instVarAt:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l["@"+t];return l},function(a){a.fill(l,"instVarAt:",{aString:t},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"instVarAt:put:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){a["@"+t]=l;return a},function(e){e.fill(a,"instVarAt:put:",{aString:t,anObject:l},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isBehavior",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isBehavior",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isBoolean",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isBoolean",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isClass",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isClass",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isCompiledMethod",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isCompiledMethod",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isImmutable",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isImmutable",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isKindOf:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s;e=_st(l)._isMemberOf_(t);if(smalltalk.assert(e)){s=true}else{s=_st(_st(l)._class())._inheritsFrom_(t)}return s},function(a){a.fill(l,"isKindOf:",{aClass:t},smalltalk.Object)})},messageSends:["ifTrue:ifFalse:","inheritsFrom:","class","isMemberOf:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isMemberOf:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(l)._class()).__eq(t);return e},function(a){a.fill(l,"isMemberOf:",{aClass:t},smalltalk.Object)})},messageSends:["=","class"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isMetaclass",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isMetaclass",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isNil",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isNil",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isNumber",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isNumber",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isPackage",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isPackage",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isParseFailure",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isParseFailure",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isString",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isString",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"isSymbol",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"isSymbol",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"notNil",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st(t)._isNil())._not();return a},function(l){l.fill(t,"notNil",{},smalltalk.Object)})},messageSends:["not","isNil"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"perform:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(l)._perform_withArguments_(t,[]);return e},function(a){a.fill(l,"perform:",{aString:t},smalltalk.Object)})},messageSends:["perform:withArguments:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"perform:withArguments:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){return smalltalk.send(a,t._asSelector(),l);return a},function(e){e.fill(a,"perform:withArguments:",{aString:t,aCollection:l},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"postCopy",fn:function(){var t=this;return smalltalk.withContext(function(l){return t},function(l){l.fill(t,"postCopy",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"printOn:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s,n;e=t;s=_st(_st(_st(_st(l)._class())._name())._first())._isVowel();if(smalltalk.assert(s)){n="an "}else{n="a "}_st(e)._nextPutAll_(n);_st(t)._nextPutAll_(_st(_st(l)._class())._name());return l},function(a){a.fill(l,"printOn:",{aStream:t},smalltalk.Object)})},messageSends:["nextPutAll:","ifTrue:ifFalse:","isVowel","first","name","class"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"printString",fn:function(){var t=this;function l(){return smalltalk.String||(typeof String=="undefined"?nil:String)}return smalltalk.withContext(function(a){var e;e=_st(l())._streamContents_(function(l){return smalltalk.withContext(function(a){return _st(t)._printOn_(l)},function(t){t.fillBlock({stream:l},a)})});return e},function(l){l.fill(t,"printString",{},smalltalk.Object)})},messageSends:["streamContents:","printOn:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"putOn:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(t)._nextPut_(l);return l},function(a){a.fill(l,"putOn:",{aStream:t},smalltalk.Object)})},messageSends:["nextPut:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"respondsTo:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(l)._class())._canUnderstand_(t);return e},function(a){a.fill(l,"respondsTo:",{aSelector:t},smalltalk.Object)})},messageSends:["canUnderstand:","class"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"shallowCopy",fn:function(){var t=this;return smalltalk.withContext(function(l){var a=t.klass._new();for(var e in t){if(/^@.+/.test(e)){a[e]=t[e]}}return a;return t},function(l){l.fill(t,"shallowCopy",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"shouldNotImplement",fn:function(){var t=this;return smalltalk.withContext(function(l){_st(t)._error_(_st("This method should not be implemented in ").__comma(_st(_st(t)._class())._name()));return t},function(l){l.fill(t,"shouldNotImplement",{},smalltalk.Object)})},messageSends:["error:",",","name","class"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"size",fn:function(){var t=this;return smalltalk.withContext(function(l){_st(t)._error_("Object not indexable");return t},function(l){l.fill(t,"size",{},smalltalk.Object)})},messageSends:["error:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"subclassResponsibility",fn:function(){var t=this;return smalltalk.withContext(function(l){_st(t)._error_("This method is a responsibility of a subclass");return t},function(l){l.fill(t,"subclassResponsibility",{},smalltalk.Object)})},messageSends:["error:"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"test",fn:function(){var t=this;var l;return smalltalk.withContext(function(a){l=1;_st(t)._halt();return t},function(a){a.fill(t,"test",{a:l},smalltalk.Object)})},messageSends:["halt"]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"throw:",fn:function(t){var l=this;return smalltalk.withContext(function(a){throw t;return l},function(a){a.fill(l,"throw:",{anObject:t},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"try:catch:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){try{return t()}catch(s){return l(s)}return a},function(e){e.fill(a,"try:catch:",{aBlock:t,anotherBlock:l},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"value",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.valueOf();return t},function(l){l.fill(t,"value",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"yourself",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t;return a},function(l){l.fill(t,"yourself",{},smalltalk.Object)})},messageSends:[]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"~=",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(l).__eq(t)).__eq(false);return e},function(a){a.fill(l,"~=",{anObject:t},smalltalk.Object)})},messageSends:["="]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"~~",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(l).__eq_eq(t)).__eq(false);return e},function(a){a.fill(l,"~~",{anObject:t},smalltalk.Object)})},messageSends:["=","=="]}),smalltalk.Object);smalltalk.addMethod(smalltalk.method({selector:"initialize",fn:function(){var t=this;return smalltalk.withContext(function(l){return t},function(l){l.fill(t,"initialize",{},smalltalk.Object.klass)})},messageSends:[]}),smalltalk.Object.klass);smalltalk.addClass("Boolean",smalltalk.Object,[],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"&",fn:function(t){var l=this;return smalltalk.withContext(function(a){if(l==true){return t}else{return false}return l},function(a){a.fill(l,"&",{aBoolean:t},smalltalk.Boolean)})},messageSends:[]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"=",fn:function(t){var l=this;return smalltalk.withContext(function(a){if(!t._isBoolean||!t._isBoolean()){return false}return Boolean(l==true)==t;return l},function(a){a.fill(l,"=",{aBoolean:t},smalltalk.Boolean)})},messageSends:[]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"==",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(l).__eq(t);return e},function(a){a.fill(l,"==",{aBoolean:t},smalltalk.Boolean)})},messageSends:["="]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"and:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s;e=_st(l).__eq(true);s=_st(e)._ifTrue_ifFalse_(t,function(){return smalltalk.withContext(function(t){return false},function(t){t.fillBlock({},a)})});return s},function(a){a.fill(l,"and:",{aBlock:t},smalltalk.Boolean)})},messageSends:["ifTrue:ifFalse:","="]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"asJSON",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t;return a},function(l){l.fill(t,"asJSON",{},smalltalk.Boolean)})},messageSends:[]}),smalltalk.Boolean);
smalltalk.addMethod(smalltalk.method({selector:"asString",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.toString();return t},function(l){l.fill(t,"asString",{},smalltalk.Boolean)})},messageSends:[]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"deepCopy",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t;return a},function(l){l.fill(t,"deepCopy",{},smalltalk.Boolean)})},messageSends:[]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"ifFalse:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s;e=l;s=_st(e)._ifTrue_ifFalse_(function(){return smalltalk.withContext(function(t){},function(t){t.fillBlock({},a)})},t);return s},function(a){a.fill(l,"ifFalse:",{aBlock:t},smalltalk.Boolean)})},messageSends:["ifTrue:ifFalse:"]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"ifFalse:ifTrue:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s,n;s=a;n=_st(s)._ifTrue_ifFalse_(l,t);return n},function(e){e.fill(a,"ifFalse:ifTrue:",{aBlock:t,anotherBlock:l},smalltalk.Boolean)})},messageSends:["ifTrue:ifFalse:"]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"ifTrue:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s;e=l;s=_st(e)._ifTrue_ifFalse_(t,function(){return smalltalk.withContext(function(t){},function(t){t.fillBlock({},a)})});return s},function(a){a.fill(l,"ifTrue:",{aBlock:t},smalltalk.Boolean)})},messageSends:["ifTrue:ifFalse:"]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"ifTrue:ifFalse:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){if(a==true){return t()}else{return l()}return a},function(e){e.fill(a,"ifTrue:ifFalse:",{aBlock:t,anotherBlock:l},smalltalk.Boolean)})},messageSends:[]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"isBoolean",fn:function(){var t=this;return smalltalk.withContext(function(t){return true},function(l){l.fill(t,"isBoolean",{},smalltalk.Boolean)})},messageSends:[]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"isImmutable",fn:function(){var t=this;return smalltalk.withContext(function(t){return true},function(l){l.fill(t,"isImmutable",{},smalltalk.Boolean)})},messageSends:[]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"not",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t).__eq(false);return a},function(l){l.fill(t,"not",{},smalltalk.Boolean)})},messageSends:["="]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"or:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s;e=_st(l).__eq(true);s=_st(e)._ifTrue_ifFalse_(function(){return smalltalk.withContext(function(t){return true},function(t){t.fillBlock({},a)})},t);return s},function(a){a.fill(l,"or:",{aBlock:t},smalltalk.Boolean)})},messageSends:["ifTrue:ifFalse:","="]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"printOn:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(t)._nextPutAll_(_st(l)._asString());return l},function(a){a.fill(l,"printOn:",{aStream:t},smalltalk.Boolean)})},messageSends:["nextPutAll:","asString"]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"shallowCopy",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t;return a},function(l){l.fill(t,"shallowCopy",{},smalltalk.Boolean)})},messageSends:[]}),smalltalk.Boolean);smalltalk.addMethod(smalltalk.method({selector:"|",fn:function(t){var l=this;return smalltalk.withContext(function(a){if(l==true){return true}else{return t}return l},function(a){a.fill(l,"|",{aBoolean:t},smalltalk.Boolean)})},messageSends:[]}),smalltalk.Boolean);smalltalk.addClass("Date",smalltalk.Object,[],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"+",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l+t;return l},function(a){a.fill(l,"+",{aDate:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"-",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l-t;return l},function(a){a.fill(l,"-",{aDate:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"<",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l<t;return l},function(a){a.fill(l,"<",{aDate:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"<=",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l<=t;return l},function(a){a.fill(l,"<=",{aDate:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:">",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l>t;return l},function(a){a.fill(l,">",{aDate:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:">=",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l>=t;return l},function(a){a.fill(l,">=",{aDate:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"asDateString",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.toDateString();return t},function(l){l.fill(t,"asDateString",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"asLocaleString",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.toLocaleString();return t},function(l){l.fill(t,"asLocaleString",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"asMilliseconds",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._time();return a},function(l){l.fill(t,"asMilliseconds",{},smalltalk.Date)})},messageSends:["time"]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"asNumber",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._asMilliseconds();return a},function(l){l.fill(t,"asNumber",{},smalltalk.Date)})},messageSends:["asMilliseconds"]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"asString",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.toString();return t},function(l){l.fill(t,"asString",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"asTimeString",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.toTimeString();return t},function(l){l.fill(t,"asTimeString",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"day",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._dayOfWeek();return a},function(l){l.fill(t,"day",{},smalltalk.Date)})},messageSends:["dayOfWeek"]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"day:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(l)._dayOfWeek_(t);return l},function(a){a.fill(l,"day:",{aNumber:t},smalltalk.Date)})},messageSends:["dayOfWeek:"]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"dayOfMonth",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.getDate();return t},function(l){l.fill(t,"dayOfMonth",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"dayOfMonth:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.setDate(t);return l},function(a){a.fill(l,"dayOfMonth:",{aNumber:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"dayOfWeek",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.getDay()+1;return t},function(l){l.fill(t,"dayOfWeek",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"dayOfWeek:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l.setDay(t-1);return l},function(a){a.fill(l,"dayOfWeek:",{aNumber:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"hours",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.getHours();return t},function(l){l.fill(t,"hours",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"hours:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.setHours(t);return l},function(a){a.fill(l,"hours:",{aNumber:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"milliseconds",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.getMilliseconds();return t},function(l){l.fill(t,"milliseconds",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"milliseconds:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.setMilliseconds(t);return l},function(a){a.fill(l,"milliseconds:",{aNumber:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"minutes",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.getMinutes();return t},function(l){l.fill(t,"minutes",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"minutes:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.setMinutes(t);return l},function(a){a.fill(l,"minutes:",{aNumber:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"month",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.getMonth()+1;return t},function(l){l.fill(t,"month",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"month:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.setMonth(t-1);return l},function(a){a.fill(l,"month:",{aNumber:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"printOn:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(t)._nextPutAll_(_st(l)._asString());return l},function(a){a.fill(l,"printOn:",{aStream:t},smalltalk.Date)})},messageSends:["nextPutAll:","asString"]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"seconds",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.getSeconds();return t},function(l){l.fill(t,"seconds",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"seconds:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.setSeconds(t);return l},function(a){a.fill(l,"seconds:",{aNumber:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"time",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.getTime();return t},function(l){l.fill(t,"time",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"time:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.setTime(t);return l},function(a){a.fill(l,"time:",{aNumber:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"year",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.getFullYear();return t},function(l){l.fill(t,"year",{},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"year:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.setFullYear(t);return l},function(a){a.fill(l,"year:",{aNumber:t},smalltalk.Date)})},messageSends:[]}),smalltalk.Date);smalltalk.addMethod(smalltalk.method({selector:"fromMilliseconds:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(l)._new_(t);return e},function(a){a.fill(l,"fromMilliseconds:",{aNumber:t},smalltalk.Date.klass)})},messageSends:["new:"]}),smalltalk.Date.klass);smalltalk.addMethod(smalltalk.method({selector:"fromSeconds:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(l)._fromMilliseconds_(_st(t).__star(1e3));return e},function(a){a.fill(l,"fromSeconds:",{aNumber:t},smalltalk.Date.klass)})},messageSends:["fromMilliseconds:","*"]}),smalltalk.Date.klass);smalltalk.addMethod(smalltalk.method({selector:"fromString:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(l)._new_(t);return e},function(a){a.fill(l,"fromString:",{aString:t},smalltalk.Date.klass)})},messageSends:["new:"]}),smalltalk.Date.klass);smalltalk.addMethod(smalltalk.method({selector:"millisecondsToRun:",fn:function(t){var l=this;var a;function e(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}return smalltalk.withContext(function(l){var s;a=_st(e())._now();_st(t)._value();s=_st(_st(e())._now()).__minus(a);return s},function(e){e.fill(l,"millisecondsToRun:",{aBlock:t,t:a},smalltalk.Date.klass)})},messageSends:["now","value","-"]}),smalltalk.Date.klass);smalltalk.addMethod(smalltalk.method({selector:"new:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return new Date(t);return l},function(a){a.fill(l,"new:",{anObject:t},smalltalk.Date.klass)})},messageSends:[]}),smalltalk.Date.klass);smalltalk.addMethod(smalltalk.method({selector:"now",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._today();return a},function(l){l.fill(t,"now",{},smalltalk.Date.klass)})},messageSends:["today"]}),smalltalk.Date.klass);smalltalk.addMethod(smalltalk.method({selector:"today",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._new();return a},function(l){l.fill(t,"today",{},smalltalk.Date.klass)})},messageSends:["new"]}),smalltalk.Date.klass);smalltalk.addClass("Environment",smalltalk.Object,[],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"addInstVarNamed:to:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s,n;s=_st(_st(l)._instanceVariableNames())._copy();_st(s)._add_(t);n=_st(s)._yourself();_st(_st(a)._classBuilder())._addSubclassOf_named_instanceVariableNames_package_(_st(l)._superclass(),_st(l)._name(),n,_st(_st(l)._package())._name());return a},function(e){e.fill(a,"addInstVarNamed:to:",{aString:t,aClass:l},smalltalk.HLEnvironment)})},messageSends:["addSubclassOf:named:instanceVariableNames:package:","superclass","name","add:","copy","instanceVariableNames","yourself","package","classBuilder"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"allSelectors",fn:function(){var t=this;function l(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(t){var a;a=_st(_st(_st(l())._current())._at_("allSelectors"))._value();return a},function(l){l.fill(t,"allSelectors",{},smalltalk.Environment)})},messageSends:["value","at:","current"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"availableClassNames",fn:function(){var t=this;function l(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(t){var a;a=_st(_st(_st(l())._current())._classes())._collect_(function(l){return smalltalk.withContext(function(t){return _st(l)._name()},function(a){a.fillBlock({each:l},t)})});return a},function(l){l.fill(t,"availableClassNames",{},smalltalk.HLEnvironment)})},messageSends:["collect:","name","classes","current"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"availablePackageNames",fn:function(){var t=this;function l(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(t){var a;a=_st(_st(_st(l())._current())._packages())._collect_(function(l){return smalltalk.withContext(function(t){return _st(l)._name()},function(a){a.fillBlock({each:l},t)})});return a},function(l){l.fill(t,"availablePackageNames",{},smalltalk.HLEnvironment)})},messageSends:["collect:","name","packages","current"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"availableProtocolsFor:",fn:function(t){var l=this;var a;return smalltalk.withContext(function(e){var s,n;a=_st(t)._protocols();s=_st(t)._superclass();if(($receiver=s)==nil||$receiver==undefined){s}else{_st(a)._addAll_(_st(l)._availableProtocolsFor_(_st(t)._superclass()))}n=_st(_st(a)._asSet())._asArray();return n},function(e){e.fill(l,"availableProtocolsFor:",{aClass:t,protocols:a},smalltalk.HLEnvironment)})},messageSends:["protocols","ifNotNil:","addAll:","availableProtocolsFor:","superclass","asArray","asSet"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"classBuilder",fn:function(){var t=this;function l(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}return smalltalk.withContext(function(t){var a;a=_st(l())._new();return a},function(l){l.fill(t,"classBuilder",{},smalltalk.HLEnvironment)})},messageSends:["new"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"classNamed:",fn:function(t){var l=this;function a(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(e){var s,n;s=_st(_st(a())._current())._at_(_st(t)._asSymbol());if(($receiver=s)==nil||$receiver==undefined){n=_st(l)._error_("Invalid class name")}else{n=s}return n},function(a){a.fill(l,"classNamed:",{aString:t},smalltalk.HLEnvironment)})},messageSends:["ifNil:","error:","at:","asSymbol","current"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"classes",fn:function(){var t=this;function l(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(t){var a;a=_st(_st(l())._current())._classes();return a},function(l){l.fill(t,"classes",{},smalltalk.Environment)})},messageSends:["classes","current"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"commitPackage:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(t)._commit();return l},function(a){a.fill(l,"commitPackage:",{aPackage:t},smalltalk.HLEnvironment)})},messageSends:["commit"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"compileClassComment:for:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){_st(l)._comment_(t);return a},function(e){e.fill(a,"compileClassComment:for:",{aString:t,aClass:l},smalltalk.HLEnvironment)})},messageSends:["comment:"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"compileClassDefinition:",fn:function(t){var l=this;function a(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}return smalltalk.withContext(function(e){_st(l)._eval_on_(t,_st(a())._new());return l},function(a){a.fill(l,"compileClassDefinition:",{aString:t},smalltalk.HLEnvironment)})},messageSends:["eval:on:","new"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"compileMethod:for:protocol:",fn:function(t,l,a){var e=this;return smalltalk.withContext(function(e){var s;s=_st(l)._compile_category_(t,a);return s},function(s){s.fill(e,"compileMethod:for:protocol:",{sourceCode:t,class_:l,protocol:a},smalltalk.HLEnvironment)})},messageSends:["compile:category:"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"copyClass:to:",fn:function(t,l){var a=this;function e(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}function s(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}return smalltalk.withContext(function(n){var o;o=_st(_st(e())._current())._at_(l);if(($receiver=o)==nil||$receiver==undefined){o}else{_st(a)._error_(_st(_st("A class named ").__comma(l)).__comma(" already exists"))}_st(_st(s())._new())._copyClass_named_(t,l);return a},function(e){e.fill(a,"copyClass:to:",{aClass:t,aClassName:l},smalltalk.HLEnvironment)})},messageSends:["ifNotNil:","error:",",","at:","current","copyClass:named:","new"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"eval:on:",fn:function(t,l){var a=this;var e;function s(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}function n(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}return smalltalk.withContext(function(a){var o,r;var i={};try{e=_st(s())._new();_st(function(){return smalltalk.withContext(function(l){return _st(e)._parseExpression_(t)},function(t){t.fillBlock({},a)})})._on_do_(n(),function(t){return smalltalk.withContext(function(l){o=_st(window)._alert_(_st(t)._messageText());throw i=[o]},function(l){l.fillBlock({ex:t},a)})});r=_st(e)._evaluateExpression_on_(t,l);return r}catch(m){if(m===i)return m[0];throw m}},function(s){s.fill(a,"eval:on:",{aString:t,aReceiver:l,compiler:e},smalltalk.HLEnvironment)})},messageSends:["new","on:do:","alert:","messageText","parseExpression:","evaluateExpression:on:"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"moveClass:toPackage:",fn:function(t,l){var a=this;var e;function s(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}return smalltalk.withContext(function(n){var o,r,i;e=_st(s())._named_(l);o=e;if(($receiver=o)==nil||$receiver==undefined){_st(a)._error_("Invalid package name")}else{o}r=_st(e).__eq_eq(_st(t)._package());if(smalltalk.assert(r)){i=a;return i}_st(t)._package_(e);return a},function(s){s.fill(a,"moveClass:toPackage:",{aClass:t,aPackageName:l,package_:e},smalltalk.HLEnvironment)})},messageSends:["named:","ifNil:","error:","ifTrue:","==","package","package:"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"moveMethod:toClass:",fn:function(t,l){var a=this;var e;function s(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(n){var o,r,i;e=_st(_st(s())._current())._at_(_st(l)._asSymbol());o=e;if(($receiver=o)==nil||$receiver==undefined){_st(a)._error_("Invalid class name")}else{o}r=_st(e).__eq_eq(_st(t)._methodClass());if(smalltalk.assert(r)){i=a;return i}_st(e)._compile_category_(_st(t)._source(),_st(t)._protocol());_st(_st(t)._methodClass())._removeCompiledMethod_(t);return a},function(s){s.fill(a,"moveMethod:toClass:",{aMethod:t,aClassName:l,destinationClass:e},smalltalk.Environment)})},messageSends:["at:","asSymbol","current","ifNil:","error:","ifTrue:","==","methodClass","compile:category:","source","protocol","removeCompiledMethod:"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"moveMethod:toProtocol:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){_st(t)._category_(l);return a},function(e){e.fill(a,"moveMethod:toProtocol:",{aMethod:t,aProtocol:l},smalltalk.HLEnvironment)})},messageSends:["category:"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"packages",fn:function(){var t=this;function l(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(t){var a;a=_st(_st(l())._current())._packages();return a},function(l){l.fill(t,"packages",{},smalltalk.HLEnvironment)})},messageSends:["packages","current"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"removeClass:",fn:function(t){var l=this;function a(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(e){_st(_st(a())._current())._removeClass_(t);return l},function(a){a.fill(l,"removeClass:",{aClass:t},smalltalk.HLEnvironment)})},messageSends:["removeClass:","current"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"removeMethod:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(_st(t)._methodClass())._removeCompiledMethod_(t);return l},function(a){a.fill(l,"removeMethod:",{aMethod:t},smalltalk.Environment)})},messageSends:["removeCompiledMethod:","methodClass"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"removeProtocol:from:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){_st(_st(_st(l)._methods())._select_(function(l){return smalltalk.withContext(function(a){return _st(_st(l)._protocol()).__eq(t)},function(t){t.fillBlock({each:l},e)})}))._do_(function(t){return smalltalk.withContext(function(a){return _st(l)._removeCompiledMethod_(t)},function(l){l.fillBlock({each:t},e)})});return a},function(e){e.fill(a,"removeProtocol:from:",{aString:t,aClass:l},smalltalk.Environment)})},messageSends:["do:","removeCompiledMethod:","select:","=","protocol","methods"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"renameClass:to:",fn:function(t,l){var a=this;function e(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}function s(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}return smalltalk.withContext(function(n){var o;o=_st(_st(e())._current())._at_(l);if(($receiver=o)==nil||$receiver==undefined){o}else{_st(a)._error_(_st(_st("A class named ").__comma(l)).__comma(" already exists"))}_st(_st(s())._new())._renameClass_to_(t,l);return a},function(e){e.fill(a,"renameClass:to:",{aClass:t,aClassName:l},smalltalk.HLEnvironment)})},messageSends:["ifNotNil:","error:",",","at:","current","renameClass:to:","new"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"renameProtocol:to:in:",fn:function(t,l,a){var e=this;return smalltalk.withContext(function(s){_st(_st(_st(a)._methods())._select_(function(l){return smalltalk.withContext(function(a){return _st(_st(l)._protocol()).__eq(t)},function(t){t.fillBlock({each:l},s)})}))._do_(function(t){return smalltalk.withContext(function(a){return _st(t)._protocol_(l)},function(l){l.fillBlock({each:t},s)})});return e},function(s){s.fill(e,"renameProtocol:to:in:",{aString:t,anotherString:l,aClass:a},smalltalk.Environment)})},messageSends:["do:","protocol:","select:","=","protocol","methods"]}),smalltalk.Environment);smalltalk.addMethod(smalltalk.method({selector:"systemAnnouncer",fn:function(){var t=this;function l(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(t){var a;a=_st(_st(_st(l())._current())._at_("SystemAnnouncer"))._current();return a},function(l){l.fill(t,"systemAnnouncer",{},smalltalk.Environment)})},messageSends:["current","at:"]}),smalltalk.Environment);smalltalk.addClass("JSObjectProxy",smalltalk.Object,["jsObject"],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"addObjectVariablesTo:",fn:function(t){var l=this;return smalltalk.withContext(function(a){for(var e in l["@jsObject"]){t._at_put_(e,l["@jsObject"][e])}return l},function(a){a.fill(l,"addObjectVariablesTo:",{aDictionary:t},smalltalk.JSObjectProxy)})},messageSends:[]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"at:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l["@jsObject"][t];return l},function(a){a.fill(l,"at:",{aString:t},smalltalk.JSObjectProxy)})},messageSends:[]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"at:ifAbsent:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s=a["@jsObject"];return t in s?s[t]:l();return a},function(e){e.fill(a,"at:ifAbsent:",{aString:t,aBlock:l},smalltalk.JSObjectProxy)})},messageSends:[]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"at:ifPresent:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s=a["@jsObject"];return t in s?l(s[t]):nil;return a},function(e){e.fill(a,"at:ifPresent:",{aString:t,aBlock:l},smalltalk.JSObjectProxy)})},messageSends:[]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"at:ifPresent:ifAbsent:",fn:function(t,l,a){var e=this;return smalltalk.withContext(function(s){var n=e["@jsObject"];return t in n?l(n[t]):a();return e},function(s){s.fill(e,"at:ifPresent:ifAbsent:",{aString:t,aBlock:l,anotherBlock:a},smalltalk.JSObjectProxy)})},messageSends:[]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"at:put:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){a["@jsObject"][t]=l;return a},function(e){e.fill(a,"at:put:",{aString:t,anObject:l},smalltalk.JSObjectProxy)})},messageSends:[]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"doesNotUnderstand:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s;e=_st(l)._lookupProperty_(_st(_st(t)._selector())._asJavaScriptSelector());if(($receiver=e)==nil||$receiver==undefined){s=smalltalk.Object.fn.prototype._doesNotUnderstand_.apply(_st(l),[t])}else{var n;n=$receiver;s=_st(l)._forwardMessage_withArguments_(n,_st(t)._arguments())}return s},function(a){a.fill(l,"doesNotUnderstand:",{aMessage:t},smalltalk.JSObjectProxy)})},messageSends:["ifNil:ifNotNil:","doesNotUnderstand:","forwardMessage:withArguments:","arguments","lookupProperty:","asJavaScriptSelector","selector"]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"forwardMessage:withArguments:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){return smalltalk.send(a._jsObject(),t,l);return a},function(e){e.fill(a,"forwardMessage:withArguments:",{aString:t,anArray:l},smalltalk.JSObjectProxy)})},messageSends:[]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"inspectOn:",fn:function(t){var l=this;var a;function e(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}return smalltalk.withContext(function(s){a=_st(e())._new();_st(a)._at_put_("#self",_st(l)._jsObject());_st(t)._setLabel_(_st(l)._printString());_st(l)._addObjectVariablesTo_(a);_st(t)._setVariables_(a);return l},function(e){e.fill(l,"inspectOn:",{anInspector:t,variables:a},smalltalk.JSObjectProxy)})},messageSends:["new","at:put:","jsObject","setLabel:","printString","addObjectVariablesTo:","setVariables:"]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"jsObject",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t["@jsObject"];return a},function(l){l.fill(t,"jsObject",{},smalltalk.JSObjectProxy)})},messageSends:[]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"jsObject:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l["@jsObject"]=t;return l},function(a){a.fill(l,"jsObject:",{aJSObject:t},smalltalk.JSObjectProxy)})},messageSends:[]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"keysAndValuesDo:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e=l["@jsObject"];for(var s in e){t(s,e[s])}return l},function(a){a.fill(l,"keysAndValuesDo:",{aBlock:t},smalltalk.JSObjectProxy)})},messageSends:[]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"lookupProperty:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return t in l._jsObject()?t:nil;return l},function(a){a.fill(l,"lookupProperty:",{aString:t},smalltalk.JSObjectProxy)})},messageSends:[]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"printOn:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(t)._nextPutAll_(_st(_st(l)._jsObject())._toString());return l},function(a){a.fill(l,"printOn:",{aStream:t},smalltalk.JSObjectProxy)})},messageSends:["nextPutAll:","toString","jsObject"]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"value",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;
a=_st(t)._at_ifAbsent_("value",function(){return smalltalk.withContext(function(l){return smalltalk.Object.fn.prototype._value.apply(_st(t),[])},function(t){t.fillBlock({},l)})});return a},function(l){l.fill(t,"value",{},smalltalk.JSObjectProxy)})},messageSends:["at:ifAbsent:","value"]}),smalltalk.JSObjectProxy);smalltalk.addMethod(smalltalk.method({selector:"on:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s,n;e=_st(l)._new();_st(e)._jsObject_(t);s=_st(e)._yourself();n=s;return n},function(a){a.fill(l,"on:",{aJSObject:t},smalltalk.JSObjectProxy.klass)})},messageSends:["jsObject:","new","yourself"]}),smalltalk.JSObjectProxy.klass);smalltalk.addClass("Number",smalltalk.Object,[],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"&",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l&t;return l},function(a){a.fill(l,"&",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"*",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l*t;return l},function(a){a.fill(l,"*",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"+",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l+t;return l},function(a){a.fill(l,"+",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"-",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l-t;return l},function(a){a.fill(l,"-",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"/",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l/t;return l},function(a){a.fill(l,"/",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"<",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l<t;return l},function(a){a.fill(l,"<",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"<=",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l<=t;return l},function(a){a.fill(l,"<=",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"=",fn:function(t){var l=this;return smalltalk.withContext(function(a){if(!t._isNumber||!t._isNumber()){return false}return Number(l)==t;return l},function(a){a.fill(l,"=",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:">",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l>t;return l},function(a){a.fill(l,">",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:">=",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l>=t;return l},function(a){a.fill(l,">=",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"@",fn:function(t){var l=this;function a(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}return smalltalk.withContext(function(e){var s;s=_st(a())._x_y_(l,t);return s},function(a){a.fill(l,"@",{aNumber:t},smalltalk.Number)})},messageSends:["x:y:"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"IsImmutable",fn:function(){var t=this;return smalltalk.withContext(function(t){return true},function(l){l.fill(t,"IsImmutable",{},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"\\\\",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l%t;return l},function(a){a.fill(l,"\\\\",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"abs",fn:function(){var t=this;return smalltalk.withContext(function(l){return Math.abs(t);return t},function(l){l.fill(t,"abs",{},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"asJSON",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t;return a},function(l){l.fill(t,"asJSON",{},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"asJavascript",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st("(").__comma(_st(t)._printString())).__comma(")");return a},function(l){l.fill(t,"asJavascript",{},smalltalk.Number)})},messageSends:[",","printString"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"asPoint",fn:function(){var t=this;function l(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}return smalltalk.withContext(function(a){var e;e=_st(l())._x_y_(t,t);return e},function(l){l.fill(t,"asPoint",{},smalltalk.Number)})},messageSends:["x:y:"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"asString",fn:function(){var t=this;return smalltalk.withContext(function(l){return String(t);return t},function(l){l.fill(t,"asString",{},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"atRandom",fn:function(){var t=this;function l(){return smalltalk.Random||(typeof Random=="undefined"?nil:Random)}return smalltalk.withContext(function(a){var e;e=_st(_st(_st(_st(_st(l())._new())._next()).__star(t))._truncated()).__plus(1);return e},function(l){l.fill(t,"atRandom",{},smalltalk.Number)})},messageSends:["+","truncated","*","next","new"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"copy",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t;return a},function(l){l.fill(t,"copy",{},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"deepCopy",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._copy();return a},function(l){l.fill(t,"deepCopy",{},smalltalk.Number)})},messageSends:["copy"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"even",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(0).__eq(_st(t).__backslash_backslash(2));return a},function(l){l.fill(t,"even",{},smalltalk.Number)})},messageSends:["=","\\\\"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"identityHash",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st(t)._asString()).__comma("n");return a},function(l){l.fill(t,"identityHash",{},smalltalk.Number)})},messageSends:[",","asString"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"isNumber",fn:function(){var t=this;return smalltalk.withContext(function(t){return true},function(l){l.fill(t,"isNumber",{},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"isZero",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t).__eq(0);return a},function(l){l.fill(t,"isZero",{},smalltalk.Number)})},messageSends:["="]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"max:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return Math.max(l,t);return l},function(a){a.fill(l,"max:",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"min:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return Math.min(l,t);return l},function(a){a.fill(l,"min:",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"negated",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(0).__minus(t);return a},function(l){l.fill(t,"negated",{},smalltalk.Number)})},messageSends:["-"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"negative",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t).__lt(0);return a},function(l){l.fill(t,"negative",{},smalltalk.Number)})},messageSends:["<"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"odd",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st(t)._even())._not();return a},function(l){l.fill(t,"odd",{},smalltalk.Number)})},messageSends:["not","even"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"positive",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t).__gt_eq(0);return a},function(l){l.fill(t,"positive",{},smalltalk.Number)})},messageSends:[">="]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"printOn:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(t)._nextPutAll_(_st(l)._asString());return l},function(a){a.fill(l,"printOn:",{aStream:t},smalltalk.Number)})},messageSends:["nextPutAll:","asString"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"printShowingDecimalPlaces:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l.toFixed(t);return l},function(a){a.fill(l,"printShowingDecimalPlaces:",{placesDesired:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"rounded",fn:function(){var t=this;return smalltalk.withContext(function(l){return Math.round(t);return t},function(l){l.fill(t,"rounded",{},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"sqrt",fn:function(){var t=this;return smalltalk.withContext(function(l){return Math.sqrt(t);return t},function(l){l.fill(t,"sqrt",{},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"squared",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t).__star(t);return a},function(l){l.fill(t,"squared",{},smalltalk.Number)})},messageSends:["*"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"timesRepeat:",fn:function(t){var l=this;var a;return smalltalk.withContext(function(e){a=1;_st(function(){return smalltalk.withContext(function(t){return _st(a).__gt(l)},function(t){t.fillBlock({},e)})})._whileFalse_(function(){return smalltalk.withContext(function(l){_st(t)._value();a=_st(a).__plus(1);return a},function(t){t.fillBlock({},e)})});return l},function(e){e.fill(l,"timesRepeat:",{aBlock:t,count:a},smalltalk.Number)})},messageSends:["whileFalse:","value","+",">"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"to:",fn:function(t){var l=this;var a,e,s,n;function o(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}return smalltalk.withContext(function(r){var i;e=_st(l)._truncated();s=_st(_st(t)._truncated()).__plus(1);n=1;a=_st(o())._new();_st(_st(s).__minus(e))._timesRepeat_(function(){return smalltalk.withContext(function(t){_st(a)._at_put_(n,e);n=_st(n).__plus(1);n;e=_st(e).__plus(1);return e},function(t){t.fillBlock({},r)})});i=a;return i},function(o){o.fill(l,"to:",{aNumber:t,array:a,first:e,last:s,count:n},smalltalk.Number)})},messageSends:["truncated","+","new","timesRepeat:","at:put:","-"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"to:by:",fn:function(t,l){var a=this;var e,s,n;function o(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}return smalltalk.withContext(function(r){var i,m,u;s=a;e=_st(o())._new();n=1;i=_st(l).__eq(0);if(smalltalk.assert(i)){_st(a)._error_("step must be non-zero")}m=_st(l).__lt(0);if(smalltalk.assert(m)){_st(function(){return smalltalk.withContext(function(l){return _st(s).__gt_eq(t)},function(t){t.fillBlock({},r)})})._whileTrue_(function(){return smalltalk.withContext(function(t){_st(e)._at_put_(n,s);n=_st(n).__plus(1);n;s=_st(s).__plus(l);return s},function(t){t.fillBlock({},r)})})}else{_st(function(){return smalltalk.withContext(function(l){return _st(s).__lt_eq(t)},function(t){t.fillBlock({},r)})})._whileTrue_(function(){return smalltalk.withContext(function(t){_st(e)._at_put_(n,s);n=_st(n).__plus(1);n;s=_st(s).__plus(l);return s},function(t){t.fillBlock({},r)})})}u=e;return u},function(o){o.fill(a,"to:by:",{stop:t,step:l,array:e,value:s,pos:n},smalltalk.Number)})},messageSends:["new","ifTrue:","error:","=","ifTrue:ifFalse:","whileTrue:","at:put:","+",">=","<=","<"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"to:by:do:",fn:function(t,l,a){var e=this;var s;return smalltalk.withContext(function(n){var o,r;s=e;o=_st(l).__eq(0);if(smalltalk.assert(o)){_st(e)._error_("step must be non-zero")}r=_st(l).__lt(0);if(smalltalk.assert(r)){_st(function(){return smalltalk.withContext(function(l){return _st(s).__gt_eq(t)},function(t){t.fillBlock({},n)})})._whileTrue_(function(){return smalltalk.withContext(function(t){_st(a)._value_(s);s=_st(s).__plus(l);return s},function(t){t.fillBlock({},n)})})}else{_st(function(){return smalltalk.withContext(function(l){return _st(s).__lt_eq(t)},function(t){t.fillBlock({},n)})})._whileTrue_(function(){return smalltalk.withContext(function(t){_st(a)._value_(s);s=_st(s).__plus(l);return s},function(t){t.fillBlock({},n)})})}return e},function(n){n.fill(e,"to:by:do:",{stop:t,step:l,aBlock:a,value:s},smalltalk.Number)})},messageSends:["ifTrue:","error:","=","ifTrue:ifFalse:","whileTrue:","value:","+",">=","<=","<"]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"to:do:",fn:function(t,l){var a=this;var e;return smalltalk.withContext(function(s){e=a;_st(function(){return smalltalk.withContext(function(l){return _st(e).__lt_eq(t)},function(t){t.fillBlock({},s)})})._whileTrue_(function(){return smalltalk.withContext(function(t){_st(l)._value_(e);e=_st(e).__plus(1);return e},function(t){t.fillBlock({},s)})});return a},function(s){s.fill(a,"to:do:",{stop:t,aBlock:l,nextValue:e},smalltalk.Number)})},messageSends:["whileTrue:","value:","+","<="]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"truncated",fn:function(){var t=this;return smalltalk.withContext(function(l){if(t>=0){return Math.floor(t)}else{return Math.floor(t*-1)*-1}return t},function(l){l.fill(t,"truncated",{},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"|",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l|t;return l},function(a){a.fill(l,"|",{aNumber:t},smalltalk.Number)})},messageSends:[]}),smalltalk.Number);smalltalk.addMethod(smalltalk.method({selector:"pi",fn:function(){var t=this;return smalltalk.withContext(function(l){return Math.PI;return t},function(l){l.fill(t,"pi",{},smalltalk.Number.klass)})},messageSends:[]}),smalltalk.Number.klass);smalltalk.addClass("Organizer",smalltalk.Object,[],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"addElement:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.elements.addElement(t);return l},function(a){a.fill(l,"addElement:",{anObject:t},smalltalk.Organizer)})},messageSends:[]}),smalltalk.Organizer);smalltalk.addMethod(smalltalk.method({selector:"elements",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st(t)._basicAt_("elements"))._copy();return a},function(l){l.fill(t,"elements",{},smalltalk.Organizer)})},messageSends:["copy","basicAt:"]}),smalltalk.Organizer);smalltalk.addMethod(smalltalk.method({selector:"removeElement:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.elements.removeElement(t);return l},function(a){a.fill(l,"removeElement:",{anObject:t},smalltalk.Organizer)})},messageSends:[]}),smalltalk.Organizer);smalltalk.addClass("ClassOrganizer",smalltalk.Organizer,[],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"addElement:",fn:function(t){var l=this;function a(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}function e(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(s){var n,o;smalltalk.Organizer.fn.prototype._addElement_.apply(_st(l),[t]);n=_st(a())._new();_st(n)._protocol_(t);_st(n)._theClass_(_st(l)._theClass());o=_st(n)._yourself();_st(_st(e())._current())._announce_(o);return l},function(a){a.fill(l,"addElement:",{aString:t},smalltalk.ClassOrganizer)})},messageSends:["addElement:","announce:","protocol:","new","theClass:","theClass","yourself","current"]}),smalltalk.ClassOrganizer);smalltalk.addMethod(smalltalk.method({selector:"removeElement:",fn:function(t){var l=this;function a(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}function e(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(s){var n,o;smalltalk.Organizer.fn.prototype._removeElement_.apply(_st(l),[t]);n=_st(a())._new();_st(n)._protocol_(t);_st(n)._theClass_(_st(l)._theClass());o=_st(n)._yourself();_st(_st(e())._current())._announce_(o);return l},function(a){a.fill(l,"removeElement:",{aString:t},smalltalk.ClassOrganizer)})},messageSends:["removeElement:","announce:","protocol:","new","theClass:","theClass","yourself","current"]}),smalltalk.ClassOrganizer);smalltalk.addMethod(smalltalk.method({selector:"theClass",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.theClass;return t},function(l){l.fill(t,"theClass",{},smalltalk.ClassOrganizer)})},messageSends:[]}),smalltalk.ClassOrganizer);smalltalk.addClass("PackageOrganizer",smalltalk.Organizer,[],"Kernel-Objects");smalltalk.addClass("Package",smalltalk.Object,["commitPathJs","commitPathSt"],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"classes",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st(t)._organization())._elements();return a},function(l){l.fill(t,"classes",{},smalltalk.Package)})},messageSends:["elements","organization"]}),smalltalk.Package);smalltalk.addMethod(smalltalk.method({selector:"commitPathJs",fn:function(){var t=this;return smalltalk.withContext(function(l){var a,e;a=t["@commitPathJs"];if(($receiver=a)==nil||$receiver==undefined){e=_st(_st(t)._class())._defaultCommitPathJs()}else{e=a}return e},function(l){l.fill(t,"commitPathJs",{},smalltalk.Package)})},messageSends:["ifNil:","defaultCommitPathJs","class"]}),smalltalk.Package);smalltalk.addMethod(smalltalk.method({selector:"commitPathJs:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l["@commitPathJs"]=t;return l},function(a){a.fill(l,"commitPathJs:",{aString:t},smalltalk.Package)})},messageSends:[]}),smalltalk.Package);smalltalk.addMethod(smalltalk.method({selector:"commitPathSt",fn:function(){var t=this;return smalltalk.withContext(function(l){var a,e;a=t["@commitPathSt"];if(($receiver=a)==nil||$receiver==undefined){e=_st(_st(t)._class())._defaultCommitPathSt()}else{e=a}return e},function(l){l.fill(t,"commitPathSt",{},smalltalk.Package)})},messageSends:["ifNil:","defaultCommitPathSt","class"]}),smalltalk.Package);smalltalk.addMethod(smalltalk.method({selector:"commitPathSt:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l["@commitPathSt"]=t;return l},function(a){a.fill(l,"commitPathSt:",{aString:t},smalltalk.Package)})},messageSends:[]}),smalltalk.Package);smalltalk.addMethod(smalltalk.method({selector:"isPackage",fn:function(){var t=this;return smalltalk.withContext(function(t){return true},function(l){l.fill(t,"isPackage",{},smalltalk.Package)})},messageSends:[]}),smalltalk.Package);smalltalk.addMethod(smalltalk.method({selector:"name",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.pkgName;return t},function(l){l.fill(t,"name",{},smalltalk.Package)})},messageSends:[]}),smalltalk.Package);smalltalk.addMethod(smalltalk.method({selector:"name:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.pkgName=t;return l},function(a){a.fill(l,"name:",{aString:t},smalltalk.Package)})},messageSends:[]}),smalltalk.Package);smalltalk.addMethod(smalltalk.method({selector:"organization",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._basicAt_("organization");return a},function(l){l.fill(t,"organization",{},smalltalk.Package)})},messageSends:["basicAt:"]}),smalltalk.Package);smalltalk.addMethod(smalltalk.method({selector:"printOn:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s;smalltalk.Object.fn.prototype._printOn_.apply(_st(l),[t]);e=t;_st(e)._nextPutAll_(" (");_st(e)._nextPutAll_(_st(l)._name());s=_st(e)._nextPutAll_(")");return l},function(a){a.fill(l,"printOn:",{aStream:t},smalltalk.Package)})},messageSends:["printOn:","nextPutAll:","name"]}),smalltalk.Package);smalltalk.addMethod(smalltalk.method({selector:"setupClasses",fn:function(){var t=this;function l(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}return smalltalk.withContext(function(a){var e,s;e=_st(t)._classes();_st(e)._do_(function(t){return smalltalk.withContext(function(a){return _st(_st(l())._new())._setupClass_(t)},function(l){l.fillBlock({each:t},a)})});s=_st(e)._do_(function(t){return smalltalk.withContext(function(l){return _st(t)._initialize()},function(l){l.fillBlock({each:t},a)})});return t},function(l){l.fill(t,"setupClasses",{},smalltalk.Package)})},messageSends:["do:","setupClass:","new","classes","initialize"]}),smalltalk.Package);smalltalk.addMethod(smalltalk.method({selector:"sortedClasses",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st(t)._class())._sortedClasses_(_st(t)._classes());return a},function(l){l.fill(t,"sortedClasses",{},smalltalk.Package)})},messageSends:["sortedClasses:","classes","class"]}),smalltalk.Package);smalltalk.Package.klass.iVarNames=["defaultCommitPathJs","defaultCommitPathSt"];smalltalk.addMethod(smalltalk.method({selector:"commitPathsFromLoader",fn:function(){var t=this;return smalltalk.withContext(function(l){var a=typeof amber!=="undefined"&&amber.commitPath;if(!a)return;if(a.js)t._defaultCommitPathJs_(a.js);if(a.st)t._defaultCommitPathSt_(a.st);return t},function(l){l.fill(t,"commitPathsFromLoader",{},smalltalk.Package.klass)})},messageSends:[]}),smalltalk.Package.klass);smalltalk.addMethod(smalltalk.method({selector:"defaultCommitPathJs",fn:function(){var t=this;return smalltalk.withContext(function(l){var a,e;a=t["@defaultCommitPathJs"];if(($receiver=a)==nil||$receiver==undefined){t["@defaultCommitPathJs"]="js";e=t["@defaultCommitPathJs"]}else{e=a}return e},function(l){l.fill(t,"defaultCommitPathJs",{},smalltalk.Package.klass)})},messageSends:["ifNil:"]}),smalltalk.Package.klass);smalltalk.addMethod(smalltalk.method({selector:"defaultCommitPathJs:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l["@defaultCommitPathJs"]=t;return l},function(a){a.fill(l,"defaultCommitPathJs:",{aString:t},smalltalk.Package.klass)})},messageSends:[]}),smalltalk.Package.klass);smalltalk.addMethod(smalltalk.method({selector:"defaultCommitPathSt",fn:function(){var t=this;return smalltalk.withContext(function(l){var a,e;a=t["@defaultCommitPathSt"];if(($receiver=a)==nil||$receiver==undefined){t["@defaultCommitPathSt"]="st";e=t["@defaultCommitPathSt"]}else{e=a}return e},function(l){l.fill(t,"defaultCommitPathSt",{},smalltalk.Package.klass)})},messageSends:["ifNil:"]}),smalltalk.Package.klass);smalltalk.addMethod(smalltalk.method({selector:"defaultCommitPathSt:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l["@defaultCommitPathSt"]=t;return l},function(a){a.fill(l,"defaultCommitPathSt:",{aString:t},smalltalk.Package.klass)})},messageSends:[]}),smalltalk.Package.klass);smalltalk.addMethod(smalltalk.method({selector:"initialize",fn:function(){var t=this;return smalltalk.withContext(function(l){smalltalk.Object.klass.fn.prototype._initialize.apply(_st(t),[]);_st(t)._commitPathsFromLoader();return t},function(l){l.fill(t,"initialize",{},smalltalk.Package.klass)})},messageSends:["initialize","commitPathsFromLoader"]}),smalltalk.Package.klass);smalltalk.addMethod(smalltalk.method({selector:"load:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(l)._load_prefix_(t,_st(_st(l)._defaultCommitPathJs()).__comma("/"));return l},function(a){a.fill(l,"load:",{aPackageName:t},smalltalk.Package.klass)})},messageSends:["load:prefix:",",","defaultCommitPathJs"]}),smalltalk.Package.klass);smalltalk.addMethod(smalltalk.method({selector:"load:prefix:",fn:function(t,l){var a=this;function e(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}return smalltalk.withContext(function(s){_st(jQuery)._getScript_onSuccess_(_st(_st(l).__comma(t)).__comma(".js"),function(){return smalltalk.withContext(function(l){return _st(_st(e())._named_(t))._setupClasses()},function(t){t.fillBlock({},s)})});return a},function(e){e.fill(a,"load:prefix:",{aPackageName:t,aPrefix:l},smalltalk.Package.klass)})},messageSends:["getScript:onSuccess:",",","setupClasses","named:"]}),smalltalk.Package.klass);smalltalk.addMethod(smalltalk.method({selector:"named:",fn:function(t){var l=this;function a(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(l){var e;e=_st(_st(a())._current())._packageAt_(t);return e},function(a){a.fill(l,"named:",{aPackageName:t},smalltalk.Package.klass)})},messageSends:["packageAt:","current"]}),smalltalk.Package.klass);smalltalk.addMethod(smalltalk.method({selector:"named:ifAbsent:",fn:function(t,l){var a=this;function e(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(a){var s;s=_st(_st(e())._current())._packageAt_ifAbsent_(t,l);return s},function(e){e.fill(a,"named:ifAbsent:",{aPackageName:t,aBlock:l},smalltalk.Package.klass)})},messageSends:["packageAt:ifAbsent:","current"]}),smalltalk.Package.klass);smalltalk.addMethod(smalltalk.method({selector:"resetCommitPaths",fn:function(){var t=this;return smalltalk.withContext(function(l){t["@defaultCommitPathJs"]=nil;t["@defaultCommitPathSt"]=nil;return t},function(l){l.fill(t,"resetCommitPaths",{},smalltalk.Package.klass)})},messageSends:[]}),smalltalk.Package.klass);smalltalk.addMethod(smalltalk.method({selector:"sortedClasses:",fn:function(t){var l=this;var a,e,s,n;function o(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}function r(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}return smalltalk.withContext(function(l){var i,m;a=[];e=[];_st(t)._do_(function(s){return smalltalk.withContext(function(l){i=_st(t)._includes_(_st(s)._superclass());if(smalltalk.assert(i)){return _st(e)._add_(s)}else{return _st(a)._add_(s)}},function(t){t.fillBlock({each:s},l)})});s=_st(a)._collect_(function(t){return smalltalk.withContext(function(l){return _st(o())._on_classes_level_(t,e,0)},function(a){a.fillBlock({each:t},l)})});s=_st(s)._sorted_(function(t,a){return smalltalk.withContext(function(l){return _st(_st(_st(t)._theClass())._name()).__lt_eq(_st(_st(a)._theClass())._name())},function(e){e.fillBlock({a:t,b:a},l)})});n=_st(r())._new();_st(s)._do_(function(t){return smalltalk.withContext(function(l){return _st(t)._traverseClassesWith_(n)},function(a){a.fillBlock({aNode:t},l)})});m=n;return m},function(o){o.fill(l,"sortedClasses:",{classes:t,children:a,others:e,nodes:s,expandedClasses:n},smalltalk.Package.klass)})},messageSends:["do:","ifFalse:ifTrue:","add:","includes:","superclass","collect:","on:classes:level:","sorted:","<=","name","theClass","new","traverseClassesWith:"]}),smalltalk.Package.klass);smalltalk.addClass("Point",smalltalk.Object,["x","y"],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"*",fn:function(t){var l=this;function a(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}return smalltalk.withContext(function(e){var s;s=_st(a())._x_y_(_st(_st(l)._x()).__star(_st(_st(t)._asPoint())._x()),_st(_st(l)._y()).__star(_st(_st(t)._asPoint())._y()));return s},function(a){a.fill(l,"*",{aPoint:t},smalltalk.Point)})},messageSends:["x:y:","*","x","asPoint","y"]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"+",fn:function(t){var l=this;function a(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}return smalltalk.withContext(function(e){var s;s=_st(a())._x_y_(_st(_st(l)._x()).__plus(_st(_st(t)._asPoint())._x()),_st(_st(l)._y()).__plus(_st(_st(t)._asPoint())._y()));return s},function(a){a.fill(l,"+",{aPoint:t},smalltalk.Point)})},messageSends:["x:y:","+","x","asPoint","y"]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"-",fn:function(t){var l=this;function a(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}return smalltalk.withContext(function(e){var s;s=_st(a())._x_y_(_st(_st(l)._x()).__minus(_st(_st(t)._asPoint())._x()),_st(_st(l)._y()).__minus(_st(_st(t)._asPoint())._y()));return s},function(a){a.fill(l,"-",{aPoint:t},smalltalk.Point)})},messageSends:["x:y:","-","x","asPoint","y"]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"/",fn:function(t){var l=this;function a(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}return smalltalk.withContext(function(e){var s;s=_st(a())._x_y_(_st(_st(l)._x()).__slash(_st(_st(t)._asPoint())._x()),_st(_st(l)._y()).__slash(_st(_st(t)._asPoint())._y()));return s},function(a){a.fill(l,"/",{aPoint:t},smalltalk.Point)})},messageSends:["x:y:","/","x","asPoint","y"]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"=",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(_st(t)._class()).__eq(_st(l)._class()))._and_(function(){return smalltalk.withContext(function(a){return _st(_st(_st(t)._x()).__eq(_st(l)._x())).__and(_st(_st(t)._y()).__eq(_st(l)._y()))},function(t){t.fillBlock({},a)})});return e},function(a){a.fill(l,"=",{aPoint:t},smalltalk.Point)})},messageSends:["and:","&","=","y","x","class"]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"asPoint",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t;return a},function(l){l.fill(t,"asPoint",{},smalltalk.Point)})},messageSends:[]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"printOn:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;_st(l["@x"])._printOn_(t);_st(t)._nextPutAll_("@");e=_st(_st(l["@y"])._notNil())._and_(function(){return smalltalk.withContext(function(t){return _st(l["@y"])._negative()},function(t){t.fillBlock({},a)})});if(smalltalk.assert(e)){_st(t)._space()}_st(l["@y"])._printOn_(t);return l},function(a){a.fill(l,"printOn:",{aStream:t},smalltalk.Point)})},messageSends:["printOn:","nextPutAll:","ifTrue:","space","and:","negative","notNil"]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"translateBy:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(_st(t)._x()).__plus(l["@x"])).__at(_st(_st(t)._y()).__plus(l["@y"]));return e},function(a){a.fill(l,"translateBy:",{delta:t},smalltalk.Point)})},messageSends:["@","+","y","x"]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"x",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t["@x"];return a},function(l){l.fill(t,"x",{},smalltalk.Point)})},messageSends:[]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"x:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l["@x"]=t;return l},function(a){a.fill(l,"x:",{aNumber:t},smalltalk.Point)})},messageSends:[]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"y",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t["@y"];return a},function(l){l.fill(t,"y",{},smalltalk.Point)})},messageSends:[]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"y:",fn:function(t){var l=this;
return smalltalk.withContext(function(a){l["@y"]=t;return l},function(a){a.fill(l,"y:",{aNumber:t},smalltalk.Point)})},messageSends:[]}),smalltalk.Point);smalltalk.addMethod(smalltalk.method({selector:"x:y:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s,n,o;s=_st(a)._new();_st(s)._x_(t);_st(s)._y_(l);n=_st(s)._yourself();o=n;return o},function(e){e.fill(a,"x:y:",{aNumber:t,anotherNumber:l},smalltalk.Point.klass)})},messageSends:["x:","new","y:","yourself"]}),smalltalk.Point.klass);smalltalk.addClass("Random",smalltalk.Object,[],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"next",fn:function(){var t=this;return smalltalk.withContext(function(l){return Math.random();return t},function(l){l.fill(t,"next",{},smalltalk.Random)})},messageSends:[]}),smalltalk.Random);smalltalk.addMethod(smalltalk.method({selector:"next:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(1)._to_(t))._collect_(function(t){return smalltalk.withContext(function(t){return _st(l)._next()},function(l){l.fillBlock({each:t},a)})});return e},function(a){a.fill(l,"next:",{anInteger:t},smalltalk.Random)})},messageSends:["collect:","next","to:"]}),smalltalk.Random);smalltalk.addClass("Smalltalk",smalltalk.Object,[],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"asSmalltalkException:",fn:function(t){var l=this;function a(){return smalltalk.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}function e(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}return smalltalk.withContext(function(s){var n,o;n=_st(_st(l)._isSmalltalkObject_(t))._and_(function(){return smalltalk.withContext(function(l){return _st(t)._isKindOf_(e())},function(t){t.fillBlock({},s)})});if(smalltalk.assert(n)){o=t}else{o=_st(a())._on_(t)}return o},function(a){a.fill(l,"asSmalltalkException:",{anObject:t},smalltalk.Smalltalk)})},messageSends:["ifTrue:ifFalse:","on:","and:","isKindOf:","isSmalltalkObject:"]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"at:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l[t];return l},function(a){a.fill(l,"at:",{aString:t},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"basicParse:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return smalltalk.parser.parse(t);return l},function(a){a.fill(l,"basicParse:",{aString:t},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"classes",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.classes();return t},function(l){l.fill(t,"classes",{},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"createPackage:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return smalltalk.addPackage(t);return l},function(a){a.fill(l,"createPackage:",{packageName:t},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"createPackage:properties:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s,n;_st(a)._deprecatedAPI();s=_st(l)._isEmpty();if(!smalltalk.assert(s)){_st(a)._error_("createPackage:properties: called with nonempty properties")}n=_st(a)._createPackage_(t);return n},function(e){e.fill(a,"createPackage:properties:",{packageName:t,aDict:l},smalltalk.Smalltalk)})},messageSends:["deprecatedAPI","ifFalse:","error:","isEmpty","createPackage:"]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"deleteClass:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l.removeClass(t);return l},function(a){a.fill(l,"deleteClass:",{aClass:t},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"deletePackage:",fn:function(t){var l=this;return smalltalk.withContext(function(a){delete smalltalk.packages[t];return l},function(a){a.fill(l,"deletePackage:",{packageName:t},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"isSmalltalkObject:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return typeof t.klass!=="undefined";return l},function(a){a.fill(l,"isSmalltalkObject:",{anObject:t},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"packageAt:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l.packages[t];return l},function(a){a.fill(l,"packageAt:",{packageName:t},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"packageAt:ifAbsent:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s,n;s=_st(a)._packageAt_(t);n=_st(s)._ifNil_(l);return n},function(e){e.fill(a,"packageAt:ifAbsent:",{packageName:t,aBlock:l},smalltalk.Smalltalk)})},messageSends:["ifNil:","packageAt:"]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"packages",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.packages.all();return t},function(l){l.fill(t,"packages",{},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"parse:",fn:function(t){var l=this;var a;return smalltalk.withContext(function(e){var s;_st(l)._try_catch_(function(){return smalltalk.withContext(function(e){a=_st(l)._basicParse_(t);return a},function(t){t.fillBlock({},e)})},function(a){return smalltalk.withContext(function(e){return _st(_st(l)._parseError_parsing_(a,t))._signal()},function(t){t.fillBlock({ex:a},e)})});s=a;return s},function(e){e.fill(l,"parse:",{aString:t,result:a},smalltalk.Smalltalk)})},messageSends:["try:catch:","basicParse:","signal","parseError:parsing:"]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"parseError:parsing:",fn:function(t,l){var a=this;function e(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}return smalltalk.withContext(function(l){var a;a=_st(_st(e())._new())._messageText_(_st(_st(_st(_st(_st("Parse error on line ").__comma(_st(t)._basicAt_("line"))).__comma(" column ")).__comma(_st(t)._basicAt_("column"))).__comma(" : Unexpected character ")).__comma(_st(t)._basicAt_("found")));return a},function(e){e.fill(a,"parseError:parsing:",{anException:t,aString:l},smalltalk.Smalltalk)})},messageSends:["messageText:",",","basicAt:","new"]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"pseudoVariableNames",fn:function(){var t=this;return smalltalk.withContext(function(t){var l;l=["self","super","nil","true","false","thisContext"];return l},function(l){l.fill(t,"pseudoVariableNames",{},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"readJSObject:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l.readJSObject(t);return l},function(a){a.fill(l,"readJSObject:",{anObject:t},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"removeClass:",fn:function(t){var l=this;function a(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}function e(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(s){var n,o,r;n=_st(t)._isMetaclass();if(smalltalk.assert(n)){_st(l)._error_(_st(_st(t)._asString()).__comma(" is a Metaclass and cannot be removed!"))}_st(l)._deleteClass_(t);o=_st(a())._new();_st(o)._theClass_(t);r=_st(o)._yourself();_st(_st(e())._current())._announce_(r);return l},function(a){a.fill(l,"removeClass:",{aClass:t},smalltalk.Smalltalk)})},messageSends:["ifTrue:","error:",",","asString","isMetaclass","deleteClass:","announce:","theClass:","new","yourself","current"]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"removePackage:",fn:function(t){var l=this;var a;return smalltalk.withContext(function(e){a=_st(l)._packageAt_ifAbsent_(t,function(){return smalltalk.withContext(function(a){return _st(l)._error_(_st("Missing package: ").__comma(t))},function(t){t.fillBlock({},e)})});_st(_st(a)._classes())._do_(function(t){return smalltalk.withContext(function(a){return _st(l)._removeClass_(t)},function(l){l.fillBlock({each:t},e)})});_st(l)._deletePackage_(t);return l},function(e){e.fill(l,"removePackage:",{packageName:t,pkg:a},smalltalk.Smalltalk)})},messageSends:["packageAt:ifAbsent:","error:",",","do:","removeClass:","classes","deletePackage:"]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"renamePackage:to:",fn:function(t,l){var a=this;var e;return smalltalk.withContext(function(s){var n;e=_st(a)._packageAt_ifAbsent_(t,function(){return smalltalk.withContext(function(l){return _st(a)._error_(_st("Missing package: ").__comma(t))},function(t){t.fillBlock({},s)})});n=_st(a)._packageAt_(l);if(($receiver=n)==nil||$receiver==undefined){n}else{_st(a)._error_(_st("Already exists a package called: ").__comma(l))}_st(_st(a)._basicAt_("packages"))._at_put_(l,e);_st(e)._name_(l);_st(a)._deletePackage_(t);return a},function(s){s.fill(a,"renamePackage:to:",{packageName:t,newName:l,pkg:e},smalltalk.Smalltalk)})},messageSends:["packageAt:ifAbsent:","error:",",","ifNotNil:","packageAt:","at:put:","basicAt:","name:","deletePackage:"]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"reservedWords",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.reservedWords;return t},function(l){l.fill(t,"reservedWords",{},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.addMethod(smalltalk.method({selector:"version",fn:function(){var t=this;return smalltalk.withContext(function(t){return"0.10"},function(l){l.fill(t,"version",{},smalltalk.Smalltalk)})},messageSends:[]}),smalltalk.Smalltalk);smalltalk.Smalltalk.klass.iVarNames=["current"];smalltalk.addMethod(smalltalk.method({selector:"current",fn:function(){var t=this;return smalltalk.withContext(function(l){return smalltalk;return t},function(l){l.fill(t,"current",{},smalltalk.Smalltalk.klass)})},messageSends:[]}),smalltalk.Smalltalk.klass);smalltalk.addClass("Timeout",smalltalk.Object,["rawTimeout"],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"clearInterval",fn:function(){var t=this;return smalltalk.withContext(function(l){var a=t["@rawTimeout"];clearInterval(a);return t},function(l){l.fill(t,"clearInterval",{},smalltalk.Timeout)})},messageSends:[]}),smalltalk.Timeout);smalltalk.addMethod(smalltalk.method({selector:"clearTimeout",fn:function(){var t=this;return smalltalk.withContext(function(l){var a=t["@rawTimeout"];clearTimeout(a);return t},function(l){l.fill(t,"clearTimeout",{},smalltalk.Timeout)})},messageSends:[]}),smalltalk.Timeout);smalltalk.addMethod(smalltalk.method({selector:"rawTimeout:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l["@rawTimeout"]=t;return l},function(a){a.fill(l,"rawTimeout:",{anObject:t},smalltalk.Timeout)})},messageSends:[]}),smalltalk.Timeout);smalltalk.addMethod(smalltalk.method({selector:"on:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s,n;e=_st(l)._new();_st(e)._rawTimeout_(t);s=_st(e)._yourself();n=s;return n},function(a){a.fill(l,"on:",{anObject:t},smalltalk.Timeout.klass)})},messageSends:["rawTimeout:","new","yourself"]}),smalltalk.Timeout.klass);smalltalk.addClass("UndefinedObject",smalltalk.Object,[],"Kernel-Objects");smalltalk.addMethod(smalltalk.method({selector:"asJSON",fn:function(){var t=this;return smalltalk.withContext(function(t){var l;l=null;return l},function(l){l.fill(t,"asJSON",{},smalltalk.UndefinedObject)})},messageSends:[]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"deepCopy",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t;return a},function(l){l.fill(t,"deepCopy",{},smalltalk.UndefinedObject)})},messageSends:[]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"ifNil:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s;e=l;s=_st(e)._ifNil_ifNotNil_(t,function(){return smalltalk.withContext(function(t){},function(t){t.fillBlock({},a)})});return s},function(a){a.fill(l,"ifNil:",{aBlock:t},smalltalk.UndefinedObject)})},messageSends:["ifNil:ifNotNil:"]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"ifNil:ifNotNil:",fn:function(t,l){var a=this;return smalltalk.withContext(function(l){var a;a=_st(t)._value();return a},function(e){e.fill(a,"ifNil:ifNotNil:",{aBlock:t,anotherBlock:l},smalltalk.UndefinedObject)})},messageSends:["value"]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"ifNotNil:",fn:function(t){var l=this;return smalltalk.withContext(function(t){var a;a=l;return a},function(a){a.fill(l,"ifNotNil:",{aBlock:t},smalltalk.UndefinedObject)})},messageSends:[]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"ifNotNil:ifNil:",fn:function(t,l){var a=this;return smalltalk.withContext(function(t){var a;a=_st(l)._value();return a},function(e){e.fill(a,"ifNotNil:ifNil:",{aBlock:t,anotherBlock:l},smalltalk.UndefinedObject)})},messageSends:["value"]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"isImmutable",fn:function(){var t=this;return smalltalk.withContext(function(t){return true},function(l){l.fill(t,"isImmutable",{},smalltalk.UndefinedObject)})},messageSends:[]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"isNil",fn:function(){var t=this;return smalltalk.withContext(function(t){return true},function(l){l.fill(t,"isNil",{},smalltalk.UndefinedObject)})},messageSends:[]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"notNil",fn:function(){var t=this;return smalltalk.withContext(function(t){return false},function(l){l.fill(t,"notNil",{},smalltalk.UndefinedObject)})},messageSends:[]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"printOn:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(t)._nextPutAll_("nil");return l},function(a){a.fill(l,"printOn:",{aStream:t},smalltalk.UndefinedObject)})},messageSends:["nextPutAll:"]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"shallowCopy",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t;return a},function(l){l.fill(t,"shallowCopy",{},smalltalk.UndefinedObject)})},messageSends:[]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"subclass:instanceVariableNames:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s;s=_st(a)._subclass_instanceVariableNames_package_(t,l,nil);return s},function(e){e.fill(a,"subclass:instanceVariableNames:",{aString:t,anotherString:l},smalltalk.UndefinedObject)})},messageSends:["subclass:instanceVariableNames:package:"]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"subclass:instanceVariableNames:category:",fn:function(t,l,a){var e=this;return smalltalk.withContext(function(s){var n;_st(e)._deprecatedAPI();n=_st(e)._subclass_instanceVariableNames_package_(t,l,a);return n},function(s){s.fill(e,"subclass:instanceVariableNames:category:",{aString:t,aString2:l,aString3:a},smalltalk.UndefinedObject)})},messageSends:["deprecatedAPI","subclass:instanceVariableNames:package:"]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"subclass:instanceVariableNames:package:",fn:function(t,l,a){var e=this;function s(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}return smalltalk.withContext(function(n){var o;o=_st(_st(s())._new())._superclass_subclass_instanceVariableNames_package_(e,_st(t)._asString(),l,a);return o},function(s){s.fill(e,"subclass:instanceVariableNames:package:",{aString:t,aString2:l,aString3:a},smalltalk.UndefinedObject)})},messageSends:["superclass:subclass:instanceVariableNames:package:","asString","new"]}),smalltalk.UndefinedObject);smalltalk.addMethod(smalltalk.method({selector:"new",fn:function(){var t=this;return smalltalk.withContext(function(l){_st(t)._error_("You cannot create new instances of UndefinedObject. Use nil");return t},function(l){l.fill(t,"new",{},smalltalk.UndefinedObject.klass)})},messageSends:["error:"]}),smalltalk.UndefinedObject.klass);smalltalk.addMethod(smalltalk.method({selector:"asJavaScriptSelector",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._replace_with_("^([a-zA-Z0-9]*).*$","$1");return a},function(l){l.fill(t,"asJavaScriptSelector",{},smalltalk.String)})},messageSends:["replace:with:"]}),smalltalk.String);smalltalk.addPackage("Kernel-Classes");smalltalk.addClass("Behavior",smalltalk.Object,[],"Kernel-Classes");smalltalk.addMethod(smalltalk.method({selector:"addCompiledMethod:",fn:function(t){var l=this;var a,e;function s(){return smalltalk.MethodAdded||(typeof MethodAdded=="undefined"?nil:MethodAdded)}function n(){return smalltalk.MethodModified||(typeof MethodModified=="undefined"?nil:MethodModified)}function o(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(r){var i,m,u,c,d,f;a=_st(_st(l)._methodDictionary())._at_ifAbsent_(_st(t)._selector(),function(){return smalltalk.withContext(function(t){return nil},function(t){t.fillBlock({},r)})});i=_st(_st(l)._protocols())._includes_(_st(t)._protocol());if(!smalltalk.assert(i)){_st(_st(l)._organization())._addElement_(_st(t)._protocol())}_st(l)._basicAddCompiledMethod_(t);m=a;if(($receiver=m)==nil||$receiver==undefined){u=_st(s())._new();_st(u)._method_(t);c=_st(u)._yourself();e=c}else{d=_st(n())._new();_st(d)._oldMethod_(a);_st(d)._method_(t);f=_st(d)._yourself();e=f}_st(_st(o())._current())._announce_(e);return l},function(s){s.fill(l,"addCompiledMethod:",{aMethod:t,oldMethod:a,announcement:e},smalltalk.Behavior)})},messageSends:["at:ifAbsent:","selector","methodDictionary","ifFalse:","addElement:","protocol","organization","includes:","protocols","basicAddCompiledMethod:","ifNil:ifNotNil:","method:","new","yourself","oldMethod:","announce:","current"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"allInstanceVariableNames",fn:function(){var t=this;var l;return smalltalk.withContext(function(a){var e,s;l=_st(_st(t)._instanceVariableNames())._copy();e=_st(t)._superclass();if(($receiver=e)==nil||$receiver==undefined){e}else{_st(l)._addAll_(_st(_st(t)._superclass())._allInstanceVariableNames())}s=l;return s},function(a){a.fill(t,"allInstanceVariableNames",{result:l},smalltalk.Behavior)})},messageSends:["copy","instanceVariableNames","ifNotNil:","addAll:","allInstanceVariableNames","superclass"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"allSelectors",fn:function(){var t=this;return smalltalk.withContext(function(l){var a,e,s;s=_st(_st(t)._allSuperclasses())._inject_into_(_st(t)._selectors(),function(t,s){return smalltalk.withContext(function(l){a=t;_st(a)._addAll_(_st(s)._selectors());e=_st(a)._yourself();return e},function(a){a.fillBlock({soFar:t,aBehavior:s},l)})});return s},function(l){l.fill(t,"allSelectors",{},smalltalk.Behavior)})},messageSends:["inject:into:","selectors","addAll:","yourself","allSuperclasses"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"allSubclasses",fn:function(){var t=this;var l;return smalltalk.withContext(function(a){var e;l=_st(t)._subclasses();_st(_st(t)._subclasses())._do_(function(t){return smalltalk.withContext(function(a){return _st(l)._addAll_(_st(t)._allSubclasses())},function(l){l.fillBlock({each:t},a)})});e=l;return e},function(a){a.fill(t,"allSubclasses",{result:l},smalltalk.Behavior)})},messageSends:["subclasses","do:","addAll:","allSubclasses"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"allSubclassesDo:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(_st(l)._subclasses())._do_(function(l){return smalltalk.withContext(function(a){_st(t)._value_(l);return _st(l)._allSubclassesDo_(t)},function(t){t.fillBlock({each:l},a)})});return l},function(a){a.fill(l,"allSubclassesDo:",{aBlock:t},smalltalk.Behavior)})},messageSends:["do:","value:","allSubclassesDo:","subclasses"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"allSuperclasses",fn:function(){var t=this;function l(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}return smalltalk.withContext(function(a){var e,s,n,o,r;e=_st(t)._superclass();if(($receiver=e)==nil||$receiver==undefined){s=[];return s}else{e}n=_st(l())._with_(_st(t)._superclass());_st(n)._addAll_(_st(_st(t)._superclass())._allSuperclasses());o=_st(n)._yourself();r=o;return r},function(l){l.fill(t,"allSuperclasses",{},smalltalk.Behavior)})},messageSends:["ifNil:","superclass","addAll:","allSuperclasses","with:","yourself"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"basicAddCompiledMethod:",fn:function(t){var l=this;return smalltalk.withContext(function(a){smalltalk.addMethod(t,l);return l},function(a){a.fill(l,"basicAddCompiledMethod:",{aMethod:t},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"basicNew",fn:function(){var t=this;return smalltalk.withContext(function(l){return new t.fn;return t},function(l){l.fill(t,"basicNew",{},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"basicRemoveCompiledMethod:",fn:function(t){var l=this;return smalltalk.withContext(function(a){smalltalk.removeMethod(t);smalltalk.init(l);return l},function(a){a.fill(l,"basicRemoveCompiledMethod:",{aMethod:t},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"canUnderstand:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(_st(_st(l)._methodDictionary())._keys())._includes_(_st(t)._asString()))._or_(function(){return smalltalk.withContext(function(e){return _st(_st(_st(l)._superclass())._notNil())._and_(function(){return smalltalk.withContext(function(a){return _st(_st(l)._superclass())._canUnderstand_(t)},function(t){t.fillBlock({},a)})})},function(t){t.fillBlock({},a)})});return e},function(a){a.fill(l,"canUnderstand:",{aSelector:t},smalltalk.Behavior)})},messageSends:["or:","and:","canUnderstand:","superclass","notNil","includes:","asString","keys","methodDictionary"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"comment",fn:function(){var t=this;return smalltalk.withContext(function(l){var a,e;a=_st(t)._basicAt_("comment");if(($receiver=a)==nil||$receiver==undefined){e=""}else{e=a}return e},function(l){l.fill(t,"comment",{},smalltalk.Behavior)})},messageSends:["ifNil:","basicAt:"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"comment:",fn:function(t){var l=this;function a(){return smalltalk.ClassCommentChanged||(typeof ClassCommentChanged=="undefined"?nil:ClassCommentChanged)}function e(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(s){var n,o;_st(l)._basicAt_put_("comment",t);n=_st(a())._new();_st(n)._theClass_(l);o=_st(n)._yourself();_st(_st(e())._current())._announce_(o);return l},function(a){a.fill(l,"comment:",{aString:t},smalltalk.Behavior)})},messageSends:["basicAt:put:","announce:","theClass:","new","yourself","current"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"commentStamp",fn:function(){var t=this;function l(){return smalltalk.ClassCommentReader||(typeof ClassCommentReader=="undefined"?nil:ClassCommentReader)}return smalltalk.withContext(function(a){var e,s,n;e=_st(l())._new();_st(e)._class_(t);s=_st(e)._yourself();n=s;return n},function(l){l.fill(t,"commentStamp",{},smalltalk.Behavior)})},messageSends:["class:","new","yourself"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"commentStamp:prior:",fn:function(t,l){var a=this;return smalltalk.withContext(function(t){var l;l=_st(a)._commentStamp();return l},function(e){e.fill(a,"commentStamp:prior:",{aStamp:t,prior:l},smalltalk.Behavior)})},messageSends:["commentStamp"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"compile:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(l)._compile_category_(t,"");return e},function(a){a.fill(l,"compile:",{aString:t},smalltalk.Behavior)})},messageSends:["compile:category:"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"compile:category:",fn:function(t,l){var a=this;function e(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}return smalltalk.withContext(function(s){var n;n=_st(_st(e())._new())._install_forClass_category_(t,a,l);return n},function(e){e.fill(a,"compile:category:",{aString:t,anotherString:l},smalltalk.Behavior)})},messageSends:["install:forClass:category:","new"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"definition",fn:function(){var t=this;return smalltalk.withContext(function(t){return""},function(l){l.fill(t,"definition",{},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"includesBehavior:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(l).__eq_eq(t))._or_(function(){return smalltalk.withContext(function(a){return _st(l)._inheritsFrom_(t)},function(t){t.fillBlock({},a)})});return e},function(a){a.fill(l,"includesBehavior:",{aClass:t},smalltalk.Behavior)})},messageSends:["or:","inheritsFrom:","=="]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"includesSelector:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(l)._methodDictionary())._includesKey_(t);return e},function(a){a.fill(l,"includesSelector:",{aString:t},smalltalk.Behavior)})},messageSends:["includesKey:","methodDictionary"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"inheritsFrom:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(t)._allSubclasses())._includes_(l);return e},function(a){a.fill(l,"inheritsFrom:",{aClass:t},smalltalk.Behavior)})},messageSends:["includes:","allSubclasses"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"instanceVariableNames",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.iVarNames;return t},function(l){l.fill(t,"instanceVariableNames",{},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"isBehavior",fn:function(){var t=this;return smalltalk.withContext(function(t){return true},function(l){l.fill(t,"isBehavior",{},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"lookupSelector:",fn:function(t){var l=this;var a;return smalltalk.withContext(function(e){var s,n;var o={};try{a=l;_st(function(){return smalltalk.withContext(function(t){return _st(a).__eq(nil)},function(t){t.fillBlock({},e)})})._whileFalse_(function(){return smalltalk.withContext(function(l){s=_st(a)._includesSelector_(t);if(smalltalk.assert(s)){n=_st(a)._methodAt_(t);throw o=[n]}a=_st(a)._superclass();return a},function(t){t.fillBlock({},e)})});return nil}catch(r){if(r===o)return r[0];throw r}},function(e){e.fill(l,"lookupSelector:",{selector:t,lookupClass:a},smalltalk.Behavior)})},messageSends:["whileFalse:","ifTrue:","methodAt:","includesSelector:","superclass","="]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"methodAt:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(l)._methodDictionary())._at_(t);return e},function(a){a.fill(l,"methodAt:",{aString:t},smalltalk.Behavior)})},messageSends:["at:","methodDictionary"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"methodDictionary",fn:function(){var t=this;return smalltalk.withContext(function(l){var a=smalltalk.HashedCollection._new();var e=t.methods;for(var s in e){if(e[s].selector){a._at_put_(e[s].selector,e[s])}}return a;return t},function(l){l.fill(t,"methodDictionary",{},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"methods",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st(t)._methodDictionary())._values();return a},function(l){l.fill(t,"methods",{},smalltalk.Behavior)})},messageSends:["values","methodDictionary"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"methodsFor:",fn:function(t){var l=this;function a(){return smalltalk.ClassCategoryReader||(typeof ClassCategoryReader=="undefined"?nil:ClassCategoryReader)}return smalltalk.withContext(function(e){var s,n,o;s=_st(a())._new();_st(s)._class_category_(l,t);n=_st(s)._yourself();o=n;return o},function(a){a.fill(l,"methodsFor:",{aString:t},smalltalk.Behavior)})},messageSends:["class:category:","new","yourself"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"methodsFor:stamp:",fn:function(t,l){var a=this;return smalltalk.withContext(function(l){var e;e=_st(a)._methodsFor_(t);return e},function(e){e.fill(a,"methodsFor:stamp:",{aString:t,aStamp:l},smalltalk.Behavior)})},messageSends:["methodsFor:"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"methodsInProtocol:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e;e=_st(_st(_st(l)._methodDictionary())._values())._select_(function(l){return smalltalk.withContext(function(a){return _st(_st(l)._protocol()).__eq(t)},function(t){t.fillBlock({each:l},a)})});return e},function(a){a.fill(l,"methodsInProtocol:",{aString:t},smalltalk.Behavior)})},messageSends:["select:","=","protocol","values","methodDictionary"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"name",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.className||nil;return t},function(l){l.fill(t,"name",{},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"new",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st(t)._basicNew())._initialize();return a},function(l){l.fill(t,"new",{},smalltalk.Behavior)})},messageSends:["initialize","basicNew"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"organization",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._basicAt_("organization");return a},function(l){l.fill(t,"organization",{},smalltalk.Behavior)})},messageSends:["basicAt:"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"protocols",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st(_st(t)._organization())._elements())._sorted();return a},function(l){l.fill(t,"protocols",{},smalltalk.Behavior)})},messageSends:["sorted","elements","organization"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"protocolsDo:",fn:function(t){var l=this;var a;function e(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}function s(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}return smalltalk.withContext(function(n){a=_st(e())._new();_st(_st(_st(l)._methodDictionary())._values())._do_(function(t){return smalltalk.withContext(function(l){return _st(_st(a)._at_ifAbsentPut_(_st(t)._category(),function(){return smalltalk.withContext(function(t){return _st(s())._new()
},function(t){t.fillBlock({},n)})}))._add_(t)},function(l){l.fillBlock({m:t},n)})});_st(_st(l)._protocols())._do_(function(l){return smalltalk.withContext(function(e){return _st(t)._value_value_(l,_st(a)._at_(l))},function(t){t.fillBlock({category:l},n)})});return l},function(e){e.fill(l,"protocolsDo:",{aBlock:t,methodsByCategory:a},smalltalk.Behavior)})},messageSends:["new","do:","add:","at:ifAbsentPut:","category","values","methodDictionary","value:value:","at:","protocols"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"prototype",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.fn.prototype;return t},function(l){l.fill(t,"prototype",{},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"removeCompiledMethod:",fn:function(t){var l=this;function a(){return smalltalk.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}function e(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(s){var n,o;_st(l)._basicRemoveCompiledMethod_(t);_st(_st(l)._methods())._detect_ifNone_(function(l){return smalltalk.withContext(function(a){return _st(_st(l)._protocol()).__eq(_st(t)._protocol())},function(t){t.fillBlock({each:l},s)})},function(){return smalltalk.withContext(function(a){return _st(_st(l)._organization())._removeElement_(_st(t)._protocol())},function(t){t.fillBlock({},s)})});n=_st(a())._new();_st(n)._method_(t);o=_st(n)._yourself();_st(_st(e())._current())._announce_(o);return l},function(a){a.fill(l,"removeCompiledMethod:",{aMethod:t},smalltalk.Behavior)})},messageSends:["basicRemoveCompiledMethod:","detect:ifNone:","=","protocol","removeElement:","organization","methods","announce:","method:","new","yourself","current"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"selectors",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st(t)._methodDictionary())._keys();return a},function(l){l.fill(t,"selectors",{},smalltalk.Behavior)})},messageSends:["keys","methodDictionary"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"subclasses",fn:function(){var t=this;return smalltalk.withContext(function(l){return smalltalk.subclasses(t);return t},function(l){l.fill(t,"subclasses",{},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"superclass",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.superclass||nil;return t},function(l){l.fill(t,"superclass",{},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"theMetaClass",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._class();return a},function(l){l.fill(t,"theMetaClass",{},smalltalk.Behavior)})},messageSends:["class"]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"theNonMetaClass",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t;return a},function(l){l.fill(t,"theNonMetaClass",{},smalltalk.Behavior)})},messageSends:[]}),smalltalk.Behavior);smalltalk.addMethod(smalltalk.method({selector:"withAllSubclasses",fn:function(){var t=this;function l(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}return smalltalk.withContext(function(a){var e,s,n;e=_st(l())._with_(t);_st(e)._addAll_(_st(t)._allSubclasses());s=_st(e)._yourself();n=s;return n},function(l){l.fill(t,"withAllSubclasses",{},smalltalk.Behavior)})},messageSends:["addAll:","allSubclasses","with:","yourself"]}),smalltalk.Behavior);smalltalk.addClass("Class",smalltalk.Behavior,[],"Kernel-Classes");smalltalk.addMethod(smalltalk.method({selector:"asJavascript",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st("smalltalk.").__comma(_st(t)._name());return a},function(l){l.fill(t,"asJavascript",{},smalltalk.Class)})},messageSends:[",","name"]}),smalltalk.Class);smalltalk.addMethod(smalltalk.method({selector:"category",fn:function(){var t=this;return smalltalk.withContext(function(l){var a,e;a=_st(t)._package();if(($receiver=a)==nil||$receiver==undefined){e="Unclassified"}else{e=_st(_st(t)._package())._name()}return e},function(l){l.fill(t,"category",{},smalltalk.Class)})},messageSends:["ifNil:ifNotNil:","name","package"]}),smalltalk.Class);smalltalk.addMethod(smalltalk.method({selector:"definition",fn:function(){var t=this;function l(){return smalltalk.String||(typeof String=="undefined"?nil:String)}return smalltalk.withContext(function(a){var e,s,n,o,r;r=_st(l())._streamContents_(function(r){return smalltalk.withContext(function(i){e=r;_st(e)._nextPutAll_(_st(_st(t)._superclass())._asString());_st(e)._nextPutAll_(" subclass: #");_st(e)._nextPutAll_(_st(t)._name());_st(e)._nextPutAll_(_st(_st(l())._lf()).__comma(_st(l())._tab()));s=_st(e)._nextPutAll_("instanceVariableNames: '");s;_st(_st(t)._instanceVariableNames())._do_separatedBy_(function(t){return smalltalk.withContext(function(l){return _st(r)._nextPutAll_(t)},function(l){l.fillBlock({each:t},a)})},function(){return smalltalk.withContext(function(t){return _st(r)._nextPutAll_(" ")},function(t){t.fillBlock({},a)})});n=r;_st(n)._nextPutAll_(_st(_st("'").__comma(_st(l())._lf())).__comma(_st(l())._tab()));_st(n)._nextPutAll_("package: '");_st(n)._nextPutAll_(_st(t)._category());o=_st(n)._nextPutAll_("'");return o},function(t){t.fillBlock({stream:r},a)})});return r},function(l){l.fill(t,"definition",{},smalltalk.Class)})},messageSends:["streamContents:","nextPutAll:","asString","superclass","name",",","tab","lf","do:separatedBy:","instanceVariableNames","category"]}),smalltalk.Class);smalltalk.addMethod(smalltalk.method({selector:"isClass",fn:function(){var t=this;return smalltalk.withContext(function(t){return true},function(l){l.fill(t,"isClass",{},smalltalk.Class)})},messageSends:[]}),smalltalk.Class);smalltalk.addMethod(smalltalk.method({selector:"package",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._basicAt_("pkg");return a},function(l){l.fill(t,"package",{},smalltalk.Class)})},messageSends:["basicAt:"]}),smalltalk.Class);smalltalk.addMethod(smalltalk.method({selector:"package:",fn:function(t){var l=this;var a;function e(){return smalltalk.ClassMoved||(typeof ClassMoved=="undefined"?nil:ClassMoved)}function s(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(n){var o,r;a=_st(l)._package();_st(l)._basicAt_put_("pkg",t);_st(_st(a)._organization())._removeElement_(l);_st(_st(t)._organization())._addElement_(l);o=_st(e())._new();_st(o)._theClass_(l);_st(o)._oldPackage_(a);r=_st(o)._yourself();_st(_st(s())._current())._announce_(r);return l},function(e){e.fill(l,"package:",{aPackage:t,oldPackage:a},smalltalk.Class)})},messageSends:["package","basicAt:put:","removeElement:","organization","addElement:","announce:","theClass:","new","oldPackage:","yourself","current"]}),smalltalk.Class);smalltalk.addMethod(smalltalk.method({selector:"printOn:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(t)._nextPutAll_(_st(l)._name());return l},function(a){a.fill(l,"printOn:",{aStream:t},smalltalk.Class)})},messageSends:["nextPutAll:","name"]}),smalltalk.Class);smalltalk.addMethod(smalltalk.method({selector:"rename:",fn:function(t){var l=this;function a(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}return smalltalk.withContext(function(e){_st(_st(a())._new())._renameClass_to_(l,t);return l},function(a){a.fill(l,"rename:",{aString:t},smalltalk.Class)})},messageSends:["renameClass:to:","new"]}),smalltalk.Class);smalltalk.addMethod(smalltalk.method({selector:"subclass:instanceVariableNames:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s;s=_st(a)._subclass_instanceVariableNames_package_(t,l,nil);return s},function(e){e.fill(a,"subclass:instanceVariableNames:",{aString:t,anotherString:l},smalltalk.Class)})},messageSends:["subclass:instanceVariableNames:package:"]}),smalltalk.Class);smalltalk.addMethod(smalltalk.method({selector:"subclass:instanceVariableNames:category:",fn:function(t,l,a){var e=this;return smalltalk.withContext(function(s){var n;_st(e)._deprecatedAPI();n=_st(e)._subclass_instanceVariableNames_package_(t,l,a);return n},function(s){s.fill(e,"subclass:instanceVariableNames:category:",{aString:t,aString2:l,aString3:a},smalltalk.Class)})},messageSends:["deprecatedAPI","subclass:instanceVariableNames:package:"]}),smalltalk.Class);smalltalk.addMethod(smalltalk.method({selector:"subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",fn:function(t,l,a,e,s){var n=this;return smalltalk.withContext(function(a){var e;e=_st(n)._subclass_instanceVariableNames_package_(t,l,s);return e},function(o){o.fill(n,"subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",{aString:t,aString2:l,classVars:a,pools:e,aString3:s},smalltalk.Class)})},messageSends:["subclass:instanceVariableNames:package:"]}),smalltalk.Class);smalltalk.addMethod(smalltalk.method({selector:"subclass:instanceVariableNames:package:",fn:function(t,l,a){var e=this;function s(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}return smalltalk.withContext(function(n){var o;o=_st(_st(s())._new())._superclass_subclass_instanceVariableNames_package_(e,_st(t)._asString(),l,a);return o},function(s){s.fill(e,"subclass:instanceVariableNames:package:",{aString:t,aString2:l,aString3:a},smalltalk.Class)})},messageSends:["superclass:subclass:instanceVariableNames:package:","asString","new"]}),smalltalk.Class);smalltalk.addClass("Metaclass",smalltalk.Behavior,[],"Kernel-Classes");smalltalk.addMethod(smalltalk.method({selector:"asJavascript",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(_st("smalltalk.").__comma(_st(_st(t)._instanceClass())._name())).__comma(".klass");return a},function(l){l.fill(t,"asJavascript",{},smalltalk.Metaclass)})},messageSends:[",","name","instanceClass"]}),smalltalk.Metaclass);smalltalk.addMethod(smalltalk.method({selector:"definition",fn:function(){var t=this;function l(){return smalltalk.String||(typeof String=="undefined"?nil:String)}return smalltalk.withContext(function(a){var e,s,n;n=_st(l())._streamContents_(function(l){return smalltalk.withContext(function(n){e=l;_st(e)._nextPutAll_(_st(t)._asString());s=_st(e)._nextPutAll_(" instanceVariableNames: '");s;_st(_st(t)._instanceVariableNames())._do_separatedBy_(function(t){return smalltalk.withContext(function(a){return _st(l)._nextPutAll_(t)},function(l){l.fillBlock({each:t},a)})},function(){return smalltalk.withContext(function(t){return _st(l)._nextPutAll_(" ")},function(t){t.fillBlock({},a)})});return _st(l)._nextPutAll_("'")},function(t){t.fillBlock({stream:l},a)})});return n},function(l){l.fill(t,"definition",{},smalltalk.Metaclass)})},messageSends:["streamContents:","nextPutAll:","asString","do:separatedBy:","instanceVariableNames"]}),smalltalk.Metaclass);smalltalk.addMethod(smalltalk.method({selector:"instanceClass",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.instanceClass;return t},function(l){l.fill(t,"instanceClass",{},smalltalk.Metaclass)})},messageSends:[]}),smalltalk.Metaclass);smalltalk.addMethod(smalltalk.method({selector:"instanceVariableNames:",fn:function(t){var l=this;function a(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}return smalltalk.withContext(function(e){_st(_st(a())._new())._class_instanceVariableNames_(l,t);return l},function(a){a.fill(l,"instanceVariableNames:",{aCollection:t},smalltalk.Metaclass)})},messageSends:["class:instanceVariableNames:","new"]}),smalltalk.Metaclass);smalltalk.addMethod(smalltalk.method({selector:"isMetaclass",fn:function(){var t=this;return smalltalk.withContext(function(t){return true},function(l){l.fill(t,"isMetaclass",{},smalltalk.Metaclass)})},messageSends:[]}),smalltalk.Metaclass);smalltalk.addMethod(smalltalk.method({selector:"printOn:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e,s;e=t;_st(e)._nextPutAll_(_st(_st(l)._instanceClass())._name());s=_st(e)._nextPutAll_(" class");return l},function(a){a.fill(l,"printOn:",{aStream:t},smalltalk.Metaclass)})},messageSends:["nextPutAll:","name","instanceClass"]}),smalltalk.Metaclass);smalltalk.addMethod(smalltalk.method({selector:"theMetaClass",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t;return a},function(l){l.fill(t,"theMetaClass",{},smalltalk.Metaclass)})},messageSends:[]}),smalltalk.Metaclass);smalltalk.addMethod(smalltalk.method({selector:"theNonMetaClass",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=_st(t)._instanceClass();return a},function(l){l.fill(t,"theNonMetaClass",{},smalltalk.Metaclass)})},messageSends:["instanceClass"]}),smalltalk.Metaclass);smalltalk.addClass("ClassBuilder",smalltalk.Object,[],"Kernel-Classes");smalltalk.addMethod(smalltalk.method({selector:"addSubclassOf:named:instanceVariableNames:package:",fn:function(t,l,a,e){var s=this;var n;function o(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(r){var i,m,u,c;n=_st(_st(o())._current())._at_(l);i=n;if(($receiver=i)==nil||$receiver==undefined){i}else{m=_st(_st(n)._superclass()).__eq_eq(t);if(!smalltalk.assert(m)){u=_st(s)._migrateClassNamed_superclass_instanceVariableNames_package_(l,t,a,e);return u}}c=_st(s)._basicAddSubclassOf_named_instanceVariableNames_package_(t,l,a,e);return c},function(o){o.fill(s,"addSubclassOf:named:instanceVariableNames:package:",{aClass:t,aString:l,aCollection:a,packageName:e,theClass:n},smalltalk.ClassBuilder)})},messageSends:["at:","current","ifNotNil:","ifFalse:","migrateClassNamed:superclass:instanceVariableNames:package:","==","superclass","basicAddSubclassOf:named:instanceVariableNames:package:"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"basicAddSubclassOf:named:instanceVariableNames:package:",fn:function(t,l,a,e){var s=this;return smalltalk.withContext(function(n){smalltalk.addClass(l,t,a,e);return smalltalk[l];return s},function(n){n.fill(s,"basicAddSubclassOf:named:instanceVariableNames:package:",{aClass:t,aString:l,aCollection:a,packageName:e},smalltalk.ClassBuilder)})},messageSends:[]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"basicClass:instanceVariableNames:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){_st(a)._basicClass_instanceVariables_(t,_st(a)._instanceVariableNamesFor_(l));return a},function(e){e.fill(a,"basicClass:instanceVariableNames:",{aClass:t,aString:l},smalltalk.ClassBuilder)})},messageSends:["basicClass:instanceVariables:","instanceVariableNamesFor:"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"basicClass:instanceVariables:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s;s=_st(t)._isMetaclass();if(!smalltalk.assert(s)){_st(a)._error_(_st(_st(t)._name()).__comma(" is not a metaclass"))}_st(t)._basicAt_put_("iVarNames",l);return a},function(e){e.fill(a,"basicClass:instanceVariables:",{aClass:t,aCollection:l},smalltalk.ClassBuilder)})},messageSends:["ifFalse:","error:",",","name","isMetaclass","basicAt:put:"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"basicRemoveClass:",fn:function(t){var l=this;return smalltalk.withContext(function(a){smalltalk.removeClass(t);return l},function(a){a.fill(l,"basicRemoveClass:",{aClass:t},smalltalk.ClassBuilder)})},messageSends:[]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"basicRenameClass:to:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){smalltalk[l]=t;delete smalltalk[t.className];t.className=l;return a},function(e){e.fill(a,"basicRenameClass:to:",{aClass:t,aString:l},smalltalk.ClassBuilder)})},messageSends:[]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"basicSwapClassNames:with:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s=t.className;t.className=l.className;l.className=s;return a},function(e){e.fill(a,"basicSwapClassNames:with:",{aClass:t,anotherClass:l},smalltalk.ClassBuilder)})},messageSends:[]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"class:instanceVariableNames:",fn:function(t,l){var a=this;function e(){return smalltalk.ClassDefinitionChanged||(typeof ClassDefinitionChanged=="undefined"?nil:ClassDefinitionChanged)}function s(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(n){var o,r;_st(a)._basicClass_instanceVariableNames_(t,l);_st(a)._setupClass_(t);o=_st(e())._new();_st(o)._theClass_(t);r=_st(o)._yourself();_st(_st(s())._current())._announce_(r);return a},function(e){e.fill(a,"class:instanceVariableNames:",{aClass:t,aString:l},smalltalk.ClassBuilder)})},messageSends:["basicClass:instanceVariableNames:","setupClass:","announce:","theClass:","new","yourself","current"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"copyClass:named:",fn:function(t,l){var a=this;var e;function s(){return smalltalk.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}function n(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(o){var r,i,m;e=_st(a)._addSubclassOf_named_instanceVariableNames_package_(_st(t)._superclass(),l,_st(t)._instanceVariableNames(),_st(_st(t)._package())._name());_st(a)._copyClass_to_(t,e);r=_st(s())._new();_st(r)._theClass_(e);i=_st(r)._yourself();_st(_st(n())._current())._announce_(i);m=e;return m},function(s){s.fill(a,"copyClass:named:",{aClass:t,aString:l,newClass:e},smalltalk.ClassBuilder)})},messageSends:["addSubclassOf:named:instanceVariableNames:package:","superclass","instanceVariableNames","name","package","copyClass:to:","announce:","theClass:","new","yourself","current"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"copyClass:to:",fn:function(t,l){var a=this;function e(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}return smalltalk.withContext(function(s){_st(l)._comment_(_st(t)._comment());_st(_st(_st(t)._methodDictionary())._values())._do_(function(t){return smalltalk.withContext(function(a){return _st(_st(e())._new())._install_forClass_category_(_st(t)._source(),l,_st(t)._category())},function(l){l.fillBlock({each:t},s)})});_st(a)._basicClass_instanceVariables_(_st(l)._class(),_st(_st(t)._class())._instanceVariableNames());_st(_st(_st(_st(t)._class())._methodDictionary())._values())._do_(function(t){return smalltalk.withContext(function(a){return _st(_st(e())._new())._install_forClass_category_(_st(t)._source(),_st(l)._class(),_st(t)._category())},function(l){l.fillBlock({each:t},s)})});_st(a)._setupClass_(l);return a},function(e){e.fill(a,"copyClass:to:",{aClass:t,anotherClass:l},smalltalk.ClassBuilder)})},messageSends:["comment:","comment","do:","install:forClass:category:","source","category","new","values","methodDictionary","basicClass:instanceVariables:","class","instanceVariableNames","setupClass:"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"installMethod:forClass:category:",fn:function(t,l,a){var e=this;return smalltalk.withContext(function(s){var n;_st(t)._category_(a);_st(l)._addCompiledMethod_(t);_st(e)._setupClass_(l);n=t;return n},function(s){s.fill(e,"installMethod:forClass:category:",{aCompiledMethod:t,aBehavior:l,aString:a},smalltalk.ClassBuilder)})},messageSends:["category:","addCompiledMethod:","setupClass:"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"instanceVariableNamesFor:",fn:function(t){var l=this;return smalltalk.withContext(function(l){var a;a=_st(_st(t)._tokenize_(" "))._reject_(function(t){return smalltalk.withContext(function(l){return _st(t)._isEmpty()},function(a){a.fillBlock({each:t},l)})});return a},function(a){a.fill(l,"instanceVariableNamesFor:",{aString:t},smalltalk.ClassBuilder)})},messageSends:["reject:","isEmpty","tokenize:"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"migrateClass:superclass:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){_st(console)._log_(_st(t)._name());_st(a)._migrateClassNamed_superclass_instanceVariableNames_package_(_st(t)._name(),l,_st(t)._instanceVariableNames(),_st(_st(t)._package())._name());return a},function(e){e.fill(a,"migrateClass:superclass:",{aClass:t,anotherClass:l},smalltalk.ClassBuilder)})},messageSends:["log:","name","migrateClassNamed:superclass:instanceVariableNames:package:","instanceVariableNames","package"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"migrateClassNamed:superclass:instanceVariableNames:package:",fn:function(t,l,a,e){var s=this;var n,o,r;function i(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}function m(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}return smalltalk.withContext(function(u){var c,d,f,k,_;r=_st("new*").__comma(t);n=_st(_st(i())._current())._at_(t);o=_st(s)._addSubclassOf_named_instanceVariableNames_package_(l,r,a,e);_st(s)._basicSwapClassNames_with_(n,o);_st(function(){return smalltalk.withContext(function(t){return _st(s)._copyClass_to_(n,o)},function(t){t.fillBlock({},u)})})._on_do_(m(),function(t){return smalltalk.withContext(function(l){c=s;_st(c)._basicSwapClassNames_with_(n,o);d=_st(c)._basicRemoveClass_(o);d;return _st(t)._signal()},function(l){l.fillBlock({exception:t},u)})});f=s;_st(f)._rawRenameClass_to_(n,r);k=_st(f)._rawRenameClass_to_(o,t);_st(_st(n)._subclasses())._do_(function(t){return smalltalk.withContext(function(l){return _st(s)._migrateClass_superclass_(t,o)},function(l){l.fillBlock({each:t},u)})});_st(s)._basicRemoveClass_(n);_=o;return _},function(i){i.fill(s,"migrateClassNamed:superclass:instanceVariableNames:package:",{aString:t,aClass:l,aCollection:a,packageName:e,oldClass:n,newClass:o,tmp:r},smalltalk.ClassBuilder)})},messageSends:[",","at:","current","addSubclassOf:named:instanceVariableNames:package:","basicSwapClassNames:with:","on:do:","basicRemoveClass:","signal","copyClass:to:","rawRenameClass:to:","do:","migrateClass:superclass:","subclasses"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"rawRenameClass:to:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){smalltalk[l]=t;return a},function(e){e.fill(a,"rawRenameClass:to:",{aClass:t,aString:l},smalltalk.ClassBuilder)})},messageSends:[]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"renameClass:to:",fn:function(t,l){var a=this;function e(){return smalltalk.ClassRenamed||(typeof ClassRenamed=="undefined"?nil:ClassRenamed)}function s(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(n){var o,r;_st(a)._basicRenameClass_to_(t,l);o=_st(e())._new();_st(o)._theClass_(t);r=_st(o)._yourself();_st(_st(s())._current())._announce_(r);return a},function(e){e.fill(a,"renameClass:to:",{aClass:t,aString:l},smalltalk.ClassBuilder)})},messageSends:["basicRenameClass:to:","announce:","theClass:","new","yourself","current"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"setupClass:",fn:function(t){var l=this;return smalltalk.withContext(function(a){smalltalk.init(t);return l},function(a){a.fill(l,"setupClass:",{aClass:t},smalltalk.ClassBuilder)})},messageSends:[]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"superclass:subclass:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){var s;s=_st(a)._superclass_subclass_instanceVariableNames_package_(t,l,"",nil);return s},function(e){e.fill(a,"superclass:subclass:",{aClass:t,aString:l},smalltalk.ClassBuilder)})},messageSends:["superclass:subclass:instanceVariableNames:package:"]}),smalltalk.ClassBuilder);smalltalk.addMethod(smalltalk.method({selector:"superclass:subclass:instanceVariableNames:package:",fn:function(t,l,a,e){var s=this;var n;function o(){return smalltalk.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}function r(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(i){var m,u,c,d,f,k,_,h,g;m=s;u=t;c=l;d=_st(s)._instanceVariableNamesFor_(a);f=e;if(($receiver=f)==nil||$receiver==undefined){k="unclassified"}else{k=f}n=_st(m)._addSubclassOf_named_instanceVariableNames_package_(u,c,d,k);_st(s)._setupClass_(n);_=_st(o())._new();_st(_)._theClass_(n);h=_st(_)._yourself();_st(_st(r())._current())._announce_(h);g=n;return g},function(o){o.fill(s,"superclass:subclass:instanceVariableNames:package:",{aClass:t,aString:l,aString2:a,aString3:e,newClass:n},smalltalk.ClassBuilder)})},messageSends:["addSubclassOf:named:instanceVariableNames:package:","instanceVariableNamesFor:","ifNil:","setupClass:","announce:","theClass:","new","yourself","current"]}),smalltalk.ClassBuilder);smalltalk.addClass("ClassCategoryReader",smalltalk.Object,["class","category"],"Kernel-Classes");smalltalk.addMethod(smalltalk.method({selector:"class:category:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){a["@class"]=t;a["@category"]=l;return a},function(e){e.fill(a,"class:category:",{aClass:t,aString:l},smalltalk.ClassCategoryReader)})},messageSends:[]}),smalltalk.ClassCategoryReader);smalltalk.addMethod(smalltalk.method({selector:"compileMethod:",fn:function(t){var l=this;function a(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}return smalltalk.withContext(function(e){_st(_st(a())._new())._install_forClass_category_(t,l["@class"],l["@category"]);return l},function(a){a.fill(l,"compileMethod:",{aString:t},smalltalk.ClassCategoryReader)})},messageSends:["install:forClass:category:","new"]}),smalltalk.ClassCategoryReader);smalltalk.addMethod(smalltalk.method({selector:"initialize",fn:function(){var t=this;return smalltalk.withContext(function(l){smalltalk.Object.fn.prototype._initialize.apply(_st(t),[]);return t},function(l){l.fill(t,"initialize",{},smalltalk.ClassCategoryReader)})},messageSends:["initialize"]}),smalltalk.ClassCategoryReader);smalltalk.addMethod(smalltalk.method({selector:"scanFrom:",fn:function(t){var l=this;var a;function e(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}return smalltalk.withContext(function(s){_st(function(){return smalltalk.withContext(function(l){a=_st(t)._nextChunk();a;return _st(a)._isEmpty()},function(t){t.fillBlock({},s)})})._whileFalse_(function(){return smalltalk.withContext(function(t){return _st(l)._compileMethod_(a)},function(t){t.fillBlock({},s)})});_st(_st(e())._new())._setupClass_(l["@class"]);return l},function(e){e.fill(l,"scanFrom:",{aChunkParser:t,chunk:a},smalltalk.ClassCategoryReader)})},messageSends:["whileFalse:","compileMethod:","nextChunk","isEmpty","setupClass:","new"]}),smalltalk.ClassCategoryReader);smalltalk.addClass("ClassCommentReader",smalltalk.Object,["class"],"Kernel-Classes");smalltalk.addMethod(smalltalk.method({selector:"class:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l["@class"]=t;return l},function(a){a.fill(l,"class:",{aClass:t},smalltalk.ClassCommentReader)})},messageSends:[]}),smalltalk.ClassCommentReader);smalltalk.addMethod(smalltalk.method({selector:"initialize",fn:function(){var t=this;return smalltalk.withContext(function(l){smalltalk.Object.fn.prototype._initialize.apply(_st(t),[]);return t},function(l){l.fill(t,"initialize",{},smalltalk.ClassCommentReader)})},messageSends:["initialize"]}),smalltalk.ClassCommentReader);smalltalk.addMethod(smalltalk.method({selector:"scanFrom:",fn:function(t){var l=this;var a;return smalltalk.withContext(function(e){var s;a=_st(t)._nextChunk();s=_st(a)._isEmpty();if(!smalltalk.assert(s)){_st(l)._setComment_(a)}return l},function(e){e.fill(l,"scanFrom:",{aChunkParser:t,chunk:a},smalltalk.ClassCommentReader)})},messageSends:["nextChunk","ifFalse:","setComment:","isEmpty"]}),smalltalk.ClassCommentReader);smalltalk.addMethod(smalltalk.method({selector:"setComment:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(l["@class"])._comment_(t);return l},function(a){a.fill(l,"setComment:",{aString:t},smalltalk.ClassCommentReader)})},messageSends:["comment:"]}),smalltalk.ClassCommentReader);smalltalk.addClass("ClassSorterNode",smalltalk.Object,["theClass","level","nodes"],"Kernel-Classes");smalltalk.addMethod(smalltalk.method({selector:"getNodesFrom:",fn:function(t){var l=this;var a,e;function s(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}return smalltalk.withContext(function(n){var o;a=[];e=[];_st(t)._do_(function(t){return smalltalk.withContext(function(s){o=_st(_st(t)._superclass()).__eq(_st(l)._theClass());if(smalltalk.assert(o)){return _st(a)._add_(t)}else{return _st(e)._add_(t)}},function(l){l.fillBlock({each:t},n)})});l["@nodes"]=_st(a)._collect_(function(t){return smalltalk.withContext(function(a){return _st(s())._on_classes_level_(t,e,_st(_st(l)._level()).__plus(1))},function(l){l.fillBlock({each:t},n)})});return l},function(s){s.fill(l,"getNodesFrom:",{aCollection:t,children:a,others:e},smalltalk.ClassSorterNode)})},messageSends:["do:","ifTrue:ifFalse:","add:","=","theClass","superclass","collect:","on:classes:level:","+","level"]}),smalltalk.ClassSorterNode);smalltalk.addMethod(smalltalk.method({selector:"level",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t["@level"];return a},function(l){l.fill(t,"level",{},smalltalk.ClassSorterNode)})},messageSends:[]}),smalltalk.ClassSorterNode);smalltalk.addMethod(smalltalk.method({selector:"level:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l["@level"]=t;return l},function(a){a.fill(l,"level:",{anInteger:t},smalltalk.ClassSorterNode)})},messageSends:[]}),smalltalk.ClassSorterNode);smalltalk.addMethod(smalltalk.method({selector:"nodes",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t["@nodes"];return a},function(l){l.fill(t,"nodes",{},smalltalk.ClassSorterNode)})},messageSends:[]}),smalltalk.ClassSorterNode);smalltalk.addMethod(smalltalk.method({selector:"theClass",fn:function(){var t=this;return smalltalk.withContext(function(l){var a;a=t["@theClass"];return a},function(l){l.fill(t,"theClass",{},smalltalk.ClassSorterNode)})},messageSends:[]}),smalltalk.ClassSorterNode);smalltalk.addMethod(smalltalk.method({selector:"theClass:",fn:function(t){var l=this;return smalltalk.withContext(function(a){l["@theClass"]=t;return l},function(a){a.fill(l,"theClass:",{aClass:t},smalltalk.ClassSorterNode)})},messageSends:[]}),smalltalk.ClassSorterNode);smalltalk.addMethod(smalltalk.method({selector:"traverseClassesWith:",fn:function(t){var l=this;return smalltalk.withContext(function(a){_st(t)._add_(_st(l)._theClass());_st(_st(_st(l)._nodes())._sorted_(function(t,l){return smalltalk.withContext(function(a){return _st(_st(_st(t)._theClass())._name()).__lt_eq(_st(_st(l)._theClass())._name())},function(e){e.fillBlock({a:t,b:l},a)})}))._do_(function(l){return smalltalk.withContext(function(a){return _st(l)._traverseClassesWith_(t)},function(t){t.fillBlock({aNode:l},a)})});return l},function(a){a.fill(l,"traverseClassesWith:",{aCollection:t},smalltalk.ClassSorterNode)})},messageSends:["add:","theClass","do:","traverseClassesWith:","sorted:","<=","name","nodes"]}),smalltalk.ClassSorterNode);smalltalk.addMethod(smalltalk.method({selector:"on:classes:level:",fn:function(t,l,a){var e=this;return smalltalk.withContext(function(s){var n,o,r;n=_st(e)._new();
_st(n)._theClass_(t);_st(n)._level_(a);_st(n)._getNodesFrom_(l);o=_st(n)._yourself();r=o;return r},function(s){s.fill(e,"on:classes:level:",{aClass:t,aCollection:l,anInteger:a},smalltalk.ClassSorterNode.klass)})},messageSends:["theClass:","new","level:","getNodesFrom:","yourself"]}),smalltalk.ClassSorterNode.klass);smalltalk.addPackage("Kernel-Methods");smalltalk.addClass("BlockClosure",smalltalk.Object,[],"Kernel-Methods");smalltalk.addMethod(smalltalk.method({selector:"applyTo:arguments:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){return a.apply(t,l);return a},function(e){e.fill(a,"applyTo:arguments:",{anObject:t,aCollection:l},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"asCompiledMethod:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return smalltalk.method({selector:t,fn:l});return l},function(a){a.fill(l,"asCompiledMethod:",{aString:t},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"compiledSource",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.toString();return t},function(l){l.fill(t,"compiledSource",{},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"currySelf",fn:function(){var t=this;return smalltalk.withContext(function(l){return function(){var l=[this];l.push.apply(l,arguments);return t.apply(null,l)};return t},function(l){l.fill(t,"currySelf",{},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"ensure:",fn:function(t){var l=this;return smalltalk.withContext(function(a){try{return l()}finally{t._value()}return l},function(a){a.fill(l,"ensure:",{aBlock:t},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"fork",fn:function(){var t=this;function l(){return smalltalk.ForkPool||(typeof ForkPool=="undefined"?nil:ForkPool)}return smalltalk.withContext(function(a){_st(_st(l())._default())._fork_(t);return t},function(l){l.fill(t,"fork",{},smalltalk.BlockClosure)})},messageSends:["fork:","default"]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"new",fn:function(){var t=this;return smalltalk.withContext(function(l){return new t;return t},function(l){l.fill(t,"new",{},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"newValue:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return new l(t);return l},function(a){a.fill(l,"newValue:",{anObject:t},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"newValue:value:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){return new a(t,l);return a},function(e){e.fill(a,"newValue:value:",{anObject:t,anObject2:l},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"newValue:value:value:",fn:function(t,l,a){var e=this;return smalltalk.withContext(function(s){return new e(t,l,a);return e},function(s){s.fill(e,"newValue:value:value:",{anObject:t,anObject2:l,anObject3:a},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"numArgs",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.length;return t},function(l){l.fill(t,"numArgs",{},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"on:do:",fn:function(t,l){var a=this;function e(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}return smalltalk.withContext(function(s){var n,o;o=_st(a)._try_catch_(a,function(a){var o;return smalltalk.withContext(function(s){o=_st(_st(e())._current())._asSmalltalkException_(a);o;n=_st(o)._isKindOf_(t);if(smalltalk.assert(n)){return _st(l)._value_(o)}else{return _st(o)._signal()}},function(t){t.fillBlock({error:a,smalltalkError:o},s)})});return o},function(e){e.fill(a,"on:do:",{anErrorClass:t,aBlock:l},smalltalk.BlockClosure)})},messageSends:["try:catch:","asSmalltalkException:","current","ifTrue:ifFalse:","value:","signal","isKindOf:"]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"timeToRun",fn:function(){var t=this;function l(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}return smalltalk.withContext(function(a){var e;e=_st(l())._millisecondsToRun_(t);return e},function(l){l.fill(t,"timeToRun",{},smalltalk.BlockClosure)})},messageSends:["millisecondsToRun:"]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"value",fn:function(){var t=this;return smalltalk.withContext(function(l){return t();return t},function(l){l.fill(t,"value",{},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"value:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l(t);return l},function(a){a.fill(l,"value:",{anArg:t},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"value:value:",fn:function(t,l){var a=this;return smalltalk.withContext(function(e){return a(t,l);return a},function(e){e.fill(a,"value:value:",{firstArg:t,secondArg:l},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"value:value:value:",fn:function(t,l,a){var e=this;return smalltalk.withContext(function(s){return e(t,l,a);return e},function(s){s.fill(e,"value:value:value:",{firstArg:t,secondArg:l,thirdArg:a},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"valueWithInterval:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e=setInterval(l,t);return smalltalk.Timeout._on_(e);return l},function(a){a.fill(l,"valueWithInterval:",{aNumber:t},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"valueWithPossibleArguments:",fn:function(t){var l=this;return smalltalk.withContext(function(a){return l.apply(null,t);return l},function(a){a.fill(l,"valueWithPossibleArguments:",{aCollection:t},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"valueWithTimeout:",fn:function(t){var l=this;return smalltalk.withContext(function(a){var e=setTimeout(l,t);return smalltalk.Timeout._on_(e);return l},function(a){a.fill(l,"valueWithTimeout:",{aNumber:t},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"whileFalse",fn:function(){var t=this;return smalltalk.withContext(function(l){_st(t)._whileFalse_(function(){return smalltalk.withContext(function(t){},function(t){t.fillBlock({},l)})});return t},function(l){l.fill(t,"whileFalse",{},smalltalk.BlockClosure)})},messageSends:["whileFalse:"]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"whileFalse:",fn:function(t){var l=this;return smalltalk.withContext(function(a){while(!l()){t()}return l},function(a){a.fill(l,"whileFalse:",{aBlock:t},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"whileTrue",fn:function(){var t=this;return smalltalk.withContext(function(l){_st(t)._whileTrue_(function(){return smalltalk.withContext(function(t){},function(t){t.fillBlock({},l)})});return t},function(l){l.fill(t,"whileTrue",{},smalltalk.BlockClosure)})},messageSends:["whileTrue:"]}),smalltalk.BlockClosure);smalltalk.addMethod(smalltalk.method({selector:"whileTrue:",fn:function(t){var l=this;return smalltalk.withContext(function(a){while(l()){t()}return l},function(a){a.fill(l,"whileTrue:",{aBlock:t},smalltalk.BlockClosure)})},messageSends:[]}),smalltalk.BlockClosure);smalltalk.addClass("CompiledMethod",smalltalk.Object,[],"Kernel-Methods");smalltalk.addMethod(smalltalk.method({selector:"arguments",fn:function(){var t=this;return smalltalk.withContext(function(l){return t.args||[];return t},function(l){l.fill(t,"arguments",{},smalltalk.CompiledMethod)})},messageSends:[]}),smalltalk.CompiledMethod);smalltalk.addMethod(smalltalk.method({selector:"category",fn:function(){var t=this;return smalltalk.withContext(function(l){var a,e;a=_st(t)._basicAt_("category");if(($receiver=a)==nil||$receiver==undefined){e=_st(t)._defaultCategory()}else{e=a}return e},function(l){l.fill(t,"category",{},smalltalk.CompiledMethod)})},messageSends:["ifNil:","defaultCategory","basicAt:"]}),smalltalk.CompiledMethod);smalltalk.addMethod(smalltalk.method({selector:"category:",fn:function(t){var l=this;var a;function e(){return smalltalk.MethodMoved||(typeof MethodMoved=="undefined"?nil:MethodMoved)}function s(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}return smalltalk.withContext(function(n){var o,r,i;a=_st(l)._protocol();_st(l)._basicAt_put_("category",t);o=_st(e())._new();_st(o)._method_(l);_st(o)._oldProtocol_(a);r=_st(o)._yourself();_st(_st(s())._current())._announce_(r);i=_st(l)._methodClass();if(($receiver=i)==nil||$receiver==undefined){i}else{_st(_st(_st(l)._methodClass())._organization())._addElement_(t);_st(_st(_st(_st(l)._methodClass())._methods())._select_(function(t){return smalltalk.withContext(function(l){return _st(_st(t)._protocol()).__eq(a)},function(l){l.fillBlock({each:t},n)})}))._ifEmpty_(function(){return smalltalk.withContext(function(t){return _st(_st(_st(l)._methodClass())._organization())._removeElement_(a)},function(t){t.fillBlock({},n)})})}return l},function(e){e.fill(l,"category:",{aString:t,oldProtocol:a},smalltalk.CompiledMethod)})},messageSends:["protocol","basicAt:put:","announce:","method:","new","oldProtocol:","yourself","current","ifNotNil:","addElement:","organization","methodClass","ifEmpty:","removeElement:","select:","=","methods"]}),smalltalk.CompiledMethod);smalltalk.addMethod(smalltalk.method({selector:"defaultCategory",fn:function(){var t=this;return smalltalk.withContext(function(t){return"as yet unclassified"},function(l){l.fill(t,"defaultCategory",{},smalltalk.CompiledMethod)})},messageSends:


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Minification advice

Nicolas Petton
In reply to this post by Herby Vojčík
What packages are included?

Nico

Herby Vojčík writes:

> It seems 'smalltalk' wins by huge margin, and it is also the one which minifiers can safely replace. Others are method names, so there it is dangerous.
>
> What can be done, is to monkey patch the shorter names of them at the beginning of each js file, like
>
>     smalltalk.$am = smalltalk.addMethod
>
> and use smalltalk.$am in the file itself. But again, I don't know if such thing is worth it.
>
> Herby
>
> sebastian <[hidden email]>napísal/a:
>
>>the base code I’m using is resulting from an older Amber version so we should update this feedback
>>
>>But for what’s worth:
>>all.js  528KB
>>
>>string: occurrences:
>>
>>addMethod 1302
>>smalltalk 7544
>>withContext 1635
>>messageSends 1307
>>method 1413
>>className 37
>>Smalltalk 180
>>fill 1636
>>…
>>
>>
>>So there are big wins to get from there.
>>
>>Wonder what the results would be if using Closure compiler on a fresh amber
>>
>>
>>
>>
>>On Apr 12, 2014, at 2:00 PM, Herby Vojčík <[hidden email]> wrote:
>>
>>> Well, I don't know what was the result when using minifier, but as smalltalk is local parameter, I would say it got replaced... OTOH, withContext is method name of the API of Amber kernel, and I doubt there is safe way to rename method names... the code in which the rename would have been done as a whole would work, but the problem would be with newly compiled methods (not necessarily by IDE, maybe some just in time compilation by code), and packa ges loaded later into the runtime would break as well. So, I would not go too far with optimization...
>>> Of course, you can file an issue to officially rename withContext to, say, $wc, if it really helps significantly.
>>>
>>> Herby
>>>
>>> sebastian <[hidden email]>napísal/a:
>>>
>>>> I do want Amber as simple as possible (meaning that not necessarily this should lead us to change much).
>>>>
>>>> I just want Amber code being as minifyable as angular's meteor's or any other kid on the block
>>>>
>>>> And for sure NOT less
>>>>
>>>> Honestly I was expecting that minifyers were smarter but it's either they don't or I'm not using them rigth
>>>>
>>>> sebastian
>>>>
>>>> o/
>>>>
>>>>> On 12/04/2014, at 09:02, Siemen Baader <[hidden email]> wrote:
>>>>>
>>>>> Hi Hannes & Sebastian,
>>>>>
>>>>>> On 11 Apr 2014, at 10:06, H. Hirzel <[hidden email]> wrote:
>>>>>>
>>>>>> Hello Sebastian
>>>>>>
>>>>>>> On 4/11/14, Sebastian Sastre <[hidden email]> wrote:
>>>>>>> ...
>>>>>>> 3. replaced 'smalltalk' with 'st' => 493KB
>>>>>>> 4. replaced 'withContext' with 'wc' => 461KB
>>>>>>> 5. replaced many others => ~433KB   ??? more examples?
>>>>>>
>>>>>> This could probably be achieved by a patch on the compiler.
>>>>>>
>>>>>> Siemen, any advice where to look for this as you have been reading
>>>>>> Amber compiler code this week?
>>>>>
>>>>> Actually I didn't get to digging into it yet. I will keep it in mind when I do, but I'm afraid my mileage may vary - this will be my first Smalltalk compiler hack.
>>>>>
>>>>> Do you have actual performance problems in production? If so, have you checked if you could just use require.js concatenation and / or some off-the-shelf compression tool like uglify? OTOH, this should be possible, and seems like a more modular approach than building minification into the Amber compiler. I have never looked at it personally, though.
>>>>>
>>>>> best,
>>>>> Siemen
>>>>>
>>>>>>
>>>>>> --Hannes
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups "amber-lang" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>--
>>You received this message because you are subscribed to the Google Groups "amber-lang" group.
>>To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>For more options, visit https://groups.google.com/d/optout.


--
Nicolas Petton
http://nicolas-petton.fr

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.