     var classes = {};   // Map of classes processed or in queue to their LineInfo
 
     queue.push(rootclass);
-    classes[rootclass] = new LineInfo(rootclass, "", false, "(internal)", 0); // synthetic
+    classes[rootclass] = new LineInfo(rootclass, "", false, [], "(internal)", 0); // synthetic
 
     while (queue.length > 0) {
         var cls = queue.shift();
         for ( var l=0 ; l < lines.length ; l++ ) {
             var ln = lines[l];
-            if (classes.hasOwnProperty(ln.base)) {
-                if (!classes.hasOwnProperty(ln.derived)) {
-                    var basecls = classes[ln.base];
-                    ln.baseref = basecls;
-                    basecls.subrefs.push(ln);
-                    classes[ln.derived] = ln;
-                    ln.defcount = 1;
-                    queue.push(ln.derived);
-                }
-                else {
-                    // Flag it as used, but it's not canonical because
-                    // it's not in the classes table.
-                    ln.defcount = 1;
+            var baseNames = [ln.base];
+            baseNames = baseNames.concat(ln.extraBases);
+            for ( var b=0; b < baseNames.length ; b++ ) {
+                var baseName = baseNames[b];
+                if (classes.hasOwnProperty(baseName)) {
+                    if (!classes.hasOwnProperty(ln.derived)) {
+                        var basecls = classes[baseName];
+                        ln.baseref = basecls;
+                        basecls.subrefs.push(ln);
+                        classes[ln.derived] = ln;
+                        ln.defcount = 1;
+                        queue.push(ln.derived);
+                    }
+                    else {
+                        // Flag it as used, but it's not canonical because
+                        // it's not in the classes table.
+                        ln.defcount = 1;
+                    }
                 }
             }
         }

    var derived;            // name of the class being defined
    var base;               // name of its base class
    var isExact;            // true iff the class is exactly traced
    var filename;           // file where we found the definition of 'derived'
    var lineno;             // line where we found the definition of 'derived'
    var baseref = null;     // reference to the LineInfo for the base class


class LineInfo
{
    function LineInfo(_derived, _base, _isExact, _extraBases, _filename, _lineno) {
        derived = _derived;
        base = _base;
        isExact = _isExact;
        extraBases = _extraBases;
        filename = _filename;
        lineno = _lineno;
    }
