I discussed this on the Borland forum[*] and it was confirmed as an
optimizer bug.

I guess that Ocean and the bccwin team are wondering why they haven't
seen this problem.  The reason is ...

Command line option /v (lower case) embeds debugging information in
the object file __and__ arranges inline functions to be function calls.
The default for this option in bcc55 is ON -- therefore, the CLASS_OF
and TYPE (and other?) macros each result in function calls.

I don't need debugging info because there aren't any bugs in Ruby ;-)
As a bonus for setting /v- , all inline code is, actually, inline.

Like most people, I prefer slower code to segfaults, so I'll have to
revert to the default option, for now.  However, I think that this
option should be OFF for bccwin Ruby builds and that a workaround
should be chosen for the SEGV (many are available).

I'll let Ocean, or someone else, decide on that when they've noticed
the speed increase after removing their overheads.


daz
-- 
JARH (Nihon-style) ... not as simple as you might think.
http://qurl.net/h3 (babelfish)
http://qurl.net/h7 (excite jp)


[*] (not recommended reading)
http://groups.google.com/groups?threadm=42aa5aa9$1 / newsgroups.borland.com