From 41d4d210e858baeb39cdd72b2b7540324e8c8490 Mon Sep 17 00:00:00 2001 From: David Van Horn Date: Fri, 6 Dec 2024 15:52:31 -0500 Subject: [PATCH] Explicit provides. (#26) Make provides explicit in some langs. --- iniquity-gc/compile-ops.rkt | 2 +- iniquity-gc/compile.rkt | 2 +- mountebank/compile-define.rkt | 5 ++++- mountebank/compile-expr.rkt | 5 ++++- mountebank/compile-ops.rkt | 2 +- mountebank/compile.rkt | 2 +- mug/compile-define.rkt | 5 ++++- mug/compile-expr.rkt | 5 ++++- mug/compile-ops.rkt | 2 +- mug/compile.rkt | 2 +- neerdowell/compile-define.rkt | 5 ++++- neerdowell/compile-expr.rkt | 5 ++++- neerdowell/compile-ops.rkt | 2 +- neerdowell/compile.rkt | 2 +- 14 files changed, 32 insertions(+), 14 deletions(-) diff --git a/iniquity-gc/compile-ops.rkt b/iniquity-gc/compile-ops.rkt index 265e559..23c4b09 100644 --- a/iniquity-gc/compile-ops.rkt +++ b/iniquity-gc/compile-ops.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile-op0 compile-op1 compile-op2 compile-op3 pad-stack unpad-stack allocate) (require "ast.rkt" "types.rkt" a86/ast) (define rax 'rax) ; return diff --git a/iniquity-gc/compile.rkt b/iniquity-gc/compile.rkt index 258e5a6..dc7f318 100644 --- a/iniquity-gc/compile.rkt +++ b/iniquity-gc/compile.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile compile-e) (require "ast.rkt" "types.rkt" "compile-ops.rkt" a86/ast) ;; Registers used diff --git a/mountebank/compile-define.rkt b/mountebank/compile-define.rkt index 354e6f2..64433c1 100644 --- a/mountebank/compile-define.rkt +++ b/mountebank/compile-define.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile-define compile-defines-values define-ids compile-defines) (require "ast.rkt" "types.rkt" "fv.rkt" @@ -7,6 +7,9 @@ "compile-expr.rkt" a86/ast) +(define rax 'rax) +(define rbx 'rbx) + ;; [Listof Defn] -> [Listof Id] (define (define-ids ds) (match ds diff --git a/mountebank/compile-expr.rkt b/mountebank/compile-expr.rkt index ed9bba2..321b45a 100644 --- a/mountebank/compile-expr.rkt +++ b/mountebank/compile-expr.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile-e compile-lambda-defines compile-lambda-define free-vars-to-heap) (require "ast.rkt" "types.rkt" "lambdas.rkt" @@ -14,6 +14,9 @@ (define rbx 'rbx) ; heap (define rsp 'rsp) ; stack (define rdi 'rdi) ; arg +(define r8 'r8) +(define r9 'r9) +(define rsi 'rsi) ;; Expr CEnv Bool -> Asm (define (compile-e e c t?) diff --git a/mountebank/compile-ops.rkt b/mountebank/compile-ops.rkt index 8a52cd4..383059b 100644 --- a/mountebank/compile-ops.rkt +++ b/mountebank/compile-ops.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile-op0 compile-op1 compile-op2 compile-op3 pad-stack unpad-stack assert-proc) (require "ast.rkt" "types.rkt" "utils.rkt" a86/ast) (define rax 'rax) ; return diff --git a/mountebank/compile.rkt b/mountebank/compile.rkt index 7ab2e88..6d0028b 100644 --- a/mountebank/compile.rkt +++ b/mountebank/compile.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile compile-e) (require "ast.rkt" "types.rkt" "lambdas.rkt" diff --git a/mug/compile-define.rkt b/mug/compile-define.rkt index 354e6f2..64433c1 100644 --- a/mug/compile-define.rkt +++ b/mug/compile-define.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile-define compile-defines-values define-ids compile-defines) (require "ast.rkt" "types.rkt" "fv.rkt" @@ -7,6 +7,9 @@ "compile-expr.rkt" a86/ast) +(define rax 'rax) +(define rbx 'rbx) + ;; [Listof Defn] -> [Listof Id] (define (define-ids ds) (match ds diff --git a/mug/compile-expr.rkt b/mug/compile-expr.rkt index 40dee01..135536d 100644 --- a/mug/compile-expr.rkt +++ b/mug/compile-expr.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile-e compile-lambda-defines compile-lambda-define free-vars-to-heap) (require "ast.rkt" "types.rkt" "lambdas.rkt" @@ -13,6 +13,9 @@ (define rbx 'rbx) ; heap (define rsp 'rsp) ; stack (define rdi 'rdi) ; arg +(define r8 'r8) +(define r9 'r9) +(define rsi 'rsi) ;; Expr CEnv Bool -> Asm (define (compile-e e c t?) diff --git a/mug/compile-ops.rkt b/mug/compile-ops.rkt index 8a52cd4..383059b 100644 --- a/mug/compile-ops.rkt +++ b/mug/compile-ops.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile-op0 compile-op1 compile-op2 compile-op3 pad-stack unpad-stack assert-proc) (require "ast.rkt" "types.rkt" "utils.rkt" a86/ast) (define rax 'rax) ; return diff --git a/mug/compile.rkt b/mug/compile.rkt index 7ab2e88..6d0028b 100644 --- a/mug/compile.rkt +++ b/mug/compile.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile compile-e) (require "ast.rkt" "types.rkt" "lambdas.rkt" diff --git a/neerdowell/compile-define.rkt b/neerdowell/compile-define.rkt index 354e6f2..64433c1 100644 --- a/neerdowell/compile-define.rkt +++ b/neerdowell/compile-define.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile-define compile-defines-values define-ids compile-defines) (require "ast.rkt" "types.rkt" "fv.rkt" @@ -7,6 +7,9 @@ "compile-expr.rkt" a86/ast) +(define rax 'rax) +(define rbx 'rbx) + ;; [Listof Defn] -> [Listof Id] (define (define-ids ds) (match ds diff --git a/neerdowell/compile-expr.rkt b/neerdowell/compile-expr.rkt index e54a789..96c8891 100644 --- a/neerdowell/compile-expr.rkt +++ b/neerdowell/compile-expr.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile-e compile-lambda-define compile-lambda-defines free-vars-to-heap) (require "ast.rkt" "types.rkt" "lambdas.rkt" @@ -14,6 +14,9 @@ (define rbx 'rbx) ; heap (define rsp 'rsp) ; stack (define rdi 'rdi) ; arg +(define r8 'r8) +(define r9 'r9) +(define rsi 'rsi) ;; Expr CEnv Bool -> Asm (define (compile-e e c t?) diff --git a/neerdowell/compile-ops.rkt b/neerdowell/compile-ops.rkt index 23386fc..48be511 100644 --- a/neerdowell/compile-ops.rkt +++ b/neerdowell/compile-ops.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile-op pad-stack unpad-stack assert-proc compile-make-struct) (require "ast.rkt" "types.rkt" "utils.rkt" a86/ast) (define rax 'rax) ; return diff --git a/neerdowell/compile.rkt b/neerdowell/compile.rkt index 7ab2e88..6d0028b 100644 --- a/neerdowell/compile.rkt +++ b/neerdowell/compile.rkt @@ -1,5 +1,5 @@ #lang racket -(provide (all-defined-out)) +(provide compile compile-e) (require "ast.rkt" "types.rkt" "lambdas.rkt"