method.c (60967) | method.c (70635) |
---|---|
1/* Handle the hair of processing (but not expanding) inline functions. 2 Also manage function and variable name overloading. 3 Copyright (C) 1987, 89, 92-97, 1998, 1999 Free Software Foundation, Inc. 4 Contributed by Michael Tiemann (tiemann@cygnus.com) 5 6This file is part of GNU CC. 7 8GNU CC is free software; you can redistribute it and/or modify --- 2227 unchanged lines hidden (view full) --- 2236 } 2237#endif /* ASM_OUTPUT_MI_THUNK */ 2238 } 2239 2240 TREE_SET_CODE (thunk_fndecl, THUNK_DECL); 2241} 2242 2243void | 1/* Handle the hair of processing (but not expanding) inline functions. 2 Also manage function and variable name overloading. 3 Copyright (C) 1987, 89, 92-97, 1998, 1999 Free Software Foundation, Inc. 4 Contributed by Michael Tiemann (tiemann@cygnus.com) 5 6This file is part of GNU CC. 7 8GNU CC is free software; you can redistribute it and/or modify --- 2227 unchanged lines hidden (view full) --- 2236 } 2237#endif /* ASM_OUTPUT_MI_THUNK */ 2238 } 2239 2240 TREE_SET_CODE (thunk_fndecl, THUNK_DECL); 2241} 2242 2243void |
2244make_vlist_ctor_wrapper (fn) | 2244maybe_vlist_ctor_wrapper (fn, definep) |
2245 tree fn; | 2245 tree fn; |
2246 int definep; |
|
2246{ 2247 tree fntype, decl; 2248 tree arg_types, parms, parm, basetype, pbasetype; 2249 tree t, ctors; 2250 | 2247{ 2248 tree fntype, decl; 2249 tree arg_types, parms, parm, basetype, pbasetype; 2250 tree t, ctors; 2251 |
2252 if (!flag_vtable_thunks_compat 2253 || !DECL_CONSTRUCTOR_FOR_PVBASE_P (fn)) 2254 return; 2255 |
|
2251 arg_types = TYPE_ARG_TYPES (TREE_TYPE (fn)); 2252 pbasetype = TREE_VALUE (arg_types); 2253 basetype = TREE_TYPE (pbasetype); 2254 parms = DECL_ARGUMENTS (fn); 2255 2256 /* Skip this, __in_chrg, and _vlist */ 2257 arg_types = TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (arg_types))); 2258 --- 60 unchanged lines hidden (view full) --- 2319 cp_finish_decl (decl, NULL_TREE, NULL_TREE, 0, 0); 2320 } 2321 else 2322 decl = OVL_CURRENT (ctors); 2323 2324 /* Remember the original function. */ 2325 DECL_VLIST_CTOR_WRAPPED (decl) = fn; 2326 | 2256 arg_types = TYPE_ARG_TYPES (TREE_TYPE (fn)); 2257 pbasetype = TREE_VALUE (arg_types); 2258 basetype = TREE_TYPE (pbasetype); 2259 parms = DECL_ARGUMENTS (fn); 2260 2261 /* Skip this, __in_chrg, and _vlist */ 2262 arg_types = TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (arg_types))); 2263 --- 60 unchanged lines hidden (view full) --- 2324 cp_finish_decl (decl, NULL_TREE, NULL_TREE, 0, 0); 2325 } 2326 else 2327 decl = OVL_CURRENT (ctors); 2328 2329 /* Remember the original function. */ 2330 DECL_VLIST_CTOR_WRAPPED (decl) = fn; 2331 |
2327 /* When fn is declared, DECL_INITIAL is null. When it is defined, 2328 DECL_INITIAL will be error_mark_node. */ 2329 if (DECL_INITIAL (fn) == error_mark_node) | 2332 /* If this is called from start_method, definep is -1. Then we 2333 are inside the class, and fn is inline by default. */ 2334 if (definep) |
2330 { 2331 /* Record that the ctor is being defined, so we also emit the | 2335 { 2336 /* Record that the ctor is being defined, so we also emit the |
2332 wrapper later. */ 2333 TREE_USED (decl) = 1; 2334 DECL_NOT_REALLY_EXTERN (decl) = 1; 2335 DECL_INITIAL (decl) = NULL_TREE; | 2337 wrapper later. */ 2338 if (DECL_THIS_INLINE (fn) || (definep == -1)) 2339 { 2340 DECL_THIS_INLINE (decl) = 1; 2341 DECL_INLINE (decl) = 1; 2342 pushdecl_top_level (decl); 2343 } 2344 else 2345 { 2346 TREE_USED (decl) = 1; 2347 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) = 1; 2348 } |
2336 mark_inline_for_output (decl); 2337 } 2338} 2339 2340static void 2341emit_vlist_ctor_wrapper (decl) 2342 tree decl; 2343{ --- 302 unchanged lines hidden (view full) --- 2646 finish_function (lineno, 0, nested); 2647 2648 extract_interface_info (); 2649 if (! context) 2650 pop_from_top_level (); 2651 else if (nested) 2652 pop_cp_function_context (context); 2653} | 2349 mark_inline_for_output (decl); 2350 } 2351} 2352 2353static void 2354emit_vlist_ctor_wrapper (decl) 2355 tree decl; 2356{ --- 302 unchanged lines hidden (view full) --- 2659 finish_function (lineno, 0, nested); 2660 2661 extract_interface_info (); 2662 if (! context) 2663 pop_from_top_level (); 2664 else if (nested) 2665 pop_cp_function_context (context); 2666} |
2654 2655 2656 | |