The Trunk: Kernel-eem.1023.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-eem.1023.mcz

commits-2
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1023.mcz

==================== Summary ====================

Name: Kernel-eem.1023
Author: eem
Time: 13 May 2016, 12:47:58.825645 pm
UUID: dbe31b16-e7d4-4342-a314-a2faedcc6ce3
Ancestors: Kernel-eem.1022

CompiledMethod>>pcPreviousTo: is used in places other thna the debugger, so it has to be in kernel.  Some time it may be replaceable with the new BytecodeEncoder class>>#pcPreviousTo:in:for:, but for now put it in the right package.

=============== Diff against Kernel-eem.1022 ===============

Item was added:
+ ----- Method: CompiledMethod>>pcPreviousTo: (in category 'scanning') -----
+ pcPreviousTo: thePC
+ "Answer the pc of the bytecode before the bytecode at thePC."
+ | pc prevPc byte encoderClass |
+ thePC > self endPC ifTrue: [^self endPC].
+ pc := self initialPC.
+ encoderClass := self encoderClass.
+ [pc < thePC] whileTrue:
+ [byte := self at: (prevPc := pc).
+ [pc := pc + (encoderClass bytecodeSize: byte).
+  encoderClass isExtension: byte] whileTrue:
+ [byte := self at: pc]].
+ ^prevPc!