[squeak-dev] Daily Commit Log
commits at source.squeak.org
commits at source.squeak.org
Sun Feb 13 23:55:06 UTC 2011
Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours:
Add both Compiler and Decompiler support for inlined #repeat.
For compilation, the repeat is implemented with a simple backward jump if ever the receiver is a block.
For decompilation, things are a bit more tedious because conditonnal loops (whileTrue/False) must be differentiated from unconditional loops (repeat).
The signature of conditional loops is that they all have their backward jump hoping over their conditional jump.
If a backward jump does not cross any conditional jump on its way back, then it must be a repeat.
The idea is thus to register the program counter of the test instruction before the conditional jump (lastJumpIfPc), and verify if the bacward jump branch after or before this instruction.
Things are a bit more complex because there can be a conditional instruction inside the repeat body.
That's why those conditional jumps must be stacked (on lastJumpIfPcStack), and unstacked once decompiled.
In case nil is the doItReceiver of an interactive evaluation, avoid proposing a menu that would add an inst var to UndefinedObject.
Fix for 7588: Decompiler>>interpretNextInstructionFor: bitrot:
If you change the first statement in the above-mentioned method to
false ifTrue: [^ super interpretNextInstructionFor: client].
you will print out debug information. Or you would if you didn't get an exception printing out the bytecode. "code copyFrom: 4 to: code size" fails because it tries to make a String of size -2. That's because code at this point is something like '70' if you're currently interpreting bytecode 112.
Changing the offending line to "nextPutAll: '<', code, '>' fixes things.
Ancestors: Compiler-nice.187, Compiler-fbs.183, Compiler-nice.186
Merge fbs.183 nice.186 nice.187 coming from inbox
Enable cascading of special messages by deoptimizing, thanks Eliot.
This is mostly useless, but it removes an arbitrary limitation of the language.
1) Let Behavior>>deepCopy return self, senders of deepCopy generally have no reason to copy a Behavior.
Moreover, the old code did a shallowCopy which is a non sense.
2) Make it explicit that veryDeepCopy does not copy any Behavior.
This was explicit for Metaclass, but implicit for Class (see Object>>#veryDeepInner: ), and undefined for Traits (they are not used, but who knows...).
Cherry pick some changes from Pharo:
avoid inlining #selectors #classVarNames
use #cull:cull: instead of #valueWithPossibleArgs:
patch needsFrameSize: for the case of perform:withArguments: (required by old VM, not Cog)
better comment for Fraction hash
Ancestors: Kernel-nice.543, Kernel-nice.533
Merge nice.533 (deepCopy clean-up)
- changed the postscript to recompile all methods which send #repeat
Merge Kernel-spd.444 to allow shadowing of a global namespace variable by a local class variable or shared pool variable.
RATIONALE: forbiding this shadowing works against encapsulation. It prevents packages with a local class var from loading when a concurrent package defined a global. Forbiding is thus like reserving every class var name. Non sense.
Kernel-spd.444 did also remove some methods, but I did not replay those changes as they are unrelated and undocumented.
* fixed Class>>canFindWithoutEnvironment: (it was actually checking the environment, making the behavior like bindingOf:) and added test to KernelTests
* changed Class>>declare: and Class>>addClassVarName:
- no longer check the environment for conflicts
- conflict error message clarified
* made conflict error in #addClassVarName: resumable to match the behavior of #declare:
Use := assignments rather than _ in class comment examples.
Ancestors: Tests-ul.114, Tests-nice.111
Remove the contextStackTop instvar, replacing its calls with an indirection through "self contextStackTop", which just calls the top/first element of contextStack.
Ancestors: Tools-mtf.295, Tools-fbs.286
Remove the contextStackTop instvar in Debugger, replacing its calls with an indirection through "self contextStackTop", which just calls the top/first element of contextStack.
More information about the Squeak-dev