[#61424] [REJECT?] xmalloc/xfree: reduce atomic ops w/ thread-locals — Eric Wong <normalperson@...>

I'm unsure about this. I _hate_ the extra branches this adds;

13 messages 2014/03/12

[ruby-core:61400] first_lineno in rb_iseq_location_t

From: Eric Wong <normalperson@...>
Date: 2014-03-10 10:02:23 UTC
List: ruby-core #61400
Based on rb_iseq_first_lineno() and other usages in iseq.c,
it looks like the following would be more correct:

--- a/vm_core.h
+++ b/vm_core.h
@@ -177,7 +177,7 @@ typedef struct rb_iseq_location_struct {
     const VALUE absolute_path;
     const VALUE base_label;
     const VALUE label;
-    size_t first_lineno;
+    VALUE first_lineno;
 } rb_iseq_location_t;


However, I would like to use uint32_t and move it to the top of
rb_iseq_location_t, so it may be packed with "enum iseq_type" in
rb_iseq_struct.


Also we probably don't need 32-bit integers for arg* fields.
8 bits should be plenty enough, right?

In This Thread

Prev Next