changeset 32437:fcc5a0b0e564

Fix printing LOAD_CST with wide number There was a problem printing long functions due to WIDE LOAD_CST. * pt-bytecode-vm.cc: Check for WIDE
author Petter T. <petter.vilhelm@gmail.com>
date Fri, 27 Oct 2023 18:19:14 +0200
parents 2922ecf94062
children a7a769c02a27
files libinterp/parse-tree/pt-bytecode-vm.cc
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-bytecode-vm.cc	Fri Oct 27 18:19:05 2023 +0200
+++ b/libinterp/parse-tree/pt-bytecode-vm.cc	Fri Oct 27 18:19:14 2023 +0200
@@ -145,9 +145,19 @@
   CASE_END ()             \
 
 #define PCHAR() \
-    {p++;                               \
-    CHECK_END ();                       \
-    s += " " + std::to_string (*p);}
+    {\
+      if (wide_opext_active)                  \
+        {                                     \
+          wide_opext_active = false;          \
+          PSHORT()                            \
+        }                                     \
+      else                                    \
+        {                                     \
+          p++;                                \
+          CHECK_END ();                       \
+          s += " " + std::to_string (*p);     \
+        }\
+    }
 
 #define PCHAR_AS_CHAR() \
     {p++;                                     \