The Trunk: Compiler-mt.434.mcz

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

The Trunk: Compiler-mt.434.mcz

commits-2
Marcel Taeumel uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-mt.434.mcz

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

Name: Compiler-mt.434
Author: mt
Time: 4 June 2020, 4:00:20.252669 pm
UUID: cc6bcfeb-0feb-5f41-9617-b3296bf78283
Ancestors: Compiler-eem.433

Complements FFI-Kernel-mt.89.

=============== Diff against Compiler-eem.433 ===============

Item was changed:
  ----- Method: Parser>>externalType: (in category 'primitives') -----
  externalType: descriptorClass
+ "Parse and return an external type"
+ | xType typeName |
+ typeName := here. "Note that pointer token is not yet parsed!!"
+ (xType := descriptorClass typeNamed: typeName)
+ ifNil: [
+ "Raise an error if user is there"
+ self interactive ifTrue: [^nil].
+ "otherwise go over it silently -- use an unknown struct type"
+ xType := descriptorClass newTypeNamed: here].
- "Parse an return an external type"
- | xType |
- xType := descriptorClass atomicTypeNamed: here.
- xType == nil ifTrue:["Look up from class scope"
- Symbol hasInterned: here ifTrue:[:sym|
- xType := descriptorClass structTypeNamed: sym]].
- xType == nil ifTrue:[
- "Raise an error if user is there"
- self interactive ifTrue:[^nil].
- "otherwise go over it silently"
- xType := descriptorClass forceTypeNamed: here].
  self advance.
  (self matchToken:#*)
  ifTrue:[^xType asPointerType]
  ifFalse:[^xType]!