Anonymous | Login | 03-02-2021 02:50 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0007229 | [Squeak] VM | tweak | always | 11-19-08 23:27 | 01-09-11 23:01 | |||||||
Reporter | mikevdg | View Status | public | |||||||||
Assigned To | lewis | |||||||||||
Priority | normal | Resolution | open | |||||||||
Status | assigned | Product Version | 3.10.2 | |||||||||
Summary | 0007229: Remove optimisation for >>class | |||||||||||
Description |
The VM uses bytecode 199 to send >>class; the implementation is optimised to not do a message send but to return the class directly. In some cases such as using message catchers (i.e. the trick where you override >>doesNotUnderstand on a ProtoObject subclass), this is undesired behaviour. The optimisation prevents the user from being able to override the behaviour of >>class. (code below from Eliot Miranda) To fix this change bytecodePrimClass | rcvr | rcvr := self internalStackTop. self internalPop: 1 thenPush: (self fetchClassOf: rcvr). self fetchNextBytecode. to bytecodePrimClass messageSelector := self specialSelector: 23. argumentCount := 0. self normalSend. |
|||||||||||
Additional Information | ||||||||||||
Attached Files | ||||||||||||
|
There are no notes attached to this issue. |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
34 total queries executed. 28 unique queries executed. |