[Vm-dev] VM Maker: BytecodeSets.spur-cb.63.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Jan 17 13:03:51 UTC 2017
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!
More information about the Vm-dev
mailing list