Skip to content

Commit

Permalink
VMMaker: Reorder VM Simulation Workspace
Browse files Browse the repository at this point in the history
I suspect the default nowadays is a 64-bit VM, so order this to the top.
As a new user, I accidentally tried running the 32-bit Simulation, which
ended up not working as I had only built the 64-bit Bochs plugin.
  • Loading branch information
LeonMatthes committed Jun 18, 2023
1 parent c695856 commit fd93b45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion image/VM Simulation Workspace.text
@@ -1 +1 @@
"To build the spurreader or spurreader-64 images used in the examples below run one of buildspurtrunkreaderimage.sh buildspurtrunkreader64image.shThe reader images include a simple REPL loop that reads a chunk-format expression from stdin, evaluates it and writes the printString of the result to stdout. In the simulator you are prompted for input via an input widget and writes output to the Transcript. e.g. try 3+4!. On the Transcript you should seesqueak> 7squeak> " "Run the Cog VM simulator on a Spur image (by default the Spur trunk 4.6 image, complex options are in the Cog example below)"[| cos |cos := CogVMSimulator newWithOptions: #(Cogit StackToRegisterMappingCogit "SimpleStackBasedCogit" ObjectMemory Spur32BitCoMemoryManager MULTIPLEBYTECODESETS true), {#ISA. Cogit choose32BitISA}."cos initializeThreadSupport."cos desiredNumStackPages: 8. "Speeds up scavenging when simulating. Set to e.g. 64 for something like the real VM."cos openOn: 'spurreader.image'.cos openAsMorph; run]."Run the Stack VM simulator on a Spur image (by default the Spur trunk 4.6 image, complex options are in the Cog example below)"[| sis |sis := StackInterpreterSimulator newWithOptions: #(ObjectMemory Spur32BitMemoryManager MULTIPLEBYTECODESETS true).sis desiredNumStackPages: 8. "Speeds up scavenging when simulating. Set to e.g. 64 for something like the real VM."sis assertValidExecutionPointersAtEachStep: false. "Set this to true to turn on an expensive assert that checks for valid stack, frame pointers etc on each bytecode. Useful when you're adding new bytecodes or exotic execution primitives."sis openOn: 'spurreader.image'.sis openAsMorph; run]."Run the Cog VM simulator on a Cog image (by default the Squeak 4.5 image:). Note the plethora of optional debug features in comments."[| cos proc opts |cos := CogVMSimulator newWithOptions: #(Cogit StackToRegisterMappingCogit "SimpleStackBasedCogit" MULTIPLEBYTECODESETS true), {#ISA. Cogit choose32BitISA}."cos initializeThreadSupport."cos desiredNumStackPages: 8.cos openOn: 'Squeak-4.5-All-in-One.app/Contents/Resources/Squeak4.5-13680.image'.false ifTrue: [cos systemAttributes at: 2 put: '-doit'; at: 3 put: 'ShootoutTests runAllToTranscript. Smalltalk quitPrimitive']."cos cogit breakPC: 16r2697.""cos cogit traceStores: true.""cos cogit sendTrace: 6." "trace prims & print""cos cogit singleStep: true.""cos cogit printInstructions: true.""cos linkSends: false.""cos enableCog: false.""cos setBreakSelector: 'standardIOStreamNamed:forWrite:'.""cos cogit setBreakMethod: 16rCE1630.""cos cogit cog: 16rAB0B28 + cos startOfMemory selector: 16r31F280 + cos startOfMemory." "e.g. jit a specific method without simulating"cos openAsMorph; run]."Run the Stack VM simulator on a 64-bit Spur image (by default the Spur trunk 4.6 image, complex options are in the Cog example below)"[| sis |sis := StackInterpreterSimulator newWithOptions: #(ObjectMemory Spur64BitMemoryManager MULTIPLEBYTECODESETS true).sis desiredNumStackPages: 8.sis assertValidExecutionPointersAtEachStep: false. "Set this to true to turn on an expensive assert that checks for valid stack, frame pointers etc on each bytecode. Useful when you're adding new bytecodes or exotic execution primitives."sis openOn: 'spurreader-64.image'.sis openAsMorph; run]."Run the Cog VM simulator on a 64-bit Spur image (by default the Spur trunk 4.6 image, complex options are in the Cog example below)"[| cos |cos := CogVMSimulator newWithOptions: #(Cogit StackToRegisterMappingCogit "SimpleStackBasedCogit" ObjectMemory Spur64BitCoMemoryManager MULTIPLEBYTECODESETS true), {#ISA. Cogit choose64BitISA}."cos initializeThreadSupport."cos desiredNumStackPages: 8.cos openOn: 'spurreader-64.image'.cos openAsMorph; run]
"To build the spurreader or spurreader-64 images used in the examples below run one of buildspurtrunkreaderimage.sh buildspurtrunkreader64image.shThe reader images include a simple REPL loop that reads a chunk-format expression from stdin, evaluates it and writes the printString of the result to stdout. In the simulator you are prompted for input via an input widget and writes output to the Transcript. e.g. try 3+4!. On the Transcript you should seesqueak> 7squeak> ""Run the Cog VM simulator on a 64-bit Spur image (by default the Spur trunk 4.6 image, complex options are in the Cog example below)"[| cos |cos := CogVMSimulator newWithOptions: #(Cogit StackToRegisterMappingCogit "SimpleStackBasedCogit" ObjectMemory Spur64BitCoMemoryManager MULTIPLEBYTECODESETS true), {#ISA. Cogit choose64BitISA}."cos initializeThreadSupport."cos desiredNumStackPages: 8.cos openOn: 'spurreader-64.image'.cos openAsMorph; run]."Run the Stack VM simulator on a 64-bit Spur image (by default the Spur trunk 4.6 image, complex options are in the Cog example below)"[| sis |sis := StackInterpreterSimulator newWithOptions: #(ObjectMemory Spur64BitMemoryManager MULTIPLEBYTECODESETS true).sis desiredNumStackPages: 8.sis assertValidExecutionPointersAtEachStep: false. "Set this to true to turn on an expensive assert that checks for valid stack, frame pointers etc on each bytecode. Useful when you're adding new bytecodes or exotic execution primitives."sis openOn: 'spurreader-64.image'.sis openAsMorph; run]."Run the Cog VM simulator on a 32-bit Spur image (by default the Spur trunk 4.6 image, complex options are in the Cog example below)"[| cos |cos := CogVMSimulator newWithOptions: #(Cogit StackToRegisterMappingCogit "SimpleStackBasedCogit" ObjectMemory Spur32BitCoMemoryManager MULTIPLEBYTECODESETS true), {#ISA. Cogit choose32BitISA}."cos initializeThreadSupport."cos desiredNumStackPages: 8. "Speeds up scavenging when simulating. Set to e.g. 64 for something like the real VM."cos openOn: 'spurreader.image'.cos openAsMorph; run]."Run the Stack VM simulator on a 32-bit Spur image (by default the Spur trunk 4.6 image, complex options are in the Cog example below)"[| sis |sis := StackInterpreterSimulator newWithOptions: #(ObjectMemory Spur32BitMemoryManager MULTIPLEBYTECODESETS true).sis desiredNumStackPages: 8. "Speeds up scavenging when simulating. Set to e.g. 64 for something like the real VM."sis assertValidExecutionPointersAtEachStep: false. "Set this to true to turn on an expensive assert that checks for valid stack, frame pointers etc on each bytecode. Useful when you're adding new bytecodes or exotic execution primitives."sis openOn: 'spurreader.image'.sis openAsMorph; run]."Run the Cog VM simulator on a 32-bit Cog image (by default the Squeak 4.5 image:). Note the plethora of optional debug features in comments."[| cos proc opts |cos := CogVMSimulator newWithOptions: #(Cogit StackToRegisterMappingCogit "SimpleStackBasedCogit" MULTIPLEBYTECODESETS true), {#ISA. Cogit choose32BitISA}."cos initializeThreadSupport."cos desiredNumStackPages: 8.cos openOn: 'Squeak-4.5-All-in-One.app/Contents/Resources/Squeak4.5-13680.image'.false ifTrue: [cos systemAttributes at: 2 put: '-doit'; at: 3 put: 'ShootoutTests runAllToTranscript. Smalltalk quitPrimitive']."cos cogit breakPC: 16r2697.""cos cogit traceStores: true.""cos cogit sendTrace: 6." "trace prims & print""cos cogit singleStep: true.""cos cogit printInstructions: true.""cos linkSends: false.""cos enableCog: false.""cos setBreakSelector: 'standardIOStreamNamed:forWrite:'.""cos cogit setBreakMethod: 16rCE1630.""cos cogit cog: 16rAB0B28 + cos startOfMemory selector: 16r31F280 + cos startOfMemory." "e.g. jit a specific method without simulating"cos openAsMorph; run].
Expand Down

0 comments on commit fd93b45

Please sign in to comment.