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

commits at source.squeak.org commits at source.squeak.org
Wed Apr 8 00:21:03 UTC 2015


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

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

Name: VMMaker.oscog-eem.1176
Author: eem
Time: 7 April 2015, 5:19:20.165 pm
UUID: 723057a3-0609-4d45-8062-d5f120adf832
Ancestors: VMMaker.oscog-tpr.1175

Fix bug in SistaV1 pushActiveContext bytecode in
interpreter.  Don't blindly use pushActiveContextBytecode.

Fix initialization race condition with
BytecodeSetHasDirectedSuperSend

=============== Diff against VMMaker.oscog-tpr.1175 ===============

Item was changed:
  ----- Method: Cogit class>>initializeMiscConstants (in category 'class initialization') -----
  initializeMiscConstants
  	super initializeMiscConstants.
  	Debug := initializationOptions at: #Debug ifAbsent: [false].
  	(initializationOptions includesKey: #EagerInstructionDecoration)
  		ifTrue:
  			[EagerInstructionDecoration := initializationOptions at: #EagerInstructionDecoration]
  		ifFalse:
  			[EagerInstructionDecoration isNil ifTrue:
  				[EagerInstructionDecoration := false]]. "speeds up single stepping but could lose fidelity"
  
  	ProcessorClass := (initializationOptions at: #ISA ifAbsent: [#IA32]) caseOf: {
  							[#IA32] 	->	[BochsIA32Alien].
  							[#ARMv5]	->	[GdbARMAlien]. }.
+ 
+ 	"Our criterion for which methods to JIT is literal count.  The default value is 60 literals or less."
+ 	MaxLiteralCountForCompile := initializationOptions at: #MaxLiteralCountForCompile ifAbsent: [60].
  	"we special-case 0, 1 & 2 argument sends, N is numArgs >= 3"
  	NumSendTrampolines := 4.
  	"Currently not even the ceImplicitReceiverTrampoline contains object references."
  	NumObjRefsInRuntime := 0.
  
  	NSCSelectorIndex := (NSSendCache instVarNames indexOf: #selector) - 1.
  	NSCNumArgsIndex := (NSSendCache instVarNames indexOf: #numArgs) - 1.
  	NSCClassTagIndex := (NSSendCache instVarNames indexOf: #classTag) - 1.
  	NSCEnclosingObjectIndex := (NSSendCache instVarNames indexOf: #enclosingObject) - 1.
  	NSCTargetIndex := (NSSendCache instVarNames indexOf: #target) - 1.
  	NumOopsPerNSC := NSSendCache instVarNames size.
  
  	"Max size to alloca when compiling.
  	 Mac OS X 10.6.8 segfaults approaching 8Mb.
  	 Linux 2.6.9 segfaults above 11Mb.
  	 WIndows XP segfaults approaching 2Mb."
  	MaxStackAllocSize := 1024 * 1024 * 3 / 2 !

Item was changed:
  ----- Method: Cogit class>>initializeWithOptions: (in category 'class initialization') -----
  initializeWithOptions: optionsDictionary
  	{ self. CogMethod. CogMethodSurrogate. CogObjectRepresentation } do:
  		[:aSuperclass|
  		 aSuperclass withAllSubclasses do:
  			[:class| class initializationOptions: optionsDictionary]].
  	super initializeWithOptions: optionsDictionary.
  	self initializeMiscConstants. "must preceed other initialization."
  	self initializeErrorCodes.
  	self initializeCogMethodConstants.
  	self initializeAnnotationConstants.
  	self initializeBytecodeTable.
+ 	self initializeNumTrampolines.
  	self initializePrimitiveTable!

Item was removed:
- ----- Method: SimpleStackBasedCogit class>>initializeMiscConstants (in category 'class initialization') -----
- initializeMiscConstants
- 	super initializeMiscConstants.
- 	MaxLiteralCountForCompile := initializationOptions at: #MaxLiteralCountForCompile ifAbsent: [60].
- 	NumTrampolines := 42
- 						+ (NewspeakVM ifTrue: [18] ifFalse: [0])
- 						+ (BytecodeSetHasDirectedSuperSend ifTrue: [4] ifFalse: [0])!

Item was added:
+ ----- Method: SimpleStackBasedCogit class>>initializeNumTrampolines (in category 'class initialization') -----
+ initializeNumTrampolines
+ 	NumTrampolines := 42
+ 						+ (NewspeakVM ifTrue: [18] ifFalse: [0])
+ 						+ (BytecodeSetHasDirectedSuperSend ifTrue: [4] ifFalse: [0])!

Item was removed:
- ----- Method: SistaStackToRegisterMappingCogit class>>initializeMiscConstants (in category 'class initialization') -----
- initializeMiscConstants
- 	super initializeMiscConstants.
- 	NumTrampolines := 53
- 						+ (NewspeakVM ifTrue: [18] ifFalse: [0])
- 						+ (BytecodeSetHasDirectedSuperSend ifTrue: [4] ifFalse: [0])!

Item was added:
+ ----- Method: SistaStackToRegisterMappingCogit class>>initializeNumTrampolines (in category 'class initialization') -----
+ initializeNumTrampolines
+ 	NumTrampolines := 53
+ 						+ (NewspeakVM ifTrue: [18] ifFalse: [0])
+ 						+ (BytecodeSetHasDirectedSuperSend ifTrue: [4] ifFalse: [0])!

Item was changed:
  ----- Method: StackInterpreter>>extPushPseudoVariable (in category 'stack bytecodes') -----
  extPushPseudoVariable
  	"SistaV1:	*	82			01010010			Push thisContext, (then e.g. Extend B 1 = push thisProcess)"
+ 	| theThingToPush |
  	extB
  		caseOf: {
+ 			[0]	->	[theThingToPush := self ensureFrameIsMarried: localFP SP: localSP].
+ 			[1]	->	[theThingToPush := self activeProcess] }
- 			[0]	->	[self pushActiveContextBytecode].
- 			[1]	->	[self internalPush: self activeProcess] }
  		otherwise:
  			[self respondToUnknownBytecode].
  	self fetchNextBytecode.
+ 	self internalPush: theThingToPush.
  	extB := 0!

Item was removed:
- ----- Method: StackToRegisterMappingCogit class>>initializeMiscConstants (in category 'class initialization') -----
- initializeMiscConstants
- 	super initializeMiscConstants.
- 	NumTrampolines := 52
- 						+ (NewspeakVM ifTrue: [18] ifFalse: [0])
- 						+ (BytecodeSetHasDirectedSuperSend ifTrue: [4] ifFalse: [0])!

Item was added:
+ ----- Method: StackToRegisterMappingCogit class>>initializeNumTrampolines (in category 'class initialization') -----
+ initializeNumTrampolines
+ 	NumTrampolines := 52
+ 						+ (NewspeakVM ifTrue: [18] ifFalse: [0])
+ 						+ (BytecodeSetHasDirectedSuperSend ifTrue: [4] ifFalse: [0])!



More information about the Vm-dev mailing list