author | Mario de Sousa <msousa@fe.up.pt> |
Sat, 03 Mar 2012 20:42:48 +0000 | |
changeset 464 | 319ee8b218f3 |
parent 459 | 01f6664bf8c5 |
child 467 | 4910eaa1206a |
permissions | -rw-r--r-- |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
1 |
/* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
2 |
* matiec - a compiler for the programming languages defined in IEC 61131-3 |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
3 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
4 |
* Copyright (C) 2009-2012 Mario de Sousa (msousa@fe.up.pt) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
5 |
* Copyright (C) 2012 Manuele Conti (conti.ma@alice.it) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
6 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
7 |
* This program is free software: you can redistribute it and/or modify |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
8 |
* it under the terms of the GNU General Public License as published by |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
9 |
* the Free Software Foundation, either version 3 of the License, or |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
10 |
* (at your option) any later version. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
11 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
12 |
* This program is distributed in the hope that it will be useful, |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
15 |
* GNU General Public License for more details. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
16 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
18 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
19 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
20 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
21 |
* This code is made available on the understanding that it will not be |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
22 |
* used in safety-critical situations without a full and competent review. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
23 |
*/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
24 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
25 |
#include "datatype_functions.hh" |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
26 |
#include "../absyntax_utils/absyntax_utils.hh" |
457
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
27 |
#include <vector> |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
28 |
// #include <algorithm> |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
29 |
|
434
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
30 |
|
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
31 |
|
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
32 |
|
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
33 |
|
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
34 |
elementary_type_c *elementary_type_c::singleton = NULL; |
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
35 |
|
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
36 |
const char *elementary_type_c::to_string(symbol_c *symbol) { |
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
37 |
if (NULL == singleton) singleton = new elementary_type_c; |
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
38 |
if (NULL == singleton) ERROR; |
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
39 |
const char *res = (const char *)symbol->accept(*singleton); |
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
40 |
if (NULL == res) { |
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
41 |
int i = 1; |
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
42 |
} |
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
43 |
return res; |
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
44 |
} |
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
45 |
|
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
46 |
|
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
47 |
|
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
48 |
|
c1278e52bcbc
Move elementary_c::to_string() to datatype_functions.cc/hh
Mario de Sousa <msousa@fe.up.pt>
parents:
425
diff
changeset
|
49 |
|
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
50 |
/* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
51 |
* 2.5.1.5.6 Functions of time data types |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
52 |
* Table 30 - page 64 |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
53 |
*/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
54 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
55 |
const struct widen_entry widen_ADD_table[] = { |
458
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
56 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
57 |
{ &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
58 |
{ &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
59 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
60 |
{ &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetod_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
61 |
{ &search_constant_type_c::safedt_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::safedt_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
62 |
{ &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
63 |
{ &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
64 |
{ &search_constant_type_c::tod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::tod_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
65 |
{ &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetod_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
66 |
{ &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
67 |
{ &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
68 |
{ &search_constant_type_c::dt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::dt_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
69 |
{ &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedt_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
70 |
{ NULL, NULL, NULL, widen_entry::ok }, |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
71 |
}; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
72 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
73 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
74 |
const struct widen_entry widen_SUB_table[] = { |
458
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
75 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
76 |
{ &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
77 |
{ &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
78 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
79 |
{ &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetod_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
80 |
{ &search_constant_type_c::safedt_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::safedt_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
81 |
|
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
82 |
{ &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
83 |
{ &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
84 |
{ &search_constant_type_c::tod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::tod_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
85 |
{ &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetod_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
86 |
{ &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
87 |
{ &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
88 |
{ &search_constant_type_c::dt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::dt_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
89 |
{ &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedt_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
90 |
{ &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
91 |
{ &search_constant_type_c::safetod_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
92 |
{ &search_constant_type_c::tod_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
93 |
{ &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
94 |
{ &search_constant_type_c::date_type_name, &search_constant_type_c::date_type_name, &search_constant_type_c::time_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
95 |
{ &search_constant_type_c::safedate_type_name, &search_constant_type_c::date_type_name, &search_constant_type_c::time_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
96 |
{ &search_constant_type_c::date_type_name, &search_constant_type_c::safedate_type_name, &search_constant_type_c::time_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
97 |
{ &search_constant_type_c::safedate_type_name, &search_constant_type_c::safedate_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
98 |
{ &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
99 |
{ &search_constant_type_c::safedt_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
100 |
{ &search_constant_type_c::dt_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
101 |
{ &search_constant_type_c::safedt_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
102 |
{ NULL, NULL, NULL, widen_entry::ok }, |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
103 |
}; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
104 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
105 |
const struct widen_entry widen_MUL_table[] = { |
458
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
106 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::lreal_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
107 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::real_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
108 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::dint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
109 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::int_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
110 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::sint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
111 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::ulint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
112 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::udint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
113 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::uint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
114 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::usint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
115 |
|
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
116 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::lreal_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
117 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::real_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
118 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::dint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
119 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::int_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
120 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::sint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
121 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::ulint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
122 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::udint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
123 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::uint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
124 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::usint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
125 |
|
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
126 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safelreal_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
127 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safereal_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
128 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
129 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safeint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
130 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safesint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
131 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safeulint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
132 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safeudint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
133 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safeuint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
134 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safeusint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
135 |
|
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
136 |
{ NULL, NULL, NULL, widen_entry::ok }, |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
137 |
}; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
138 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
139 |
const struct widen_entry widen_DIV_table[] = { |
458
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
140 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::lreal_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
141 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::real_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
142 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::dint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
143 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::int_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
144 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::sint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
145 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::ulint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
146 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::udint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
147 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::uint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
148 |
{ &search_constant_type_c::time_type_name, &search_constant_type_c::usint_type_name, &search_constant_type_c::time_type_name , widen_entry::deprecated }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
149 |
|
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
150 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::lreal_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
151 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::real_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
152 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::dint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
153 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::int_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
154 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::sint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
155 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::ulint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
156 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::udint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
157 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::uint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
158 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::usint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
159 |
|
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
160 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safelreal_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
161 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safereal_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
162 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
163 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safeint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
164 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safesint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
165 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safeulint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
166 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safeudint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
167 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safeuint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
168 |
{ &search_constant_type_c::safetime_type_name, &search_constant_type_c::safeusint_type_name, &search_constant_type_c::safetime_type_name , widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
169 |
|
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
170 |
{ NULL, NULL, NULL, widen_entry::ok }, |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
171 |
}; |
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
172 |
|
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
173 |
|
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
174 |
|
425
c8e6cf57324a
Print error messages when datatype erros found in ST function/FB calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
175 |
/* Search for a datatype inside a candidate_datatypes list. |
c8e6cf57324a
Print error messages when datatype erros found in ST function/FB calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
176 |
* Returns: position of datatype in the list, or -1 if not found. |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
177 |
*/ |
445
e6c34ee82954
Change name help function.
Conti Manuele <conti.ma@alice.it>
parents:
443
diff
changeset
|
178 |
int search_in_candidate_datatype_list(symbol_c *datatype, std::vector <symbol_c *> candidate_datatypes) { |
443
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
179 |
if (NULL == datatype) |
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
180 |
return -1; |
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
181 |
|
425
c8e6cf57324a
Print error messages when datatype erros found in ST function/FB calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
182 |
for(unsigned int i = 0; i < candidate_datatypes.size(); i++) |
c8e6cf57324a
Print error messages when datatype erros found in ST function/FB calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
183 |
if (is_type_equal(datatype, candidate_datatypes[i])) |
c8e6cf57324a
Print error messages when datatype erros found in ST function/FB calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
184 |
return i; |
c8e6cf57324a
Print error messages when datatype erros found in ST function/FB calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
185 |
/* Not found ! */ |
c8e6cf57324a
Print error messages when datatype erros found in ST function/FB calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
186 |
return -1; |
c8e6cf57324a
Print error messages when datatype erros found in ST function/FB calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
187 |
} |
c8e6cf57324a
Print error messages when datatype erros found in ST function/FB calls.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
188 |
|
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
189 |
|
443
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
190 |
|
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
191 |
|
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
192 |
|
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
193 |
/* Copy the elements in the candidate_datatype_list in one symbol (from) |
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
194 |
* into the candidate_datatype_list of another symbol (to) |
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
195 |
*/ |
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
196 |
void copy_candidate_datatype_list(symbol_c *from, symbol_c *to) { |
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
197 |
if ((NULL == from) || (NULL == to)) |
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
198 |
return; |
447
aad0f3e5df33
Start of support for semantic verification of FB calls in IL using special IL instructions.
Mario de Sousa <msousa@fe.up.pt>
parents:
445
diff
changeset
|
199 |
for(unsigned int i = 0; i < from->candidate_datatypes.size(); i++) |
aad0f3e5df33
Start of support for semantic verification of FB calls in IL using special IL instructions.
Mario de Sousa <msousa@fe.up.pt>
parents:
445
diff
changeset
|
200 |
to->candidate_datatypes.push_back(from->candidate_datatypes[i]); |
aad0f3e5df33
Start of support for semantic verification of FB calls in IL using special IL instructions.
Mario de Sousa <msousa@fe.up.pt>
parents:
445
diff
changeset
|
201 |
/* for some reason, the following alternative implementation results in a segmentation fault! I am not going to bother with this for now! */ |
aad0f3e5df33
Start of support for semantic verification of FB calls in IL using special IL instructions.
Mario de Sousa <msousa@fe.up.pt>
parents:
445
diff
changeset
|
202 |
// std::copy(from->candidate_datatypes.begin(), from->candidate_datatypes.end(), to->candidate_datatypes.begin()); |
443
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
203 |
} |
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
204 |
|
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
205 |
|
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
206 |
|
457
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
207 |
/* Intersect two candidate_datatype_lists. |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
208 |
* Remove from list1 (origin, dest.) all elements that are not found in list2 (with). |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
209 |
* In essence, list1 will contain the result of the intersection of list1 with list2. |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
210 |
* In other words, modify list1 so it only contains the elelements that are simultaneously in list1 and list2! |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
211 |
*/ |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
212 |
void intersect_candidate_datatype_list(symbol_c *list1 /*origin, dest.*/, symbol_c *list2 /*with*/) { |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
213 |
if ((NULL == list1) || (NULL == list2)) |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
214 |
/* In principle, we should never call it with NULL values. Best to abort the compiler just in case! */ |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
215 |
return; |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
216 |
|
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
217 |
for(std::vector<symbol_c *>::iterator i = list1->candidate_datatypes.begin(); i < list1->candidate_datatypes.end(); ) { |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
218 |
/* Note that we do _not_ increment i in the for() loop! |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
219 |
* When we erase an element from position i, a new element will take it's place, that must also be tested! |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
220 |
*/ |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
221 |
if (search_in_candidate_datatype_list(*i, list2->candidate_datatypes) < 0) |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
222 |
/* remove this element! This will change the value of candidate_datatypes.size() */ |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
223 |
list1->candidate_datatypes.erase(i); |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
224 |
else i++; |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
225 |
} |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
226 |
} |
67d8b07bac22
Change prev_il_instruction to a vector<>
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
227 |
|
443
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
228 |
|
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
436
diff
changeset
|
229 |
|
458
587884880be6
iAdd warning for deprecated operations.
Conti Manuele <conti.ma@alice.it>
parents:
457
diff
changeset
|
230 |
|
459
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
231 |
/* intersect the candidate_datatype lists of all prev_il_intructions, and set the local candidate_datatype list to the result! */ |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
232 |
void intersect_prev_candidate_datatype_lists(il_instruction_c *symbol) { |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
233 |
if (symbol->prev_il_instruction.empty()) |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
234 |
return; |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
235 |
|
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
236 |
copy_candidate_datatype_list(symbol->prev_il_instruction[0] /*from*/, symbol /*to*/); |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
237 |
for (unsigned int i = 1; i < symbol->prev_il_instruction.size(); i++) { |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
238 |
intersect_candidate_datatype_list(symbol /*origin, dest.*/, symbol->prev_il_instruction[i] /*with*/); |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
239 |
} |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
240 |
} |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
241 |
|
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
242 |
|
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
243 |
|
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
244 |
|
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
245 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
246 |
bool is_ANY_ELEMENTARY_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
247 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
248 |
return is_ANY_MAGNITUDE_type(type_symbol) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
249 |
|| is_ANY_BIT_type (type_symbol) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
250 |
|| is_ANY_STRING_type (type_symbol) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
251 |
|| is_ANY_DATE_type (type_symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
252 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
253 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
254 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
255 |
bool is_ANY_SAFEELEMENTARY_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
256 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
257 |
return is_ANY_SAFEMAGNITUDE_type(type_symbol) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
258 |
|| is_ANY_SAFEBIT_type (type_symbol) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
259 |
|| is_ANY_SAFESTRING_type (type_symbol) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
260 |
|| is_ANY_SAFEDATE_type (type_symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
261 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
262 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
263 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
264 |
bool is_ANY_ELEMENTARY_compatible(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
265 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
266 |
/* NOTE: doing |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
267 |
* return is_ANY_SAFEELEMENTARY_type() || is_ANY_ELEMENTARY_type() |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
268 |
* is incorrect, as the literals would never be considered compatible... |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
269 |
*/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
270 |
return is_ANY_MAGNITUDE_compatible(type_symbol) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
271 |
|| is_ANY_BIT_compatible (type_symbol) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
272 |
|| is_ANY_STRING_compatible (type_symbol) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
273 |
|| is_ANY_DATE_compatible (type_symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
274 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
275 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
276 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
277 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
278 |
bool is_ANY_MAGNITUDE_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
279 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
280 |
if (typeid(*type_symbol) == typeid(time_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
281 |
return is_ANY_NUM_type(type_symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
282 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
283 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
284 |
/* A helper function... */ |
435
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
285 |
bool is_ANY_signed_MAGNITUDE_type(symbol_c *type_symbol) { |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
286 |
if (type_symbol == NULL) {return false;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
287 |
if (typeid(*type_symbol) == typeid(time_type_name_c)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
288 |
return is_ANY_signed_NUM_type(type_symbol); |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
289 |
} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
290 |
|
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
291 |
/* A helper function... */ |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
292 |
bool is_ANY_SAFEMAGNITUDE_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
293 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
294 |
if (typeid(*type_symbol) == typeid(safetime_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
295 |
return is_ANY_SAFENUM_type(type_symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
296 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
297 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
298 |
/* A helper function... */ |
435
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
299 |
bool is_ANY_signed_SAFEMAGNITUDE_type(symbol_c *type_symbol) { |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
300 |
if (type_symbol == NULL) {return false;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
301 |
if (typeid(*type_symbol) == typeid(safetime_type_name_c)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
302 |
return is_ANY_signed_SAFENUM_type(type_symbol); |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
303 |
} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
304 |
|
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
305 |
/* A helper function... */ |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
306 |
bool is_ANY_MAGNITUDE_compatible(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
307 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
308 |
if (is_ANY_MAGNITUDE_type (type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
309 |
if (is_ANY_SAFEMAGNITUDE_type(type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
310 |
return is_ANY_NUM_compatible(type_symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
311 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
312 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
313 |
/* A helper function... */ |
435
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
314 |
bool is_ANY_signed_MAGNITUDE_compatible(symbol_c *type_symbol) { |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
315 |
if (type_symbol == NULL) {return false;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
316 |
if (is_ANY_signed_MAGNITUDE_type (type_symbol)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
317 |
if (is_ANY_signed_SAFEMAGNITUDE_type(type_symbol)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
318 |
return is_ANY_signed_NUM_compatible(type_symbol); |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
319 |
} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
320 |
|
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
321 |
/* A helper function... */ |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
322 |
bool is_ANY_NUM_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
323 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
324 |
if (is_ANY_REAL_type(type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
325 |
if (is_ANY_INT_type(type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
326 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
327 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
328 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
329 |
/* A helper function... */ |
435
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
330 |
bool is_ANY_signed_NUM_type(symbol_c *type_symbol) { |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
331 |
if (type_symbol == NULL) {return false;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
332 |
if (is_ANY_REAL_type(type_symbol)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
333 |
if (is_ANY_signed_INT_type(type_symbol)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
334 |
return false; |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
335 |
} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
336 |
|
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
337 |
/* A helper function... */ |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
338 |
bool is_ANY_SAFENUM_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
339 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
340 |
return is_ANY_SAFEREAL_type(type_symbol) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
341 |
|| is_ANY_SAFEINT_type (type_symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
342 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
343 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
344 |
/* A helper function... */ |
435
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
345 |
bool is_ANY_signed_SAFENUM_type(symbol_c *type_symbol) { |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
346 |
if (type_symbol == NULL) {return false;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
347 |
return is_ANY_SAFEREAL_type(type_symbol) |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
348 |
|| is_ANY_signed_SAFEINT_type (type_symbol); |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
349 |
} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
350 |
|
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
351 |
/* A helper function... */ |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
352 |
bool is_ANY_NUM_compatible(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
353 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
354 |
if (is_ANY_REAL_compatible(type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
355 |
if (is_ANY_INT_compatible(type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
356 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
357 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
358 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
359 |
/* A helper function... */ |
435
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
360 |
bool is_ANY_signed_NUM_compatible(symbol_c *type_symbol) { |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
361 |
if (type_symbol == NULL) {return false;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
362 |
if (is_ANY_REAL_compatible(type_symbol)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
363 |
if (is_ANY_signed_INT_compatible(type_symbol)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
364 |
return false; |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
365 |
} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
366 |
|
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
367 |
/* A helper function... */ |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
368 |
bool is_ANY_DATE_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
369 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
370 |
if (typeid(*type_symbol) == typeid(date_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
371 |
if (typeid(*type_symbol) == typeid(tod_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
372 |
if (typeid(*type_symbol) == typeid(dt_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
373 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
374 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
375 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
376 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
377 |
bool is_ANY_SAFEDATE_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
378 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
379 |
if (typeid(*type_symbol) == typeid(safedate_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
380 |
if (typeid(*type_symbol) == typeid(safetod_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
381 |
if (typeid(*type_symbol) == typeid(safedt_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
382 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
383 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
384 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
385 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
386 |
bool is_ANY_DATE_compatible(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
387 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
388 |
if (is_ANY_DATE_type (type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
389 |
if (is_ANY_SAFEDATE_type(type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
390 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
391 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
392 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
393 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
394 |
bool is_ANY_STRING_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
395 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
396 |
if (typeid(*type_symbol) == typeid(string_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
397 |
if (typeid(*type_symbol) == typeid(wstring_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
398 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
399 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
400 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
401 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
402 |
bool is_ANY_SAFESTRING_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
403 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
404 |
if (typeid(*type_symbol) == typeid(safestring_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
405 |
if (typeid(*type_symbol) == typeid(safewstring_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
406 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
407 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
408 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
409 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
410 |
bool is_ANY_STRING_compatible(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
411 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
412 |
if (is_ANY_STRING_type (type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
413 |
if (is_ANY_SAFESTRING_type(type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
414 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
415 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
416 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
417 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
418 |
bool is_ANY_INT_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
419 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
420 |
if (typeid(*type_symbol) == typeid(sint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
421 |
if (typeid(*type_symbol) == typeid(int_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
422 |
if (typeid(*type_symbol) == typeid(dint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
423 |
if (typeid(*type_symbol) == typeid(lint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
424 |
if (typeid(*type_symbol) == typeid(usint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
425 |
if (typeid(*type_symbol) == typeid(uint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
426 |
if (typeid(*type_symbol) == typeid(udint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
427 |
if (typeid(*type_symbol) == typeid(ulint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
428 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
429 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
430 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
431 |
/* A helper function... */ |
435
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
432 |
bool is_ANY_signed_INT_type(symbol_c *type_symbol) { |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
433 |
if (type_symbol == NULL) {return false;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
434 |
if (typeid(*type_symbol) == typeid(sint_type_name_c)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
435 |
if (typeid(*type_symbol) == typeid(int_type_name_c)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
436 |
if (typeid(*type_symbol) == typeid(dint_type_name_c)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
437 |
if (typeid(*type_symbol) == typeid(lint_type_name_c)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
438 |
return false; |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
439 |
} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
440 |
|
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
441 |
/* A helper function... */ |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
442 |
bool is_ANY_signed_SAFEINT_type(symbol_c *type_symbol) { |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
443 |
if (type_symbol == NULL) {return false;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
444 |
if (typeid(*type_symbol) == typeid(safesint_type_name_c)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
445 |
if (typeid(*type_symbol) == typeid(safeint_type_name_c)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
446 |
if (typeid(*type_symbol) == typeid(safedint_type_name_c)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
447 |
if (typeid(*type_symbol) == typeid(safelint_type_name_c)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
448 |
return false; |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
449 |
} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
450 |
|
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
451 |
/* A helper function... */ |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
452 |
bool is_ANY_SAFEINT_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
453 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
454 |
if (typeid(*type_symbol) == typeid(safesint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
455 |
if (typeid(*type_symbol) == typeid(safeint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
456 |
if (typeid(*type_symbol) == typeid(safedint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
457 |
if (typeid(*type_symbol) == typeid(safelint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
458 |
if (typeid(*type_symbol) == typeid(safeusint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
459 |
if (typeid(*type_symbol) == typeid(safeuint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
460 |
if (typeid(*type_symbol) == typeid(safeudint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
461 |
if (typeid(*type_symbol) == typeid(safeulint_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
462 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
463 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
464 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
465 |
/* A helper function... */ |
435
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
466 |
bool is_ANY_signed_INT_compatible(symbol_c *type_symbol) { |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
467 |
if (type_symbol == NULL) {return false;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
468 |
if (is_ANY_signed_INT_type (type_symbol)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
469 |
if (is_ANY_signed_SAFEINT_type(type_symbol)) {return true;} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
470 |
return false; |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
471 |
} |
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
472 |
|
82cb6a64a763
Change negation expression (neg_expression_c) to only allow signed data types.
Mario de Sousa <msousa@fe.up.pt>
parents:
434
diff
changeset
|
473 |
/* A helper function... */ |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
474 |
bool is_ANY_INT_compatible(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
475 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
476 |
if (is_ANY_INT_type (type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
477 |
if (is_ANY_SAFEINT_type(type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
478 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
479 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
480 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
481 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
482 |
bool is_ANY_REAL_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
483 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
484 |
if (typeid(*type_symbol) == typeid(real_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
485 |
if (typeid(*type_symbol) == typeid(lreal_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
486 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
487 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
488 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
489 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
490 |
bool is_ANY_SAFEREAL_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
491 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
492 |
if (typeid(*type_symbol) == typeid(safereal_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
493 |
if (typeid(*type_symbol) == typeid(safelreal_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
494 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
495 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
496 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
497 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
498 |
bool is_ANY_REAL_compatible(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
499 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
500 |
if (is_ANY_REAL_type (type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
501 |
if (is_ANY_SAFEREAL_type(type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
502 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
503 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
504 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
505 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
506 |
bool is_ANY_BIT_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
507 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
508 |
if (typeid(*type_symbol) == typeid(bool_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
509 |
if (typeid(*type_symbol) == typeid(byte_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
510 |
if (typeid(*type_symbol) == typeid(word_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
511 |
if (typeid(*type_symbol) == typeid(dword_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
512 |
if (typeid(*type_symbol) == typeid(lword_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
513 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
514 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
515 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
516 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
517 |
bool is_ANY_SAFEBIT_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
518 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
519 |
if (typeid(*type_symbol) == typeid(safebool_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
520 |
if (typeid(*type_symbol) == typeid(safebyte_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
521 |
if (typeid(*type_symbol) == typeid(safeword_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
522 |
if (typeid(*type_symbol) == typeid(safedword_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
523 |
if (typeid(*type_symbol) == typeid(safelword_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
524 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
525 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
526 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
527 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
528 |
bool is_ANY_BIT_compatible(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
529 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
530 |
if (is_ANY_BIT_type (type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
531 |
if (is_ANY_SAFEBIT_type(type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
532 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
533 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
534 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
535 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
536 |
bool is_BOOL_type(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
537 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
538 |
if (typeid(*type_symbol) == typeid(bool_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
539 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
540 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
541 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
542 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
543 |
bool is_SAFEBOOL_type(symbol_c *type_symbol){ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
544 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
545 |
if (typeid(*type_symbol) == typeid(safebool_type_name_c)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
546 |
return false; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
547 |
} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
548 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
549 |
/* A helper function... */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
550 |
bool is_ANY_BOOL_compatible(symbol_c *type_symbol) { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
551 |
if (type_symbol == NULL) {return false;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
552 |
if (is_BOOL_type (type_symbol)) {return true;} |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
553 |
if (is_SAFEBOOL_type(type_symbol)) {return true;} |
436 | 554 |
return false; |
555 |
} |
|
556 |
||
557 |
||
558 |
||
559 |
||
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
560 |
|
459
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
561 |
bool is_type_equal(symbol_c *first_type, symbol_c *second_type) { |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
562 |
if ((NULL == first_type) || (NULL == second_type)) |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
563 |
return false; |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
564 |
if (typeid(* first_type) == typeid(invalid_type_name_c)) |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
565 |
return false; |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
566 |
if (typeid(*second_type) == typeid(invalid_type_name_c)) |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
567 |
return false; |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
568 |
|
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
569 |
if (is_ANY_ELEMENTARY_type(first_type)) { |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
570 |
if (typeid(*first_type) == typeid(*second_type)) |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
571 |
return true; |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
572 |
} else /* ANY_DERIVED */ |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
573 |
return (first_type == second_type); |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
574 |
|
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
575 |
return false; |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
576 |
} |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
577 |
|
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
578 |
|
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
579 |
|
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
580 |
bool is_type_valid(symbol_c *type) { |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
581 |
if (NULL == type) |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
582 |
return false; |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
583 |
if (typeid(*type) == typeid(invalid_type_name_c)) |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
584 |
return false; |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
585 |
|
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
586 |
return true; |
01f6664bf8c5
Continue adding support for semantic verification of JMP and RET.
Mario de Sousa <msousa@fe.up.pt>
parents:
458
diff
changeset
|
587 |
} |