From 04be6d65c9bae10780f463c23a14922249c187de Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Mon, 1 Feb 2016 01:55:33 -0800 Subject: Support ')read' of Boot file Allow the system command to ')read' a Boot source file: the involves (1) compiling Boot to machine code (2) loading the resulting FASL in the current system Note that if the boot file has any dependency in terms of 'import', one needs to set up the $LoadDirectories appropriately, or else the system will crash. In particular, if you're modifying OpenAxiom source files you need to include the appropriate directories containing OpenAxiom fasl files. --- src/interp/cparse.boot | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/interp') 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 -- cgit v1.2.3