File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,16 @@ Language changes
70
70
* The line number of function definitions is now added by the parser as an
71
71
additional ` LineNumberNode ` at the start of each function body ([ #35138 ] ).
72
72
73
+ Compiler/Runtime improvements
74
+ -----------------------------
75
+
76
+ * Immutable structs (including tuples) that contain references can now be allocated
77
+ on the stack, and allocated inline within arrays and other structs ([ #33886 ] ).
78
+ This significantly reduces the number of heap allocations in some workloads.
79
+ Code that requires assumptions about object layout and addresses (usually for
80
+ interoperability with C or other languages) might need to be updated; for
81
+ example any object that needs a stable address should be a ` mutable struct ` .
82
+
73
83
Command-line option changes
74
84
---------------------------
75
85
@@ -79,9 +89,6 @@ Command-line option changes
79
89
80
90
* Color now defaults to on when stdout and stderr are TTYs ([ #34347 ] )
81
91
82
- Command-line option changes
83
- ---------------------------
84
-
85
92
* ` -t N ` , ` --threads N ` starts Julia with ` N ` threads. This option takes precedence over
86
93
` JULIA_NUM_THREADS ` . The specified number of threads also propagates to worker
87
94
processes spawned using the ` -p ` /` --procs ` or ` --machine-file ` command line arguments.
Original file line number Diff line number Diff line change @@ -506,11 +506,10 @@ void jl_compute_field_offsets(jl_datatype_t *st)
506
506
// now finish deciding if this instantiation qualifies for special properties
507
507
assert (!isbitstype || st -> layout -> npointers == 0 ); // the definition of isbits
508
508
if (isinlinealloc && st -> layout -> npointers > 0 ) {
509
- //if (st->ninitialized != nfields)
510
- // isinlinealloc = 0;
511
- //else if (st->layout->fielddesc_type != 0) // GC only implements support for this
512
- // isinlinealloc = 0;
513
- isinlinealloc = 0 ;
509
+ if (st -> ninitialized != nfields )
510
+ isinlinealloc = 0 ;
511
+ else if (st -> layout -> fielddesc_type != 0 ) // GC only implements support for this
512
+ isinlinealloc = 0 ;
514
513
}
515
514
st -> isbitstype = isbitstype ;
516
515
st -> isinlinealloc = isinlinealloc ;
You can’t perform that action at this time.
0 commit comments