Replace callee_id with information stored in method_map.

This commit is contained in:
Eduard Burtescu 2014-02-26 16:06:45 +02:00
parent 7a588ceff2
commit 05e4d944a9
43 changed files with 478 additions and 550 deletions

View file

@ -305,7 +305,7 @@ impl CFGBuilder {
expr_exit
}
ast::ExprBinary(_, op, l, r) if ast_util::lazy_binop(op) => {
ast::ExprBinary(op, l, r) if ast_util::lazy_binop(op) => {
//
// [pred]
// |
@ -355,16 +355,16 @@ impl CFGBuilder {
self.call(expr, pred, func, *args)
}
ast::ExprMethodCall(_, _, _, ref args) => {
ast::ExprMethodCall(_, _, ref args) => {
self.call(expr, pred, args[0], args.slice_from(1))
}
ast::ExprIndex(_, l, r) |
ast::ExprBinary(_, _, l, r) if self.is_method_call(expr) => {
ast::ExprIndex(l, r) |
ast::ExprBinary(_, l, r) if self.is_method_call(expr) => {
self.call(expr, pred, l, [r])
}
ast::ExprUnary(_, _, e) if self.is_method_call(expr) => {
ast::ExprUnary(_, e) if self.is_method_call(expr) => {
self.call(expr, pred, e, [])
}
@ -384,12 +384,12 @@ impl CFGBuilder {
}
ast::ExprAssign(l, r) |
ast::ExprAssignOp(_, _, l, r) => {
ast::ExprAssignOp(_, l, r) => {
self.straightline(expr, pred, [r, l])
}
ast::ExprIndex(_, l, r) |
ast::ExprBinary(_, _, l, r) => { // NB: && and || handled earlier
ast::ExprIndex(l, r) |
ast::ExprBinary(_, l, r) => { // NB: && and || handled earlier
self.straightline(expr, pred, [l, r])
}
@ -399,7 +399,7 @@ impl CFGBuilder {
ast::ExprAddrOf(_, e) |
ast::ExprCast(e, _) |
ast::ExprUnary(_, _, e) |
ast::ExprUnary(_, e) |
ast::ExprParen(e) |
ast::ExprVstore(e, _) |
ast::ExprField(e, _, _) => {