aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/boot/translator.boot11
-rw-r--r--src/interp/cparse.boot12
2 files changed, 13 insertions, 10 deletions
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index b98f3b30..f44fee4c 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.boot
@@ -1,6 +1,6 @@
-- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd.
-- All rights reserved.
--- Copyright (C) 2007-2015, Gabriel Dos Reis.
+-- Copyright (C) 2007-2016, Gabriel Dos Reis.
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -40,7 +40,7 @@ import parser
import ast
namespace BOOTTRAN
module translator (evalBootFile, loadNativeModule, loadSystemRuntimeCore,
- string2BootTree, genImportDeclaration, retainFile?)
+ compileBootHandler, string2BootTree, genImportDeclaration, retainFile?)
++ If non nil, holds the name of the current module being translated.
$currentModuleName := nil
@@ -569,10 +569,9 @@ defaultBootToLispFile file ==
strconc(pathBasename file, '".clisp")
getIntermediateLispFile(file,options) ==
- out := NAMESTRING getOutputPathname(options)
- out ~= nil =>
- strconc(shoeRemoveStringIfNec(strconc('".",$faslType),out),'".clisp")
- defaultBootToLispFile file
+ out := getOutputPathname options or return defaultBootToLispFile file
+ strconc(shoeRemoveStringIfNec(strconc('".",$faslType),filePathString out),'".clisp")
+
translateBootFile(progname, options, file) ==
outFile := getOutputPathname options or defaultBootToLispFile file
diff --git a/src/interp/cparse.boot b/src/interp/cparse.boot
index 9e28504d..a98b2ea1 100644
--- a/src/interp/cparse.boot
+++ b/src/interp/cparse.boot
@@ -1102,15 +1102,19 @@ _/RQ_,LIB(:x) ==
$Echo: local := false
_/RF_-1 nil
+readBootFile file ==
+ try
+ fasl := compileBootHandler(nil,nil,file) or return nil
+ LOAD fasl
+ finally
+ fasl = nil => nil
+ removeFile filePathString fasl
_/RF_-1 x ==
ifile := makeInputFilename $editFile
lfile := nil
type := filePathType ifile
- type = '"boot" =>
- lfile := makeFilePath(type <- '"lisp",defaults <- ifile)
- BOOT(ifile,lfile)
- LOAD lfile
+ type = '"boot" => readBootFile ifile
type = '"lisp" => LOAD ifile
type = '"input" => ncINTERPFILE(ifile,$Echo)
SPAD ifile