Fixed PPCGuard>>compileCharacter:
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 26 Oct 2014 22:49:03 +0000
changeset 396 ec569977267a
parent 395 c6c712fc15b7
child 397 530d98b90b13
Fixed PPCGuard>>compileCharacter: Use #storeString instead of #printString - #storeString is defined as string whose evaluation would return the receiver (resp. object equal to reveiver).
compiler/PPCGuard.st
compiler/PPCNotCharSetPredicateNode.st
compiler/compiler.rc
compiler/tests/PPCNodeCompilingTest.st
compiler/tests/tests.rc
--- a/compiler/PPCGuard.st	Sun Oct 26 22:08:41 2014 +0000
+++ b/compiler/PPCGuard.st	Sun Oct 26 22:49:03 2014 +0000
@@ -52,18 +52,19 @@
 !
 
 compileCharacter: compiler
-	self assert: (classification select: [ :e | e ]) size = 1.
-	
-	classification keysAndValuesDo: [ :index :value | value ifTrue: [  
-		(index > 32 and: [ index < 127 ]) ifTrue: [ 
-			compiler add: '(context peek = ', (Character value: index) printString, ')'
-		] ifFalse: [ 
-			id := compiler idFor: (Character value: index) prefixed: #character.
-			compiler addConstant: (Character value: index) as: id.
-			compiler add: '(context peek = ', id, ')'.
-	 	] 
-	] ].
+        self assert: (classification select: [ :e | e ]) size = 1.
+        
+        classification keysAndValuesDo: [ :index :value | value ifTrue: [  
+                (index > 32 and: [ index < 127 ]) ifTrue: [ 
+                        compiler add: '(context peek = ', (Character value: index) storeString, ')'
+                ] ifFalse: [ 
+                        id := compiler idFor: (Character value: index) prefixed: #character.
+                        compiler addConstant: (Character value: index) as: id.
+                        compiler add: '(context peek = ', id, ')'.
+                ] 
+        ] ].
 
+    "Modified: / 26-10-2014 / 22:13:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 compileGuard: compiler id: symbol
--- a/compiler/PPCNotCharSetPredicateNode.st	Sun Oct 26 22:08:41 2014 +0000
+++ b/compiler/PPCNotCharSetPredicateNode.st	Sun Oct 26 22:49:03 2014 +0000
@@ -7,6 +7,7 @@
 	category:'PetitCompiler-Nodes'
 !
 
+
 !PPCNotCharSetPredicateNode methodsFor:'as yet unclassified'!
 
 asInlined
@@ -33,3 +34,10 @@
 	^ (PPPredicateObjectParser on: predicate message: 'predicate not expected') not.
 ! !
 
+!PPCNotCharSetPredicateNode class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/compiler.rc	Sun Oct 26 22:08:41 2014 +0000
+++ b/compiler/compiler.rc	Sun Oct 26 22:49:03 2014 +0000
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2014\nCopyright eXept Software AG 1998-2014\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.4.0\0"
-      VALUE "ProductDate", "Sun, 26 Oct 2014 14:56:40 GMT\0"
+      VALUE "ProductDate", "Sun, 26 Oct 2014 22:46:23 GMT\0"
     END
 
   END
--- a/compiler/tests/PPCNodeCompilingTest.st	Sun Oct 26 22:08:41 2014 +0000
+++ b/compiler/tests/PPCNodeCompilingTest.st	Sun Oct 26 22:49:03 2014 +0000
@@ -7,6 +7,7 @@
 	category:'PetitCompiler-Tests-Nodes'
 !
 
+
 !PPCNodeCompilingTest methodsFor:'context'!
 
 context	
@@ -480,3 +481,10 @@
 	self assert: parser parse: 'ba' to: #($b $a).
 ! !
 
+!PPCNodeCompilingTest class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+
--- a/compiler/tests/tests.rc	Sun Oct 26 22:08:41 2014 +0000
+++ b/compiler/tests/tests.rc	Sun Oct 26 22:49:03 2014 +0000
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2014\nCopyright eXept Software AG 1998-2014\0"
       VALUE "ProductName", "Smalltalk/X\0"
       VALUE "ProductVersion", "6.2.4.0\0"
-      VALUE "ProductDate", "Sun, 26 Oct 2014 14:56:41 GMT\0"
+      VALUE "ProductDate", "Sun, 26 Oct 2014 22:46:25 GMT\0"
     END
 
   END