From ee76182976c0f5e45ab7e2adb792bf016fde07f2 Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 1 Jun 2024 10:30:48 -0700 Subject: Update: instr fetcher to output to src/raw-instrs.lisp --- fetch-wasm-instrs.lisp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'fetch-wasm-instrs.lisp') diff --git a/fetch-wasm-instrs.lisp b/fetch-wasm-instrs.lisp index 4735214..677f857 100644 --- a/fetch-wasm-instrs.lisp +++ b/fetch-wasm-instrs.lisp @@ -94,14 +94,24 @@ :when instr :collect (make-instr instr code type)))) -(format t "Fetching all instructions from~% ~a~%" +) +(format t "Fetching all instructions from~% ~a~%" + +source-url+) (let ((instrs (get-all-instructions))) - (format t "Writing to disk in ./instrs.sexp~%") - (with-open-file (out "instrs.sexp" + (format t "Writing to disk in ./src/raw-instrs.lisp~%") + (with-open-file (out "src/raw-instrs.lisp" :direction :output :if-exists :supersede :if-does-not-exist :create) - (write instrs :stream out))) + (princ " +(defpackage #:sarcasm.raw-instrs + (:use :cl) + (:export #:raw-instrs)) + +(in-package #:sarcasm.raw-instrs) +(defparameter raw-instrs + '" out) + (write instrs :stream out) + (princ ")" out))) (format t "DONE~%") (uiop:quit) -- cgit v1.2.3