[Vm-dev] VM Maker: VMMaker.oscog-eem.1014.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Jan 9 20:15:50 UTC 2015
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1014.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.1014
Author: eem
Time: 9 January 2015, 12:14:41.936 pm
UUID: 8c9c75f6-b340-4135-ae40-399c35379d5d
Ancestors: VMMaker.oscog-eem.1013
Make the pin primitives Spur-only.
Nuke an erroneous method and add a missing
simulation method.
=============== Diff against VMMaker.oscog-eem.1013 ===============
Item was added:
+ ----- Method: CurrentImageCoInterpreterFacade>>shiftForWord (in category 'accessing') -----
+ shiftForWord
+ ^objectMemory shiftForWord!
Item was changed:
----- Method: InterpreterPrimitives>>primitiveIsPinned (in category 'memory space primitives') -----
primitiveIsPinned
"Answer if the receiver is pinned, i.e. immobile."
+ <option: #SpurObjectMemory>
| obj |
obj := self stackTop.
((objectMemory isImmediate: obj)
or: [objectMemory isForwarded: obj]) ifTrue:
[^self primitiveFailFor: PrimErrBadReceiver].
self pop: argumentCount + 1
thenPushBool: (objectMemory hasSpurMemoryManagerAPI
and: [objectMemory booleanObjectOf: (objectMemory isPinned: obj)])!
Item was changed:
----- Method: InterpreterPrimitives>>primitivePin (in category 'memory space primitives') -----
primitivePin
"Pin or unpin the receiver, i.e. make it immobile or mobile, based on the argument.
Answer whether the object was already pinned. N.B. pinning does *not* prevent
an object from being garbage collected."
+ <option: #SpurObjectMemory>
| obj boolean wasPinned |
- objectMemory hasSpurMemoryManagerAPI ifFalse:
- [^self primitiveFailFor: PrimErrUnsupported].
obj := self stackValue: 1.
((objectMemory isImmediate: obj)
or: [objectMemory isForwarded: obj]) ifTrue:
[^self primitiveFailFor: PrimErrBadReceiver].
boolean := self stackTop.
(boolean = objectMemory falseObject
or: [boolean = objectMemory trueObject]) ifFalse:
[^self primitiveFailFor: PrimErrBadArgument].
(objectMemory isPinned: obj)
ifTrue:
[wasPinned := objectMemory trueObject.
boolean ~= wasPinned ifTrue:
[objectMemory setIsPinnedOf: obj to: false]]
ifFalse:
[wasPinned := objectMemory falseObject.
(boolean = objectMemory trueObject
and: [(objectMemory pinObject: obj) = 0]) ifTrue:
[^self primitiveFailFor: PrimErrNoMemory]].
self pop: argumentCount + 1 thenPush: wasPinned!
Item was removed:
- ----- Method: StackToRegisterMappingCogit>>declareCVarsIn: (in category 'as yet unclassified') -----
- declareCVarsIn: aCodeGen
- aCodeGen
- var: #methodAbortTrampolines
- declareC: 'sqInt methodAbortTrampolines[4]';
- var: #picAbortTrampolines
- declareC: 'sqInt picAbortTrampolines[4]';
- var: #picMissTrampolines
- declareC: 'sqInt picMissTrampolines[4]';
- var: 'ceCall0ArgsPIC'
- declareC: 'void (*ceCall0ArgsPIC)(void)';
- var: 'ceCall1ArgsPIC'
- declareC: 'void (*ceCall1ArgsPIC)(void)';
- var: 'ceCall2ArgsPIC'
- declareC: 'void (*ceCall2ArgsPIC)(void)';
- var: #ceCallCogCodePopReceiverArg0Regs
- declareC: 'void (*ceCallCogCodePopReceiverArg0Regs)(void)';
- var: #realCECallCogCodePopReceiverArg0Regs
- declareC: 'void (*realCECallCogCodePopReceiverArg0Regs)(void)';
- var: #ceCallCogCodePopReceiverArg1Arg0Regs
- declareC: 'void (*ceCallCogCodePopReceiverArg1Arg0Regs)(void)';
- var: #realCECallCogCodePopReceiverArg1Arg0Regs
- declareC: 'void (*realCECallCogCodePopReceiverArg1Arg0Regs)(void)';
- var: 'simStack'
- declareC: 'CogSimStackEntry simStack[', ((CoInterpreter bindingOf: #LargeContextSize) value * 5 / 4 // objectMemory wordSize) asString, ']';
- var: 'simSelf'
- type: #CogSimStackEntry;
- var: #optStatus
- type: #CogSSOptStatus;
- var: 'prevBCDescriptor'
- type: #'BytecodeDescriptor *'.
-
- self numPushNilsFunction ifNotNil:
- [aCodeGen
- var: 'numPushNilsFunction'
- declareC: 'sqInt (* const numPushNilsFunction)(struct _BytecodeDescriptor *,sqInt,sqInt,sqInt) = ', (aCodeGen cFunctionNameFor: self numPushNilsFunction);
- var: 'pushNilSizeFunction'
- declareC: 'sqInt (* const pushNilSizeFunction)(sqInt) = ', (aCodeGen cFunctionNameFor: self pushNilSizeFunction)].
-
- aCodeGen
- addSelectorTranslation: #register to: (aCodeGen cFunctionNameFor: 'registerr');
- addSelectorTranslation: #register: to: (aCodeGen cFunctionNameFor: 'registerr:')!
More information about the Vm-dev
mailing list