--- a/AbstractOperatingSystem.st Mon May 18 02:08:20 2015 +0200
+++ b/AbstractOperatingSystem.st Mon May 18 02:16:20 2015 +0200
@@ -3079,7 +3079,11 @@
unblocking, in case of nested block/unblock calls."
%{ /* NOCONTEXT */
+#ifdef __SCHTEAM__
+ return __c__._RETURN( __c__.blockInterrupts() ? STObject.True : STObject.False);
+#else
RETURN ( __BLOCKINTERRUPTS() );
+#endif /* not SCHTEAM */
%}
!
@@ -3438,7 +3442,11 @@
calls - you must only unblock after a blockcall if they where
really not blocked before. See OperatingSystemclass>>blockInterrupts."
%{
+#ifdef __SCHTEAM__
+ return __c__._RETURN( __c__.unblockInterrupts() ? STObject.True : STObject.False);
+#else
RETURN(__UNBLOCKINTERRUPTS());
+#endif
%}
! !
@@ -7735,11 +7743,11 @@
!AbstractOperatingSystem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.300 2015-05-16 09:59:50 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.301 2015-05-18 00:16:20 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.300 2015-05-16 09:59:50 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.301 2015-05-18 00:16:20 cg Exp $'
! !
--- a/Behavior.st Mon May 18 02:08:20 2015 +0200
+++ b/Behavior.st Mon May 18 02:16:20 2015 +0200
@@ -2507,7 +2507,9 @@
%{ /* NOCONTEXT */
#ifdef __SCHTEAM__
- return __c__._RETURN( self.basicNew() );
+ if (anInteger.isSmallInteger()) {
+ return __c__._RETURN( self.basicNew( anInteger.intValue()) );
+ }
#else
OBJ newobj;
unsigned INT nInstVars;
@@ -3911,6 +3913,18 @@
"return true, if I am a subclass of the argument, aClass"
%{ /* NOCONTEXT */
+#ifdef __SCHTEAM__
+ STClass theClass = self.superClazz();
+
+ while (theClass != null) {
+ if (theClass == aClass) {
+ return __c__._RETURN_true();
+ }
+ theClass = theClass.superClazz();
+ }
+ return __c__._RETURN_false();
+ /* NOTREACHED */
+#else
OBJ __theClass = __INST(superclass);
int n = 0;
@@ -3927,6 +3941,7 @@
}
RETURN (false);
vmError: ;
+#endif /* not SCHTEAM */
%}.
VMInternalError raiseErrorString:'deep inheritance'.
@@ -4057,9 +4072,9 @@
instances of SmallInteger and UndefinedObject"
self allInstancesDo:[:anObject |
- (predicate value:anObject) ifTrue:[
- action value:anObject
- ].
+ (predicate value:anObject) ifTrue:[
+ action value:anObject
+ ].
].
"
@@ -5282,10 +5297,10 @@
!Behavior class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.375 2015-05-16 09:51:38 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.376 2015-05-18 00:16:20 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.375 2015-05-16 09:51:38 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Behavior.st,v 1.376 2015-05-18 00:16:20 cg Exp $'
! !
--- a/Context.st Mon May 18 02:08:20 2015 +0200
+++ b/Context.st Mon May 18 02:16:20 2015 +0200
@@ -1016,7 +1016,7 @@
self receiverPrintString errorPrint. ' ' errorPrint. selector errorPrint.
self numArgs ~~ 0 ifTrue: [
- ' ' errorPrint. self argsDisplayString errorPrint
+ ' ' errorPrint. self argsDisplayString errorPrint
].
' [' errorPrint. self lineNumber errorPrint. ']' errorPrintCR
@@ -1161,7 +1161,8 @@
%{ /* NOCONTEXT */
#ifdef __SCHTEAM__
- ERROR("unimplemented");
+ return __c__.RESTART(self);
+ /* NOTREACHED */
#else
if (__INST(sender_) == nil) {
RETURN(nil);
@@ -2842,11 +2843,11 @@
!Context class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.220 2015-04-27 17:06:10 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.221 2015-05-18 00:16:20 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.220 2015-04-27 17:06:10 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.221 2015-05-18 00:16:20 cg Exp $'
!
version_HG
--- a/ExternalStream.st Mon May 18 02:08:20 2015 +0200
+++ b/ExternalStream.st Mon May 18 02:16:20 2015 +0200
@@ -3591,6 +3591,20 @@
|error|
%{
+#ifdef __SCHTEAM__
+ STObject handle = self.instVarAt(I_handle);
+
+ if (handle != STObject.Nil) {
+ STObject next;
+
+ next = handle.nextByte();
+ if (next != STObject.EOF) {
+ self.instVarAt_put(I_position, STObject.Nil);
+ return __c__._RETURN( next );
+ }
+ self.instVarAt_put(I_hitEOF, STObject.True);
+ }
+#else
FILEPOINTER f;
unsigned char byte;
int ret, _buffered;
@@ -3631,6 +3645,7 @@
}
}
}
+#endif /* not SCHTEAM */
%}.
hitEOF ifTrue:[^ self pastEndRead].
error notNil ifTrue:[
@@ -4892,6 +4907,24 @@
|c error|
%{
+#ifdef __SCHTEAM__
+ STObject handle = self.instVarAt(I_handle);
+
+ if (handle != STObject.Nil) {
+ STObject next;
+
+ if (self.instVarAt(I_binary) == STObject.True) {
+ next = handle.nextByte();
+ } else {
+ next = handle.nextChar();
+ }
+ if (next != STObject.EOF) {
+ self.instVarAt_put(I_position, STObject.Nil);
+ return __c__._RETURN( next );
+ }
+ self.instVarAt_put(I_hitEOF, STObject.True);
+ }
+#else
FILEPOINTER f;
int ret, _buffered;
OBJ pos, fp;
@@ -4931,9 +4964,9 @@
__INST(position) = nil;
if ((ret < 0)
-#ifdef ECONNRESET
+# ifdef ECONNRESET
&& (__threadErrno != ECONNRESET)
-#endif
+# endif
){
error = __mkSmallInteger(__threadErrno);
} else /* ret == 0 */ {
@@ -4941,6 +4974,7 @@
}
}
}
+#endif /* not SCHTEAM */
%}.
hitEOF == true ifTrue:[^ self pastEndRead].
error notNil ifTrue:[
@@ -5472,19 +5506,19 @@
wasBlocked := OperatingSystem blockInterrupts.
inputSema := Semaphore new name:'readWait'.
[
- timeoutOrNil notNil ifTrue:[
- Processor signal:inputSema afterMilliseconds:timeoutOrNil.
- ].
- Processor signal:inputSema onInput:fd.
- Processor activeProcess state:#ioWait.
- inputSema wait.
- hasTimedout := timeoutOrNil notNil and:[(OperatingSystem readCheck:fd) not].
+ timeoutOrNil notNil ifTrue:[
+ Processor signal:inputSema afterMilliseconds:timeoutOrNil.
+ ].
+ Processor signal:inputSema onInput:fd.
+ Processor activeProcess state:#ioWait.
+ inputSema wait.
+ hasTimedout := timeoutOrNil notNil and:[(OperatingSystem readCheck:fd) not].
] ifCurtailed:[
- Processor disableSemaphore:inputSema.
- wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
+ Processor disableSemaphore:inputSema.
+ wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
].
timeoutOrNil notNil ifTrue:[
- Processor disableSemaphore:inputSema.
+ Processor disableSemaphore:inputSema.
].
wasBlocked ifFalse:[OperatingSystem unblockInterrupts].
^ hasTimedout
@@ -5693,6 +5727,16 @@
|error|
%{
+#ifdef __SCHTEAM__
+ STObject handle = self.instVarAt(I_handle);
+
+ if ((handle != STObject.Nil)
+ && (aCharacter.isSTCharacter())) {
+ handle.writeChar( aCharacter );
+ self.instVarAt_put(I_position, STObject.Nil);
+ return __c__._RETURN_self();
+ }
+#else
FILEPOINTER f;
unsigned codePoint;
unsigned char c;
@@ -5747,11 +5791,11 @@
if (_buffered = (__INST(buffered) == true)) {
__WRITING__(f)
}
-#ifdef WIN32
+# ifdef WIN32
if ((f == __win32_stdout()) || (f == __win32_stderr())) {
cnt = __win32_fwrite(buff, 1, nBytes, f);
} else
-#endif
+# endif
{
__WRITEBYTES__(cnt, f, buff, nBytes, _buffered, __INST(handleType));
}
@@ -5779,6 +5823,7 @@
}
}
out: ;
+#endif /* not SCHTEAM */
%}.
error notNil ifTrue:[
lastErrorNumber := error.
@@ -5812,6 +5857,16 @@
|error|
%{
+#ifdef __SCHTEAM__
+ STObject handle = self.instVarAt(I_handle);
+
+ if ((handle != STObject.Nil)
+ && (aCollection.isSTString())) {
+ handle.writeCharacters( aCollection.asSTString().characters );
+ self.instVarAt_put(I_position, STObject.Nil);
+ return __c__._RETURN_self();
+ }
+#else
FILEPOINTER f;
INT len, cnt;
OBJ fp;
@@ -5908,21 +5963,21 @@
}
len = dp - buf;
-#ifdef WIN32
+# ifdef WIN32
if ((f == __win32_stdout()) || (f == __win32_stderr())) {
cnt = __win32_fwrite(buf, 1, len, f);
} else
-#endif
+# endif
{
__WRITEBYTES__(cnt, f, buf, len, _buffered, __INST(handleType));
}
free(buf);
} else { // No EOL conversion needed
-#ifdef WIN32
+# ifdef WIN32
if ((f == __win32_stdout()) || (f == __win32_stderr())) {
cnt = __win32_fwrite(stringP, 1, len, f);
} else
-#endif
+# endif
{
o_offs = stringP - (char *)__InstPtr(aCollection);
__WRITEBYTES_OBJ__(cnt, f, aCollection, o_offs, len, _buffered, __INST(handleType));
@@ -5940,11 +5995,11 @@
len = __byteArraySize(aCollection) - offs;
} else
goto out;
-#ifdef WIN32
+# ifdef WIN32
if ((f == __win32_stdout()) || (f == __win32_stderr())) {
cnt = __win32_fwrite(__stringVal(aCollection), 1, len, f);
} else
-#endif
+# endif
{
o_offs = (char *)(__ByteArrayInstPtr(aCollection)->ba_element) - (char *)__InstPtr(aCollection);
o_offs += offs;
@@ -5971,6 +6026,7 @@
}
}
out: ;
+#endif /* not SCHTEAM */
%}.
error notNil ifTrue:[
lastErrorNumber := error.
@@ -6210,13 +6266,19 @@
%{
#ifdef __SCHTEAM__
- char[] chars;
byte[] bytes;
STObject handle = self.instVarAt(I_handle);
if (anObject.isSTString()) {
- chars = anObject.asSTString().characters;
+ char[] chars = anObject.asSTString().characters;
handle.writeCharacters(chars, start.intValue(), count.intValue());
+ self.instVarAt_put(I_position, STObject.Nil);
+ return context._RETURN(count);
+ }
+ if (anObject.isSymbol()) {
+ java.lang.String chars = anObject.asSTSymbol().characters;
+ handle.writeString(chars, start.intValue(), count.intValue());
+ self.instVarAt_put(I_position, STObject.Nil);
return context._RETURN(count);
}
#else
@@ -6485,11 +6547,11 @@
!ExternalStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.418 2015-05-08 01:06:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.419 2015-05-18 00:16:20 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.418 2015-05-08 01:06:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.419 2015-05-18 00:16:20 cg Exp $'
! !
--- a/String.st Mon May 18 02:08:20 2015 +0200
+++ b/String.st Mon May 18 02:16:20 2015 +0200
@@ -1515,7 +1515,7 @@
return __c__._RETURN_true();
}
if (aString.isStringLike()) {
- return __c__._RETURN( self.stringEqualP(aString) );
+ return __c__._RETURN( self.stringEqual(aString) ? STObject.True : STObject.False );
}
return __c__._RETURN_false();
/* NOTREACHED */
@@ -2059,7 +2059,7 @@
%{ /* NOCONTEXT */
#ifdef __SCHTEAM__
- return context._RETURN( self.stringEqualP( aString.not()) );
+ return context._RETURN( self.stringEqual( aString ) ? STObject.False : STObject.True);
/* NOTREACHED */
#else
int l1, l2;
@@ -4357,9 +4357,9 @@
!String class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.339 2015-05-16 09:47:11 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.340 2015-05-18 00:16:20 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.339 2015-05-16 09:47:11 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.340 2015-05-18 00:16:20 cg Exp $'
! !