2003-06-06  Per Bothner  <per@bothner.com>

	* Expression.java (compileNotePosition):  Take extra parameter.
	(compileWithPosition):  Add overloaded version.
	* PrimProcedure.java (compileArgs):  Update compileNotePosition call.
	* LambdaExp.java (compileBody):  If body doesn't have line,
	use LambdaExp's line.

	* InlineCalls.java (rewriteToInvocation, walkApplyExp):  Call setLine
	to copy line number info on newly allocated ApplyExp.

2003-06-03  Per Bothner  <per@bothner.com>

	* LambdaExp.java (inlinedIn):  New helper method.
	(declareClosureEnv):  Partially revert 05-30 change, but make
	use to inlineIn to simplify and fix one case.
	(enterFunction):  Don't set closureEnv if inlinedIn outer.

2003-05-31  Per Bothner  <per@bothner.com>

	* Interpreter.java (getOutputConsumer):  Generalize to take Writer.
	(eval(String,PrintConsumer)):  Call getOutputConsumer.
	(eval(Reader,Writer)):  Likewise,

2003-05-30  Per Bothner  <per@bothner.com>

	* LambdaExp.java (declareClosureEnv):  Simplify - if inline-only,
	used the parentFrame.
	(enterFunction):  Don;'t need to set closeEnv if inline-only.
	Fixes bug reported 05-26 by Sven.Hartrumpf@FernUni-Hagen.de.

2003-05-23  Per Bothner  <per@bothner.com>

	* Compilation.java (compileConstant):  Better error message on void.

2003-05-18  Per Bothner  <per@bothner.com>

	* FindCapturedVars.java (walkLetExp):  Generalize letrec-optimization.

2003-05-17  Per Bothner  <per@bothner.com>

	* InlineCalls.java (getCompilation):  New method.

2003-05-04  Per Bothner  <per@bothner.com>

	* Compilation.java (lexical):  Make non-final.  Having it final
	triggers a bug in JDK 1.1.8's javac, and it doesn't need to be final.

2003-04-30  Per Bothner  <per@bothner.com>

	* InlineCalls.java (rewriteToInvocation):  Make non-static.
	Call inline method on resulting Invoke procedure.

	* Interpreter.java (getDefaultSymbolValue):  Check for unresolved
	namespace prefix.

2003-04-28  Per Bothner  <per@bothner.com>

	* ChainLambda.java (walkClassExp):  Don't set ClassExp types here
	(since that is too late given that it may be needed by Inlinecalls).
	* InlineCalls.java (walkClassExp):  Do it here instead.
	Fixes bug reported 03-20 by Vladimir Tsichevski <wowa1@online.ru>.
	
2003-04-27  Per Bothner  <per@bothner.com>

	* ThisExp.java (compile):  Do nothing if IgnoreTarget.  Otherwise call
	compileFromStack.  Fixes bug reported 04-24 by Vladimir Tsichevski.

2003-04-21  Per Bothner  <per@bothner.com>

	* PrimProcedure.java (compileArgs, compile):  Call usedClass on
	classes declaring method and parameter and return types.

2003-04-19  Per Bothner  <per@bothner.com>

	* ResolveNames.java:  New class, extends ExpWalker.
	* Makefile.am (java_sources):  Update.

2003-04-19  Chris Dean  <Chris.Dean@sokitomi.com>

	* ModuleMethod.java (match):  Allow null as parameter.
	
2003-04-19  Per Bothner  <per@bothner.com>

	* LambdaExp.java (compileAsMethod):  Fix call to deprecated method.

	* Compilation.java (lexical):  New field, moved from Translation.
	(<init>):  Initialize lexical field.
	(pus, pop):  Also call corresponding operations on lexical.
	(push(Declaration)):  New method.
	(lookup):  Just call lexical.lookup.

2003-04-18  Per Bothner  <per@bothner.com>

	* LambdaExp.java (compile):  Do nothing if target is IgnoreTarget,
	and if function isn't read.

	* NameLookup.java:  New class.
	* Makefile.am (java_sources):  Update.

2003-04-14  Per Bothner  <per@bothner.com>

	* Declaration.java (compileStore):  Use emitPutStatic if static field.
	* Declaration.java (isStatic):  If current scope is not a LambdaExp,
	check the outer LambdaExp for whether it is a static module.
	* FindCapturedVars.java (capture):  If we capture a simple static
	variable, we still have to save it in the caturedDecls list.
	* LambdaExp.java (enterFunction):  Alloocate cpapturedVars as static
	fields if there is no heapFrame.
	Fixes bug reported 3/31 by Wen_Chun Ni <wcn@tbcommerce.com>.

	* LambdaExp.java (loadHeapFrame):  If closureEnv is null, push this.
	Change needed because of 03-02 change.

2003-04-12  Per Bothner  <per@bothner.com>

	* Declaration.java (FIELD_OR_METHOD):  New flag.

2003-04-12  Vladimir Tsichevski <wowa1@online.ru>

	* ObjectExp.java (compile): If closureEnv is null, push this instead.
	Change needed because of 03-02 change.

2003-04-08  Per Bothner  <per@bothner.com>

	* Special.java (make):  Return Special instead of Object.
	Since eof instead a Special, don't handle eof here.
	Fixes bug reported 04-05 by Vladimir Tsichevski.

2003-04-06  Per Bothner  <per@bothner.com>

	* ModuleExp.java (evalToClass):  Don't use SFormat for debug output.
	* ReferenceExp.java (print):  Don't use SFormat.
	* SetExp.java (print):  Likewise.

2003-04-05  Per Bothner  <per@bothner.com>

	* LambdaExp.java (getOwningLambda):  New methods, replaces
	static getHeapLambda.
	Don't stop at ClassExp unless getNeedsCloseEnv.
	(allocFieldFor, compileSetField, addMethodFor):  Use getOwningLambda.
	* ApplyExp.java (compile):  Use getOwningLambda.
	* ObjectExp.java (compile):  Likewise.
	* ProcInitializer.java (<init>):  Likewise.
	* ClassInitializer.java (<init>):  Likewise.
	
	* ClassExp.java (compilePushClass):  New method.
	(compile):  Use compilePushClass.
	* ClassInitializer.java (<init>):  Call ClassExp.compile here instead
	of indirectly in emit.  The latter may be too late if compile
	generates extra initializers, such as if there is a lambda.

2003-04-04  Per Bothner  <per@bothner.com>

	* FindTailCalls.java (walklambdaExp):  Set CANNOT_INLINE for
	class methods.
	* ModuleExp.java (allocFields):  A ClassExp always gets a field,
	even if it is private.
	* SetExp.java (compile):  Call compileSetField for a ClassExp
	even if it is private.

2003-03-29  Per Bothner  <per@bothner.com>

	* BindingInitializer.java (emit):  Modify optimization of 200-06-09.
	Fixes bug reported 03-29 by Vladimir Tsichevski <wowa1@online.ru>.

	* Interpreter.java (define_method):  Remove last parameter.
	Use ClassMethods.apply.

2003-03-28  Per Bothner  <per@bothner.com>

	* Interpreter.java (define_method):  New method.

2003-03-15  Per Bothner  <per@bothner.com>

	* Declaration.java (pushIndirectBinding):  Update to use named
	Symbol.make -> makeUninterned method.

2003-03-06  Per Bothner  <per@bothner.com>

	* LetExp.java (print):  Add a writeSpaceFill call.

2003-03-02  Per Bothner  <per@bothner.com>

	* LambdaExp.java (addMethodFor):  Don't set closureEnv.

	* Declaration.java (printInfo):  New method.
	* LetExp.java (print):  Use printInfo.
	* LambdaExp.java (print):  Likewise.  Create logical blocks.
	* ModuleExp.java (print):  Likewise.

2003-03-02  Per Bothner  <per@bothner.com>

	* LambdaExp.java (enterFunction):  No need to allocate a staticLink
	field if this is a ModuleExp - it's never used.

	* FindCapturedVars.java (capture):  If decl has a base field, just
	capture that, but don't do anything else.

2003-02-23  Per Bothner  <per@bothner.com>

	* InlineCalls.java (walkIfExp):  New method - fold if constant test.

2003-02-20  Tom Reilly <treilly@macromedia.com>

	* Compilation.java (outputClass):  Made separate method,
	for use by gnu.kawa.servlet.KawaPageServlet.
	(compileToFiles):  Call outputClass.

2003-02-19  Per Bothner  <per@bothner.com>

	* ClassExp.java (getCompiledClassType):  Add package prefixes to
	names of simple classes.

	* ClassExp.java (compile):  Replace deprecated init_param_slots calls
	by startCode.

2003-02-04  Per Bothner  <per@bothner.com>

	* LambdaExp.java (addMethodFor):  Only make $finit$ method private
	if this is a simple (non-pair) class.

2003-01-24  Per Bothner  <per@bothner.com>

	* ApplyExp.java (eval): If procedure is null, throw exception.

2003-01-01  Per Bothner  <per@bothner.com>

	Field names now use the reversible mangleNameIfNeeded - though
	method names don't.
	* Interpreter.java (define_field):  Use mangleNameIfNeeded.
	* LambdaExp.java (allocFieldFor):  Use mangleNameIfNeeded.
	* Declaration.java (allocateVariable, makeField):  Likewise.
	* PrimProcedure.java (getMethodFor):  Don't use field name for
	mangledName, as they may be mangled differently.

2002-12-16  Per Bothner  <per@bothner.com>

	* Compilation.java (compileTarget):  Better handling of Values.

	* Interpreter.java (eval(String,PrintConsumer)):  New method overload.

2002-11-23  Per Bothner  <per@bothner.com>

	*  Interpreter.java (define_field):  Move 2 methods from
	kawa.standard.Scheme.

2002-11-20  Per Bothner  <per@bothner.com>

	* Interpreter.java (getSymbolValue, getSymbolProcedure,
	getDefaultSymbolValue):  New methods.
	* Compilation.java (lookup):  Argument can be Symbol as well as String.
	(getSymbolValueMethod, getSymbolProcedureMethod):  New fields.
	* ReferenceExp.java (eval):  Handle Symbol better.
	(eval, compile):  Use new Interpreter methods.
	* InlineCalls.java (rewriteToInvocation):  New method.
	(walkApplyExp):  If function is Symbol, try rewriteToInvocation.

2002-11-16  Per Bothner  <per@bothner.com>

	* Interpreter.java (NAMESPACE_PREFIX):  New constant.

	* ReferenceExp (getName):  If name is a Symbol, use Symbol.getName.
	* Interpreter.java (asType):  Likewise.
	* LambdaExp.java (setName):  New method.

	* LambdaExp.java (print):  Print decl itself, rather than its name,

2002-11-15  Per Bothner  <per@bothner.com>

	* CatchClause.java (<init>):  Name parameter need not be a String.

2002-11-12  Per Bothner  <per@bothner.com>

	* Declaration.java (name):  Removed field, replaced by:
	(symbol):  New field, either a String or a Symbol.
	(getName, toString):  Changed to match.
	(getSymbol):  New method.
	(setName. <init>):  Changed parameter type.
	* ScopeExp.java (lookup, getNoDefined, getDefine, addDeclaration):
	Declaration name an be arbitrary Object, not just String.
	* SetExp.java:  Removed field, replaced by:
	(symbol):  New field, either a String or a Symbol.
	(getSymbol):  New method.
	(getName, <init>, eval, compile. print):  Changed accordingly.

2002-11-10  Per Bothner  <per@bothner.com>

	* PrimProcedure.java (match): Catch ClassCastException if coercing
	'this' fails.

	* FindTailCalls.java (walkFluidLetExp): Set inTailContext to false for
	body, since we need to restore bindings at end.
	Fixes bug reported by Wen-Chun Ni <wcn@tbcommerce.com>.

	* LetExp.java (print):  New overloaded method.
	* FluidLetExp.java (print):  New method.

2002-11-05  Per Bothner  <per@bothner.com>

	* Interpreter.java (parseFile):  Take extra 'immediate' argument.
	(eval):  Set/restore current Envronment and Interpreter.
	Call parseFile with 'immediate' argument as true.

2002-10-28  Per Bothner  <per@bothner.com>

	* Symbol.java:  Renamed to Symbol.java.
	* Makefile.am, Keyword.java:  Update to match.

2002-10-22  Daniel Bonniot  <bonniot@users.sourceforge.net>

	* Compilation.java (compileConstant(Object,Target)): Convert integer
	constants when the target is type short or type byte.

2002-10-20  Per Bothner  <per@bothner.com>

	* Declaration.java (followAliases):  If decl is an import decl created
	by require, and not exported, then skip to the exported field.
	(makeField):  If this is an alias, but it is constant, use base's type.

	* ModuleExp.java (allocFields):  Skip if decl.ignorable().

	* Compilation.java (addClass):  Change first arg to ModuleExp.
	This allows some simplification.

2002-10-16  Per Bothner  <per@bothner.com>

	* LambdaExp.java (allocFrame): Never set type from frameType.
	Change suggested by Daniel.Bonniot@inria.fr.

2002-09-27  Per Bothner  <per@bothner.com>

	* Compilation.java (inlineOk):  Ignore flag if nested procedure.

2002-09-26  Per Bothner  <per@bothner.com>

	* Declaration.java (IS_ALIAS):  Make public.
	(isLexical):  Static can be lexical.
	(makeField):  If decl is alias, make field a Location, not a Binding.
	* FindTailCalls.java (walkSetExp):  Walk value even if defining alias.
	* SetExp.java (compile):  Don't initialize simple public alias
	using an AliasConstraint - Location is set by BindingInitializer.
	* ModuleExp.java (allocFields):  Don't clear value if an alias.
	* Interpreter.java (getTypeFor):  Handle imported aliases.

2002-09-24  Per Bothner  <per@bothner.com>

	* Compilation.java (inlineOk):  New static field.
	(inlineOk):  Two new methods.
	* ApplyExp.java (compile):  Only inline if inlineOk.
	* InlineCalls.java (walkApplyExp):  Only inline if inlineOk.

2002-09-20  Per Bothner  <per@bothner.com>

	* ConsumerTarget.java (compileFromStack):  Handle the case where
	the stack value is long or double, which emitSwap doesn't support.
	Fixes bug reported by Jim White <jim@pagesmiths.com>.

2002-08-10  Per Bothner  <per@bothner.com>

	* SetExp.java (walkChildren):  Use new ExpWalker walk method.

	* Compilation.java (generateConstructor):  Create dummy LambdaExpr
	for processing initChain.
	* SetExp.java (compile):  Combine IS_SYNTAX case with QuoteExp case.
	Also handle IS_CONSTANT here.  Allow private and immediate.
	* Declaration.java (makeField):  Unknowns are no longer automatically
	static.  If type not specified, don't infer it from value.
	Do create BindingInitializer for unknowns.
	* FindCapturedVars.java (walkModuleExp):  Don't generate SetExps
	for unknowns - they should to be emitted earlier, in case of
	mutual dependent modules (when they are implemented).
	(capture):  Now need to handle captured unknowns - not always static.
	However, force static if in a static function or class,
	(walkReferenceExp, walkSetExp):  Unknowns are no longer always static.
	* ModuleExp.java (allocFields):  Allocate unknowns first.

	* ApplyExp.java (compile):  Don't call using tailcall-handling API
	unless either call is a tail-call or target is ConsumerTarget.

2002-08-09  Per Bothner  <per@bothner.com>
(
	* ModuleBody.java (runAsMain):  Do defineAll, so exported bindings
	get placed in environment.

	* StackTarget.java (compileFromStack0):  If we did a emitCoerceToObject
	then the stackType changed.

	* InlineCalls.java (walkApplyExp):  Micro-optimization.

2002-08-06  Per Bothner  <per@bothner.com>

	* Compilation (usedClass):  New method.
	(callInitMethods):  New method.
	(generateConstructor):  Use callInitMethods to generate $finit$ calls.

	* ClassExp.java (usedSuperClasses):  New private helper method.
	(compile):  Call usedSuperClasses.
	* Compilation (loader):  New field.
	* Moduleexp.java (evalToClass):  Allocate ClassLoader early.
	Re-arrange loops to classes to class-loader using addClass.

2002-08-04  Per Bothner  <per@bothner.com>

	* Interpreter.java (loadClass):  Slightly better exception message.

	* PrimProcedure.java (getParameterType):  Handle <list> #!rest type.
	(getMethodFor):  New overload, takes ClassType rather than Class.
	Looks for most specific definitely applicable method.

2002-07-25  Per Bothner  <per@bothner.com>

	* Compilation.java (compile):  Pass this to InlineCalls.
	* InlineCalls.java (inlineCalls):  Save Compilation and messages.
	(walkApplyExp):  Check for correct argument count.
	Resolve known procedures to PrimProcedure.  This used to be done
	in ApplyExp, but it is better to do it earlier.
	* ApplyExp.java (walkChildren):  Inline 1-argument walkExps.
	(compile):  Don't check argument count or look for PrimProcedure here.

	* Compilation.java (error):  Remove no-longer used methods.

2002-07-24  Per Bothner  <per@bothner.com>

	* Compilation.java:  Merge in functionality of Parser.java.
	(current_scope, messages):  New fields.
	(filename, position):  Remove fields - uses messages instead.
	(error):  Chaneg to use messages.
	(currentLambda, getModule, setModule, currentModule, currentScope,
	musCompileHerem push, pop, lookupm getMessages, setMessages,
	getFile, getLine, getColumn, setFile, setLine, setColumn): New methods.
	(immediate):  Make public.
	(getIntepreter):  Call Interpreter's static getInterpreter.
	(<init>):  New simple constructors.
	(compile):  New method, contains bulk of old constructor.
	Add two tests to return if seenErrors.
	(compileToFiles, compileToArchive):  Moved from ModuleExp.java.
	* Parser.java:  Remove file.
	* Makefile.am (java_sources):  Remove Parser.java.
	* ModuleExp.java (eval):  Remove method - inlined in evalModule.
	(evalToCall, evalModule):  Make static - pass in Compilation.
	(compileToFiles, compileToArchive):  Moved to COmpilation.java.
	* CheckedTarget.java (emitCheckedCoerce):  Use comp's getLine method.
	* Expression.java (compileNotePosition):  Use line-related methods.
	(makeWhile):  Update Parser->Compilation.
	* ScopeExp.java (getDefine):  Likewise.
	* Interpreter.java (parse):  Return Compilation, not ModuleExp.
	(parseFile):  Likewise.
	(eval):  Update accordingly.

2002-07-23  Per Bothner  <per@bothner.com>

	* ChainLambdas.java.(chainLambdas):  Use new walk method.
	* FindTailCalls.java (findTailCalls):  Likewise.
	* PushApply.java (pushApply):  Likewise.
	* LetExp.java (walkChildren):  Use new ExpWalker.walk method.

	* GenericProc.java (<init>):  New constructors.
	(setProperties):  New method.
	(make):  Change to use setProperties.

	* PrimProcedure.java (applyV):  Removed unused is_static variable.

	* PrimProcedure.java (compileArgs):  Fix off-by-one bug.

2002-07-22  Per Bothner  <per@bothner.com>

	* ExpWalker.java (messages):  New field.
	(getFile, getLine, getColumn, setFile, setLine, setColumn,
	error, notError):  New methods.
	(walk(Expression)):  New method.
	(walkExps):  Re-write to set/restore line numbers.
	* BlockExp.java, CatchClause.java, ExitExp.java, IfExp.java,
	LambdaExp.java (walkChildren):  Use new ExpWalk walk method.

2002-07-21  Per Bothner  <per@bothner.com>

	* CanInline.java (inline):  Take extra ExpWalker parameter.
	* InlineCalls.java(walkApplyExp):  Pass extra parameter.

	* ReferenceExp.java (print):  Don't lose if symbol is null.

2002-07-02  Per Bothner  <per@bothner.com>

	* StackTarget.java (getInstance):  Handle type.isVoid() specially.

	* ConsumerTarget.java (compileUsingConsumer):  Call canonicalize
	method gnu.mapping.Values.

2002-06-18  Per Bothner  <per@bothner.com>

	* ClassExp.java (slotToMethodName):  Do Compilation.mangleNameIfNeeded.

	* FindCapturedVars.java (walkClassExp):  New method.
	  Fixes bug reported by Jocelyn Paine.

	* LambdaExp.java (enterFunction): Remove redundant test.

2002-06-11  Per Bothner  <per@bothner.com>

	* Interpreter.java (languages):  Add "xslt".

2002-06-05  Per Bothner  <per@bothner.com>

	* ClassExp.java (setTypes):  Always explicitly do setInterfaces.

2002-05-28  Per Bothner  <per@bothner.com>

	* Declaration.java (UNKNOWN_PREFIX. PRIVATE_PREFIX, EXTERNAL_ACCESS):
	New constants.
	(makeField):  Pre-pend PRIVATE_PREFIX if appropriate.
	* ScopeExp.java (getNoDefine):  Also set IS_UNKNOWN.
	(getDefine):  Clear both NOT_DEFINING an IS_UNKNOWN.

	* LetExp.java (print):  Print Declaration, not just its name.
	* ReferenceExp.java (print):  Print Declaration if known.
	* SetExp.java (print):  Likewise.

2002-05-19  Per Bothner  <per@bothner.com>

	* BlockExp.java (oldTryState):  New field.
	(compile):  Set/clear oldTryState,
	* ExitExpr.java  (compile):  Call doPendingFinalizers.

2002-05-18  Per Bothner  <per@bothner.com>

	* Declaration.java (makeField):  Always mangle, but not reversible.
	Needed for compatibility with Scheme.define_field.

	* ApplyExp.java (compile):  Don't inline if INDIRECT_BINDING.

2002-04-18  Per Bothner  <per@bothner.com>

	* ModuleBody.java (runAsMain):  Call kawa.repl's exitDecrement.

	* Compilation.java:  Use Methods's new startCode method.

2002-03-18  Per Bothner  <per@bothner.com>

	* Interpreter.java (getInstance):  Check for InvocationTargetException.

2002-03-06  Per Bothner  <per@bothner.com>

	* ApplyExp.java (setFunction):  New method.

	* Compilation.java (loadCallContext):  Look for $ctx variable,
	instead of using callStackContext field.
	(addClass):  Use loadCallContext.
	(callStackContext):  Remove field.
	* ApplyExp.java (compile):  Use Compilation's loadCallContext method.
	* LambdaExp.java (allocParameters, compileBody):  Likewise.
	(allocParameters):  callStackContext is now local.
	(compileAsMethod):  Don't save/restore/set removed variable.
	
	* Declaration.java:  New constructor, takes Variable.

	* SeriesTarget.java (value):  Replace field by Declaration param.
	(scope):  New field.
	(compileFromStackSimple):  Update for new fields.

2002-03-02  Per Bothner  <per@bothner.com>

	* Interpreter.java (parseFile):  Now throws IOException and
	SyntaxException.

	* Interpreter.java (eval):  Eight new utility methods.

2002-02-15  Per Bothner  <per@bothner.com>

	* ReferenceExp.java (compile):  Use Procedure type if appropriate.

	* ApplyExp.java (compile):  Factor out common code.

	* Interpreter.java (defineFunction):  New methods.

2002-02-13  Per Bothner  <per@bothner.com>

	* Keyword.java (apply):  Emit attribute, not group.

	* ModuleBody.java (runAsMain):  Use CallContext.getInstance.

2002-02-12  Per Bothner  <per@bothner.com>

	* Compilation.java (loadCallContext):  Call CallContent.getInstance()
	unless method isHandlingTailCalls().
	* FluidLetExp.java (compile):  Get fluids from CallContext, not Future.
	* ModuleExp.java (evalModule):  Use CallContent.getInstance().
	* ModuleBody.java (run, apply0):  Likewise.
	(run) Set/restore CallContext's consumer.
	(runAsMain):  Use CallContext.setMainContext.

	* ModuleBody.java (run(Environment)):  New method, for compatibility.
	(run):  Call run(Environment).

	* GenericProc.java (add):  Sort methods by specificity.
	(applyN, match):  Since methods are sorted, just use first match.
	(applyV):  Update to match change to match.

2002-01-31  Per Bothner  <per@bothner.com>

	* Interpreter.java (defineFromFieldValue):  New method.
	(defineAll):  Make non-static, and use defineFromFieldValue.
	(loadClass):  Change to use non-static defineAll.

2002-01-29  Per Bothner  <per@bothner.com>

	* Interpreter.java (languages):  Add "krl".
	(getInstanceFromFilenameExtension):  New static.
	(getInstance):  Also look for "get"+LANGNAME+"Instance" method.

	* Interpreter.java (defineAll, loadClass);  Moved from
	gnu.xquery.lang.XQuery and made non-static.
	
2002-01-29  Daniel Bonniot  <bonniot@users.sourceforge.net>
 
 	* LambdaExp.java (addMethodFor): Rename conflicting methods in the same
 	class.
 
2002-01-26  Daniel Bonniot  <bonniot@users.sourceforge.net>

	* TryExp.java, CatchClause.java:  Visit catch clauses during a walk.

2002-01-23  Per Bothner  <per@bothner.com>

	* Interpreter.java (languages):  Add "brl".

2002-01-19  Per Bothner  <per@bothner.com>

	* Compilation.java:  If generating main, and the --output-format
	was specified, have compiled main call Shell's setDefaultFormat.

	* ModuleBody.java (runAsMain):  Call new CallContext.setInstance.

	* ModuleBody.java (runAsMain):  Use new Shell.getOutputConsumer.

2002-01-18  Nic Ferrier <nferrier@tf1.tapsellferrier.co.uk>

	* Interpreter.java (registerLanguage):  New static method.

2002-01-07  Per Bothner  <per@bothner.com>

	* Compilation.java (literalTable, literalsCount, literalsChain,
	findLiteral):  Moved to LitTable.java.
	(emitLiterals):  New method; replaces Literal.emit.
	* LitTable.java (literalTable, literalsCount, literalsChain,
	findLiteral):  Moved from Compilation.java.
	(emitPrimArray): Removed; replaced by CodeAttr.emitPushPrimArray.
	* BindingInitializer.java, Declaration.java, ModuleExp.java:  Update.
	* Literal.java:  Methods that took Compilation now take LitTable.
	(emit):  Remove; replaced by Compilation.emitLiterals.

	* Compilation.java (addClass):  Remove generateConstructor call.
	This generated a duplicate call to initialize ModuleBody.

2001-12-24  Per Bothner  <per@bothner.com>

	* ConditionalTarget.java (emitGotoFirstBranch):  New method.
	(compileFromStack):  Use emitGotoFirstBranch.

	* TypeValue.java:  New interface.
	* Makefile.am (java_sources):  Add TypeValue.java.

2001-11-24  Per Bothner  <per@bothner.com>

	* Expression.java (makeGetField):  Moved to gnu.kawa.reflect.SlotGet.
	(makeCoercion):  Moved to gnu.kawa.functions.Convert..

	* Expression.java (setLine):  New method.

2001-11-23  Per Bothner  <per@bothner.com>

	* CheckedTarget.java (emitCheckedCoerce)  If target type is
	tostring_target, don't need to catch cast exception.
	* StackTarget.java (compileFromStack0):  Use isSubclass rather than
	isSubtype to check that we don't need to emit a conversion.

	* PrimProcedure.java:  Remove unneeded variable.
	* ConsumerTarget.java:  Use Compilation.typeConsumer.

	* Declaration.java (IS_SINGLE_VALUE):  New constant.
	* ReferenceExp.java (compilation):  Optimize if SeriesTarget
	and IS_SINGLE_VALUE is set.

	* Compilation.java (loadCallContext):  New helper function.

	* LambdaExp.java (returnType):  New field.
	(getReturnType):  Guard against cycles.
	(setReturnType):  New method.
	* ApplyExp.java (getType):  Use LambdaExp's getReturnType.

2001-11-18  Per Bothner  <per@bothner.com>

	* ApplyExp.java (compile):  If isHandlingTailCalls use CallContext
	even for non-TailCalls (so CallContext gets passed through).
	(compileToArray):  Thus we can no longer re-use ctx.values.
	* Compilation.java (usingTailCalls):  Make non-static.
	(getModuleSuperType):  Handle usingCPStyle() case.
	(addClass):  Some tweaks for usingCPStyle() case.
	* FindCapturedVars.java (walkApplyExp):  Skip optimization to avoid
	function lambda if usingTailCalls, at least for now.
	* LambdaExp.java:  Tweaks for usingCPStyle() case.
	(allocParameters):  If isHandlingTailCalls() use getArgs method.

	* LambdaExp.java (enterFunction):  Use decl's parameter type,
	rather than the method's type, which is the implementation type.

	* LambdaExp.java (returnContinuation):  Make public, for ValuesMap.

	* ModuleBody.java (runAsMain):  Call runUntilDone rather than run,
	which wraps exceptions.  Instead, catch and print exceptions here.
	
	* PrimProcedure.java (<init>): Don't set interface flag as it prevents
	future getModifiers calls from getting the reflectClass's modifiers.
	
	* Expression.java (printLineColumn):  New method.
	* ApplyExp.java, BeginExp.java, LambdaExp.java, LetExp.java,
	SetExp.java (print): Use printLineColumn.

	* SetExp.java (getNewValue):  New method.

	* SetExp.java (compile):  Do compileSetField even if usingCPStyle.

2001-11-14  Per Bothner  <per@bothner.com>

	* GenericProc.java (match):  Look for best match, not first.

2001-11-12  Per Bothner  <per@bothner.com>

	* LitTable.java (writeObject);  Don't assign field for null.

	* LambdaExp.java (applyMethods):  Now initialized only if needed.
	(addApplyMethod):  New method; initialize applyMethods if needed.
	(compileSetField):  Call addApplyMethod.
	* Compilation.java (generateApplyMethods):  applyMethods can be null.
	* SetExp.java (compile):  Call addApplyMethod.

	* ModuleMethod (resolveParameterTypes):  New method.
	(match):  Also check parameter types.

2001-11-05  Per Bothner  <per@bothner.com>

	* ConsumerTarget.java (compileFromStack):  Use CallContent's new
	writeValues method.

2001-10-31  Per Bothner  <per@bothner.com>

	* ApplyExp.java (getArgCount):  New method.

	* FindTailCalls.java (walkLambdaExp):  Check if marked as inlined.
	Fixes problem where ValuesMap.inline terms tail-call to non-tailcall.

	* SeriesTarget.java (compile):  Don't pushScope/popScope, since that
	causes register conflicts due to our unusual jsr-based control flow.

2001-10-25  Per Bothner  <per@bothner.com>

	* SeriesTarget.java:  New class, extends Target.
	* Makefile.am (java_sources):  Add SeriesTarget.java.
	* StackTarget.java (compileFromStack0):  New static helper method.
	(convert):  New static helper method.  Uses compileFromStack0.

2001-10-20  Daniel Bonniot  <Daniel.Bonniot@inria.fr>

	* ModuleExp.java (compileToFiles):  Use File.separatorChar.

	* LitTable.java (writeObject): support for java.lang.* literals.

2001-10-19  Per Bothner  <per@bothner.com>

	* Expression.java, ApplyExp.java, BeginExp.java, IfExp.java,
	ModuleExp.java, SetExp.java, SynchronizedExp.java, TryExp.java (eval):
	Now specify throws Throwable.
	* ModuleExp.java (evalModule):  Likewise.
	Use CallContext's new runUntilDone method.
	* GenericProc.java, ModuleBody.java (apply* methods):   Likewise.
	* PrimProcedure.java (applyV):  Now throws Throwable, so on an
	InvocationTargetException just re-throw target exception.
	* ApplyExp.java (inlineIfConstant):  Catch Throwable.

2001-10-16  Daniel Bonniot  <Daniel.Bonniot@inria.fr>

	* Compilation.java (allocClass(ModuleExp)): Replaces 
	allocClass(LambdaExp). Cut dead code accordingly.
	* LambdaExp (getJavaName): Moved to ModuleExp.
	(compile, setNameMethod, compileAlloc): Removed.
	* ModuleExp (getJavaName): New method.

2001-10-11  Per Bothner  <per@bothner.com>

	* Compilation.java:  Added support --servlet.
	(typeServlet, generateServletDefault, generateServlet):  New fields
	(getModuleSuperType, startClassInit, addClass): Handle generateServlet.
	(generateApplyMethods):  Simplify - use getMethodProcType.
	* LambdaExp.java (allocFieldFor):  Pass correct frameType to
	Compilation.getMethodProcType.

	* PrimProcedure.java (applyV):  Use WrappedException.

2001-10-05  Per Bothner  <per@bothner.com>

	* Interpreter.java (asType):  CharSequence has been renamed to CharSeq.

2001-10-02  Per Bothner  <per@bothner.com>

	* Compilation.java (addClass):  Create clinit if --main or --applet.

2001-09-29  Per Bothner  <per@bothner.com>

	* ClassExp.java (getImplMethods):  Use Vector's 'addElement' method
	instead of 'add', for JDK 1.1.x compatibility.

2001-09-20  Per Bothner  <per@bothner.com>

	* Declaration.java (PRIVATE_SPECIFIED):  New flag.
	(makeField):  Only mangle if needed.
	Don't make UNKNOWN field final if we don't set it in clinit.

	* Declaration,java (isStatic):  Replace broken definition.
	* SetExp.java (eval):  No longer use isStatic; just check if ModuleExp.

	* StackTarget.java (compileFromStack0):  Add test that type is a
	ClassType.  Fixes bug reported by Jocelyn Paine.

2001-09-18   Andreas Schlapbach  <schlpbch@kde.org>

	* Interpreter.java (getLanguages):  New static method.

2001-09-15  Per Bothner  <per@bothner.com>

	Fix bug reported by Jocelyn Paine in returning #!null.
	* Compilation.java (generateApplyMethods):  Coerce return type
	using source lambda's return type, not method's implementation type.
	* ApplyExp.java (compile):  Likewise.
	* LambdaExp.java (getReturnType):  New method.
	(addMethodFor):  Use getReturnType.  Get implementation type of result.

2001-09-13  Per Bothner  <per@bothner.com>

	Reimplement --full-tailcalls to generate CpsMethodContainer.
	* LambdaExp.java (heapFrameLambda):  Removed field.
	(declareClosureEnv, allocFrame):  Don't test heapFrameLambda.
	(isClassGenerated):  No need to test for isHandlingTailCalls.
	(compileAlloc, compileEnd):  Likewise.
	(compile):  Simplify, remove cases no longer needed.
	(addMethodFor):  This is now also used if usingTailCalls, so modify.
	(allocChildClasses, enterFunction):  Remove no-longer-used code.
	(allocParameters):  Allocate $ctx parameter if handling tail-calls.
	(compileBody):  Get $ctx parameter from comp's callStackContext.
	(walkChildren):  Split into two methods ...
	(walkChildrenOnly, walkProperties):  New methods.
	* ApplyExp.java (compile):  No longer special-case handling
	of inline calls when --full-tailcalls.
	(popParams):  Also skip $ctx variable.
	* ChainLambdas.java (walkLambdaExp):  Split call to walkScopeExp
	so walkProperties is not scope of this lambda.
	* Compilation.java (getMethodProcType):  Extra case for usingTailCalls.
	(getConstructor):  No longer need to spacial-case usingTailCalls.
	(generateConstructor):  Likewise.
	(generateApplyMethods):  Handle usingTailCalls.
	(addClass):  Rename parameter "stack" to "$ctx".
	(compileConstant):  Do nothing if empty and target is ConsumerTarget.
	* FindCapturedVars.java (walkApplyExp):  Do walk function part
	if --full-tailcalls and calling to current function, for now.
	(capture):  Never set heapFrameLambda.
	* FindTailCalls.java (walkModuleExp):  No longer needed.
	(walkLambdaExp):  Call walkDecls at the appropriate time.
	* ReferenceExp.java (compile):  If fluid and field is null then
	load has alreadyloaded the value, so don't get the value field.
	* SetExp.java (compile):  Remove --full-tailcall Syntax special test.
	* ClassExp.java (compile):  Don't test heapFrameLambda.

	* ClassExp.java (getImplMethods):  Make static.
	Fix thinko, change reference to type field to interfaceType parameter.
	If incoming interfaceType is not an interface, return immediately.

2001-08-30  Per Bothner  <per@bothner.com>

	* Compilation.java (mangleNameIfNeeded):  New method.
	(mangleName): If reversible, '?' becomes plain "$Qu".
	(demangle2):  Re-write to use one big switch and add missing chars.
	* ClassExp.java (getCompiledClassType):  Use mangleNameIfNeeded.
	(getJavaName):  Likewise.
	(declareParts):  Likewise.  Mangling was missing before.

2001-08-27  Per Bothner  <per@bothner.com>

	* ModuleExp.java (evalModule):  Call CallContext's run method always.
	Fixes bug reported by Patrick Barta <patr@welchlink.welch.jhu.edu>

2001-08-24  Per Bothner  <per@bothner.com>

	* ClassExp.java (getType0:  Don't call declareParts.
	(partsDeclared):  New field.
	(getCompiledClassType):  Call declareParts if not already called.
	Always mangle name, even if simple, if name is not a valid Java name.
	* Compilation.java (isValidJavaName):  New static helper method.
	* Compilation.java (addClass): Emit class initializers even
	when immediate, to handle define-class.
	* Declaration.java (makeField):  Use reversible mangling.
	* Interpreter.java (getTypeFor):  Try looking up type name in
	current Environment.
	* ReferenceExp.java (getType):  Make non-final.
	* ThisExp.java (context):  New field.
	(<init>):  New constructor.
	(getType):  New method.

2001-08-23  Per Bothner  <per@bothner.com>

	* ClassExp.java (getCompiledClassType):  Map "<TNAME>" to "TNAME" here.
	(declareParts):  Make static field if specified.
	If making class pair, get method types from decl.
	Don't add Method for initMethod to instance method of pair.
	(getImplMethods):  New method to find implementation methods.
	(compile):  Use getImplMethods
	
	* PairClassType.java (reflectInstanceClass):  Renamed to instanceType.
	* ClassExp.java (setTypes): Update accordingly.

	* Compilation.java (typeObjectType):  New field.
	(generateClassName):  Do reversible name mangling.
	(generateConstructor):  If a ClassExp, call initMethod.
	* ObjectExp.java (compile):  Don't call initMethod here.

	Be more careful distingusihing source types (such as LispPrimType)
	and implementation types (such as PrimType) e.g. in conversions.
	* LambdaExp.java (addMethodFor):  Use implementation type when
	getting a Method.	
	* PrimProcedure.java (<init>):  Likewise, but used source types
	to set this.argTypes and this.retType.
	(compileArgs):  Use type from source, rather than method's type.
	* Compilation.java (generateApplyMethods):  Likewise.
	
	* LambdaExp.java (addMethodFor):  If a ClassExp's initMethod, then
	set the PRIVATE flag to prevent bad overrides.

	* Compilation.java (addClass):  Set SUPER flag.

	* FindCapturedVars.java (capture):  If decl IS_CONSTANT, do nothing.
	
	* SetExp.java (compile):  If a declaration is a class slot
	but without an actual field, look for and call a "set" method.

2001-08-16  Per Bothner  <per@bothner.com>

	* ClassExp.java:  Major re-write, to handle define-class, first-class
	classes, and true multiple inheritance.
	(simple, makeClassPair, instanceType):  New fields.
	(isSimple, setSimple, isMakingClassPair, setMakingClassPair):  New.
	(declareParts, slotToMethodName):  New methods.
	(class AbstractMethodFilter):  New class, extends Filter.

	* ClassInitializer.java:  New helper class, extends Initializer.
	* PairClassType.java:  New class, extends ClassType.
	* Makefile.am:  Update for new classes.

	* ModuleExp.java:  Now inherits directly from LambdaExp.
	(allocFields):  Add check for ClassExp.
	* ClassExp.java:  Now inherts directly from LambdaExp.
	Lots of code moved over from ObjectExp.
	* ObjectExp.java:  Now inherits from ClassExp, instead of vice versa.
	* ExpWalker.java (walkClassExp):  New method.
	(walkObjectExp):  Default to calling walkClassExp.
	* FindTailCalls.java (walkObjectExp):  Changed to walkClassExp.
	* ChainLambda.java:  Update for changed inheritance graph.
	* FindCapturedVars.java:  Likewise.
	(capture):  Don't set heapFrameLambda to ClassExp.
	* LambdaExpr.java:  Update for changed inheritance graph.
	* LambdaExp.java (compileEnd):  Kludge to handle usingTailCalls.
	* LambdaExp.java (addMethodFor):  Set isStatic if in ClassType.
	
	* ChainLambdas.java (walkClassExp):  If we are making a class-pair,
	name and addClass for instanceType class,

	* Compilation.java (typeClassType):  New static field.

	* Compilation.java (mangleName):  Take extra 'reversible' parameter
	to make an inveritble mangling.  Add overload.
	(demangle2):  Add support for '>', '<', and '('
	(demangleName):   Methods moved from kawa.stamdard.Scheme.
	Add extra 'reversible' option.

	* Compilation.java (<init>):  Add catch for error, to try to produce
	better error message on a compiler crash.

	* Compilation.java (addClass):  'Or' in PUBLIC, instead of assigning,
	since other code may have set other flags.

	* Compilation.java (getConstructor):  Add overload.
	(generateConstructor):  Add overload.
	If class has a staticLinkField, emit code to set it.
	* LambdaExp.java (enterFunction):  Use new getConstructor method.

	* LambdaExp.java (getExpClassName):  New method.
	(toString):  Use getExpClassName.
	
	* Interpreter.java (getTypeFor):  If a ClassExp, return its type.

	* Declaration.java (load):  If there is no variable and not field,
	but there is a "get" method, emit code to use that.

	* SynchronizedExp.java (compile):  Check for a ConsumerTarget.

2001-07-16  Per Bothner  <per@bothner.com>

	* Interpreter.java (languages):  Added xquery.
	(getOutputConsumer, getPrompter):  New methods.
	(parse, parseFile):  New abstract methods.

	* Parser.java:  Make non-abstract - used directly by XQuery.
	(currentModule, lookup):  New methods.
	(popBinding, pushBinding, push, pop, pushecls, popDecls):
	Moved to Translator.
	* ApplyExp.java (compile):  If handling tail calls, use setArgsN.

	* LambdaExp.java (compileBody):  New method.
	(compile, compileAsMethod):  Use compileBody.
	* ObjectExp.java (compile):  Likewise.
	* Compilation.java (addClass):  Likewise.
	* TailTarget.java:  Remove - use compileBody instead.
	* Makefile.am (java_sources):  Update accordingly.
	* Target.java (returnObject, returnValue):  Removed.

	* Compilation.java (typeConsumer):  New static field.

	* LambdaExp.java:  Overdue update of package containing LList.

	* ConsumerTarget.java:  Re-formatted.
	(cunsumer):  Fieldtype changed from Declaration to Variable.
	(compileUsingConsumer):  New static helper method.
	* Keyword.java (apply):  Update for endAttribute change in Consumer.

	* ModuleBody.java (runAsMain):  Optionally print values.
	(getMainPrintValues, setMainPrintValues):  New methods.

	* ScopeExp.java (currentModule):  New method.

2001-06-19  Per Bothner  <per@bothner.com>

	* Interpreter.java (asType):  Allow argument to be Binding.

2001-06-17  Per Bothner  <per@bothner.com>

	* BindingInitializer.java (emit):  No longer deal with Binding2.
	* Compilation.java (typeBinding2, functionValueBinding2Field,
	getBinding2Method):  Removed as Binding2 was removed.
	* Declaration.java (makeField):  No longer deal with Binding2.
	* SetExp.java (eval):  No longer need to handle Binding2.

	* Declaration.java (ignorable):  Return false if writing to unknown.
	(setCanWrite()):  New method.	
	* FindTailCalls.java (walkSetExp):  Use new method.

	* InlineCalls.java:  Preliminary code to check argument count.

	* ScopeExp.java (remove, lookup):  New methods.
	(getDefine):  Check for IS_UNKNOWN flag.

	* ReferenceExp.java (symbol):  Change type to Object so it
	could be a Binding.

2001-06-03  Per Bothner  <per@bothner.com>

	* Compilation.java (debugPrintFinalExpr):  New static field.
	(<init>):  If debugPrintFinalExpr, print expression.
	* ModuleExp.java (debugPrintExpr):  New static field.
	(evalModule, compileToFiles):  If debugPrintExpr, print expression.

	* Keyword.java:  Inherit from CpsProcedure.  A keyword FOO: sends a
	beginGroup of "FOO" to a Consumer, like xml <FOO>...</FOO>.
	
	* ApplyExp.java (eval(Environment,CallContext)):  For proper tailcalls
	don't call apply; leave that for the CallContext run method.

	* Expression.java (print(OutPort)):  New abstract method.
	(print(PrintWriter)):  Make final, and call new method.
	* ApplyExp.java, BeginExp.java, BlockExp.java, CatchClause.java,
	ErrorExp.java, ExitExp.java, IfExp.java, LambdaExp.java, LetExp.java,
	ModuleExp.java, ObjectExp.java, QuoteExp.java, ReferenceExp.java,
	SetExp.java, SynchronizedExp.java, TryExp.java (print):
	Changed to take OutPort parameter, and to do pretty-printing.

	* Interpreter.java (getFormat):  New abstract method.
	(print):  Add default implementation using getFormat.

	* ModuleBody.java (runAsMain):  Make sure OutPort.runCleanups is run.

2001-05-16  Per Bothner  <per@bothner.com>

	* ApplyExp.java (eval(Environment,CallContext)):  New method.

	* LambdaExp.java (compileEnd):  Always emitReturn if isModuleBody
	or isClassMethod, even if usingTailCalls.

	* ModuleBody.java (run(Consumer)):  New method.

2001-05-08  Per Bothner  <per@bothner.com>

	Change full-tailcalls calling convention so result is Consumer.
	ModuleBody uses full-tailcalls calling convention.
	* ApplyExp.java (compile):  Comment out usingCPStyle code for now.
	* Compilation.java (valueCallContextField):  Removed field.
	(addClass):  If non-static module-exp generate CpsProcedure apply.
	* Expression.java (eval(Environment,CallContext)):  New method.
	* IfExp.java (eval(Environment,CallContext)):  New method.
	* LambdaExp.java (isHandlingTailCalls):  A non-static module body
	now implements the CprProcedure calling convention.
	* ModuleBody.java:  Now extends CpsProcedure instead of Procedure0.
	Also implements Runnable.
	(run):  Return type is now void, with result ignored.
	(apply0):  New method, returns result value,
	* ModuleExp.java (evalModule(Environment,CallContext)):  New method.
	Call eval(Environment,CallContext) if not compiling.
	* TailTarget.java (compileFromStack):  Call StackContext's writeValue.

2001-05-01  Per Bothner  <per@bothner.com>

	* Interpreter.java (getNamespaceof):  New method.
	(VALUE_NAMESPACE, FUNCTION_NAMESPACE): New constants.

2001-04-24  Per Bothner  <per@bothner.com>

	* PrimProcedure.java (compileArgs):  Use compileNotePosition.
	* Checkedtarget.java (emitCheckedCoerce):  Do putLineNumber.

	* ApplyExp.java (getType):  Avoid infinite recursion.

2001-04-23  Per Bothner  <per@bothner.com>

	* ApplyExp.java (getType):  Handle functions that are ReferenceExp
	and LambdaExp as well as QuoteExp.  Fixes many warnings in kawa/lib.

2001-04-23  Per Bothner  <per@bothner.com>

	* ApplyExp.java (setArgs):  New method.

2001-04-09  Per Bothner  <per@bothner.com>

	* ApplyExpr.java (compile):  After too many/few-arguments message,
	set exp_lambda to 0, but don't make a new ReferenceExp.

2001-03-09  Per Bothner  <per@bothner.com>

	* Compilation.java (<init>):  Add a debugging hook.

	* PushApply.java (walkApplyExp):  Add walkChildren call.

	* SetExp.java (<init>):  Remove "%do%loop" kludge; hopefully unneeded.

2001-03-06  Per Bothner  <per@bothner.com>

	* ApplyExp.java	(compile):  When calling an inlined function,
	use parameter's type as target when evaluating arguments.

	* LambdaExp.java (compileAlloc, allocChildClasses):  Use old
	closure handling code when Compilation.usingTailCalls.

	* ModuleExp.java:  Add debugging code.

	* LitTable.java (writeObject):  Update FString package name.
	* Compilation.java:  Update classnames for new gnu.list changes.
	* Interpreter.java (<init>):  Constructor sets Convert.instance.
	* KawaConvert.java:  New class, extends gnu.lists.Convert.
	* Makefile.am:  Add KawaConvert.java.
	* Special.java (eof):  Now use gnu.lists.Sequence.eofValue.

2001-02-28  Per Bothner  <per@bothner.com>

	* LambdaExp.java (enterFunction):  If getInlineOnly(), set closureEnv
	from using loadHeapFrame of outerLambda.  (Fixes new test-case.)

2001-02-26  Per Bothner  <per@bothner.com>

	Use ModuleMethod to implement nested procedures too.
	* ApplyExp.java (compile):  Use LambdaExp.getHeapLambda.
	Use LambdaExp's compileEnd (unless --full-tailscalls).
	* Declaration.java (makeField):  Use comp.mainLambda's chain.
	* Compilation.java (applyMethods, initChain):  Moved to LambdaExp.
	(mainLambda):  New field.
	(typeCpsMethodProc, typeCpsMethodContainer):  New types.
	(<init>):  now requires ModuleExp, not LambdaExp.
	(getConstructor):  New method.
	(generateConstructor):  Return void.  Make on-argument overload.
	Use getConstructor.  Always traverse LambdaExp's (new) initChain.
	(generateApplyMethods):  Take LambdaExp parameter.
	(addClass):  Call compileEnd even if staticModule.
	* FindCapturedVars.java (capture):  Don't set heapFrameLambda.
	* LambdaExp.java (applyMethod):  New field, moved from Compilation.
	(isClassGenerated):  Return false for normal methods.
	(compileEnd):  Handle applyMethods, check for getInlineOnly().
	(allocFieldFor):  Don't make field FINAL if static.
	New scheme for selecting frame for field.
	(compileSetField):  Handle applyMethods moving from Compilation.
	(compile):  Don't return on IgnoreTraget (unless inlined or
	--full-tailcalls);  causes test failures from missing methods.
	(compile):  Frame is not always this.
	(getHeapFrameType, getHeapLambda):  New methods.
	(addMethodFor):  Use getHeapFrameType to find method's class.
	(allocFrame, enterFunction): In ObjectExp, frameType is object's class.
	(evalToClass, dumpZipPrefix, dumpZipCounter, eval): Moved to ModuleExp.
	* ClassExp.java:  Now extends LambdaExp, not ObjectExp.
	* ModuleExp.java:  Now inherit from ClassExp.
	(compile):  Commented out.
	(evalToClass, dumpZipPrefix, dumpZipCounter, eval):
	Moved from LambdaExp.
	* ObjectExp.java (compile):  Use Compilation's new generateConstructor.
	* ProcInitializer.java (<init>):  Chain is now managed by heapLambda.
	* SetExp.java (compile):  Handle applyMethods moving to LambdaExp.

	* Parser.java (mustCompileHere):  Look for enclosing ModuleExp.

2000-12-13  Per Bothner  <per@bothner.com>

	* Expression.java (makeGetField):  New static convenience method.

2000-12-11  Per Bothner  <per@bothner.com>

	* Expression.java (walk):  Make protected and change return type to
	Expression.  Make non-abstract - just call walkExpression.
	(walkChildren):  New virtual method.
	* ApplyExp.java, BeginExp.java, BlockExp.java, ExitExp.java,
	FluidLetExp.java, IfExp.java, LambdaExp.java, LetExp.java,
	ModuleExp.java, ObjectExp.java, ScopeExp.java, SetExp.java,
	SynchronizedExp.java, ThisExp.java, TryExp.java (walk):
	Make protected and change return type to Expression.
	* ApplyExp.java, BeginExp.java, BlockExp.java, ExitExp.java,
	IfExp.java, LambdaExp.java, LetExp.java, ObjectExp.java,
	ReferenceExp.java, SetExp.java, SynchronizedExp.java,
	TryExp.java (walkChildren):
	New method, with logic taken from ExpFullWalker.
	* ErrorExp.java (walk):  Removed - inherited version now works.

	* ExpWalker.java (walkExpression):  Change to protected and return
	type as Expression.  Change default to walkChildren and return this.
	(walkApplyExp etc):  Change to protected and return type to Expression.
	(currentLambda, exitVlaue):  New fields moved from ExpFullWalker.
	(getCurrentLambda, walkExps, walkDefaultArgs):  New methods, likewise.
	* ChainLambdas.java, FindCapturedVars.java, FindTailCalls.java,
	InlineCalls.java, PushApply.java:  Inherit from ExpWalker.
	(walkLambdaExp etc):  Change to protected and return Expression.
	* ExpFullWalker.java:  Removed.  Functionality moved either up to
	ExpWalker or to walkChildren methods in Expression sub-classes.
	* Makefile.am (java_JAVA):  Removed ExpFullWalker.java.

	* ChainLambdas.java (walkScopeExp):  Setup 'outer' links of ScopeExp
	and its sub-classes.  Call new walkChildren to walk children.
	(walkLambdaExp):  Call walkScopeExp.
	* Compilation.java (<init>):  Call InlineCalls early, since that may
	generate new tree.  Call ChainLambdas immediately after.
	* ExpFullWalker.java (walkScopeExp):  Just call walkChildren.
	(walkLambdaExp, walkObjectExp):  Removed.

	* LambdaExp.java (<init>(int)):  New constructor.

	* FindCapturedVars.java (allocUnboundDecl):  Use name as is.
	* Declaration.java (makeField): Handle IS_UNKNOWN declarations,
	and prepend "id$" here.

2000-12-09  Per Bothner  <per@bothner.com>

	* Declaration.java (IS_UNKNOWN):  New flag.
	(load):  If need Variable, and not yet allocated, do so now.
	(followAliases): Exit loop before returning null.
	(makeField):  If decl IS_UNKNOWN, make field static for now.
	No longer create BindingItitializer for unknown decls.
	* ApplyExp.java (<init>(Method,Expression[])):  New constructor.
	* ApplyExp.java (compile):  Check if decl IS_UNKNOWN, rather than null.
	* Interpreter.java (getTypeFor):  Likewise, but check null first.
	* Compilation.java (getBindingField):  Removed method - no longer used.
	(bindingFields):  Removed field.
	(initBindingFields):  Removed method.
	(generateConstructor, addClass):  Don't call initBindingFields.
	* FindCapturedVars.java (walkModuleExp, walkFluidLetExp):  New methods.
	(unknwonDecls, currentModule):  New fields.
	(allocUnboundDecl):  New method.
	(walkReferenceExp, walkSetExp):  Call allocUnboundDecl if needed.
	* FluidLetExp.java (compile):  Load decl.base to get (unknown) Binding.
	* SetExp.java (getName):  New method.
	(compile):  Changes since binding is now never null.
	* ReferenceExp.java (compile:  Likewise.

2000-12-02  Per Bothner  <per@bothner.com>

	* Compilation.java (generateConstructor):  Don't generate call to
	setName if module super-class has been specified, since super-class
	might not have setName.

2000-11-21  Per Bothner  <per@bothner.com>

	* PrimProcedure.java:  Handle more stringent SecurityManager.

2000-10-23  Per Bothner  <per@bothner.com>

	* StackTarget.java (compileFromStack0):  Always call emitCoerceToObject
	even when stackType.isSubtype(type).  Fixes bug in Stalin's
	destruct.sc benchmark, reported by Brian D. Carlstrom <bdc@ai.mit.edu>.

	* Interpreter.java (languages):  Recognize ".sc" as a Scheme
	extension (used in Stalin).

2000-10-12  Per Bothner  <per@bothner.com>

	* SetApplyExp.java:  Removed, as part of "setter" re-implementation.
	* Makefile.am (java_JAVA):  Update accordingly.
	* ExpWalker.java (walkSetApplyExp):  Removed field.

	* ApplyExp.java (compile):  Add overloading.
	New checkInlineable parameter.
	
	* Compilation.java (argsCallContextField):  Use "values" field,
	instead of removed "args" field.
	(dumpInitializers):  Reverse the order (to make it normal).

	* Compilation.java, FindCapturedVars.java, LambdaExp.java:
	Various fixes that apply when usingCPStyle().

	* LambdaExp.java (allocFieldFor):  If anonymous lambda, make
	field static if it doesn't need a closure.
	* FindCapturedVars.java (capture):  Return if decl has a static field.
	* ReferenceExp.java (eval):  If decl has ststic field, get its value.

	* Declaration.java (getConstantValue):  New helper method.
	* Declaration.java (IS_SYNTAX):  New flag constant.
	* SetExp.java (compile):  Update for Macro not extendeding Declaration.
	* ModuleExp.java (allocField):  Likewise.

	* PrimProcedure.java (takesVarArgs):  Return false if not a method.
	* ProcInitializer.java (emit):  Handle property value being
	an Expression, as opposed to a constant value.
	* ReferenceExp.java (setBinding):  New method.

2000-10-12  Per Bothner  <per@bothner.com>

	* CanInline.java:  New interface.
	* InlineCalls.java:  New class, extends ExpFullWalker.
	* Makefile.am (java_JAVA):  Add new classes.
	* ApplyExp.java (inlineIfConstant):  New utility method.
	* Compilation.java (<init>):  Call inlineCalls.inlineCalls.

	* Initializer.java (reverse):  New static method.

	* Declaration.java (<init>(String,Field)):  New constructor.
	(getDeclaration):  Two new static methods.

	* PrimProcedure.java (makeBuiltinBinary):  New static method.
	(compileArgs):  Update for moved class kawa.standard.list_v
	-> gnu.kawa.functions.MakeList.

	* SetApplyExp.java (setterProcedure):  Update for moved class
	kawa.standard.setter -> gnu.kawa.functions.Setter.

2000-10-09  Per Bothner  <per@bothner.com>

	* GenericProc.java (applyN):  If a method matches, don't re-use the
	matching CallContext for future match attempts, but use a new one.

2000-10-02  Per Bothner  <per@bothner.com>

	* ModuleExp.java (allocFields):  If decl.field is already set (e.g.
	by a require), don't allocate a field.

2000-08-23  Daniel Bonniot <bonniot@cma.ensmp.fr>

	* SetExp.java (compile):  Handle more cases of needValue.

2000-08-17  Per Bothner  <per@bothner.com>

	* SetExp.java (compile):  Add check for !comp.usingCPStyle().

	* ApplyExp.java, Compilation.java, LambdaExp.java, TailTarget.java:
	Renamed CallStack->CallContext, typeCallStack->typeCallContext etc.

	* ApplyExp.java (compile):  Don't crash if incorrect number of args.

	* Compilation.java (<init>):  Set mainClass before doing walks.

	* Compilation.java (addClass):  New method, takes ClassType.
	(allocClass(LambdaExp,String)):  Removed method.
	(allocClass(LambdaExp)):  Use new addClass, but not for an ObjectExp.

	* Compilation.java:  Some fixes towards the goal of call/cc support.
	* LambdaExp.java:  Likewise.

	* ConsumerTarget.java: New class, extends Target.
	* Makefile.am (java_JAVA):  Add ConsumerTarget.java.
	* LambdaExp.java (SEQUENCE_RESULT):  New flag.
	(addMethodFor):  If SEQUENCE_RESULT is set, append "$C" to method name.
	Also in that case, method returns void.
	(compileAsMethod):  If SEQUENCE_RESULT set, target is ConsumerTarget.
	
	* GenericProc.java (getVarBuffer):  Removed method.
	(match, applyV):  Update for new MethodProc api.
	* ModuleMethod.java:  Similar updates.
	* PrimProcedure.java:  Similar updates.
	(getProcedureClass, getMethodFor):  New static methods.

	* BeginExp.java (length):  New field.
	Allow variable number of sub-Expressions.
	(canonicalize, add):  New methods.
	* FindCapturedVars.java (walkLetExp):  Use BeginExp's new length field.
	* FindTailCalls.java (walkBeginExp):  Use BeginExp's new length field.
	* ExpFullWalker.java (walkExps):  New overload takes explicit length.
	(walkBeginExp):  Pass BeginExp's new length field to walkExps.

	* Expression.java (makeCoercion):  New static methods.

	* ChainLambdas.java (walkLambdaExp):  If lambda is bound to a
	unique declaration, make that its name.

	* ScopeExp.java (add):  New method.

	* ThisExp.java (<init>):  New constructors take/create Declaration.

2000-08-06  Per Bothner  <per@bothner.com>

	* LitTable.java (writeObject):  Handle null argument.
	(Fixes bug reported by Martin Atzmueller <ygrats@gmx.net>.)

	* ApplyExp.java (compile):  If direct method call needs closure,
	just call loadHeapFrame on parent.  This is a simplification
	which allows Dorai Sitaram pregexp package to work.

2000-06-26  Per Bothner  <per@bothner.com>

	* Interpreter.java (languages):  Add ".cl" extension for Common Lisp.

2000-06-24  Per Bothner  <per@bothner.com>

	* Interpreter.java (languages):  Add Common Lisp.

	* Special.java (print):  Also print #!" prefix.

	* SetExp.java (compile):  Add missing compileFromStack call.

2000-06-17  Per Bothner  <per@bothner.com>

	* ConditionalTarget.java (<init>(Label,Label)):  Remove constructor.

	* LambdaExp.java (properties):  New field.
	(getProperty, setProperty):  New methods.
	* ExpFullWalker.java (walkLambdaExp):  Also walk properties.
	* ProcInitializer.java (emit):  Also handle properties list.

	* Compilation.java (addClass):  Generate numArgs if --full-tailcalls.

	* GenericProc.java (make$V):  Renamed to plain make.

	* Interpreter.java (asType):  New method.

	* MethodProc.java:  Moved to gnu.mapping.
	* Makefile.am:  Update accordingly.

2000-06-09  Per Bothner  <per@bothner.com>

	* QuoteExp.java (getType):  If value is null, type is Type.nullType.
	* Literal.java (nullLiteral):  Its type is now Type.nullType.
	* LitTable.java (emit):  Handle null value.

	* Compilation.java (literalsChain):  New field.
	(addClass):  Call Literal.emit.  Do it *after* processing clinitChain,
	but make sure it is executed first.  (Gotos - sigh.)
	* Literal.java:  New longer inherit from Initializer.
	(next, field):  New fields (no longer inherited).
	(assign(Field,Compilation)):  New overload.
	Link on new comp.literalsChain, not comp.clinitChain.
	(emit):  Make static.
	* LambdaExp.java (evalToClass):  Update accordingly.
	* LitTable.java (emit):  Literals are no longer in clinitChain.
	* BindingInitializer.java (emit):  Add optimization.

	* Compilation.java (nameField):  Removed, since sym_name is gone.
	(setNameMethod):  New method.
	(addClass): Invoke setNameMethod instead of setting nameField.

	* LitTable.java (emit(Literal,booolen)):  Serialization spec says
	readResolve should return Object.  Hence, add needed cast.
	* Keyword.java (readResolve):  Fix return type to Object.
	* Special.java (readResolve):  Likewise.

	* Keyword.java (<init>):  Don't copy argument String.

	* Declaration.java (makeField):  New method, based on code from
	BindingInitializer constructor.
	* ModuleExp.java (allocFields):  Use Declaration's makeField method.
	* BindingInitializer.java (<init>):  Likewise.
	* SetExp.java (compile):  Use Declaration's new makeField method.
	Do nothing here for constant ModuleExp fields.

	* Declaration.java (noteValue):  If same Expression, same value.

	* CompiledProc.java:  Removed old file.

	* GenericProc.java (make$V):  New method.

	* Interpreter.java (languages):  Add language file extensions.

2000-06-05  Per Bothner  <per@bothner.com>

	* MethodProc.java (mostSpecific):  Fix type comparisons.

2000-05-28  Per Bothner  <per@bothner.com>

	* Compilation.java (mangleName):  Readable mangling of initial digit.

	* LambdaExp.java (addmethodFor):  Check for conflicting method names.

	* ModuleBody.java (apply0):  Use Values.noArgs, not rocedure.noArgs.

	* ModuleExp.java (SUPERTYPE_SPECIFIED):  New flag constant.
	(isStatic): Not default static if SUPERTYPE_SPECIFIED.

2000-05-27  Per Bothner  <per@bothner.com>

	Support (module-static ...) and (module-export ...).
	* ExpWalker.java (walkModuleExp):  New method.
	* ModuleExp.java (<init>):  Don't declareThis here.
	(isStatic, walk):  New methods.
	(allocFields):  Alloc field if !isSimple even if private.
	Add special test (kludge) for Macro.
	Don't setIndirectBinding here (do it in BindingInitializer instead).
	(EXPORT_SPECIFIED, EXPORT_SPECIFIED, NONSTATIC_SPECIFIED):  new flags.
	* FindTailCalls.java (walkDecls, walkModuleExp):  New methods.
	* ScopeExp.java (getDefine, getNoDefine):  New methods.
	* Declaration.java (fieldNum, assignField):  Unused, removed.
	(NOT_DEFINING, EXPORT_SPECIFIED, STATIC_SPECIFIED, NONSTATIC_SPECIFIED,
	TYPE_SPECIFIED, IS_CONSTANT):  New flag constants.
	(getFlag, setFlag, needsInit):  New methods.
	(setCanRead, setCanCall):  New method overloading.
	(needInit):  New method.
	* LambdaExp.java (NEXT_AVAIL_FLAG):  New constant.
	(declareClosureEnv):  Check if parent is ModuleExp.
	(allocFieldFor, addMethodFor):  Check if decl has STATIC_SPECIFIED.
	(allodFrame, enterFunction):  Check if ModuleExp.
	* ObjectExp.java (getType):  New method.
	(getCompiledClassType):  Now does not handle superclasses.
	* FindCapturedVars.java (capture):  Handle STATIC_SPECIFIED.
	If declaration has a 'base', handle it even if non-simple.
	* ModuleBody.java (run):  Make non-abstract.
	* Compilation.java (moduleStatic):  New static field.
	(instanceField):  New field.
	(allocClass):  Don't addClass if ModuleExp (since already done).
	(initBindingFields, startClassInit):  New method.
	(addClass, generateConstructor):  Call initBindingFields.
	(addClass):  Some extra complications to handle static modules.
	* ChainLambdas.java (comp):  New Compilation field.
	(walkObjectExp):  Create and name ClassType for ObjectExp.
	* ProcInitializer.java:  If field is static, link on initChain.
	(emitLoadModuleMethod):  If method static get comp's instanceField.
	* BindingInitializer.java:  Handle static vars and explicit types.
	* LetExp.java (store_rest, compile):  Use new Declaration needs_init.

	* Compilation.java (mangleName):  Uppercase following $-escape.
	Handle special characters in switch statement.

	More efficient handling of simple aliases.
	* Declaration.java (followAliases):  New method.
	(allocateVariable):  Call it.
	* FindTailCalls.java (walkApplyExp, walkReferenceExp, walkSetExp):
	Call Declaration.followAliases.
	* FindCapturedVars.java:  Likewise.
	* SetExp.java (compile):  Call Declaration.followAliases.
	* ReferenceExp.java (compile):  Likewise.

2000-05-23  Per Bothner  <per@bothner.com>

	* Compilation.java (makeNullPairMethod, makePairMethod):  Removed.
	(Reported by Edouard G. Parmelan <Edouard.Parmelan@quadratec.fr>.)

2000-05-22  Per Bothner  <per@bothner.com>

	* LitTable.java:  New class, manages the literals of a Compilation.
	* Compilable.java:   Removed, no longer used.
	* Makefile.am (java_JAVA):  Update accordingly.
	* Literal.java (argVlaues, argTypes0:  New fields.
	(ALLOCATING, ALLOCATED, INITIALIZED, ASSIGNED):  Removed flags values.
	(WRITING, WRITTEN, CYCLIC, EMITTED):  New flags values.
	(emitArray, emit(Compilation,boolean)):  Remove now-unused methods.
	* Compilation.java (scmListType):  Renamed to typeLList.
	(emptyConstant):  New Field field.
	(litTable):  New field.
	(findLiteral):  Nothing to do now if we already have literal.
	No special handling for Compilable or Object[].
	(emitLiteral):  Remove unused now-methods.

	* Interpreter.java (getTypeFor):  New methods.
	(string2Type):  New static method, based on method in Scheme class.
 	
	* Keyword.java:  No longer implements Compilable.
	* Special.java:  No longer implements Compilable.

	* PrimProcedure.java (<init>(Method, Interpreter):  New constructor.

	* MethodProc.java (mostSpecific):  Use Type.compare once instead
	of isSubtype twice.

2000-05-09  Per Bothner  <per@bothner.com>

	* Keyword.java:  Implement java.io.Externalizable
	* Special.java:  Likewise.
	Change so name does not include "#!" prefix.
	
	* PrimProcedure.java (<init>):  Call non-deprecated addMethod version.

	* Parser.java (current_filename, current_line, current_column,
	messages):  Move fields here from Translator.
	(<init>):  New constructor.
	(error(char,Declaration,String,String)):  New method.
	(getMessages, setMessages, error):  Methods moved from Translator.
	(getFile, getLine, getColumn, setFile, setLine, setColumn

	* Interpreter.java (languages):  New static table.
	(getInstance):  New overloaded static methods.

2000-05-07  Per Bothner  <per@bothner.com>

	* ApplyExp.java (compile):  If calling a name bound to a constant
	that is not a procedure, emit a warning (instead of an exception).
	Based on a patch from Daniel Bonniot <bonniot@cma.ensmp.fr>.

	* Expression.java (makeWhile):  Remove old unsafe overloaded variant.

2000-04-22  Per Bothner  <per@bothner.com>

	* PrimProcedure.java (init):  New private helper method.
	New constructors take java.lang.reflect.Method and Interpreter.
	(getMethodFor):  New method overloads use new constructor/
	* ApplyExp.java (compile):  Pass interpreter to
	PrimProcedure.getMethodFor.

2000-04-21  Per Bothner  <per@bothner.com>

	* Parser.java:  A new class, an abstract super-class for Translator.
	* Expression.java (makeWhile):  New overload, uses Parser.
	* Makefile.am (java_JAVA):  Add parser.java.

	* LambdaExp.java (addMethodFor):  Don't make method FINAL
	(the user may want to inherit from this module).

	* ModuleMethod.java:  Change to extend MethodProc.
	(getVarBuffer, match, applyV):  New methods.

	* SetExp.java (getType):  Handle the HAS_VALUE case.

	* Interpreter.java (emitPushBoolean, emitCoerceToBoolean): New methods.

2000-04-13  Per Bothner  <per@bothner.com>

	* SetExp (eval, compile):  If define-alias, create an AliasConstraint.
	* Declaration.java (IS_ALIAS):  New flag.
	(isAlias, setAlias):  New methods.
	* ReferenceExp.java (eval, compile, getType):  Handle case when
	getDontDereference() is true.  (Return Location instead.)
	
	* ModuleExp.java (compileToFiles):  If module name is specified,
	always set topname from module name (even if compound).
	Set prefix from module name only if prefix is not specified.
	Use File.mkdirs to create missing output directories.

	* Interpreter.java (coerceToObject(int)):  New method.

	* Compilation.java (mangleName): Change mangling for '!', '->', '%'.
	(demangle2):  New static method.

2000-03-21  Per Bothner  <per@bothner.com>

	* gnu/expr/Compilation.java (typeRunnable):  New static.
	(allocClass):  Handle explicit super-class and interfaces.
	(generateApplyMethods):  Set generateApplyMethodContainer whenever
	super class is not Procedure.
	(addClass):  Handle "run" method differently if explicit superclass.
	(getMethodProcType):  Made static;  takes ClassType argument.
	(getModuleSuperType):  Take ModuleExp parameter, check its supertype.
	* LambdaExp.java (allocFieldFor):   Update getMethodProcType call.
	* ProcInitializer.java (emitLoadModuleMethod):  Likewise.
	* gnu/expr/ModuleExp.java (superType, interfaces):  New field.
	(getSuperType, setSuperType, getInterfaces, setInterfaces):  New.
	(compileToFiles):  Handle explicit specified module name.

2000-03-12  Per Bothner  <per@bothner.com>

	* Compilation.java (mangleName):  Add manglings for ascii characters.

	* Expression.java (makeWhile):  New static.
	(noExpressions):  New static field.

	* Expression.java (flags):  New field.
	(setFlag, getFlag, getFlags):  New methods.
	* ReferenceExp.java:  Use inherited flags field and conventions.
	(PREFER_BINDING2):  New flag bit.
	(eval, compile):  More kludges for ELisp support.
	* SetExp.java:  Use inherited flags field and conventions.
	(PREFER_BINDING2):  New flag bit.
	(eval, compile):  Get "noValue" from Interpreter.
	(eval, compile):  More kludges for ELisp support.
	* LambdaExp.java (flags, getFlags, setFlags):  Now inherited.

	* IfExp.java (compile):  Pass interpreter to ConditionalTarget.
	* Interpreter.java (getInterpreter):  New static method.
	* ConditionalTarget.java (interpreter):  New field.
	(<init>):  Take Interpreter argument.
	(compileFromStack):  Use interpreter's boolean values.
	
2000-03-06  Per Bothner  <per@bothner.com>

	* ApplyExp.java (compile):  Handle identifier bound to declaration
	with constant value (as created by `require').
	* Declaration.java *base):  New field.
	(loadOwningObject):  If base is non-null, load that.
	* FindCapturedVars.java (capture):  If captured Declaration has a
	null-null base, mark it as readable, and capture it as well.
	* PrimProcedure.java (compile):  Split into two methods.
	(getMethodFor):  Likewise.

	* LambdaExp.java (getCaller):  Don't loop looking for inlined callers.

	* LambdaExp.java (enterFunction):  Use main methods parameter
	types to set stack type.

	* FindTailCalls (walkSetExp):  Check for decl.isPublic, rather
	if the context is a ModuleExp (which doesn't work for private decls).

	* Special.java (print):  Just print the name.

2000-03-02  Per Bothner  <per@bothner.com>

	* CheckedTarget.java (emitCheckedCoerce):  Don't add handler if we
	didn't add any coercion code.  Slightly modified from a patch from
	Daniel Bonniot <bonniot@cma.ensmp.fr>.

	* ExitExp.java (getType):  New method - return Type.neverReturnsType.

2000-02-29  Per Bothner  <per@bothner.com>

	* LambdaExp.java (allocChildClasses):  Set firstArgsArrayArg for
	child when isClassGenerated().  Fixes bug reported by Bruce R. Lewis.

2000-02-27  Per Bothner  <per@bothner.com>

	Various tweaks for better javadoc processing.
	* overview.html:  Renamed to package.html.

	* Compilation.java (nameField):  Now name is in Procedure, not Named.
	* LambdaExp.java (compileAlloc):  Update for setName method.

2000-02-26  Per Bothner  <per@bothner.com>

	* Literal.java (nullIteral):  New final static field.
	(emit):  Handle null value.
	* Compilation.java (findLiteral):  Handle null value.
	(emitLiteral):  Likewise.

2000-02-25  Per Bothner  <per@bothner.com>

	* ExpFullWalker.java (walkDefaultArgs):  New method.
	(walkLambdaExp):  Call walkDefaultArgs.
	* FindCapturedVars.java (walkDefaultArgs):  New method.
	Check if default expression captures a parameter.
	* LambdaExp.java (DEFAULT_CAPTURES_ARG):  New flag.
	(setFlag): New (non-public) method.
	(addMethodFor):  Generate stubs unless DEFAULT_CAPTURES_ARG is set.
	(compileAsMethod):  For stubs, make parameter be simple.

2000-02-12  Per Bothner  <per@bothner.com>

	* Compilation.java (typeApplyMethodContainer):  New static field.
	(generateApplyMethods):  If applet. implement ApplyMethodContent.
	Add generateApplyMethodContainer local variable.
	* LambdaExp.java (addMethodFor):  Set closureEnv for applets.
	Make method non-static if thisVariable is set.

	* ThisExp.java:  New class; extends ReferenceExp.
	* Makefile.am, Makefile.in (java_JAVA):  Added ThisExp.java.
	* ExpWalker.java (walkThisExp):  New virtual method.
	* FindCapturedVars.java (walkThisExp):  New method.

2000-02-11  Per Bothner  <per@bothner.com>

	* BindingInitializer.java:  Create Binding2 instead of Binding
	if the languge hasSeparateFunctionNamespace().
	* Declaration.java (isProcedureDecl, setProcedureDecl):  New flags.
	* Interpreter.java (hasSeparateFunctionNamespace):  New method.
	* ApplyExp.java (eval, compile):  Remove hacks for checking "function
	binding" - let ReferenceExp.isProcedureDecl() handle it instead.
	* ModuleBody.java (runAsMain):  Don't create kawa.standard.Scheme here;
	instead compiler inserts call to Scheme.registerEnvironment.
	* ReferenceExp.java (flags):  New int field.
	(dontereference):  Folded into flags field.
	(isProcedureName, setProcedureName):  New methods.
	(eval, compile):  Use function name space, if appropriate.
	* SetExp.java (getHasValue, setHasValue, isFuncDef, setFunDef,
	isSetIfBound, setSetIfUnbound):  New methods.
	(eval, compile):  Update to use new flags.

	* Compilation.java (scmInterpreterType):  Renamed to typeInterpreter.
	(typeBinding2, functionValueBinding2Field, getBindingEnvironmentMethod,
	getBinding2Method, defineFunctionMethod, typeApplet, typeValues,
	noArgsField):  New static fields.
	(apply*ModuleMethod etc):  Remove many no-longer-needed fields.
	(generateAppletDefault, generateAppletDefault):  New fields.
	(getMethodProcType, getModuleSuperType):  New method.
	(generateApplyMethods):  Fix various small but critical bugs.
	Handle the main class inheriting from Applet.
	(addClass):  Generate code to "registerEnvironment" if main or applet.
	* LambdaExp.java (addMethodFor):  Declare `this' for applet methods.
	(compileAsMethod):  Fix various small but serious bugs.

	* Compilation.java (mangleName):  Mangle initial digit.

	* ProcInitializer.java (emitLoadModuleMethod):  Get ModuleMethod's
	<init> method using ClassType.getDeclaredMethod.
	(constructor_args, initModuleMethod):  No longer needed.

2000-01-31  Per Bothner  <per@bothner.com>

	* ApplyExp.java (eval):  Use getProcedure to get function value.
	* Interpreter.java:  Moved from kawa.lang.
	(defaultInterpreter):  New static field.
	(isTrue, booleanObject, noValue):  New methods.
	(boolObject):  Removed method.
	(getName):  Made abstract.
	* Makefile.am, Makefile.in (java_JAVA):  Added Interpreter.java.
	* Compilation.java (getInterpreter):  New method.
	(scmInterpreterType):  Interpreter moved from kawa.lang to gnu.expr.
	(compileConstant):  Use getInterpreter().isTrue method.
	* IfExp.java (eval, compile):  Likewise.
	(getInterpreter):  New method.
	(is_true):  Removed method.

	* SetExp.java (HAS_VALUE):  New flag.
	(getHasValue, setHasValue):  New methods.
	(eval):  If getHasValue() return RHS, else return 
	(compile):  Likewise.

	* QuoteExp.java (getType):  If value is null, type is Object.

2000-01-25  Daniel Bonniot <bonniot@cma.ensmp.fr>

	* QuoteExp.java: (getType):  For null, return Type.pointer_type.

2000-01-24  Per Bothner  <per@bothner.com>

	* BeginExp.java (<init>):  New default constructor.
	(setExpressions):  New method.
	(getExpression):  Make private.

2000-01-22  Per Bothner  <per@bothner.com>

	* BindingInitializer.java:  New class, inherits from Initializer.
	* Makefile.am, Makefile.in (java_JAVA):  Add BindingInitializer.java.

	* Compilation.java (argsArray):  Removed field.
	(typemacro, typeLocation, getLocationMethod):  New static fields.
	(findLiteral):  If empty Object[], use noArgsProcedureField.
	Handle Object[] where some elements are null.
	(mangleName):  If name starts with "->" mangle to "to", not "To".
	(generateConstructor):  More robust loop for processing initChain.
	Generate code to initialize bindingFields fields (not in "run").
	(generateApplyMethods):  New method.  Code moved from addClass,
	and generalized to handle LambdaExps with multiple primMethods.
	* LambdaExp.java (argArray, firstArgsArrayArg):  New fields.
	(flags):  Make protected.
	(METHODS_COMPILED, NO_FIELD):  New flag enums.
	(isClassgenerated):  Needing closure no longer forces class generation.
	(primMethod):  Rmeoved field; replaced by ...
	(primMethods):  New field.
	(getMethod, getmainmethod, restTypeArgs):  New methods.
	(declareArgsArray):  Removed method.
	(allocFieldFor, compileSetField):  New methods.
	(compile):  Use new methods.
	(addMethodFor):  New interface - can generate multiple Methods.
	(allocParameters, enterFunction):  New longer takes argsArray argument.
	(enterFunction):  Handle both fix args plus final var args array/list.
	Generate better coed for keywordw when default is constant.
	(compileAsMethod):  Handle multiple methods;  generate stubs.
	* ObjectExp.java (compile):  Use LambdaExp's getMainMethod.
	* ApplyExp.java (compile):  Use LambdaExp's getMethod.
	Call that method using PrimProcedure.compileArgs.

	* FindTailCalls.java: Use Declaration's getValue method.
	* FindCapturedVars.java (walkApplyExp):  New method.
	(capture):  No longer return immediately if decl.isStatic().
	No need to chain decl on owner's capturedVars if decl is public.
	* Keyword.java (searchForKeyword):  New static method.
	* ModuleExp.java (evalModule):  Call ClassMemberConstraint.defineAll.
	(allocFields, print):   New methods.
	
	* SetExp.java (compile):  Various hacks mostly so that top-level
	definitions get exported as fields.
	* Literal.java (assign):  New overloaded method.
	(emit):  Better error message if Compilable not implemented.

	* PrimProcedure.java (match):  Optimize if rest arg is LList.
	(compileArgs):  New static helper method.
	(compile):  Use it.
	* ProcInitializer.java (emitLoadModuleMethod):  New static method.
	(emit):  Use emitLoadModuleMethod.
	(<init>):  New constructor.
	* ReferenceExp.java (compile):  Use Compilation.getLocationMethod.
	Handle non-static Binding method.
	
	* Declaration.java (shadowed):  Removed fields.
	(getValue):  Make final.
	(isPublic):  New method.

1999-12-24  Per Bothner  <per@bothner.com>

	* Initializer.java:  New abstract class.
	* ProcInitializer.java:  New class;  extends Initializer.
	* Makefile.am, Makefile.in (java_JAVA):  Add new classes.
	* Literal.java:  New inherits from Initializer,
	(next, field):  Replace by super-class fields.
	(assign):  Like to comp.comp.clinitChain not comp.comp.literalsChain.
	(emit):  New method (to satisfy super's abstract method).
	* Compilation.java (dumpLiterals):  Replaced by dumpInitializers.
	(literalsChain):  Rename to clinitChain;  change type to Initializer.
	(initChain):  New field.
	(generateConstructor):  Do dumpInitializers(initChain).

	* Compilation.java (addClass):  Remove now-unused "apply" generation.

	* Expression.java (compileNotePosition):  Do not use a try-finally
	to restore linenumber.
	* Compilation.java (addClass):  If an exception (internal error)
	is thrown while compiling, catch it and print an error.

	* Declaration.java:  No longer inherit from Variable.
	(sym):  Field re-named to `name'.
	(string_name, symbol):  Renmoved methods;  use getName instead.
	(next, var):  New fields.
	(IS_SIMPLE):  New flag.
	(getName, setName, setType, getType, nextDecl, getVariable, isSimple,
	setSimple):  New methods.
	(load, compileStore, initBinding):  Pass getVariable() instead of this.
	(allocateVariable):  New method.
	* ScopeExp.java (decls, last):  New fields.
	(firstDecl, add):  New methods.
	(addDeclaration):  Use new add method.
	* CatchClause.java (compile):  Change Declaration catchDecl
 	to Variable catchVar.
	* LambdaExp.java (declareThis, declareClosureEnv, declareArgsArray):
  	Now return Variables.
	(isClassGenerated):  Always generate class for ObjectExp;  never
	if outerLambda is a ModuleExp. 
 	(heapFrame, closureEnv, thisVariable):	Change from Declaration
 	to Variable.
	* Compilation.java (thisDecl, callStackContext):  Likewise.
	* ObjectExp.java (compile):  May need staticLink even of caller's
	closureEnv is null.  Call the Variable "closureEnv", not "staticLink".
	* FindTailCalls.java:   Update to use Declaration instead of Variable.
	* ApplyExp.java, FluidLetExp.java, LetExp.java, SerExp.java:  Likewise.
	* FindCapturedVars.java:  Likewise.
	(capture):  The heapFrame of a ModuleExp is its thisVariable.
	* ModuleExp.java (<init>):  Call declareThis.

1999-12-17  Per Bothner  <per@bothner.com>

	* CheckedTarget.java (emitCheckedCoerce): Use "lambda" as default name.

1999-12-11  Per Bothner  <per@bothner.com>

	* FindCapturedVars.java (walkLetExp)  Don't optimize if FluidLetExp.
	* gnu/expr/FindTailCalls.java (walkFluidLetExp):  New method.  Fixes
	bug reported by Walter C. Pelissero <wcp@lpds.sublink.org>.
	* gnu/expr/PushApply.java (walkApplyExp):  Don't re-write if
	function is FluidLetExp.

1999-12-06  Per Bothner  <per@bothner.com>

	* PrimProcedure.java (compile):  If too few/many arguments,
	call comp.error instead of throwing WrongArguments.

1999-12-06  Bruce R. Lewis  <brlewis@alum.mit.edu>

	* ModuleExp.java (compileToArchive):  Re-write to use java.util.zip.*
	instead of gnu.bytecode.ZipArchive.

1999-12-05  Daniel Bonniot <bonniot@cma.ensmp.fr>

	* Declaration.java (load):  Call emitPutStatic if appropriate.
	* SetExp.java (compile):  Likewise.

1999-11-28  Per Bothner  <per@bothner.com>

	* FindCapturedVars.java (capture):  When chasing down callers of
	inline-only functions, watch out for infinite cycles.
	* FindTailCalls.java (walkLambdaExp): If child has one *or zero*
 	callers, mark it as inline-only.

1999-11-27  Per Bothner  <per@bothner.com>

	* FindCapturedVars.java (capture):  If the captured decl is an
	inline-only procedure, we're done.  Likewise if we're calling ourself.
	Fixes bugs reported by Walter C. Pelissero <wcp@lpds.sublink.org>.
	Don't "capture" decl is it is a call-only variable.  (We don't
	need a closureEnv for a call-only ufnction.)  Instead, rely on
	new setCallersNeedStaticLink/setNeedsStaticLink() methods.
	* LambdaExp.java (getNeedsClosureEnv):  New method.  Use it various
 	places instead of (getImportsLexVars() || getNeedsStaticLink()).
	(setNeedsStaticLink()):  New method (overload).
	(setCallersNeedStaticLink):  New helper method.
	(declareThis): Remove duplicate semi-colon.
	(allocChildClasses):  Keep searching parent chain for closureEnvType.

1999-11-26  Per Bothner  <per@bothner.com>

	* Compilation.java (compileConstant): Coerce value to target type.
	Tell compileFromStack that the current type is the value's class.
	Suggested by Daniel Bonniot <bonniot@cma.ensmp.fr>.

1999-11-16  Per Bothner  <per@bothner.com>

	* ApplyExp.java (compile):  Minor fix for tail-recursion with many
	arguments. (Bug reported by Walter C. Pelissero <wcp@lpds.sublink.org>)

1999-11-15  Per Bothner  <per@bothner.com>

	Suggested by Daniel Bonniot <bonniot@cma.ensmp.fr>:
	* ExpFullWalker.java (walkBlockExp):  Test if exitBody is null.
	* Compilation.java (findLiteral):  Use Type.make(value.getClass()).

	* ObjectExp.java (getCompiledClassType):  Use Scheme.exp2Type.

	* MethodProc.java (isApplicable):  Fix incorrect return code.
	(mostSpecific):  New method.
	* GenericProc.java (applyN):  Select most specific matching method.

	* PrimProcedure.java (getParameterType):  Adjust for static/non-static.
	(getMethodFor):  If class is ModuleMethod, get the module's class.

1999-11-03  Per Bothner  <per@bothner.com>

	* ApplyExp.java (compile):  If function is Inlineable but we didn't
	line it, try PrimProcedure.getMethodFor.
	* MethodProc.java (isApplicable):  Change arg types and return codes.
	Implementation now uses Type.compare.
	(numParameters, getParameterType, mostSpecific):  New methods.
	* GenericProc.java (isApplicable):  Change arg types and return codes.
	* PrimProcedure.java (setReturnType, getParameterType): New methods.
	(getMethodFor):  New static method.  (Code moved from Translator.)

1999-10-25  Per Bothner  <per@bothner.com>

	* ApplyExp.java (popParams):  Take extra argument.
	(compile):  Handle tail-recursion for varargs functions.

	* ClassExp.java:  New class; extends ObjectExp.
	* Makefile.am, Makefile.in (java_JAVA):  Added ClassExp.java.
	* Compilation.java (addClass):  ClassExp cannot have "apply" method.
	* LambdaExp.java (evalToClass):  New method.

	* PrimProcedure.java (compile):  Handle takesVarArgs() methods.

1999-09-14  Per Bothner  <per@bothner.com>

	* GenericProc.java:  New inherits from MethodProc.
	(getVarBuffer, isApplicable, match, applyV):  New methods.

	* PrimProcedure.java:  Interpret methods whose names end in "$V"
	as taking a variable number of arguments;  the excess ones are
	bundled in an array passed as the last argument.

1999-09-08  Per Bothner  <per@bothner.com>

	No longer create new class for top-level procedures;
	instead allocate a ModuleMethod for each procedure.
	* LambdaExp.java (isClassGenerated):  Update for new behavior.
	(selectorValue, getSelectorValue):  New field and method.
	(compile):  Generate static methods, plus allocate ModuleMethod.
	(addMethodFor):  Better way of selectiing method names.
	* ModuleMethod.java (apply4):  Add "missing" method.
	* ModuleBody.java (apply4):  Likewise.
	(applyN):  Try calling apply0 .. apply4, if appropriate.
	* Compilation.java:  Allocate static types and methods needed.
	(addClass):  Generate the ModuleBody applyX methods.

	* Declaration.java:  New fields and methods for line number info.

	* Compilation.java (typeObject):  Renamed from scmObjectType.
	(typeString, typePair):  New preferred field names.
	* Literal.java, ReferenceExp.java, SetApplyExp.java:  Update
 	references accordingly.

1999-09-05  Per Bothner  <per@bothner.com>

	* Declaration.java (PRIVATE, isPrivate, setPrivate):  New flag.
	(isStatic, isLexical):  New methods.
	(load, compileStore):  Don't loadOwningObject if field is static.
	* SetExp.java (eval, compile):  Handle binding to static Declaration.
	* ReferenceExp.java (eval.compile):  Likewise.
	* FindTailCalls.java (walkSetExp):  Likewise.
	* FindCapturedVars.java (capture):  Do nothing if decl.isStatic().

	* ModuleMethod.java:  New class, which extends ProcedureN.
	* ModuleBody.java:  New apply methods that take a ModuleMethod.
	* Makefile.am, Makefile.in (java_JAVA):  Add ModuleMethod.java.

1999-08-26  Per Bothner  <per@bothner.com>

	* GenericProc.java:  New class;  inherits from ProcedureN.
	* MethodProc.java:  New class;  inherits from ProcedureN.
	* Makefile.am, Makefile.in (java_JAVA):  Add new .java files.
	* PrimProcedure.java:   Re-organized to inherit from MethodProc.

	* Declaration.java (sym, value):  Make fields protected.
	(<init>):  New protected empty constructor (for kawa.lang.Syntax).

	* ReferenceExp.java (compile):  Indirect bindings are now Locations.
	* SetExp.java (compile):  Likewise.

1999-08-22  Per Bothner  <per@bothner.com>

	* Compilation.java (error):  New methods, like those in Translator.
	(addClass):  Use new ApplyExp constructor.
	(scmPatternType):  Removed - no longer needed.
	* ApplyExp.java (<init>):  New constructor.
	(compile):  Use new Compilation.error methods.

	* Expression.java (compileNotePosition):  New method.

	* LambdaExp.java:  Provide a cache for evaluated value.

	* BlockExp.java (exitBody):  New field.
	(setBody):  New overloaded methods.
	(compile): Handle exitBody.  Set this.exitLabel.
	* Declaration.java (getValue):  New method.
	(<init>(String, Type)):  Handle the name being null.
	* IfExp.java (compile):  Optimize if else part is ExitExp.
	* ExpFullWalker.java (walkBlockExp, walkExitExp):  New methods.
	* ExitExp.java (<init>):  New constructors.
	(compile):  Remove bogus compilation of void.	
	* BeginExp.java (<init>):  New convenience constructor.
	* LetExp.java (getBody, setBody):  New methods.
	* ReferenceExp.java (<init>):  New overloaded constructor.

1999-08-18  Per Bothner  <per@bothner.com>

	* PrimProcedure.java (getName):  Use super.getName() instead of
 	deprecated name().

1999-08-17  Per Bothner  <per@bothner.com>

	* FindTailCalls.java (walkObjectExp):   Don't call super.walkObjectExp,
	instead call walkLambdaExp on each method so setCanRead is not called.
	* LambdaExp.java (allocFrame):  Don't create closureEnvField here,
	since it is not appropriate for ObjectExp.
	(allocChildClasses):  Create closureEnvField here instead.
	* ObjectExp.java (compile):  Don't create staticLinkField if this is
	our parent's heapFrameLambda (since parent has already done it).

1999-08-06  Per Bothner  <per@bothner.com>

	* CheckedTarget.java:  New class, extends StackTarget.
	* Makefile.am, Makefile.in:  Update accordingly.
	* StackTarget.java (compileFromStack0):  New protected method.
	* Compilation.java (addClass):  Specificy LambdaExp to PrimProcedure.
	* LambdaExp.java (enterFunction):  Do checked coerce on argument.
	* PrimProcedure.java (applyN):  Catch ClassCastException.
	(<init>):  New overload.
	(compile):  Catch ClassCastException.
	(getVerboseName):  New method.

1999-07-19  Per Bothner  <per@bothner.com>

	* ApplyExp.java (compile):  When doing a direct method call,
	pass the correct closure environment.
	* LambdaExp.java (getCaller):  New method.
	(declareClosureEnv):  Fix problems with inline functions.

1999-07-15  Per Bothner  <per@bothner.com>

	* Target.java (pushValue, returnValue):  New static methods.
	* IgnoreTarget.java (compileFromStack):  Use Type.isVoid().
	* TailTarget.java (getInstance):  New method.
	* Compilation.java (addClass):  Use Target.returnValue().
	* ObjectExp.java (compile):  Likewise.
	* Expression.java (compile):  Use StackTarget.getInstance.
	* StackTarget.java (getInstance):  New method.
	(compileFromStack):  Use Type.isVoid and Type.isSubtype.
	* LambdaExp.java (compileAsMethod):  Likewise.

	* ObjectExp.java (print):  New method.
	(getCompiledClassType):  Fix incorrect implied superclass handling.

	* ApplyExp.java (compile):  Check real parent (even if inline), when
	seeing if we need to pass a closure when calling a method directly.	
	* LambdaExp.java (allocFrame):  When allocating closureEnvField, check
 	real parent (even if inline).  Inline functions can have heapFrame.
	(enterFunction):  Fix logic bug when renaming duplicate field.

1999-04-22  Per Bothner  <bothner@Magnus.Cygnus.COM>

	* LetExp.java (compile):  Target for init expr is decl type.

1999-04-22  Per Bothner  <bothner@cygnus.com>

	* Compilation.java (addClass):  Remove (commented-out) call to
 	declareClosureEnv.
	* FindTailCalls.java (walkSetExp):  Don't call walkLambdaExp if the
	value is an ObjectExp.
	* expr/LambdaExp.java (declareClosureEnv):  If isClassMethod(),
	then the closureEnv variable is "this".
	* expr/ObjectExp.java (compile):  Create staticLinkField if needed.

1999-04-15  Per Bothner  <bothner@Magnus.Cygnus.COM>

	* Compilation.java (addClass):  Don't create primitive methods here.
	* LambdaExp.java (allocChildClasses):  Do it here instead,
	* Compilation.java (addClass):  Don't compiled child methods here.
	* LambdaExp.java (compileChildMethods):  Do it here instead (new).
	(compileAsMethod):  New - logic taken from Compilation.addClass.
	* ApplyExp.java (compile):  Call compileChildMethods if inline call.
	* ObjectExp.java (compile):  Likewise for child methods.

1999-04-11  Per Bothner  <bothner@cygnus.com>

	* LambdaExp.java (declareClosureEnv):  Fix for object methods.

Wed Apr  7 18:04:27 1999  Per Bothner  <bothner@Magnus.Cygnus.COM>

	* FluidLetExp.java:  New LetExp class.
	* BlockExp.java:  New Expression class (untested).
	* ExitExp.java:  New Expression class (untested).
	* Makefile.am (java_JAVA), Makefile.in:  Update for new classes.

	* Declaration.java (IS_FLUID):  New flag bit.
	(setFlag, isFluid, setFluid):  New methods.
	* ExpWalker.java (walkBlockExp, walkExitExp, walkFluidLetExp):  New.
	* LetExp.java (getType):  New method.
	* SetExp.java (getType):  New method.
	* ReferenceExp.java (compile, getType):  Check if isFluid().
	* SetExp.java (compile):  Check if isFluid().

Tue Mar 30 17:15:14 1999  Per Bothner  <bothner@Magnus.Cygnus.COM>

	* LambdaExp.java (CLASS_METHOD):  New flag.
	(isClassMethod, setClassMethod):  New methods.
	(isHandlingTailCalls):  Return false if isClassMethod/
	* ObjectExp (compile):  Call compileExp on actual child method.

Mon Mar 29 23:28:59 1999  Per Bothner  <bothner@cygnus.com>

	* LambdaExp.java (getCompiledClassType):  Add Compilation parameter.
	* ObjectExp.java (getCompiledClassType):  Likewise.
	Call Compilation.generateClassName to avoid duplicate names.
	(compile):  Call super.allocFrame.
	* Compilation.java, LambdaExp.java:  Fix getCompiledClassType calls.
	* LambdaExp.java (declareClosureEnv):  If parent is ObjectExp,
	get its parent instead.  Re-order logic for object methods.
	(allocChildClasses):  Move latter half into new method allocFrame.
	(allocFrame):  New method.  Use outerLambdaNotInline.
	(enterFunction):  Initialize closureEnv also for methods in ObjectExp.

	* ApplyExp.java (compile), ReferenceExp.java (compile):  Verifier
	in JDK1.2 rejects emitInvokeSpecial so use emitInvokeVirtual instead.

	* PrimProcedure.java (applyN):  Check for thrown Error.

Sat Mar 20 11:25:01 1999  Per Bothner  <bothner@Magnus.Cygnus.COM>

	* Declaration.java (pushIndirectBinding):  New method.
	(initBinding):  Use pushIndirectBinding.
	* LambdaExp.java (isClassGenerated):  Use isHandlingTailCalls.
	(allocParameters, enterFunction):  Handle isIndirectBinding.
	* ModuleBody.java (runAsMain):  Re-enable, for now.
	* ObjectExp.java (<init>):  Call setCanRead to force class generation.
	* PrimProcedure.java (compile):  Use new Type.isVoid().
	* ReferenceExp.java (lookup):  Remove - no longer used.
	(eval):  Just call env.getChecked.
	(compile):  Use Binding.get rather than Environment.lookup.
	* ApplyExp.java:  If function is a globally-bound symbol,
	emit (get Binding).getProcedure().
	* Compilation (getBindingField):  New method.
	(typeBinding, getBindingMethod, getProcedureBindingMethod,
	getBindingEnvironmentMethod, getCurrentEnvironmentMethod): New statics.
	(addClass):  Move generateConstructor to end.
	Emit code to allocate global Bindings.

	* Compilation (scmProcedureType):  Renamed to typeProcedure.
	(scmEnvironmentType):  Renamed to typeEnvironment.
	* ApplyExp,java, LambdaExp.java, SetApplyExp.java:
  	Update scmProcedureType -> typeProcedure.

Sun Mar  7 17:28:59 1999  Per Bothner  <bothner@Magnus.Cygnus.COM>

	* ApplyExp.java (compileToArray, compile):  Handle full tailcalls.
	* Compilation.java:  Various new static fields.
	(fwitchIndex, callStackContext):  New fields.
	(findLiteral):  Check for null array elements.
	(allocClass):  Set superType differently if handling tailscalls.
	(addClass):  Some things are different if handling tailcalls.
	* Declaration.java (assignField):  New field.
	(ignorable):  Different rules for full tailcalls.
	* FindTailCalls.java (walkBeginExp, walfIfExp):  Last expr is in
	tail context only if whole expr is.
	(walkLambdaExp):  Do setInlineOnly here, not  in FindCapturedVars.
	* FindCapturedVars.java (walkLetExp):  Optimize letrec-style forms.
	(walkLambdaExp):  Removed;  functionality handled by FindTailCalls.
	(capture):  Handle full tail calls;  various bug fixes.
	* LambdaExp.java (closureEnvField, closureEnv):  New fields.
	(NEEDS_STATIC_LINK, CANNOT_INLINE):  New flags.
	(getNeedsStaticLink, setNeedsStaticLink):  New methods.
	(isClassGenerated, isHandlingTailCalls):  New methods.
	(outerLambdaNotInline, declareClosureEnv, compileEnv):  New methods.
	(thisVariable): New field.
	(declareThis):  Set/use thisVariable.
	(compile(Compilation)):  Save/restore comp.callStackContext.
	(compileAlloc):  Simplify by using new closureEnvField.
	(compile(Compilation,Target)):   Redo.  Preliminary cps support.
	(addMethodFor):  Change call interface.  Various changes.
	(loadHeapFrame, allocChildClasses):  Extensive changes.
	(allocParameters, enterFunction):  Still more changes.
	* ModuleBody.java (run):  No longer takes environment arguemnt.
	* ModuleExp.java (evalModule):  ModuleBody.run no longer takes env.
	* ObjectExp.java (compile):  Use compileEnd.
	Update for new LambdaExp.addMethodFor.
	* PrimProcedure.java (applyN):  Catch InvocationTargetException.
	* TailTarget.java (compileFromStack):  New method, for full tailcalls.
	* TryExp.java (compile):  Fix to handle more general Targets.
	* Literal.java (emitArray):  Nothing to do if value is null.

Fri Jan 15 20:30:58 1999  Per Bothner  <bothner@cygnus.com>

	* ApplyExp.java (compile):  Even if a function is inlined, we
	need to call allocChildClasses.

Wed Dec 23 13:51:35 1998  Per Bothner  <bothner@Magnus.Cygnus.COM>

	Literals in immediate mode are now allocated to fields (instead
	of a literals array), just like for non-immediate mode.
	Use reflection to initialize the fields.
	* Compilation.java (literalsField):  Removed field.
	(compileConstant):  Don't generate code to index from literalsField.
	(<init>):  Don't initialize literalsField.
	* LambdaExp.java (compile_setLiterals):  Removed method.
	(eval):  Don't call compile_setLiterals.  Don't create literals array.
	Don't set lierals[literal.index] to literal.value.  Instead, use
	reflection to set the static field uses for the literal.
	* Literal.java (assign):  Create a field, even if immediate.
	(<init>):  Set type from the value's class.
	* Makefile.am (java_JAVA), Makefile.in:  Rmeoved Compiledproc.java.
	* ReferenceExp.java (compile):  No longer need cast if immediate.

	* Compilation.java (mangleName):  More natural mangling.
	E.g.  "foo-bar?" now becomes "isFooBar".

	* ObjectExp.java (initMethod):  New field.
	(getCompiledClassType):  Allow extended super-types and implemented
	interfaces to come in any order.
	(compile):  New method, to make sure $finit$ is called.
 	(compile):  Don't add field for declarations corresponding to methods.
	
	* QuoteExp.java (getType):  If value is Values.empty, type is void.
	* SetExp.java (compile):  Compile rhs to correct type.

	* Expression (compile): Re-use Target.pushObject if possible.

Tue Dec 15 10:50:53 1998  Per Bothner  <bothner@Magnus.Cygnus.COM>

	* ChainLambdas.java:  New ExpFullWalker sub-class.
	* PushApply.java:  New ExpFullWalker sub-class.
	* Makefile.am, Makefile.in (java_Java):  Add new source files.
	* FindTailCalls.java:  Moved some functionality to ChainLambdas
	and PushApply in order to keep things less convoluted.
	(walkObjectExp):  New method.
	* ExpWalker.java (walkObjectExp):  New trivial method.
	* ExpFullWalker.java (walkObjectExp):  New method.
	* Compilation.java (<init>): Invoke ChainLambdas and PushApply walkers.

	* Compilation.java (allocClass):  Use getJavaName.
 	(allocClass):  Use getCompiledClassType for ObjectExp.
	* LambdaExp.java (isSharedSwitchMethod): New (currently unused) method.
	(getJavaName):  New method.
	(eval):  Use getJavaName,
	(loadHeapFrame, allocChildClasses):  Test for and handle ObjectExp.
	(toString):  Tolerate null body (as in ObjectExp).
	* ObjectExp.java (<init>):  Set type initially to null.
	(getJavaName, getCompiledClassType, walk, toString):  New methods.
	* ReferenceExp.java:  Remove Scheme-specific support for <TYPE>.
	(This functionality has moved to kawa.standard.ScmEnv.)

Mon Nov 23 16:04:42 1998  Per Bothner  <bothner@cygnus.com>

	* Inlineable.java (getReturnType):  New method.
	* PrimProcedure.java (getReturnType):  New method.
	* ApplyExp.java (getType):  Generalize with Inlineable.getReturnType;

	* ObjectExp.java:  New Expression class.
	* BeginExp.java (getExpressions):  New method.
	* Compilation.java (addClass):  Remove unused local 'main'.
	* FindTailCalls.java (walkLambdaExp):  Allow null body.
	* ExpFullWalker.java (walkLambdaExp):  Allow null body.
	* LambdaExp.java (firstChild, nextSibling):  Make public.
	* Makefile.am, Makefile.in (java_JAVA):  Add ObjectExp.java.

Sun Nov 15 21:31:59 1998  Per Bothner  <bothner@cygnus.com>

	* ReferenceExp.java (lookup):  Remove magic for Scheme <TYPE>
	(that is now handled by kawa.standard.ScmEnv).

Sat Oct 17 13:23:50 1998  Per Bothner  <bothner@Magnus.Cygnus.COM>

	* SynchronizedExp.java:  New class.
	* Makefile.am (java_JAVA), Makefile.in:  Add SynchronizedExp.java.
	* ExpWalker.java (walkSynchronizedExp):  New method.
	* ExpFullWalker.java (walkSynchronizedExp):  New method.
	* FindTailCalls.java (walkSynchronizedExp):  New method.

	* StackTarget.java (compileFromStack):  Use two-argument emitConvert.

Thu Sep 24 19:35:14 1998  Per Bothner  <bothner@cygnus.com>

	* ExpFullWalker.java:  New conventions to support replacement.
	* FindCapturedVars.java, FindTailCalls.java:  Change to new convention.
	* FindTailCalls.java:  Add some extra optimizations.
	* FindCapturedVars.java (walkLambdaExp):  Inline if single caller.
	* LambdaExp.java (returnContinuation, unknownContinuation):
	New fields, used to determine if local function can be inlined.

	* ApplyExp.java (popParams):  Handle zero parameters, not even "this".

Sun Sep 13 13:00:01 1998  Per Bothner  <bothner@cygnus.com>

	* ApplyExp.java (context, nextCall):  New fields.
	* FindTailCalls.java (walkApplyExp):  Set context and nextCall.
	* Declaration.java (nextCall):  New field.
	(noteValue):  Update LambdaExp.nameDecl.
	* FindCapturedVars.java:  Call new setImportsLexVars variant.
	* LambdaExp.java (nameDecl):  New field. 
	(setImportsLexVars):  New method - also chases down callers.

Fri Sep 11 20:20:12 1998  Per Bothner  <bothner@cygnus.com>

	More efficient procedure representation:  Inlining, directly
	callable statics, procedures that don't require own Classes.
	* ApplyExp.java (compileToArray):  New method.
	(compile):  Handle different kinds of apply methods.
	* Compilation.java (generateConstructor, allocClass):  New methods.
	(addClass):  Handle specialized more efficient procedure schemes.
	* Declaration.java:  Add various flags, getters, and setters.
	* FindCapturedVars.java (capture):  More general (and complex).
	* FindTailCalls.java:  Also setCanRead, setCancall etc of
	of Declarations and LambdaExps, and chain LambdaExp children together.
	* LambdaExp.java:  Add various flags.
	(declareArgsArray, loadHeapFrame, addMethodFor,
	allocChildClasses):  New methods.
	(eval):  Dumping .zip files is now controlled by static dumpZipPrefix.
	* LetExp.java (store_rest):  Don't initBinding if decl is ignorable.
	(compile):  Ignore init expression if target is ignorable.
	
	* PrimProcedure.java:  Moved from kawa.lang package.
	* Makefile.am, Makefile.in:  Update accordingly.

	* QuoteExp.java (nullExp):  New static.

	* QuoteExp.java (getType):  New method.
	* BeginExp.java (getType):  New method.
	* ReferenceExp.java (getType):  New method.

	* SetExp.java (compile):  If lhs is ignorable, target is Ignore.
	* StackTarget.java (compileFromStack):  If stack type inherits
	from target type, we can avoid coercion.

	* TryExp.java (print):  Handle null finally_clause.

Sat Aug 29 20:32:46 1998  Per Bothner  <bothner@cygnus.com>

	* FindCapturedVars.java (capture):  Handle inline functions better.
	* Compilation.java (addClass):  Move lots of stuff to LambdaExp.
	* LambdaExp.java (allocParameters, enterFunctions):  New functions
	* ApplyExp.java:  Handle inlined functions.
	* Declaration.java (loadOwningObject):  Skip inlined functions first.
	* ScopeExp.java (currentLambda):  Inline functions are not special.
	* SetExp.java (<init>):  Handle do special form specially.

	* Compilation.java, Special.java:  Do ClassType.make instead of
	new ClassType.

Sat Aug 29 09:16:01 1998  Per Bothner  <bothner@cygnus.com>

	* ApplyExp.java (compile):  Fix problems with tails-calls.
	* Compilation.java (addClass):  Fix procedure prologue for tails-calls.

	* Declaration.java (toString):  Print with name and new uid.

1998-08-28  Per Bothner  <bothner@cygnus.com>

	* ExpWalker.java, ExpFullWalker.java, FindTailCalls.java,
	FindCapturedVars.java:  New tree-walker (visitor) classes.
	* Expression.java (walk):  New method.
	* *Exp.java:  Add walk method to Expression sub-classes.

	* ApplyExp.java (tailCall, isTailCall, setTailCall):  New flag, methods.
	(compile):  Inline function if it has the getInlineOnly() flag.

	Changed a bunch of stuff for new closure implementation.
	* LambdaExp.java (compileAlloc):  New method.
	* Declaration.java (loadOwningObject, load, compileStore, initBinding):
	New methods for new closures.
	* ReferenceExp.java (compile_load):  Removed.
	* Compilation.java (<init>):  Merge constructors.  Call walkers.

	* LambdaExp.java, ReferenceExp.java:  Add unique number to ease debugging.

1998-08-25  Per Bothner  <bothner@cygnus.com>

	* Declaration.java (isIndirectBinding, setIndirectBinding):  New.

Fri Jul 24 16:11:36 1998  Lynn Quam <quam@ai.sri.com>

	* Compilation.java (putGlobalMethod):  New static field.
	* SetExp.java (compile):  If !isDefining(), compile
	putGlobalMethod instead of defineGlobalMethod.

Wed Jul 22 21:42:42 1998  Per Bothner  <bothner@cygnus.com>

	New directory.  Files mostly moved from ../../kawa/lang.
