Hello All,
-- We have received a few questions about the loading behavior of imported user code into the Beta builds. There is some non-obvious stuff going on so I would like to give some background on how the Envy/Manager is involved when you are loading code or compiling code from the smalltalk source code. First, I'll provide one of the symptoms in case you have seen it before. It goes something like this: 1. I exported some code from my main ENVY/Manager (.dat) 2. I imported the code into the Beta ENVY/Manager 3. The code loads in the 32-bit beta image (albeit, maybe some unmanaged namespace Transcript entries) 4. The code does NOT load in the 64-bit beta image (compiler errors). 5. Why? The reason has to do with, what is probably on the top of my list as most-hated-feature, the fact that the result of smalltalk source compilation (i.e. bytecodes) is stored in the ENVY/Manager your image is attached to. Since there have been multiple versions of bytecodes over the history of VAST...it is stored in the ENVY/Manager by the bytecode version level of your image (and other info like method timestamp and other details). When you load code into your image, your image is making a request of the ENVY/Manager. You might intuitively guess that this request is for the smalltalk source code, which your image would then compile into smalltalk bytecodes and create a resulting CompiledMethod. But this isn't true...at least not always. What actually happens is:
What's the advantage of this?
What's the disadvantage of this?
What to do? There is a section in the "Preferences Workspace" (Transcript Menu -> Tools -> Open Preferences Workspace) called "Configuration Management". In this section, you will see some options to instruct the image what to do in various situations involving the loading of code. One of the options is called "EmMethodEdition useLinker: <true|false>" By default, this option is true meaning it will link cached bytecodes from the ENVY/Manager, if it exists. But if you set it to false, then loading a method will always involve compiling the source code. At the very least, I would recommend turning the linker off and taking a look at how your application loads...and if it can load clean in a given environment. -- Seth You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hello All,
-- John O'Keefe reminded me of how this business with "bytecodes stored in ENVY" played a role historically (or maybe for some folks...currently). I'm still not a fan, but at least for me this explanation moves the concept from my mental category of "nonsense" to "acceptable". I do wish it was not part of the normal everyday workflow with ENVY, and rather a cleanly separated feature, but it does make sense. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ From John -- "Here is the most important reason bytecodes are stored (historically) in ENVY. It provides support for methods with hidden source. Back in the 'good old days', much of the base Smalltalk code from OTI (probably all the private methods and maybe even some of the public methods) was shipped with hidden source. Also, many third-party add-on products shipped with hidden source -- we have gotten some cases over the years because of this. None of the VA Smalltalk code contains hidden source anymore, but the add-on products with hidden source are still out there." ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- So similar to 3rd party commercial dlls that don't come with the source code, this capability allows VA Smalltalk applications to be distributed in a similar manner...without their source code....but still executable. Thank you John -- Seth On Monday, July 31, 2017 at 1:42:05 PM UTC-4, Seth Berman wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hidden source code is a nuisance, but hidden source code with bugs in it is a major PITA. I went so far as to write a VAST bytecode decompiler to reverse engineer TOPLink code that was behaving wrong. Not nice, but it allows us to continue working with a long-unmaintained product. I still remember when I first used Smalltalk-80 and was blown away by its openness regarding source code, and when I was first exposed to ENVY it was quite a shock to see that OTI hid so much of their code that fixing or extending it was basically impossible.
-- Hans-Martin You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |