From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Brian Leung via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#43895: [PATCH] Native-comp: copy-edits Date: Sat, 10 Oct 2020 01:03:02 +0200 (CEST) Message-ID: <1087007147.138338.1602284582816@ichabod.co-bxl> Reply-To: Brian Leung , Brian Leung Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_138324_1892191319.1602284573277" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2259"; mail-complaints-to="usenet@ciao.gmane.io" To: 43895@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 10 01:04:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kR1Qq-0000S7-2J for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Oct 2020 01:04:12 +0200 Original-Received: from localhost ([::1]:38830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kR1Qp-0003MD-09 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 09 Oct 2020 19:04:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kR1Qi-0003Lt-3X for bug-gnu-emacs@gnu.org; Fri, 09 Oct 2020 19:04:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kR1Qg-0002QX-Rz for bug-gnu-emacs@gnu.org; Fri, 09 Oct 2020 19:04:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kR1Qg-00040k-N5 for bug-gnu-emacs@gnu.org; Fri, 09 Oct 2020 19:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Brian Leung Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Oct 2020 23:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43895 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160228459415360 (code B ref -1); Fri, 09 Oct 2020 23:04:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Oct 2020 23:03:14 +0000 Original-Received: from localhost ([127.0.0.1]:36561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kR1Pt-0003zf-AL for submit@debbugs.gnu.org; Fri, 09 Oct 2020 19:03:13 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:55828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kR1Pr-0003zY-Nz for submit@debbugs.gnu.org; Fri, 09 Oct 2020 19:03:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kR1Pr-0003JK-HP for bug-gnu-emacs@gnu.org; Fri, 09 Oct 2020 19:03:11 -0400 Original-Received: from wilbur.contactoffice.com ([212.3.242.68]:40204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kR1Po-0002Nc-Ia for bug-gnu-emacs@gnu.org; Fri, 09 Oct 2020 19:03:11 -0400 Original-Received: from ichabod.co-bxl (ichabod.co-bxl [10.2.0.36]) by wilbur.contactoffice.com (Postfix) with ESMTP id EFCC2845 for ; Sat, 10 Oct 2020 01:03:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailfence.com; s=20160819-nLV10XS2; t=1602284585; bh=nRImFIk7GPRlQTWSE1Kfwrcn0TfmV7s5hkl0Uw6+ebE=; h=Date:To:Subject:Reply-To:From:From; b=gOnCbWv/u8k5Y25q7sPKzq6LJNA36m1l8f4FrPngavOot3SuwV14lW977YSqkm6rf VHBygkCVUgoZsty6X7kcW6JQmvz0EvA/YPGB3fKflDYvUMnlWkkUzHZnn7z2bOmue4 h+niew6lmmUUIYAI0NQFI0qLbBnZwgjWcaNzDgXZfi98ySAj3rSIqZiMkBR8bbutxD kLO6pcwnYjj2klC5nxxjRdIJYR0AeB2WtmyXPSAG+C7J5b/A8nD98TJxOSbw2ctUVZ 22gc+RHH/F7ZwyR2pGW7C1XIRb30O87FzjeoxcLunGezjhaXngzUN6peN4i/NZ1H1/ 1qppsrBkONbdw== X-Priority: 3 X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:225491745 Received-SPF: pass client-ip=212.3.242.68; envelope-from=leungbk@mailfence.com; helo=wilbur.contactoffice.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/09 17:44:56 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:190183 Archived-At: ------=_Part_138324_1892191319.1602284573277 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable See attached. --=C2=A0 Sent with https://mailfence.com Secure and private email ------=_Part_138324_1892191319.1602284573277 Content-Type: text/x-diff; charset=utf-8; name=0001-Copy-edits-for-comp.el-and-comp.c.patch Content-Transfer-Encoding: quoted-printable Content-Description: File Attachment: 0001-Copy-edits-for-comp.el-and-comp.c.patch Content-Disposition: attachment; filename=0001-Copy-edits-for-comp.el-and-comp.c.patch >From a6ea6030c0bbbbebb6630c19525d051fc5dafe78 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Fri, 9 Oct 2020 16:00:00 -0700 Subject: [PATCH] ; Copy-edits for comp.el and comp.c --- lisp/emacs-lisp/comp.el | 50 ++++++++++++++++++++--------------------- src/comp.c | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 763d44a23e..eda3d15178 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -222,7 +222,7 @@ comp-limple-calls "Limple operators use to call subrs.") =20 (define-error 'native-compiler-error-dyn-func - "can't native compile a non lexical scoped function" + "can't native compile a non-lexically-scoped function" 'native-compiler-error) (define-error 'native-compiler-error-empty-byte "empty byte compiler output" @@ -355,7 +355,7 @@ comp-gen-counter (c-name nil :type string :documentation "The function name in the native world.") (byte-func nil - :documentation "Byte compiled version.") + :documentation "Byte-compiled version.") (doc nil :type string :documentation "Doc string.") (int-spec nil :type list @@ -388,12 +388,12 @@ comp-gen-counter :documentation "t if pure nil otherwise.")) =20 (cl-defstruct (comp-func-l (:include comp-func)) - "Lexical scoped function." + "Lexically-scoped function." (args nil :type comp-args-base :documentation "Argument specification of the function")) =20 (cl-defstruct (comp-func-d (:include comp-func)) - "Dynamic scoped function." + "Dynamically-scoped function." (lambda-list nil :type list :documentation "Original lambda-list.")) =20 @@ -419,8 +419,8 @@ comp-func =0C =20 (defun comp-ensure-native-compiler () - "Make sure Emacs has native compiler support and libgccjit is laodable. -Raise and error otherwise. + "Make sure Emacs has native compiler support and libgccjit is loadable. +Raise an error otherwise. To be used by all entry points." (cond ((null (boundp 'comp-ctxt)) @@ -445,11 +445,11 @@ comp-limple-insn-call-p (comp-call-op-p (car-safe insn))) =20 (defsubst comp-type-hint-p (func) - "Type hint predicate for function name FUNC." + "Type-hint predicate for function name FUNC." (when (memq func comp-type-hints) t)) =20 (defun comp-func-unique-in-cu-p (func) - "Return t if FUNC is know to be unique in the current compilation unit." + "Return t if FUNC is known to be unique in the current compilation unit.= " (if (symbolp func) (cl-loop with h =3D (make-hash-table :test #'eq) for f being the hash-value in (comp-ctxt-funcs-h comp-ctxt) @@ -473,8 +473,8 @@ comp-function-pure-p (comp-func-pure func)))) =20 (defsubst comp-alloc-class-to-container (alloc-class) - "Given ALLOC-CLASS return the data container for the current context. -Assume allocaiton class 'd-default as default." + "Given ALLOC-CLASS, return the data container for the current context. +Assume allocation class 'd-default as default." (cl-struct-slot-value 'comp-ctxt (or alloc-class 'd-default) comp-ctxt)) =20 (defsubst comp-add-const-to-relocs (obj) @@ -500,7 +500,7 @@ comp-limple-lock-keywords "Highlights used by comp-limple-mode.") =20 (define-derived-mode comp-limple-mode fundamental-mode "LIMPLE" - "Syntax highlight LIMPLE IR." + "Syntax-highlight LIMPLE IR." (setf font-lock-defaults '(comp-limple-lock-keywords))) =20 (cl-defun comp-log (data &optional (level 1)) @@ -571,7 +571,7 @@ comp-log-edges =0C =20 (defmacro comp-loop-insn-in-block (basic-block &rest body) - "Loop over all insns in BASIC-BLOCK executning BODY. + "Loop over all insns in BASIC-BLOCK executing BODY. Inside BODY `insn' can be used to read or set the current instruction." (declare (debug (form body)) @@ -584,7 +584,7 @@ comp-loop-insn-in-block ;;; spill-lap pass specific code. =20 (defsubst comp-lex-byte-func-p (f) - "Return t if F is a lexical scoped byte compiled function." + "Return t if F is a lexically-scoped byte compiled function." (and (byte-code-function-p f) (fixnump (aref f 0)))) =20 @@ -598,11 +598,11 @@ comp-spill-speed (or (comp-spill-decl-spec function-name 'speed) comp-speed)) =20 -;; Autoloaded as might by used by `disassemble-internal'. +;; Autoloaded as might be used by `disassemble-internal'. ;;;###autoload (defun comp-c-func-name (name prefix &optional first) - "Given NAME return a name suitable for the native code. -Add PREFIX in front of it. If FIRST is not nil pick the first + "Given NAME, return a name suitable for the native code. +Add PREFIX in front of it. If FIRST is not nil, pick the first available name ignoring compilation context and potential name clashes." ;; Unfortunatelly not all symbol names are valid as C function names... @@ -633,7 +633,7 @@ comp-c-func-name (concat prefix crypted "_" human-readable "_0")))) =20 (defun comp-decrypt-arg-list (x function-name) - "Decript argument list X for FUNCTION-NAME." + "Decrypt argument list X for FUNCTION-NAME." (unless (fixnump x) (signal 'native-compiler-error-dyn-func function-name)) (let ((rest (not (=3D (logand x 128) 0))) @@ -659,10 +659,10 @@ comp-add-func-to-ctxt (puthash c-name func (comp-ctxt-funcs-h comp-ctxt)))) =20 (cl-defgeneric comp-spill-lap-function (input) - "Byte compile INPUT and spill lap for further stages.") + "Byte-compile INPUT and spill lap for further stages.") =20 (cl-defmethod comp-spill-lap-function ((function-name symbol)) - "Byte compile FUNCTION-NAME spilling data from the byte compiler." + "Byte-compile FUNCTION-NAME spilling data from the byte compiler." (let* ((f (symbol-function function-name)) (c-name (comp-c-func-name function-name "F")) (func (make-comp-func-l :name function-name @@ -697,7 +697,7 @@ comp-spill-lap-function (comp-add-func-to-ctxt func)))) =20 (defun comp-intern-func-in-ctxt (_ obj) - "Given OBJ of type `byte-to-native-lambda' create a function in `comp-ct= xt'." + "Given OBJ of type `byte-to-native-lambda', create a function in `comp-c= txt'." (when-let ((byte-func (byte-to-native-lambda-byte-func obj))) (let* ((lap (byte-to-native-lambda-lap obj)) (top-l-form (cl-loop @@ -737,7 +737,7 @@ comp-intern-func-in-ctxt (comp-log lap 1)))) =20 (cl-defmethod comp-spill-lap-function ((filename string)) - "Byte compile FILENAME spilling data from the byte compiler." + "Byte-compile FILENAME spilling data from the byte compiler." (byte-compile-file filename) (unless byte-to-native-top-level-forms (signal 'native-compiler-error-empty-byte filename)) @@ -760,7 +760,7 @@ comp-spill-lap-function (maphash #'comp-intern-func-in-ctxt byte-to-native-lambdas-h)) =20 (defun comp-spill-lap (input) - "Byte compile and spill the LAP representation for INPUT. + "Byte-compile and spill the LAP representation for INPUT. If INPUT is a symbol this is the function-name to be compiled. If INPUT is a string this is the file path to be compiled." (let ((byte-native-compiling t) @@ -993,7 +993,7 @@ comp-emit-cond-jump bb))) =20 (defun comp-emit-handler (lap-label handler-type) - "Emit a non local exit handler to LAP-LABEL of type HANDLER-TYPE." + "Emit a nonlocal-exit handler to LAP-LABEL of type HANDLER-TYPE." (cl-destructuring-bind (label-num . label-sp) lap-label (cl-assert (=3D (- label-sp 2) (comp-sp))) (setf (comp-func-has-non-local comp-func) t) @@ -1405,10 +1405,10 @@ comp-limplify-finalize-function func) =20 (cl-defgeneric comp-prepare-args-for-top-level (function) - "Given FUNCTION return the two args arguments for comp--register-...") + "Given FUNCTION, return the two args arguments for comp--register-...") =20 (cl-defmethod comp-prepare-args-for-top-level ((function comp-func-l)) - "Lexical scoped FUNCTION." + "Lexically-scoped FUNCTION." (let ((args (comp-func-l-args function))) (cons (make-comp-mvar :constant (comp-args-base-min args)) (make-comp-mvar :constant (if (comp-args-p args) diff --git a/src/comp.c b/src/comp.c index 1b96bffeb8..13343de3d8 100644 --- a/src/comp.c +++ b/src/comp.c @@ -4124,7 +4124,7 @@ DEFUN ("comp-el-to-eln-filename", Fcomp_el_to_eln_fil= ename, =09} if (NILP (base_dir)) =09error ("Cannot find suitable directory for output in " -=09 "`comp-native-laod-path'."); +=09 "`comp-native-load-path'."); } =20 if (!file_name_absolute_p (SSDATA (base_dir))) --=20 2.28.0 ------=_Part_138324_1892191319.1602284573277--