[前][次][番号順一覧][スレッド一覧]

ruby-changes:68857

From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:14:57 +0900 (JST)
Subject: [ruby-changes:68857] c5f3126428 (master): Commit WIP

https://git.ruby-lang.org/ruby.git/commit/?id=c5f3126428

From c5f31264287a1c587448e9a437603da1b8497e67 Mon Sep 17 00:00:00 2001
From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...>
Date: Tue, 30 Mar 2021 15:37:20 -0400
Subject: Commit WIP

---
 yjit_core.h | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/yjit_core.h b/yjit_core.h
index 5a407bf37a..3a937e198c 100644
--- a/yjit_core.h
+++ b/yjit_core.h
@@ -20,10 +20,12 @@ https://github.com/ruby/ruby/blob/trunk/yjit_core.h#L20
 // Maximum number of temp value types we keep track of
 #define MAX_TEMP_TYPES 8
 
+// Maximum number of local variable types we keep track of
+#define MAX_LOCAL_TYPES 8
+
 // Default versioning context (no type information)
 #define DEFAULT_CTX ( (ctx_t){ 0 } )
 
-
 /**
 Represent the type of a value (local/stack/self) in YJIT
 */
@@ -38,11 +40,10 @@ typedef struct yjit_val_type https://github.com/ruby/ruby/blob/trunk/yjit_core.h#L40
     // NOTE: we could switch this to an enum,
     // but then we also need a value for "unknown type"
     uint8_t is_fixnum : 1;
-    uint8_t is_bool : 1;        // is this useful?
-    uint8_t is_array : 1;       // for opt_aref
-    uint8_t is_hash : 1;        // for opt_aref
-    uint8_t is_symbol : 1;
-    uint8_t is_string : 1;
+    //uint8_t is_array : 1;       // for opt_aref
+    //uint8_t is_hash : 1;        // for opt_aref
+    //uint8_t is_symbol : 1;
+    //uint8_t is_string : 1;
 
 } val_type_t;
 STATIC_ASSERT(val_type_size, sizeof(val_type_t) == 1);
@@ -63,7 +64,7 @@ typedef enum yjit_temp_loc https://github.com/ruby/ruby/blob/trunk/yjit_core.h#L64
 {
     TEMP_STACK = 0,
     TEMP_SELF,
-    TEMP_LOCAL, // Local with index
+    //TEMP_LOCAL, // Local with index
     //TEMP_CONST, // Small constant
 
 } temp_loc_t;
@@ -74,7 +75,7 @@ typedef struct yjit_temp_mapping https://github.com/ruby/ruby/blob/trunk/yjit_core.h#L75
     uint8_t kind: 2;
 
     // Index of the local variale,
-    // or small non-negative constant
+    // or small non-negative constant in [0, 63]
     uint8_t idx : 6;
 
 } temp_mapping_t;
@@ -113,9 +114,21 @@ typedef struct yjit_context https://github.com/ruby/ruby/blob/trunk/yjit_core.h#L114
     // This represents how far the JIT's SP is from the "real" SP
     int16_t sp_offset;
 
+
+
+
+
+
+    // FIXME: no longer need this bit after type mapping refactoring
     // Whether we know self is a heap object
     bool self_is_object : 1;
 
+
+
+
+
+
+
 } ctx_t;
 
 // Tuple of (iseq, idx) used to idenfity basic blocks
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]