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.3216
SmartSyntaxInterpreterPlugins: A flaw of the rather lovely SmartSyntaxInterpreterPlugin framework is that when simulating pointer type is determined by spec array (parameters: and/or reciever: in primitive:parameters:[receiver:]), not by the type of the variable assigned to. But this shouldn't be the case. The type of firstIndexableField: is intentionally #'void *', which in C can freely be assigned to any pointer type. Fix simulation so that the casts applied to firstIndexableField: reflect the type of the target variable, only defaulting to the type specified by the spec class if there is no declaration. Hence significantly simplify the pointer API, removing ccgLoad:expr:asCharPtrFrom:andThen: et al, and keeping only ccgLoad:expr:asNullTerminatedCharPtrFrom:andThen:, ccgLoad:expr:asPtrFrom:andThen:ccgLoad:expr:asOopPtrFrom:andThen:. The consequence for the generated C is that firstIndexbaleField: is not cast to a pointer, simply assigned to a variable (whose type will not have changed).
- Loading branch information
1 parent
1a2f811
commit 0ca2861
Showing
26 changed files
with
272 additions
and
2,372 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
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
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
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.