Ignore:
Timestamp:
Dec 6, 2012, 9:09:50 PM (7 years ago)
Author:
gb
Message:

Change the way that (APPLY inlined-functon args) inlines: don't use the
ancient DEBIND mechanism (which depends on a hairy subprim in the kernel
and which generates fairly bad code), but "manually" do a LET* and a
DESTRUCTURING-BIND with some environment hacking in NX1-DESTRUCTURE.

The environment hacking (processing the inlined function in the lexical
environment in which it was defined) was the argument for using the
magical DEBIND mechanism. However, it's been a while (if ever) since
we inlined anything that was defined in a non-null lexical environment,
so we didn't really retain the environment of definition. Hack things
up to do so, at least in the case where the inlined function is defined
in the current (file-)compilation environment. This involved changing
some of the def-info.* acccessors, and bootstrapping it involved moving
some of those accessors from l1-readloop.lisp to nx.lisp, at least for
the time being.

Change the implementation of DESTRUCTURING-BIND: don't use a
DESTRUCTURE-STATE object, do generate code to explicitly check the
length of the list wrt the lambda-list (and try to signal clear errors
if the check fails), and don't be so sloppy about binding SUPPLIED-P
variables for &optional/&key before the corresponding variables.
(This sloppiness caused us to not warn about an unused supplied-p
variable in PPRINT-LOGICAL-BLOCK.)

Since the new DESTRUCTURING-BIND code expands into many POPs, try
to make PROG1 better about unnecessary pushes/pops to the stack
in the x86 backend. (Should do this on ARM too; it's not that
critical in the DESTRUCTURING-BIND case but may matter elsewhere.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-misc.lisp

    r15500 r15526  
    828828
    829829(defun store-gvector-conditional (index gvector old new)
    830   (%store-node-conditional (+ target::misc-data-offset
    831                               (ash index target::word-shift))
     830  (declare (index index))
     831  (%store-node-conditional (the fixnum
     832                             (+ target::misc-data-offset
     833                                (the fixnum (ash index target::word-shift))))
    832834                           gvector
    833835                           old
Note: See TracChangeset for help on using the changeset viewer.