[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

why push self bytecode?



Just a silly thought:

Why is there a "push self" bytecode instead of "self send X"  with
literal X="self"? I can see it would make programs a little larger
to have the extra literals, but would there be any other problems?
The compiler would take care of the "self send X"  with the rest
of the argument slots, right?

Another thing - I can see that the omission of "POP" bytecodes at
the end of a statement ( at the "." ) will make code smaller and
the instruction set simpler. The lost information is generated again
by the compiler at data flow analysis time. It does make a Self
interpreter or very simple compiler work harder.

Actually, I really like the bytecodes the way they now. It's just
that it is interesting to know why things were designed the way
they were.

- Jecel Assumpcao Jr
  University of Sao Paulo - Brazil