gencgc: Simpler conservative root validation on non-x86oids.

  * On "precise" gencgc targets (currently, non-x86oids), we only
ever treat valid object pointers as conservative (pinned) roots,
so most of the validity checking is unnecessary.

  * Add a shortcut path through valid_conservative_root_p() for
this precise case.
gencgc: More precise conservatism for pointers to boxed pages.

  * The commentary for possibly_valid_dynamic_space_pointer()
claims that it matches unboxed return addresses (to within code
objects), but this turns out not to be the case.

  * Fix the code to match the comment, at least somewhat, by
checking to see if the object found is a code object and
shortcutting the full validation if it is.

  * And, now that we have a version of p_v_d_s_p() that does the
"right thing", or at least close to it with respect to the only
truly unboxed interior pointers that we should have to deal with,
call it straight up instead of only for unboxed pages when we have
a true pointer type.

  * Overall, this can be expected to be slower than the prior
version, but more precise in terms of rogue integers in the heap
range.  The remaining conservation effects would be due to the
fact that we can't move ANYTHING that's a conservative root and
stale pointers within our active area (truly precise ports are
less affected by this because they can relocate objects pointed to
by stale pointers).
gencgc: Pick out shrunk object tails earlier in conservative root logic.

  * BIGNUM and VECTOR objects can be allocated overlarge and then
shrunk once the actual required length is known.  This leaves a
"tail" of dead (0 . 0) CONSes.  When this happens in large-object
pages (as opposed to normal pages), we can see that this has
happened and treat any pointer to such objects as not being a
conservative root.

  * Unfortunately, where we currently perform this test we don't
have enough information available to easily say that the reference
is definitely to one of these dead objects, so we use a more
conservative test than strictly required.

  * Add another test for the same situation, but earlier in the
logic, and using a more precise test, so that we can skip a bit of
extra work in such (rare) cases, and so that we can simplify the
overall logic.
gencgc: code_page_p() must die!

  * The last call site for code_page_p() is now a redundant test
for a specific (non-critical) edge case in the logic for dealing
with conservative roots, so kill it.

  * And now that nothing calls code_page_p(), kill it before it
has a chance to maul any other SBCL hackers.
Optimize MAKE-ARRAY on unknown element-type.

Reimplement %vector-widetag-and-n-bits without using subtypep,
providing an order of magnitude speed up.

Out of line make-array :element-type 'character also caused to cons
twice larger than needed vectors on x86-64.
(Though that wasted space was reclaimed after GC).

Closes lp#1004501.
Restore PPC build.

Adjust register lifetime in calling VOPs.

Thanks to Alastair Bridgewater.
Fix the recent %vector-widetag-and-n-bits change.

Handle extended-char, interval type designators, and union types.
UPGRADED-ARRAY-ELEMENT-TYPE: more thoroughly signal errors on unknown types.

Intersection and union types containing unknown types were handled incorrectly.
(upgraded-array-element-type '(and fixnum unknown)) => was FIXNUM.
better encapsulation support in generic functions

It's not very nice to alter the fdefinition of names which refer to
generic functions: it might not be strictly required by the spec, but
preserving the class of generic functions when encapsulated is more
friendly, so that attempts to trace or profile them doesn't break any
metaobject protocol logic which refers to particular functions by
name.  Fortunately, it's fairly straightforward to
support (un)encapsulation of generic functions through adapting the
discriminating function instead.
Fix make-array transforms.

Don't call UPGRADED-ARRAY-ELEMENT-TYPE on types without checking that
they don't contain unknown types (i.e., intersections or unions
containing unknown-type), since U-A-E-T now signals errors for these.

Reported by Bart Botta.
run-program: Don't check element-type of :output/:input streams.

Instead of checking ahead of time that stream-element-type is
compatible with unsigned-byte-8 buffers, rely on
write-sequence/read-sequence to signal any type errors, while wrapping
them in handler-bind to resignal errors with more context.
Optimize sb-bsd-sockets a bit.

Add declarations and rearrange some code to reduce consing.
Fix format argument handling of ASSERT-SYMBOL-HOME-PACKAGE-UNLOCKED

* ASSERT-SYMBOL-HOME-PACKAGE-UNLOCKED was already used as if it
  accepted an optional format string and format arguments, but that
  was not the case, previously

* ASSERT-SYMBOL-HOME-PACKAGE-UNLOCKED has been slightly simplified
Simplify report function of PACKAGE-LOCK-VIOLATION
Add PROCLAIM-[F]TYPE; use in PROCLAIM and PREINFORM-COMPILER-ABOUT-ACCESSORS

* New functions have been PROCLAIM-[F]TYPE extracted from PROCLAIM

  * PROCLAIM could be slightly simplified

  * FIXME about not being able to use TYPE-PROCLAMATION-MISMATCH has
    been resolved

* As suggested in a FIXME comment, PREINFORM-COMPILER-ABOUT-ACCESSORS
  now uses PROCLAIM-FTYPE instead of duplicating the logic

* The proclamation-related condition hierarchy now looks like this

  condition-----------------------+---------------+
         |                        |               |
         |                        |               |
  proclamation-mismatch     style-warning       error
     |              |             |               |
     |              |             |               |
  type-p-m         ftype-p-m-----------------+    |
     |                    |       |          |    |
     |        +-----------|-------+          |    |
     |        |           |       |          |    |
  type-p-m-warning   ftype-p-m-warning   ftype-p-m-error

  Report functions of these condition are more regular now and should
  work a bit better in logical blocks
Simplifications in src/compiler/proclaim.lisp
1.1.15: will be tagged as "sbcl-1.1.15"
Fix concurrently doing TYPEP and redefining the class it checks.

Grabbing the world lock in %FORCE-CACHE-FLUSHES prevents
CLASSOID-TYPEP from messing things up.

Fixes lp#1272742.
Optimize functions calling wrapper-of.

SB-PCL::WRAPPER-OF is just a synonym for LAYOUT-OF and it's declared
inline, but it's used before it's defined, which prevents inlining.
Move it before the first use. That makes some operations a bit faster.
Fix XCHG encoding on x86-64.

x86-64 XCHG instruction was misencoded when used with RAX, R8-R15
registers.

Reported by Eric Marsden.