powerlang / egg

Egg Smalltalk
MIT License
13 stars 2 forks source link

pharo interpreter cant handle the result of `String new` #43

Closed iglosiggio closed 5 months ago

iglosiggio commented 5 months ago
image := PowertalkRingImage fromSpec
  wordSize: 8;
  genesis;
  bootstrap;
  fillClasses;
  fillSymbols.
bootstrapper := image generateLMR.
bootstrapper useHostModuleLoader.
runtime := bootstrapper result.

str1 := (runtime newString: '').
strClass := runtime sendLocal: #class to: str1.
str2 := runtime sendLocal: #new to: strClass.

If I try to inspect str2 my image ends up freezing.

This kind of instance is created by CharacterArray>>replaceAll:with:. https://github.com/powerlang/egg/blob/faec18e724f67d062ff0dfae0003e077c170b15e/modules/Kernel/CharacterArray.st#L504

iglosiggio commented 5 months ago

This was my fault due to some changes I did on LMRObject (an implementation of asLocalString)