Merge jv
authorMerge Script
Wed, 29 Apr 2015 06:39:38 +0200
branchjv
changeset 18304 424139e100b2
parent 18301 d0a478542bbf (current diff)
parent 18303 3168be747a94 (diff)
child 18308 0e48540e3b9f
Merge
AbstractOperatingSystem.st
MessageNotUnderstood.st
--- a/AbstractOperatingSystem.st	Tue Apr 28 07:01:27 2015 +0200
+++ b/AbstractOperatingSystem.st	Wed Apr 29 06:39:38 2015 +0200
@@ -3474,12 +3474,21 @@
      returning an exit-code to the parent unix process."
 
 %{  /* NOCONTEXT */
+#ifdef __SCHTEAM__
+    int code = 1;
+
+    if (exitCode.isSmallInteger()) {
+	code = exitCode.intValue();
+    }
+    STMain.mainExit(code);
+#else
     int code = 1;
 
     if (__isSmallInteger(exitCode)) {
 	code = __intVal(exitCode);
     }
     __mainExit(code);
+#endif
 %}
     "OperatingSystem exit:1 - don't evaluate this"
 !
@@ -3495,7 +3504,10 @@
     extern void abort();
 
     abort();
-%}
+%}.
+    "/ fall back for systems without primitive C code
+    self exit:1
+
     "
      OperatingSystem exitWithCoreDump - don't evaluate this
     "
@@ -7728,11 +7740,11 @@
 !AbstractOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.298 2015-04-24 08:12:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.299 2015-04-28 21:22:13 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.298 2015-04-24 08:12:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.299 2015-04-28 21:22:13 cg Exp $'
 ! !
 
 
--- a/MessageNotUnderstood.st	Tue Apr 28 07:01:27 2015 +0200
+++ b/MessageNotUnderstood.st	Wed Apr 29 06:39:38 2015 +0200
@@ -132,26 +132,36 @@
 description
     "the human readable description of the exception"
 
-    |cls sel description sender|
+    |searchClass sel description sender|
 
     "extract the class that should have implemented the message.
      (in case of a super-send, this is not the receiver's class)"
+
+    "/ suspendedContext is the actual doesNotUnderstand context;
+    "/ its sender is the bad (failing) one, which has the search class information
+    "/ (the doesNotUnderstand is always an undirected send)
+    "/ Q: is that correct VM-behavior?
+    "/ One might argue, that the DNU should be also directed 
+    "/ (or else add the searchClass information to the Message object)
     suspendedContext notNil ifTrue:[
-        cls := suspendedContext searchClass.
+        searchClass := suspendedContext searchClass.
         (sender := suspendedContext sender) notNil ifTrue:[
-            cls := sender searchClass.
+            "/ just in case, this gets ever fixed
+            sender receiver == suspendedContext receiver ifTrue:[
+                searchClass := sender searchClass.
+            ].
         ].
     ].
-    cls isNil ifTrue:[
-        cls := self receiver class.
+    searchClass isNil ifTrue:[
+        searchClass := self receiver class.
     ].
-    cls notNil ifTrue:[
+    searchClass notNil ifTrue:[
         "displayString is better than 'cls name',
          since it appends (obsolete) for outdated classes.
          (this happens if you send messages to old instances
           after changing a classes definition)"
 
-        description := cls displayString.
+        description := searchClass displayString.
         description isString ifFalse:[
             description := '(** ???-class **)'
         ].
@@ -185,11 +195,11 @@
 !MessageNotUnderstood class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/MessageNotUnderstood.st,v 1.14 2015-04-26 11:33:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/MessageNotUnderstood.st,v 1.15 2015-04-28 21:18:21 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/MessageNotUnderstood.st,v 1.14 2015-04-26 11:33:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/MessageNotUnderstood.st,v 1.15 2015-04-28 21:18:21 cg Exp $'
 ! !