Mercurial > octave-libgccjit
comparison src/pt-loop.cc @ 8913:35cd375d4bb3
make tree::dup functions const
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 05 Mar 2009 13:50:25 -0500 |
parents | 33783e94fb16 |
children | eb63fbe60fab |
comparison
equal
deleted
inserted
replaced
8912:57c3155754d6 | 8913:35cd375d4bb3 |
---|---|
52 delete trail_comm; | 52 delete trail_comm; |
53 } | 53 } |
54 | 54 |
55 tree_command * | 55 tree_command * |
56 tree_while_command::dup (symbol_table::scope_id scope, | 56 tree_while_command::dup (symbol_table::scope_id scope, |
57 symbol_table::context_id context) | 57 symbol_table::context_id context) const |
58 { | 58 { |
59 return new tree_while_command (expr ? expr->dup (scope, context) : 0, | 59 return new tree_while_command (expr ? expr->dup (scope, context) : 0, |
60 list ? list->dup (scope, context) : 0, | 60 list ? list->dup (scope, context) : 0, |
61 lead_comm ? lead_comm->dup () : 0, | 61 lead_comm ? lead_comm->dup () : 0, |
62 trail_comm ? trail_comm->dup (): 0, | 62 trail_comm ? trail_comm->dup (): 0, |
71 | 71 |
72 // Do-Until | 72 // Do-Until |
73 | 73 |
74 tree_command * | 74 tree_command * |
75 tree_do_until_command::dup (symbol_table::scope_id scope, | 75 tree_do_until_command::dup (symbol_table::scope_id scope, |
76 symbol_table::context_id context) | 76 symbol_table::context_id context) const |
77 { | 77 { |
78 return new tree_do_until_command (expr ? expr->dup (scope, context) : 0, | 78 return new tree_do_until_command (expr ? expr->dup (scope, context) : 0, |
79 list ? list->dup (scope, context) : 0, | 79 list ? list->dup (scope, context) : 0, |
80 lead_comm ? lead_comm->dup () : 0, | 80 lead_comm ? lead_comm->dup () : 0, |
81 trail_comm ? trail_comm->dup (): 0, | 81 trail_comm ? trail_comm->dup (): 0, |
98 delete trail_comm; | 98 delete trail_comm; |
99 } | 99 } |
100 | 100 |
101 tree_command * | 101 tree_command * |
102 tree_simple_for_command::dup (symbol_table::scope_id scope, | 102 tree_simple_for_command::dup (symbol_table::scope_id scope, |
103 symbol_table::context_id context) | 103 symbol_table::context_id context) const |
104 { | 104 { |
105 return new tree_simple_for_command (lhs ? lhs->dup (scope, context) : 0, | 105 return new tree_simple_for_command (lhs ? lhs->dup (scope, context) : 0, |
106 expr ? expr->dup (scope, context) : 0, | 106 expr ? expr->dup (scope, context) : 0, |
107 list ? list->dup (scope, context) : 0, | 107 list ? list->dup (scope, context) : 0, |
108 lead_comm ? lead_comm->dup () : 0, | 108 lead_comm ? lead_comm->dup () : 0, |
124 delete trail_comm; | 124 delete trail_comm; |
125 } | 125 } |
126 | 126 |
127 tree_command * | 127 tree_command * |
128 tree_complex_for_command::dup (symbol_table::scope_id scope, | 128 tree_complex_for_command::dup (symbol_table::scope_id scope, |
129 symbol_table::context_id context) | 129 symbol_table::context_id context) const |
130 { | 130 { |
131 return new tree_complex_for_command (lhs ? lhs->dup (scope, context) : 0, | 131 return new tree_complex_for_command (lhs ? lhs->dup (scope, context) : 0, |
132 expr ? expr->dup (scope, context) : 0, | 132 expr ? expr->dup (scope, context) : 0, |
133 list ? list->dup (scope, context) : 0, | 133 list ? list->dup (scope, context) : 0, |
134 lead_comm ? lead_comm->dup () : 0, | 134 lead_comm ? lead_comm->dup () : 0, |