VM Maker: VMMaker-dtl.255.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: VMMaker-dtl.255.mcz

commits-2
 
David T. Lewis uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker-dtl.255.mcz

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

Name: VMMaker-dtl.255
Author: dtl
Time: 9 October 2011, 9:34:17.138 am
UUID: ead42d75-bb43-46ec-9efd-cccc7f65557d
Ancestors: VMMaker-dtl.254

VMMaker 4.7.12

bytecodePrimMultiply optimization from Stefan Marr and Eliot Miranda, per VMMaker.oscog-eem.133, background at http://lists.squeakfoundation.org/pipermail/vm-dev/2011-October/009493.html

>From oscog, adopt all ccg:prolog:expr:exdex: and ccg:generateCoerceToValueFrom:on: updates, move misplaced methods in Unsigned to class side, adopt missing cPreprocessorDirective: (note redundant #cProcessorDirective and #preprocessorExpression implementations in trunk and oscog, consider using Dave's method name and Eliot's implementation).

=============== Diff against VMMaker-dtl.254 ===============

Item was changed:
  ----- Method: ArrayedCollection class>>ccg:generateCoerceToOopFrom:on: (in category '*VMMaker-plugin generation') -----
  ccg: cg generateCoerceToOopFrom: aNode on: aStream
+ "N.B.  The is used both for generation and simulation so answer the result (for interpretation)"
-
  self instSize > 0 ifTrue:
  [self error: 'cannot auto-coerce arrays with named instance variables'].
+ ^cg generateCoerceToObjectFromPtr: aNode on: aStream!
- cg generateCoerceToObjectFromPtr: aNode on: aStream!

Item was changed:
  ----- Method: ArrayedCollection class>>ccg:generateCoerceToValueFrom:on: (in category '*VMMaker-plugin generation') -----
  ccg: cg generateCoerceToValueFrom: aNode on: aStream
+ "N.B.  The could be used both for generation and simulation so answer the result (for interpretation)"
+ ^cg
-
- cg
  generateCoerceToPtr: (self ccgDeclareCForVar: '')
  fromObject: aNode on: aStream!

Item was changed:
  ----- Method: Boolean class>>ccg:generateCoerceToOopFrom:on: (in category '*VMMaker-plugin generation') -----
  ccg: cg generateCoerceToOopFrom: aNode on: aStream
+ "N.B.  The is used both for generation and simulation so answer the result (for interpretation)"
+ ^cg generateCoerceToBooleanObjectFrom: aNode on: aStream!
-
- cg generateCoerceToBooleanObjectFrom: aNode on: aStream!

Item was changed:
  ----- Method: Boolean class>>ccg:generateCoerceToValueFrom:on: (in category '*VMMaker-plugin generation') -----
  ccg: cg generateCoerceToValueFrom: aNode on: aStream
+ "N.B.  The could be used both for generation and simulation so answer the result (for interpretation)"
+ ^cg generateCoerceToBooleanValueFrom: aNode on: aStream!
-
- cg generateCoerceToBooleanValueFrom: aNode on: aStream!

Item was changed:
  ----- Method: Float class>>ccg:generateCoerceToOopFrom:on: (in category '*VMMaker-plugin generation') -----
  ccg: cg generateCoerceToOopFrom: aNode on: aStream
+ "N.B.  The is used both for generation and simulation so answer the result (for interpretation)"
+ ^cg generateCoerceToFloatObjectFrom: aNode on: aStream!
-
- cg generateCoerceToFloatObjectFrom: aNode on: aStream!

Item was changed:
  ----- Method: Float class>>ccg:generateCoerceToValueFrom:on: (in category '*VMMaker-plugin generation') -----
  ccg: cg generateCoerceToValueFrom: aNode on: aStream
+ "N.B.  The could be used both for generation and simulation so answer the result (for interpretation)"
+ ^cg generateCoerceToFloatValueFrom: aNode on: aStream!
-
- cg generateCoerceToFloatValueFrom: aNode on: aStream!

Item was changed:
  ----- Method: Interpreter>>bytecodePrimMultiply (in category 'common selector sends') -----
  bytecodePrimMultiply
  | rcvr arg result |
  rcvr := self internalStackValue: 1.
  arg := self internalStackValue: 0.
  (self areIntegers: rcvr and: arg)
  ifTrue: [rcvr := self integerValueOf: rcvr.
  arg := self integerValueOf: arg.
  result := rcvr * arg.
+ (arg = 0 or: [(result // arg) = rcvr and: [self isIntegerValue: result]])
- ((arg = 0 or: [(result // arg) = rcvr]) and: [self isIntegerValue: result])
  ifTrue: [self internalPop: 2 thenPush: (self integerObjectOf: result).
  ^ self fetchNextBytecode "success"]]
  ifFalse: [self initPrimCall.
  self externalizeIPandSP.
  self primitiveFloatMultiply: rcvr byArg: arg.
  self internalizeIPandSP.
  self successful ifTrue: [^ self fetchNextBytecode "success"]].
 
  messageSelector := self specialSelector: 8.
  argumentCount := 1.
  self normalSend.
  !

Item was changed:
  ----- Method: Object class>>ccg:generateCoerceToOopFrom:on: (in category '*VMMaker-plugin generation') -----
  ccg: cg generateCoerceToOopFrom: aNode on: aStream
+ "N.B.  The is used both for generation and simulation so answer the result (for interpretation)"
+ ^cg emitCExpression: aNode on: aStream!
-
- cg emitCExpression: aNode on: aStream!

Item was changed:
  ----- Method: Object class>>ccg:generateCoerceToValueFrom:on: (in category '*VMMaker-plugin generation') -----
  ccg: cg generateCoerceToValueFrom: aNode on: aStream
+ "N.B.  The could be used both for generation and simulation so answer the result (for interpretation)"
+ ^cg emitCExpression: aNode on: aStream!
-
- cg emitCExpression: aNode on: aStream!

Item was added:
+ ----- Method: Object>>cPreprocessorDirective: (in category '*VMMaker-translation support') -----
+ cPreprocessorDirective: codeString
+ "For translation only; noop when running in Smalltalk."!

Item was changed:
  ----- Method: Unsigned class>>ccg:generateCoerceToOopFrom:on: (in category 'plugin generation') -----
  ccg: cg generateCoerceToOopFrom: aNode on: aStream
+ "N.B.  The is used both for generation and simulation so answer the result (for interpretation)"
+ ^cg generateCoerceToUnsignedObjectFrom: aNode on: aStream!
-
- cg generateCoerceToUnsignedObjectFrom: aNode on: aStream!

Item was changed:
  ----- Method: Unsigned class>>ccg:generateCoerceToValueFrom:on: (in category 'plugin generation') -----
  ccg: cg generateCoerceToValueFrom: aNode on: aStream
+ "N.B.  The could be used both for generation and simulation so answer the result (for interpretation)"
+ ^cg generateCoerceToUnsignedValueFrom: aNode on: aStream!
-
- cg generateCoerceToUnsignedValueFrom: aNode on: aStream!

Item was added:
+ ----- Method: Unsigned class>>ccg:prolog:expr:index: (in category 'plugin generation') -----
+ ccg: cg prolog: aBlock expr: aString index: anInteger
+
+ ^cg ccgLoad: aBlock expr: aString asUnsignedValueFrom: anInteger!

Item was added:
+ ----- Method: Unsigned class>>ccgDeclareCForVar: (in category 'plugin generation') -----
+ ccgDeclareCForVar: aSymbolOrString
+
+ ^'unsigned long ', aSymbolOrString!

Item was removed:
- ----- Method: Unsigned>>ccg:prolog:expr:index: (in category 'as yet unclassified') -----
- ccg: cg prolog: aBlock expr: aString index: anInteger
-
- ^cg ccgLoad: aBlock expr: aString asUnsignedValueFrom: anInteger!

Item was removed:
- ----- Method: Unsigned>>ccgDeclareCForVar: (in category 'as yet unclassified') -----
- ccgDeclareCForVar: aSymbolOrString
-
- ^'unsigned int ', aSymbolOrString!

Item was changed:
  ----- Method: VMMaker class>>versionString (in category 'version testing') -----
  versionString
 
  "VMMaker versionString"
 
+ ^'4.7.12'!
- ^'4.7.11'!