Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-eem.2116
Browse files Browse the repository at this point in the history
Interpreter:
Fixed a bug where the CogVMFeatureFlags were converted twice to SmallInteger
(in getCogVMFeatureFlags and in primitiveVMParameter), shifting 1 time too many
the flags. Hence MULTIPLEBYTECODESETS flag was always true in the image while
SUPPORTSWRITEBARRIER was true only if the VM supported multiple bytecode set.

Make printFrame: lax enough to accept a married context and print its frame
without complaint.

Decode a method header when doing longPrintOop:.

Add printOopsSuchThat: for debugging.

Spur:
Include rawNumSlots and eliminate the hex prefix in printEntity:'s size info.

Change attemptToShrink to request the segmentManager to shrink by at least
growHeadroom, since it won't otherwise.  Have shrinkObjectMemory: answer if
shrinkage occurred, and only increment statShrinkMemory if so.

Cogit:
Add leak checking of CogMethod counters and implicit receiver caches.

StackToRegisterMappingCogit:
Follow jumps to jumps and push: aBoolean; jump:if:s, eliminating dead code.
Elimnate jumps to the immediately following instruction in
StackToRegisterMappingCogit>>generateInstructionsAt:.

Sista:
Added support for BitShiftRight: and bitShiftLeft: unsafe operations

Added support for inlined primitive #characterAsInteger.

Fixed a bug where branchIfNotInstanceOf: span function misscomputed the
distance when ExtB is negated to inverse the branch.

Set deadCode to true in trap bytecode to avoid generating merge machine code
that is never reached.

Use Spur's single-bit tests for immediates in the
CogObjectRepresentationFor??BitSpur's branchIf:has[Not]ImmediateTag:target:

Fix the ssFlushTo: call in genExtJumpIfNotInstanceOfBehaviorsBytecode

Fix coging optimized methods with lots of literals.

Change the machine compilation of BranchIfInstanceOf if there is one Behavior
and the behavior is UndefinedObject, True and False to compile to a direct
comparison to the unique instances instead of class index check.

Add a new trampoline to create new hashes. The trampoline is Sista only and
it's used in the inlined primitive.

ThreadedFFIPlugin:
Fix FFI in 64bits. The moduleHandle (a pointer) was incorrectly truncated to
an int (32bits).

Lowcode:
64 bits version of Lowcode. All of the tests for WodenMath are passing.

Workaround a GCC crash in Windows when building a Lowcode VM. Too much register
allocation pressure for calling a builtin memcpy.
  • Loading branch information
eliotmiranda committed Jan 28, 2017
1 parent 5de089b commit de43045
Show file tree
Hide file tree
Showing 32 changed files with 18,489 additions and 13,338 deletions.
2 changes: 1 addition & 1 deletion nsspur64src/vm/cogit.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.2082 uuid: f987e1db-f4c0-40ed-86ec-7a478cb89067
CCodeGenerator VMMaker.oscog-eem.2116 uuid: aacee506-96d1-4cb6-8a9c-d27fb6b54754
*/


Expand Down
1,435 changes: 852 additions & 583 deletions nsspur64src/vm/cointerp.c

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion nsspur64src/vm/cointerp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2082 uuid: f987e1db-f4c0-40ed-86ec-7a478cb89067
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2116 uuid: aacee506-96d1-4cb6-8a9c-d27fb6b54754
*/


Expand Down Expand Up @@ -235,6 +235,7 @@ extern sqInt numStrongSlotsOfWeakling(sqInt objOop);
extern sqInt objectAfter(sqInt objOop);
extern sqInt objectBefore(sqInt objOop);
extern sqInt obsoleteDontUseThisFetchWordofObject(sqInt fieldIndex, sqInt oop);
extern sqInt oldSpaceObjectAfter(sqInt objOop);
extern sqInt popRemappableOop(void);
extern sqInt primitiveErrorTable(void);
extern void printActivationsOf(sqInt aMethodObj);
Expand All @@ -256,6 +257,7 @@ extern void printObjectsFromto(sqInt startAddress, sqInt endAddress);
extern void printObjectsWithHash(sqInt hash);
extern void printObjStack(sqInt objStack);
extern void printOopsFromto(sqInt startAddress, sqInt endAddress);
extern void printOopsSuchThat(sqInt (*function)(sqInt));
extern void printReferencesTo(sqInt anOop);
extern void pushRemappableOop(sqInt oop);
extern sqInt rawHashBitsOf(sqInt objOop);
Expand Down
1,435 changes: 852 additions & 583 deletions nsspur64src/vm/gcc3x-cointerp.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion nsspursrc/vm/cogit.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.2082 uuid: f987e1db-f4c0-40ed-86ec-7a478cb89067
CCodeGenerator VMMaker.oscog-eem.2116 uuid: aacee506-96d1-4cb6-8a9c-d27fb6b54754
*/


Expand Down
1,436 changes: 860 additions & 576 deletions nsspursrc/vm/cointerp.c

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion nsspursrc/vm/cointerp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2082 uuid: f987e1db-f4c0-40ed-86ec-7a478cb89067
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2116 uuid: aacee506-96d1-4cb6-8a9c-d27fb6b54754
*/


Expand Down Expand Up @@ -140,6 +140,7 @@ extern sqLong nullHeaderForMachineCodeMethod(void);
extern usqInt scavengeThresholdAddress(void);
extern sqInt withoutForwardingOnandwithsendToCogit(sqInt obj1, sqInt obj2, sqInt aBool, sqInt (*selector)(sqInt,sqInt,sqInt));
extern sqInt byteSwapped(sqInt w);
extern sqInt fetchClassTagOf(sqInt oop);
extern sqInt floatObjectOf(double aFloat);
extern sqInt headerIndicatesAlternateBytecodeSet(sqInt methodHeader);
extern sqInt instantiateClassindexableSize(sqInt classObj, usqInt nElements);
Expand Down Expand Up @@ -234,6 +235,7 @@ extern sqInt numStrongSlotsOfWeakling(sqInt objOop);
extern sqInt objectAfter(sqInt objOop);
extern sqInt objectBefore(sqInt objOop);
extern sqInt obsoleteDontUseThisFetchWordofObject(sqInt fieldIndex, sqInt oop);
extern sqInt oldSpaceObjectAfter(sqInt objOop);
extern sqInt popRemappableOop(void);
extern sqInt primitiveErrorTable(void);
extern void printActivationsOf(sqInt aMethodObj);
Expand All @@ -255,6 +257,7 @@ extern void printObjectsFromto(sqInt startAddress, sqInt endAddress);
extern void printObjectsWithHash(sqInt hash);
extern void printObjStack(sqInt objStack);
extern void printOopsFromto(sqInt startAddress, sqInt endAddress);
extern void printOopsSuchThat(sqInt (*function)(sqInt));
extern void printReferencesTo(sqInt anOop);
extern void pushRemappableOop(sqInt oop);
extern sqInt rawHashBitsOf(sqInt objOop);
Expand Down

0 comments on commit de43045

Please sign in to comment.