guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 10/24: Remove string-set! VM op


From: Andy Wingo
Subject: [Guile-commits] 10/24: Remove string-set! VM op
Date: Tue, 10 Apr 2018 13:24:14 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit f1fe5219de4a771d50378a9d35770a48dad4f43f
Author: Andy Wingo <address@hidden>
Date:   Tue Apr 10 12:21:23 2018 +0200

    Remove string-set! VM op
    
    * libguile/vm-engine.c (string-set!): Remove now-unused VM op.
---
 libguile/vm-engine.c | 30 +-----------------------------
 1 file changed, 1 insertion(+), 29 deletions(-)

diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c
index 215c334..73b9914 100644
--- a/libguile/vm-engine.c
+++ b/libguile/vm-engine.c
@@ -3074,40 +3074,12 @@ VM_NAME (scm_i_thread *thread, struct scm_vm *vp,
   VM_DEFINE_OP (189, unused_189, NULL, NOP)
   VM_DEFINE_OP (180, unused_190, NULL, NOP)
   VM_DEFINE_OP (191, unused_191, NULL, NOP)
+  VM_DEFINE_OP (192, unused_192, NULL, NOP)
     {
       vm_error_bad_instruction (op);
       abort (); /* never reached */
     }
 
-  /* string-set! dst:8 idx:8 src:8
-   *
-   * Store the character SRC into the string DST at index IDX.
-   */
-  VM_DEFINE_OP (192, unused_192, NULL, NOP)
-    {
-      scm_t_uint8 dst, idx, src;
-      SCM str, chr;
-      scm_t_uint64 c_idx;
-
-      UNPACK_8_8_8 (op, dst, idx, src);
-      str = SP_REF (dst);
-      c_idx = SP_REF_U64 (idx);
-      chr = SP_REF (src);
-
-      VM_VALIDATE_STRING (str, "string-ref");
-      VM_VALIDATE_INDEX (c_idx, scm_i_string_length (str), "string-ref");
-
-      /* If needed we can speed this up and only SYNC_IP +
-         scm_i_string_writing if the string isn't already a non-shared
-         stringbuf.  */
-      SYNC_IP ();
-      scm_i_string_start_writing (str);
-      scm_i_string_set_x (str, c_idx, SCM_CHAR (chr));
-      scm_i_string_stop_writing ();
-
-      NEXT (1);
-    }
-
   VM_DEFINE_OP (193, u64_numerically_equal, "u64=?", OP1 (X8_S12_S12))
     {
       scm_t_uint16 a, b;



reply via email to

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