Skip to content

Representations do not work on CCL #3

@Symbolics

Description

@Symbolics

The function representation-initial-value throws a type-error on CCL. Strangely, the type error is intermittent, or appears at different locations. At times it is thrown from the check at the end of the fully macro expanded function:

The value *CS* is not of the expected type (OR
                                            ALEXANDRIA.1.0.0:ARRAY-INDEX
                                            SLCT::CANONICAL-RANGE
                                            SLCT::CANONICAL-SEQUENCE).

Other times from elsewhere:

The value #(2 3 5) is not of the expected type CCL::SIMPLE-UNSIGNED-DOUBLEWORD-VECTOR.
   [Condition of type TYPE-ERROR]

and sometimes (rarely), it's not thrown at all and it works properly:

SLCT-T> (SLCT::CANONICAL-SEQUENCE #(2 3 5))
#S(SLCT::CANONICAL-SEQUENCE :VECTOR #(2 3 5))
SLCT-T> (slct::representation-initial-value *)
; Evaluation aborted on #<TYPE-ERROR #x2101FD5EAD>.
SLCT-T> (slct::representation-initial-value **)
2
SLCT-T> (slct::representation-initial-value ***)
2
SLCT-T> (lisp-implementation-version)
"Version 1.11.8 (v1.11.8-2-gd411e378) WindowsX8664"

CCL::SIMPLE-UNSIGNED-DOUBLEWORD-VECTOR is an un-exported type internal to CCL, used in some kind of class translation. It is not used in the code.

My best guess at this point is that this is a CLOS problem with CCL, although it's intermittent nature is puzzling and could indicate a deeper issue in CCL. The code works fine on SBCL and ACL implementations. Experiments with various array types for the vector did not change the result. There is a possibly related discussion on comp.lang.lisp from 2017 that may be worth reading through.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions