diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-08-02 09:49:43 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-08-02 09:49:43 +0000 |
commit | 553735360378d6d3496a92dee4d527013e0a6575 (patch) | |
tree | 4262417c11e49ff050e623330d863ab7ea59aa24 | |
parent | b5dd71959c55b372d219a509781e4ca29084bc68 (diff) | |
download | ATCD-553735360378d6d3496a92dee4d527013e0a6575.tar.gz |
ChangeLogTag: Thu Aug 2 09:45:21 UTC 2007 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 15 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/idl.yy | 5 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/y.tab.cpp | 7 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/ast_component.h | 14 |
4 files changed, 37 insertions, 4 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 953ab6bb809..0984cd89a9a 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,18 @@ +Thu Aug 2 09:45:21 UTC 2007 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/include/ast_component.h: + + Added 'line_number' member to the port description struct. + Since ports aren't nodes (which store their line numbers) + in the AST, this helps some backends get a total ordering + of a component's members. + + * TAO_IDL/fe/y.tab.cpp: + * TAO_IDL/fe/idl.yy: + + Added code to set the line number member before the port + description struct in enqueued in its component node. + Thu Aug 2 09:03:02 UTC 2007 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/include/idl_defines.h: diff --git a/TAO/TAO_IDL/fe/idl.yy b/TAO/TAO_IDL/fe/idl.yy index 9af975a64de..e6a204101d7 100644 --- a/TAO/TAO_IDL/fe/idl.yy +++ b/TAO/TAO_IDL/fe/idl.yy @@ -4757,6 +4757,7 @@ provides_decl : AST_Component::port_description pd; pd.id = $3; pd.impl = interface_type; + pd.line_number = idl_global->lineno (); c->provides ().enqueue_tail (pd); } @@ -4852,6 +4853,7 @@ uses_decl : ud.id = $4; ud.impl = interface_type; ud.is_multiple = $2; + ud.line_number = idl_global->lineno (); c->uses ().enqueue_tail (ud); if (ud.is_multiple == true @@ -4932,6 +4934,7 @@ emits_decl : AST_Component::port_description pd; pd.id = $3; pd.impl = event_type; + pd.line_number = idl_global->lineno (); c->emits ().enqueue_tail (pd); } } @@ -4990,6 +4993,7 @@ publishes_decl : AST_Component::port_description pd; pd.id = $3; pd.impl = event_type; + pd.line_number = idl_global->lineno (); c->publishes ().enqueue_tail (pd); } } @@ -5048,6 +5052,7 @@ consumes_decl : AST_Component::port_description pd; pd.id = $3; pd.impl = event_type; + pd.line_number = idl_global->lineno (); c->consumes ().enqueue_tail (pd); } } diff --git a/TAO/TAO_IDL/fe/y.tab.cpp b/TAO/TAO_IDL/fe/y.tab.cpp index 005104aa44e..640c0a81e62 100644 --- a/TAO/TAO_IDL/fe/y.tab.cpp +++ b/TAO/TAO_IDL/fe/y.tab.cpp @@ -7006,6 +7006,7 @@ tao_yyreduce: AST_Component::port_description pd; pd.id = tao_yyvsp[0].idval; pd.impl = interface_type; + pd.line_number = idl_global->lineno (); c->provides ().enqueue_tail (pd); } @@ -7101,6 +7102,7 @@ tao_yyreduce: ud.id = tao_yyvsp[0].idval; ud.impl = interface_type; ud.is_multiple = tao_yyvsp[-2].bval; + ud.line_number = idl_global->lineno (); c->uses ().enqueue_tail (ud); if (ud.is_multiple == true @@ -7182,7 +7184,8 @@ tao_yyreduce: AST_Component::port_description pd; pd.id = tao_yyvsp[0].idval; pd.impl = event_type; - c->emits ().enqueue_tail (pd); + pd.line_number = idl_global->lineno (); + c->emits ().enqueue_tail (pd); } } @@ -7238,6 +7241,7 @@ tao_yyreduce: AST_Component::port_description pd; pd.id = tao_yyvsp[0].idval; pd.impl = event_type; + pd.line_number = idl_global->lineno (); c->publishes ().enqueue_tail (pd); } } @@ -7294,6 +7298,7 @@ tao_yyreduce: AST_Component::port_description pd; pd.id = tao_yyvsp[0].idval; pd.impl = event_type; + pd.line_number = idl_global->lineno (); c->consumes ().enqueue_tail (pd); } } diff --git a/TAO/TAO_IDL/include/ast_component.h b/TAO/TAO_IDL/include/ast_component.h index e58d484de08..fc2d32402b1 100644 --- a/TAO/TAO_IDL/include/ast_component.h +++ b/TAO/TAO_IDL/include/ast_component.h @@ -35,13 +35,21 @@ public: // Utility data structure for port declarations. struct port_description { - // Constructor. - port_description (void) : id (0), impl (0), is_multiple (false) {} + port_description (void) + : id (0), + impl (0), + is_multiple (false), + line_number (0) + {} - // Fields. Identifier *id; AST_Type *impl; bool is_multiple; + + // These structs are queued, in a separate queue for each port type, + // this helps some backends get a total ordering for a component's + // ports and attributes. + long line_number; }; // Accessors. |