Box Block, fn_decl, variant and Ty in the AST, as they were inflating critical enum sizes.

This commit is contained in:
Eduard Burtescu 2013-12-01 00:00:39 +02:00
parent 80991bb578
commit a9c4b18b18
60 changed files with 623 additions and 640 deletions

View file

@ -161,12 +161,12 @@ impl CFGBuilder {
fn expr(&mut self, expr: @ast::Expr, pred: CFGIndex) -> CFGIndex {
match expr.node {
ast::ExprBlock(ref blk) => {
ast::ExprBlock(blk) => {
let blk_exit = self.block(blk, pred);
self.add_node(expr.id, [blk_exit])
}
ast::ExprIf(cond, ref then, None) => {
ast::ExprIf(cond, then, None) => {
//
// [pred]
// |
@ -186,7 +186,7 @@ impl CFGBuilder {
self.add_node(expr.id, [cond_exit, then_exit]) // 3,4
}
ast::ExprIf(cond, ref then, Some(otherwise)) => {
ast::ExprIf(cond, then, Some(otherwise)) => {
//
// [pred]
// |
@ -207,7 +207,7 @@ impl CFGBuilder {
self.add_node(expr.id, [then_exit, else_exit]) // 4, 5
}
ast::ExprWhile(cond, ref body) => {
ast::ExprWhile(cond, body) => {
//
// [pred]
// |
@ -241,7 +241,7 @@ impl CFGBuilder {
ast::ExprForLoop(..) => fail!("non-desugared expr_for_loop"),
ast::ExprLoop(ref body, _) => {
ast::ExprLoop(body, _) => {
//
// [pred]
// |
@ -300,7 +300,7 @@ impl CFGBuilder {
for arm in arms.iter() {
guard_exit = self.opt_expr(arm.guard, guard_exit); // 2
let pats_exit = self.pats_any(arm.pats, guard_exit); // 3
let body_exit = self.block(&arm.body, pats_exit); // 4
let body_exit = self.block(arm.body, pats_exit); // 4
self.add_contained_edge(body_exit, expr_exit); // 5
}
expr_exit