Browse Source

combine fixes for Issue143 and Issue152 since both affect the fileout order so minimize burden for merging into my branch which already has a fix for Issue143

Dale Henrichs 13 years ago
parent
commit
0cb0c59108
3 changed files with 43 additions and 43 deletions
  1. 1 1
      js/Compiler.deploy.js
  2. 2 2
      js/Compiler.js
  3. 40 40
      st/Compiler.st

+ 1 - 1
js/Compiler.deploy.js

@@ -198,7 +198,7 @@ fn: function (aClass, aStream){
 var self=this;
 (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(unescape("%20subclass%3A%20%23"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [unescape("%09instanceVariableNames%3A%20%27")]);})(aStream);
 smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);
-(function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%27")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%09category%3A%20%27"), "__comma", [smalltalk.send(aClass, "_category", [])]), "__comma", [unescape("%27%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);
+(function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%27")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%09package%3A%20%27"), "__comma", [smalltalk.send(aClass, "_category", [])]), "__comma", [unescape("%27%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);
 ((($receiver = smalltalk.send(smalltalk.send(aClass, "_comment", []), "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%21"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [unescape("%20commentStamp%21")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", [unescape("%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%21"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [unescape("%20commentStamp%21")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", [unescape("%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);})]));
 smalltalk.send(aStream, "_lf", []);
 return self;}

+ 2 - 2
js/Compiler.js

@@ -274,12 +274,12 @@ fn: function (aClass, aStream){
 var self=this;
 (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(unescape("%20subclass%3A%20%23"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [unescape("%09instanceVariableNames%3A%20%27")]);})(aStream);
 smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);
-(function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%27")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%09category%3A%20%27"), "__comma", [smalltalk.send(aClass, "_category", [])]), "__comma", [unescape("%27%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);
+(function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("%27")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%09package%3A%20%27"), "__comma", [smalltalk.send(aClass, "_category", [])]), "__comma", [unescape("%27%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);
 ((($receiver = smalltalk.send(smalltalk.send(aClass, "_comment", []), "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%21"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [unescape("%20commentStamp%21")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", [unescape("%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%21"), "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [unescape("%20commentStamp%21")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", [unescape("%21")])]);return smalltalk.send($rec, "_lf", []);})(aStream);})]));
 smalltalk.send(aStream, "_lf", []);
 return self;},
 args: ["aClass", "aStream"],
-source: unescape('exportDefinitionOf%3A%20aClass%20on%3A%20aStream%0A%09%22Chunk%20format.%22%0A%0A%09aStream%20%0A%09%20%20%20%20nextPutAll%3A%20%28self%20classNameFor%3A%20aClass%20superclass%29%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%20subclass%3A%20%23%27%2C%20%28self%20classNameFor%3A%20aClass%29%3B%20lf%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%09instanceVariableNames%3A%20%27%27%27.%0A%09aClass%20instanceVariableNames%20%0A%09%20%20%20%20do%3A%20%5B%3Aeach%20%7C%20aStream%20nextPutAll%3A%20each%5D%0A%09%20%20%20%20separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%20%27%5D.%0A%09aStream%09%0A%09%20%20%20%20nextPutAll%3A%20%27%27%27%27%3B%20lf%3B%0A%09%20%20%20%20nextPutAll%3A%20%27%09category%3A%20%27%27%27%2C%20aClass%20category%2C%20%27%27%27%21%27%3B%20lf.%0A%20%09aClass%20comment%20notEmpty%20ifTrue%3A%20%5B%0A%09%20%20%20%20aStream%20%0A%09%09nextPutAll%3A%20%27%21%27%2C%20%28self%20classNameFor%3A%20aClass%29%2C%20%27%20commentStamp%21%27%3Blf%3B%0A%09%09nextPutAll%3A%20%28self%20chunkEscape%3A%20aClass%20comment%29%2C%20%27%21%27%3Blf%5D.%0A%09aStream%20lf'),
+source: unescape('exportDefinitionOf%3A%20aClass%20on%3A%20aStream%0A%20%20%20%20%22Chunk%20format.%22%0A%0A%20%20%20%20aStream%20%0A%20%20%20%20%20%20%20%20nextPutAll%3A%20%28self%20classNameFor%3A%20aClass%20superclass%29%3B%0A%20%20%20%20%20%20%20%20nextPutAll%3A%20%27%20subclass%3A%20%23%27%2C%20%28self%20classNameFor%3A%20aClass%29%3B%20lf%3B%0A%20%20%20%20%20%20%20%20nextPutAll%3A%20%27%09instanceVariableNames%3A%20%27%27%27.%0A%20%20%20%20aClass%20instanceVariableNames%20%0A%20%20%20%20%20%20%20%20do%3A%20%5B%3Aeach%20%7C%20aStream%20nextPutAll%3A%20each%5D%0A%20%20%20%20%20%20%20%20separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%20%27%5D.%0A%20%20%20%20aStream%20%0A%20%20%20%20%20%20%20%20nextPutAll%3A%20%27%27%27%27%3B%20lf%3B%0A%20%20%20%20%20%20%20%20nextPutAll%3A%20%27%09package%3A%20%27%27%27%2C%20aClass%20category%2C%20%27%27%27%21%27%3B%20lf.%0A%20%20%20%20aClass%20comment%20notEmpty%20ifTrue%3A%20%5B%0A%20%20%20%20%20%20%20%20aStream%20%0A%20%20%20%20%20%20%20%20nextPutAll%3A%20%27%21%27%2C%20%28self%20classNameFor%3A%20aClass%29%2C%20%27%20commentStamp%21%27%3Blf%3B%0A%20%20%20%20%20%20%20%20nextPutAll%3A%20%28self%20chunkEscape%3A%20aClass%20comment%29%2C%20%27%21%27%3Blf%5D.%0A%20%20%20%20aStream%20lf'),
 messageSends: ["nextPutAll:", "classNameFor:", "superclass", unescape("%2C"), "lf", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "notEmpty", "comment", "chunkEscape:"],
 referencedClasses: []
 }),

+ 40 - 40
st/Compiler.st

@@ -1,7 +1,7 @@
 Smalltalk current createPackage: 'Compiler' properties: #{}!
 Object subclass: #ChunkParser
 	instanceVariableNames: 'stream'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!ChunkParser methodsFor: 'accessing'!!
 
@@ -42,11 +42,11 @@ on: aStream
 
 Object subclass: #DoIt
 	instanceVariableNames: ''
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 Object subclass: #Exporter
 	instanceVariableNames: ''
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!Exporter methodsFor: 'fileOut'!!
 
@@ -175,7 +175,7 @@ exportPackageExtensionsOf: package on: aStream
 
 Exporter subclass: #ChunkExporter
 	instanceVariableNames: ''
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!ChunkExporter methodsFor: 'not yet classified'!!
 
@@ -195,23 +195,23 @@ classNameFor: aClass
 !
 
 exportDefinitionOf: aClass on: aStream
-	"Chunk format."
-
-	aStream 
-	    nextPutAll: (self classNameFor: aClass superclass);
-	    nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;
-	    nextPutAll: '	instanceVariableNames: '''.
-	aClass instanceVariableNames 
-	    do: [:each | aStream nextPutAll: each]
-	    separatedBy: [aStream nextPutAll: ' '].
-	aStream	
-	    nextPutAll: ''''; lf;
-	    nextPutAll: '	category: ''', aClass category, '''!!'; lf.
- 	aClass comment notEmpty ifTrue: [
-	    aStream 
-		nextPutAll: '!!', (self classNameFor: aClass), ' commentStamp!!';lf;
-		nextPutAll: (self chunkEscape: aClass comment), '!!';lf].
-	aStream lf
+    "Chunk format."
+
+    aStream 
+        nextPutAll: (self classNameFor: aClass superclass);
+        nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;
+        nextPutAll: '	instanceVariableNames: '''.
+    aClass instanceVariableNames 
+        do: [:each | aStream nextPutAll: each]
+        separatedBy: [aStream nextPutAll: ' '].
+    aStream 
+        nextPutAll: ''''; lf;
+        nextPutAll: '	package: ''', aClass category, '''!!'; lf.
+    aClass comment notEmpty ifTrue: [
+        aStream 
+        nextPutAll: '!!', (self classNameFor: aClass), ' commentStamp!!';lf;
+        nextPutAll: (self chunkEscape: aClass comment), '!!';lf].
+    aStream lf
 !
 
 exportMetaDefinitionOf: aClass on: aStream
@@ -289,7 +289,7 @@ exportPackageExtensionsOf: package on: aStream
 
 Exporter subclass: #StrippedExporter
 	instanceVariableNames: ''
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!StrippedExporter methodsFor: 'private'!!
 
@@ -323,7 +323,7 @@ exportMethod: aMethod of: aClass on: aStream
 
 Object subclass: #Importer
 	instanceVariableNames: ''
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!Importer methodsFor: 'fileIn'!!
 
@@ -345,7 +345,7 @@ import: aStream
 
 Object subclass: #Node
 	instanceVariableNames: 'nodes'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!Node methodsFor: 'accessing'!!
 
@@ -385,7 +385,7 @@ accept: aVisitor
 
 Node subclass: #AssignmentNode
 	instanceVariableNames: 'left right'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!AssignmentNode methodsFor: 'accessing'!!
 
@@ -414,7 +414,7 @@ accept: aVisitor
 
 Node subclass: #BlockNode
 	instanceVariableNames: 'parameters inlined'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!BlockNode methodsFor: 'accessing'!!
 
@@ -448,7 +448,7 @@ accept: aVisitor
 
 Node subclass: #CascadeNode
 	instanceVariableNames: 'receiver'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!CascadeNode methodsFor: 'accessing'!!
 
@@ -468,7 +468,7 @@ accept: aVisitor
 
 Node subclass: #DynamicArrayNode
 	instanceVariableNames: ''
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!DynamicArrayNode methodsFor: 'visiting'!!
 
@@ -478,7 +478,7 @@ accept: aVisitor
 
 Node subclass: #DynamicDictionaryNode
 	instanceVariableNames: ''
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!DynamicDictionaryNode methodsFor: 'visiting'!!
 
@@ -488,7 +488,7 @@ accept: aVisitor
 
 Node subclass: #JSStatementNode
 	instanceVariableNames: 'source'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!JSStatementNode methodsFor: 'accessing'!!
 
@@ -508,7 +508,7 @@ accept: aVisitor
 
 Node subclass: #MethodNode
 	instanceVariableNames: 'selector arguments source'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!MethodNode methodsFor: 'accessing'!!
 
@@ -544,7 +544,7 @@ accept: aVisitor
 
 Node subclass: #ReturnNode
 	instanceVariableNames: ''
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!ReturnNode methodsFor: 'visiting'!!
 
@@ -554,7 +554,7 @@ accept: aVisitor
 
 Node subclass: #SendNode
 	instanceVariableNames: 'selector arguments receiver'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!SendNode methodsFor: 'accessing'!!
 
@@ -612,7 +612,7 @@ accept: aVisitor
 
 Node subclass: #SequenceNode
 	instanceVariableNames: 'temps'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!SequenceNode methodsFor: 'accessing'!!
 
@@ -641,7 +641,7 @@ accept: aVisitor
 
 SequenceNode subclass: #BlockSequenceNode
 	instanceVariableNames: ''
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!BlockSequenceNode methodsFor: 'testing'!!
 
@@ -657,7 +657,7 @@ accept: aVisitor
 
 Node subclass: #ValueNode
 	instanceVariableNames: 'value'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!ValueNode methodsFor: 'accessing'!!
 
@@ -683,7 +683,7 @@ accept: aVisitor
 
 ValueNode subclass: #VariableNode
 	instanceVariableNames: 'assigned'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!VariableNode methodsFor: 'accessing'!!
 
@@ -703,7 +703,7 @@ accept: aVisitor
 
 VariableNode subclass: #ClassReferenceNode
 	instanceVariableNames: ''
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!ClassReferenceNode methodsFor: 'visiting'!!
 
@@ -713,7 +713,7 @@ accept: aVisitor
 
 Object subclass: #NodeVisitor
 	instanceVariableNames: ''
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!NodeVisitor methodsFor: 'visiting'!!
 
@@ -786,7 +786,7 @@ visitVariableNode: aNode
 
 NodeVisitor subclass: #Compiler
 	instanceVariableNames: 'stream nestedBlocks earlyReturn currentClass currentSelector unknownVariables tempVariables messageSends referencedClasses classReferenced source argVariables'
-	category: 'Compiler'!
+	package: 'Compiler'!
 
 !!Compiler methodsFor: 'accessing'!!