[squeak-dev] The Trunk: Environments-cmm.37.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Dec 20 20:42:50 UTC 2013
Chris Muller uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-cmm.37.mcz
==================== Summary ====================
Name: Environments-cmm.37
Author: cmm
Time: 20 December 2013, 2:42:33.974 pm
UUID: c2e36521-ef29-4aa3-9425-84793a2d007c
Ancestors: Environments-nice.36
Minor cleanups while trying to learn Environments.
=============== Diff against Environments-nice.36 ===============
Item was changed:
----- Method: AddPrefixNamePolicy class>>prefix: (in category 'as yet unclassified') -----
+ prefix: aString
+ ^ self new
+ setPrefix: aString ;
+ yourself!
- prefix: aString
- ^ self basicNew initializeWithPrefix: aString!
Item was removed:
- ----- Method: AddPrefixNamePolicy>>initializeWithPrefix: (in category 'as yet unclassified') -----
- initializeWithPrefix: aString
- self initialize.
- prefix := aString!
Item was changed:
+ ----- Method: AddPrefixNamePolicy>>name:do: (in category 'overriding') -----
- ----- Method: AddPrefixNamePolicy>>name:do: (in category 'as yet unclassified') -----
name: aSymbol do: aBlock
^ (aSymbol beginsWith: prefix) ifFalse:
[aBlock value: (prefix, aSymbol) asSymbol].
!
Item was added:
+ ----- Method: AddPrefixNamePolicy>>setPrefix: (in category 'initialize-release') -----
+ setPrefix: aString
+ prefix := aString!
Item was changed:
+ ----- Method: BindingPolicy class>>namespace: (in category 'create') -----
+ namespace: aDictionary
+ ^ self namespace: aDictionary next: nil!
- ----- Method: BindingPolicy class>>namespace: (in category 'as yet unclassified') -----
- namespace: aNamespace
- ^ self namespace: aNamespace next: nil!
Item was changed:
+ ----- Method: BindingPolicy class>>namespace:next: (in category 'create') -----
+ namespace: aDictionary next: anImport
- ----- Method: BindingPolicy class>>namespace:next: (in category 'as yet unclassified') -----
- namespace: aNamespace next: anImport
^ self
+ namespace: aDictionary
- namespace: aNamespace
policy: AllNamePolicy new
next: anImport!
Item was changed:
+ ----- Method: BindingPolicy class>>namespace:policy: (in category 'create') -----
+ namespace: aDictionary policy: aNamePolicy
+ ^ self
+ namespace: aDictionary
+ policy: aNamePolicy
+ next: nil!
- ----- Method: BindingPolicy class>>namespace:policy: (in category 'as yet unclassified') -----
- namespace: aNamespace policy: aNamePolicy
- ^ self namespace: aNamespace policy: aNamePolicy next: nil!
Item was changed:
+ ----- Method: BindingPolicy class>>namespace:policy:next: (in category 'create') -----
+ namespace: aDictionary policy: aNamePolicy next: anImport
+ ^ self new
+ initializeWithNamespace: aDictionary
- ----- Method: BindingPolicy class>>namespace:policy:next: (in category 'as yet unclassified') -----
- namespace: aNamespace policy: aNamePolicy next: anImport
- ^ self basicNew
- initializeWithNamespace: aNamespace
policy: aNamePolicy
+ next: anImport ;
+
+ yourself!
- next: anImport!
Item was changed:
+ ----- Method: BindingPolicy class>>null (in category 'create') -----
- ----- Method: BindingPolicy class>>null (in category 'as yet unclassified') -----
null
^ self namespace: IdentityDictionary new!
Item was changed:
----- Method: BindingPolicy>>initializeWithNamespace:policy:next: (in category 'initialize-release') -----
+ initializeWithNamespace: namespaceDictionary policy: aNamePolicy next: anImport
+ namespace := namespaceDictionary.
- initializeWithNamespace: aNamespace policy: aNamePolicy next: anImport
- self initialize.
- namespace := aNamespace.
policy := aNamePolicy.
next := anImport!
Item was changed:
Object subclass: #Environment
instanceVariableNames: 'info imports exports declarations references public undeclared'
classVariableNames: 'Default Instances'
poolDictionaries: ''
category: 'Environments-Core'!
+ !Environment commentStamp: 'cmm 12/20/2013 14:10' prior: 0!
+ I am a context for compiling methods. I maintain the namespace of classes and global variables that are visible to the methods compiled within me.
- !Environment commentStamp: 'cwp 5/27/2013 10:10' prior: 0!
- I am a context for compiling methods. I maintain the namespace of classes and gobal variables that are visible to the methods compiled within me.
I have the following instance variables:
info <EnvironmentInfo>
+ Metadata about me and the code I contain.
- Metadata about me and the code I contain
imports <Import>
+ Rules for importing globals from other environments.
- Rules for importing globals from other environments
exports <Export>
+ Rules for exposing globals to other environments.
- Rules for exposing globals to other environments
declarations <IdentityDictionary>
+ Bindings for globals that have been declared inside me.
- Bindings for globals that have been declared inside me
references <IdentityDictionary>
Bindings for globals that are used by methods compiled inside me.
public <IdentityDictionary>
+ Bindings for classes that have been declared inside me, and which satisfy the export rules contain in 'exports'.
- Bindings for classes that have been declared inside me, and which satisfy
- the export rules contain in 'exports'.
undeclared <Dictionary>
+ Bindings for globals that are used by methods compiled inside me, but which aren't present in 'references' and couldn't be found via the rules in 'imports'.!
- Bindings for globals that are used by methods compiled inside me, but
- which aren't present 'references' and couldn't be found via the rules in
- 'imports'.!
Item was changed:
+ ----- Method: ExplicitNamePolicy class>>aliases: (in category 'create') -----
+ aliases: aCollection
+ ^ self new
+ setAliases: aCollection ;
+ yourself!
- ----- Method: ExplicitNamePolicy class>>aliases: (in category 'as yet unclassified') -----
- aliases: aCollection
- ^ self basicNew initializeWithAliases: aCollection!
Item was changed:
+ ----- Method: ExplicitNamePolicy class>>flattenSpec:into: (in category 'create') -----
- ----- Method: ExplicitNamePolicy class>>flattenSpec:into: (in category 'as yet unclassified') -----
flattenSpec: anObject into: names
anObject isSymbol ifTrue:
[^ names at: anObject put: anObject].
anObject isVariableBinding ifTrue:
[^ names add: anObject].
anObject isDictionary ifTrue:
[^ names addAll: anObject].
anObject do:
[:ea | self flattenSpec: ea into: names]!
Item was changed:
+ ----- Method: ExplicitNamePolicy class>>spec: (in category 'create') -----
- ----- Method: ExplicitNamePolicy class>>spec: (in category 'as yet unclassified') -----
spec: anObject
| aliases |
(anObject isKindOf: NamePolicy) ifTrue: [^ anObject].
aliases := IdentityDictionary new.
self flattenSpec: anObject into: aliases.
^ self aliases: aliases!
Item was removed:
- ----- Method: ExplicitNamePolicy>>initializeWithAliases: (in category 'as yet unclassified') -----
- initializeWithAliases: aCollection
- self initialize.
- aliases := IdentityDictionary withAll: aCollection!
Item was changed:
+ ----- Method: ExplicitNamePolicy>>name:do: (in category 'overriding') -----
- ----- Method: ExplicitNamePolicy>>name:do: (in category 'as yet unclassified') -----
name: aSymbol do: aBlock
^ aBlock value: (aliases at: aSymbol ifAbsent: [^ nil])!
Item was added:
+ ----- Method: ExplicitNamePolicy>>setAliases: (in category 'initialize-release') -----
+ setAliases: aCollection
+ aliases := IdentityDictionary withAll: aCollection!
Item was changed:
+ ----- Method: RemovePrefixNamePolicy class>>prefix: (in category 'create') -----
+ prefix: aString
+ ^ self new
+ setPrefix: aString ;
+ yourself!
- ----- Method: RemovePrefixNamePolicy class>>prefix: (in category 'as yet unclassified') -----
- prefix: aString
- ^ self basicNew initializeWithPrefix: aString!
Item was removed:
- ----- Method: RemovePrefixNamePolicy>>initializeWithPrefix: (in category 'as yet unclassified') -----
- initializeWithPrefix: aString
- self initialize.
- prefix := aString!
Item was changed:
+ ----- Method: RemovePrefixNamePolicy>>name:do: (in category 'overriding') -----
- ----- Method: RemovePrefixNamePolicy>>name:do: (in category 'as yet unclassified') -----
name: aSymbol do: aBlock
^ (aSymbol beginsWith: prefix)
ifTrue: [aBlock value: (aSymbol allButFirst: prefix size) asSymbol]!
Item was added:
+ ----- Method: RemovePrefixNamePolicy>>setPrefix: (in category 'initialize-release') -----
+ setPrefix: aString
+ prefix := aString!
More information about the Squeak-dev
mailing list
|