[Vm-dev] VM Maker: VMMaker.oscog-cb.1205.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Apr 16 23:05:00 UTC 2015
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-cb.1205.mcz
==================== Summary ====================
Name: VMMaker.oscog-cb.1205
Author: cb
Time: 16 April 2015, 4:02:57.654 pm
UUID: 259ea5ad-fd36-4970-b219-7715a0516627
Ancestors: VMMaker.oscog-eem.1204
Fix interpreter code for jumpIfNotInstanceOfOrPop
=============== Diff against VMMaker.oscog-eem.1204 ===============
Item was changed:
----- Method: StackInterpreter>>extJumpIfNotInstanceOfBehaviorsOrPopBytecode (in category 'sista bytecodes') -----
extJumpIfNotInstanceOfBehaviorsOrPopBytecode
"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)"
| tosClassTag literal distance |
tosClassTag := objectMemory fetchClassTagOf: self internalStackTop.
literal := self literal: extA << 8 + self fetchByte.
distance := extB << 8 + self fetchByte.
extA := 0.
extB := 0.
(objectMemory isArrayNonImm: literal)
ifTrue:
+ [0 to: (objectMemory numSlotsOf: literal) asInteger - 1 do: [:i |
+ tosClassTag = (objectMemory rawClassTagForClass: (objectMemory fetchPointer: i ofObject: literal))
+ ifTrue:
+ [ self internalPopStack.
+ ^ self fetchNextBytecode ] ].
+ localIP := localIP + distance.
+ ^ self fetchNextBytecode]
- [| i |
- i := (objectMemory numSlotsOf: literal) asInteger.
- [(i := i -1) < 0
- or: [tosClassTag = (objectMemory rawClassTagForClass: (objectMemory fetchPointer: i ofObject: literal))]] whileTrue.
- i < 0 ifTrue:
- [localIP := localIP + distance.
- ^ self fetchNextBytecode]]
ifFalse:
[tosClassTag ~= (objectMemory rawClassTagForClass: literal) ifTrue:
[localIP := localIP + distance.
^ self fetchNextBytecode]].
self internalPopStack.
self fetchNextBytecode!
More information about the Vm-dev
mailing list