Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef HAVE_CONFIG_H
00024 #include <config.h>
00025 #endif
00026
00027 #include "quit.h"
00028
00029 #include "error.h"
00030 #include "oct-lvalue.h"
00031 #include "ov.h"
00032 #include "pt-bp.h"
00033 #include "pt-cmd.h"
00034 #include "pt-except.h"
00035 #include "pt-exp.h"
00036 #include "pt-jump.h"
00037 #include "pt-stmt.h"
00038 #include "pt-walk.h"
00039 #include "unwind-prot.h"
00040 #include "variables.h"
00041
00042
00043
00044 tree_try_catch_command::~tree_try_catch_command (void)
00045 {
00046 delete try_code;
00047 delete catch_code;
00048 delete lead_comm;
00049 delete mid_comm;
00050 delete trail_comm;
00051 }
00052
00053 tree_command *
00054 tree_try_catch_command::dup (symbol_table::scope_id scope,
00055 symbol_table::context_id context) const
00056 {
00057 return new
00058 tree_try_catch_command (try_code ? try_code->dup (scope, context) : 0,
00059 catch_code ? catch_code->dup (scope, context) : 0,
00060 lead_comm ? lead_comm->dup () : 0,
00061 mid_comm ? mid_comm->dup () : 0,
00062 trail_comm ? trail_comm->dup () : 0,
00063 line (), column ());
00064 }
00065
00066 void
00067 tree_try_catch_command::accept (tree_walker& tw)
00068 {
00069 tw.visit_try_catch_command (*this);
00070 }
00071
00072
00073
00074 tree_unwind_protect_command::~tree_unwind_protect_command (void)
00075 {
00076 delete unwind_protect_code;
00077 delete cleanup_code;
00078 delete lead_comm;
00079 delete mid_comm;
00080 delete trail_comm;
00081 }
00082
00083 tree_command *
00084 tree_unwind_protect_command::dup (symbol_table::scope_id scope,
00085 symbol_table::context_id context) const
00086 {
00087 return new tree_unwind_protect_command
00088 (unwind_protect_code ? unwind_protect_code->dup (scope, context) : 0,
00089 cleanup_code ? cleanup_code->dup (scope, context) : 0,
00090 lead_comm ? lead_comm->dup () : 0,
00091 mid_comm ? mid_comm->dup () : 0,
00092 trail_comm ? trail_comm->dup () : 0,
00093 line (), column ());
00094 }
00095
00096 void
00097 tree_unwind_protect_command::accept (tree_walker& tw)
00098 {
00099 tw.visit_unwind_protect_command (*this);
00100 }