New Cog VMs available

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

New Cog VMs available

Eliot Miranda-2

These include stack ARM VMs for Spur and V3.

CogVM binaries as per VMMaker.oscog-eem.1855/r3692

General:
Fix a bad bug in primitiveVoidVMStateForMethod. One might think that the heap
scan is unnecessary if the method does not have a cog method.  But it could be
the case that the code zone has recently been reclaimed and so not having a cog
method is no indication that it didn't have a cog method some time in the recent
past, and that there are indeed still contexts with machine code pcs out there.

Correct slip in primitiveMethodXray, the flags were not set in each caseOf:
branch (thanks to -Wunused-value).

Change overflow tests in precondition rather than postcondition for small
integer multiplication.  Because integer overflow is undefined behaviour, and
because we can't rely on undefined behaviour, the compiler has a license to
eliminate the post-condition as dead code (at least since iso c89 acception).
Post-condition currently works because we use -fwrapv compiler flag, but
relying on specific compiler flags is bad practice in the long term. 

Fix regression in signed 32bit long access (introduced beginning of April).
One symptom is:
  (Alien newGC: 4)
signedLongAt: 1 put: -16r7287E552;
signedLongAt: 1

Fix positive32BitIntegerFor: for Spur64 which worked only because the constant
was generated ULL.

Spur:
Fix primitiveIsPinned.

V3:
Fix missing comparison operation in genPrimitiveIdentical on V3. This should
fix Character = problem encounterd in Cuis.

Debugging: Add printContextReferencesTo: & printActivationsOf: and have them
print the pcs of the contexts they find.


Cogit:
Reorder annotation constants to simplify isPCMappedAnnotation:.

Sista Cogit:
Added a primitive to answer all the methods present in the machine code zone.

allMachineCodeMethods
<primitive: 'primitiveAllMethodsCompiledToMachineCode' module:''>
^#()

Fix regression in VMMaker.oscog-eem.1823 when merging the two map enumerators
into one that affects Sista.  The merged enumerator must extend
IsSendAnnotations with the AnnotationExtension.


Plugins:
Regenerate plugins using the recently revised type inferrence code.


Slang:
Extend type inference capabilities from the AST.  Unify type inference used to
#inferReturnTypeFromReturnsIn: with that based on AST.  Now that type inference
is a bit more thorough, release type restrictions in #isFunctional in order to
obtain much more aggressive inlining.  With those, a gain of 10% is possible
on the LargeIntegersPlugin dominated bench:

Use a type inference that better fits C rules (C99 standard section 6.3):
- in (float op int), int is promoted to double not float
- in (unsigned short op short) both operands are promoted to #int due to int
  promotion rules.

Use minimum generality for generated integer constants:
- use int if variable fits in int
- else unsigned int
- else long long (long would be enough for 64bits versions, but long long works
  for both 32 and 64)
- else unsigned long long
This is to avoid spurious unsigned promotion due to improved type inference.


Mac OS X: Fix argument processing, so that e.g. 
myvm -breaksel aSelector my.image
works (but -headless still fails).

_,,,^..^,,,_
best, Eliot