Commit graph

18 commits

Author SHA1 Message Date
Douglas Katzman e1f16839bf Once more reimplement "missed compiler macro" warning
Scope it to the outermost compilation-unit that didn't use :OVERRIDE.
It's still inadequate but at least it doesn't hold on to all function names
thereby causing garbage to be retained.

Rev e483e8c6ce claimed that to do this correctly, the loader must participate
in determining missed optimizations, perhaps by having %define-compiler-macro
examine which fdefns (now linkage cells) were looked up.
On top of all else, I can't see how make-genesis-2 could ever have reported
anything given that the entire cross-compiler state was reset at that point.
2024-08-21 09:52:07 +00:00
Douglas Katzman f0ef90a4a2 Kill obsolete sbcl.nm refs after cf6a01774b removed that file 2024-02-04 21:31:40 -05:00
Christophe Rhodes 9783eeedd2 New :FOPTRACE-FILE build stem flag
Requests that genesis produce a trace file from cold-loading the
object file.
2024-02-03 11:49:05 +00:00
Douglas Katzman e483e8c6ce Try (and fail) to reimplement "missed compiler macro" warning
There were/are limitations with the mechanism, e.g. compiling "file_a"
which could have benefited from a compiler-macro in "file_b", then
quitting and retarting lisp before compiling "file_b" should somehow warn.
This is particularly a problem for sandboxed builds where each
build executor compiles 1 file.

To do it, info about missed optimizations has to be part of the fasl.
I was able to get either the existing regression tests to pass, or the
warnings from genesis to be right, but not both. I left it where
the tests pass, but I gave up for the moment on doing it right.

If nothing else, this rectifies the poor decision of using globaldb for
the compiler's dynamic data. It meant that COMPILE on the simplest of
functions could touch a ton of GC cards for no particularly good reason,
as each mentioned symbol might accrete a new PACKED-INFO instance.
2023-04-17 16:54:48 -04:00
Christophe Rhodes 2dfe932d0a Make explicit which generated sources are build-dependent
(For example because of different build-time options)
2022-06-21 16:07:37 +01:00
Christophe Rhodes f764e96bad Move generated data files to output/
Keeping them in obj/ makes for hard-to-interpret reports of
differences between cross-compiler hosts, because of different
interpretations of *print-readably* with (hopefully) no effect
on the final artifacts.
2022-06-21 16:07:37 +01:00
Douglas Katzman cae7ede71f Avoid using STEM-OBJECT-PATH in genesis per se
Causes problems unless artifacts are directly beneath source tree,
which they aren't for my customized build.
2020-01-24 15:22:28 -05:00
Douglas Katzman e95f6385c6 Write tls-init to XC artifact tree, not source tree 2019-12-26 20:02:15 -05:00
Douglas Katzman 825d4d0070 Really prevent #!+ vs #+ confusion now
Files which are part of the build framework, namely "make-*.lisp" and anything
under src/cold except for src/cold/warm always interpret #+/- as host features,
which is obvious. In those files, the reader can't parse target feature sexprs,
but the value of SB-XC:*FEATURES* may be tested with code.

Files which are sources, namely everything else, can _only_ refer to target
features in "#+"/"#-" (sans #\!) expressions, unless within a #+(host-feature)
escape. Thus it is identical, for the time being, to using #!+ or #!-.

As far as implementation, the default *READTABLE* never has its macros changed,
so you can't just slurp a file containing target feature conditionals -
instead *READTABLE* must be bound from *XC-READTABLE*. You may continue to use
the features named :sb-xc-host and :sb-xc with either the bang or non-bang
conditional syntax. So ultimately, "#!" syntax serves no purpose at all,
and we can replace every occurrence with normal syntax.

Note also that DO-STEMS-AND-FLAGS requires a third argument to indicate whether
the flags pertain to make-host-1 or -2 which avoid erroneous injection of
the :IGNORE-FAILURE-P flag when it is intended for the host. I don't love it,
but lacking proof that the CMUCL workaround isn't needed, I preserved the
behavior while improving upon it as well.
2019-01-28 00:52:12 -05:00
Douglas Katzman ee4448c9f1 Simplify make-host-2
- Remove :NOT-GENESIS flag, *TARGET-OBJECT-FILE-NAMES*, and
  don't create "output/object-filenames-for-genesis.lisp-expr"

- Remove warn-when-cl-snapshot-diff. Self-hosted build proves that
  we don't touch CL (if our own package locks are believed to work).
2018-10-12 19:12:38 -04:00
Douglas Katzman ea395cb6fb Share magic constants between genesis and editcore 2018-01-15 13:53:38 -05:00
Douglas Katzman 7dd2170248 Store all assembler routines in one code object
* Remove :preload-file keyword from genesis, load all asm files up front.

* Resolve :assembly-routine fixups right away rather than deferring.

* Remove *assembler-routines* from static symbols, make its value
  the single code object rather than a hashtable.

* Hang the name->addr table off %code-debug-info for that object
  and store entry points as relative offsets, not addresses.

* Remove magic in coreparse to fix the hashtable on relocation.

* Eliminate potential confusion betweeen FIND-ASSEMBLER-ROUTINE and
  FIND-ASSEMBLY-ROUTINE by removing the latter.
2017-11-30 15:13:17 -05:00
Douglas Katzman c14006b088 Move SB!VM:GENESIS to SB-COLD 2017-01-12 11:36:09 -05:00
Stas Boukarev c64d6faab9 Remove the :read-only-tramps *feature*.
Now all the backends support it and nothing would work without it.
2016-10-03 04:48:06 +03:00
Alastair Bridgewater fc3985c559 Add support for undefined_tramp and closure_tramp in read-only space.
* These are the two "tricky" trampolines, in that genesis needs
to know where they are in order to cold-load fasls, and where
undefined_tramp in particular is in order to even prepare to
cold-load fasls.

  * Add a concept of a "preload file" to genesis, to be loaded
after creating NIL but before creating any FDEFN objects.

  * Use a target feature to switch genesis to using an assembler
routine instead of a foreign symbol for the trampolines.

  * And use our new :NOT-GENESIS build flag to set up a file that
will contain the new trampolines, and arrange for it to be loaded
as the preload file, again under the same target feature.

  * As far as it goes, all this works, but it almost certainly has
some rough edges to it.  It probably isn't quite ready for
upstream yet.
2016-09-01 22:25:43 +03:00
Douglas Katzman 06e04c3811 Eliminate COLD-FSET. It's just fop-funcall of %DEFUN 2015-02-15 01:33:18 -05:00
Alastair Bridgewater 577487adfc 1.0.28.14: Build system refactoring
Moved flag processing as far "inward" as possible when dealing with
compile-stem, reducing the amount of redundant code for parsing out and
passing along boolean keywords based on the presence or absence of a
flag and eliminating some of the keyword arguments to compile-stem.

  Added a "mode" parameter to compile-stem to enable determining the
correct compile-file function based on the combination of mode and
flags, further simplifying the interface.

  Added new functions for determining the source and object pathnames
for a stem, fixing a longstanding KLUDGE in host-load-stem,
consolidating the three instances of code to compute an object pathname
and the two instances of code to compute a source pathname and
eliminating the rest of the keyword arguments to compile-stem.
2009-05-05 17:10:29 +00:00
Christophe Rhodes 89987c8a15 0.9.8.4:
Beginnings of a Win32 merge.
	... rearrange the build scripts to use input from files rather
		than <<HERE documents.
	... (no other changes; just working to get the meaty changes
		isolated from the fluff)
2005-12-29 16:08:31 +00:00