Folks -
I have a closure version for the trunk that's ready for testing. Since converting an image to closures is tricky I would like a couple of people to give it a test run before I push it for real. I am interested in both positive feedback ("works for me") as well as negative feedback ("crashes, hangs, core-dumps when trying to load x,y,z") in particular if you use custom 3.10[.2] based images. In order to test the load process you need to: 1) Get a closure-enabled VM from: http://squeakvm.org/win32/release/SqueakVM-Win32-3.11.3-bin.zip (win) ftp://ftp.smalltalkconsulting.com/Squeak%204.1.1beta2U.app.zip (mac) 2) A 3.10-based image. I used 3.10.2 but any 3.10-based image should work. Make really, *really* sure you launch this image with the closure-enabled VM or you *will* die along the way. 3) The updated MonticelloConfigurations package from http://source.squeak.org/trunk (if you are a trunk user already you can skip this step) 4) Run the following doIt: MCMcmUpdater updateFromRepositories: #( 'http://source.squeak.org/trunk' 'http://squeaksource.com/MCUpdateTest' ). When you run the above doIt, the following will happen: * First, you will load the updates from the trunk to make sure you're as close as reasonably possible to a uniform starting point. * Then you will load Eliot's closure code in carefully crafted form as to not screw up in the middle. * At the end the entire system will be recompiled using closures. When all of it is complete, you are already running with real closures. Test it by opening a workspace and running our good old friend fib(n): fib := [:n| n < 2 ifTrue:[1] ifFalse:[(fib value:n-1) + (fib value:n-2)]]. fib value: 10. There is then only one step left. In order to expunge any leftover contexts, do the following: * Close all open SystemWindows (browsers, monticello, filelist etc). * Hit Alt-Period and terminate the resulting notifier (this is to get rid of the Morphic UI process that holds onto contexts) * Destroy all shared global flaps (World Menu >> Flaps >> Destroy all shared flaps) * Open a new workspace, execute "Utilities postRecompileCleanup" If everything is in order, you will be congratulated that the bootstrap is complete. If not, you will end up with inspectors on any left-over contexts and unbound methods and you will have to to figure out how to get rid of them (but feel free to ask here; someone might have an idea). Thanks for your help and let me know if the load process works for you! Cheers, - Andreas |
Hi Andreas,
here's my report... as brief as it can possibly get: ** It works! ** :-) I used the Mac VM on a MacBook Pro, and started with a 3.10.2 image fresh from the server. Thanks, Andreas. Best, Michael |
In reply to this post by Andreas.Raab
On Wed, Jul 15, 2009 at 11:28:34PM -0700, Andreas Raab wrote:
> Folks - > > I have a closure version for the trunk that's ready for testing. Since > converting an image to closures is tricky I would like a couple of > people to give it a test run before I push it for real. I am interested > in both positive feedback ("works for me") as well as negative feedback > ("crashes, hangs, core-dumps when trying to load x,y,z") in particular > if you use custom 3.10[.2] based images. I seem to be getting stuck on the final recompile, see attached world.png. This is 64-bit Linux, homebrew VM from latest VMMaker but platform sources at Subversion 1985 (somewhat out of date). Perhaps someone can try one of Bryce's 32-bit Linux VMs, which are known to work with Pharo images. Unfortunately I'm just leaving on a tight schedule, and will have limited or no internet access for a few days. Apologies for the hasty response. Dave world.png (79K) Download Attachment |
In reply to this post by Andreas.Raab
On Thu, Jul 16, 2009 at 5:28 AM, Andreas Raab <[hidden email]> wrote: Folks - I am on Linux. In Pharo we have to use Exupery VM because it was compiled with Closure changes and Standard VM doesn't. If someone makes a binary of Linux I can give it a try. best, Mariano |
SqueakVM-Win32-3.11.3-bin.zip
Squeak3.10-7159-basic.image SqueakV39.sources All updates applied according to the given protocol. fib := [:n| n < 2 ifTrue:[1] ifFalse:[(fib value:n-1) + (fib value:n-2)]]. fib value: 10. 89 Slight problem here... /* wxMaxima 0.8.0 (%i1) fib(10); (%o1) 55 Ian. |
Ian Trudel wrote:
> SqueakVM-Win32-3.11.3-bin.zip > Squeak3.10-7159-basic.image > SqueakV39.sources > > All updates applied according to the given protocol. > > fib := [:n| n < 2 ifTrue:[1] ifFalse:[(fib value:n-1) + (fib value:n-2)]]. > fib value: 10. > > 89 > > Slight problem here... > > /* wxMaxima 0.8.0 > > (%i1) fib(10); > (%o1) 55 > > Ian. > > 5, ...? I've seen the Fibonacci sequence defined both this way and as the sequence Andreas uses. frank |
2009/7/16 Frank Shearar <[hidden email]>:
> The next fib is 89, so perhaps wxMaxima uses the sequence 0, 1, 1, 2, 3, 5, > ...? I've seen the Fibonacci sequence defined both this way and as the > sequence Andreas uses. > > frank Perhaps it's not important anyway. I'm just reporting what it gave me. Wikipedia has a page on Fibonacci and f(10) is 55 according to the article. http://en.wikipedia.org/wiki/Fibonacci_number#List_of_Fibonacci_numbers Ian. -- http://mecenia.blogspot.com/ |
In reply to this post by David T. Lewis
David T. Lewis wrote:
> I seem to be getting stuck on the final recompile, see attached world.png. > > This is 64-bit Linux, homebrew VM from latest VMMaker but platform sources > at Subversion 1985 (somewhat out of date). Perhaps someone can try one of > Bryce's 32-bit Linux VMs, which are known to work with Pharo images. > > Unfortunately I'm just leaving on a tight schedule, and will have limited > or no internet access for a few days. Apologies for the hasty response. To the contrary, thanks for letting me know on short notice ;-) Is there anyone out there who could give this a shot on a 32bit Linux to find out whether this is an issue with 64bit or the loading process? Thanks, - Andreas |
In reply to this post by Ian Trudel-2
On Thu, 2009-07-16 at 10:23 -0400, Ian Trudel wrote:
> SqueakVM-Win32-3.11.3-bin.zip > Squeak3.10-7159-basic.image > SqueakV39.sources > > All updates applied according to the given protocol. > > fib := [:n| n < 2 ifTrue:[1] ifFalse:[(fib value:n-1) + (fib value:n-2)]]. > fib value: 10. > > 89 > > Slight problem here... > > /* wxMaxima 0.8.0 > > (%i1) fib(10); > (%o1) 55 > > Ian. will get the same result in any Smalltalk implementation. It defines the fib value: 0 as 1 and not 0 so as a result the implementation is off by one step at every point. Ken signature.asc (196 bytes) Download Attachment |
On Thu, 2009-07-16 at 11:59 -0500, Ken Causey wrote:
> On Thu, 2009-07-16 at 10:23 -0400, Ian Trudel wrote: > > SqueakVM-Win32-3.11.3-bin.zip > > Squeak3.10-7159-basic.image > > SqueakV39.sources > > > > All updates applied according to the given protocol. > > > > fib := [:n| n < 2 ifTrue:[1] ifFalse:[(fib value:n-1) + (fib value:n-2)]]. > > fib value: 10. > > > > 89 > > > > Slight problem here... > > > > /* wxMaxima 0.8.0 > > > > (%i1) fib(10); > > (%o1) 55 > > > > Ian. > > The problem here is the fib implementation and not closure support, you > will get the same result in any Smalltalk implementation. It defines > the fib value: 0 as 1 and not 0 so as a result the implementation is off > by one step at every point. > > Ken need some work as this implementation comes from Andreas' original email. I'm not sure his point with this example other than that if it does not fail catastrophically, then it is a success. Ken P.S. I am currently testing the closure stuff on 32-bit linux using a Bryce VM from http://ftp.squeak.org/Exupery/vms/exupery-vm-0.15.1-linux.tz and will report back. signature.asc (196 bytes) Download Attachment |
On Thu, 2009-07-16 at 12:33 -0500, Ken Causey wrote:
> On Thu, 2009-07-16 at 11:59 -0500, Ken Causey wrote: > > On Thu, 2009-07-16 at 10:23 -0400, Ian Trudel wrote: > > > SqueakVM-Win32-3.11.3-bin.zip > > > Squeak3.10-7159-basic.image > > > SqueakV39.sources > > > > > > All updates applied according to the given protocol. > > > > > > fib := [:n| n < 2 ifTrue:[1] ifFalse:[(fib value:n-1) + (fib value:n-2)]]. > > > fib value: 10. > > > > > > 89 > > > > > > Slight problem here... > > > > > > /* wxMaxima 0.8.0 > > > > > > (%i1) fib(10); > > > (%o1) 55 > > > > > > Ian. > > > > The problem here is the fib implementation and not closure support, you > > will get the same result in any Smalltalk implementation. It defines > > the fib value: 0 as 1 and not 0 so as a result the implementation is off > > by one step at every point. > > > > Ken > > It was pointed out to me that it is my reading comprehension skills that > need some work as this implementation comes from Andreas' original > email. I'm not sure his point with this example other than that if it > does not fail catastrophically, then it is a success. > > Ken > > P.S. I am currently testing the closure stuff on 32-bit linux using a > Bryce VM from > > http://ftp.squeak.org/Exupery/vms/exupery-vm-0.15.1-linux.tz > > and will report back. I really should not reply to an email without waiting a few hours for the information to sink in. Clearly this example is testing something (which I admit I don't quite get) that fails without proper closure support. At any rate I can now report success on 32-bit Linux using the above VM and following the directions in Andreas' original email up to the point of testing the fib implementation and getting the 'correct' answer of 89. I guess I'll run tests and anything else I can think of next. Ken signature.asc (196 bytes) Download Attachment |
In reply to this post by Ken Causey-3
So I decided I would try to run all the tests and almost immediately I
got a debugger. This is with an image built using the directions running on 32-bit linux with exupery 0.15.1 VM. The failure seems to be in the setup of TraitsResource Ken SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/ken/projects/squeak/ncdm Trusted Dir /home/ken/projects/squeak/ncdm/secure Untrusted Dir /home/ken/projects/squeak/ncdm/My Squeak ClassTrait(Object)>>doesNotUnderstand: #variablesAndOffsetsDo: Receiver: T2 classTrait Arguments and temporary variables: aMessage: variablesAndOffsetsDo: [closure] in EncoderForV3PlusClosures(Encoder)...etc... Receiver's instance variables: methodDict: a MethodDictionary() traitComposition: {} localSelectors: nil users: an IdentitySet() organization: nil baseTrait: T2 EncoderForV3PlusClosures(Encoder)>>init:context:notifying: Receiver: {an EncoderForV3PlusClosures} Arguments and temporary variables: aClass: T2 classTrait aContext: nil req: a Parser homeNode: nil Receiver's instance variables: comment: nil pc: nil scopeTable: a Dictionary('false'->{false} 'nil'->{nil} 'self'->{self} 'super'->...etc... nTemps: 0 supered: false requestor: a Parser class: T2 classTrait selector: nil literalStream: a WriteStream #() selectorSet: a Dictionary(#*->{*} #+->{+} #-->{-} #/->{/} #'//'->{//} #<->{<} #...etc... litIndSet: a Dictionary() litSet: a LiteralDictionary(-1->{-1} 0->{0} 1->{1} 2->{2} ) sourceRanges: nil globalSourceRanges: nil stream: nil position: nil rootNode: nil blockExtentsToLocals: nil [] in Parser>>parse:class:category:noPattern:context:notifying:ifFail: Receiver: a Parser Arguments and temporary variables: <<error during printing> Receiver's instance variables: source: a ReadStream 'm2ClassSide: a ^a' mark: 14 hereChar: Character space aheadChar: $^ token: 'a' tokenType: #word currentComment: nil buffer: a WriteStream 'a' typeTable: #(#xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xBinary #xB...etc... here: 'm2ClassSide:' hereType: #keyword hereMark: 1 hereEnd: 12 prevMark: 1 prevEnd: nil encoder: {an EncoderForV3PlusClosures} requestor: nil parseNode: nil failBlock: [closure] in Compiler>>translate:noPattern:ifFail: requestorOffset: 0 tempsMark: nil doitFlag: false properties: nil category: #'as yet unclassified' BlockClosure>>on:do: Receiver: [closure] in Parser>>parse:class:category:noPattern:context:notifying:ifFail: Arguments and temporary variables: exception: ReparseAfterSourceEditing handlerAction: [closure] in Parser>>parse:class:category:noPattern:context:noti...etc... handlerActive: true Receiver's instance variables: outerContext: Parser>>parse:class:category:noPattern:context:notifying:ifFail: startpc: 131 numArgs: 0 --- The full stack --- ClassTrait(Object)>>doesNotUnderstand: #variablesAndOffsetsDo: EncoderForV3PlusClosures(Encoder)>>init:context:notifying: [] in Parser>>parse:class:category:noPattern:context:notifying:ifFail: BlockClosure>>on:do: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Parser>>parse:class:category:noPattern:context:notifying:ifFail: Compiler>>translate:noPattern:ifFail: Compiler>>compile:in:classified:notifying:ifFail: ClassTrait(TraitBehavior)>>compile:classified:notifying:trailer:ifFail: ClassTrait(TraitDescription)>>compile:classified:withStamp:notifying:logSource: ClassTrait>>compile:classified:withStamp:notifying:logSource: ClassTrait(TraitDescription)>>compile:classified:withStamp:notifying: ClassTrait(TraitDescription)>>compile:classified:notifying: ClassTrait(TraitDescription)>>compile:notifying: ClassTrait(TraitBehavior)>>compile: [] in TraitsResource>>setUp [] in SystemChangeNotifier>>doSilently: BlockClosure>>ensure: SystemChangeNotifier>>doSilently: TraitsResource>>setUp TraitsResource(TestResource)>>initialize TraitsResource class(Behavior)>>new TraitsResource class(TestResource class)>>current TraitsResource class(TestResource class)>>isAvailable [] in TestRunner>>basicSetUpSuite: Set>>do: TestRunner>>basicSetUpSuite: TestRunner>>basicRunSuite:do: TestRunner>>runSuite: TestRunner>>runAll PluggableButtonMorphPlus(PluggableButtonMorph)>>performAction PluggableButtonMorphPlus>>performAction [] in PluggableButtonMorphPlus(PluggableButtonMorph)>>mouseUp: ...etc... signature.asc (196 bytes) Download Attachment |
Ken asked me to run all tests and see how it turns out. I get the same
results as he does... Ian. -- http://mecenia.blogspot.com/ SqueakDebug.log (5K) Download Attachment |
In reply to this post by Ken Causey-3
So I disabled all the Traits tests and tried to run the rest. At some
point (sorry I was not watching closely) the image crashed. Again this is on 32bit linux, exupery vm 0.15.1. Segmentation fault 2031394508 UUID>initialize 2031394392 Behavior>new: 2031394300 >new 2031394208 >setTimeStamp 2031394116 >updateInstances 2031390300 >setMenuFontTo: 2031389864 >smallLandTinyFonts 2030853700 SequenceableCollection>do: 2030853608 >smallLandTinyFonts 2030853516 >smallLandFonts 2030853424 >displaySizeChanged 2030853332 Preference>notifyInformeeOfChange 2030853240 Preference>preferenceValue: 2030853148 >enable: 2030853056 LangEnvBugs>testIsFontAvailable 2030852964 TestCase>performTest 2030852872 TestCase>runCase 2030852780 BlockClosure>ensure: 2030852648 TestCase>runCase 2030852556 TestResult>runCase: 2030852436 BlockClosure>on:do: 2030852292 TestResult>runCase: 2030852200 BlockClosure>on:do: 2030852072 TestResult>runCase: 2030851980 TestCase>run: 2030851888 TestRunner>runTest: 2030851796 TestRunner>runSuite: 2030851704 SequenceableCollection>do:displayingProgress: 2027368244 SequenceableCollection>withIndexDo: 2027368124 SequenceableCollection>do:displayingProgress: 2027367888 ProgressInitiationException>defaultMorphicAction 2027367796 BlockClosure>on:do: 2027367704 ProgressInitiationException>defaultMorphicAction 2027367612 BlockClosure>ensure: 2027362736 ProgressInitiationException>defaultMorphicAction 2027362644 ProgressInitiationException>defaultAction 2027362552 UndefinedObject>handleSignal: 2027362460 ContextPart>handleSignal: 2027362368 Exception>signal 2027362228 ProgressInitiationException>display:at:from:to:during: 2027362136 >display:at:from:to:during: 2027362020 String>displayProgressAt:from:to:during: 2027361844 SequenceableCollection>do:displayingProgress: 2027361752 TestRunner>basicRunSuite:do: 2027361660 BlockClosure>ensure: 2027361484 TestRunner>basicRunSuite:do: 2027361380 TestRunner>runSuite: 2027309596 TestRunner>runAll 2027309504 PluggableButtonMorph>performAction 2027309412 PluggableButtonMorphPlus>performAction 2027309296 PluggableButtonMorph>mouseUp: 2027309204 SequenceableCollection>do: 2027309112 PluggableButtonMorph>mouseUp: 2027308980 PluggableButtonMorphPlus>mouseUp: 2027308888 Morph>handleMouseUp: 2027308796 MouseButtonEvent>sentTo: 2027308704 Morph>handleEvent: 2027308612 Morph>handleFocusEvent: 2027308432 HandMorph>sendFocusEvent:to:clear: 2027308340 PasteUpMorph>becomeActiveDuring: 2027308248 BlockClosure>on:do: 2027308156 PasteUpMorph>becomeActiveDuring: 2027308036 HandMorph>sendFocusEvent:to:clear: 2027307944 HandMorph>sendEvent:focus:clear: 2027307852 HandMorph>sendMouseEvent: 2027307708 HandMorph>handleEvent: 2027307524 HandMorph>processEvents 2027307408 WorldState>doOneCycleNowFor: 2027307316 SequenceableCollection>do: 2027307216 WorldState>handsDo: 2027307124 WorldState>doOneCycleNowFor: 2027307032 WorldState>doOneCycleFor: 2027306940 PasteUpMorph>doOneCycle 2027162812 >spawnNewProcess 2027162688 BlockClosure>newProcess signature.asc (196 bytes) Download Attachment |
This is a known bug in Pharo: http://code.google.com/p/pharo/issues/detail?id=855
1) Download new exupery-0.15.1 from here: http://gforge.inria.fr/frs/download.php/22421/pharo-vm-0.15.1b-linux.zip (it was removed the UUID plugin) 2) Find the UUIDPlugin folder and rename the _folder_ to something like UUIDPlugin-not-used and all should be well. At least in Pharo this was only reported onn Ubuntu 9.04. Best, Mariano On Thu, Jul 16, 2009 at 5:24 PM, Ken Causey <[hidden email]> wrote: So I disabled all the Traits tests and tried to run the rest. At some |
In reply to this post by Ken Causey-3
On Jul 16, 2009, at 1:24 PM, Ken Causey wrote: > So I disabled all the Traits tests and tried to run the rest. At some > point (sorry I was not watching closely) the image crashed. Again > this > is on 32bit linux, exupery vm 0.15.1. With traits tests disabled, all tests run to completion on my Mac PPC (G3) VM 4.11b2, image 3.10.2-7179-basic. 2201 run, 2146 passes, 0 expected failures, 8 failures, 47 errors, 0 unexpected passes failures: BlockContextTest>>#testValueWithArguments ClosureCompilerTest>>#testDebuggerTempAccess ClosureCompilerTest>>#testInjectIntoDecompilations DebuggerUnwindBug>>#testUnwindDebuggerWithStep MCChangeNotificationTest>>#testCoreMethodModified MethodPragmaTest>>#testReformat ReleaseTest>>#testUndeclared TimeTest>>#testGeneralInquiries HTH Tim |
In reply to this post by Ken Causey-3
So someone needs to implement variablesAndOffsetsDo: for TraitBehavior analogous to Behavior>> variablesAndOffsetsDo:.
variablesAndOffsetsDo: is the interface I added between the compiler and the class its compiling in to abstract away from instance variable/slot implementation. See Encoder>>init:context:notifying:
... class variablesAndOffsetsDo: [:variable "<String|CFieldDefinition>" :offset "<Integer|nil>" |
offset isNil ifTrue: [scopeTable at: variable name put: (FieldNode new fieldDefinition: variable)]
ifFalse: [scopeTable at: variable put: (offset >= 0
ifTrue: [InstanceVariableNode new name: variable index: offset]
ifFalse: [MaybeContextInstanceVariableNode new name: variable index: offset negated])]].
... FieldNode is the Tweak compiler extension that compiles Tweak property access as message sends to slot accessors. The negative offset hack allows ContextPart (actually InstructionStream and subclasses) to access its instance variables specially, allowing the VM to hide context-to-sack mapping and make contexts appear like normal objects even though inside the VM they may actually be proxies for stack frames.
Quickly looking at the 3.9 final image I'd say that you'd do the following copies: Behavior variablesAndOffsetsDo: => TraitBehavior Behavior instVarNamesAndOffsetsDo: -> TraitBehavior
ClassDescription instVarNamesAndOffsetsDo: -> TraitDescription and then things have a good chance of working. Eliot
On Thu, Jul 16, 2009 at 10:47 AM, Ken Causey <[hidden email]> wrote: So I decided I would try to run all the tests and almost immediately I |
In reply to this post by Mariano Martinez Peck
On Thu, 2009-07-16 at 17:30 -0100, Mariano Martinez Peck wrote:
> This is a known bug in Pharo: > http://code.google.com/p/pharo/issues/detail?id=855 > > 1) Download new exupery-0.15.1 from here: > http://gforge.inria.fr/frs/download.php/22421/pharo-vm-0.15.1b-linux.zip > > (it was removed the UUID plugin) > > 2) Find the UUIDPlugin folder and rename the _folder_ to something > like UUIDPlugin-not-used and all should be well. > > At least in Pharo this was only reported onn Ubuntu 9.04. > > Best, > > Mariano 0.15.1 linux 32bit) but moved the UUIDPlugin much as you directed. As a result the tests (with the exceptions of the Traits tests) seem to have run without catastrophic failure. 2194 run, 2138 passes, 0 expected failures, 7 failures, 49 errors, 0 unexpected passes BlockContextTest>>#testValueWithArguments ClosureCompilerTest>>#testDebuggerTempAccess ClosureCompilerTest>>#testInjectIntoDecompilations DebuggerUnwindBug>>#testUnwindDebuggerWithStep MCPackageTest>>#testUnload MethodPragmaTest>>#testReformat ReleaseTest>>#testUndeclared signature.asc (196 bytes) Download Attachment |
SqueakVM-Win32-3.11.3-bin.zip
Squeak3.10-7159-basic.image SqueakV39.sources Ran all tests except Traits. 2201 run, 2147 passes, 0 expected failures, 7 failures, 47 errors, 0 unexpected passes failures: an Array(BlockContextTest>>#testValueWithArguments ClosureCompilerTest>>#testDebuggerTempAccess ClosureCompilerTest>>#testInjectIntoDecompilations DebuggerUnwindBug>>#testUnwindDebuggerWithStep MCChangeNotificationTest>>#testCoreMethodModified MethodPragmaTest>>#testReformat ReleaseTest>>#testUndeclared) errors: an Array(BlockClosureTest>>#testComparing BlockClosureTest>>#testComparingEqual BlockClosureTest>>#testHasLiteral BlockContextTest>>#testBlockIsBottomContext BlockContextTest>>#testCopyStack BlockContextTest>>#testFindContextSuchThat BlockContextTest>>#testSetUp BlockContextTest>>#testSupplyAnswerOfFillInTheBlank BlockContextTest>>#testSupplyAnswerOfFillInTheBlankUsingDefaultAnswer BlockContextTest>>#testSupplyAnswerThroughNestedBlocks BlockContextTest>>#testSupplyAnswerUsingOnlySubstringOfQuestion BlockContextTest>>#testSupplyAnswerUsingTraditionalMatchOfQuestion BlockContextTest>>#testSupplySameAnswerToAllQuestions BlockContextTest>>#testSupplySeveralAnswersToSeveralQuestions BlockContextTest>>#testSupplySpecificAnswerToQuestion BlockContextTest>>#testSuppressInform BlockContextTest>>#testSuppressInformUsingStringMatchOptions BlockContextTest>>#testTallyMethods BlockContextTest>>#testTrace BlockContextTest>>#testValueWithExitBreak BlockContextTest>>#testValueWithExitContinue ClosureCompilerTest>>#testInjectIntoDecompiledDebugs ClosureCompilerTest>>#testSourceRangeAccessForBlueBookInjectInto ClosureCompilerTest>>#testSourceRangeAccessForBlueBookLongFormInjectInto ClosureCompilerTest>>#testSourceRangeAccessForClosureBytecodeInjectInto ClosureCompilerTest>>#testSourceRangeAccessForClosureLongFormBytecodeInjectInto ClosureCompilerTest>>#testSourceRangeAccessForInjectInto MethodContextTest>>#testSetUp PCCByCompilationTest>>#testChangeFailedCallSucceedingDisable PCCByCompilationTest>>#testDisableCallsIntoModule PCCByCompilationTest>>#testDisableCallsIntoModuleForClasses PCCByCompilationTest>>#testEnableCallsIntoModuleForClasses PCCByCompilationTest>>#testEnableDisableCallIn PCCByCompilationTest>>#testEnableDisableCallInCompiledMethod PCCByCompilationTest>>#testEnableDisableCallInMethodClass PCCByCompilationTest>>#testExistsCallIn PCCByCompilationTest>>#testExistsDisabledCallIn PCCByCompilationTest>>#testMethodsWithCallIntoModuleForClass PCCByCompilationTest>>#testMethodsWithCallIntoModuleForClasses PCCByCompilationTest>>#testMethodsWithDisabledCallIntoModuleForClass PCCByCompilationTest>>#testMethodsWithDisabledCallIntoModuleForClasses PCCByCompilationTest>>#testSwitchPrimCallOffOn PCCByCompilationTest>>#testSwitchStored PCCByCompilationTest>>#testTryCaches ST80MenusTest>>#testSupplyAnswerOfFillInTheBlank ST80MenusTest>>#testSupplySpecificAnswerToQuestion ST80MenusTest>>#testSuppressInform) -- http://mecenia.blogspot.com/ |
In reply to this post by Eliot Miranda-2
What '3.9 final image' are you referring to? I see none of these
methods in 3.9-7067. Why are we talking about 3.9 anyway? Ken On Thu, 2009-07-16 at 12:31 -0700, Eliot Miranda wrote: > So someone needs to implement variablesAndOffsetsDo: for TraitBehavior > analogous to Behavior>> variablesAndOffsetsDo:. > variablesAndOffsetsDo: is the interface I added between the compiler > and the class its compiling in to abstract away from instance > variable/slot implementation. See Encoder>>init:context:notifying: > ... > class variablesAndOffsetsDo: > [:variable "<String|CFieldDefinition>" :offset "<Integer|nil>" | > offset isNil > ifTrue: [scopeTable at: variable name put: (FieldNode new > fieldDefinition: variable)] > ifFalse: [scopeTable > at: variable > put: (offset >= 0 > ifTrue: [InstanceVariableNode new > name: variable index: offset] > ifFalse: [MaybeContextInstanceVariableNode new > name: variable index: offset negated])]]. > ... > > > FieldNode is the Tweak compiler extension that compiles Tweak property > access as message sends to slot accessors. The negative offset hack > allows ContextPart (actually InstructionStream and subclasses) to > access its instance variables specially, allowing the VM to hide > context-to-sack mapping and make contexts appear like normal objects > even though inside the VM they may actually be proxies for stack > frames. > > > Quickly looking at the 3.9 final image I'd say that you'd do the > following copies: > Behavior variablesAndOffsetsDo: => TraitBehavior > Behavior instVarNamesAndOffsetsDo: -> TraitBehavior > ClassDescription instVarNamesAndOffsetsDo: -> TraitDescription > > > and then things have a good chance of working. > > > HTH > Eliot > > On Thu, Jul 16, 2009 at 10:47 AM, Ken Causey <[hidden email]> > wrote: > So I decided I would try to run all the tests and almost > immediately I > got a debugger. This is with an image built using the > directions > running on 32-bit linux with exupery 0.15.1 VM. The failure > seems to be > in the setup of TraitsResource > > Ken > > SecurityManager state: > Restricted: false > FileAccess: true > SocketAccess: true > Working Dir /home/ken/projects/squeak/ncdm > Trusted Dir /home/ken/projects/squeak/ncdm/secure > Untrusted Dir /home/ken/projects/squeak/ncdm/My Squeak > > ClassTrait(Object)>>doesNotUnderstand: #variablesAndOffsetsDo: > Receiver: T2 classTrait > Arguments and temporary variables: > aMessage: variablesAndOffsetsDo: > [closure] in > EncoderForV3PlusClosures(Encoder)...etc... > Receiver's instance variables: > methodDict: a MethodDictionary() > traitComposition: {} > localSelectors: nil > users: an IdentitySet() > organization: nil > baseTrait: T2 > > EncoderForV3PlusClosures(Encoder)>>init:context:notifying: > Receiver: {an EncoderForV3PlusClosures} > Arguments and temporary variables: > aClass: T2 classTrait > aContext: nil > req: a Parser > homeNode: nil > Receiver's instance variables: > comment: nil > pc: nil > scopeTable: a Dictionary('false'->{false} > 'nil'->{nil} 'self'->{self} > 'super'->...etc... > nTemps: 0 > supered: false > requestor: a Parser > class: T2 classTrait > selector: nil > literalStream: a WriteStream #() > selectorSet: a Dictionary(#*->{*} #+->{+} > #-->{-} #/->{/} #'//'->{//} > #<->{<} #...etc... > litIndSet: a Dictionary() > litSet: a LiteralDictionary(-1->{-1} > 0->{0} 1->{1} 2->{2} ) > sourceRanges: nil > globalSourceRanges: nil > stream: nil > position: nil > rootNode: nil > blockExtentsToLocals: nil > > [] in > Parser>>parse:class:category:noPattern:context:notifying:ifFail: > Receiver: a Parser > Arguments and temporary variables: > <<error during printing> > Receiver's instance variables: > source: a ReadStream 'm2ClassSide: a > ^a' > mark: 14 > hereChar: Character space > aheadChar: $^ > token: 'a' > tokenType: #word > currentComment: nil > buffer: a WriteStream 'a' > typeTable: #(#xBinary #xBinary #xBinary > #xBinary #xBinary #xBinary > #xBinary #xB...etc... > here: 'm2ClassSide:' > hereType: #keyword > hereMark: 1 > hereEnd: 12 > prevMark: 1 > prevEnd: nil > encoder: {an EncoderForV3PlusClosures} > requestor: nil > parseNode: nil > failBlock: [closure] in > Compiler>>translate:noPattern:ifFail: > requestorOffset: 0 > tempsMark: nil > doitFlag: false > properties: nil > category: #'as yet unclassified' > > BlockClosure>>on:do: > Receiver: [closure] in > Parser>>parse:class:category:noPattern:context:notifying:ifFail: > Arguments and temporary variables: > exception: ReparseAfterSourceEditing > handlerAction: [closure] in > Parser>>parse:class:category:noPattern:context:noti...etc... > handlerActive: true > Receiver's instance variables: > outerContext: > Parser>>parse:class:category:noPattern:context:notifying:ifFail: > startpc: 131 > numArgs: 0 > > > --- The full stack --- > ClassTrait(Object)>>doesNotUnderstand: #variablesAndOffsetsDo: > EncoderForV3PlusClosures(Encoder)>>init:context:notifying: > [] in > Parser>>parse:class:category:noPattern:context:notifying:ifFail: > BlockClosure>>on:do: > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - > Parser>>parse:class:category:noPattern:context:notifying:ifFail: > Compiler>>translate:noPattern:ifFail: > Compiler>>compile:in:classified:notifying:ifFail: > ClassTrait(TraitBehavior)>>compile:classified:notifying:trailer:ifFail: > ClassTrait(TraitDescription)>>compile:classified:withStamp:notifying:logSource: > ClassTrait>>compile:classified:withStamp:notifying:logSource: > ClassTrait(TraitDescription)>>compile:classified:withStamp:notifying: > ClassTrait(TraitDescription)>>compile:classified:notifying: > ClassTrait(TraitDescription)>>compile:notifying: > ClassTrait(TraitBehavior)>>compile: > [] in TraitsResource>>setUp > [] in SystemChangeNotifier>>doSilently: > BlockClosure>>ensure: > SystemChangeNotifier>>doSilently: > TraitsResource>>setUp > TraitsResource(TestResource)>>initialize > TraitsResource class(Behavior)>>new > TraitsResource class(TestResource class)>>current > TraitsResource class(TestResource class)>>isAvailable > [] in TestRunner>>basicSetUpSuite: > Set>>do: > TestRunner>>basicSetUpSuite: > TestRunner>>basicRunSuite:do: > TestRunner>>runSuite: > TestRunner>>runAll > PluggableButtonMorphPlus(PluggableButtonMorph)>>performAction > PluggableButtonMorphPlus>>performAction > [] in PluggableButtonMorphPlus(PluggableButtonMorph)>>mouseUp: > ...etc... > > > > > > signature.asc (196 bytes) Download Attachment |
Free forum by Nabble | Edit this page |