- ObjectMemory: added debugBreakPoint3 to ease GDB debugging jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 06 Mar 2011 22:17:00 +0000
branchjv
changeset 17826 9d3548674456
parent 17825 f4d9a23457d5
child 17827 01eb98d70b20
- ObjectMemory: added debugBreakPoint3 to ease GDB debugging - Smalltalk: abbrev.stc reading method improved (passes category and size) - ProjectDefinition: sets classcategory for autoloaded classes (based on info in abbrev.stc)
ObjectMemory.st
ProjectDefinition.st
Smalltalk.st
stx_libbasic.st
--- a/ObjectMemory.st	Thu Mar 03 22:52:11 2011 +0000
+++ b/ObjectMemory.st	Sun Mar 06 22:17:00 2011 +0000
@@ -1108,6 +1108,16 @@
 
 !
 
+debugBreakPoint3
+	
+%{
+	extern void __debugBreakPoint3__();
+	__debugBreakPoint3__();
+%}.
+	^ 0
+
+!
+
 trapRestrictedMethods:trap
     "Allow/Deny execution of restricted Methods (see Method>>>restricted:)
 
@@ -5378,7 +5388,7 @@
 !ObjectMemory class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ObjectMemory.st 10602 2010-12-20 07:13:27Z vranyj1 $'
+    ^ '$Id: ObjectMemory.st 10618 2011-03-06 22:17:00Z vranyj1 $'
 !
 
 version_CVS
@@ -5386,7 +5396,7 @@
 !
 
 version_SVN
-    ^ '$Id: ObjectMemory.st 10602 2010-12-20 07:13:27Z vranyj1 $'
+    ^ '$Id: ObjectMemory.st 10618 2011-03-06 22:17:00Z vranyj1 $'
 ! !
 
 ObjectMemory initialize!
--- a/ProjectDefinition.st	Thu Mar 03 22:52:11 2011 +0000
+++ b/ProjectDefinition.st	Sun Mar 06 22:17:00 2011 +0000
@@ -19,7 +19,7 @@
 	category:'System-Support-Projects'
 !
 
-ProjectDefinition class instanceVariableNames:'safeForOverwrittenMethods extensionOverwriteInfo projectIsLoaded'
+ProjectDefinition class instanceVariableNames:'safeForOverwrittenMethods extensionOverwriteInfo projectIsLoaded abbrevs'
 
 "
  No other class instance variables are inherited by this class.
@@ -1064,13 +1064,26 @@
                 ] do:[
                     Smalltalk
                         installAutoloadedClassNamed:className
-                        category:'* as yet unknown category *' 
+                        category:'* as yet unknown category *'
                         package:self package 
                         revision:nil
                 ].
             ].
         ].
 
+    Smalltalk isStandAloneApp ifFalse:[
+        Smalltalk addStartBlock:[        
+            Class withoutUpdatingChangesDo:[
+            self abbrevs.
+            self classNames do:
+                [:nm | | cls|
+                cls := Smalltalk at: nm.
+                (cls notNil and:[cls isLoaded not and:[(abbrevs at:cls name ifAbsent:[nil]) size >= 4]]) ifTrue:
+                    [cls category:
+                        ((abbrevs at: cls name) at: 4)]]]
+        ]
+    ]
+
     "
      stx_libbasic installAutoloadedClasses
      stx_libhtml installAutoloadedClasses
@@ -1078,6 +1091,7 @@
 
     "Created: / 23-10-2006 / 16:02:12 / cg"
     "Modified: / 08-11-2006 / 17:08:06 / cg"
+    "Modified: / 06-03-2011 / 18:26:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !ProjectDefinition class methodsFor:'code generation'!
@@ -4325,6 +4339,29 @@
 
 !ProjectDefinition class methodsFor:'private'!
 
+abbrevs
+
+    | file stream |
+
+    abbrevs ifNil:[
+        abbrevs := Dictionary new.
+        file := self packageDirectory / 'abbrev.stc'.
+        file exists ifTrue:
+            [stream := file readStream.
+            [Smalltalk 
+                withAbbreviationsFromStream:stream 
+                do:[:nm :fn :pkg :cat :sz|
+					abbrevs at: nm put: 
+                        (Array with: nm with: fn with: pkg with: cat with: sz)]
+            ] ensure:[
+                stream close
+            ]]
+    ].
+    ^abbrevs
+
+    "Created: / 06-03-2011 / 18:25:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 additionalClassAttributesFor: aClass
     "Answers additional set of class attributes for given class
      Individual project definitions may override this method, but
@@ -5177,10 +5214,10 @@
         ^asAutoloaded ifTrue:[
             Smalltalk
                 installAutoloadedClassNamed: className
-                category: #autoloaded  "FIXME" 
+                category: ((self abbrevs at: className ifAbsent:[#(nil nil nil #autoloaded)]) at: 4)
                 package: self package
                 revision: nil
-                numClassInstVars: 0 "FIXME"
+                numClassInstVars: ((self abbrevs at: className ifAbsent:[#(nil nil nil nil 0)]) at: 5)
         ] ifFalse: [
             Smalltalk
                 fileInClass:className
@@ -5201,6 +5238,7 @@
     ^nil "FIXME: should return the class"
 
     "Created: / 19-06-2010 / 09:11:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 06-03-2011 / 18:29:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 loadClassLibrary
@@ -6049,7 +6087,7 @@
 !ProjectDefinition class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ProjectDefinition.st 10613 2011-02-26 17:23:57Z vranyj1 $'
+    ^ '$Id: ProjectDefinition.st 10618 2011-03-06 22:17:00Z vranyj1 $'
 !
 
 version_CVS
@@ -6057,7 +6095,7 @@
 !
 
 version_SVN
-    ^ '$Id: ProjectDefinition.st 10613 2011-02-26 17:23:57Z vranyj1 $'
+    ^ '$Id: ProjectDefinition.st 10618 2011-03-06 22:17:00Z vranyj1 $'
 ! !
 
 ProjectDefinition initialize!
--- a/Smalltalk.st	Thu Mar 03 22:52:11 2011 +0000
+++ b/Smalltalk.st	Sun Mar 06 22:17:00 2011 +0000
@@ -29,7 +29,7 @@
 	category:'System-Support'
 !
 
-Smalltalk comment:'declared from: ..\..\..\stx\libbasic\abbrev.stc'
+Smalltalk comment:''
 !
 
 !Smalltalk class methodsFor:'documentation'!
@@ -640,6 +640,7 @@
     Stdout reOpen. Stderr reOpen. Stdin reOpen.
 ! !
 
+
 !Smalltalk class methodsFor:'Compatibility-Squeak'!
 
 at:aKey ifAbsentPut:aBlock
@@ -671,10 +672,6 @@
 
 !
 
-hasClassNamed:aNameStringOrSymbol
-    ^ (self classNamed:aNameStringOrSymbol) notNil
-!
-
 isMorphic
     ^ false
 !
@@ -7053,10 +7050,12 @@
         class-name , abbrev-name, package
      Sigh - all for those poor sys5.3 or MSDOS people with short filenames..."
 
-    |line words nm abbrev pkg s w|
-
+    |line lineNo words nm abbrev pkg category size s w|
+
+    lineNo := 0.
     [aStream atEnd] whileFalse:[
         line := aStream nextLine.
+        lineNo := lineNo + 1.
         line notNil ifTrue:[
             (line startsWith:'#') ifFalse:[
 
@@ -7080,15 +7079,26 @@
                     nm := (words at:1) withoutSeparators.
                     abbrev := (words at:2) withoutSeparators.
                     pkg := (words at:3) withoutSeparators.
-                    aBlock value:nm value:abbrev value:pkg.
+                    aBlock argumentCount = 3 ifTrue:[
+                        aBlock value:nm value:abbrev value:pkg.
+                    ] ifFalse:[
+                        words size >= 4 ifTrue:[
+                            category := words at:4.
+                        ].
+                        words size = 5 ifTrue:[            
+                            size := (words at:5) asNumber
+                        ].
+                        aBlock value:nm value:abbrev value:pkg value: category value: size                            
+                    ]
                 ] ifFalse:[
-                    ('Smalltalk [warning]: malformed line in ' , (aStream pathName)) infoPrintCR.
+                    ('Smalltalk [warning]: malformed line ', lineNo printString , ' in ' , (aStream pathName)) infoPrintCR.
                 ]
             ]
         ]
     ].
 
-    "Modified: / 13.12.1999 / 11:54:17 / cg"
+    "Modified: / 13-12-1999 / 11:54:17 / cg"
+    "Modified: / 06-03-2011 / 18:17:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !Smalltalk class methodsFor:'system management-packages'!
@@ -7540,7 +7550,7 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Id: Smalltalk.st 10604 2011-02-04 23:09:23Z vranyj1 $'
+    ^ '$Id: Smalltalk.st 10618 2011-03-06 22:17:00Z vranyj1 $'
 !
 
 version_CVS
@@ -7548,22 +7558,5 @@
 !
 
 version_SVN
-    ^ '$Id: Smalltalk.st 10604 2011-02-04 23:09:23Z vranyj1 $'
+    ^ '$Id: Smalltalk.st 10618 2011-03-06 22:17:00Z vranyj1 $'
 ! !
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--- a/stx_libbasic.st	Thu Mar 03 22:52:11 2011 +0000
+++ b/stx_libbasic.st	Sun Mar 06 22:17:00 2011 +0000
@@ -529,13 +529,13 @@
     "Return a SVN revision number of myself.
      This number is updated after a commit"
 
-    ^ "$SVN-Revision:"'10610M'"$"
+    ^ "$SVN-Revision:"'10617M'"$"
 ! !
 
 !stx_libbasic class methodsFor:'documentation'!
 
 version
-    ^ '$Id: stx_libbasic.st 10611 2011-02-25 09:57:04Z vranyj1 $'
+    ^ '$Id: stx_libbasic.st 10618 2011-03-06 22:17:00Z vranyj1 $'
 !
 
 version_CVS
@@ -543,7 +543,7 @@
 !
 
 version_SVN
-    ^ '$Id: stx_libbasic.st 10611 2011-02-25 09:57:04Z vranyj1 $'
+    ^ '$Id: stx_libbasic.st 10618 2011-03-06 22:17:00Z vranyj1 $'
 ! !