X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
accessing
use: anObject during: aBlock

| p oldValue result |
"Proper implementation instead of use 'super value:during:' because that one does not return value, perhaps this should be fixed in DynamicVariable?"
p := Processor activeProcess.
oldValue := p environmentAt: self ifAbsent: [self default].
[
p environmentAt: self put: anObject.
result := aBlock value.
] ensure: [
p environmentAt: self put: oldValue
].
^ result
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"class" : {
"use:during:" : "JohanBrichau 05/25/2017 08:13" },
"instance" : {
} }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "Grease-GemStone-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "GRDynamicVariable",
"pools" : [
],
"super" : "DynamicVariable",
"type" : "normal" }

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
I represent a dynamic variable i.e., a variable that is
1. process local, that
2. is defined for a given block and that
3. can be nested.

For example:

GRDynamicVariable
use: 1
during: [
self assert: GRDynamicVariable value = 1.
GRDynamicVariable
use: 2
during: [ self assert: GRDynamicVariable value = 2 ].
self assert: GRDynamicVariable value = 1 ].
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
use: anObject during: aBlock
^ self
value: anObject
during: aBlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"instance" : { },
"class" : {
"use:during:" : "MaxLeske 5/16/2017 21:54"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "MaxLeske 5/16/2017 22:05",
"super" : "DynamicVariable",
"category" : "Grease-Pharo30-Core",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "GRDynamicVariable",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
{
"name" : "GRPackage" }
"name" : "GRPackage"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"class" : {
"on:converter:" : "pmm 10/30/2010 18:58" },
"instance" : {
"nextPut:" : "pmm 4/10/2010 13:30",
"greaseNext:putAll:startingAt:" : "pmm 12/28/2010 22:12",
"initializeOn:converter:" : "pmm 10/30/2010 18:58",
"nextPutAll:" : "lr 2/7/2009 12:54",
"next" : "pmm 4/10/2010 13:32",
"next:" : "lr 2/7/2009 12:57",
"nextPut:" : "pmm 4/10/2010 13:30",
"nextPutAll:" : "lr 2/7/2009 12:54" } }
"initializeOn:converter:" : "pmm 10/30/2010 18:58"
},
"class" : {
"on:converter:" : "pmm 10/30/2010 18:58"
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"category" : "Grease-Pharo30-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "pmm 6/25/2012 20:22",
"super" : "GRCodecStream",
"category" : "Grease-Pharo30-Core",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"converter" ],
"converter"
],
"name" : "GRPharoConverterCodecStream",
"pools" : [
],
"super" : "GRCodecStream",
"type" : "normal" }
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"class" : {
"basicForEncoding:" : "pmm 6/28/2009 15:43",
"codecs" : "pmm 8/16/2010 00:19",
"supportedEncodingNames" : "lr 7/25/2011 19:46",
"supportsEncoding:" : "pmm 6/28/2009 16:43" },
"instance" : {
"converter" : "lr 7/25/2011 19:51",
"decoderFor:" : "lr 2/7/2009 12:52",
"url" : "lr 2/7/2009 12:36",
"encoderFor:" : "jf 9/30/2009 00:46",
"initializeWithName:" : "pmm 8/16/2010 11:52",
"name" : "lr 2/7/2009 10:16",
"url" : "lr 2/7/2009 12:36" } }
"name" : "lr 2/7/2009 10:16"
},
"class" : {
"codecs" : "pmm 8/16/2010 00:19",
"supportsEncoding:" : "pmm 6/28/2009 16:43",
"basicForEncoding:" : "pmm 6/28/2009 15:43",
"supportedEncodingNames" : "lr 7/25/2011 19:46"
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"category" : "Grease-Pharo30-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"super" : "GRCodec",
"category" : "Grease-Pharo30-Core",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"name",
"urlCodec" ],
"urlCodec"
],
"name" : "GRPharoGenericCodec",
"pools" : [
],
"super" : "GRCodec",
"type" : "normal" }
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"class" : {
"basicForEncoding:" : "pmm 8/16/2010 00:36",
"codecs" : "lr 7/25/2011 19:46",
"supportedEncodingNames" : "lr 7/25/2011 19:46",
"supportsEncoding:" : "pmm 8/16/2010 00:36" },
"instance" : {
"decode:" : "pmm 8/16/2010 09:20",
"decoderFor:" : "pmm 8/16/2010 00:32",
"encoderFor:" : "pmm 8/16/2010 00:32",
"decode:" : "pmm 8/16/2010 09:20",
"initializeWithName:" : "pmm 8/25/2016 11:00",
"name" : "pmm 8/16/2010 00:32" } }
"encoderFor:" : "pmm 8/16/2010 00:32",
"name" : "pmm 8/16/2010 00:32"
},
"class" : {
"codecs" : "lr 7/25/2011 19:46",
"supportsEncoding:" : "pmm 8/16/2010 00:36",
"basicForEncoding:" : "pmm 8/16/2010 00:36",
"supportedEncodingNames" : "lr 7/25/2011 19:46"
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"category" : "Grease-Pharo30-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "<historical>",
"super" : "GRNullCodec",
"category" : "Grease-Pharo30-Core",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"name" ],
"name"
],
"name" : "GRPharoLatin1Codec",
"pools" : [
],
"super" : "GRNullCodec",
"type" : "normal" }
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"class" : {
},
"instance" : {
"next" : "pmm 8/16/2010 09:16",
"next:" : "lr 7/25/2011 19:50" } }
"next:" : "lr 7/25/2011 19:50",
"next" : "pmm 8/16/2010 09:16"
},
"class" : { }
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"category" : "Grease-Pharo30-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "<historical>",
"instvars" : [
],
"name" : "GRPharoLatin1CodecStream",
"pools" : [
],
"super" : "GRNullCodecStream",
"type" : "normal" }
"category" : "Grease-Pharo30-Core",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "GRPharoLatin1CodecStream",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
{
"class" : {
"initialize" : "pmm 5/20/2010 11:49",
"initializeUrlTable" : "pmm 5/20/2010 20:56",
"initializeXmlTable" : "pmm 5/20/2010 20:56",
"unload" : "jf 1/22/2009 02:45" },
"instance" : {
"pathSeparator" : "pmm 8/4/2012 12:38",
"readWriteCharacterStream" : "dkh 9/4/2009 09:14",
"fileStreamOn:do:binary:" : "JohanBrichau 10/3/2014 19:59",
"addToShutDownList:" : "jf 1/21/2009 17:31",
"addToStartUpList:" : "jf 1/21/2009 17:31",
"asMethodReturningByteArray:named:" : "lr 7/25/2011 19:51",
"asMethodReturningByteArrayLiteral:named:" : "lr 7/25/2011 19:51",
"asMethodReturningByteArrayWithCache:named:" : "pmm 2/20/2009 17:44",
"base64Decode:" : "jf 1/21/2009 17:31",
"removeFromShutDownList:" : "jf 1/21/2009 17:31",
"removeSelector:from:" : "JohanBrichau 4/19/2014 13:44",
"semaphoreClass" : "lr 7/25/2011 19:51",
"useByteArrayLiterals" : "pmm 8/4/2012 12:39",
"bindingOf:" : "JohanBrichau 7/12/2015 14:45",
"compile:into:classified:" : "pmm 9/12/2013 11:24",
"write:toFile:inFolder:" : "pmm 8/4/2012 13:02",
"newRandom" : "pmm 10/7/2010 13:10",
"asMethodReturningByteArray:named:" : "lr 7/25/2011 19:51",
"filesIn:" : "pmm 8/19/2012 10:18",
"newline" : "lr 4/15/2010 19:14",
"terminateProcess:" : "jf 2/6/2009 15:59",
"writeCharacterStreamOn:" : "pmm 8/26/2011 09:45",
"contentsOfFile:binary:" : "JohanBrichau 10/3/2014 19:59",
"directoriesIn:" : "pmm 8/19/2012 10:19",
"doSilently:" : "pmm 9/12/2013 17:55",
"ensureExistenceOfFolder:" : "pmm 9/12/2013 12:05",
"fileExists:" : "JohanBrichau 10/3/2014 20:02",
"fileStreamOn:do:binary:" : "JohanBrichau 10/3/2014 19:59",
"filesIn:" : "pmm 8/19/2012 10:18",
"isProcessTerminated:" : "jf 2/6/2009 15:58",
"label" : "jf 2/9/2010 00:56",
"localNameOf:" : "pmm 8/19/2012 10:19",
"newRandom" : "pmm 10/7/2010 13:10",
"newline" : "lr 4/15/2010 19:14",
"openDebuggerOn:" : "pmm 1/22/2012 16:31",
"pathSeparator" : "pmm 8/4/2012 12:38",
"readWriteByteStream" : "JohanBrichau 1/18/2014 07:05",
"readWriteCharacterStream" : "dkh 9/4/2009 09:14",
"removeFromShutDownList:" : "jf 1/21/2009 17:31",
"removeFromStartUpList:" : "jf 1/21/2009 17:31",
"removeSelector:from:" : "JohanBrichau 4/19/2014 13:44",
"secureHashFor:" : "DamienCassou 8/27/2013 18:30",
"semaphoreClass" : "lr 7/25/2011 19:51",
"stackDepth" : "jf 1/21/2009 17:31",
"terminateProcess:" : "jf 2/6/2009 15:59",
"useByteArrayLiterals" : "pmm 8/4/2012 12:39",
"secureHashFor:" : "DamienCassou 8/27/2013 18:30",
"base64Decode:" : "jf 1/21/2009 17:31",
"compile:into:classified:" : "pmm 9/12/2013 11:24",
"asMethodReturningByteArrayWithCache:named:" : "pmm 2/20/2009 17:44",
"label" : "jf 2/9/2010 00:56",
"weakDictionaryOfSize:" : "lr 7/25/2011 19:51",
"write:toFile:inFolder:" : "pmm 8/4/2012 13:02",
"writeCharacterStreamOn:" : "pmm 8/26/2011 09:45" } }
"localNameOf:" : "pmm 8/19/2012 10:19",
"openDebuggerOn:" : "pmm 1/22/2012 16:31",
"ensureExistenceOfFolder:" : "pmm 9/12/2013 12:05",
"asMethodReturningByteArrayLiteral:named:" : "lr 7/25/2011 19:51",
"addToStartUpList:" : "jf 1/21/2009 17:31",
"directoriesIn:" : "pmm 8/19/2012 10:19",
"readWriteByteStream" : "JohanBrichau 1/18/2014 07:05"
},
"class" : {
"initialize" : "pmm 5/20/2010 11:49",
"initializeXmlTable" : "pmm 5/20/2010 20:56",
"unload" : "jf 1/22/2009 02:45",
"initializeUrlTable" : "pmm 5/20/2010 20:56"
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"commentStamp" : "pmm 6/1/2008 01:03",
"super" : "GRPlatform",
"category" : "Grease-Pharo30-Core",
"classinstvars" : [
],
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [
"UrlTable",
"XmlTable" ],
"commentStamp" : "pmm 6/1/2008 01:03",
"instvars" : [
],
"XmlTable"
],
"instvars" : [ ],
"name" : "GRPharoPlatform",
"pools" : [
],
"super" : "GRPlatform",
"type" : "normal" }
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"instance" : { },
"class" : {
"initialize" : "jgf 1/25/2009 12:05",
"nextInt:" : "lr 7/25/2011 19:46",
"randomClass" : "lr 7/25/2011 19:46",
"randomFrom:" : "lr 7/25/2011 18:28",
"randomClass" : "lr 7/25/2011 19:46",
"nextInt:" : "lr 7/25/2011 19:46",
"startUp" : "pmm 1/10/2009 16:01",
"unload" : "jf 9/30/2009 00:19" },
"instance" : {
} }
"unload" : "jf 9/30/2009 00:19"
}
}
Loading
X Tutup