Mercurial > hg > octave-nkf
comparison libinterp/parse-tree/pt-loop.cc @ 15195:2fc554ffbc28
split libinterp from src
* libinterp: New directory. Move all files from src directory here
except Makefile.am, main.cc, main-cli.cc, mkoctfile.in.cc,
mkoctfilr.in.sh, octave-config.in.cc, octave-config.in.sh.
* libinterp/Makefile.am: New file, extracted from src/Makefile.am.
* src/Makefile.am: Delete everything except targets and definitions
needed to build and link main and utility programs.
* Makefile.am (SUBDIRS): Include libinterp in the list.
* autogen.sh: Run config-module.sh in libinterp/dldfcn directory, not
src/dldfcn directory.
* configure.ac (AC_CONFIG_SRCDIR): Use libinterp/octave.cc, not
src/octave.cc.
(DL_LDFLAGS, LIBOCTINTERP): Use libinterp, not src.
(AC_CONFIG_FILES): Include libinterp/Makefile in the list.
* find-docstring-files.sh: Look in libinterp, not src.
* gui/src/Makefile.am (liboctgui_la_CPPFLAGS): Find header files in
libinterp, not src.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 18 Aug 2012 16:23:39 -0400 |
parents | src/parse-tree/pt-loop.cc@46b19589b593 |
children | d63878346099 |
comparison
equal
deleted
inserted
replaced
15194:0f0b795044c3 | 15195:2fc554ffbc28 |
---|---|
1 /* | |
2 | |
3 Copyright (C) 1996-2012 John W. Eaton | |
4 | |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
9 Free Software Foundation; either version 3 of the License, or (at your | |
10 option) any later version. | |
11 | |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with Octave; see the file COPYING. If not, see | |
19 <http://www.gnu.org/licenses/>. | |
20 | |
21 */ | |
22 | |
23 #ifdef HAVE_CONFIG_H | |
24 #include <config.h> | |
25 #endif | |
26 | |
27 #include "quit.h" | |
28 | |
29 #include "error.h" | |
30 #include "gripes.h" | |
31 #include "oct-map.h" | |
32 #include "oct-lvalue.h" | |
33 #include "ov.h" | |
34 #include "pt-arg-list.h" | |
35 #include "pt-bp.h" | |
36 #include "pt-cmd.h" | |
37 #include "pt-exp.h" | |
38 #include "pt-jit.h" | |
39 #include "pt-jump.h" | |
40 #include "pt-loop.h" | |
41 #include "pt-stmt.h" | |
42 #include "pt-walk.h" | |
43 #include "unwind-prot.h" | |
44 | |
45 // While. | |
46 | |
47 tree_while_command::~tree_while_command (void) | |
48 { | |
49 delete expr; | |
50 delete list; | |
51 delete lead_comm; | |
52 delete trail_comm; | |
53 #ifdef HAVE_LLVM | |
54 delete compiled; | |
55 #endif | |
56 } | |
57 | |
58 tree_command * | |
59 tree_while_command::dup (symbol_table::scope_id scope, | |
60 symbol_table::context_id context) const | |
61 { | |
62 return new tree_while_command (expr ? expr->dup (scope, context) : 0, | |
63 list ? list->dup (scope, context) : 0, | |
64 lead_comm ? lead_comm->dup () : 0, | |
65 trail_comm ? trail_comm->dup (): 0, | |
66 line (), column ()); | |
67 } | |
68 | |
69 void | |
70 tree_while_command::accept (tree_walker& tw) | |
71 { | |
72 tw.visit_while_command (*this); | |
73 } | |
74 | |
75 // Do-Until | |
76 | |
77 tree_command * | |
78 tree_do_until_command::dup (symbol_table::scope_id scope, | |
79 symbol_table::context_id context) const | |
80 { | |
81 return new tree_do_until_command (expr ? expr->dup (scope, context) : 0, | |
82 list ? list->dup (scope, context) : 0, | |
83 lead_comm ? lead_comm->dup () : 0, | |
84 trail_comm ? trail_comm->dup (): 0, | |
85 line (), column ()); | |
86 } | |
87 | |
88 void | |
89 tree_do_until_command::accept (tree_walker& tw) | |
90 { | |
91 tw.visit_do_until_command (*this); | |
92 } | |
93 | |
94 // For. | |
95 | |
96 tree_simple_for_command::~tree_simple_for_command (void) | |
97 { | |
98 delete lhs; | |
99 delete expr; | |
100 delete maxproc; | |
101 delete list; | |
102 delete lead_comm; | |
103 delete trail_comm; | |
104 #ifdef HAVE_LLVM | |
105 delete compiled; | |
106 #endif | |
107 } | |
108 | |
109 tree_command * | |
110 tree_simple_for_command::dup (symbol_table::scope_id scope, | |
111 symbol_table::context_id context) const | |
112 { | |
113 return new tree_simple_for_command | |
114 (parallel, lhs ? lhs->dup (scope, context) : 0, | |
115 expr ? expr->dup (scope, context) : 0, | |
116 maxproc ? maxproc->dup (scope, context) : 0, | |
117 list ? list->dup (scope, context) : 0, | |
118 lead_comm ? lead_comm->dup () : 0, | |
119 trail_comm ? trail_comm->dup () : 0, line (), column ()); | |
120 } | |
121 | |
122 void | |
123 tree_simple_for_command::accept (tree_walker& tw) | |
124 { | |
125 tw.visit_simple_for_command (*this); | |
126 } | |
127 | |
128 tree_complex_for_command::~tree_complex_for_command (void) | |
129 { | |
130 delete lhs; | |
131 delete expr; | |
132 delete list; | |
133 delete lead_comm; | |
134 delete trail_comm; | |
135 } | |
136 | |
137 tree_command * | |
138 tree_complex_for_command::dup (symbol_table::scope_id scope, | |
139 symbol_table::context_id context) const | |
140 { | |
141 return new tree_complex_for_command (lhs ? lhs->dup (scope, context) : 0, | |
142 expr ? expr->dup (scope, context) : 0, | |
143 list ? list->dup (scope, context) : 0, | |
144 lead_comm ? lead_comm->dup () : 0, | |
145 trail_comm ? trail_comm->dup () : 0, | |
146 line (), column ()); | |
147 } | |
148 | |
149 void | |
150 tree_complex_for_command::accept (tree_walker& tw) | |
151 { | |
152 tw.visit_complex_for_command (*this); | |
153 } |