comparison dmd/inline.c @ 1640:9bf06e02070b

Merge DMD 1.057.
author Christian Kamm <kamm incasoftware de>
date Mon, 08 Mar 2010 21:39:20 +0100
parents 44b145be2ef5
children
comparison
equal deleted inserted replaced
1639:41145d30acb8 1640:9bf06e02070b
1 1
2 // Copyright (c) 1999-2009 by Digital Mars 2 // Copyright (c) 1999-2010 by Digital Mars
3 // All Rights Reserved 3 // All Rights Reserved
4 // written by Walter Bright 4 // written by Walter Bright
5 // http://www.digitalmars.com 5 // http://www.digitalmars.com
6 // License for redistribution is by either the Artistic License 6 // License for redistribution is by either the Artistic License
7 // in artistic.txt, or the GNU General Public License in gnu.txt. 7 // in artistic.txt, or the GNU General Public License in gnu.txt.
290 return 1 + e1->inlineCost(ics) + e2->inlineCost(ics); 290 return 1 + e1->inlineCost(ics) + e2->inlineCost(ics);
291 } 291 }
292 292
293 int CallExp::inlineCost(InlineCostState *ics) 293 int CallExp::inlineCost(InlineCostState *ics)
294 { 294 {
295 // Bugzilla 3500: super.func() calls must be devirtualized, and the inliner
296 // can't handle that at present.
297 if (e1->op == TOKdotvar && ((DotVarExp *)e1)->e1->op == TOKsuper)
298 return COST_MAX;
299
295 return 1 + e1->inlineCost(ics) + arrayInlineCost(ics, arguments); 300 return 1 + e1->inlineCost(ics) + arrayInlineCost(ics, arguments);
296 } 301 }
297 302
298 int SliceExp::inlineCost(InlineCostState *ics) 303 int SliceExp::inlineCost(InlineCostState *ics)
299 { int cost; 304 { int cost;