emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/comp-static-data 6bf897449b6 09/16: src/comp.c: Disable native c


From: Vibhav Pant
Subject: scratch/comp-static-data 6bf897449b6 09/16: src/comp.c: Disable native compiling certain bytecode forms for now.
Date: Thu, 19 Jan 2023 12:44:46 -0500 (EST)

branch: scratch/comp-static-data
commit 6bf897449b606444d06310b09fe663acacd086c3
Author: Vibhav Pant <vibhavp@gmail.com>
Commit: Vibhav Pant <vibhavp@gmail.com>

    src/comp.c: Disable native compiling certain bytecode forms for now.
    
    * src/comp.c (emit_comp_lisp_obj): Compiling bytecode forms as
    Lisp_Subrs currently results in errors compiling files that might
    references a bytecode form that was returned by a function residing in
    another file, so disable it.
---
 src/comp.c | 44 +++++++++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 19 deletions(-)

diff --git a/src/comp.c b/src/comp.c
index c789530b2f0..90ba0382a8b 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -3009,25 +3009,31 @@ emit_comp_lisp_obj (Lisp_Object obj,
                              .expr_type = COMP_LISP_CONST_SELF_REPR };
   else
     {
-      Lisp_Object func =
-       Fgethash (obj,
-                 CALL1I (comp-ctxt-byte-func-to-func-h, Vcomp_ctxt),
-                 Qnil);
-      if (!NILP (func))
-       {
-         gcc_jit_lvalue *subr_var = emit_lisp_data_var (
-           comp.aligned_lisp_subr_pvec_type,
-           GCC_JIT_GLOBAL_INTERNAL);
-         comp.lambda_init_lvals
-           = Fcons (CALLN (Fvector, make_mint_ptr (subr_var), func),
-                    comp.lambda_init_lvals);
-         expr.const_expr_p = false;
-         expr.expr_type = COMP_LISP_CONST_VAR;
-         expr.expr.lisp_obj = emit_make_lisp_ptr (
-           gcc_jit_lvalue_get_address (subr_var, NULL),
-           Lisp_Vectorlike);
-       }
-      else if (STRINGP (obj) && XSTRING (obj)->u.s.intervals == NULL)
+      /* Compiling bytecode forms as Lisp_Subrs currently results in
+       errors compiling files that might references a bytecode form
+       that was returned by a function residing in another file, so
+       it's disabled for now.  */
+      /* Lisp_Object func = */
+      /*       Fgethash (obj, */
+      /*                 CALL1I (comp-ctxt-byte-func-to-func-h,
+       * Vcomp_ctxt), */
+      /*                 Qnil); */
+      /* if (!NILP (func)) */
+      /*       { */
+      /*         gcc_jit_lvalue *subr_var = emit_lisp_data_var ( */
+      /*           comp.aligned_lisp_subr_pvec_type, */
+      /*           GCC_JIT_GLOBAL_INTERNAL); */
+      /*         comp.lambda_init_lvals */
+      /*           = Fcons (CALLN (Fvector, make_mint_ptr (subr_var),
+       * func), */
+      /*                    comp.lambda_init_lvals); */
+      /*         expr.const_expr_p = false; */
+      /*         expr.expr_type = COMP_LISP_CONST_VAR; */
+      /*         expr.expr.lisp_obj = emit_make_lisp_ptr ( */
+      /*           gcc_jit_lvalue_get_address (subr_var, NULL), */
+      /*           Lisp_Vectorlike); */
+      /*       } */
+      if (STRINGP (obj) && XSTRING (obj)->u.s.intervals == NULL)
        {
          gcc_jit_rvalue *lisp_string
            = emit_lisp_string_constructor_rval (obj);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]