VM Maker: VMMaker.oscog-nice.2577.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.oscog-nice.2577.mcz

commits-2
 
Nicolas Cellier uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-nice.2577.mcz

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

Name: VMMaker.oscog-nice.2577
Author: nice
Time: 8 November 2019, 9:57:41.377117 am
UUID: a0206f0c-eda9-4e33-9b6c-d99caa2d992c
Ancestors: VMMaker.oscog-eem.2576

For some reason, genSendDirectedSuper:numArgs: method is generated when BytecodeSetHasDirectedSuperSend is false (Newspeak).
This lead to completely broken generated code, which is fortunately unused, but raise false alarms for whoever might want to analyze the C code.
Workaround by generating empty method (the right fix being to not generate at all).

Avoid naming a variable 'bool' in generated methods, this might become a reserved C word (can lead to problems when compiling with -std-c99 option).

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

Item was changed:
  ----- Method: BalloonEngineSimulation>>assert: (in category 'simulation') -----
+ assert: aBoolean
+ aBoolean ifFalse:[^self error:'Assertion failed'].!
- assert: bool
- bool ifFalse:[^self error:'Assertion failed'].!

Item was changed:
  ----- Method: ImmX11Plugin>>primSetCompositionFocus: (in category 'primitives') -----
+ primSetCompositionFocus: aBoolean
- primSetCompositionFocus: bool
 
  | ret |
  <export: true>
  self primitive: 'primSetCompositionFocus'
  parameters: #(Boolean).
 
+ ret := self cCode: 'setCompositionFocus(aBoolean)'.
- ret := self cCode: 'setCompositionFocus(bool)'.
 
  ret = false ifTrue: [
  interpreterProxy primitiveFail.
  ^ nil
  ].
 
  ^ ret asOop: Boolean
  !

Item was changed:
  ----- Method: ImmX11Plugin>>primSetTextEncUTF8: (in category 'primitives') -----
+ primSetTextEncUTF8: aBoolean
- primSetTextEncUTF8: bool
 
  <export: true>
  self primitive: 'primSetTextEncUTF8'
  parameters: #(Boolean).
+ self cCode: 'textEncodingUTF8 = aBoolean'.
+ ^ aBoolean asOop: Boolean.!
- self cCode: 'textEncodingUTF8 = bool'.
- ^ bool asOop: Boolean.!

Item was changed:
  ----- Method: ObjectMemory>>booleanObjectOf: (in category 'interpreter access') -----
+ booleanObjectOf: aBool
- booleanObjectOf: bool
  <inline: true>
+ ^aBool ifTrue: [trueObj] ifFalse: [falseObj]!
- ^bool ifTrue: [trueObj] ifFalse: [falseObj]!

Item was changed:
  ----- Method: SimpleStackBasedCogit>>genSendDirectedSuper:numArgs: (in category 'bytecode generator support') -----
  genSendDirectedSuper: selectorIndex numArgs: numArgs
  <inline: false>
  "N.B. genPushLiteralVariableGivenDirectedSuper: has already loaded tempOop with the association."
+ BytecodeSetHasDirectedSuperSend
+ ifTrue:
+ [| result |
+ result := self
+ genSend: selectorIndex
+ numArgs: numArgs
+ sendTable: (directedSendUsesBinding
+ ifTrue: [directedSuperBindingSendTrampolines]
+ ifFalse: [directedSuperSendTrampolines]).
+ directedSendUsesBinding := false.
+ ^result]!
- | result |
- result := self
- genSend: selectorIndex
- numArgs: numArgs
- sendTable: (directedSendUsesBinding
- ifTrue: [directedSuperBindingSendTrampolines]
- ifFalse: [directedSuperSendTrampolines]).
- directedSendUsesBinding := false.
- ^result!

Item was changed:
  ----- Method: SpurMemoryManager>>booleanObjectOf: (in category 'primitive support') -----
+ booleanObjectOf: aBool
- booleanObjectOf: bool
  <inline: true>
+ ^aBool ifTrue: [trueObj] ifFalse: [falseObj]!
- ^bool ifTrue: [trueObj] ifFalse: [falseObj]!

Item was changed:
  ----- Method: StackToRegisterMappingCogit>>genSendDirectedSuper:numArgs: (in category 'bytecode generator support') -----
  genSendDirectedSuper: selectorIndex numArgs: numArgs
+ BytecodeSetHasDirectedSuperSend
+ ifTrue:
+ [| result |
+ self assert: self ssTop type = SSConstant.
+ tempOop := self ssTop constant.
+ self ssPop: 1.
+ self marshallSendArguments: numArgs.
+ result := self
+ genMarshalledSend: selectorIndex
+ numArgs: numArgs
+ sendTable: (directedSendUsesBinding
+ ifTrue: [directedSuperBindingSendTrampolines]
+ ifFalse: [directedSuperSendTrampolines]).
+ directedSendUsesBinding := false.
+ ^result]!
- | result |
- self assert: self ssTop type = SSConstant.
- tempOop := self ssTop constant.
- self ssPop: 1.
- self marshallSendArguments: numArgs.
- result := self
- genMarshalledSend: selectorIndex
- numArgs: numArgs
- sendTable: (directedSendUsesBinding
- ifTrue: [directedSuperBindingSendTrampolines]
- ifFalse: [directedSuperSendTrampolines]).
- directedSendUsesBinding := false.
- ^result!