Serious problems with Pragma's

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Serious problems with Pragma's

John O'Keefe-3
This was an interesting problem to track down and the answer ended up not being in the packager at all.

The attached zip file contains 3 fileins. The effect of applying the fileins is to change the way Pragmas are stored in CompiledMethods. 

The old way of handling Pragmas was to store an Association (##EsPragmas -> #( pragma1 pragma2 etc. ) as a literal in the CompiledMethod. This caused problems both with storing the method in the manager (the Association was always ##EsPragmas -> (nil) when a method with Pragmas was retrieved from the manager!!) and with packaging. The Association was not really needed -- there is a flag on the CompiledMethod that serves the same purpose (see CompiledMethod>>#hasPragmas) -- it was a leftover from our early experimental Pragma implementation (before there was a flag on CompiledMethod).

The change is to never create the Association, but simply store the Array containing the Pragmas as the last literal. The code that retrieves Pragmas (see CompiledMethod>>#pragmas) will handle an Association if it finds one, but since Associations are no longer being created and any methods with Pragmas that is stored in the manager has nil for its stored Pragmas, this is just a bit of a safety net that will probably never get exercised except in my testcases.
 
Fix will be in V8.5.1.
 
John

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/va-smalltalk/-/ARqLl8Ssh-sJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.

case48916.zip (2K) Download Attachment
12