Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-eem.3382
Browse files Browse the repository at this point in the history
Add primitive 150, BoxedFloat64>>primitiveCosine and primitive 560,
SmallFloat64>>primitiveCosine.
Make all of BoxedFloat64 primitives 51 through 58, primitiveArctan,
primitiveExp, primitiveExponent, primitiveFractionalPart, primitiveLogN,
primitiveSine, primitiveSquareRoot, primitiveTimesTwoPower,
primitiveTruncated BoxedFloat64 only, no longer checking but insisting
on the receiver being a BoxedFloat64.

Increases performance, e.g. from 898 nanoseconds per invocation to 597
nanoseconds on a 2021 Apple M1 Max MPB.

To implement the above add noFailFloatValueOf: to the object memories.
Discard dbgFloatValueOf: since all its invocations can be replaced with
noFailFloatValueOf:.
  • Loading branch information
eliotmiranda committed Jun 7, 2024
1 parent 0058882 commit 0b5e3c3
Show file tree
Hide file tree
Showing 39 changed files with 8,040 additions and 6,655 deletions.
423 changes: 158 additions & 265 deletions src/spur32.cog.lowcode/cointerp.c

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/spur32.cog.lowcode/cointerp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3380 uuid: c077b429-f897-47ad-92b4-563c161255f3
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3382 uuid: 936441c0-8b36-4f43-a893-4c90667b5b58
*/


Expand Down Expand Up @@ -137,6 +137,7 @@ extern sqInt headerIndicatesAlternateBytecodeSet(sqInt methodHeader);
extern sqInt instantiateClassindexableSize(sqInt classObj, usqInt nElements);
extern sqInt isIntegerValue(sqInt intValue);
extern sqInt isMarked(sqInt objOop);
extern double noFailFloatValueOf(sqInt aFloatOop);
extern usqInt smallObjectBytesForSlots(sqInt numSlots);
extern sqInt remember(sqInt objOop);
extern sqInt addressCouldBeObj(sqInt address);
Expand Down
Loading

0 comments on commit 0b5e3c3

Please sign in to comment.