From 54df62eac7ed07e3ba108adfa326eb5eb497a1ad Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Sat, 19 Mar 2016 12:29:39 -0400 Subject: [PATCH] Change some (MAKE-NULL-LEXENV) to NIL. They're equivalent for PARSE-ALIEN-TYPE. --- src/compiler/mips/c-call.lisp | 2 +- src/compiler/ppc/c-call.lisp | 25 ++++++++++--------------- src/compiler/sparc/c-call.lisp | 22 +++++++++++----------- 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/src/compiler/mips/c-call.lisp b/src/compiler/mips/c-call.lisp index 4392d6ab3..4e7eeb390 100644 --- a/src/compiler/mips/c-call.lisp +++ b/src/compiler/mips/c-call.lisp @@ -309,7 +309,7 @@ ;; twiddling to determine how much alignment we need. Why, oh why ;; can't we have something like the :ARG-TN methods for all of this ;; mess? -- AB, 2015-Nov-02 - (let* ((parsed-type (sb!alien::parse-alien-type type (make-null-lexenv))) + (let* ((parsed-type (parse-alien-type type nil)) (alignment-bits (sb!alien::alien-type-alignment parsed-type)) (alignment-bytes (truncate alignment-bits n-byte-bits)) ;; OFFSET is at least 32-bit aligned, we're trying to pick diff --git a/src/compiler/ppc/c-call.lisp b/src/compiler/ppc/c-call.lisp index 43269e9d0..ddb38ffc3 100644 --- a/src/compiler/ppc/c-call.lisp +++ b/src/compiler/ppc/c-call.lisp @@ -248,8 +248,7 @@ (incf stack)) (new-args 0) (new-arg-types (parse-alien-type - '(unsigned 32) - (make-null-lexenv)))) + '(unsigned 32) nil))) (if (< gprs 8) (incf gprs 2) (incf stack 2)) @@ -257,14 +256,11 @@ (new-args `(logand ,arg #xffffffff)) (if (alien-integer-type-signed type) (new-arg-types (parse-alien-type - '(signed 32) - (make-null-lexenv))) + '(signed 32) nil)) (new-arg-types (parse-alien-type - '(unsigned 32) - (make-null-lexenv)))) + '(unsigned 32) nil))) (new-arg-types (parse-alien-type - '(unsigned 32) - (make-null-lexenv)))) + '(unsigned 32) nil))) ((alien-single-float-type-p type) (if (< fprs 8) (incf fprs) @@ -293,7 +289,7 @@ (if (alien-integer-type-signed result-type) '(values (signed 32) (unsigned 32)) '(values (unsigned 32) (unsigned 32))) - (make-null-lexenv))))) + nil)))) `(lambda (function type ,@(lambda-vars)) (declare (ignore type)) (multiple-value-bind (high low) @@ -340,9 +336,9 @@ (new-args `(ash ,arg -32)) (new-args `(logand ,arg #xffffffff)) (if (alien-integer-type-signed type) - (new-arg-types (parse-alien-type '(signed 32) (make-null-lexenv))) - (new-arg-types (parse-alien-type '(unsigned 32) (make-null-lexenv)))) - (new-arg-types (parse-alien-type '(unsigned 32) (make-null-lexenv)))) + (new-arg-types (parse-alien-type '(signed 32) nil)) + (new-arg-types (parse-alien-type '(unsigned 32) nil))) + (new-arg-types (parse-alien-type '(unsigned 32) nil))) (t (new-args arg) (new-arg-types type))))) @@ -354,7 +350,7 @@ (if (alien-integer-type-signed result-type) '(values (signed 32) (unsigned 32)) '(values (unsigned 32) (unsigned 32))) - (make-null-lexenv))))) + nil)))) `(lambda (function type ,@(lambda-vars)) (declare (ignore type)) (multiple-value-bind (high low) @@ -462,8 +458,7 @@ #-sb-xc-host (progn (defun alien-callback-accessor-form (type sap offset) - (let ((parsed-type - (sb!alien::parse-alien-type type (make-null-lexenv)))) + (let ((parsed-type (parse-alien-type type nil))) (cond ((sb!alien::alien-integer-type-p parsed-type) ;; Unaligned access is slower, but possible, so this is nice and ;; simple. Also, we're a big-endian machine, so we need to get diff --git a/src/compiler/sparc/c-call.lisp b/src/compiler/sparc/c-call.lisp index 5e0aa6370..09dc7e8dc 100644 --- a/src/compiler/sparc/c-call.lisp +++ b/src/compiler/sparc/c-call.lisp @@ -131,27 +131,27 @@ (new-args `(ash ,arg -32)) (new-args `(logand ,arg #xffffffff)) (if (alien-integer-type-signed type) - (new-arg-types (parse-alien-type '(signed 32) (make-null-lexenv))) - (new-arg-types (parse-alien-type '(unsigned 32) (make-null-lexenv)))) - (new-arg-types (parse-alien-type '(unsigned 32) (make-null-lexenv)))) + (new-arg-types (parse-alien-type '(signed 32) nil)) + (new-arg-types (parse-alien-type '(unsigned 32) nil))) + (new-arg-types (parse-alien-type '(unsigned 32) nil))) ((alien-single-float-type-p type) (new-args `(single-float-bits ,arg)) - (new-arg-types (parse-alien-type '(signed 32) (make-null-lexenv)))) + (new-arg-types (parse-alien-type '(signed 32) nil))) ((alien-double-float-type-p type) (new-args `(double-float-high-bits ,arg)) (new-args `(double-float-low-bits ,arg)) - (new-arg-types (parse-alien-type '(signed 32) (make-null-lexenv))) - (new-arg-types (parse-alien-type '(unsigned 32) (make-null-lexenv)))) + (new-arg-types (parse-alien-type '(signed 32) nil)) + (new-arg-types (parse-alien-type '(unsigned 32) nil))) #!+long-float ((alien-long-float-type-p type) (new-args `(long-float-exp-bits ,arg)) (new-args `(long-float-high-bits ,arg)) (new-args `(long-float-mid-bits ,arg)) (new-args `(long-float-low-bits ,arg)) - (new-arg-types (parse-alien-type '(signed 32) (make-null-lexenv))) - (new-arg-types (parse-alien-type '(unsigned 32) (make-null-lexenv))) - (new-arg-types (parse-alien-type '(unsigned 32) (make-null-lexenv))) - (new-arg-types (parse-alien-type '(unsigned 32) (make-null-lexenv)))) + (new-arg-types (parse-alien-type '(signed 32) nil)) + (new-arg-types (parse-alien-type '(unsigned 32) nil)) + (new-arg-types (parse-alien-type '(unsigned 32) nil)) + (new-arg-types (parse-alien-type '(unsigned 32) nil))) (t (new-args arg) (new-arg-types type))))) @@ -163,7 +163,7 @@ (if (alien-integer-type-signed result-type) '(values (signed 32) (unsigned 32)) '(values (unsigned 32) (unsigned 32))) - (make-null-lexenv))))) + nil)))) `(lambda (function type ,@(lambda-vars)) (declare (ignore type)) (multiple-value-bind (high low) -- 2.11.4.GIT