# HG changeset patch # User Claus Gittinger # Date 1440056606 -7200 # Node ID 713eeb4219105d16898efd2b30efc0b3564b0117 # Parent 3aa1dc3b3fdb77d894a988e55912e1905f2af27d steam stuff diff -r 3aa1dc3b3fdb -r 713eeb421910 Symbol.st --- a/Symbol.st Thu Aug 20 09:43:05 2015 +0200 +++ b/Symbol.st Thu Aug 20 09:43:26 2015 +0200 @@ -313,7 +313,7 @@ |parts ns| self isNameSpaceSelector ifFalse:[ - ^ Array with:nil with:self + ^ Array with:nil with:self ]. parts := self nameSpaceAndSelectorParts. ns := Smalltalk at:parts first asSymbol. @@ -330,7 +330,7 @@ nameSpaceAndSelectorParts "return a two element tuple consisting of the namespace name and the raw selector. - If I do not have the format of a namespace-selector, + If I do not have the format of a namespace-selector, the first element of the returned tuple will be nil. Namespace selectors have a special, fix defined format, which is also known in the VM. They must be of the form :::, @@ -341,7 +341,7 @@ |nsPart selPart idx| self isNameSpaceSelector ifFalse:[ - ^ Array with:nil with:self + ^ Array with:nil with:self ]. idx := self indexOf:$: startingAt:3. nsPart := self copyFrom:2 to:idx - 1. @@ -429,6 +429,17 @@ the inherited value compare." %{ /* NOCONTEXT */ +#ifdef __SCHTEAM__ + if (something.isSymbol()) { + return context._RETURN ( self == something ? STObject.True : STObject.False ); + } + if (something.isSTString()) { + return context._RETURN ( something.isStringEqual(self) ? STObject.True : STObject.False ); + } + if (something == STObject.Nil) { + return context._RETURN_false ( ); + } +#else OBJ cls; if (something == self) RETURN(true); @@ -439,6 +450,7 @@ if (cls == String || cls == ImmutableString) { RETURN (strcmp(__stringVal(self), __stringVal(something)) == 0 ? true : false); } +#endif %}. "fall back; could be a TwoByteString, or a collection of Characters" @@ -505,6 +517,17 @@ the inherited value compare." %{ /* NOCONTEXT */ +#ifdef __SCHTEAM__ + if (something.isSymbol()) { + return context._RETURN ( self == something ? STObject.False : STObject.True ); + } + if (something.isSTString()) { + return context._RETURN ( something.isStringEqual(self) ? STObject.False : STObject.True ); + } + if (something == STObject.Nil) { + return context._RETURN_true ( ); + } +#else OBJ cls; if (! __isNonNilObject(something)) RETURN(true); /* cannot be equal */ @@ -514,6 +537,7 @@ if (cls == String || cls == ImmutableString) { RETURN (strcmp(__stringVal(self), __stringVal(something)) == 0 ? false : true); } +#endif %}. "fall back; could be a TwoByteString, or a collection of Characters" @@ -861,4 +885,3 @@ version_SVN ^ '$ Id: Symbol.st 10648 2011-06-23 15:55:10Z vranyj1 $' ! ! -