[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: StepTalk patch: argument bytecode sign bug fix, optimization literal
Re: StepTalk patch: argument bytecode sign bug fix, optimization literals, stack overflow fix
Thu, 27 May 2004 22:02:20 +0200
On 2004-05-26 16:01:23 +0200 Mateu Batle <address@hidden> wrote:
Hi everybody !
I have submitted a patch to savannah web, which fixes following bugs:
- Fixed bug with signed/unsigned bytecode, which made StepTalk to crash if
has more than 127 literals in the array.
- Possible problem of stack overflow, returned object are never pop from
stack if nobody uses them. Please check this fix.
Can you send me an example code that shows this bug?
- Optimization: literal array usage, don't create a new entry if already
I am not sure that this is good idea. Literals are created as mutable objects
to maintain smalltalk compatibility. If you had two equal array literals and
added an objectv to one, you will have that object in the other array where you
thought that it was the same as before.
Some comments also:
- bytecodes seem to be 1 byte long for each, operation and two arguments (max
I think it may fall short in some cases, for example for the literals table
index. This is the
reason of the optimization submitted in the patch, before all literals where
to the array without checking if they could be reused.
Bytecodes can be extended to any width, there is no problem with that. Or ...
they can be removed and replaced by direct statement tree.
- In STBytecode bytecode code and arguments are defined as short, but they
are always 1 byte.
It does not matter that much, but it can be confusing.
Better would be to ged rid of btecodes in StepTalk.
First they ignore you, then they laugh at you, then they fight you, then you
- Mahatma Gandhi