This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GSOC | Extending Common Lisp support


Sorry for the slow response, exams are getting in the way of more
interesting things, and the situation is only going to worsen for the
next 3 weeks until they all end. :-(

The refactoring is progressing slowly, mostly due to difficulties I'm
having in reasoning about the possible regressions I might cause with
some of these changes (and exams). To be honest, I've had to resort to
trusting the test suite coverage for some of this stuff (that's not
overly optimistic, right?)

I think most of the types in Scheme#getTypeMap are of interest to all
Lisps, barring of couple that I consider specific to scheme (boolean
and the various vector types). I moved this into LispLanguage. The
gist of the type changes in Scheme.java are:

public synchronized HashMap<String, Type> getTypeMap ()
  {
    if (types == null)
    {
      types = new HashMap<String, Type>();
      booleanType = new LangPrimType(Type.booleanType, Scheme.getInstance());
      types.put("boolean", booleanType);
      for (int i = uniformVectorTags.length; --i >= 0;)
      {
        String tag = uniformVectorTags[i];
        String cname = "gnu.lists." + tag.toUpperCase() + "Vector";
        types.put(tag + "vector", ClassType.make(cname));
      }

    }
    return types;
  }

(where types is now a private field of Scheme, also note, this method
is no longer static)

  public Type getNamedType (String name)
  {
    Type type;
    type = LispLanguage.getLispTypeMap().get(name);
    if (type == null) {
      type = getTypeMap().get(name);
    }
    return type;
  }

I also discovered quantities today, they're Ãbercool, but currently
specific to Scheme. I don't see any reason for this, is it OK to make
them available to all Lisps?  This would make the refactoring of
SchemeCompilation#checkDefaultBinding a little nicer.

I am actively applying the advice of not getting too hung up on this
stuff, it's just this particular refactoring is tightly coupled to a
few others, so it's taking a little longer than I expected.

Charles.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]