[Vm-dev] VM Maker: VMMaker.oscog-eem.1380.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jun 25 20:32:02 UTC 2015


Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1380.mcz

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

Name: VMMaker.oscog-eem.1380
Author: eem
Time: 25 June 2015, 1:30:03.792 pm
UUID: 582c96d5-f95a-4916-a11d-62c452accc31
Ancestors: VMMaker.oscog-cb.1379

Add some <option: #NewspeakVM>'s to eliminate
code from the non-Newspeak VMs.

Eliminate a double method cache flush on startrup.

=============== Diff against VMMaker.oscog-cb.1379 ===============

Item was changed:
  ----- Method: StackInterpreter>>initialCleanup (in category 'initialization') -----
  initialCleanup
  	"This used to cope with issues with images written by VMs earlier than 3.6/3.7.
  	 Since we won't be loading such images (being a closure only VM) we only have to
  	 deal with external primitives.  Since references to external plugins in methods are
  	 cleaned up in snapshotCleanUp only initialize the tables, not visit each method."
+ 	<inline: true>
  	self flushMethodCache.
  	self flushExternalPrimitiveTable!

Item was changed:
  ----- Method: StackInterpreter>>initializeInterpreter: (in category 'initialization') -----
  initializeInterpreter: bytesToShift
  	"Initialize Interpreter state before starting execution of a new image."
  	interpreterProxy := self sqGetInterpreterProxy.
  	self dummyReferToProxy.
  	objectMemory initializeObjectMemory: bytesToShift.
  	self checkAssumedCompactClasses.
  	self initializeExtraClassInstVarIndices.
  	method := newMethod := objectMemory nilObject.
  	self cCode: '' inSmalltalk:
  		[breakSelectorLength ifNil:
  			[breakSelectorLength := objectMemory minSmallInteger]].
  	methodDictLinearSearchLimit := 8.
- 	self flushMethodCache.
  	self initialCleanup.
  	profileSemaphore := profileProcess := profileMethod := objectMemory nilObject.
  	interruptKeycode := 2094. "cmd-. as used for Mac but no other OS"
  	[globalSessionID = 0] whileTrue:
  		[globalSessionID := self
  								cCode: [(self time: #NULL) + self ioMSecs]
  								inSmalltalk: [(Random new next * SmallInteger maxVal) asInteger]]!

Item was changed:
  ----- Method: StackInterpreter>>lookupDnuPresent (in category 'message sending') -----
  lookupDnuPresent
  	"A present receiver send lookup failed. Replace the arguments on the stack with
  	 a Message and lookup #doesNotUndestand:.
  	IN: lkupClass
  	IN: messageSelector
  	IN: argumentCount
  	OUT: newMethod
  	OUT: primitiveIndex
  	RESULT: LookupRuleMNU"
+ 	<option: #NewspeakVM>
- 
  	| currentClass dictionary found |
  	self createActualMessageTo: lkupClass.
  	messageSelector := objectMemory splObj: SelectorDoesNotUnderstand.
  	currentClass := lkupClass.
  	[currentClass ~= objectMemory nilObject] whileTrue:
  		[dictionary := objectMemory followObjField: MethodDictionaryIndex ofObject: currentClass.
  		found := self lookupMethodInDictionary: dictionary.
  		found ifTrue: [^LookupRuleMNU].
  		currentClass := self superclassOf: currentClass].
  
  	self error: 'Recursive not understood error encountered'!

Item was changed:
  ----- Method: StackInterpreter>>lookupOrdinarySend (in category 'message sending') -----
  lookupOrdinarySend
  	"Do the full lookup for an ordinary send (i.e., a Newspeak or Smalltalk ordinary send or a Smalltalk super send).
  	IN: lkupClass
  	IN: messageSelector
  	IN: argumentCount
  	OUT: newMethod
  	OUT: primitiveIndex
  	RESULT: LookupOrdinary or LookupDNU"
+ 	<option: #NewspeakVM>
- 
  	| currentClass dictionary found |
  	self assert: (self addressCouldBeClassObj: lkupClass).
  	currentClass := lkupClass.
  	[currentClass ~= objectMemory nilObject] whileTrue:
  		[dictionary := objectMemory followObjField: MethodDictionaryIndex ofObject: currentClass.
  		found := self lookupMethodInDictionary: dictionary.
  		found ifTrue:
  			[(self accessModifierOfMethod: newMethod) == AccessModifierPublic
  				ifTrue: [^self].
  			(self accessModifierOfMethod: newMethod) == AccessModifierProtected
  				ifTrue: [^self lookupDnuPresent]].
  		currentClass := self superclassOf: currentClass].
  	^self lookupDnuPresent!



More information about the Vm-dev mailing list