Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CogVM source as per VMMaker.oscog-eem.2347
StackInterpreter: Immutability: Fix primitiveSlotAtPut (& InterpreterPrimitives>>primitiveInstVarAtPut) to fail with PrimErrorNoModification for read-only objects. Cogit: Inline a few trivial methods. StackToRegisterMappingCogit: For simplicity, especially in the RegisterAllocatingCogit subclass, eliminate simSelf and optStatus and include the receiver's simStackEntry as the 0'th element of the simStack. optStatus is therefore whether simSelf's liveRegister is ReceiverResultReg. Hence loops from 0 to: methodOrBlockNumTemps - 1 become loops from 1 to: methodOrBlockNumTemps. The simSelf variable is replaced by self simSelf, which is short-hand for self simStackAt: 0. Fix ancient bug in voidReceiverResultRegContainsSelf. The computed index is the right argument for ssFlushTo:; it shouldn't be subtracted from simStackPtr! Replace the UnknownSimStackPtrFlag hack in a fixup's simStackPtr and replace it by a proper flag. Consequently make a fixup's simStackPtr unsigned char, giving us a maximim of 255 stack slots (0 being for the receiver). Get much stricter with simSpillBase for the benefit of RegisterAllocatingCogit. updateSimSpillBase is now called after the new descriptor is pushed and either counts up or counts down as required to guarantee it points one beyond the last spilled entry. The assertCorrectSimStackPtr asserts now insist on this. With this change we can start to replace all the simSpillBase max: 0 phrases with simply simSpillBase. Deal with the assert failures due to frameless methods with unused temporaries by simply refusing to JIT them; see the new methodFoundInvalidPostScan hook. Plugins: All plugins should include config.h and it should always be the first include. FilePlugin connect to file primitives primitiveConnectToFileDescriptor & primitiveConnectToFile. Many thanks to Holger Freyther for the original code. Rewrite the primitives in MiscPrimitivePlugin using conventional Slang, avoiding the translatedPrimitives ineffiicencies and dependence on methods in the image. Volunteers are invited to do the same for the ADPCMCodecPlugin and SoundGenerationPlugin.
- Loading branch information
1 parent
19a102b
commit 4749358
Showing
141 changed files
with
21,026 additions
and
12,277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.