From 87e859e97907ecd0b82921a50746a028fa896114 Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Tue, 13 Nov 1990 22:50:10 +0000 Subject: [PATCH] Pass *backend* to sc-or-lose and friends to assure we extract the info from the correct backend for runtime. --- compiler/checkgen.lisp | 4 ++-- compiler/codegen.lisp | 2 +- compiler/ir2tran.lisp | 11 ++++++----- compiler/ltn.lisp | 3 ++- compiler/pack.lisp | 2 +- compiler/represent.lisp | 5 +++-- compiler/tn.lisp | 4 ++-- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/compiler/checkgen.lisp b/compiler/checkgen.lisp index 3496f1956..fca90aec8 100644 --- a/compiler/checkgen.lisp +++ b/compiler/checkgen.lisp @@ -34,13 +34,13 @@ (defun function-cost (name) (declare (symbol name)) (let ((info (info function info name)) - (call-cost (template-cost (template-or-lose 'call-named)))) + (call-cost (template-cost (template-or-lose 'call-named *backend*)))) (if info (let ((templates (function-info-templates info))) (if templates (template-cost (first templates)) (case name - (null (template-cost (template-or-lose 'if-eq))) + (null (template-cost (template-or-lose 'if-eq *backend*))) (t call-cost)))) call-cost))) diff --git a/compiler/codegen.lisp b/compiler/codegen.lisp index bb3193ddc..f29ff3ed9 100644 --- a/compiler/codegen.lisp +++ b/compiler/codegen.lisp @@ -35,7 +35,7 @@ (defun sb-allocated-size (name) "The size of the Name'd SB in the currently compiled component. Useful mainly for finding the size for allocating stack frames." - (finite-sb-current-size (sb-or-lose name))) + (finite-sb-current-size (sb-or-lose name *backend*))) ;;; Current-NFP-TN -- Interface diff --git a/compiler/ir2tran.lisp b/compiler/ir2tran.lisp index ff085d129..3b32283a0 100644 --- a/compiler/ir2tran.lisp +++ b/compiler/ir2tran.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman (FAHLMAN@CMUC). ;;; ********************************************************************** ;;; -;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir2tran.lisp,v 1.24 1990/11/03 03:14:41 wlott Exp $ +;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir2tran.lisp,v 1.25 1990/11/13 22:49:12 wlott Exp $ ;;; ;;; This file contains the virtual machine independent parts of the code ;;; which does the actual translation of nodes to VOPs. @@ -46,7 +46,7 @@ (primitive-type-check check-ptype) (let ((name (hairy-type-check-template type))) (if name - (template-or-lose name) + (template-or-lose name *backend*) nil))))) @@ -539,7 +539,7 @@ (test-ref (reference-tn (continuation-tn node block test) nil)) (nil-ref (reference-tn (emit-constant nil) nil))) (setf (tn-ref-across test-ref) nil-ref) - (ir2-convert-conditional node block (template-or-lose 'if-eq) + (ir2-convert-conditional node block (template-or-lose 'if-eq *backend*) test-ref () node t))) @@ -898,7 +898,7 @@ (let* ((locs (ir2-continuation-locs 2cont)) (loc (first locs)) (check (continuation-type-check cont)) - (function-ptype (primitive-type-or-lose 'function))) + (function-ptype (primitive-type-or-lose 'function *backend*))) (assert (and (eq (ir2-continuation-kind 2cont) :fixed) (= (length locs) 1))) (cond ((eq (tn-primitive-type loc) function-ptype) @@ -1433,7 +1433,8 @@ (let* ((2info (nlx-info-info info)) (kind (cleanup-kind (nlx-info-cleanup info))) (block-tn (environment-live-tn - (make-normal-tn (primitive-type-or-lose 'catch-block)) + (make-normal-tn (primitive-type-or-lose 'catch-block + *backend*)) (node-environment node))) (res (make-stack-pointer-tn)) (target-label (ir2-nlx-info-target 2info))) diff --git a/compiler/ltn.lisp b/compiler/ltn.lisp index 3dd20960f..f44555ed3 100644 --- a/compiler/ltn.lisp +++ b/compiler/ltn.lisp @@ -751,7 +751,8 @@ (let ((safe-p (policy-safe-p policy)) (verbose-p (policy call (= brevity 0))) (max-cost (- (template-cost (or template - (template-or-lose 'call-named))) + (template-or-lose 'call-named + *backend*))) *efficency-note-cost-threshold*))) (dolist (try (function-info-templates (basic-combination-kind call))) (when (> (template-cost try) max-cost) (return)) diff --git a/compiler/pack.lisp b/compiler/pack.lisp index b0beaebc9..c15db72e4 100644 --- a/compiler/pack.lisp +++ b/compiler/pack.lisp @@ -430,7 +430,7 @@ (declare (type node node) (type ir2-block block) (type tn src dest) (type (or vop null) before)) (emit-load-template node block - (template-or-lose 'move-operand) + (template-or-lose 'move-operand *backend*) src dest (list (or (svref (sc-move-functions (tn-sc dest)) (sc-number (tn-sc src))) diff --git a/compiler/represent.lisp b/compiler/represent.lisp index 1fcc120e0..6a902f232 100644 --- a/compiler/represent.lisp +++ b/compiler/represent.lisp @@ -53,7 +53,8 @@ nil nil)) (when (eq refs ref) - (let ((parse (vop-parse-or-lose (vop-info-name info)))) + (let ((parse (vop-parse-or-lose (vop-info-name info) + *backend*))) (multiple-value-bind (ccosts cscs) (compute-loading-costs @@ -533,7 +534,7 @@ (tn-primitive-type nfp-tn))))) (emit-context-template node block - (template-or-lose 'compute-old-nfp) + (template-or-lose 'compute-old-nfp *backend*) nfp-tn vop) (assert (not (sc-number-stack-p (tn-sc nfp-tn)))) nfp-tn))) diff --git a/compiler/tn.lisp b/compiler/tn.lisp index 90e33dbb9..bea420de1 100644 --- a/compiler/tn.lisp +++ b/compiler/tn.lisp @@ -203,7 +203,7 @@ (let* ((component (component-info *compile-component*)) (immed (immediate-constant-sc (constant-value constant))) (sc (svref (backend-sc-numbers *backend*) - (or immed (sc-number-or-lose 'constant)))) + (or immed (sc-number-or-lose 'constant *backend*)))) (res (make-tn 0 :constant (primitive-type (leaf-type constant)) sc))) (unless immed (let ((constants (ir2-component-constants component))) @@ -240,7 +240,7 @@ (let* ((component (component-info *compile-component*)) (res (make-tn 0 :constant (backend-any-primitive-type *backend*) (svref (backend-sc-numbers *backend*) - (sc-number-or-lose 'constant)))) + (sc-number-or-lose 'constant *backend*)))) (constants (ir2-component-constants component))) (do ((i 0 (1+ i))) -- GitLab