VM integer return values
Eric Scharff
Eric.Scharff at Colorado.EDU
Wed Oct 10 02:43:10 UTC 2001
(I think I asked this question before, but I don't think anyone
responded. Sorry if I missed it.)
First of all, I finally successfully built a Mac VM using VMMaker complete
with AppleScript and OpenGL support. I'm happy! Thanks for a great tool!
Are there still badges around? :) (Still need to work on building a
Carbon VM, though.)
Anyway, during that build I noticed as I do during every build - there are
lots of generated C files that declare int return types, but they don't
actually return anything.
There seems to be a distinction between primitive return types (a return
object pushed on to the stack) and the C (integer) return type (which
seems to be ignored.) Is this correct?
If so, how difficult would it be to change the C code generator to emit
functions that return void? This would eliminate the warning messages,
and a smart compiler could potentially be a tiny bit faster (because it
doesn't have to generate a function return value).
If not, wouldn't it be a good idea to emit "return 0;" statements or
something else meaningful?
What are the semantics of the return values in C generated code?
-Eric
More information about the Squeak-dev
mailing list
|