This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Java FUNCTION_DECL's have two bodies


I'm working with a tool that uses the Tree-SSA output from gcj (version 3.5.0 20040607) and I'm surprised to see that Java FUNCTION_DECL's have two "body" attributes. One uses BLOCK and COMPOUND_EXPR treecodes for its infrastructure and the other uses BIND_EXPR and STATEMENT_LIST. I wonder if this is a bug, if it's possible to suppress one of these bodies from being produced, and if this will go away in a future version?

Here is a snippet of the relevant code (from a .tu dump, the full file is attached):
% gcj -fsyntax-only -fdump-translation-unit test_null6.java

test_null6.java.t01.tu:
@174    function_decl    srcp: "test_null6.java:8     "name: @36     
                         mngl: @237     type: @238     scpe: @120    
                         chan: @239     args: @240     extern        
                         body: @241     inline body: @242    
@241    block            var : @320     var : @321     body: @322    
@242    bind_expr        type: @30      body: @323    
@322    block            body: @425    
@323    statement_list   nxt : @426     nxt : @427    
@425    compound_expr    type: @30      op 0: @547     op 1: @548    
@426    call_expr        srcp: "test_null6.java:8     "type: @30     
                         fn  : @549     args: @550    
@427    modify_expr      srcp: "test_null6.java:8     "type: @229    
                         op 0: @551     op 1: @319    
@547    call_expr        srcp: "test_null6.java:8     "type: @30     
                         fn  : @687     args: @688    
@548    expr_with_file_location type: @229     wfl_node: @689    wfl_filename:"test_null6.java" wfl_lineno: 8       
                         wfl_colno: 0       
@689    modify_expr      srcp: "test_null6.java:8     "type: @229    
                         op 0: @764     op 1: @321    

Chris

Attachment: test_null6.java.t01.tu
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]