VM Maker: BytecodeSets.spur-cb.63.mcz

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

VM Maker: BytecodeSets.spur-cb.63.mcz

commits-2
 
ClementBera uploaded a new version of BytecodeSets to project VM Maker:
http://source.squeak.org/VMMaker/BytecodeSets.spur-cb.63.mcz

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

Name: BytecodeSets.spur-cb.63
Author: cb
Time: 17 January 2017, 2:03:45.537598 pm
UUID: a8ae9a8c-7784-474a-a431-fa97ce58cb14
Ancestors: BytecodeSets.spur-cb.62

Updated SistaV1 encoder for MethodMassage support.

=============== Diff against BytecodeSets.spur-cb.62 ===============

Item was added:
+ ----- Method: EncoderForSistaV1>>genBranchIfInstanceOf:distance: (in category 'extended bytecode generation') -----
+ genBranchIfInstanceOf: literalIndex distance: distance
+ self genBranchIfInstanceOf: literalIndex distance: distance orNot: false!

Item was added:
+ ----- Method: EncoderForSistaV1>>genBranchIfInstanceOf:distance:orNot: (in category 'extended bytecode generation') -----
+ genBranchIfInstanceOf: literalIndex distance: distance orNot: orNot
+ "254 11111110 kkkkkkkk jjjjjjjj branch If Not Instance Of Behavior/Array Of Behavior kkkkkkkk (+ Extend A * 256, where Extend A >= 0) distance jjjjjjjj (+ Extend B * 256, where Extend B >= 0)"
+
+ | extendedIndex extendedDistance |
+ (literalIndex < 0 or: [literalIndex > 65535]) ifTrue:
+ [^self outOfRangeError: 'index' index: literalIndex range: 0 to: 65536].
+ (distance < 1 or: [distance > 32767]) ifTrue:
+ [^self outOfRangeError: 'distance' index: distance range: 0 to: 32767].
+ (extendedIndex := literalIndex) > 255 ifTrue:
+ [self genUnsignedSingleExtendA: extendedIndex // 256.
+ extendedIndex := extendedIndex \\ 256].
+ (orNot not or: [(extendedDistance := distance) > 255]) ifTrue:
+ [self genUnsignedSingleExtendB: (distance bitShift: -8) + (orNot not asBit  * 128).
+ extendedDistance := distance bitAnd: 255].
+
+ stream
+ nextPut: 254;
+ nextPut: extendedIndex;
+ nextPut: extendedDistance!

Item was changed:
  ----- Method: EncoderForSistaV1>>genBranchIfNotInstanceOf:distance: (in category 'extended bytecode generation') -----
  genBranchIfNotInstanceOf: literalIndex distance: distance
+ self genBranchIfInstanceOf: literalIndex distance: distance orNot: true!
- "254 11111110 kkkkkkkk jjjjjjjj branch If Not Instance Of Behavior/Array Of Behavior kkkkkkkk (+ Extend A * 256, where Extend A >= 0) distance jjjjjjjj (+ Extend B * 256, where Extend B >= 0)"
-
- | extendedIndex extendedDistance |
- (literalIndex < 0 or: [literalIndex > 65535]) ifTrue:
- [^self outOfRangeError: 'index' index: literalIndex range: 0 to: 65536].
- (distance < 1 or: [distance > 32767]) ifTrue:
- [^self outOfRangeError: 'distance' index: distance range: 0 to: 32767].
- (extendedIndex := literalIndex) > 255 ifTrue:
- [self genUnsignedSingleExtendA: extendedIndex // 256.
- extendedIndex := extendedIndex \\ 256].
- (extendedDistance := distance) > 255 ifTrue:
- [self genUnsignedSingleExtendB: (distance bitShift: -8).
- extendedDistance := distance bitAnd: 255].
-
- stream
- nextPut: 254;
- nextPut: extendedIndex;
- nextPut: extendedDistance!

Reply | Threaded
Open this post in threaded view
|

Re: VM Maker: BytecodeSets.spur-cb.63.mcz

Nicolas Cellier
 


2017-01-17 14:03 GMT+01:00 <[hidden email]>:

ClementBera uploaded a new version of BytecodeSets to project VM Maker:
http://source.squeak.org/VMMaker/BytecodeSets.spur-cb.63.mcz

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

Name: BytecodeSets.spur-cb.63
Author: cb
Time: 17 January 2017, 2:03:45.537598 pm
UUID: a8ae9a8c-7784-474a-a431-fa97ce58cb14
Ancestors: BytecodeSets.spur-cb.62

Updated SistaV1 encoder for MethodMassage support.

=============== Diff against BytecodeSets.spur-cb.62 ===============

Item was added:
+ ----- Method: EncoderForSistaV1>>genBranchIfInstanceOf:distance: (in category 'extended bytecode generation') -----
+ genBranchIfInstanceOf: literalIndex distance: distance
+       self genBranchIfInstanceOf: literalIndex distance: distance orNot: false!

Item was added:
+ ----- Method: EncoderForSistaV1>>genBranchIfInstanceOf:distance:orNot: (in category 'extended bytecode generation') -----
+ genBranchIfInstanceOf: literalIndex distance: distance orNot: orNot
+       "254            11111110        kkkkkkkk        jjjjjjjj                branch If Not Instance Of Behavior/Array Of Behavior kkkkkkkk (+ Extend A * 256, where Extend A >= 0) distance jjjjjjjj (+ Extend B * 256, where Extend B >= 0)"

maybe the comment could be updated then... if ... or not ...
 
+
+       | extendedIndex extendedDistance |
+       (literalIndex < 0 or: [literalIndex > 65535]) ifTrue:
+               [^self outOfRangeError: 'index' index: literalIndex range: 0 to: 65536].
+       (distance < 1 or: [distance > 32767]) ifTrue:
+               [^self outOfRangeError: 'distance' index: distance range: 0 to: 32767].
+       (extendedIndex := literalIndex) > 255 ifTrue:
+               [self genUnsignedSingleExtendA: extendedIndex // 256.
+                extendedIndex := extendedIndex \\ 256].
+       (orNot not or: [(extendedDistance := distance) > 255]) ifTrue:
+               [self genUnsignedSingleExtendB: (distance bitShift: -8) + (orNot not asBit  * 128).
+               extendedDistance := distance bitAnd: 255].
+
+       stream
+               nextPut: 254;
+               nextPut: extendedIndex;
+               nextPut: extendedDistance!

Item was changed:
  ----- Method: EncoderForSistaV1>>genBranchIfNotInstanceOf:distance: (in category 'extended bytecode generation') -----
  genBranchIfNotInstanceOf: literalIndex distance: distance
+       self genBranchIfInstanceOf: literalIndex distance: distance orNot: true!
-       "254            11111110        kkkkkkkk        jjjjjjjj                branch If Not Instance Of Behavior/Array Of Behavior kkkkkkkk (+ Extend A * 256, where Extend A >= 0) distance jjjjjjjj (+ Extend B * 256, where Extend B >= 0)"
-
-       | extendedIndex extendedDistance |
-       (literalIndex < 0 or: [literalIndex > 65535]) ifTrue:
-               [^self outOfRangeError: 'index' index: literalIndex range: 0 to: 65536].
-       (distance < 1 or: [distance > 32767]) ifTrue:
-               [^self outOfRangeError: 'distance' index: distance range: 0 to: 32767].
-       (extendedIndex := literalIndex) > 255 ifTrue:
-               [self genUnsignedSingleExtendA: extendedIndex // 256.
-                extendedIndex := extendedIndex \\ 256].
-       (extendedDistance := distance) > 255 ifTrue:
-               [self genUnsignedSingleExtendB: (distance bitShift: -8).
-               extendedDistance := distance bitAnd: 255].
-
-       stream
-               nextPut: 254;
-               nextPut: extendedIndex;
-               nextPut: extendedDistance!