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

commits at source.squeak.org commits at source.squeak.org
Sat Nov 11 02:33:53 UTC 2017

Eliot Miranda uploaded a new version of VMMaker to project VM Maker:

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

Name: VMMaker.oscog-eem.2276
Author: eem
Time: 10 November 2017, 6:33:10.564346 pm
UUID: 4ada0ebf-5c79-45d6-a0d4-80660c1b5575
Ancestors: VMMaker.oscog-eem.2275

Simplify flushLog in the logging framework by providing fflush on WriteStream.

Slang: Now that scavengeLog is typed isFunctionalIn: must accept FILE * as an acceptable return type of a functional method.

=============== Diff against VMMaker.oscog-eem.2275 ===============

Item was changed:
  ----- Method: TMethod>>isFunctionalIn: (in category 'inlining') -----
  isFunctionalIn: aCodeGen
  	"Answer if the receiver is a functional method. That is, if it
  	 consists of a single return statement of an expression that
  	 contains no other returns, or an assert or flag followed by
  	 such a statement.
  	 Answer false for methods with return types other than the simple
  	 integer types to work around bugs in the inliner."
  	parseTree statements size = 1 ifFalse:
  		[(parseTree statements size = 2
  		  and: [parseTree statements first isSend
  		  and: [parseTree statements first selector == #flag:
  			or: [(aCodeGen isAssertSelector: parseTree statements first selector)
  				and: [parseTree statements first selector ~~ #asserta:]]]]) ifFalse:
  	parseTree statements last isReturn ifFalse:
  	parseTree statements last expression nodesDo:
  		[ :n | n isReturn ifTrue: [^false]].
  	^#(int #'unsigned int' #long #'unsigned long' #'long long' #'unsigned long long'
  		sqInt usqInt #'sqIntptr_t' #'usqIntptr_t' sqLong usqLong
  		#'int *' #'unsigned int *' #'sqInt *' #'usqInt *' #'sqLong *' #'usqLong *' #'char *'
+ 		#'CogMethod *' #'AbstractInstruction *'
+ 		#'FILE *') includes: returnType!
- 		#'CogMethod *' #'AbstractInstruction *') includes: returnType!

Item was changed:
  ----- Method: VMClass>>flushLog (in category 'printf logging') -----
  	"Log via printf-style format strings.  Subclasses must implement logStream to answer their log stream/file."
  	<inline: #always>
  	self logStream ifNotNil:
+ 		[:s| s fflush]!
- 		[self cCode: [self logStream fflush] inSmalltalk: [self logStream flush]]!

Item was added:
+ ----- Method: WriteStream>>fflush (in category '*VMMaker-logging') -----
+ fflush
+ 	"compatibility to map the stdio fflush(FILE *) routine onto flush"
+ 	self flush!

More information about the Vm-dev mailing list