You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/src/devdocs/ast.md
+61-15
Original file line number
Diff line number
Diff line change
@@ -260,7 +260,7 @@ types exist in lowered form:
260
260
261
261
*`CodeInfo`
262
262
263
-
Wraps the IR of a method. Its `code` field is an array of expressions to execute.
263
+
Wraps the IR of a group of statements. Its `code` field is an array of expressions to execute.
264
264
265
265
*`GotoNode`
266
266
@@ -489,7 +489,11 @@ A unique'd container describing the shared metadata for a single method.
489
489
490
490
*`source`
491
491
492
-
The original source code (usually compressed).
492
+
The original source code (if available, usually compressed).
493
+
494
+
*`generator`
495
+
496
+
A callable object which can be executed to get specialized source for a specific method signature.
493
497
494
498
*`roots`
495
499
@@ -500,9 +504,9 @@ A unique'd container describing the shared metadata for a single method.
500
504
501
505
Descriptive bit-fields for the source code of this Method.
502
506
503
-
*`min_world` / `max_world`
507
+
*`primary_world`
504
508
505
-
The range of world ages for which this method is visible to dispatch.
509
+
The world age that "owns" this Method.
506
510
507
511
508
512
### MethodInstance
@@ -527,16 +531,38 @@ for important details on how to modify these fields safely.
527
531
runtime `MethodInstance` from the `MethodTable` cache, this will always be defined and
528
532
indexable.
529
533
530
-
*`rettype`
534
+
*`uninferred`
535
+
536
+
The uncompressed source code for a toplevel thunk. Additionally, for a generated function,
537
+
this is one of many places that the source code might be found.
538
+
539
+
*`backedges`
540
+
541
+
We store the reverse-list of cache dependencies for efficient tracking of incremental reanalysis/recompilation work that may be needed after a new method definitions.
542
+
This works by keeping a list of the other `MethodInstance` that have been inferred or optimized to contain a possible call to this `MethodInstance`.
543
+
Those optimization results might be stored somewhere in the `cache`, or it might have been the result of something we didn't want to cache, such as constant propagation.
544
+
Thus we merge all of those backedges to various cache entries here (there's almost always only the one applicable cache entry with a sentinal value for max_world anyways).
545
+
546
+
*`cache`
547
+
548
+
Cache of `NativeCode` objects that share this template instantiation.
549
+
550
+
### MethodInstance
551
+
552
+
*`def`
553
+
554
+
The `MethodInstance` that this cache entry is derived from.
555
+
556
+
557
+
*`rettype`/`rettype_const`
531
558
532
559
The inferred return type for the `specFunctionObject` field, which (in most cases) is
533
560
also the computed return type for the function in general.
534
561
535
562
*`inferred`
536
563
537
-
May contain a cache of the inferred source for this function, or other information about
538
-
the inference result such as a constant return value may be put here (if `jlcall_api ==
539
-
2`), or it could be set to `nothing` to just indicate `rettype` is inferred.
564
+
May contain a cache of the inferred source for this function,
565
+
or it could be set to `nothing` to just indicate `rettype` is inferred.
540
566
541
567
*`ftpr`
542
568
@@ -548,30 +574,32 @@ for important details on how to modify these fields safely.
0 commit comments