Skip to content

Commit dba9cae

Browse files
committed
Comments.
1 parent 1b67fbd commit dba9cae

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/comp/middle/trans.rs

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
// the result of the translation to LLVM -- while others, such as trans_fn,
55
// trans_obj, and trans_item, are called only for the side effect of adding a
66
// particular definition to the LLVM IR output we're producing.
7+
//
8+
// Hopefully useful general knowledge about trans:
9+
//
10+
// * There's no way to find out the ty::t type of a ValueRef. Doing so
11+
// would be "trying to get the eggs out of an omelette" (credit:
12+
// pcwalton). You can, instead, find out its TypeRef by calling val_ty,
13+
// but many TypeRefs correspond to one ty::t; for instance, tup(int, int,
14+
// int) and rec(x=int, y=int, z=int) will have the same TypeRef.
715

816
import std::int;
917
import std::str;

0 commit comments

Comments
 (0)