summaryrefslogtreecommitdiff
path: root/module/system/vm/load.scm
diff options
context:
space:
mode:
Diffstat (limited to 'module/system/vm/load.scm')
-rw-r--r--module/system/vm/load.scm60
1 files changed, 0 insertions, 60 deletions
diff --git a/module/system/vm/load.scm b/module/system/vm/load.scm
deleted file mode 100644
index d440854fb..000000000
--- a/module/system/vm/load.scm
+++ /dev/null
@@ -1,60 +0,0 @@
-;;; Guile VM compiling loader
-
-;; Copyright (C) 2001 Free Software Foundation, Inc.
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING. If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Code:
-
-(define-module (system vm load)
- :autoload (system base compile) (compile-file)
- :use-module (system vm core)
- :use-module (ice-9 regex)
- :export (load-compiled-file compile-and-load load/compile))
-
-(define (load-compiled-file file . opts)
- (vm-load (the-vm) (load-dumpcode file)))
-
-(define (compile-and-load file . opts)
- (let ((comp (object-file-name file)))
- (if (or (not (file-exists? comp))
- (> (stat:mtime (stat file)) (stat:mtime (stat comp))))
- (compile-file file))
- (load-compiled-file comp)))
-
-(define (load/compile file . opts)
- (let* ((file (file-full-name file))
- (compiled (object-file-name file)))
- (if (or (not (file-exists? compiled))
- (> (stat:mtime (stat file)) (stat:mtime (stat compiled))))
- (apply compile-file file #f opts))
- (if (memq #:b opts)
- (apply vm-trace (the-vm) (load-dumpcode compiled) opts)
- (vm-load (the-vm) (load-dumpcode compiled)))))
-
-(define (file-full-name filename)
- (let* ((port (current-load-port))
- (oldname (and port (port-filename port))))
- (if (and oldname
- (> (string-length filename) 0)
- (not (char=? (string-ref filename 0) #\/))
- (not (string=? (dirname oldname) ".")))
- (string-append (dirname oldname) "/" filename)
- filename)))
-
-(define-public (object-file-name file)
- (let ((m (string-match "\\.[^.]*$" file)))
- (string-append (if m (match:prefix m) file) ".go")))