Add support for wild/unknown return types.

* compiler/x86/call.lisp (make-typed-call-tns): If the number
of return values is not fixed return the symbol :unknown instead
of a list of TNs.

* compiler/gtn.lisp (return-info-for-typed-entry-point): For
:unknown number of return values use the standard return convention.

* compiler/ir2tran.lisp ([ir2convert] %typed-call): Generate
different code for :unknown number of return values.

* compiler/x86/call.lisp ([vop] typed-call-named): Take an additional
info argument NRESULTS that indicates that we should use standard
return convention.

* compiler/x86/call.lisp ([vop] multiple-typed-call-named): New vop.
Some small improvements in the linker code.

* code/fdenition.lisp (find-typed-entry-point): Enable sharing of
callsite objects if the types match.
(generate-adapter-function): Bind *derive-function-types* for stricter
type checks.
(check-function-redefinition): Handle case where the new function
doesn't have an entry point.  Also use (:adapter <foo>) as name for
adapter functions.
(patch-fdefn): Take name as optional argument.
Load files into cross-compiler.
In the cross-build Make-rule, build PCL too.
Be more careful when searching the typed entry point of functions.
The function might be a closure and we can't access the code object
for those.
In %defun, closures and known functions are problematic.
For now, disable the typed convention for them.
Handle unused arguments.

* compiler/ir2tran.lisp (ir2-convert-local-typed-call): Skip over
unsed args.
Disable local inline expansion into typed entry points.

* compiler/locall.lisp (maybe-expand-local-inline): Treat
typed entry points like external entry points.
Don't need fop-fset for typed entry points.
Make typed entry point part of optional-dispatch.

Previously the typed entry point was a lambda with a marker in the
lambda-plist.  Now the typed entry point is part of a
optional-dispatch struct.  The previous approach kinda worked for
simple cases, but it was getting awkward when references to the XEP
had to be back-patched.  The new approach seems to work better; it's
nice that both the main entry and the XEP can be reached from the
optional-dispatch.

* compiler/node.lisp (optional-dispatch): Add new slots.  The typedp
slot is set during ir1trans and the actual entry point is generated
at the same time as the XEP.  Doing it a little later lets the types
settle a bit better.

* compiler/ir1tran.lisp (ir1-convert-lambda): Create a hairy lambda
when for the typed calling convention.
(ir1-convert-hairy-args): Add new argument typedp and pass it to
constructor.

* compiler/locall.lisp (generate-typed-entry): New function
(make-xep-lambda): Remove the code for the old strategy.
(make-external-entry-point): Generate the typed entry point if typed
is true.
Don't delete the typed entry point as long as a XEP is there.

* compiler/envanal.lisp (environment-analyze): Don't delete the typed
  entry point even if it has no references.

* compiler/ir1util.lisp (delete-optional-dispatch): But here delete
  the typed entry too.
Take the type for the fasl file from the optional-dispatch.
No longer wire arg TNs of typed entry.

The XEP no longer calls the typed entry so we don't need wired locations.

* compiler/gtn.lisp (assign-typed-lambda-var-tns): Deleted.
(assign-normal-lambda-var-tns): Renamed back to assign-lambda-var-tns.
(typed-entry-point-type): Take the ftype from the optional-dispatch or
the main entry

* compiler/ir2tran.lisp (init-typed-entry-point-environment): Now move
args from wired locations to locations chosen by GTN.  This seems to
cause fewer problem during packing.
Stop freaking out if *check-consistency* is T.

Make the checks aware of the typed entry point.
Don't use typed calling convention with wild-args-type.

This shouldn't happen normally, but it did happen when I enabled the
typed calling convention for all defuns.

* compiler/ir1opt.lisp (recognize-known-call): Look at the ftype more
  closesly.  Also ignore known functions.
Handle multiple-value-call with fixed numer of values.

* compiler/ir2tran.lisp (%typed-call-ir2-convert-optimizer): Don't use
  multiple-value-call-named if the the callee returns a fixed number
  of values.  typed-call-named + move-continuation-result seems to
  handle the multiple-value-call case just fine.
Fix off-by-one error when choosing argument registers.

* compiler/x86/call.lisp (make-typed-call-tns): Use < not <= when
  comparing with register-arg-count.
Lift restriction on number of return values.

Apparently we can return values on the stack just fine.
Don't allow ftypes with function-type-wild-args.
For typed-call-named force new-fp into register.

We use the lea instruction so new-fp needs to be in a register.
Be more careful when creating adapters.

* code/fdefinition.lisp (generate-adapter-function): Simply use :typed
convention instead of the :typed-no-xep.  I removed :typed-no-xep as
it was probably a premature optimisation.  Also switch directly to
full-call convention instead of trying to stay with typed convention.
(check-function-redefinition): Handle the case when the new function
doesn't have a typed entry point.