1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-18 02:00:20 +02:00

Rename objcodes?.{scm,c,h} to loader.{scm,c,h}

* libguile/loader.c:
* libguile/loader.h: Rename from objcodes.[ch].
* module/system/vm/loader.scm: Rename from objcode.scm.

* libguile/Makefile.am:
* libguile/gsubr.c:
* libguile/init.c:
* libguile/procs.c:
* libguile/vm.c:
* module/Makefile.am:
* module/ice-9/eval-string.scm:
* module/language/rtl/spec.scm:
* module/system/base/target.scm:
* module/system/repl/command.scm:
* module/system/repl/common.scm:
* module/system/vm/debug.scm:
* module/system/vm/disassembler.scm:
* module/system/vm/objcode.scm:
* test-suite/tests/compiler.test:
* test-suite/tests/dwarf.test:
* test-suite/tests/rtl-compilation.test:
* test-suite/tests/rtl.test: Adapt.
This commit is contained in:
Andy Wingo 2013-11-19 21:45:07 +01:00
parent c0a1a0b12d
commit 4cbc95f150
20 changed files with 36 additions and 39 deletions

View file

@ -169,13 +169,13 @@ libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = \
keywords.c \
list.c \
load.c \
loader.c \
macros.c \
mallocs.c \
memoize.c \
modules.c \
null-threads.c \
numbers.c \
objcodes.c \
objprop.c \
options.c \
pairs.c \
@ -255,6 +255,7 @@ DOT_X_FILES = \
fluids.x \
foreign.x \
fports.x \
frames.x \
gc-malloc.x \
gc.x \
gettext.x \
@ -268,10 +269,12 @@ DOT_X_FILES = \
hooks.x \
i18n.x \
init.x \
instructions.x \
ioext.x \
keywords.x \
list.x \
load.x \
loader.x \
macros.x \
mallocs.x \
memoize.x \
@ -284,6 +287,7 @@ DOT_X_FILES = \
print.x \
procprop.x \
procs.x \
programs.x \
promises.x \
r6rs-ports.x \
random.x \
@ -318,14 +322,12 @@ DOT_X_FILES = \
variable.x \
vectors.x \
version.x \
vm.x \
vports.x \
weak-set.x \
weak-table.x \
weak-vector.x
# vm-related snarfs
DOT_X_FILES += frames.x instructions.x objcodes.x programs.x vm.x
EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@
DOT_DOC_FILES = \
@ -577,6 +579,7 @@ modinclude_HEADERS = \
keywords.h \
list.h \
load.h \
loader.h \
macros.h \
mallocs.h \
memoize.h \
@ -584,7 +587,6 @@ modinclude_HEADERS = \
net_db.h \
null-threads.h \
numbers.h \
objcodes.h \
objprop.h \
options.h \
pairs.h \

View file

@ -28,7 +28,6 @@
#include "libguile/gsubr.h"
#include "libguile/foreign.h"
#include "libguile/instructions.h"
#include "libguile/objcodes.h"
#include "libguile/srfi-4.h"
#include "libguile/programs.h"
@ -43,9 +42,7 @@
/* OK here goes nothing: we're going to define VM assembly trampolines for
invoking subrs, along with their meta-information, and then wrap them into
statically allocated objcode values. Ready? Right!
*/
invoking subrs. Ready? Right! */
/* There's a maximum of 10 args, so the number of possible combinations is:
(REQ-OPT-REST)

View file

@ -85,7 +85,7 @@
#include "libguile/modules.h"
#include "libguile/net_db.h"
#include "libguile/numbers.h"
#include "libguile/objcodes.h"
#include "libguile/loader.h"
#include "libguile/objprop.h"
#include "libguile/options.h"
#include "libguile/pairs.h"
@ -391,7 +391,7 @@ scm_i_init_guile (void *base)
scm_init_array_handle ();
scm_bootstrap_bytevectors (); /* Requires array-handle */
scm_bootstrap_instructions ();
scm_bootstrap_objcodes ();
scm_bootstrap_loader ();
scm_bootstrap_programs ();
scm_bootstrap_vm ();
scm_register_r6rs_ports ();

View file

@ -40,7 +40,7 @@
#include "_scm.h"
#include "elf.h"
#include "programs.h"
#include "objcodes.h"
#include "loader.h"
/* This file contains the loader for Guile's on-disk format: ELF with
some custom tags in the dynamic segment. */
@ -688,18 +688,18 @@ scm_all_mapped_elf_images (void)
void
scm_bootstrap_objcodes (void)
scm_bootstrap_loader (void)
{
scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
"scm_init_objcodes",
(scm_t_extension_init_func)scm_init_objcodes, NULL);
"scm_init_loader",
(scm_t_extension_init_func)scm_init_loader, NULL);
}
void
scm_init_objcodes (void)
scm_init_loader (void)
{
#ifndef SCM_MAGIC_SNARFER
#include "libguile/objcodes.x"
#include "libguile/loader.x"
#endif
scm_c_define_gsubr ("find-mapped-elf-image", 1, 0, 0,

View file

@ -16,18 +16,18 @@
* 02110-1301 USA
*/
#ifndef _SCM_OBJCODES_H_
#define _SCM_OBJCODES_H_
#ifndef _SCM_LOADER_H_
#define _SCM_LOADER_H_
#include <libguile.h>
SCM_API SCM scm_load_thunk_from_file (SCM filename);
SCM_API SCM scm_load_thunk_from_memory (SCM bv);
SCM_INTERNAL void scm_bootstrap_objcodes (void);
SCM_INTERNAL void scm_init_objcodes (void);
SCM_INTERNAL void scm_bootstrap_loader (void);
SCM_INTERNAL void scm_init_loader (void);
#endif /* _SCM_OBJCODES_H_ */
#endif /* _SCM_LOADER_H_ */
/*
Local Variables:

View file

@ -33,7 +33,7 @@
#include "libguile/validate.h"
#include "libguile/procs.h"
#include "libguile/procprop.h"
#include "libguile/objcodes.h"
#include "libguile/loader.h"
#include "libguile/programs.h"

View file

@ -33,7 +33,7 @@
#include "control.h"
#include "frames.h"
#include "instructions.h"
#include "objcodes.h"
#include "loader.h"
#include "programs.h"
#include "vm.h"
#include "vm-builtins.h"

View file

@ -355,7 +355,7 @@ SYSTEM_SOURCES = \
system/vm/elf.scm \
system/vm/linker.scm \
system/vm/frame.scm \
system/vm/objcode.scm \
system/vm/loader.scm \
system/vm/program.scm \
system/vm/trace.scm \
system/vm/traps.scm \

View file

@ -22,7 +22,7 @@
#:use-module (system base compile)
#:use-module (system base language)
#:use-module (system vm program)
#:use-module (system vm objcode)
#:use-module (system vm loader)
#:replace (eval-string))
(define (ensure-language x)

View file

@ -20,7 +20,7 @@
(define-module (language rtl spec)
#:use-module (system base language)
#:use-module (system vm objcode)
#:use-module (system vm loader)
#:use-module (ice-9 binary-ports)
#:export (rtl))

View file

@ -35,8 +35,6 @@
;;;
(define %native-word-size
;; The native word size. Note: don't use `word-size' from
;; (system vm objcode) to avoid a circular dependency.
((@ (system foreign) sizeof) '*))
(define %target-type (make-fluid %host-type))

View file

@ -26,7 +26,7 @@
#:use-module (system repl common)
#:use-module (system repl debug)
#:use-module (system vm disassembler)
#:use-module (system vm objcode)
#:use-module (system vm loader)
#:use-module (system vm program)
#:use-module (system vm trap-state)
#:use-module (system vm vm)

View file

@ -25,7 +25,7 @@
#:use-module (system base language)
#:use-module (system base message)
#:use-module (system vm program)
#:use-module (system vm objcode)
#:use-module (system vm loader)
#:autoload (language tree-il optimize) (optimize)
#:use-module (ice-9 control)
#:use-module (ice-9 history)

View file

@ -27,7 +27,7 @@
(define-module (system vm debug)
#:use-module (system vm elf)
#:use-module (system vm dwarf)
#:use-module (system vm objcode)
#:use-module (system vm loader)
#:use-module (system foreign)
#:use-module (rnrs bytevectors)
#:use-module (ice-9 match)

View file

@ -23,7 +23,7 @@
#:use-module (system vm elf)
#:use-module (system vm debug)
#:use-module (system vm program)
#:use-module (system vm objcode)
#:use-module (system vm loader)
#:use-module (system foreign)
#:use-module (rnrs bytevectors)
#:use-module (ice-9 format)

View file

@ -18,10 +18,10 @@
;;; Code:
(define-module (system vm objcode)
(define-module (system vm loader)
#:export (load-thunk-from-file
load-thunk-from-memory
find-mapped-elf-image all-mapped-elf-images))
(load-extension (string-append "libguile-" (effective-version))
"scm_init_objcodes")
"scm_init_loader")

View file

@ -19,7 +19,7 @@
#:use-module (test-suite lib)
#:use-module (test-suite guile-test)
#:use-module (system base compile)
#:use-module ((system vm objcode) #:select (load-thunk-from-memory))
#:use-module ((system vm loader) #:select (load-thunk-from-memory))
#:use-module ((system vm program) #:select (program-sources source:addr)))
(define read-and-compile

View file

@ -22,7 +22,7 @@
#:use-module (system base compile)
#:use-module (system vm debug)
#:use-module (system vm program)
#:use-module (system vm objcode))
#:use-module (system vm loader))
(define prog
(string-concatenate

View file

@ -19,7 +19,7 @@
(define-module (test-suite rtl-compilation)
#:use-module (test-suite lib)
#:use-module (system base compile)
#:use-module (system vm objcode))
#:use-module (system vm loader))
(define* (compile-via-rtl exp #:key peval? cse? (env (make-fresh-user-module)))
(load-thunk-from-memory

View file

@ -20,7 +20,7 @@
#:use-module (test-suite lib)
#:use-module (system vm assembler)
#:use-module (system vm program)
#:use-module (system vm objcode)
#:use-module (system vm loader)
#:use-module (system vm linker)
#:use-module (system vm debug))