summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-11-19 21:45:07 +0100
committerAndy Wingo <wingo@pobox.com>2013-11-19 21:45:07 +0100
commit4cbc95f1507249d757391927da42feaaf969a60a (patch)
treedd5f0c29c77de3dba1dcbd587337f45c1e0f77c2
parentc0a1a0b12d2e63c62ecdb82c570b5bb7faf637e1 (diff)
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.
-rw-r--r--libguile/Makefile.am12
-rw-r--r--libguile/gsubr.c5
-rw-r--r--libguile/init.c4
-rw-r--r--libguile/loader.c (renamed from libguile/objcodes.c)12
-rw-r--r--libguile/loader.h (renamed from libguile/objcodes.h)10
-rw-r--r--libguile/procs.c2
-rw-r--r--libguile/vm.c2
-rw-r--r--module/Makefile.am2
-rw-r--r--module/ice-9/eval-string.scm2
-rw-r--r--module/language/rtl/spec.scm2
-rw-r--r--module/system/base/target.scm2
-rw-r--r--module/system/repl/command.scm2
-rw-r--r--module/system/repl/common.scm2
-rw-r--r--module/system/vm/debug.scm2
-rw-r--r--module/system/vm/disassembler.scm2
-rw-r--r--module/system/vm/loader.scm (renamed from module/system/vm/objcode.scm)4
-rw-r--r--test-suite/tests/compiler.test2
-rw-r--r--test-suite/tests/dwarf.test2
-rw-r--r--test-suite/tests/rtl-compilation.test2
-rw-r--r--test-suite/tests/rtl.test2
20 files changed, 36 insertions, 39 deletions
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index b2a9faf3a..273e1b6e4 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -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 \
diff --git a/libguile/gsubr.c b/libguile/gsubr.c
index 49edd3c5c..650ea668b 100644
--- a/libguile/gsubr.c
+++ b/libguile/gsubr.c
@@ -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)
diff --git a/libguile/init.c b/libguile/init.c
index 6787483ed..da6a857a7 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -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 ();
diff --git a/libguile/objcodes.c b/libguile/loader.c
index 52ba7b809..ce5699167 100644
--- a/libguile/objcodes.c
+++ b/libguile/loader.c
@@ -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,
diff --git a/libguile/objcodes.h b/libguile/loader.h
index 2d439f7b4..194faff22 100644
--- a/libguile/objcodes.h
+++ b/libguile/loader.h
@@ -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:
diff --git a/libguile/procs.c b/libguile/procs.c
index bbc80cf20..1be7fd10c 100644
--- a/libguile/procs.c
+++ b/libguile/procs.c
@@ -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"
diff --git a/libguile/vm.c b/libguile/vm.c
index 8758088e2..b95f844a3 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -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"
diff --git a/module/Makefile.am b/module/Makefile.am
index d3878cd3e..b5a31f298 100644
--- a/module/Makefile.am
+++ b/module/Makefile.am
@@ -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 \
diff --git a/module/ice-9/eval-string.scm b/module/ice-9/eval-string.scm
index ae6792e67..3cf73b9b5 100644
--- a/module/ice-9/eval-string.scm
+++ b/module/ice-9/eval-string.scm
@@ -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)
diff --git a/module/language/rtl/spec.scm b/module/language/rtl/spec.scm
index 0dabf94c6..0d9fa6a65 100644
--- a/module/language/rtl/spec.scm
+++ b/module/language/rtl/spec.scm
@@ -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))
diff --git a/module/system/base/target.scm b/module/system/base/target.scm
index c74ae679d..ce5ff33d6 100644
--- a/module/system/base/target.scm
+++ b/module/system/base/target.scm
@@ -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))
diff --git a/module/system/repl/command.scm b/module/system/repl/command.scm
index c0a5dd60b..62bc2977a 100644
--- a/module/system/repl/command.scm
+++ b/module/system/repl/command.scm
@@ -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)
diff --git a/module/system/repl/common.scm b/module/system/repl/common.scm
index 1da36694a..4e216791b 100644
--- a/module/system/repl/common.scm
+++ b/module/system/repl/common.scm
@@ -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)
diff --git a/module/system/vm/debug.scm b/module/system/vm/debug.scm
index d201e50ba..0ad387ac4 100644
--- a/module/system/vm/debug.scm
+++ b/module/system/vm/debug.scm
@@ -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)
diff --git a/module/system/vm/disassembler.scm b/module/system/vm/disassembler.scm
index 6e8c6315c..f09f05754 100644
--- a/module/system/vm/disassembler.scm
+++ b/module/system/vm/disassembler.scm
@@ -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)
diff --git a/module/system/vm/objcode.scm b/module/system/vm/loader.scm
index ba4ba53e7..186bcc3c9 100644
--- a/module/system/vm/objcode.scm
+++ b/module/system/vm/loader.scm
@@ -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")
diff --git a/test-suite/tests/compiler.test b/test-suite/tests/compiler.test
index ee202b637..70213ca3d 100644
--- a/test-suite/tests/compiler.test
+++ b/test-suite/tests/compiler.test
@@ -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
diff --git a/test-suite/tests/dwarf.test b/test-suite/tests/dwarf.test
index 0c43d614a..c6deaee51 100644
--- a/test-suite/tests/dwarf.test
+++ b/test-suite/tests/dwarf.test
@@ -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
diff --git a/test-suite/tests/rtl-compilation.test b/test-suite/tests/rtl-compilation.test
index d5cd81a17..f461533c4 100644
--- a/test-suite/tests/rtl-compilation.test
+++ b/test-suite/tests/rtl-compilation.test
@@ -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
diff --git a/test-suite/tests/rtl.test b/test-suite/tests/rtl.test
index e900d3414..713667a33 100644
--- a/test-suite/tests/rtl.test
+++ b/test-suite/tests/rtl.test
@@ -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))