Skip to content

Commit 9bb013c

Browse files
authored
Merge branch 'master' into misc-2
2 parents b076b7c + 40b5d76 commit 9bb013c

File tree

50 files changed

+371
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+371
-68
lines changed

packages/BaselineOfSimulationStudio.package/BaselineOfSimulationStudio.class/instance/installPreviewDependenciesForTests.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ scripts
22
installPreviewDependenciesForTests
33

44
^ self installPreviewDependencies: {
5-
self depInbox: 'SUnit-ct.125'. "TestCase>>#runCaseWithoutTimeout for SandboxKernelTest"
5+
self depInbox: 'SUnit-ct.133'. "TestCase>>#runCaseWithoutTimeout for SandboxKernelTest"
66
self depInbox: 'SUnit-ct.132'. "TestCase>>#assert:equals:description: with lazy descriptions"
77
}

packages/BaselineOfSimulationStudio.package/BaselineOfSimulationStudio.class/methodProperties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"depSqueakSource:name:" : "ct 4/12/2021 22:27",
99
"depSqueakSource:name:targetRepository:" : "ct 4/12/2021 22:45",
1010
"installPreviewDependencies:" : "ct 3/5/2021 22:10",
11-
"installPreviewDependenciesForTests" : "ct 11/7/2021 16:25",
11+
"installPreviewDependenciesForTests" : "ct 12/29/2021 18:46",
1212
"projectClass" : "ct 3/5/2021 19:01" } }

packages/SimulationStudio-Base.package/Context.extension/instance/simBasicObjectIdentityHash..st

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ simBasicObjectIdentityHash: anObject
55
Primitive. See Object documentation whatIsAPrimitive."
66

77
<primitive: 75>
8+
self flag: #brittle. "This implementation relies on primitiveIdentityHash being implemented as a mirror primitive; however, the VM does not guarantee this. See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217866.html"
89
^ self primitiveFailed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*SimulationStudio-Base-mirror primitives
2+
simObject: anObject setIsReadOnly: aBoolean
3+
"Set the read-only flag of the argument anObject to the given value aBoolean and answer the previous value of the flag, without sending a message to anObject. This mimics the action of the VM when an object is set as read-only or writeable. See Object >> #setIsReadOnlyObject:."
4+
5+
<primitive: 164 error: ec>
6+
self flag: #brittle. "This implementation relies on primitiveSetImmutability being implemented as a mirror primitive; however, the VM does not guarantee this. See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217866.html"
7+
self primitiveFailed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*SimulationStudio-Base-mirror primitives
2+
simObjectClone: anObject
3+
"Answer a copy the argument anObject which share's the original's instance variables, without sending it a message. This mimics the action of the VM when it clones an object.
4+
Used to simulate the execution machinery by, for example, the debugger.
5+
Primitive. See Object documentation whatIsAPrimitive."
6+
7+
<primitive: 148>
8+
self flag: #brittle. "This implementation relies on primitiveClone being implemented as a mirror primitive; however, the VM does not guarantee this. See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217866.html"
9+
self primitiveFailed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*SimulationStudio-Base-mirror primitives
2+
simObjectIsReadOnly: anObject
3+
"Answer if the argument is read-only without sending it a message. This mimics the action of the VM when an object is tested for writeability. See Object >> #isReadOnlyObject."
4+
5+
<primitive: 163 error: ec>
6+
self flag: #brittle. "This implementation relies on primitiveGetImmutability being implemented as a mirror primitive; however, the VM does not guarantee this. See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217866.html"
7+
^ (self objectClass: anObject) isImmediateClass

packages/SimulationStudio-Base.package/Context.extension/methodProperties.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
"debug" : "ct 3/5/2021 02:21",
99
"insertEnsure:" : "ct 3/5/2021 19:35",
1010
"insertOn:do:" : "ct 3/5/2021 19:35",
11-
"simBasicObjectIdentityHash:" : "ct 12/28/2021 17:48",
11+
"simBasicObjectIdentityHash:" : "ct 12/29/2021 15:00",
1212
"simCustomizationLevel" : "ct 3/5/2021 19:23",
13+
"simObject:setIsReadOnly:" : "ct 12/29/2021 14:59",
14+
"simObjectClone:" : "ct 12/29/2021 15:00",
1315
"simObjectIdentityHash:" : "ct 12/28/2021 19:26",
16+
"simObjectIsReadOnly:" : "ct 12/29/2021 15:00",
1417
"wrap:" : "ct 3/5/2021 19:30" } }
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
controlling
2+
lookupSelector: aSymbol inClass: aClass
3+
4+
^ aClass lookupSelector: aSymbol
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
controlling
2+
send: selector to: rcvr with: arguments lookupIn: lookupClass
3+
"Simulate the action of sending a message with selector and arguments to rcvr. The argument, lookupClass, is the class in which to lookup the message. This is the receiver's class for normal messages, but for super messages it will be some specific class related to the source method."
4+
5+
| meth methClass primIndex val ctxt |
6+
"+++ CHANGE +++"
7+
self flag: #moveUpstream.
8+
(meth := self lookupSelector: selector inClass: lookupClass) ifNil:
9+
"--- CHANGE ---"
10+
[selector == #doesNotUnderstand: ifTrue:
11+
[self error: 'Recursive message not understood!' translated].
12+
^self send: #doesNotUnderstand:
13+
to: rcvr
14+
with: {(Message selector: selector arguments: arguments) lookupClass: lookupClass}
15+
lookupIn: lookupClass].
16+
17+
((methClass := self objectClass: meth) == CompiledMethod or: [methClass == CompiledBlock]) ifFalse:
18+
["Object as Methods (OaM) protocol: 'The contract is that, when the VM encounters an ordinary object (rather than a compiled method) in the method dictionary during lookup, it sends it the special selector #run:with:in: providing the original selector, arguments, and receiver.'. DOI: 10.1145/2991041.2991062."
19+
^self send: #run:with:in:
20+
to: meth
21+
with: {selector. arguments. rcvr}].
22+
23+
meth numArgs = arguments size ifFalse:
24+
[^ self error: ('Wrong number of arguments in simulated message {1}' translated format: {selector})].
25+
(primIndex := meth primitive) > 0 ifTrue:
26+
[val := self doPrimitive: primIndex method: meth receiver: rcvr args: arguments.
27+
(self isPrimFailToken: val) ifFalse:
28+
[^val]].
29+
30+
ctxt := self activateMethod: meth withArgs: arguments receiver: rcvr.
31+
(primIndex isInteger and: [primIndex > 0]) ifTrue:
32+
[ctxt failPrimitiveWith: val].
33+
34+
^ctxt

packages/SimulationStudio-Base.package/SimulationContext.class/methodProperties.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@
2727
"initialize" : "ct 3/2/2021 23:01",
2828
"initializeFrom:" : "ct 12/28/2020 19:43",
2929
"initializeStack" : "ct 3/2/2021 23:01",
30+
"lookupSelector:inClass:" : "ct 12/29/2021 14:53",
3031
"pop" : "ct 12/28/2020 19:07",
3132
"printOn:" : "ct 12/28/2020 15:49",
3233
"push:" : "ct 12/28/2020 19:07",
3334
"runSimulated:" : "ct 1/10/2021 20:14",
3435
"runSimulated:contextAtEachStep:" : "ct 3/15/2021 12:06",
3536
"runUntilErrorOrReturnFrom:" : "ct 3/28/2021 12:10",
37+
"send:to:with:lookupIn:" : "ct 12/29/2021 14:52",
3638
"shouldNotImplement:" : "ct 12/28/2020 15:29",
3739
"size" : "ct 12/28/2020 19:14",
3840
"stackp:" : "ct 11/11/2021 19:14",

0 commit comments

Comments
 (0)