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:
parent
c0a1a0b12d
commit
4cbc95f150
20 changed files with 36 additions and 39 deletions
|
@ -169,13 +169,13 @@ libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = \
|
||||||
keywords.c \
|
keywords.c \
|
||||||
list.c \
|
list.c \
|
||||||
load.c \
|
load.c \
|
||||||
|
loader.c \
|
||||||
macros.c \
|
macros.c \
|
||||||
mallocs.c \
|
mallocs.c \
|
||||||
memoize.c \
|
memoize.c \
|
||||||
modules.c \
|
modules.c \
|
||||||
null-threads.c \
|
null-threads.c \
|
||||||
numbers.c \
|
numbers.c \
|
||||||
objcodes.c \
|
|
||||||
objprop.c \
|
objprop.c \
|
||||||
options.c \
|
options.c \
|
||||||
pairs.c \
|
pairs.c \
|
||||||
|
@ -255,6 +255,7 @@ DOT_X_FILES = \
|
||||||
fluids.x \
|
fluids.x \
|
||||||
foreign.x \
|
foreign.x \
|
||||||
fports.x \
|
fports.x \
|
||||||
|
frames.x \
|
||||||
gc-malloc.x \
|
gc-malloc.x \
|
||||||
gc.x \
|
gc.x \
|
||||||
gettext.x \
|
gettext.x \
|
||||||
|
@ -268,10 +269,12 @@ DOT_X_FILES = \
|
||||||
hooks.x \
|
hooks.x \
|
||||||
i18n.x \
|
i18n.x \
|
||||||
init.x \
|
init.x \
|
||||||
|
instructions.x \
|
||||||
ioext.x \
|
ioext.x \
|
||||||
keywords.x \
|
keywords.x \
|
||||||
list.x \
|
list.x \
|
||||||
load.x \
|
load.x \
|
||||||
|
loader.x \
|
||||||
macros.x \
|
macros.x \
|
||||||
mallocs.x \
|
mallocs.x \
|
||||||
memoize.x \
|
memoize.x \
|
||||||
|
@ -284,6 +287,7 @@ DOT_X_FILES = \
|
||||||
print.x \
|
print.x \
|
||||||
procprop.x \
|
procprop.x \
|
||||||
procs.x \
|
procs.x \
|
||||||
|
programs.x \
|
||||||
promises.x \
|
promises.x \
|
||||||
r6rs-ports.x \
|
r6rs-ports.x \
|
||||||
random.x \
|
random.x \
|
||||||
|
@ -318,14 +322,12 @@ DOT_X_FILES = \
|
||||||
variable.x \
|
variable.x \
|
||||||
vectors.x \
|
vectors.x \
|
||||||
version.x \
|
version.x \
|
||||||
|
vm.x \
|
||||||
vports.x \
|
vports.x \
|
||||||
weak-set.x \
|
weak-set.x \
|
||||||
weak-table.x \
|
weak-table.x \
|
||||||
weak-vector.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@
|
EXTRA_DOT_X_FILES = @EXTRA_DOT_X_FILES@
|
||||||
|
|
||||||
DOT_DOC_FILES = \
|
DOT_DOC_FILES = \
|
||||||
|
@ -577,6 +579,7 @@ modinclude_HEADERS = \
|
||||||
keywords.h \
|
keywords.h \
|
||||||
list.h \
|
list.h \
|
||||||
load.h \
|
load.h \
|
||||||
|
loader.h \
|
||||||
macros.h \
|
macros.h \
|
||||||
mallocs.h \
|
mallocs.h \
|
||||||
memoize.h \
|
memoize.h \
|
||||||
|
@ -584,7 +587,6 @@ modinclude_HEADERS = \
|
||||||
net_db.h \
|
net_db.h \
|
||||||
null-threads.h \
|
null-threads.h \
|
||||||
numbers.h \
|
numbers.h \
|
||||||
objcodes.h \
|
|
||||||
objprop.h \
|
objprop.h \
|
||||||
options.h \
|
options.h \
|
||||||
pairs.h \
|
pairs.h \
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include "libguile/gsubr.h"
|
#include "libguile/gsubr.h"
|
||||||
#include "libguile/foreign.h"
|
#include "libguile/foreign.h"
|
||||||
#include "libguile/instructions.h"
|
#include "libguile/instructions.h"
|
||||||
#include "libguile/objcodes.h"
|
|
||||||
#include "libguile/srfi-4.h"
|
#include "libguile/srfi-4.h"
|
||||||
#include "libguile/programs.h"
|
#include "libguile/programs.h"
|
||||||
|
|
||||||
|
@ -43,9 +42,7 @@
|
||||||
|
|
||||||
|
|
||||||
/* OK here goes nothing: we're going to define VM assembly trampolines for
|
/* 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
|
invoking subrs. Ready? Right! */
|
||||||
statically allocated objcode values. Ready? Right!
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* There's a maximum of 10 args, so the number of possible combinations is:
|
/* There's a maximum of 10 args, so the number of possible combinations is:
|
||||||
(REQ-OPT-REST)
|
(REQ-OPT-REST)
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
#include "libguile/modules.h"
|
#include "libguile/modules.h"
|
||||||
#include "libguile/net_db.h"
|
#include "libguile/net_db.h"
|
||||||
#include "libguile/numbers.h"
|
#include "libguile/numbers.h"
|
||||||
#include "libguile/objcodes.h"
|
#include "libguile/loader.h"
|
||||||
#include "libguile/objprop.h"
|
#include "libguile/objprop.h"
|
||||||
#include "libguile/options.h"
|
#include "libguile/options.h"
|
||||||
#include "libguile/pairs.h"
|
#include "libguile/pairs.h"
|
||||||
|
@ -391,7 +391,7 @@ scm_i_init_guile (void *base)
|
||||||
scm_init_array_handle ();
|
scm_init_array_handle ();
|
||||||
scm_bootstrap_bytevectors (); /* Requires array-handle */
|
scm_bootstrap_bytevectors (); /* Requires array-handle */
|
||||||
scm_bootstrap_instructions ();
|
scm_bootstrap_instructions ();
|
||||||
scm_bootstrap_objcodes ();
|
scm_bootstrap_loader ();
|
||||||
scm_bootstrap_programs ();
|
scm_bootstrap_programs ();
|
||||||
scm_bootstrap_vm ();
|
scm_bootstrap_vm ();
|
||||||
scm_register_r6rs_ports ();
|
scm_register_r6rs_ports ();
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#include "_scm.h"
|
#include "_scm.h"
|
||||||
#include "elf.h"
|
#include "elf.h"
|
||||||
#include "programs.h"
|
#include "programs.h"
|
||||||
#include "objcodes.h"
|
#include "loader.h"
|
||||||
|
|
||||||
/* This file contains the loader for Guile's on-disk format: ELF with
|
/* This file contains the loader for Guile's on-disk format: ELF with
|
||||||
some custom tags in the dynamic segment. */
|
some custom tags in the dynamic segment. */
|
||||||
|
@ -688,18 +688,18 @@ scm_all_mapped_elf_images (void)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
scm_bootstrap_objcodes (void)
|
scm_bootstrap_loader (void)
|
||||||
{
|
{
|
||||||
scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
|
scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
|
||||||
"scm_init_objcodes",
|
"scm_init_loader",
|
||||||
(scm_t_extension_init_func)scm_init_objcodes, NULL);
|
(scm_t_extension_init_func)scm_init_loader, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
scm_init_objcodes (void)
|
scm_init_loader (void)
|
||||||
{
|
{
|
||||||
#ifndef SCM_MAGIC_SNARFER
|
#ifndef SCM_MAGIC_SNARFER
|
||||||
#include "libguile/objcodes.x"
|
#include "libguile/loader.x"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
scm_c_define_gsubr ("find-mapped-elf-image", 1, 0, 0,
|
scm_c_define_gsubr ("find-mapped-elf-image", 1, 0, 0,
|
|
@ -16,18 +16,18 @@
|
||||||
* 02110-1301 USA
|
* 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SCM_OBJCODES_H_
|
#ifndef _SCM_LOADER_H_
|
||||||
#define _SCM_OBJCODES_H_
|
#define _SCM_LOADER_H_
|
||||||
|
|
||||||
#include <libguile.h>
|
#include <libguile.h>
|
||||||
|
|
||||||
SCM_API SCM scm_load_thunk_from_file (SCM filename);
|
SCM_API SCM scm_load_thunk_from_file (SCM filename);
|
||||||
SCM_API SCM scm_load_thunk_from_memory (SCM bv);
|
SCM_API SCM scm_load_thunk_from_memory (SCM bv);
|
||||||
|
|
||||||
SCM_INTERNAL void scm_bootstrap_objcodes (void);
|
SCM_INTERNAL void scm_bootstrap_loader (void);
|
||||||
SCM_INTERNAL void scm_init_objcodes (void);
|
SCM_INTERNAL void scm_init_loader (void);
|
||||||
|
|
||||||
#endif /* _SCM_OBJCODES_H_ */
|
#endif /* _SCM_LOADER_H_ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Local Variables:
|
Local Variables:
|
|
@ -33,7 +33,7 @@
|
||||||
#include "libguile/validate.h"
|
#include "libguile/validate.h"
|
||||||
#include "libguile/procs.h"
|
#include "libguile/procs.h"
|
||||||
#include "libguile/procprop.h"
|
#include "libguile/procprop.h"
|
||||||
#include "libguile/objcodes.h"
|
#include "libguile/loader.h"
|
||||||
#include "libguile/programs.h"
|
#include "libguile/programs.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "control.h"
|
#include "control.h"
|
||||||
#include "frames.h"
|
#include "frames.h"
|
||||||
#include "instructions.h"
|
#include "instructions.h"
|
||||||
#include "objcodes.h"
|
#include "loader.h"
|
||||||
#include "programs.h"
|
#include "programs.h"
|
||||||
#include "vm.h"
|
#include "vm.h"
|
||||||
#include "vm-builtins.h"
|
#include "vm-builtins.h"
|
||||||
|
|
|
@ -355,7 +355,7 @@ SYSTEM_SOURCES = \
|
||||||
system/vm/elf.scm \
|
system/vm/elf.scm \
|
||||||
system/vm/linker.scm \
|
system/vm/linker.scm \
|
||||||
system/vm/frame.scm \
|
system/vm/frame.scm \
|
||||||
system/vm/objcode.scm \
|
system/vm/loader.scm \
|
||||||
system/vm/program.scm \
|
system/vm/program.scm \
|
||||||
system/vm/trace.scm \
|
system/vm/trace.scm \
|
||||||
system/vm/traps.scm \
|
system/vm/traps.scm \
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#:use-module (system base compile)
|
#:use-module (system base compile)
|
||||||
#:use-module (system base language)
|
#:use-module (system base language)
|
||||||
#:use-module (system vm program)
|
#:use-module (system vm program)
|
||||||
#:use-module (system vm objcode)
|
#:use-module (system vm loader)
|
||||||
#:replace (eval-string))
|
#:replace (eval-string))
|
||||||
|
|
||||||
(define (ensure-language x)
|
(define (ensure-language x)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
(define-module (language rtl spec)
|
(define-module (language rtl spec)
|
||||||
#:use-module (system base language)
|
#:use-module (system base language)
|
||||||
#:use-module (system vm objcode)
|
#:use-module (system vm loader)
|
||||||
#:use-module (ice-9 binary-ports)
|
#:use-module (ice-9 binary-ports)
|
||||||
#:export (rtl))
|
#:export (rtl))
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,6 @@
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define %native-word-size
|
(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) '*))
|
((@ (system foreign) sizeof) '*))
|
||||||
|
|
||||||
(define %target-type (make-fluid %host-type))
|
(define %target-type (make-fluid %host-type))
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#:use-module (system repl common)
|
#:use-module (system repl common)
|
||||||
#:use-module (system repl debug)
|
#:use-module (system repl debug)
|
||||||
#:use-module (system vm disassembler)
|
#:use-module (system vm disassembler)
|
||||||
#:use-module (system vm objcode)
|
#:use-module (system vm loader)
|
||||||
#:use-module (system vm program)
|
#:use-module (system vm program)
|
||||||
#:use-module (system vm trap-state)
|
#:use-module (system vm trap-state)
|
||||||
#:use-module (system vm vm)
|
#:use-module (system vm vm)
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#:use-module (system base language)
|
#:use-module (system base language)
|
||||||
#:use-module (system base message)
|
#:use-module (system base message)
|
||||||
#:use-module (system vm program)
|
#:use-module (system vm program)
|
||||||
#:use-module (system vm objcode)
|
#:use-module (system vm loader)
|
||||||
#:autoload (language tree-il optimize) (optimize)
|
#:autoload (language tree-il optimize) (optimize)
|
||||||
#:use-module (ice-9 control)
|
#:use-module (ice-9 control)
|
||||||
#:use-module (ice-9 history)
|
#:use-module (ice-9 history)
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
(define-module (system vm debug)
|
(define-module (system vm debug)
|
||||||
#:use-module (system vm elf)
|
#:use-module (system vm elf)
|
||||||
#:use-module (system vm dwarf)
|
#:use-module (system vm dwarf)
|
||||||
#:use-module (system vm objcode)
|
#:use-module (system vm loader)
|
||||||
#:use-module (system foreign)
|
#:use-module (system foreign)
|
||||||
#:use-module (rnrs bytevectors)
|
#:use-module (rnrs bytevectors)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#:use-module (system vm elf)
|
#:use-module (system vm elf)
|
||||||
#:use-module (system vm debug)
|
#:use-module (system vm debug)
|
||||||
#:use-module (system vm program)
|
#:use-module (system vm program)
|
||||||
#:use-module (system vm objcode)
|
#:use-module (system vm loader)
|
||||||
#:use-module (system foreign)
|
#:use-module (system foreign)
|
||||||
#:use-module (rnrs bytevectors)
|
#:use-module (rnrs bytevectors)
|
||||||
#:use-module (ice-9 format)
|
#:use-module (ice-9 format)
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(define-module (system vm objcode)
|
(define-module (system vm loader)
|
||||||
#:export (load-thunk-from-file
|
#:export (load-thunk-from-file
|
||||||
load-thunk-from-memory
|
load-thunk-from-memory
|
||||||
find-mapped-elf-image all-mapped-elf-images))
|
find-mapped-elf-image all-mapped-elf-images))
|
||||||
|
|
||||||
(load-extension (string-append "libguile-" (effective-version))
|
(load-extension (string-append "libguile-" (effective-version))
|
||||||
"scm_init_objcodes")
|
"scm_init_loader")
|
|
@ -19,7 +19,7 @@
|
||||||
#:use-module (test-suite lib)
|
#:use-module (test-suite lib)
|
||||||
#:use-module (test-suite guile-test)
|
#:use-module (test-suite guile-test)
|
||||||
#:use-module (system base compile)
|
#: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)))
|
#:use-module ((system vm program) #:select (program-sources source:addr)))
|
||||||
|
|
||||||
(define read-and-compile
|
(define read-and-compile
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#:use-module (system base compile)
|
#:use-module (system base compile)
|
||||||
#:use-module (system vm debug)
|
#:use-module (system vm debug)
|
||||||
#:use-module (system vm program)
|
#:use-module (system vm program)
|
||||||
#:use-module (system vm objcode))
|
#:use-module (system vm loader))
|
||||||
|
|
||||||
(define prog
|
(define prog
|
||||||
(string-concatenate
|
(string-concatenate
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
(define-module (test-suite rtl-compilation)
|
(define-module (test-suite rtl-compilation)
|
||||||
#:use-module (test-suite lib)
|
#:use-module (test-suite lib)
|
||||||
#:use-module (system base compile)
|
#: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)))
|
(define* (compile-via-rtl exp #:key peval? cse? (env (make-fresh-user-module)))
|
||||||
(load-thunk-from-memory
|
(load-thunk-from-memory
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#:use-module (test-suite lib)
|
#:use-module (test-suite lib)
|
||||||
#:use-module (system vm assembler)
|
#:use-module (system vm assembler)
|
||||||
#:use-module (system vm program)
|
#:use-module (system vm program)
|
||||||
#:use-module (system vm objcode)
|
#:use-module (system vm loader)
|
||||||
#:use-module (system vm linker)
|
#:use-module (system vm linker)
|
||||||
#:use-module (system vm debug))
|
#:use-module (system vm debug))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue