fixed many errors and cleaned up includes
[official-gcc.git] / gcc / python / py-stmt.c
blobf46c6bc136d5bb3ac9b5e6e74de088ab3048f112
1 /* This file is part of GCC.
3 GCC is free software; you can redistribute it and/or modify it under
4 the terms of the GNU General Public License as published by the Free
5 Software Foundation; either version 3, or (at your option) any later
6 version.
8 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
9 WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 for more details.
13 You should have received a copy of the GNU General Public License
14 along with GCC; see the file COPYING3. If not see
15 <http://www.gnu.org/licenses/>. */
17 #include "config.h"
18 #include "system.h"
19 #include "ansidecl.h"
20 #include "coretypes.h"
21 #include "opts.h"
22 #include "tree.h"
23 #include "gimple.h"
24 #include "toplev.h"
25 #include "debug.h"
26 #include "options.h"
27 #include "flags.h"
28 #include "convert.h"
29 #include "diagnostic-core.h"
30 #include "langhooks.h"
31 #include "langhooks-def.h"
32 #include "target.h"
34 #include "tree-iterator.h"
35 #include "cgraph.h"
37 #include <gmp.h>
38 #include <mpfr.h>
40 #include "vec.h"
41 #include "hashtab.h"
43 #include "gpython.h"
44 #include "py-dot-codes.def"
45 #include "py-dot.h"
46 #include "py-vec.h"
47 #include "py-tree.h"
48 #include "py-runtime.h"
50 static gpy_symbol_obj * gpy_process_AST_Align( gpy_symbol_obj ** );
51 static void gpy_finish_type( tree );
52 static tree gpy_add_field_to_struct_1( tree, tree, tree, tree ** );
53 static tree gpy_build_callable_record_type( void );
55 static VEC( gpy_sym,gc ) * gpy_decls;
56 VEC(gpy_ctx_t,gc) * gpy_ctx_table;
57 VEC(tree,gc) * global_decls;
58 VEC(tree,gc) * gpy_toplev_fncs;
60 void gpy_process_decl( gpy_symbol_obj * sym )
62 /* Push the declaration! */
63 VEC_safe_push( gpy_sym, gc, gpy_decls, sym );
64 debug("decl <%p> was pushed!\n", (void*)sym );
67 /**
68 * Fairly Confusing Function to read.
70 * example:
71 * >>> x = y = z = 2 + 2 + 2;
73 * --- Currently Yacc parses that expression into this Tree:
76 / \
77 + 2
80 / \
81 x =
82 / \
83 y =
84 / \
85 z 2
87 -- Is converted into the procedure:
89 1. z = 2 + 2 + 2;
90 2. y = z;
91 3. x = y;
93 -- Tree structure as so:
96 / \
97 x =
98 / \
99 y =
107 static
108 gpy_symbol_obj * gpy_process_AST_Align( gpy_symbol_obj ** sym )
110 gpy_symbol_obj *nn = NULL;
111 gpy_symbol_obj *retval = NULL;
112 if( (*sym)->next )
114 nn = (*sym)->next;
115 (*sym)->next = NULL;
117 retval = (*sym);
119 if( (*sym)->exp == OP_EXPRESS )
121 debug("Processing Expression AST!\n");
122 if( retval->type != OP_ASSIGN_EVAL )
124 gpy_symbol_obj *o= retval;
125 gpy_symbol_obj *h= NULL;
126 while( o )
128 if( o->op_a_t == TYPE_SYMBOL )
130 if( o->op_a.symbol_table->type == OP_ASSIGN_EVAL )
132 h = o;
133 break;
135 else
137 o = o->op_a.symbol_table;
140 else break;
142 if( h )
144 gpy_symbol_obj *head = h->op_a.symbol_table;
145 if( head->op_b.symbol_table->type == OP_ASSIGN_EVAL )
147 gpy_symbol_obj *t = head, *m = NULL;
148 while( t )
150 if( t->op_b_t == TYPE_SYMBOL )
152 if( t->op_b.symbol_table->type != OP_ASSIGN_EVAL )
154 m = t;
155 break;
157 else
159 t = t->op_b.symbol_table;
162 else break;
164 if( m )
166 h->op_a.symbol_table = m->op_b.symbol_table;
167 m->op_b.symbol_table = retval;
169 else
171 fatal_error("error processing the expression AST!\n");
174 else
176 h->op_a.symbol_table = head->op_b.symbol_table;
177 head->op_b.symbol_table = retval;
179 retval = head;
184 if( nn )
186 retval->next = nn;
188 (*sym) = retval;
190 return retval;
193 VEC(tree,gc) * gpy_process_expression( const gpy_symbol_obj * const sym,
194 VEC(gpy_ctx_t,gc) * context )
196 VEC(tree,gc) * retval = NULL;
197 if( sym->type == SYMBOL_PRIMARY )
199 retval = VEC_alloc(tree,gc,0);
200 VEC(tree,gc) *primitive = gpy_fold_primitive( sym );
201 gcc_assert( VEC_length(tree,primitive) == 1 );
202 VEC_safe_push( tree,gc,retval,VEC_index(tree,primitive,0) );
204 else if( sym->type == SYMBOL_REFERENCE )
206 gcc_assert( sym->op_a_t == TYPE_STRING );
207 tree decl = gpy_ctx_lookup_decl( context, sym->op_a.string, VAR );
208 if( decl )
210 retval = VEC_alloc(tree,gc,0);
211 debug("tree reference <%s>!\n", sym->op_a.string);
212 VEC_safe_push( tree,gc,retval,decl );
214 else
216 error("undeclared symbol reference <%s>!\n",
217 sym->op_a.string );
220 else
222 gpy_symbol_obj *opa= NULL, *opb= NULL; VEC(tree,gc) *res = NULL;
223 debug("expression evalution <0x%x>!\n", sym->type );
225 opa= sym->op_a.symbol_table;
226 opb= sym->op_b.symbol_table;
228 debug( "opa->type = <0x%x>, opb->type = <0x%x>!\n",
229 opa->type, opb->type );
231 switch( sym->type )
233 case OP_ASSIGN_EVAL:
234 res = gpy_process_assign( &opa, &opb, context );
235 break;
237 case OP_BIN_ADDITION:
238 res = gpy_process_bin_expression( &opa, &opb, sym->type, context );
239 break;
241 default:
242 fatal_error( "invalid expression evaluation symbol type <0x%x>!\n",
243 sym->type );
244 break;
246 if( res ) { retval = res; }
247 else { fatal_error("error evaluating expression!\n"); }
250 return retval;
253 VEC(tree,gc) * gpy_process_functor( const gpy_symbol_obj * const functor,
254 const char * base_ident,
255 VEC(gpy_ctx_t,gc) * context )
257 VEC(tree,gc) * retval_vec = VEC_alloc( tree,gc,0 );
259 gpy_symbol_obj * o = functor->op_a.symbol_table;
260 tree fntype = build_function_type(void_type_node, void_list_node);
261 tree retval = build_decl( UNKNOWN_LOCATION, FUNCTION_DECL,
262 get_identifier( functor->identifier ),
263 fntype );
265 tree declare_vars = NULL_TREE;
266 tree bind = NULL_TREE;
267 tree block = alloc_stmt_list( );
268 tree resdecl = NULL_TREE;
269 tree restype = TREE_TYPE(retval);
271 int idx = 0;
272 gpy_context_branch *co = NULL;
273 gpy_ident it = NULL;
275 if( base_ident )
277 size_t len = strlen( functor->identifier ) + strlen( base_ident );
278 size_t idx = 0, idy = 0;
279 char * buffer = (char *) xmalloc( (sizeof(char) * len)+2 );
280 for( ; idx<strlen( base_ident ); ++idx )
282 buffer[ idy ] = base_ident[ idx ];
283 idy++;
285 buffer[ idy ] = '.'; idy++;
286 for( idx=0; idx<strlen( functor->identifier ); ++idx )
288 buffer[ idy ] = functor->identifier[ idx ];
289 idy++;
291 buffer[idy] = '\0';
292 debug("buffer = <%s>!\n", buffer );
293 SET_DECL_ASSEMBLER_NAME( retval, get_identifier( buffer ) );
294 free( buffer );
296 else
297 SET_DECL_ASSEMBLER_NAME( retval, get_identifier(functor->identifier) );
299 TREE_PUBLIC(retval) = 1;
300 TREE_STATIC(retval) = 1;
302 resdecl = build_decl( UNKNOWN_LOCATION, RESULT_DECL, NULL_TREE,
303 restype );
304 DECL_CONTEXT(resdecl) = retval;
305 DECL_RESULT(retval) = resdecl;
307 DECL_INITIAL(retval) = block;
309 /* push a new context for local symbols */
310 co = (gpy_context_branch *)
311 xmalloc( sizeof(gpy_context_branch) );
312 gpy_init_ctx_branch( &co );
313 VEC_safe_push( gpy_ctx_t, gc, context, co );
315 while( o )
317 /* looping over the gpy_symbol_obj block of function statements
318 and getting the respective tree's and creating the GENERIC block
320 VEC(tree,gc) * x = gpy_get_tree( o,context );
321 int itx = 0; tree xt;
322 for( ; VEC_iterate(tree,x,itx,xt); ++itx )
324 gcc_assert( xt );
325 append_to_statement_list( xt, &block );
327 o = o->next;
330 for( ; VEC_iterate( gpy_ident,co->var_decl_t, idx, it ); ++idx )
332 /* get all block var_decls */
333 tree x = gpy_ctx_lookup_decl( context, it->ident, VAR );
334 gcc_assert( TREE_CODE( x ) == VAR_DECL );
335 debug("got var decl <%p>:<%s> within func <%s>!\n", (void*)x,
336 it->ident, functor->identifier );
337 TREE_CHAIN( x ) = declare_vars;
338 declare_vars = x;
341 if( declare_vars != NULL_TREE )
343 tree bl = make_node(BLOCK);
344 BLOCK_SUPERCONTEXT(bl) = retval;
345 DECL_INITIAL(retval) = bl;
346 BLOCK_VARS(bl) = declare_vars;
347 TREE_USED(bl) = 1;
348 bind = build3(BIND_EXPR, void_type_node, BLOCK_VARS(bl),
349 NULL_TREE, bl);
350 TREE_SIDE_EFFECTS(bind) = 1;
352 BIND_EXPR_BODY(bind) = block;
353 block = bind;
354 DECL_SAVED_TREE(retval) = block;
356 VEC_pop( gpy_ctx_t, gpy_ctx_table );
358 gimplify_function_tree( retval );
360 cgraph_add_new_function(retval, false);
361 cgraph_finalize_function(retval, true);
363 VEC_safe_push( tree,gc,retval_vec,retval );
365 return retval_vec;
368 VEC(tree,gc) * gpy_process_print( gpy_symbol_obj *sym, VEC(gpy_ctx_t,gc) * context )
370 VEC(tree,gc) * retval = NULL;
371 gcc_assert( sym->op_a_t == TYPE_SYMBOL );
372 gpy_symbol_obj * argument_list = sym->op_a.symbol_table;
374 if( argument_list )
376 int len = 0;
377 gpy_symbol_obj * t = argument_list;
378 while( t )
380 len++;
381 t=t->next;
384 int idx, idy = 0; t = argument_list;
385 tree * args = XNEWVEC( tree,len );
386 for( idx=0; idx<len; ++idx )
388 VEC(tree,gc) * x = gpy_get_tree( t, context );
389 gcc_assert( VEC_length(tree,x) == 1 );
390 args[ idy ] = VEC_index(tree,x,0);
391 idy++;
392 t = t->next;
395 VEC_safe_push( tree,gc,retval,gpy_builtin_get_print_call( len, args ) );
397 else
398 error("print call without any arguments!\n");
400 return retval;
403 VEC(tree,gc) * gpy_process_class( gpy_symbol_obj * const sym,
404 VEC(gpy_ctx_t,gc) * context )
406 VEC(tree,gc) * retval = NULL;
407 return retval;
410 VEC(tree,gc) * gpy_get_tree( gpy_symbol_obj * sym, VEC(gpy_ctx_t,gc) * context )
412 VEC(tree,gc) * retval = NULL;
414 debug( "processing decl of type <0x%X> object <%p>\n",
415 sym->type, (void*) sym );
417 if( sym->exp == OP_EXPRESS )
419 sym = gpy_process_AST_Align( &sym );
420 retval = gpy_process_expression( sym, context );
422 else
424 switch( sym->type )
426 case STRUCTURE_OBJECT_DEF:
428 VEC(gpy_ctx_t,gc) * class_ctx = VEC_alloc(gpy_ctx_t,gc,0);
429 retval = gpy_process_class( sym, class_ctx );
431 break;
433 case STRUCTURE_FUNCTION_DEF:
435 VEC(gpy_ctx_t,gc) * func_ctx = VEC_alloc(gpy_ctx_t,gc,0);
436 retval = gpy_process_functor( sym, NULL, func_ctx );
438 break;
440 case KEY_PRINT:
441 retval = gpy_process_print( sym, context );
442 break;
444 default:
445 fatal_error("unhandled symbol type <0x%x>\n", sym->type );
446 break;
450 return retval;
453 tree gpy_main_method_decl( VEC(tree,gc) * block, gpy_context_branch * co )
455 tree retval = NULL_TREE; int idx;
457 tree main_fn_type = build_function_type_list( integer_type_node, NULL_TREE );
458 tree main_fn_decl = build_decl( BUILTINS_LOCATION, FUNCTION_DECL,
459 get_identifier("main"), main_fn_type );
461 DECL_CONTEXT(main_fn_decl) = NULL_TREE;
462 TREE_STATIC(main_fn_decl) = true;
463 TREE_PUBLIC(main_fn_decl) = true;
464 DECL_ARGUMENTS(main_fn_decl) = NULL_TREE;
466 /* Define the return type (represented by RESULT_DECL) for the main functin */
467 tree main_ret = build_decl( BUILTINS_LOCATION, RESULT_DECL,
468 NULL_TREE, TREE_TYPE(main_fn_type) );
469 DECL_CONTEXT(main_ret) = main_fn_decl;
470 DECL_ARTIFICIAL(main_ret) = true;
471 DECL_IGNORED_P(main_ret) = true;
473 DECL_RESULT(main_fn_decl) = main_ret;
475 tree main_art_block = build_block(NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE);
476 DECL_INITIAL(main_fn_decl) = main_art_block;
478 tree declare_vars = NULL_TREE;
479 tree main_stmts = alloc_stmt_list( );
481 append_to_statement_list( gpy_builtin_get_init_call( ), &main_stmts );
483 tree it = NULL_TREE;
484 for( idx = 0; VEC_iterate(tree,block,idx,it); ++idx )
486 gcc_assert( it );
487 append_to_statement_list( it, &main_stmts );
490 int block_decl_len = 0; gpy_ident vit = NULL;
491 for( idx = 0; VEC_iterate( gpy_ident,co->var_decl_t, idx, vit ); ++idx )
493 /* get all block var_decls */
494 tree x = gpy_ctx_lookup_decl( gpy_ctx_table, vit->ident, VAR );
495 gcc_assert( TREE_CODE( x ) == VAR_DECL );
496 debug("got var decl <%p>:<%s> within func <%s>!\n", (void*)x,
497 vit->ident, "main" );
498 TREE_CHAIN( x ) = declare_vars;
499 declare_vars = x;
500 block_decl_len++;
503 if( block_decl_len > 0 )
505 tree * block_decl_vec = XNEWVEC( tree, block_decl_len );
506 int idy = 0;
508 for( idx = 0; VEC_iterate( gpy_ident,co->var_decl_t, idx, vit ); ++idx )
510 tree x = gpy_ctx_lookup_decl( gpy_ctx_table, vit->ident, VAR );
511 gcc_assert( TREE_CODE( x ) == VAR_DECL );
513 block_decl_vec[ idy ] = x;
514 idy++;
516 //block_decl_vec[ idy ] = main_ret; idy++;
517 append_to_statement_list( gpy_builtin_get_finalize_block_call( block_decl_len,
518 block_decl_vec ),
519 &main_stmts );
521 else
523 declare_vars = main_ret;
526 append_to_statement_list( gpy_builtin_get_cleanup_final_call( ), &main_stmts );
528 tree main_set_ret = build2( MODIFY_EXPR, TREE_TYPE(main_ret),
529 main_ret, build_int_cst(integer_type_node, 0));
530 tree main_ret_expr = build1( RETURN_EXPR, void_type_node, main_set_ret );
531 append_to_statement_list( main_ret_expr, &main_stmts );
533 tree bind = NULL_TREE;
534 if( declare_vars != NULL_TREE )
536 tree bl = make_node(BLOCK);
537 BLOCK_SUPERCONTEXT(bl) = main_fn_decl;
538 DECL_INITIAL(main_fn_decl) = bl;
539 BLOCK_VARS(bl) = declare_vars;
540 TREE_USED(bl) = 1;
541 bind = build3( BIND_EXPR, void_type_node, BLOCK_VARS(bl),
542 NULL_TREE, bl );
543 TREE_SIDE_EFFECTS(bind) = 1;
545 BIND_EXPR_BODY(bind) = main_stmts;
546 main_stmts = bind;
547 DECL_SAVED_TREE(main_fn_decl) = main_stmts;
549 gimplify_function_tree( main_fn_decl );
550 cgraph_finalize_function( main_fn_decl, false );
552 retval = main_fn_decl;
554 return retval;
557 /* Layout and output debug info for a record type. */
559 static void
560 gpy_finish_type (tree type)
562 tree decl;
564 decl = build_decl (input_location,
565 TYPE_DECL, NULL_TREE, type);
566 TYPE_STUB_DECL (type) = decl;
567 layout_type (type);
568 rest_of_type_compilation (type, 1);
569 rest_of_decl_compilation (decl, 1, 0);
572 /* Add a field of given NAME and TYPE to the context of a UNION_TYPE
573 or RECORD_TYPE pointed to by CONTEXT. The new field is chained
574 to the end of the field list pointed to by *CHAIN.
576 Returns a pointer to the new field. */
578 static tree
579 gpy_add_field_to_struct_1 (tree context, tree name, tree type, tree **chain)
581 tree decl = build_decl (BUILTINS_LOCATION, FIELD_DECL, name, type);
583 DECL_CONTEXT (decl) = context;
584 DECL_CHAIN (decl) = NULL_TREE;
585 if (TYPE_FIELDS (context) == NULL_TREE)
586 TYPE_FIELDS (context) = decl;
587 if (chain != NULL)
589 if (*chain != NULL)
590 **chain = decl;
591 *chain = &DECL_CHAIN (decl);
594 return decl;
597 /* @see coverage.c build_fn_info_type ( unsigned int )
598 for more examples on RECORD_TYPE's
600 Better still @see fortran/trans-types.c - gfc_get_desc_dim_type
602 typedef gpy_object_state_t * (*__callable)( void );
604 typedef struct gpy_callable_def_t {
605 char * ident; int n_args;
606 bool class; __callable call;
607 } gpy_callable_def_t;
610 static
611 tree gpy_build_callable_record_type( void )
613 tree type;
614 tree decl, *chain;
616 type = make_node( RECORD_TYPE );
618 TYPE_NAME(type) = get_identifier("__gpy_callable_t");
619 TYPE_PACKED(type) = 1;
621 /* Consists of the stride, lbound and ubound members. */
622 decl = gpy_add_field_to_struct_1 (type,
623 get_identifier ("ident"),
624 ptr_type_node, &chain);
626 decl = gpy_add_field_to_struct_1 (type,
627 get_identifier ("n_args"),
628 integer_type_node, &chain);
630 decl = gpy_add_field_to_struct_1 (type,
631 get_identifier ("class"),
632 boolean_type_node, &chain);
634 decl = gpy_add_field_to_struct_1 (type,
635 get_identifier ("call"),
636 ptr_type_node, &chain);
638 gpy_finish_type( type );
640 return type;
643 void gpy_write_globals( void )
645 gpy_context_branch *co = NULL;
646 gpy_symbol_obj * it = NULL;
647 VEC(tree,gc) * main_stmts_vec = VEC_alloc(tree,gc,0);
649 /* push a new context for local symbols */
650 co = (gpy_context_branch *)
651 xmalloc( sizeof(gpy_context_branch) );
652 gpy_init_ctx_branch( &co );
653 VEC_safe_push( gpy_ctx_t, gc, gpy_ctx_table, co );
655 int idx;
656 for( idx= 0; VEC_iterate(gpy_sym,gpy_decls,idx,it); ++idx )
658 VEC(tree,gc) * x = gpy_get_tree( it, gpy_ctx_table );
659 gcc_assert( x ); int itx = 0; tree xt;
660 for( ; VEC_iterate(tree,x,itx,xt); ++itx )
662 if( TREE_CODE(xt) == FUNCTION_DECL )
664 VEC_safe_push( tree,gc,global_decls,xt );
666 else if( TREE_CODE(xt) == VAR_DECL )
668 VEC_safe_push( tree,gc,global_decls,xt );
670 else
672 VEC_safe_push( tree,gc,main_stmts_vec,xt );
677 /* Need to generate table of gpy_callable_def_t[] and gpy_type_obj_def_t[] */
678 VEC(constructor_elt,gc) *array_data = NULL;
680 for( ;; )
682 VEC(constructor_elt,gc) *struct_data;
683 const char * ident = NULL;
685 CONSTRUCTOR_APPEND_ELT (struct_data, build_decl (BUILTINS_LOCATION, FIELD_DECL,
686 "ident",
687 ptr_type_node),
688 build_string(strlen(ident), ident)
691 CONSTRUCTOR_APPEND_ELT (struct_data, build_decl (BUILTINS_LOCATION, FIELD_DECL,
692 "n_args",
693 integer_type_node),
694 build_int_cst(integer_type_node, 0 )
697 CONSTRUCTOR_APPEND_ELT (struct_data, build_decl (BUILTINS_LOCATION, FIELD_DECL,
698 "class",
699 boolean_type_node),
700 build_int_cst(boolean_type_node,0)
703 CONSTRUCTOR_APPEND_ELT (struct_data, build_decl (BUILTINS_LOCATION, FIELD_DECL,
704 "call",
705 ptr_type_node),
706 NULL_TREE
709 CONSTRUCTOR_APPEND_ELT (array_data, NULL_TREE,
710 build_constructor(gpy_build_callable_record_type(),struct_data));
713 VEC(constructor_elt,gc) *struct_data;
714 CONSTRUCTOR_APPEND_ELT (struct_data, build_decl (BUILTINS_LOCATION, FIELD_DECL,
715 "ident",
716 ptr_type_node),
717 null_pointer_node
720 CONSTRUCTOR_APPEND_ELT (struct_data, build_decl (BUILTINS_LOCATION, FIELD_DECL,
721 "n_args",
722 integer_type_node),
723 build_int_cst(integer_type_node, 0 )
726 CONSTRUCTOR_APPEND_ELT (struct_data, build_decl (BUILTINS_LOCATION, FIELD_DECL,
727 "class",
728 boolean_type_node),
729 build_int_cst(boolean_type_node,0)
732 CONSTRUCTOR_APPEND_ELT (struct_data, build_decl (BUILTINS_LOCATION, FIELD_DECL,
733 "call",
734 ptr_type_node),
735 null_pointer_node
738 CONSTRUCTOR_APPEND_ELT (array_data, NULL_TREE,
739 build_constructor(gpy_build_callable_record_type(),struct_data));
741 tree array_type = build_array_type( gpy_build_callable_record_type(),
742 build_index_type( build_int_cst(integer_type_node,table_len) ));
744 tree array = build_constructor(array_type, array_data);
745 tree table_decl = build_decl(BUILTINS_LOCATION,VAR_DECL,
746 get_identifier("__gpy_module_main_callables"),
747 array_type);
749 TREE_CONSTANT (table_decl) = 1;
750 TREE_STATIC (table_decl) = 1;
751 TREE_READONLY (table_decl) = 1;
752 DECL_INITIAL (table_decl) = array;
754 /* Add in the main method decl! */
755 VEC_safe_push( tree,gc,global_decls,gpy_main_method_decl( main_stmts_vec,co ) );
756 /* Add the callables table */
757 VEC_safe_push( tree,gc,global_decls,table_decl );
759 VEC_pop( gpy_ctx_t, gpy_ctx_table );
761 tree itx = NULL_TREE; int idy = 0; int global_vec_len = VEC_length(tree, global_decls);
762 tree * global_vec = XNEWVEC( tree, global_vec_len );
763 for( idx=0; VEC_iterate(tree,global_decls,idx,itx); ++idx )
765 global_vec[ idy ] = itx;
766 idy++;
769 debug("Finished processing!\n\n");
771 wrapup_global_declarations( global_vec, global_vec_len );
773 check_global_declarations( global_vec, global_vec_len );
774 emit_debug_global_declarations( global_vec, global_vec_len );
776 cgraph_finalize_compilation_unit( );
778 debug("finished passing to middle-end!\n\n");