[BUG] TestInterpreterPlugin
Stephan Rudlof
sr at evolgo.de
Sat Dec 11 00:51:53 UTC 1999
"Andrew C. Greenberg" wrote:
>
> >primLargeIntegerSumB: x with: y
> > self
> > primitive: 'primLargeIntegerSumB'
> > parameters: #(SmallInteger SmallInteger )
> > receiver: #Oop.
> > ^ x + y
>
> This code, however pretty, will blow up big time! The result of the
> return value will be coerced to an integer and returned to the VM.
> That integer will be treated as an oop.
>
> The code generated from the return will give squeak an **oop
> pointer** equal to the sum of the two integers. This is almost
> certainly not the intent of the programmer.
Its worse than blowing up computation time, it leads to segmentation
faults...
Greetings,
Stephan
--
Stephan Rudlof (sr at evolgo.de)
"Genius doesn't work on an assembly line basis.
You can't simply say, 'Today I will be brilliant.'"
-- Kirk, "The Ultimate Computer", stardate 4731.3
More information about the Squeak-dev
mailing list
|