[Vm-dev] VM Maker: VMMaker-oscog-golubovsky.136.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jan 10 04:04:25 UTC 2012


Dmitry Golubovsky uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker-oscog-golubovsky.136.mcz

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

Name: VMMaker-oscog-golubovsky.136
Author: golubovsky
Time: 9 January 2012, 11:01:10 pm
UUID: 892dbc65-4c95-4bdd-837c-6bd55f66c93d
Ancestors: VMMaker-oscog-golubovsky.135

Added primitives to get and set VM idle timer interval.

=============== Diff against VMMaker-oscog-golubovsky.135 ===============

Item was added:
+ ----- Method: AndroidPlugin>>primGetVMTimerInterval (in category 'system primitives') -----
+ primGetVMTimerInterval
+ 	| timer vmcls vmobj bmmeth jmsg |
+ 	<var: 'timer' type: 'int'>
+ 	<var: 'vmcls' type: 'jclass'>
+ 	<var: 'vmobj' type: 'jobject'>
+ 	<var: 'bmmeth' type: 'jmethodID'>
+ 	<export: true>
+ 	vmcls := self getVMClass.
+ 	vmcls ifNil: [^ interpreterProxy primitiveFail].
+ 	vmobj := self getVMObject.
+ 	vmobj ifNil: [^ interpreterProxy primitiveFail].
+ 	bmmeth := self getMethod: 'getVMTimerInterval' withSig: '()I' inClass: vmcls.
+ 	bmmeth ifNil: [^ interpreterProxy primitiveFail].
+ 	timer := self callIntMethod: bmmeth On: vmobj with: 0.
+ 	interpreterProxy pop: 1.
+ 	interpreterProxy pushInteger: timer.
+ !

Item was added:
+ ----- Method: AndroidPlugin>>primSetVMTimerInterval (in category 'system primitives') -----
+ primSetVMTimerInterval
+ 	| timer vmcls vmobj bmmeth jmsg |
+ 	<var: 'timer' type: 'int'>
+ 	<var: 'vmcls' type: 'jclass'>
+ 	<var: 'vmobj' type: 'jobject'>
+ 	<var: 'bmmeth' type: 'jmethodID'>
+ 	<export: true>
+ 	timer :=  interpreterProxy stackIntegerValue: 0.
+ 	vmcls := self getVMClass.
+ 	vmcls ifNil: [^ interpreterProxy primitiveFail].
+ 	vmobj := self getVMObject.
+ 	vmobj ifNil: [^ interpreterProxy primitiveFail].
+ 	bmmeth := self getMethod: 'setVMTimerInterval' withSig: '(I)V' inClass: vmcls.
+ 	bmmeth ifNil: [^ interpreterProxy primitiveFail].
+ 	self callVoidMethod: bmmeth On: vmobj with: timer.
+ 	interpreterProxy pop: 1.
+ !



More information about the Vm-dev mailing list