Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial Simulation #56

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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,19 @@
controlling
context: aContext activateMethod: aCompiledMethod withArgs: arguments receiver: receiver do: aBlock

| context next |
context := super context: aContext activateMethod: aCompiledMethod withArgs: arguments receiver: receiver do: aBlock.
(self wantsToSimulate: context) ifTrue:
[^ context].

next := context.
next isSimulationContext ifTrue:
[next := context decustomize: next].
next := next runUntilExceptionOrReturnFrom: next ifException: [:ctx :exception | | stack |
stack := ctx stackUpTo: aContext.
stack
elementsForwardIdentityTo: (stack collect: [:sender | context customize: sender])
copyHash: true.
^ (context customize: ctx) privRefresh].

^ next
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
as yet unclassified
todo

"STEHENGEBLIEBEN: See https://github.com/LinqLover/SimulationStudio/issues/54. What edge cases did we miss so far? What about resuming from an exception, could we turn off simulation again in this situation? But not so important, rather focus on assessing performance so far #53. Testing ...
For some reason, VM crashed when debugging the simulator and stepping through the exceptino resumption for:
PartialSimulator debug: [TestObject3 new foo2].
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testing
wantsToSimulate: aContext

^ (aContext method hasPragma: #skipSimulator) not
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"class" : {
},
"instance" : {
"context:activateMethod:withArgs:receiver:do:" : "ct 3/16/2022 14:26",
"todo" : "ct 3/16/2022 14:37",
"wantsToSimulate:" : "ct 3/16/2022 14:04" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "SimulationStudio-Support",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "PartialSimulator",
"pools" : [
],
"super" : "Simulator",
"type" : "normal" }