David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-dtl.137.mcz
==================== Summary ====================
Name: Network-dtl.137
Author: dtl
Time: 23 September 2012, 1:32:32.394 pm
UUID: b4bcd6e4-6a2d-4fc6-be4b-0d01accc3c72
Ancestors: Network-ul.136
Add a preference for "Enable IPv6 and new network support" in preference category "general". If enabled, IPv6 and the new network support will be enabled if the required primitives are present in the VM, otherwise the new network support is disabled regardless of whether the VM provides IPv6 primitives.
=============== Diff against Network-ul.136 ===============
Item was changed:
Object subclass: #NetNameResolver
instanceVariableNames: ''
+ classVariableNames: 'DefaultHostName EnableIPv6 HaveNetwork ResolverBusy ResolverError ResolverMutex ResolverReady ResolverSemaphore ResolverUninitialized UseOldNetwork'
- classVariableNames: 'DefaultHostName HaveNetwork ResolverBusy ResolverError ResolverMutex ResolverReady ResolverSemaphore ResolverUninitialized UseOldNetwork'
poolDictionaries: ''
category: 'Network-Kernel'!
!NetNameResolver commentStamp: '<historical>' prior: 0!
This class implements TCP/IP style network name lookup and translation facilities.
Attempt to keep track of whether there is a network available.
HaveNetwork true if last attempt to contact the network was successful.
LastContact Time of that contact (totalSeconds).
haveNetwork returns true, false, or #expired. True means there was contact in the last 30 minutes. False means contact failed or was false last time we asked. Get out of false state by making contact with a server in some way (FileList or updates).!
Item was added:
+ ----- Method: NetNameResolver class>>enableIPv6 (in category 'system startup') -----
+ enableIPv6
+ <preference: 'Enable IPv6 and new network support'
+ category: 'general'
+ description: 'If true allow IPv6 support. If false, NetNameResolver useOldNetwork is set.'
+ type: #Boolean>
+ ^EnableIPv6!
Item was added:
+ ----- Method: NetNameResolver class>>enableIPv6: (in category 'system startup') -----
+ enableIPv6: aBool
+ "Set a preference to control whether IPv6 primitives and new network support
+ should be used if available, and reinitialize the UseOldNetwork flag to recognize
+ the setting. If true, the new networking support will be used if the VM provides
+ the required primitives. If false, IPv6 and new network support will not be used.
+ The new network support may be unreliable on some platforms, so this preference
+ allows it to be explicitly disabled."
+
+ EnableIPv6 := aBool.
+ self initializeOldNetworkFlag
+ !
Item was changed:
----- Method: NetNameResolver class>>initialize (in category 'class initialization') -----
initialize
"NetNameResolver initialize"
"Note: On the Mac, the name resolver is asynchronous (i.e., Squeak can do other things while it is working), but can only handle one request at a time. On other platforms, such as Unix, the resolver is synchronous; a call to, say, the name lookup primitive will block all Squeak processes until it returns."
"Resolver Status Values"
ResolverUninitialized := 0. "network is not initialized"
ResolverReady := 1. "resolver idle, last request succeeded"
ResolverBusy := 2. "lookup in progress"
ResolverError := 3. "resolver idle, last request failed"
DefaultHostName := ''.
UseOldNetwork := self hasIpv6PrimSupport not.
+ self enableIPv6: true. "Initialize preference to permit use of new networking"
Smalltalk addToStartUpList: self.
!
Item was added:
+ ----- Method: NetNameResolver class>>initializeOldNetworkFlag (in category 'system startup') -----
+ initializeOldNetworkFlag
+
+ UseOldNetwork := self hasIpv6PrimSupport not or: [self enableIPv6 ~= true]!
Item was changed:
----- Method: NetNameResolver class>>startUp: (in category 'system startup') -----
startUp: resuming
+ "Set the UseOldNetwork flag if ipv6 primitives are not present or if the EnableIPv6 preference is not set."
- "Set the UseOldNetwork flag if ipv6 primitives are not present"
+ resuming ifTrue: [self initializeOldNetworkFlag]!
- resuming ifTrue: [UseOldNetwork := self hasIpv6PrimSupport not]!
David T. Lewis uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-dtl.137.mcz
==================== Summary ====================
Name: Network-dtl.137
Author: dtl
Time: 23 September 2012, 1:32:32.394 pm
UUID: b4bcd6e4-6a2d-4fc6-be4b-0d01accc3c72
Ancestors: Network-ul.136
Add a preference for "Enable IPv6 and new network support" in preference category "general". If enabled, IPv6 and the new network support will be enabled if the required primitives are present in the VM, otherwise the new network support is disabled regardless of whether the VM provides IPv6 primitives.
=============== Diff against Network-ul.136 ===============
Item was changed:
Object subclass: #NetNameResolver
instanceVariableNames: ''
+ classVariableNames: 'DefaultHostName EnableIPv6 HaveNetwork ResolverBusy ResolverError ResolverMutex ResolverReady ResolverSemaphore ResolverUninitialized UseOldNetwork'
- classVariableNames: 'DefaultHostName HaveNetwork ResolverBusy ResolverError ResolverMutex ResolverReady ResolverSemaphore ResolverUninitialized UseOldNetwork'
poolDictionaries: ''
category: 'Network-Kernel'!
!NetNameResolver commentStamp: '<historical>' prior: 0!
This class implements TCP/IP style network name lookup and translation facilities.
Attempt to keep track of whether there is a network available.
HaveNetwork true if last attempt to contact the network was successful.
LastContact Time of that contact (totalSeconds).
haveNetwork returns true, false, or #expired. True means there was contact in the last 30 minutes. False means contact failed or was false last time we asked. Get out of false state by making contact with a server in some way (FileList or updates).!
Item was added:
+ ----- Method: NetNameResolver class>>enableIPv6 (in category 'system startup') -----
+ enableIPv6
+ <preference: 'Enable IPv6 and new network support'
+ category: 'general'
+ description: 'If true allow IPv6 support. If false, NetNameResolver useOldNetwork is set.'
+ type: #Boolean>
+ ^EnableIPv6!
Item was added:
+ ----- Method: NetNameResolver class>>enableIPv6: (in category 'system startup') -----
+ enableIPv6: aBool
+ "Set a preference to control whether IPv6 primitives and new network support
+ should be used if available, and reinitialize the UseOldNetwork flag to recognize
+ the setting. If true, the new networking support will be used if the VM provides
+ the required primitives. If false, IPv6 and new network support will not be used.
+ The new network support may be unreliable on some platforms, so this preference
+ allows it to be explicitly disabled."
+
+ EnableIPv6 := aBool.
+ self initializeOldNetworkFlag
+ !
Item was changed:
----- Method: NetNameResolver class>>initialize (in category 'class initialization') -----
initialize
"NetNameResolver initialize"
"Note: On the Mac, the name resolver is asynchronous (i.e., Squeak can do other things while it is working), but can only handle one request at a time. On other platforms, such as Unix, the resolver is synchronous; a call to, say, the name lookup primitive will block all Squeak processes until it returns."
"Resolver Status Values"
ResolverUninitialized := 0. "network is not initialized"
ResolverReady := 1. "resolver idle, last request succeeded"
ResolverBusy := 2. "lookup in progress"
ResolverError := 3. "resolver idle, last request failed"
DefaultHostName := ''.
UseOldNetwork := self hasIpv6PrimSupport not.
+ self enableIPv6: true. "Initialize preference to permit use of new networking"
Smalltalk addToStartUpList: self.
!
Item was added:
+ ----- Method: NetNameResolver class>>initializeOldNetworkFlag (in category 'system startup') -----
+ initializeOldNetworkFlag
+
+ UseOldNetwork := self hasIpv6PrimSupport not or: [self enableIPv6 ~= true]!
Item was changed:
----- Method: NetNameResolver class>>startUp: (in category 'system startup') -----
startUp: resuming
+ "Set the UseOldNetwork flag if ipv6 primitives are not present or if the EnableIPv6 preference is not set."
- "Set the UseOldNetwork flag if ipv6 primitives are not present"
+ resuming ifTrue: [self initializeOldNetworkFlag]!
- resuming ifTrue: [UseOldNetwork := self hasIpv6PrimSupport not]!
David T. Lewis uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-dtl.170.mcz
==================== Summary ====================
Name: Tests-dtl.170
Author: dtl
Time: 23 September 2012, 9:50:16.094 am
UUID: 68580c67-c932-4d59-a9cb-77ae53dc71ad
Ancestors: Tests-ul.169
All versions of Cog provide mirror primitive support. For the interpreter VM, support was added in version 4.7.19. Identify expected mirror primitive failures for older versions of the interpreter VM.
=============== Diff against Tests-ul.169 ===============
Item was changed:
----- Method: MirrorPrimitiveTests>>expectedFailures (in category 'testing') -----
expectedFailures
+ "All versions of Cog provide mirror primitive support. For the interpreter VM,
+ support was added in version 4.7.19. Identify expected failures for older versions
+ of the interpreter VM."
^Smalltalk isRunningCog
ifTrue: [#()]
+ ifFalse: [ | ver |
+ [ver := VersionNumber fromString: Smalltalk vm interpreterSourceVersion.
+ ((ver numbers first * 1000) + ver numbers second) >= 4008
+ ifTrue: [^#() "version 4.7.19 or greater with mirror primitive support"]]
+ on: Warning
+ do: ["primitiveInterpreterSourceVersion not available"].
+ ^#(testMirrorEqEq testMirrorPerform testMirrorSize) "older interpreter VMs"]
+ !
- ifFalse: [#(testMirrorEqEq testMirrorPerform testMirrorSize)]!
David T. Lewis uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-dtl.170.mcz
==================== Summary ====================
Name: Tests-dtl.170
Author: dtl
Time: 23 September 2012, 9:50:16.094 am
UUID: 68580c67-c932-4d59-a9cb-77ae53dc71ad
Ancestors: Tests-ul.169
All versions of Cog provide mirror primitive support. For the interpreter VM, support was added in version 4.7.19. Identify expected mirror primitive failures for older versions of the interpreter VM.
=============== Diff against Tests-ul.169 ===============
Item was changed:
----- Method: MirrorPrimitiveTests>>expectedFailures (in category 'testing') -----
expectedFailures
+ "All versions of Cog provide mirror primitive support. For the interpreter VM,
+ support was added in version 4.7.19. Identify expected failures for older versions
+ of the interpreter VM."
^Smalltalk isRunningCog
ifTrue: [#()]
+ ifFalse: [ | ver |
+ [ver := VersionNumber fromString: Smalltalk vm interpreterSourceVersion.
+ ((ver numbers first * 1000) + ver numbers second) >= 4008
+ ifTrue: [^#() "version 4.7.19 or greater with mirror primitive support"]]
+ on: Warning
+ do: ["primitiveInterpreterSourceVersion not available"].
+ ^#(testMirrorEqEq testMirrorPerform testMirrorSize) "older interpreter VMs"]
+ !
- ifFalse: [#(testMirrorEqEq testMirrorPerform testMirrorSize)]!
David T. Lewis uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-dtl.170.mcz
==================== Summary ====================
Name: Tests-dtl.170
Author: dtl
Time: 23 September 2012, 9:50:16.094 am
UUID: 68580c67-c932-4d59-a9cb-77ae53dc71ad
Ancestors: Tests-ul.169
All versions of Cog provide mirror primitive support. For the interpreter VM, support was added in version 4.7.19. Identify expected mirror primitive failures for older versions of the interpreter VM.
=============== Diff against Tests-ul.169 ===============
Item was changed:
----- Method: MirrorPrimitiveTests>>expectedFailures (in category 'testing') -----
expectedFailures
+ "All versions of Cog provide mirror primitive support. For the interpreter VM,
+ support was added in version 4.7.19. Identify expected failures for older versions
+ of the interpreter VM."
^Smalltalk isRunningCog
ifTrue: [#()]
+ ifFalse: [ | ver |
+ [ver := VersionNumber fromString: Smalltalk vm interpreterSourceVersion.
+ ((ver numbers first * 1000) + ver numbers second) >= 4008
+ ifTrue: [^#() "version 4.7.19 or greater with mirror primitive support"]]
+ on: Warning
+ do: ["primitiveInterpreterSourceVersion not available"].
+ ^#(testMirrorEqEq testMirrorPerform testMirrorSize) "older interpreter VMs"]
+ !
- ifFalse: [#(testMirrorEqEq testMirrorPerform testMirrorSize)]!
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.169.mcz
==================== Summary ====================
Name: Tests-ul.169
Author: ul
Time: 23 September 2012, 2:01:58.121 pm
UUID: bcf8b519-ab9d-5942-bc38-b6ac9f1f2fd8
Ancestors: Tests-ul.168
3 tests are still failing in MirrorPrimitiveTests using the Interpreter VM, so mark those as #expectedFailures again.
=============== Diff against Tests-ul.168 ===============
Item was added:
+ ----- Method: MirrorPrimitiveTests>>expectedFailures (in category 'testing') -----
+ expectedFailures
+
+ ^Smalltalk isRunningCog
+ ifTrue: [#()]
+ ifFalse: [#(testMirrorEqEq testMirrorPerform testMirrorSize)]!
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.169.mcz
==================== Summary ====================
Name: Tests-ul.169
Author: ul
Time: 23 September 2012, 2:01:58.121 pm
UUID: bcf8b519-ab9d-5942-bc38-b6ac9f1f2fd8
Ancestors: Tests-ul.168
3 tests are still failing in MirrorPrimitiveTests using the Interpreter VM, so mark those as #expectedFailures again.
=============== Diff against Tests-ul.168 ===============
Item was added:
+ ----- Method: MirrorPrimitiveTests>>expectedFailures (in category 'testing') -----
+ expectedFailures
+
+ ^Smalltalk isRunningCog
+ ifTrue: [#()]
+ ifFalse: [#(testMirrorEqEq testMirrorPerform testMirrorSize)]!
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.169.mcz
==================== Summary ====================
Name: Tests-ul.169
Author: ul
Time: 23 September 2012, 2:01:58.121 pm
UUID: bcf8b519-ab9d-5942-bc38-b6ac9f1f2fd8
Ancestors: Tests-ul.168
3 tests are still failing in MirrorPrimitiveTests using the Interpreter VM, so mark those as #expectedFailures again.
=============== Diff against Tests-ul.168 ===============
Item was added:
+ ----- Method: MirrorPrimitiveTests>>expectedFailures (in category 'testing') -----
+ expectedFailures
+
+ ^Smalltalk isRunningCog
+ ifTrue: [#()]
+ ifFalse: [#(testMirrorEqEq testMirrorPerform testMirrorSize)]!
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.711.mcz
==================== Summary ====================
Name: Kernel-ul.711
Author: ul
Time: 21 September 2012, 3:52:01.69 am
UUID: 34bbbd59-62f6-8a4c-98a1-4277ce568856
Ancestors: Kernel-bf.710
Accept a block as description (besides a string) in Object>>assert:description:. This ensures that the method's behavior is the same as TestCase>>assert:description:'s.
=============== Diff against Kernel-bf.710 ===============
Item was changed:
----- Method: Object>>assert:description: (in category 'error handling') -----
+ assert: aBlock description: aStringOrBlock
- assert: aBlock description: aString
"Throw an assertion error if aBlock does not evaluates to true."
+ aBlock value ifFalse: [ AssertionFailure signal: aStringOrBlock value ]!
- aBlock value ifFalse: [AssertionFailure signal: aString ]!
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.711.mcz
==================== Summary ====================
Name: Kernel-ul.711
Author: ul
Time: 21 September 2012, 3:52:01.69 am
UUID: 34bbbd59-62f6-8a4c-98a1-4277ce568856
Ancestors: Kernel-bf.710
Accept a block as description (besides a string) in Object>>assert:description:. This ensures that the method's behavior is the same as TestCase>>assert:description:'s.
=============== Diff against Kernel-bf.710 ===============
Item was changed:
----- Method: Object>>assert:description: (in category 'error handling') -----
+ assert: aBlock description: aStringOrBlock
- assert: aBlock description: aString
"Throw an assertion error if aBlock does not evaluates to true."
+ aBlock value ifFalse: [ AssertionFailure signal: aStringOrBlock value ]!
- aBlock value ifFalse: [AssertionFailure signal: aString ]!