return items.VoidItem();;
return items.VoidItem();
    Item gen2(Tree tree, MSILType toType) {	Symbol sym = tree.hasSymbol() ? tree.symbol() : null;	switch (tree) {	case Empty:	    return items.VoidItem();;	case Block(Tree[] stats):	    return gen(stats);	case ValDef(_, Name name, Tree tpe, Tree rhs):	    LocalBuilder local = code.DeclareLocal(tc.getType(sym));	    local.SetLocalSymInfo(name.toString());	    locals.put(sym, local);	    if (rhs == Tree.Empty)		return items.VoidItem();	    MSILType type = type2MSILType(tpe.type);	    load(coerce(gen(rhs, type), type));	    return check(store(items.LocalItem(type, local)));	case Ident(Name name):	    //log("Ident: " + Debug.show(tree));	    if (sym == defs.NULL)		//return items.LiteralItem(MSILType.NULL_REF, null);		return items.LiteralItem(MSILType.OBJECT, null);	    MSILType type = type2MSILType(sym.type());	    if ( sym.isModule() ) // ??? 		return load(items.StaticItem			    (type2MSILType(tree.type), tc.getModuleField(sym)));	    else {		Integer slot = (Integer) params.get(sym);		if (slot != null) {		    return items.ArgItem(type, slot.intValue());		} else {		    LocalBuilder local = (LocalBuilder) locals.get(sym);		    if (local != null)			return items.LocalItem(type, local);		}		return items.SelectItem(type,					items.SelfItem(tc.getType(currentClass)),					tc.getField(sym));	    }	case Select(Tree qualifier, Name selector):	    if (sym.isModule()) {		//log("gen: Select from a module: " + sym);		if (sym.isJava())		    logErr("gen.Select: Cannot treat Java class '" +			   sym.fullNameString() + "' as value:\n\t" +			   dumpSym(sym));		else { // scala module		    Type module = tc.getType(sym);		    return items.StaticItem(MSILType.REF(module),					    tc.getModuleField(sym));		}	    }	    if (!qualifier.hasSymbol()) {		return items.SelectItem(type2MSILType(tree.type),					gen(qualifier), tc.getField(sym));	    }//??? 	    if ((qualifier.symbol().flags & NOVAL) == NOVAL) {// 		log("gen.Select: owner NOVAL");// 		return items.StaticItem(type2MSILType(tree.type), tc.getField(sym));// 	    }	    // check if the tree corresponds to a static Java field	    if (qualifier.symbol().isModule() && sym.isJava()) {		//log("gen.Select: static Java field");		return items.StaticItem		    (type2MSILType(tree.type), tc.getField(sym));	    }	    if ( qualifier.symbol().isModule() ) { // ?????		//log("gen: Select from a non-Java module: " + qualifier.symbol() + "::" + selector);		return items.SelectItem		    (type2MSILType(tree.type), gen(qualifier), tc.getField(sym));	    }	    if ( sym.isValue() || sym.isVariable() ) { 		return items.SelectItem		    (type2MSILType(sym.type()),		     gen(qualifier, type2MSILType(qualifier.type)),		     tc.getField(sym));	    }	    log("gen.Select: Dunno what to do with: " + dumpSym(sym));	    break;// 	    switch (sym.kind) {// 	    case Kinds.VAL:// 	    case Kinds.VAR:// 		//log("gen.Select: qualifier " + dumpSym(qualifier.symbol()) + ";;; " + dumpSym(sym));// 		//log("MSILType = " + type2MSILType(sym.type()));// 		return items.SelectItem(type2MSILType(sym.type()),// 					gen(qualifier, type2MSILType(qualifier.type)),// 					tc.getField(sym));// 	    default:// 		log("gen.Select: Dunno what to do with: " + dumpSym(sym));// 	    }// 	    break;	case Apply(Tree fun, Tree[] args):	    return check(genApply(fun, args, type2MSILType(tree.type)));	case Assign(Tree lhs, Tree rhs):	    boolean tmpLastStatement = lastStatement; lastStatement = false;	    MSILType type = type2MSILType(lhs.type);	    Item var = gen(lhs, type);	    load(gen(rhs, type));	    lastStatement = tmpLastStatement;	    return check(store(var));	case Typed(Literal(Object value), Tree tpe):	    log("Typed.Literal: " + Debug.show(tree));	    return items.LiteralItem(type2MSILType(tpe.type), value);	case Typed(Tree expr, Tree tpe):	    //log("gen.Typed: processing node: " + Debug.show(tree));	    return gen(expr, type2MSILType(tpe.type));	case New(Template(Tree[] baseClasses, Tree[] body)):	    assert body.length == 0 : "Template should not have a body!";	    switch (baseClasses[0]) {	    case Apply(Tree fun, Tree[] args):		//MethodBase mctor = tc.getMethod(fun.symbol());		//log("GenMSIL.New: " + dumpSym(fun.symbol()));		//log("\t" + mctor);		ConstructorInfo ctor = (ConstructorInfo) tc.getMethod(fun.symbol());		loadArgs(args, ctor.GetParameters());		code.Emit(OpCodes.Newobj, ctor);		return items.StackItem(MSILType.REF(ctor.DeclaringType));	    default:		throw new ApplicationError("Dunno what to do!");	    }	case This(_):	    return items.SelfItem(tc.getType(currentClass));	case Super(Tree tpe):	    //logErr("Super not implemented yet");	    return items.VoidItem();	case Literal(Object value):	    //log("Literal: " + Debug.show(tree));	    //log("\ttype = " + Debug.show(tree.type));	    MSILType t = type2MSILType(tree.type);	    //log("\tmsil type = " + t);	    return items.LiteralItem(t, value);	case If(Tree cond, Tree thenp, Tree elsep):	    //log("gen.If: cond = " + Debug.show(cond));	    //log("        then = " + Debug.show(thenp));	    //log("        else = " + Debug.show(elsep));	    Item item = genIf(cond, thenp, elsep, toType);	    return check(item);	default:	    throw new ApplicationError("Dunno what to do: " + tree);	}	throw new ApplicationError	    ("Dunno what to do with tree node: " + Debug.show(tree));	    } //gen()