[squeakdev] The Trunk: Kernelar.407.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Feb 24 14:04:43 UTC 2010
Andreas Raab uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernelar.407.mcz
==================== Summary ====================
Name: Kernelar.407
Author: ar
Time: 24 February 2010, 3:03:06.161 pm
UUID: 7a8e9c2665712e4888b9a31af15e914d
Ancestors: Kernelar.404, Kernelul.406
Merging Kernelar.404 and Kernelul.406
=============== Diff against Kernelar.404 ===============
Item was added:
+  Method: BlockClosure>>cull:cull: (in category 'evaluating') 
+ cull: firstArg cull: secondArg
+ "Activate the receiver, with two or less arguments."
+
+ numArgs >= 2 ifTrue: [ ^self value: firstArg value: secondArg ].
+ numArgs = 1 ifTrue: [ ^self value: firstArg ].
+ ^self value!
Item was changed:
 Method: Integer class>>readFrom:ifFail: (in category 'instance creation') 
readFrom: aStringOrStream ifFail: aBlock
"Answer an instance of one of the concrete subclasses if Integer.
+ Initial plus or minus sign accepted.
+ Imbedded radix specifiers not allowed; use Number class readFrom: for that.
 Initial minus sign accepted.
 Imbedded radix specifiers not allowed; use Number
 class readFrom: for that.
Execute aBlock if there are no digits."
+ ^(ExtendedNumberParser on: aStringOrStream) nextIntegerBase: 10 ifFail: aBlock!
 ^(SqNumberParser on: aStringOrStream) nextIntegerBase: 10 ifFail: aBlock!
Item was added:
+  Method: BlockClosure>>cull:cull:cull:cull: (in category 'evaluating') 
+ cull: firstArg cull: secondArg cull: thirdArg cull: fourthArg
+ "Activate the receiver, with four or less arguments."
+
+ numArgs >= 3 ifTrue: [
+ numArgs >= 4 ifTrue: [
+ ^self value: firstArg value: secondArg value: thirdArg value: fourthArg ].
+ ^self value: firstArg value: secondArg value: thirdArg ].
+ numArgs = 2 ifTrue: [ ^self value: firstArg value: secondArg ].
+ numArgs = 1 ifTrue: [ ^self value: firstArg ].
+ ^self value!
Item was added:
+  Method: BlockClosure>>cull:cull:cull: (in category 'evaluating') 
+ cull: firstArg cull: secondArg cull: thirdArg
+ "Activate the receiver, with three or less arguments."
+
+ numArgs >= 2 ifTrue: [
+ numArgs >= 3 ifTrue: [ ^self value: firstArg value: secondArg value: thirdArg ].
+ ^self value: firstArg value: secondArg ].
+ numArgs = 1 ifTrue: [ ^self value: firstArg ].
+ ^self value!
Item was changed:
 Method: Number class>>readFrom: (in category 'instance creation') 
readFrom: stringOrStream
"Answer a number as described on aStream. The number may
be any accepted Smalltalk literal Number format.
It can include a leading radix specification, as in 16rFADE.
It can as well be NaN, Infinity or Infinity for conveniency.
If stringOrStream does not start with a valid number description, fail."
+ ^(ExtendedNumberParser on: stringOrStream) nextNumber!
 ^(SqNumberParser on: stringOrStream) nextNumber!
Item was changed:
 Method: Number class>>readFrom:ifFail: (in category 'instance creation') 
readFrom: stringOrStream ifFail: aBlock
"Answer a number as described on aStream. The number may
be any accepted Smalltalk literal Number format.
It can include a leading radix specification, as in 16rFADE.
It can as well be NaN, Infinity or Infinity for conveniency.
If input does not represent a valid number, then execute fail block
and leave the stream positioned before offending character"
+ ^(ExtendedNumberParser on: stringOrStream) failBlock: aBlock; nextNumber!
 ^(SqNumberParser on: stringOrStream) failBlock: aBlock; nextNumber!
Item was changed:
 Method: Integer class>>readFrom:base: (in category 'instance creation') 
readFrom: aStringOrStream base: base
"Answer an instance of one of the concrete subclasses if Integer.
+ Initial plus or minus sign accepted, and bases > 10 use letters AZ.
+ Imbedded radix specifiers not allowed; use Number class readFrom: for that.
 Initial minus sign accepted, and bases > 10 use letters AZ.
 Imbedded radix specifiers not allowed; use Number
 class readFrom: for that.
Raise an Error if there are no digits."
+ ^(ExtendedNumberParser on: aStringOrStream) nextIntegerBase: base!
 ^(SqNumberParser on: aStringOrStream) nextIntegerBase: base!
Item was added:
+  Method: BlockClosure>>cull: (in category 'evaluating') 
+ cull: firstArg
+ "Activate the receiver, with one or zero arguments."
+
+ numArgs >= 1 ifTrue: [ ^self value: firstArg ].
+ ^self value!
Item was removed:
  Method: Number class>>readExactlyFrom: (in category 'instance creation') 
 readExactlyFrom: stringOrStream
 "Answer a number as described on aStream. The number may
 include a leading radix specification, as in 16rFADE"

 ^(SqNumberParser on: stringOrStream) nextNumber!
More information about the Squeakdev
mailing list
