VM Maker: VMMaker.oscog-eem.2759.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-eem.2759.mcz

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

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

Name: VMMaker.oscog-eem.2759
Author: eem
Time: 31 May 2020, 4:30:04.25407 pm
UUID: 830cf133-03ef-4a4e-abbb-856c29f8d4a0
Ancestors: VMMaker.oscog-eem.2758

The minimum alignment of a structure should be determined by a structure that contains an element with minimal alignment requirements, not maximal ones.

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

Item was changed:
  ----- Method: AlignmentStructType class>>printTypedefOn: (in category 'code generation') -----
  printTypedefOn: aStream
+ #('Byte' 'Short' 'Int' 'LongLong' 'Float' 'Double')
+  with: #(#char #short #int #'long long' #float #double) do:
+ [:structName :type|
+ aStream
+ nextPutAll: 'typedef struct { char pad_to_misalgnment; ';
+ nextPutAll: type;
+ nextPutAll: ' element; } struct';
+ nextPutAll: structName;
+ nextPut: $;; cr; cr].
- | union |
- union := String streamContents:
- [:unionStream|
- #('Byte' 'Short' 'Int' 'LongLong' 'Float' 'Double')
-  with: #(#char #short #int #'long long' #float #double) do:
- [:structName :type|
- aStream
- nextPutAll: 'typedef struct { char pad_to_misalgnment; ';
- nextPutAll: type;
- nextPutAll: ' element; } struct';
- nextPutAll: structName;
- nextPut: $;; cr; cr.
- unionStream crtab: 3; nextPutAll: type; space; nextPutAll: structName; nextPut: $;]].
  aStream
+ nextPutAll: 'typedef struct { char pad_to_misalgnment; struct {char c; } element; } structStruct;';
+ cr; cr!
- nextPutAll: 'typedef struct { char pad_to_misalgnment;';
- crtab: 2;
- nextPutAll: 'union {';
- nextPutAll: union;
- crtab: 2;
- nextPutAll: '} element; } structStruct;'!