mozilla/rust — pull request #9528 by eugals (2013-09-26 15:21:13+00:00)
Title: a few optimizations to rustc::middle::trans

* created CrateTypes struct (a member of CrateContext) and used it to cache many compiler context Type objects such as all primitive types (i8, i16, nil, void etc) as well as tydesc, opaque_box, generic_glue_fn etc.
This CrateTypes object supersedes most Type::global_methods, so now:
- instead of ```Type::void()``` should be ```ccx.types.void()```;
- instead of ```ccx.int_type``` should be ```ccx.types.i()```;
- instead of ```Type::opaque_box(ccx)``` - ```ccx.types.opaque_box()```
- and this:
```Type::box(cx, &Type::vec(cx.sess.targ_cfg.arch, &Type::i8()))```
would be replaced with this
```cx.types.box(&cx.types.vec(cx.types.i8()))```

* fixed some useless code generation (for POD struct/tuple members) for glue_take, glue_drop and in other similar situations

* got rid of global variable task_llcx as it wasn't really needed