Changeset 373

Show
Ignore:
Timestamp:
02/06/10 03:02:54 (2 years ago)
Author:
walter
Message:

bugzilla 3500 super behaves differently with -inline

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dmd-1.x/src/inline.c

    r342 r373  
    11 
    2 // Copyright (c) 1999-2009 by Digital Mars 
     2// Copyright (c) 1999-2010 by Digital Mars 
    33// All Rights Reserved 
    44// written by Walter Bright 
     
    275275int CallExp::inlineCost(InlineCostState *ics) 
    276276{ 
     277    // Bugzilla 3500: super.func() calls must be devirtualized, and the inliner 
     278    // can't handle that at present. 
     279    if (e1->op == TOKdotvar && ((DotVarExp *)e1)->e1->op == TOKsuper) 
     280    return COST_MAX; 
     281 
    277282    return 1 + e1->inlineCost(ics) + arrayInlineCost(ics, arguments); 
    278283} 
  • trunk/src/inline.c

    r342 r373  
    11 
    2 // Copyright (c) 1999-2009 by Digital Mars 
     2// Copyright (c) 1999-2010 by Digital Mars 
    33// All Rights Reserved 
    44// written by Walter Bright 
     
    276276int CallExp::inlineCost(InlineCostState *ics) 
    277277{ 
     278    // Bugzilla 3500: super.func() calls must be devirtualized, and the inliner 
     279    // can't handle that at present. 
     280    if (e1->op == TOKdotvar && ((DotVarExp *)e1)->e1->op == TOKsuper) 
     281    return COST_MAX; 
     282 
    278283    return 1 + e1->inlineCost(ics) + arrayInlineCost(ics, arguments); 
    279284}