diff --git a/packages/SimulationStudio-Support.package/PartialSimulator.class/README.md b/packages/SimulationStudio-Support.package/PartialSimulator.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/packages/SimulationStudio-Support.package/PartialSimulator.class/instance/context.activateMethod.withArgs.receiver.do..st b/packages/SimulationStudio-Support.package/PartialSimulator.class/instance/context.activateMethod.withArgs.receiver.do..st new file mode 100644 index 0000000..f78c34d --- /dev/null +++ b/packages/SimulationStudio-Support.package/PartialSimulator.class/instance/context.activateMethod.withArgs.receiver.do..st @@ -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 \ No newline at end of file diff --git a/packages/SimulationStudio-Support.package/PartialSimulator.class/instance/todo.st b/packages/SimulationStudio-Support.package/PartialSimulator.class/instance/todo.st new file mode 100644 index 0000000..80f1706 --- /dev/null +++ b/packages/SimulationStudio-Support.package/PartialSimulator.class/instance/todo.st @@ -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]. + " \ No newline at end of file diff --git a/packages/SimulationStudio-Support.package/PartialSimulator.class/instance/wantsToSimulate..st b/packages/SimulationStudio-Support.package/PartialSimulator.class/instance/wantsToSimulate..st new file mode 100644 index 0000000..8e0067e --- /dev/null +++ b/packages/SimulationStudio-Support.package/PartialSimulator.class/instance/wantsToSimulate..st @@ -0,0 +1,4 @@ +testing +wantsToSimulate: aContext + + ^ (aContext method hasPragma: #skipSimulator) not \ No newline at end of file diff --git a/packages/SimulationStudio-Support.package/PartialSimulator.class/methodProperties.json b/packages/SimulationStudio-Support.package/PartialSimulator.class/methodProperties.json new file mode 100644 index 0000000..e3bb5da --- /dev/null +++ b/packages/SimulationStudio-Support.package/PartialSimulator.class/methodProperties.json @@ -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" } } diff --git a/packages/SimulationStudio-Support.package/PartialSimulator.class/properties.json b/packages/SimulationStudio-Support.package/PartialSimulator.class/properties.json new file mode 100644 index 0000000..983d590 --- /dev/null +++ b/packages/SimulationStudio-Support.package/PartialSimulator.class/properties.json @@ -0,0 +1,14 @@ +{ + "category" : "SimulationStudio-Support", + "classinstvars" : [ + ], + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "PartialSimulator", + "pools" : [ + ], + "super" : "Simulator", + "type" : "normal" }