The Trunk: Kernel-eem.1064.mcz

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

The Trunk: Kernel-eem.1064.mcz

commits-2
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1064.mcz

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

Name: Kernel-eem.1064
Author: eem
Time: 22 March 2017, 9:21:06.777441 am
UUID: 5779c103-0ef2-470d-ae88-a5a759b47510
Ancestors: Kernel-ul.1063

Fix bug in creating new subclasses of #compiledMethod classes.

=============== Diff against Kernel-ul.1063 ===============

Item was changed:
  ----- Method: ClassBuilder>>superclass:variableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
  superclass: aClass
+ variableByteSubclass: n instanceVariableNames: f
- variableByteSubclass: t instanceVariableNames: f
  classVariableNames: d poolDictionaries: s category: cat
  "This is the standard initialization message for creating a new class as a subclass of an
  existing class in which the subclass is to have indexable 8-bit byte-sized nonpointer variables."
+ | existingOrSuperclass actualType env |
+ aClass instSize > 0 ifTrue:
+ [^self error: 'cannot make a byte subclass of a class with named fields'].
+ (aClass isVariable and: [aClass isBytes not]) ifTrue:
+ [^self error: 'cannot make an 8-bit byte subclass of a class with 16, 32 or 64 bit fields'].
+ (aClass isVariable and: [aClass isPointers]) ifTrue:
+ [^self error: 'cannot make a byte subclass of a class with pointer fields'].
+ existingOrSuperclass := aClass environment at: n ifAbsent: [aClass].
+ actualType := existingOrSuperclass typeOfClass == #compiledMethod
+ ifTrue: [#compiledMethod]
+ ifFalse: [#bytes].
- | oldClassOrNil actualType env |
- aClass instSize > 0
- ifTrue: [^self error: 'cannot make a byte subclass of a class with named fields'].
- (aClass isVariable and: [aClass isBytes not])
- ifTrue: [^self error: 'cannot make an 8-bit byte subclass of a class with 16, 32 or 64 bit fields'].
- (aClass isVariable and: [aClass isPointers])
- ifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields'].
- oldClassOrNil := aClass environment at: t ifAbsent:[nil].
- actualType := (oldClassOrNil notNil
-   and: [oldClassOrNil typeOfClass == #compiledMethod])
- ifTrue: [#compiledMethod]
- ifFalse: [#bytes].
  env := CurrentEnvironment signal ifNil: [aClass environment].
  ^self
+ name: n
- name: t
  inEnvironment: env
  subclassOf: aClass
  type: actualType
  instanceVariableNames: f
  classVariableNames: d
  poolDictionaries: s
  category: cat!