[Vm-dev] VM Maker: VMMaker.oscog-eem.133.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Oct 7 22:58:38 UTC 2011
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.133.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.133
Author: eem
Time: 7 October 2011, 3:56:54.295 pm
UUID: 1ca6557f-8901-4791-8473-e2c09d25bbf3
Ancestors: VMMaker.oscog-eem.132
Tiny performance tweak to bytecodePrimMultiply.
Added findStringBeginningWith: debugging facility.
=============== Diff against VMMaker.oscog-eem.132 ===============
Item was changed:
----- Method: Interpreter>>bytecodePrimMultiply (in category 'common selector sends') -----
bytecodePrimMultiply
| rcvr arg result |
rcvr := self internalStackValue: 1.
arg := self internalStackValue: 0.
(self areIntegers: rcvr and: arg)
ifTrue: [rcvr := self integerValueOf: rcvr.
arg := self integerValueOf: arg.
result := rcvr * arg.
+ (arg = 0
+ or: [(result // arg) = rcvr and: [self isIntegerValue: result]]) ifTrue:
+ [self internalPop: 2 thenPush: (self integerObjectOf: result).
+ ^self fetchNextBytecode "success"]]
- ((arg = 0 or: [(result // arg) = rcvr]) and: [self isIntegerValue: result])
- ifTrue: [self internalPop: 2 thenPush: (self integerObjectOf: result).
- ^ self fetchNextBytecode "success"]]
ifFalse: [successFlag := true.
self externalizeIPandSP.
self primitiveFloatMultiply: rcvr byArg: arg.
self internalizeIPandSP.
successFlag ifTrue: [^ self fetchNextBytecode "success"]].
messageSelector := self specialSelector: 8.
argumentCount := 1.
self normalSend.
!
Item was added:
+ ----- Method: NewObjectMemory>>findStringBeginningWith: (in category 'debug support') -----
+ findStringBeginningWith: aCString
+ "Print the oops of all string-like things that start with the same characters as aCString"
+ <api>
+ <var: #aCString type: #'char *'>
+ | cssz obj sz |
+ cssz := self strlen: aCString.
+ obj := self firstObject.
+ [self oop: obj isLessThan: freeStart] whileTrue:
+ [(self isFreeObject: obj)
+ ifTrue:
+ [sz := self sizeOfFree: obj]
+ ifFalse:
+ [((self isBytesNonInt: obj)
+ and: [(self lengthOf: obj) >= cssz
+ and: [(self str: aCString n: (self pointerForOop: obj + BaseHeaderSize) cmp: cssz) = 0]]) ifTrue:
+ [coInterpreter printHex: obj; space; printNum: (self lengthOf: obj); space; printOopShort: obj; cr].
+ sz := self sizeBitsOf: obj].
+ obj := self oopFromChunk: obj + sz]!
Item was changed:
----- Method: NewspeakInterpreter>>bytecodePrimMultiply (in category 'common selector sends') -----
bytecodePrimMultiply
| rcvr arg result |
rcvr := self internalStackValue: 1.
arg := self internalStackValue: 0.
(self areIntegers: rcvr and: arg)
ifTrue: [rcvr := self integerValueOf: rcvr.
arg := self integerValueOf: arg.
result := rcvr * arg.
+ (arg = 0
+ or: [(result // arg) = rcvr and: [self isIntegerValue: result]]) ifTrue:
+ [self internalPop: 2 thenPush: (self integerObjectOf: result).
+ ^self fetchNextBytecode "success"]]
- ((arg = 0 or: [(result // arg) = rcvr]) and: [self isIntegerValue: result])
- ifTrue: [self internalPop: 2 thenPush: (self integerObjectOf: result).
- ^ self fetchNextBytecode "success"]]
ifFalse: [self initPrimCall.
self externalizeIPandSP.
self primitiveFloatMultiply: rcvr byArg: arg.
self internalizeIPandSP.
self successful ifTrue: [^ self fetchNextBytecode "success"]].
messageSelector := self specialSelector: 8.
argumentCount := 1.
self normalSend.
!
Item was changed:
----- Method: StackInterpreter>>bytecodePrimMultiply (in category 'common selector sends') -----
bytecodePrimMultiply
| rcvr arg result |
rcvr := self internalStackValue: 1.
arg := self internalStackValue: 0.
(self areIntegers: rcvr and: arg)
ifTrue: [rcvr := objectMemory integerValueOf: rcvr.
arg := objectMemory integerValueOf: arg.
result := rcvr * arg.
+ (arg = 0
+ or: [(result // arg) = rcvr and: [objectMemory isIntegerValue: result]]) ifTrue:
+ [self internalPop: 2 thenPush: (objectMemory integerObjectOf: result).
+ ^self fetchNextBytecode "success"]]
- ((arg = 0 or: [(result // arg) = rcvr]) and: [objectMemory isIntegerValue: result])
- ifTrue: [self internalPop: 2 thenPush: (objectMemory integerObjectOf: result).
- ^ self fetchNextBytecode "success"]]
ifFalse: [self initPrimCall.
self externalizeIPandSP.
self primitiveFloatMultiply: rcvr byArg: arg.
self internalizeIPandSP.
self successful ifTrue: [^ self fetchNextBytecode "success"]].
messageSelector := self specialSelector: 8.
argumentCount := 1.
self normalSend!
More information about the Vm-dev
mailing list