codefrau / SqueakJS

A Squeak Smalltalk VM in Javascript
https://squeak.js.org
MIT License
364 stars 75 forks source link

Fix ensureFullBlockClosureClass for older images #124

Closed ErikOnBike closed 3 years ago

ErikOnBike commented 3 years ago

My tiny CodeParadise image fails because ensureFullBlockClosureClass() will put undefined in the FullBlockClosure entry of the special objects array. This additional check prevents this.

ErikOnBike commented 3 years ago

Hi Fabio. Well actually they don't work for me. But that's because I'm using an old image without FBC :-). But because it is missing, an 'undefined' value was written to the special objects array. Other code would 'break' on this. So the additional check prevents the replacement of the value in the special objects array. The current value in splObs is 'nil' in my old image (of course). But 'nil' is not undefined :-D. Thx for approval!

fniephaus commented 3 years ago

Ah right! Looks like I drove by too fast. 😉 The additional check still makes sense!