Mercurial > hg > octave-lyh
diff src/pt-loop.cc @ 7767:71f068b22fcc
scope and context fixes for function handles
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 07 May 2008 13:45:30 -0400 |
parents | 360b4f7684fd |
children | 3100283874d7 |
line wrap: on
line diff
--- a/src/pt-loop.cc +++ b/src/pt-loop.cc @@ -126,10 +126,11 @@ } tree_command * -tree_while_command::dup (symbol_table::scope_id scope) +tree_while_command::dup (symbol_table::scope_id scope, + symbol_table::context_id context) { - return new tree_while_command (expr ? expr->dup (scope) : 0, - list ? list->dup (scope) : 0, + return new tree_while_command (expr ? expr->dup (scope, context) : 0, + list ? list->dup (scope, context) : 0, lead_comm ? lead_comm->dup () : 0, trail_comm ? trail_comm->dup (): 0, line (), column ()); @@ -189,10 +190,11 @@ } tree_command * -tree_do_until_command::dup (symbol_table::scope_id scope) +tree_do_until_command::dup (symbol_table::scope_id scope, + symbol_table::context_id context) { - return new tree_do_until_command (expr ? expr->dup (scope) : 0, - list ? list->dup (scope) : 0, + return new tree_do_until_command (expr ? expr->dup (scope, context) : 0, + list ? list->dup (scope, context) : 0, lead_comm ? lead_comm->dup () : 0, trail_comm ? trail_comm->dup (): 0, line (), column ()); @@ -495,11 +497,12 @@ } tree_command * -tree_simple_for_command::dup (symbol_table::scope_id scope) +tree_simple_for_command::dup (symbol_table::scope_id scope, + symbol_table::context_id context) { - return new tree_simple_for_command (lhs ? lhs->dup (scope) : 0, - expr ? expr->dup (scope) : 0, - list ? list->dup (scope) : 0, + return new tree_simple_for_command (lhs ? lhs->dup (scope, context) : 0, + expr ? expr->dup (scope, context) : 0, + list ? list->dup (scope, context) : 0, lead_comm ? lead_comm->dup () : 0, trail_comm ? trail_comm->dup () : 0, line (), column ()); @@ -616,14 +619,15 @@ } tree_command * -tree_complex_for_command::dup (symbol_table::scope_id scope) +tree_complex_for_command::dup (symbol_table::scope_id scope, + symbol_table::context_id context) { - return new tree_complex_for_command (lhs ? lhs->dup (scope) : 0, - expr ? expr->dup (scope) : 0, - list ? list->dup (scope) : 0, - lead_comm ? lead_comm->dup () : 0, - trail_comm ? trail_comm->dup () : 0, - line (), column ()); + return new tree_complex_for_command (lhs ? lhs->dup (scope, context) : 0, + expr ? expr->dup (scope, context) : 0, + list ? list->dup (scope, context) : 0, + lead_comm ? lead_comm->dup () : 0, + trail_comm ? trail_comm->dup () : 0, + line (), column ()); } void