The Inbox: Kernel-fbs.791.mcz

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

The Inbox: Kernel-fbs.791.mcz

commits-2
A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-fbs.791.mcz

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

Name: Kernel-fbs.791
Author: fbs
Time: 11 July 2013, 8:58:41.496 pm
UUID: a70ef892-e4ef-1a46-9aed-c95fd0ee4cd5
Ancestors: Kernel-fbs.790

Allow the loading of classes with nil environment. (This indicates that a class tracks its superclass' environment.)

=============== Diff against Kernel-fbs.790 ===============

Item was changed:
  ----- Method: Class>>declare: (in category 'initialize-release') -----
  declare: varString
  "Declare class variables common to all instances. Answer whether
  recompilation is advisable."
 
  | newVars conflicts |
 
  newVars :=
  (Scanner new scanFieldNames: varString)
  collect: [:x | x asSymbol].
  newVars do:
  [:var | var first canBeGlobalVarInitial
  ifFalse: [self error: var, ' class variable name should be capitalized; proceed to include anyway.']].
  conflicts := false.
  classPool == nil
  ifFalse: [(classPool keys reject: [:x | newVars includes: x]) do:
  [:var | self removeClassVarName: var]].
  (newVars reject: [:var | self classPool includesKey: var])
  do: [:var | "adding"
  "check if new vars defined elsewhere"
  (self canFindWithoutEnvironment: var) ifTrue: [
  (DuplicateVariableError new)
  superclass: superclass; "fake!!!!!!"
  variable: var;
  signal: var, ' is already defined'.
  conflicts := true]].
  newVars size > 0
  ifTrue:
  [classPool := self classPool.
  "in case it was nil"
+ newVars do: [:var | classPool declare: var from: self environment undeclared]].
- newVars do: [:var | classPool declare: var from: environment undeclared]].
  ^conflicts!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Kernel-fbs.791.mcz

Frank Shearar-3
On 11 July 2013 20:58,  <[hidden email]> wrote:

> A new version of Kernel was added to project The Inbox:
> http://source.squeak.org/inbox/Kernel-fbs.791.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-fbs.791
> Author: fbs
> Time: 11 July 2013, 8:58:41.496 pm
> UUID: a70ef892-e4ef-1a46-9aed-c95fd0ee4cd5
> Ancestors: Kernel-fbs.790
>
> Allow the loading of classes with nil environment. (This indicates that a class tracks its superclass' environment.)
>
> =============== Diff against Kernel-fbs.790 ===============

Has anyone tried this? It works for me, but I while I _think_ it's the
right and proper thing to do, I don't know enough about Environments
to _know_ that. It could be a dirty stinky hack!

Please, try it out. It fixes a serious issue that prevents CI scripts
from updating images.

frank