FFI: FFI-Kernel-mt.158.mcz

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

FFI: FFI-Kernel-mt.158.mcz

commits-2
Marcel Taeumel uploaded a new version of FFI-Kernel to project FFI:
http://source.squeak.org/FFI/FFI-Kernel-mt.158.mcz

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

Name: FFI-Kernel-mt.158
Author: mt
Time: 17 May 2021, 12:45:36.337555 pm
UUID: e43bcf87-27f2-f04b-82e6-f350dee91c3a
Ancestors: FFI-Kernel-mt.157

Further fixes for code loading. Sorry for the noise :-(

=============== Diff against FFI-Kernel-mt.157 ===============

Item was changed:
  ----- Method: ExternalStructure class>>doneCompiling (in category 'class management') -----
  doneCompiling
  "Base class changed to something that is an external structure now."
 
+ [self compileFields]
+ ifError: [ "Ignore unfinished field specs" ].
+ self externalType isUnknownType
+ ifTrue: [self externalType becomeKnownTypeSafely].!
- [self compileFields] ifError: [ "Ignore unfinished field specs" ].
- self externalType isUnknownType ifTrue: [self externalType becomeKnownType].!

Item was changed:
  ----- Method: ExternalStructureType class>>newTypeForStructureClass: (in category 'instance creation') -----
  newTypeForStructureClass: anExternalStructureClass
 
  | type pointerType referentClass |
  referentClass := anExternalStructureClass.
 
  self
  assert: [referentClass includesBehavior: ExternalStructure]
  description: 'Wrong base class for structure'.
 
  type := self newTypeForUnknownNamed: referentClass name.
  pointerType := type asPointerType.
 
  referentClass compiledSpec
  ifNil: [ "First time. The referent class' fields are probably just compiled for the first time."
  type setReferentClass: referentClass.
  pointerType setReferentClass: referentClass]
  ifNotNil: [
  type newReferentClass: referentClass.
  pointerType newReferentClass: referentClass].
 
+ ^ type becomeKnownTypeSafely!
- ^ [type becomeKnownType] ifError: [
- self assert: [type isUnknownType].
- type "still unkown"]!

Item was added:
+ ----- Method: ExternalUnknownType>>becomeKnownTypeSafely (in category 'construction') -----
+ becomeKnownTypeSafely
+ "Give me some purpose. :-)"
+
+ ^ [self becomeKnownType]
+ on: Error
+ do: [
+ self assert: [self isUnkownType].
+ self].!