2009-08-07  Per Bothner  <per@bothner.com>

	* lang/Translator.java (resolveModule): Move the forms resulting from
	in import into their proper place.
	(vectorReverse): New helper method.
	* standard/require.java (importDefinitions): Also remember
	size of forms stack.

	* repl.java (processArgs): Update copyright year printed by --version.

2009-07-10  Per Bothner  <per@bothner.com>

	* kawa/SyntaxPattern.java (literalIdentifierEq): Use equals,
	not identity to compare literals.
	Fixes Savannah bug #26993 "String literals in syntax-rules don't match".

2009-07-04  Per Bothner  <per@bothner.com>

	* standard/Scheme.java (initScheme): Update for letrec.

2009-06-28  Per Bothner  <per@bothner.com>

	* standard/callcc.java (inline): Update for new inlining framework.

2009-06-02  Per Bothner  <per@bothner.com>

	* standard/Scheme.java (initScheme): Update for (rnrs unicode)
	functions - add new methods, and move old functions to new library.

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

	* standard/Scheme.java (initScheme): Add "regex" type name.
	* standard/require.scm (featureMap): Add 'regex and 'pregexp.

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

	* kawa/SyntaxPattern.java (translate, match, literalIdentifierEq):
	More correct handling of syntactic hygiene for literals.
	(literalIdentifierEq): Remove one method.

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

	* lang/Eval.java (evalBody): Give module a unique name.
	* standard/SchemeScriptEngineFactory.java: New class.
	* standard/Makefile.am: Update accordingly.

2009-05-15  Per Bothner  <per@bothner.com>

	* Shell.java (run): Use PARSE_FOR_EVAL rather than PARSE_IMMEDIATE.
	* standard/load.java (loadSource): Likewise.
	* standard/require.java (importDefinitions): Make sure to set
	PARSE_IMMEDIATE (and hence Compilation.immediate) before we parse.
	This is needed if there are cycles.

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

	* kawa/require.java (importDefinitions): Don't call run on new
	module if we're not makeRunnable on it.

	* standard/module_name.java (scanForm): Change the value of the
	module-name Declaration to be mainClass with type=java.lang.Class.
	* standard/module_name.java (scanForm): If the module-name is a String,
	treat it the same as FString, rather than the same a Symbol.

	* standard/require.java (importDefinitions): Imported variable
	should be read-only.

2009-04-20  Per Bothner  <per@bothner.com>

	* lang/Translator.java (scanForm): Push and pop source position.

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

	* standard/module_name.java (scanForm): Type of module name is now
	Class, not ClassType.
	* standard/define_alias.java (scanForDefinitions): If the aliasee
	is a name for a ModuleExp or ClassExp, don't indirect.

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

	* standard/export.java (export): New field.
	* standard/Scheme.java: Allow 'export' as synonym for 'module-export'.

	* standard/object.java (classNameKeyword): New constant.
	(scanClassDef): Recognize class-name: specifier.
	(rewriteClassDef): If class-name: was seen, set classNameSpecifier
	in ClassExp.

2009-03-13  Per Bothner  <per@bothner.com>

	* standard/ImportFromLibrary.java (SRFI97Map): New table.
	(scanForDefinitions): Process SRFI-97-style SRFI library references.

	* standard/ImportFromLibrary.java: New class, implements R6RS
	import keyword.
	*  standard/Makefile.am: Update accordingly.
	* standard/Scheme.java: Update - the implementations of various macros
	were moved to different classes.
	Add definition of 'import' keyword.
	* standard/require.java (featureMap): Various updates.
	(scanForDefinitions): Error if class not found.
	(importDefinitions): Drop unused 'uri' parameter.
	Add 'renamer' parameter.

	* repl.java (processArgs): Don't run interactive shell if there are
	command-line arguments after doing "something" (such as -f).

	* lang/Translator.java (scanForm):  If seeing (PART1:PART2 ...)
	check if PART2 is a static Syntax object in class PART1.
	This allows invoking Syntax/Macro objects without putting them
	in the Scheme namespace.

2009-03-10  Per Bothner  <per@bothner.com>

	* standard/Scheme.java (createReadTable): Do setFinalColonIsKeyword()
	here, rather than in getLexer, since former was moved to ReadTable.
	(getLexer): Can now be removed.

2009-03-07  Per Bothner  <per@bothner.com>

	* lang/Scheme.java (getLexer): New method - call
	setInitialColonIsKeyword.

2009-03-01  Per Bothner  <per@bothner.com>

	* lang/Translator.java (<init>): Also pass NameLookup.
	(resolveModule): Don't pop in immediate mode.
	(check_if_Syntax): Generalize.
	(exp2Type): Don't InlineCalls twice.
	(rewrite_body): We skip dynamic declarations when creating body.
	* lang/Eval.java (evalBody): Update for new Translator constructor.

2009-02-06  Per Bothner  <per@bothner.com>

	* standard/Scheme.java: New function resource-url; removed resource-uri.

2009-01-14  Per Bothner  <per@bothner.com>

	* standard/require.java (feature-map): Add 'android-defs.

2008-12-29  Per Bothner  <per@bothner.com>

	* standard/callcc.java: Optimization to avoid temporary variable
	if calling the continuation doesn't need to call a finally-clause.
	(ExitThroughFinallyChecker): New helper class, extends ExpWalker.

2008-12-27  Per Bothner  <per@bothner.com>

	* standard/callcc.java: Optimize the case when calls to the
	continuation are lexically known and exits to the same uninlined
	function.  In this case we essentially make it a goto.

2008-12-23  Per Bothner  <per@bothner.com>

	* standard/module_extends.java: Move setting of module's super-type
	from rewriteForm to scanFrom, because if it is done in rewriteForm
	it happens too late for Compilation's addMainClass.

	* standard/module_name.java (scanForm): Allow plain name
	without angle-brackets.

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

	* repl.java (processArgs): Handle --target/-target arg.

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

	* ReplDocument.java (class DocumentCloseListener):  Add a listener
	class so classes can get notified when document "closes".
	This allowed us to close a window by typing #!eof in it.
	(<init>): Call fireDocumentClosed when repl thread finishes.
	(close): Do fireDocumentClosed.
	* GuiConsole.java: Request notification when document is closed.
	* ReplPane.java (removeNotify): New method.
	* GuiConsole.java (main): Also do some initialization so it works
	to call GuiConsole directly as an application or class.

2008-11-11  Per Bothner  <per@bothner.com>

	More rebust support for multi-line input and type-ahead in GuiConsole.
	* ReplDocument.java (write): Protect using SwingUtilities.invokeLater.
	(checkingPendingInput) New method, to actually send pending input
	to inferior reader.
	(<init>): Have our QueueReader invoke checkingPendingInput.
	* ReplPane.java (enter): Don't send entered text (if at end)
	to inferior, instead let checkingPendingInput do it.
	* GuiInPort.java (lineStart): Remove method.

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

	* repl.java: If we have no Console, and no "active" arguments
	were specified, default to a repl in a GuiConsole, just as we normally
	default to a tty-based repl.  We check using either the --no-console
	flag (passed in by kawa.c) or the Java 6 System.console method.
	* Shell.java (dontPrompt): Remove static.
	(run): Don't use dontPrompt to determine interactivity.

	* ReplDocument.java (deleteOldText): Don't redundantly adjust
	outputMark and endMark.  This fixes an IllegalArgumentException.

2008-10-29  Per Bothner  <per@bothner.com>

	* ReplPane.java (enter): Minor simplification *and* optimization.

2008-10-26  Per Bothner  <per@bothner.com>

	Inline call/cc (more coming).
	* lang/CalledContinuation.java (ctx): Extra field.
	(<init>): Pass and set ctx field.
	* lang/Continuation.java (apply): Update accordingly.
	(handleException, handleException$X): New methods, with logic taken
	from callcc.apply.
	* standard/callcc.java: Implement CanInline and Inlineable.
	(apply): Use Continuation.handleException$X.
	(canInline, inline, compile, getReturnType): New methods.
	(class CompileTimeContinuation): New class - currently unused.

	* lang/Translator.java (rewrite): Note that a variable reference
	IS_SINGLE_VALUE.

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

	* lang/Translator.java (finishModule): Don't call declareThis here,
	since that creates a Scope and Variable before we even create the
	corresponding CodeAttr, which if nothing else is ugly and confusing.

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

	* lang/SyntaxForm.java (formDatum): Just use 'make' method.

2008-07-17  Per Bothner  <per@bothner.com>

	* standard/Scheme.java (initScheme): Declare the various R6RS
	bitwise- functions.

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

	* lang/SyntaxTemplate.java: Use Pair.setCdrBackdoor, since the
	pairs may be PairWithPosition.
	* lang/Translator.java: Likewise.
	* lang/Quote.java: Same issue, but instead create the list
	back-to-front so we don't have to use setCdr.

2008-06-01  Per Bothner  <per@bothner.com>

	* standard/Scheme.java: The standard functions string, vector, and list
	are now LangObjType objects.
	* lang/Lambda.java: Update to use new LangObjType.listType.
	* lang/QuoteExp.java (makeInvokeMakeVector): New helper method.
	Use renamed vector method.

2008-05-20  Per Bothner  <per@bothner.com>

	* standard/map.java: Generalize so the 'procedure' can be any valid
	argument to ApplyToArgs, not just a Procedure.
	* standard/Scheme.java: Adjust for extra constructor args to map.

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

	* standard/require.java (importDefinitions): Don't need to check
	for non-null sourceName - that is now handled by checkCurrent.

	* standard/require.java (importDefinitions): If private, continue
	earlier - before checking to see if we need an instance handle.

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

	* lang/Lambda.java (rewriteBody): Use new setCoercedReturnType
	method in LambdaExp.java.

2008-02-17  Per Bothner  <per@bothner.com>

	* lang/Translator.java (rewrite): If the location is in a field
	loaded using a ZipLoader or ArrayClassLoader, we don't safely
	generate code to reference it, except in immediate mode.
	Fixes Bugzilla #22299: "function misnaming with moduleStatic > 0".

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

	* standard/Scheme.java (apply): New static field.  The "apply"
	method now depends on applyToArgs.

2008-01-16  Per Bothner  <per@bothner.com>

	* standard/map.java (inline): Handle new argsInlined parameter.

2007-12-30  Per Bothner  <per@bothner.com>

	Move code out of ReplPane and GuiConsole, until ReplDocument.
	This allows (in theory) the same repl to be viewed in multiple panes.
	Also, use a custom ViewFactory to handle Viewable and Paintable,
	so these can be displayed multiple times.
	* ReplDocument.java: New class, extends DefaultStyledDocument.
	* Makefile.am: Update accordingly.
	* ReplPaneOutPort.java: Write to ReplDocument, with new handling
	of Viewable and Paintable.
	* GuiConsole.java" Move fields and methods to ReplDocument.
	* ReplPane.java: Likewise.
	(class ReplEditorKit): New class.
	* GuiInPort.java: Update for moved fields and methods.

	* standard/define_variable.java (scanForDefinitions): There doesn't
	seem to be any reason to restrict define-variable to module-level.

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

	* lang/Translator.java (rewrite): If we're not in immediate mode,
	don't create the dummy '(module-instance)' variable.  Fixes Savannah
	bug 19725:" compile problems appearing in latest svn version".

2007-11-04  Per Bothner  <per@bothner.com>

	* kawa/Shell.java (run): Create "session" ClassLoader.

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

	* standard/Scheme.java (getNamedType, getType): The <integer> type
	is handled by LangObjType.integerType.

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

	* ReplPane.java (write): Move to ReplPaneOutPort.
	* ReplPaneOutPort.java (area): Rename field to pane.
	(print): Add support for Viewable and Paintable.

	* MessageArea.java: Rename to ReplPane.java.
	* TextAreaWriter.java: Rename to ReplPaneOutPort.java.
	* GuiConsole.java, GuiInPort.java, Makefile.am: Update accordingly.

	Convent -w flag to create Swing JTextPane rather than AWT TextArea.
	* GuiConsole.java: Change to extend JFrame rather than Frame.
	* TextAreaWriter.java: Extend OutPort rather than Writer.
	(print): New method, to handle "writing" Components.
	(class TextPaneWriter): New class, extends Writer.
	* MessageArea.java: Extend JTextPane rather than TextArea.
	Use various styles.
	* GuiInPort.java (emitPrompt): New method.

2007-09-02  Per Bothner  <per@bothner.com>

	* lang/AutoloadProcedure.java (load): Restore and fix support for
	class naming a ModuleBody - needed for elisp autoloads.

2007-06-10  Per Bothner  <per@bothner.com>

	* standard/Scheme.java (checkDefaultBinding): Fix infinite loop
	when looking for missing unit.
	Fixes Savannah bug #19991: '1_' causes OutOfMemoryError in interpreter.

2007-06-10  Per Bothner  <per@bothner.com>

	Fix Savannah bug #19996 "load-relative trouble".
	* standard/load.java (currentLoadPath): New ThreadLocal.
	(apply): New overload to handle relative paths.
	Make old method private.
	(apply2): Update to use new apply.
	* Shell.java (runFile): Likewise.

	* standard/load.java (apply2): Better error message.

2007-06-10  Per Bothner  <per@bothner.com>

	* standard/require.java: Update PreProcess state.

2007-04-27  Per Bothner  <per@bothner.com>

	* standard/load.java (loadClassFile): Use Language.loadClass.
	(loadCompiled): Update ClassMemberLocation.defineAll call.

2007-04-26  Per Bothner  <per@bothner.com>

	* lang/Langda (rewriteFormals): Call namespaceResolve, twice.

2007-04-25  Per Bothner  <per@bothner.com>

	* standard/require.java (scanForDefinitions): Update to pass ClassType
	to ModuleInfo.find.

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

	* standard/require.java (find(String)): Inline call to ModuleInfo's
	find method - which has been removed.

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

	* lang/Quote.java (expand_pair): Obvious trivial optimization.

2007-04-03  Per Bothner  <per@bothner.com>

	* Translator.java (namespaceResolvePrefix): New method.
	(namespaceResolve(Expression,Expresion)): Use it.
	(namespaceResolve(Namespace,Expresion)): New method.
	* Quote.java (makeSymbol): New static method.
	(expand_pair): Handle `PREFIX:,EXPR.

2007-04-01  Per Bothner  <per@bothner.com>

	* standard/Scheme.java (checkDefaultBinding): If name matches a
	known package, return that Package.

2007-03-31  Per Bothner  <per@bothner.com>

	* standard/Scheme.java (unitNamespace): New constant field.
	(initScheme): Declare 'unit'.
	(checkDefaultBinding): Check for symbol whose namespace
	is XmlNamespace or unitNamespace.
	Check for simple symbol matching quantity syntax.
	(lookupBuiltin): Remove method.
	* standard/let.java (rewrite): Do namespaceResolve.
	* standard/define_unit.java (rewriteForm): Unit symbol now uses
	Scheme.unitNamespace, rather than "$unit" suffix.

	* lang/Translator.java (getNamedPartDecl): Moved from Scheme.java.
	(getNamedPartLocation): New field.
	(rewrite_pair): Handle getNamedPartDecl here.  Most important change
	is that we also do namespaceResolve.
	* standard/Scheme.java (getNamedPartDecl): Moved to Translator.
	(checkDefaultBinding): Handle symbols in XmlNamespace.
	(makeApply): Don't handle getNamedPartDecl here.

2007-03-19  Per Bothner  <per@bothner.com>

	* standard/object.java (scanClassDef): If interface:#f is specified
	set CLASS_SPECIFIED flag.
	(rewriteClassDef): ClassExp.setClassName was merged into setTypes.

	* standard/Scheme.java (checkDefaultBinding): Demangle possible class
	name if there is no '.' in name.
	* standard/require.java (scanForDefinitions): Delegate class-name
	lookup to Translator.require.
	* lang/Translator.java (selfEvaluatingSymbol): Make public.

2007-03-14  Per Bothner  <per@bothner.com>

	* standard/Scheme.java (lookupBuiltin): Remove handling of '<TYPE>'
	here, since we want it handled by checkDefaultBinding.
	(checkDefaultBinding): Use getNamedType rather than lookupType.
	
2007-03-13  Per Bothner  <per@bothner.com>

	* lang/Translator.java (rewrite): Only call checkDefaultBinding
	if there is no binidng in the dynamic Environment.

	* Shell.java (printError): New static method.
	(run, runString, runFile): Change return type to boolean
	or Throwable to allow better error handling.  Use printError.
	* repl.java (processArgs): If error and not interactive, exit(-1).
	* standard/load.java (loadSource): Change to new run API.

	* standard/object.java (matchAccess, accessString): New static methods.
	(scanClassDef): Handle interface: and access: class properties.
	(rewriteClassDef): Skip over class-level keyword specifier pairs.
	* standard/define_class.java (scanForDefinitions): Immediate error
	is name missing or invalid.  Resolve qualified (colon) names.

	* Record.java (makeRecordType): Don't access acces_flags directly.

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

	* lang/Lambda.java (rewriteBody): Canonicale BeginExp.
	Don't coerce body if isAbstract().
	* lang/Translator.java (rewrite): Handle literal #!abstract.

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

	* Shell.java (dontPrompt): New global flag.
	(run): Don't set inport's prompter if dontPrompt flag is set.
	* repl.java (processArgs): Set Shell.dontPrompt if "--no-prompt".

	* repl.java (internalError): New static method.
	(processArgs): Use it in two places.

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

	* standard/fluid_let.java (rewrite): Invoke Declaration.setCanWrite.
	* standard/set_b.java (rewriteForm): Likewise.

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

	* standard/map.java (inline): Update for new CanInline api.

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

	* standard/Scheme.java (checkDefaultBinding): Map 'NAME?' to
	'(lambda (x) (instance? x NAME)'.

	* standard/Scheme.java (getNamedType): Remove redundant efinition
	of 'java.lang.Object'.

	* lang/Lambda.java (rewriteBody): Allow constant Type or Class in
	deprecated '<TYPE> BODY' syntax.

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

	* standard/define_class.java (scanForDefinitions): We now return
	Class, rather than Type, in the define-simple-class case.

2007-02-18  Per Bothner  <per@bothner.com>

	* lang/NamedException.java: Use Symbol rather than String for name.
	* lang/Lambda.java: Names are now Symbol, not String.
	Strings are now CharSequence rather than only FString.
	* standard/define_autoload.java: Likewise.
	* standard/define_unit.java: Likewise.
	* lang/SyntaxPattern.java: Likewise.
	* standard/require.java: Likewise.  Assume fdecl's name is Symbol.
	* lang/Translator.java: Likewise.
	(matches): New method, handles Symbols.
	* lang/SyntaxTemplate.java: Names are now Symbol, not String.
	* lang/Record.java (typeFieldNames): Likewise.
	* standard/define_syntax.java: Likewise.
	* standard/throw_name.java: Likewise.
	* standard/IfFeature.java: Likewise.
	* standard/module_static.java: Likewise.
	* standard/object.java: Likewise.
	* standard/Scheme.java: Update for new type scheme.

	* lang/Translator.java (rewrite): Handle rewriting class name to class
	by calling checkDefaultBinding.
	* standard/Scheme.java (initScheme, getType): Define class and type
	types.
	(checkDefaultBinding): New method.
	(exp2Type): Simplify to use getTypeFor.
	* standard/prim_method.java (rewrite): Use implemetation type.
	* standard/define_alias.java (scanForDefinitions): \
	Handle aliasing to a constant.

2007-02-08  Per Bothner  <per@bothner.com>

	* standard/Scheme.java (getTypeFor): New method.

2007-02-05  Per Bothner  <per@bothner.com>

	* standard/Scheme.java (initScheme): Declare define-syntax-case.

	* lang/Translator.java (setCurrentScope): Change needed to handle
	macros that generate macros.  Not quite right, but an improvement.

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

	* MessageArea.java (enter): Fix osme off-by-one issues.
	Fixes (hopefully) Savannah bug #16313.

2007-01-14  Per Bothner  <per@bothner.com>

	* lang/Record.java (makeRecordType): Use one-argument version of
	loadClass, since 2-argument version is now protected.

2007-01-09  Per Bothner  <per@bothner.com>

	* standard/Scheme.java: Add new path functions.

2007-01-04  Per Bothner  <per@bothner.com>

	* standard/load.java (apply): Use Path's openInputStream.
	* standard/require.java (lookupModuleFromSourcePath): Use Path's
	resolve method, rather than URI_utils's.

2007-01-03  Per Bothner  <per@bothner.com>

	* standard/require.java: Use ModuleInfo's new
	getSourceAbsPathname method.

2007-01-02  Per Bothner  <per@bothner.com>

	* standard/load.java (apply): Take Path parameter.
	Simplify resolving to URL - let Path.toURL handle it.
	(apply2): Update accordingly.
	(loadCompiled): Take Path parameter.
	* Shell.java (runFile): Update accordingly.

	* standard/Scheme.java (initScheme): Change URI from function to type.
	Other new types: path, filepath
	New functions: path?, filepath?, URI?, absolute-path? path-scheme,
	path-authority, path-user-info, path-host, path-port, path-path,
	path-fragment, path-query.
	(getNamedType): Remove URI - now "URI" rather than "<URI>".
	(getTypeFor): Handle path, filepath, uri.
	(createReadTable): URI is now define in LangObjType.
	Add path and filepath.
