--- a/Character.st Mon Apr 20 12:39:18 2015 +0200
+++ b/Character.st Mon Apr 20 12:48:54 2015 +0200
@@ -138,7 +138,7 @@
"return a character with codePoint anInteger"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
{
char ch = (char)(context.stArg(0).intValue("[codePoint:]"));
@@ -840,7 +840,7 @@
(which is more than mozilla does, btw. ;-)"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
{
char ch = self.charValue("[asLowercase]");
@@ -1009,7 +1009,7 @@
}
RETURN (self);
allocationError: ;
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
^ ObjectMemory allocationFailureSignal raise.
@@ -1155,7 +1155,7 @@
(which is more than mozilla does, btw. ;-)"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
{
char ch = self.charValue("[asUppercase]");
@@ -1336,7 +1336,7 @@
}
RETURN (self);
allocationError: ;
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
^ ObjectMemory allocationFailureSignal raise.
@@ -3035,10 +3035,9 @@
!Character class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Character.st,v 1.160 2015-04-15 00:30:56 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Character.st,v 1.161 2015-04-20 10:48:54 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Character.st,v 1.160 2015-04-15 00:30:56 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Character.st,v 1.161 2015-04-20 10:48:54 cg Exp $'
! !
-
--- a/Context.st Mon Apr 20 12:39:18 2015 +0200
+++ b/Context.st Mon Apr 20 12:48:54 2015 +0200
@@ -252,7 +252,7 @@
|c|
%{
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
OBJ __c__;
__c__ = __ContextInstPtr(__thisContext)->c_sender;
@@ -345,7 +345,7 @@
"ANSI alias for numArgs: return the number of arguments to the Block/Method"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( STInteger._new( ((STContinuation)self).numStArgs() ) );
#else
RETURN ( __mkSmallInteger( (__intVal(__INST(flags)) >> __NARG_SHIFT) & __NARG_MASK) );
@@ -360,7 +360,7 @@
"/ some machines have the arguments/receiver etc. kept in register vars ...
"/ the unfix updates the machine-stack version of the receiver.
%{
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
__UNFIXCONTEXT(self, 0);
#endif
%}.
@@ -392,7 +392,7 @@
|what|
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
{
int idx = context.stArg(0).intValue("[instVarAt:]");
@@ -428,7 +428,7 @@
extension to get this automatically)."
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
if (index == __MKSMALLINT(__SLOT_CONTEXT_SENDER)) { // sender - not allowed to change
@@ -446,7 +446,7 @@
"/ some machines have the arguments kept in register vars ...
"/ the unfix updates the machine-stack version of the receiver.
%{
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
__UNFIXCONTEXT(self, 0);
#endif
%}.
@@ -670,7 +670,7 @@
"return the number of arguments to the Block/Method"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
RETURN ( __mkSmallInteger( (__intVal(__INST(flags)) >> __NARG_SHIFT) & __NARG_MASK) );
@@ -692,7 +692,7 @@
"return the number of local variables of the Block/Method"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
RETURN ( __mkSmallInteger( (__intVal(__INST(flags)) >> __NVAR_SHIFT) & __NVAR_MASK) );
@@ -734,7 +734,7 @@
"/ some machines have the arguments kept in register vars ...
"/ the unfix updates the machine-stack version of the receiver.
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
__UNFIXCONTEXT(self, 0);
@@ -763,7 +763,7 @@
"return the sender of the context"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
OBJ theContext;
@@ -806,7 +806,7 @@
invalid until needed."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
if ( __INST(sender_) == nil ) {
@@ -827,7 +827,7 @@
"set the number of arguments and variables"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
INT flg;
@@ -995,7 +995,7 @@
fixAllLineNumbers
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
__PATCHUPCONTEXTS(__thisContext);
@@ -1156,7 +1156,7 @@
If such a context is restarted, a runtime error is raised."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
if (__INST(sender_) == nil) {
@@ -1216,7 +1216,7 @@
"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
OBJ sndr;
@@ -1267,7 +1267,7 @@
"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
OBJ theContext, sndr;
@@ -1313,7 +1313,7 @@
"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
OBJ theContext, sndr;
@@ -1367,7 +1367,7 @@
If such a context is restarted, a runtime error is raised."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
if (__INST(sender_) == nil) {
@@ -1402,7 +1402,7 @@
If such a context is restarted, a runtime error is raised."
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
if (__INST(sender_) == nil) {
@@ -1665,7 +1665,7 @@
argStringFor:someObject
|s|
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
/*
@@ -2013,7 +2013,7 @@
|receiverClassName|
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
/*
@@ -2039,7 +2039,7 @@
this context - a highly internal mechanism and not for public use."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
RETURN ( ((INT)__INST(flags) & __MASKSMALLINT(__UNWIND_MARK)) ? true : false );
@@ -2056,7 +2056,7 @@
this context - a highly internal mechanism and not for public use."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
__INST(flags) = (OBJ)((INT)__INST(flags) | __MASKSMALLINT(__HANDLE_MARK));
@@ -2072,7 +2072,7 @@
this context upon return - a highly internal mechanism and not for public use."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
__markInterrupted(__ContextInstPtr(self));
@@ -2087,7 +2087,7 @@
- a highly internal mechanism and not for public use."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
__INST(flags) = (OBJ)((INT)__INST(flags) | __MASKSMALLINT(__IRQ_ON_UNWIND));
@@ -2101,7 +2101,7 @@
this context - a highly internal mechanism and not for public use."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
__INST(flags) = (OBJ)((INT)__INST(flags) | __MASKSMALLINT(__RAISE_MARK));
@@ -2117,7 +2117,7 @@
this context - a highly internal mechanism and not for public use."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
__INST(flags) = (OBJ)((INT)__INST(flags) | __MASKSMALLINT(__UNWIND_MARK));
@@ -2139,7 +2139,7 @@
DANGER: this is for experimental, internal use only (byteCode interpreters)"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
__INST(sender_) = aContext;
@@ -2153,7 +2153,7 @@
this context - a highly internal mechanism and not for public use."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
__INST(flags) = (OBJ)((INT)__INST(flags) & ~__MASKSMALLINT(__UNWIND_MARK));
@@ -2186,7 +2186,7 @@
"/ although they aren't really - this is expert knowledge, no need to understand that ...)
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
OBJ theContext;
@@ -2241,7 +2241,7 @@
"/ although they aren't really - this is expert knowledge, no need to understand that ...)
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
{
STObject caller = self.asSTContinuation("sender").caller();
STObject sel1 = context.stArg(0);
@@ -2341,7 +2341,7 @@
"/ although they aren't really - this is expert knowledge, no need to understand that ...)
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
OBJ theContext;
@@ -2401,7 +2401,7 @@
"/ although they aren't really - this is expert knowledge, no need to understand that ...)
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
OBJ theContext;
@@ -2574,7 +2574,7 @@
(i.e. the one that I have called) and return from it.
"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
OBJ sndr;
@@ -2611,7 +2611,7 @@
are all compiled with this flag turned on."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
RETURN ( ((INT)(__INST(flags)) & __MASKSMALLINT(__CANNOT_RETURN)) ? false : true );
@@ -2635,7 +2635,7 @@
"return true, if this is a context with exception-handle flag set"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
RETURN ( ((INT)__INST(flags) & __MASKSMALLINT(__HANDLE_MARK)) ? true : false );
@@ -2652,7 +2652,7 @@
debug query, which may be removed without notice."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
RETURN ( ((INT)__INST(flags) & __MASKSMALLINT(__NONLIFO)) ? true : false );
@@ -2667,7 +2667,7 @@
debug query, which may be removed without notice."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
RETURN ( (__qSpace(self) >= STACKSPACE) ? true : false );
@@ -2679,7 +2679,7 @@
"return true, if this is a context with exception-raise flag set"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
RETURN ( ((INT)__INST(flags) & __MASKSMALLINT(__RAISE_MARK)) ? true : false );
@@ -2691,7 +2691,7 @@
"return true, if this is either a nonLifo or interrupted context"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
RETURN ( ((INT)__INST(flags) & __MASKSMALLINT(__SPECIAL)) ? true : false );
@@ -2703,7 +2703,7 @@
"return true, if this is an unwindContext"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("unimplemented");
#else
RETURN ( ((INT)__INST(flags) & __MASKSMALLINT(__UNWIND_MARK)) ? true : false );
@@ -2832,11 +2832,11 @@
!Context class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.213 2015-04-15 00:31:34 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.214 2015-04-20 10:48:54 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.213 2015-04-15 00:31:34 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Context.st,v 1.214 2015-04-20 10:48:54 cg Exp $'
!
version_HG
--- a/ExternalLibraryFunction.st Mon Apr 20 12:39:18 2015 +0200
+++ b/ExternalLibraryFunction.st Mon Apr 20 12:48:54 2015 +0200
@@ -231,7 +231,7 @@
DLLPATH isNil ifTrue:[
DLLPATH := #('.').
%{
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
@global(FLAG_VIRTUAL) = __MKSMALLINT(__EXTL_FLAG_VIRTUAL); // a virtual c++ call
@global(FLAG_NONVIRTUAL) = __MKSMALLINT(__EXTL_FLAG_NONVIRTUAL); // a non-virtual c++ call
@global(FLAG_OBJECTIVEC) = __MKSMALLINT(__EXTL_FLAG_OBJECTIVEC); // an objectiveC message send
@@ -1693,7 +1693,7 @@
!ExternalLibraryFunction class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.96 2015-04-19 09:45:21 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ExternalLibraryFunction.st,v 1.97 2015-04-20 10:48:54 cg Exp $'
!
version_SVN
--- a/Fraction.st Mon Apr 20 12:39:18 2015 +0200
+++ b/Fraction.st Mon Apr 20 12:48:54 2015 +0200
@@ -84,7 +84,7 @@
|newFraction|
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
if (self == Fraction.Class) {
return context._RETURN(new STFraction(num, den));
}
@@ -119,7 +119,7 @@
}
}
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
den = 0 ifTrue:[
^ ZeroDivide raiseRequestWith:thisContext.
@@ -1191,11 +1191,11 @@
!Fraction class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Fraction.st,v 1.85 2015-04-20 10:39:18 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Fraction.st,v 1.86 2015-04-20 10:48:54 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Fraction.st,v 1.85 2015-04-20 10:39:18 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Fraction.st,v 1.86 2015-04-20 10:48:54 cg Exp $'
! !
--- a/LargeInteger.st Mon Apr 20 12:39:18 2015 +0200
+++ b/LargeInteger.st Mon Apr 20 12:48:54 2015 +0200
@@ -1553,7 +1553,7 @@
"return 8 bits of value, starting at byte index"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( ((STLargeInteger)self).digitAt( index.intValue() ) );
#endif
%}.
@@ -1565,7 +1565,7 @@
"set the 8 bits, index is a byte index"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
ERROR("cannot modify the digits of a LargeInteger");
#endif
%}.
@@ -1580,7 +1580,7 @@
|t digits|
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( ((STLargeInteger)self).digitByteAt( index.intValue() ) );
#endif
%}.
@@ -1615,7 +1615,7 @@
Least significant byte is first!!"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( ((STLargeInteger)self).digitBytes() );
#endif
%}.
@@ -1659,7 +1659,7 @@
|l "{ Class: SmallInteger }" |
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( ((STLargeInteger)self).digitLength() );
#endif
%}.
@@ -5390,7 +5390,7 @@
"return true, if the receiver is < 0"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( ((STLargeInteger)self).largeValue.signum() < 0 ? STObject.True : STObject.False);
#endif
%}.
@@ -5409,7 +5409,7 @@
"return true, if the receiver is >= 0"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( ((STLargeInteger)self).largeValue.signum() >= 0 ? STObject.True : STObject.False);
#endif
%}.
@@ -5420,7 +5420,7 @@
"return the sign of the receiver (-1, 0 or 1)"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( STInteger._new( ((STLargeInteger)self).largeValue.signum() ));
#endif
%}.
@@ -5431,7 +5431,7 @@
"return true, if the receiver is > 0"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( ((STLargeInteger)self).largeValue.signum() > 0 ? STObject.True : STObject.False);
#endif
%}.
@@ -5441,9 +5441,9 @@
!LargeInteger class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.224 2015-04-19 22:31:45 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.225 2015-04-20 10:48:54 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.224 2015-04-19 22:31:45 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.225 2015-04-20 10:48:54 cg Exp $'
! !
--- a/Object.st Mon Apr 20 12:39:18 2015 +0200
+++ b/Object.st Mon Apr 20 12:48:54 2015 +0200
@@ -796,7 +796,7 @@
This method should NOT be redefined in any subclass (except with great care, for tuning)"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
{
int idx1Based = context.stArg(0).intValue(); // st index is 1 based
return context.RETURN( self.basicAt( idx1Based ));
@@ -1059,7 +1059,7 @@
break;
}
}
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
^ self indexNotIntegerOrOutOfBounds:index
!
@@ -1072,7 +1072,7 @@
This method should NOT be redefined in any subclass (except with great care, for tuning)"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
{
int idx1Based = context.stArg(0).intValue(); // st index is 1 based
STObject val = context.stArg(1);
@@ -1355,7 +1355,7 @@
break;
}
}
-#endif /* ! JAVA */
+#endif /* ! __SCHTEAM__ */
%}.
index isInteger ifFalse:[
"
@@ -2054,7 +2054,7 @@
- redefining it may not work as expected."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( (self == context.stArg(0)) ? STObject.True : STObject.False );
#else
RETURN ( (self == anObject) ? true : false );
@@ -2281,7 +2281,7 @@
- redefining it may not work as expected."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( (self == context.stArg(0)) ? STObject.False : STObject.True );
#else
RETURN ( (self == anObject) ? false : true );
@@ -5478,7 +5478,7 @@
<resource: #skipInDebuggersWalkBack>
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context.PERFORM(self, aSelector);
#else
REGISTER OBJ sel = aSelector;
@@ -5551,7 +5551,7 @@
static struct inlineCache ilc0 = __DUMMYILCSELF0(@line+1);
RETURN (_SEND0(self, aSelector, nil, &ilc0));
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ self perform:aSelector withArguments:#()
!
@@ -5581,7 +5581,7 @@
^ nil
].
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
#else
REGISTER OBJ *argP;
int nargs, i;
@@ -5752,7 +5752,7 @@
}
bad:;
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
"/ arrive here, if bad number of arguments (too many)
"/ ST/X (currently) only allows up to 15 method arguments
@@ -5764,7 +5764,7 @@
"send the one-arg-message aSelector to the receiver"
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context.PERFORM_WITH(self, aSelector, arg);
#else
REGISTER OBJ sel = aSelector;
@@ -5839,7 +5839,7 @@
static struct inlineCache ilc1 = __DUMMYILCSELF1(@line+1);
RETURN (_SEND1(self, aSelector, nil, &ilc1, arg));
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ self perform:aSelector withArguments:(Array with:arg)
!
@@ -6116,7 +6116,7 @@
|numberOfArgs a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15|
%{
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context.PERFORM_WITH_ARGUMENTS(self, aSelector, argArray);
#else
REGISTER OBJ *argP;
@@ -7721,7 +7721,7 @@
This method should NOT be redefined in any subclass (except with great care, for tuning)"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context.RETURN( STInteger._new( self.basicSize() ) );
#else
REGISTER INT nbytes;
@@ -7776,7 +7776,7 @@
nbytes -= nInstBytes;
RETURN ( __mkSmallInteger(nbytes>>3) ); /* notice the hardcoded 8 here - not sizeof(long long) */
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ 0
!
@@ -7840,7 +7840,7 @@
"return the receivers class"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN(self.clazz());
#else
RETURN ( __Class(self) );
@@ -10247,11 +10247,11 @@
!Object class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.798 2015-04-20 07:45:53 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.799 2015-04-20 10:48:54 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.798 2015-04-20 07:45:53 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Object.st,v 1.799 2015-04-20 10:48:54 cg Exp $'
!
version_SVN
--- a/SmallInteger.st Mon Apr 20 12:39:18 2015 +0200
+++ b/SmallInteger.st Mon Apr 20 12:48:54 2015 +0200
@@ -114,7 +114,7 @@
For very special uses only - not constant across implementations"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
// longs are always 64bits
return context._RETURN ( STInteger._new(64) );
#else
@@ -131,7 +131,7 @@
For very special uses only - not constant across implementations"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
// longs are always 8 bytes
return context._RETURN ( STInteger._new(8) );
#else
@@ -148,7 +148,7 @@
For very special uses only - not constant across implementations"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN ( STInteger._MAX_INTVAL );
#else
RETURN ( __mkSmallInteger(_MAX_INT) );
@@ -164,7 +164,7 @@
For very special uses only - not constant across implementations"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN ( STInteger._MIN_INTVAL );
#else
RETURN ( __mkSmallInteger(_MIN_INT) );
@@ -213,7 +213,7 @@
"return the product of the receiver and the argument"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.times( aNumber ));
#else
/*
@@ -407,7 +407,7 @@
__qMKSFLOAT(newFloat, val);
RETURN ( newFloat );
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ aNumber productFromInteger:self
!
@@ -416,7 +416,7 @@
"return the sum of the receivers value and the arguments value"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.plus( aNumber ));
#else
/*
@@ -456,7 +456,7 @@
__qMKSFLOAT(newFloat, val);
RETURN ( newFloat );
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ aNumber sumFromInteger:self
!
@@ -465,7 +465,7 @@
"return the difference of the receivers value and the arguments value"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.minus( aNumber ));
#else
/*
@@ -505,7 +505,7 @@
__qMKSFLOAT(newFloat, val);
RETURN ( newFloat );
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ aNumber differenceFromInteger:self
!
@@ -514,7 +514,7 @@
"return the quotient of the receivers value and the arguments value"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.quotient( aNumber ));
#else
@@ -564,7 +564,7 @@
}
}
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
aNumber isInteger ifTrue:[
aNumber == 0 ifTrue:[
@@ -603,7 +603,7 @@
See #quo: which returns -2 in the above case and #rem: which is the corresponding remainder."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.quotientTruncated( aNumber ));
#else
/*
@@ -669,7 +669,7 @@
}
}
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
(aNumber = 0) ifTrue:[
^ ZeroDivide raiseRequestWith:thisContext.
@@ -717,7 +717,7 @@
Redefined here for speed."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.remainder( aNumber ));
#else
/*
@@ -756,7 +756,7 @@
}
RETURN ( __mkSmallInteger(rem) );
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
(aNumber = 0) ifTrue:[
^ ZeroDivide raiseRequestWith:thisContext.
@@ -781,7 +781,7 @@
reimplemented here for speed"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.abs());
#else
INT val = __intVal(self);
@@ -804,7 +804,7 @@
reimplemented here for speed"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.negated());
#else
INT val = __intVal(self);
@@ -833,7 +833,7 @@
in contrast: '9 quo: 4 = 2' and '-9 quo: 4 = -2'"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.quotient(aNumber));
#else
INT val;
@@ -859,7 +859,7 @@
}
}
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
(aNumber = 0) ifTrue:[
^ ZeroDivide raiseRequestWith:thisContext.
@@ -881,14 +881,14 @@
"return the bitwise-and of the receiver and the argument, anInteger"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.bitAnd(anInteger));
#else
/* anding the tags doesn't change it */
if (__isSmallInteger(anInteger)) {
RETURN ( ((OBJ) ((INT)self & (INT)anInteger)) );
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
anInteger class == LargeInteger ifTrue:[
^ anInteger bitAnd:self
@@ -905,7 +905,7 @@
is free to choose any internal representation for integers)"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.bitAt(anIntegerIndex));
#else
if (__isSmallInteger(anIntegerIndex)) {
@@ -917,7 +917,7 @@
RETURN((__smallIntegerVal(self) & (1 << (idx-1))) ? __mkSmallInteger(1) : __mkSmallInteger(0));
}
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ SubscriptOutOfBoundsError
@@ -958,14 +958,14 @@
returning the receiver with bits of the argument cleared."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.bitClear(anInteger));
#else
/* anding the tags doesn't change it */
if (__isSmallInteger(anInteger)) {
RETURN ( ((OBJ) (((INT)self & ~(INT)anInteger) | TAG_INT)) );
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ self retry:#bitClear: coercing:anInteger
@@ -979,7 +979,7 @@
"return the number of 1-bits in the receiver"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
unsigned int _cnt;
unsigned INT _self = __intVal(self);
@@ -1034,7 +1034,7 @@
# endif
RETURN ( __MKSMALLINT(_cnt));
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ super bitCount.
@@ -1070,7 +1070,7 @@
"return the value of the receiver with all bits inverted"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
#else
/* invert anything except tag bits */
RETURN ( ((OBJ) ((INT)self ^ ~TAG_MASK)) );
@@ -1083,7 +1083,7 @@
"return the bitwise-or of the receiver and the argument, anInteger"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.bitOr( anInteger ));
#else
/* oring the tags doesn't change it */
@@ -1111,7 +1111,7 @@
However, ST/X preserves the sign."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.bitShift( shiftCount ));
#else
INT bits, count;
@@ -1175,7 +1175,7 @@
RETURN ( __mkSmallInteger(bits >> count) );
}
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
(shiftCount isMemberOf:SmallInteger) ifTrue:[
^ (LargeInteger value:self) bitShift:shiftCount
@@ -1189,7 +1189,7 @@
is non-0, false otherwise."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN(
( self.bitAnd( aMask ) == STInteger._0 )
? STObject.False : STObject.True );
@@ -1199,7 +1199,7 @@
if (__isSmallInteger(aMask)) {
RETURN ( ((INT)self & ((INT)aMask & ~TAG_MASK)) ? true : false );
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
aMask class == LargeInteger ifTrue:[
^ (aMask bitAnd:self) ~~ 0
@@ -1221,14 +1221,14 @@
"return the bitwise-exclusive-or of the receiver and the argument, anInteger"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.bitXor( anInteger ));
#else
/* xoring the tags turns it off - or it in again */
if (__isSmallInteger(anInteger)) {
RETURN ( (OBJ)( ((INT)self ^ (INT)anInteger) | TAG_INT) );
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ self retry:#bitXor: coercing:anInteger
!
@@ -1240,7 +1240,7 @@
but a new number is returned. Should be named #withBitCleared:"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
#else
if (__isSmallInteger(anInteger)) {
int index = __intVal(anInteger);
@@ -1259,7 +1259,7 @@
RETURN (self); /* nothing to do ... */
}
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ super clearBit:anInteger
@@ -1287,7 +1287,7 @@
Returns 0 if no bit is set."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
{
long bits = self.longValue();
int bitNr = 0;
@@ -1359,7 +1359,7 @@
# endif /* no BSR instruction */
RETURN ( __mkSmallInteger(index+1) );
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ super highBit
@@ -1423,7 +1423,7 @@
but a new number is returned. Should be named #withBitInverted:"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
#else
if (__isSmallInteger(anInteger)) {
int index = __intVal(anInteger);
@@ -1441,7 +1441,7 @@
}
}
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ super invertBit:anInteger
@@ -1465,7 +1465,7 @@
Returns 0 if no bit is set."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
#else
unsigned INT bits;
int index;
@@ -1512,7 +1512,7 @@
# endif
RETURN ( __mkSmallInteger(index) );
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ super lowBit
@@ -1565,7 +1565,7 @@
However, ST/X preserves the sign."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
#else
INT bits, count;
@@ -1628,7 +1628,7 @@
RETURN ( __mkSmallInteger(bits >> count) );
}
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
(shiftCount isMemberOf:SmallInteger) ifTrue:[
^ (LargeInteger value:self) rightShift:shiftCount
@@ -1649,7 +1649,7 @@
but a new number is returned. Should be named #withBitSet:"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
#else
if (__isSmallInteger(anInteger)) {
int index = __intVal(anInteger);
@@ -1667,7 +1667,7 @@
}
}
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ super setBit:anInteger
@@ -1710,7 +1710,7 @@
i.e. a.b -> b.a"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
unsigned INT v = __intVal(self);
unsigned INT swapped;
@@ -1733,7 +1733,7 @@
i.e. a.b.c.d -> d.c.b.a"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
unsigned INT v = __intVal(self);
unsigned INT swapped;
@@ -1791,7 +1791,7 @@
# endif
RETURN (__MKUINT(swapped));
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ super byteSwapped32
@@ -1809,7 +1809,7 @@
i.e. a.b.c.d.e.f.g.h -> h.g.f.e.d.c.b.a"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
unsigned INT v = __intVal(self);
unsigned INT swapped;
@@ -1846,7 +1846,7 @@
"return 8 bits of value, starting at byte index"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
int idx = index.intValue() - 1;
if (idx <= 7) {
@@ -1896,7 +1896,7 @@
RETURN ( __mkSmallInteger( val & 0xFF) );
}
bad: ;
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
index > 0 ifFalse:[
"
@@ -1921,7 +1921,7 @@
for negative ones, the actual bit representation is returned."
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
REGISTER INT val;
INT idx;
@@ -1964,7 +1964,7 @@
RETURN ( __mkSmallInteger( val & 0xFF) );
}
bad: ;
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
index > 0 ifFalse:[
"
@@ -2204,7 +2204,7 @@
is returned."
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
INT val = __intVal(self);
if (val < 0) {
@@ -2269,7 +2269,7 @@
This case is handled in the superclass."
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
unsigned INT v = __intVal(self);
if ((INT)v >= 0) {
@@ -2346,7 +2346,7 @@
Redefined for performance (machine can do it faster)"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( STDouble._new((double)(self.longValue())) );
#else
OBJ newFloat;
@@ -2370,7 +2370,7 @@
Redefined for performance (machine can do it faster)"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( STFloat._new((float)(self.longValue())) );
#else
OBJ dummy = @global(ShortFloat);
@@ -2408,7 +2408,7 @@
May be useful for communication interfaces"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
INT i = __intVal(self);
if (i & 0x800000) {
@@ -2434,7 +2434,7 @@
May be useful for communication interfaces"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
INT i = __intVal(self);
if (i & 0x80) {
@@ -2460,7 +2460,7 @@
May be useful for communication interfaces"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
INT i = __intVal(self);
if (i & 0x80000000) {
@@ -2486,7 +2486,7 @@
May be useful for communication interfaces"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
INT i = __intVal(self);
if (i & 0x8000) {
@@ -2513,7 +2513,7 @@
"return true, if the argument is greater than the receiver"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.ltP( aNumber ));
#else
if (__isSmallInteger(aNumber)) {
@@ -2537,7 +2537,7 @@
"return true, if the argument is greater or equal"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.leP( aNumber ));
#else
@@ -2564,7 +2564,7 @@
as the receiver, false otherwise"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.eqP( aNumber ));
#else
@@ -2591,7 +2591,7 @@
"return true, if the argument is less than the receiver"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.gtP( aNumber ));
#else
@@ -2617,7 +2617,7 @@
"return true, if the argument is less or equal"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.geP( aNumber ));
#else
@@ -2677,7 +2677,7 @@
"return the receiver or the argument, whichever is greater"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
if (__isSmallInteger(aNumber)) {
# if TAG_INT == 1
@@ -2709,7 +2709,7 @@
"return the receiver or the argument, whichever is smaller"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
if (__isSmallInteger(aNumber)) {
# if TAG_INT == 1
@@ -2741,7 +2741,7 @@
"return true, if the arguments value is not equal to mine"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( (self.eqP( aNumber ) == STObject.True) ? STObject.False : STObject.True);
/* NOTREACHED */
#else
@@ -2803,7 +2803,7 @@
Reimplemented as primitive for speed"
%{
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
REGISTER INT tmp;
static struct inlineCache blockVal = __ILC0(0);
@@ -2986,7 +2986,7 @@
"reimplemented as primitive for speed"
%{
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
REGISTER INT tmp, step;
REGISTER INT final;
static struct inlineCache blockVal = __ILC1(0);
@@ -3201,7 +3201,7 @@
Reimplemented as primitive for speed"
%{
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
REGISTER INT tmp;
INT final;
static struct inlineCache blockVal = __ILC1(0);
@@ -3475,7 +3475,7 @@
}
RETURN ( self );
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
"/
@@ -3565,7 +3565,7 @@
This is redefined here for more performance"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
INT val, div, mod, mySelf;
if (__isSmallInteger(aNumber)
@@ -3616,7 +3616,7 @@
some code. (thanx to MessageTally)"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
if (__isSmallInteger(anInteger)) {
INT orgArg, ttt, selfInt, orgSelfInt, temp;
@@ -3725,7 +3725,7 @@
or control systems, which represent numbers this way..."
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
int i;
INT _10000000s = 0, _1000000s = 0;
INT _100000s = 0, _10000s = 0, _1000s = 0;
@@ -3833,7 +3833,7 @@
upon the printOn: method."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( new STString( java.lang.Long.toString(self.longValue()) ));
#else
char buffer[30]; /* enough for 64 bit machines */
@@ -3887,7 +3887,7 @@
if (newString != nil) {
RETURN (newString);
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
"/ only arrive here,
"/ when having memory problems (i.e. no space for string) ...
@@ -3913,7 +3913,7 @@
|s|
%{
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
char buffer[64+3]; /* for 64bit machines, base 2, plus sign, plus 0-byte */
char *cp;
OBJ newString;
@@ -3992,7 +3992,7 @@
}
# endif
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
"/ arrive here, for bad base,
"/ or when having memory problems (i.e. no space for string) ...
@@ -4043,7 +4043,7 @@
Please use the printf: method, which is safe as it is completely implemented in Smalltalk."
%{ /* STACK: 400 */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
char buffer[256];
OBJ s;
int len;
@@ -4068,7 +4068,7 @@
}
}
fail: ;
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
self primitiveFailed
@@ -4114,7 +4114,7 @@
This is of course not always correct, but allows for C/Java behavior to be emulated."
%{ /* NOCONTEXT */
-#ifndef _JAVA__
+#ifndef __SCHTEAM__
INT sum;
sum = __unsignedLongIntVal(self) + __unsignedLongIntVal(aNumber);
@@ -4122,7 +4122,7 @@
sum &= 0xFFFFFFFFL;
# endif
RETURN ( __MKUINT(sum));
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
self primitiveFailed
@@ -4141,7 +4141,7 @@
and can therefore speed things up by not going through LargeIntegers."
%{ /* NOCONTEXT */
-#ifndef _JAVA__
+#ifndef __SCHTEAM__
if (__isSmallInteger(aNumber)) {
INT sum;
@@ -4175,7 +4175,7 @@
and can therefore speed things up by not going through LargeIntegers."
%{ /* NOCONTEXT */
-#ifndef _JAVA__
+#ifndef __SCHTEAM__
if (__isSmallInteger(aNumber)) {
INT diff;
@@ -4209,7 +4209,7 @@
and can therefore speed things up by not going through LargeIntegers."
%{ /* NOCONTEXT */
-#ifndef _JAVA__
+#ifndef __SCHTEAM__
INT myValue, otherValue;
unsigned INT productLow, productHi;
@@ -4359,7 +4359,7 @@
RETURN ( __mkSmallInteger((INT)(productLow & _MAX_INT)));
# endif /* ! USE_LONGLONG */
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
self primitiveFailed
@@ -4380,7 +4380,7 @@
(changes the sign)"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
unsigned INT v;
v = __intVal(self);
@@ -4407,7 +4407,7 @@
Useful for crypt algorithms, or to emulate C/Java semantics."
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
unsigned INT bits;
int count;
@@ -4454,7 +4454,7 @@
or to emulate C/Java semantics."
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
INT bits, count;
@@ -4495,7 +4495,7 @@
This is of course not always correct, but allows for C/Java behavior to be emulated."
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
INT rslt;
rslt = __unsignedLongIntVal(self) ^ __unsignedLongIntVal(aNumber);
@@ -4521,7 +4521,7 @@
or to emulate C/Java semantics."
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
unsigned INT bits;
INT count;
@@ -4567,7 +4567,7 @@
- reimplemented here for speed"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
if (__bothSmallInteger(min, max)) {
# if TAG_INT == 1
@@ -4603,7 +4603,7 @@
"return true, if the receiver is even"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
RETURN ( ((INT)self & (INT)__MASKSMALLINT(1)) ? false : true );
#endif
%}.
@@ -4639,7 +4639,7 @@
reimplemented here for speed"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.ltP(0) );
/* NOTREACHED */
#else
@@ -4659,7 +4659,7 @@
Useful for padding."
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
INT x;
x = __intVal(self) - 1;
@@ -4697,7 +4697,7 @@
"return true, if the receiver is odd"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
RETURN ( ((INT)self & (INT)__MASKSMALLINT(1)) ? true : false );
#endif
%}.
@@ -4711,7 +4711,7 @@
Undefined for negative values (smalltalk does not require the machine to use 2's complement)"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
// tricky, but very fast (google for it, to understand)
# if __POINTER_SIZE__ == 4
@@ -4749,7 +4749,7 @@
reimplemented here for speed"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( (self.ltP(0) == STObject.True) ? STObject.False : STObject.True);
#else
@@ -4770,7 +4770,7 @@
reimplemented here for speed"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
INT val = __intVal(self);
@@ -4791,7 +4791,7 @@
reimplemented here for speed"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
# if TAG_INT == 1
/* tag bit does not change sign */
@@ -4813,11 +4813,11 @@
!SmallInteger class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.231 2015-04-19 22:55:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.232 2015-04-20 10:48:54 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.231 2015-04-19 22:55:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/SmallInteger.st,v 1.232 2015-04-20 10:48:54 cg Exp $'
! !
--- a/String.st Mon Apr 20 12:39:18 2015 +0200
+++ b/String.st Mon Apr 20 12:48:54 2015 +0200
@@ -160,7 +160,7 @@
can be directly used as separator or for formatting."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.basicNew( anInteger.intValue() ));
#else
OBJ newString;
@@ -293,7 +293,7 @@
}
}
fail: ;;
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
"
invalid argument, or out-of-memory:
@@ -352,7 +352,7 @@
used as a stream buffer."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.basicNew( anInteger.intValue() ));
#else
OBJ newString;
@@ -422,7 +422,7 @@
}
}
fail: ;;
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
"
invalid argument, or out-of-memory:
@@ -559,7 +559,7 @@
This method is the same as at:."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
if (index.isSmallInteger()) {
int idx1Based = context.stArg(0).intValue(); // st index is 1 based
return context.RETURN( self.basicAt( idx1Based ));
@@ -581,7 +581,7 @@
}
}
badIndex: ;
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
^ self basicAt:index
!
@@ -594,7 +594,7 @@
This method is the same as basicAt:put:."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
if (index.isSmallInteger()) {
int idx1Based = index.intValue(); // st index is 1 based
@@ -620,7 +620,7 @@
}
}
}
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
^ self basicAt:index put:aCharacter
!
@@ -630,7 +630,7 @@
- reimplemented here since we return characters"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
if (index.isSmallInteger()) {
int idx1Based = index.intValue(); // st index is 1 based
return context.RETURN( self.basicAt( idx1Based ));
@@ -652,7 +652,7 @@
}
}
badIndex: ;
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
index isInteger ifFalse:[
^ self indexNotInteger:index
@@ -669,7 +669,7 @@
- reimplemented here since we store characters"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
if (index.isSmallInteger()) {
int idx1Based = index.intValue(); // st index is 1 based
@@ -700,7 +700,7 @@
}
}
badIndex: ;
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
(aCharacter isMemberOf:Character) ifFalse:[
"
@@ -1438,7 +1438,7 @@
This may change."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.stringLtP(aString) );
/* NOTREACHED */
#else
@@ -1499,7 +1499,7 @@
Use sameAs: to compare with case ignored."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.stringEqualP(aString) );
/* NOTREACHED */
#else
@@ -1591,7 +1591,7 @@
RETURN (true);
# endif
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ super = aString
@@ -1622,7 +1622,7 @@
This may change."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( aString.stringLtP( self ) );
/* NOTREACHED */
#else
@@ -1671,7 +1671,7 @@
RETURN ( false );
}
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ super > aString
!
@@ -2025,7 +2025,7 @@
extra message send."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.stringEqualP( aString.not()) );
/* NOTREACHED */
#else
@@ -2114,7 +2114,7 @@
}
RETURN (false);
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ super ~= aString
! !
@@ -2275,7 +2275,7 @@
"Return a unique symbol with the name taken from the receivers characters."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( self.asSTSymbol() );
#else
OBJ newSymbol;
@@ -2291,7 +2291,7 @@
if (newSymbol) {
RETURN ( newSymbol);
}
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ ObjectMemory allocationFailureSignal raise.
@@ -2308,7 +2308,7 @@
performed once."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( STSymbol.asSymbolIfInterned( self.asString() ));
#else
OBJ cls;
@@ -2321,7 +2321,7 @@
indx = 0;
}
RETURN ( __SYMBOL_OR_NIL(__stringVal(self) + indx));
-#endif /* not JAVA */
+#endif /* not __SCHTEAM__ */
%}.
^ self primitiveFailed
"
@@ -3420,7 +3420,7 @@
(but only, as long as Stdout is nil, which is set later after startup)."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
if (Smalltalk.getBindingOrNull(STSymbol._new("Stdout")) == null) {
System.out.print(self.toString());
return context._RETURN(self);
@@ -3447,7 +3447,7 @@
(but only, as long as Stdout is nil, which is set later after startup)."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
if (Smalltalk.getBindingOrNull(STSymbol._new("Stdout")) == null) {
System.out.println(self.toString());
return context._RETURN(self);
@@ -3474,7 +3474,7 @@
Please use the printf: method, which is safe as it is completely implemented in Smalltalk."
%{ /* STACK: 1000 */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
char buffer[800];
char *buf = buffer;
int bufsize = sizeof(buffer);
@@ -3566,7 +3566,7 @@
Redefined here to exclude the 0-byte at the end."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context.RETURN( STInteger._new( self.basicSize() ) );
#else
REGISTER OBJ slf, cls;
@@ -3663,7 +3663,7 @@
Can be used to check for existance of a symbol without creating one"
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context._RETURN( (STSymbol.asSymbolIfInterned(self.asSTString("[knownAsSymbol]").asString("")) != null) ? True : False );
#else
OBJ cls;
@@ -3676,7 +3676,7 @@
indx = 0;
}
RETURN ( __KNOWNASSYMBOL(__stringVal(self) + indx) );
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
"/ ^ self asSymbolIfInterned notNil.
self primitiveFailed
@@ -3701,7 +3701,7 @@
This method is the same as basicSize."
%{ /* NOCONTEXT */
-#ifdef __JAVA__
+#ifdef __SCHTEAM__
return context.RETURN( STInteger._new( self.basicSize() ) );
#else
REGISTER OBJ cls, slf;
@@ -3732,7 +3732,7 @@
"Q: is there a need to redefine it here ?"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
REGISTER char c;
REGISTER unsigned char *hip, *lowp;
@@ -3761,7 +3761,7 @@
|notFound|
%{ /* STACK:4000 */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
if (__qIsStringLike(self)
&& __isStringLike(aSubString)
&& (caseSensitive == true)
@@ -3870,7 +3870,7 @@
notFound = true;
}
}
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
notFound == true ifTrue:[
^ exceptionValue value.
@@ -3887,7 +3887,7 @@
If aStringOrChar is an empty string, true is returned"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
int len1, len2;
REGISTER unsigned char *src1, *src2;
unsigned char c;
@@ -3921,7 +3921,7 @@
}
RETURN ( false );
}
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
^ super endsWith:aStringOrChar
@@ -3941,7 +3941,7 @@
Q: should we care for whiteSpace in general here ?"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
REGISTER unsigned char *src;
REGISTER unsigned char c;
OBJ cls;
@@ -3968,7 +3968,7 @@
}
}
RETURN ( true );
-# endif /* ! __JAVA__ */
+# endif /* ! __SCHTEAM__ */
%}.
^ super isBlank
!
@@ -3978,14 +3978,14 @@
Redefined here for performance"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
OBJ cls;
cls = __qClass(self);
if ((cls == String) || (cls == Symbol)) {
RETURN ( (__stringSize(self) == 0) ? true : false);
}
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
^ self size == 0
!
@@ -4002,7 +4002,7 @@
substitution, case-change, insertion and deletion of a character."
%{ /* STACK: 2000 */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
/*
* this is very heavy used when correcting errors
* (all symbols are searched for best match) - therefore it must be fast
@@ -4090,7 +4090,7 @@
RETURN ( __mkSmallInteger(m) );
}
mallocFailed: ;
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
^ super levenshteinTo:aString
@@ -4114,14 +4114,14 @@
Redefined here for performance"
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
OBJ cls;
cls = __qClass(self);
if ((cls == String) || (cls == Symbol)) {
RETURN ( (__stringSize(self) != 0) ? true : false);
}
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
^ self size ~~ 0
!
@@ -4133,7 +4133,7 @@
which are both inconsistent w.r.t. an empty argument."
%{ /* NOCONTEXT */
-#ifndef __JAVA__
+#ifndef __SCHTEAM__
int len1, len2;
REGISTER unsigned char *src1, *src2;
unsigned char c;
@@ -4216,7 +4216,7 @@
}
RETURN ( false );
}
-#endif /* ! __JAVA__ */
+#endif /* ! __SCHTEAM__ */
%}.
^ super startsWith:aStringOrChar
@@ -4253,9 +4253,9 @@
!String class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.334 2015-04-19 22:55:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.335 2015-04-20 10:48:54 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.334 2015-04-19 22:55:08 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/String.st,v 1.335 2015-04-20 10:48:54 cg Exp $'
! !