*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 02 Jun 2003 11:40:55 +0200
changeset 189 ca40184d02a2
parent 188 b6c959b4f5ce
child 190 00252e351d79
*** empty log message ***
RegressionTests__CompilerTest.st
--- a/RegressionTests__CompilerTest.st	Mon Jun 02 11:19:28 2003 +0200
+++ b/RegressionTests__CompilerTest.st	Mon Jun 02 11:40:55 2003 +0200
@@ -1068,6 +1068,50 @@
 
 !CompilerTest methodsFor:'tests - method calls'!
 
+addDumpingMethodForSelfIsLostBug
+    |code mthd|
+
+    code := 
+'_x 
+    ObjectMemory dumpSender.
+    "/ request nextPutAll: ''a''.
+    ObjectMemory garbageCollect.    
+    ObjectMemory dumpSender.
+    "/ request nextPutAll: ''b''.
+'.
+
+    Class withoutUpdatingChangesDo:[
+        mthd := (Smalltalk at:#Compiler) 
+                    compile:code
+                    in:DummyClass 
+                    notifying:nil 
+                    ifFail:[self error].
+    ].
+    ^ mthd
+!
+
+addHaltingMethodForSelfIsLostBug
+    |code mthd|
+
+    code := 
+'_x 
+    request nextPutAll: ''a''.
+    self halt.
+    ObjectMemory garbageCollect.    
+    self halt.
+    request nextPutAll: ''b''.
+'.
+
+    Class withoutUpdatingChangesDo:[
+        mthd := (Smalltalk at:#Compiler) 
+                    compile:code
+                    in:DummyClass 
+                    notifying:nil 
+                    ifFail:[self error].
+    ].
+    ^ mthd
+!
+
 addMethodForSelfIsLostBug
     |code mthd|
 
@@ -1156,6 +1200,38 @@
     "
      self new test_selfIsLost4
     "
+!
+
+xtest_selfIsLost5      
+    |mthd rcvr retVal str|
+
+    str := '' writeStream.
+
+    mthd := self addHaltingMethodForSelfIsLostBug.
+    self removeMethodForSelfIsLostBug.
+    rcvr := DummyClass new.
+    rcvr request:str.
+    retVal := mthd valueWithReceiver:rcvr arguments:#().
+
+    "
+     self new xtest_selfIsLost5
+    "
+!
+
+xtest_selfIsLost6      
+    |mthd rcvr retVal str|
+
+    str := '' writeStream.
+
+    mthd := self addDumpingMethodForSelfIsLostBug.
+    self removeMethodForSelfIsLostBug.
+    rcvr := DummyClass new.
+    rcvr request:str.
+    retVal := mthd valueWithReceiver:rcvr arguments:#().
+
+    "
+     self new xtest_selfIsLost6
+    "
 ! !
 
 !CompilerTest methodsFor:'tests - parsing'!