--- a/stage3/datatype_functions.cc Thu Oct 25 18:51:55 2012 +0100
+++ b/stage3/datatype_functions.cc Fri Oct 26 10:11:28 2012 +0100
@@ -101,10 +101,10 @@
const struct widen_entry widen_ADD_table[] = {
#define __add(TYPE) \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok },
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok },
__ANY_NUM(__add)
#undef __add
@@ -113,54 +113,54 @@
/*** Operations with TIME, DT and TOD... ***/
/*******************************************/
/*******************************************/
- { &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok },
- { &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
- /* not currently supported by stage4, so it is best no tto add it for now... */
-// { &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
- /* not currently supported by stage4, so it is best no tto add it for now... */
-// { &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::time_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::time_type_name, widen_entry::ok },
+ { &get_datatype_info_c::tod_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+ /* not currently supported by stage4, so it is best no tto add it for now... */
+// { &get_datatype_info_c::time_type_name, &get_datatype_info_c::tod_type_name, &get_datatype_info_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::dt_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+ /* not currently supported by stage4, so it is best no tto add it for now... */
+// { &get_datatype_info_c::time_type_name, &get_datatype_info_c::dt_type_name, &get_datatype_info_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
/*******************************/
/* SAFE version on the left... */
/*******************************/
- { &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok },
- { &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
- /* not currently supported by stage4, so it is best no tto add it for now... */
-// { &search_constant_type_c::safetime_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
- /* not currently supported by stage4, so it is best no tto add it for now... */
-// { &search_constant_type_c::safetime_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::time_type_name, widen_entry::ok },
+ { &get_datatype_info_c::safetod_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+ /* not currently supported by stage4, so it is best no tto add it for now... */
+// { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::tod_type_name, &get_datatype_info_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safedt_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+ /* not currently supported by stage4, so it is best no tto add it for now... */
+// { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::dt_type_name, &get_datatype_info_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
/********************************/
/* SAFE version on the right... */
/********************************/
- { &search_constant_type_c::time_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, widen_entry::ok },
- { &search_constant_type_c::tod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
- /* not currently supported by stage4, so it is best no tto add it for now... */
-// { &search_constant_type_c::time_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::dt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
- /* not currently supported by stage4, so it is best no tto add it for now... */
-// { &search_constant_type_c::time_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::time_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::time_type_name, widen_entry::ok },
+ { &get_datatype_info_c::tod_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+ /* not currently supported by stage4, so it is best no tto add it for now... */
+// { &get_datatype_info_c::time_type_name, &get_datatype_info_c::safetod_type_name, &get_datatype_info_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::dt_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+ /* not currently supported by stage4, so it is best no tto add it for now... */
+// { &get_datatype_info_c::time_type_name, &get_datatype_info_c::safedt_type_name, &get_datatype_info_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
/*************************************/
/* SAFE version on left and right... */
/*************************************/
- { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, widen_entry::ok },
- { &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
- /* not currently supported by stage4, so it is best no tto add it for now... */
-// { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
- /* not currently supported by stage4, so it is best no tto add it for now... */
-// { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::safedt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safetime_type_name, widen_entry::ok },
+ { &get_datatype_info_c::safetod_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safetod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+ /* not currently supported by stage4, so it is best no tto add it for now... */
+// { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safetod_type_name, &get_datatype_info_c::safetod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safedt_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safedt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ /* NOTE: the standard des not explicitly support the following semantics. However, since 'addition' is supposed to be commutative, we add it anyway... */
+ /* not currently supported by stage4, so it is best no tto add it for now... */
+// { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safedt_type_name, &get_datatype_info_c::safedt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
{ NULL, NULL, NULL, widen_entry::ok },
};
@@ -173,10 +173,10 @@
const struct widen_entry widen_SUB_table[] = {
#define __sub(TYPE) \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok },
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok },
__ANY_NUM(__sub)
#undef __sub
@@ -185,42 +185,42 @@
/*** Operations with TIME, DT and TOD... ***/
/*******************************************/
/*******************************************/
- { &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok },
- { &search_constant_type_c::date_type_name, &search_constant_type_c::date_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::tod_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::dt_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::time_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::time_type_name, widen_entry::ok },
+ { &get_datatype_info_c::date_type_name, &get_datatype_info_c::date_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::tod_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::tod_type_name, &get_datatype_info_c::tod_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::dt_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::dt_type_name, &get_datatype_info_c::dt_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
/*******************************/
/* SAFE version on the left... */
/*******************************/
- { &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, widen_entry::ok },
- { &search_constant_type_c::safedate_type_name, &search_constant_type_c::date_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::safetod_type_name, &search_constant_type_c::tod_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::safedt_type_name, &search_constant_type_c::dt_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::time_type_name, widen_entry::ok },
+ { &get_datatype_info_c::safedate_type_name, &get_datatype_info_c::date_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safetod_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safetod_type_name, &get_datatype_info_c::tod_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safedt_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safedt_type_name, &get_datatype_info_c::dt_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
/********************************/
/* SAFE version on the right... */
/********************************/
- { &search_constant_type_c::time_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, widen_entry::ok },
- { &search_constant_type_c::date_type_name, &search_constant_type_c::safedate_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::tod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::tod_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::dt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::dt_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::time_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::time_type_name, widen_entry::ok },
+ { &get_datatype_info_c::date_type_name, &get_datatype_info_c::safedate_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::tod_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::tod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::tod_type_name, &get_datatype_info_c::safetod_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::dt_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::dt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::dt_type_name, &get_datatype_info_c::safedt_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
/*************************************/
/* SAFE version on left and right... */
/*************************************/
- { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, widen_entry::ok },
- { &search_constant_type_c::safedate_type_name, &search_constant_type_c::safedate_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetod_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safedt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
- { &search_constant_type_c::safedt_type_name, &search_constant_type_c::safedt_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safetime_type_name, widen_entry::ok },
+ { &get_datatype_info_c::safedate_type_name, &get_datatype_info_c::safedate_type_name, &get_datatype_info_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safetod_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safetod_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safetod_type_name, &get_datatype_info_c::safetod_type_name, &get_datatype_info_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safedt_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safedt_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::safedt_type_name, &get_datatype_info_c::safedt_type_name, &get_datatype_info_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
{ NULL, NULL, NULL, widen_entry::ok },
};
@@ -233,10 +233,10 @@
const struct widen_entry widen_MUL_table[] = {
#define __mul(TYPE) \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok },
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok },
__ANY_NUM(__mul)
#undef __mul
@@ -246,15 +246,15 @@
/*******************************************/
/*******************************************/
#define __multime(TYPE) \
- { &search_constant_type_c::time_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
- { &search_constant_type_c::safetime_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
- { &search_constant_type_c::time_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
- { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
+ { &get_datatype_info_c::time_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
+ { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
+ { &get_datatype_info_c::time_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
+ { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
/* NOTE: the standard des not explicitly support the following semantics. However, since 'multiplication' is supposed to be commutative, we add it anyway... */ \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::time_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safetime_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::time_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
__ANY_NUM(__multime)
#undef __multime
@@ -267,10 +267,10 @@
const struct widen_entry widen_DIV_table[] = {
#define __div(TYPE) \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok },
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok },
__ANY_NUM(__div)
#undef __div
@@ -280,10 +280,10 @@
/*******************************************/
/*******************************************/
#define __divtime(TYPE) \
- { &search_constant_type_c::time_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
- { &search_constant_type_c::safetime_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
- { &search_constant_type_c::time_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
- { &search_constant_type_c::safetime_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
+ { &get_datatype_info_c::time_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
+ { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
+ { &get_datatype_info_c::time_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::time_type_name, ANYTIME_OPER_DEPRECATION_STATUS }, \
+ { &get_datatype_info_c::safetime_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safetime_type_name, ANYTIME_OPER_DEPRECATION_STATUS },
__ANY_NUM(__divtime)
#undef __divtime
@@ -295,10 +295,10 @@
const struct widen_entry widen_MOD_table[] = {
#define __mod(TYPE) \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok },
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok },
__ANY_NUM(__mod)
#undef __mod
@@ -310,10 +310,10 @@
const struct widen_entry widen_EXPT_table[] = {
#define __expt(IN2TYPE, IN1TYPE) \
- { &search_constant_type_c::IN1TYPE##_type_name, &search_constant_type_c::IN2TYPE##_type_name, &search_constant_type_c::IN1TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##IN1TYPE##_type_name, &search_constant_type_c::IN2TYPE##_type_name, &search_constant_type_c::IN1TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::IN1TYPE##_type_name, &search_constant_type_c::safe##IN2TYPE##_type_name, &search_constant_type_c::IN1TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##IN1TYPE##_type_name, &search_constant_type_c::safe##IN2TYPE##_type_name, &search_constant_type_c::safe##IN1TYPE##_type_name, widen_entry::ok },
+ { &get_datatype_info_c::IN1TYPE##_type_name, &get_datatype_info_c::IN2TYPE##_type_name, &get_datatype_info_c::IN1TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##IN1TYPE##_type_name, &get_datatype_info_c::IN2TYPE##_type_name, &get_datatype_info_c::IN1TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::IN1TYPE##_type_name, &get_datatype_info_c::safe##IN2TYPE##_type_name, &get_datatype_info_c::IN1TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##IN1TYPE##_type_name, &get_datatype_info_c::safe##IN2TYPE##_type_name, &get_datatype_info_c::safe##IN1TYPE##_type_name, widen_entry::ok },
#define __IN2_anynum_(IN1_TYPENAME) __ANY_NUM_1(__expt,IN1_TYPENAME)
__ANY_REAL(__IN2_anynum_)
#undef __expt
@@ -335,10 +335,10 @@
/* table used by AND and ANDN operators, and and_expression */
const struct widen_entry widen_AND_table[] = {
#define __and(TYPE) \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok },
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok },
__ANY_BIT(__and)
#undef __and
@@ -348,10 +348,10 @@
/* table used by OR and ORN operators, and or_expression */
const struct widen_entry widen_OR_table[] = {
#define __or(TYPE) \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok },
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok },
__ANY_BIT(__or)
#undef __or
@@ -362,10 +362,10 @@
/* table used by XOR and XORN operators, and xor_expression */
const struct widen_entry widen_XOR_table[] = {
#define __xor(TYPE) \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, widen_entry::ok },
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, widen_entry::ok },
__ANY_BIT(__xor)
#undef __xor
@@ -384,10 +384,10 @@
/* table used by GT, GE, EQ, LE, LT, and NE operators, and equivalent ST expressions. */
const struct widen_entry widen_CMP_table[] = {
#define __cmp(TYPE) \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::bool_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::bool_type_name, widen_entry::ok }, \
- { &search_constant_type_c::TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::bool_type_name, widen_entry::ok }, \
- { &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safe##TYPE##_type_name, &search_constant_type_c::safebool_type_name, widen_entry::ok },
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::bool_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::bool_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::bool_type_name, widen_entry::ok }, \
+ { &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safe##TYPE##_type_name, &get_datatype_info_c::safebool_type_name, widen_entry::ok },
__ANY_ELEMENTARY(__cmp)
#undef __cmp
--- a/stage3/fill_candidate_datatypes.cc Thu Oct 25 18:51:55 2012 +0100
+++ b/stage3/fill_candidate_datatypes.cc Fri Oct 26 10:11:28 2012 +0100
@@ -122,8 +122,8 @@
#error __REMOVE__ macro already exists. Choose another name!
#endif
#define __REMOVE__(datatype)\
- remove_from_candidate_datatype_list(&search_constant_type_c::datatype, symbol->candidate_datatypes);\
- remove_from_candidate_datatype_list(&search_constant_type_c::safe##datatype, symbol->candidate_datatypes);
+ remove_from_candidate_datatype_list(&get_datatype_info_c::datatype, symbol->candidate_datatypes);\
+ remove_from_candidate_datatype_list(&get_datatype_info_c::safe##datatype, symbol->candidate_datatypes);
{/* Remove unsigned data types */
uint64_t value = 0;
@@ -426,7 +426,7 @@
for(unsigned int i = 0; i < l_expr->candidate_datatypes.size(); i++)
for(unsigned int j = 0; j < r_expr->candidate_datatypes.size(); j++) {
if ((l_expr->candidate_datatypes[i] == r_expr->candidate_datatypes[j]) && search_base_type.type_is_enumerated(l_expr->candidate_datatypes[i]))
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::bool_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name);
}
return NULL;
}
@@ -451,19 +451,19 @@
#define sizeoftype(symbol) get_sizeof_datatype_c::getsize(symbol)
void *fill_candidate_datatypes_c::handle_any_integer(symbol_c *symbol) {
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::bool_type_name, &search_constant_type_c::safebool_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::byte_type_name, &search_constant_type_c::safebyte_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::word_type_name, &search_constant_type_c::safeword_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::dword_type_name, &search_constant_type_c::safedword_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::lword_type_name, &search_constant_type_c::safelword_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::sint_type_name, &search_constant_type_c::safesint_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::int_type_name, &search_constant_type_c::safeint_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::dint_type_name, &search_constant_type_c::safedint_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::lint_type_name, &search_constant_type_c::safelint_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::usint_type_name, &search_constant_type_c::safeusint_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::uint_type_name, &search_constant_type_c::safeuint_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::udint_type_name, &search_constant_type_c::safeudint_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::ulint_type_name, &search_constant_type_c::safeulint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name, &get_datatype_info_c::safebool_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::byte_type_name, &get_datatype_info_c::safebyte_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::word_type_name, &get_datatype_info_c::safeword_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::dword_type_name, &get_datatype_info_c::safedword_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::lword_type_name, &get_datatype_info_c::safelword_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::sint_type_name, &get_datatype_info_c::safesint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::int_type_name, &get_datatype_info_c::safeint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::dint_type_name, &get_datatype_info_c::safedint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::lint_type_name, &get_datatype_info_c::safelint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::usint_type_name, &get_datatype_info_c::safeusint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::uint_type_name, &get_datatype_info_c::safeuint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::udint_type_name, &get_datatype_info_c::safeudint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::ulint_type_name, &get_datatype_info_c::safeulint_type_name);
remove_incompatible_datatypes(symbol);
if (debug) std::cout << "ANY_INT [" << symbol->candidate_datatypes.size()<< "]" << std::endl;
return NULL;
@@ -472,8 +472,8 @@
void *fill_candidate_datatypes_c::handle_any_real(symbol_c *symbol) {
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::real_type_name, &search_constant_type_c::safereal_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::lreal_type_name, &search_constant_type_c::safelreal_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::real_type_name, &get_datatype_info_c::safereal_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::lreal_type_name, &get_datatype_info_c::safelreal_type_name);
remove_incompatible_datatypes(symbol);
if (debug) std::cout << "ANY_REAL [" << symbol->candidate_datatypes.size() << "]" << std::endl;
return NULL;
@@ -499,10 +499,10 @@
void *fill_candidate_datatypes_c::visit(neg_integer_c *symbol) {
/* Please read the comment in neg_expression_c method, as it also applies here */
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::int_type_name, &search_constant_type_c::safeint_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::sint_type_name, &search_constant_type_c::safesint_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::dint_type_name, &search_constant_type_c::safedint_type_name);
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::lint_type_name, &search_constant_type_c::safelint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::int_type_name, &get_datatype_info_c::safeint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::sint_type_name, &get_datatype_info_c::safesint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::dint_type_name, &get_datatype_info_c::safedint_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::lint_type_name, &get_datatype_info_c::safelint_type_name);
remove_incompatible_datatypes(symbol);
if (debug) std::cout << "neg ANY_INT [" << symbol->candidate_datatypes.size() << "]" << std::endl;
return NULL;
@@ -539,12 +539,12 @@
void *fill_candidate_datatypes_c::visit(boolean_true_c *symbol) {
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::bool_type_name, &search_constant_type_c::safebool_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name, &get_datatype_info_c::safebool_type_name);
return NULL;
}
void *fill_candidate_datatypes_c::visit(boolean_false_c *symbol) {
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::bool_type_name, &search_constant_type_c::safebool_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name, &get_datatype_info_c::safebool_type_name);
return NULL;
}
@@ -552,12 +552,12 @@
/* B.1.2.2 Character Strings */
/*******************************/
void *fill_candidate_datatypes_c::visit(double_byte_character_string_c *symbol) {
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::wstring_type_name, &search_constant_type_c::safewstring_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::wstring_type_name, &get_datatype_info_c::safewstring_type_name);
return NULL;
}
void *fill_candidate_datatypes_c::visit(single_byte_character_string_c *symbol) {
- add_2datatypes_to_candidate_list(symbol, &search_constant_type_c::string_type_name, &search_constant_type_c::safestring_type_name);
+ add_2datatypes_to_candidate_list(symbol, &get_datatype_info_c::string_type_name, &get_datatype_info_c::safestring_type_name);
return NULL;
}
@@ -671,13 +671,13 @@
* if (symbol->value[1] == '\0') ERROR;
*/
switch (symbol->value[2]) {
- case 'x': case 'X': /* bit - 1 bit */ add_datatype_to_candidate_list(symbol, &search_constant_type_c::bool_type_name); break;
- case 'b': case 'B': /* byte - 8 bits */ add_datatype_to_candidate_list(symbol, &search_constant_type_c::byte_type_name); break;
- case 'w': case 'W': /* word - 16 bits */ add_datatype_to_candidate_list(symbol, &search_constant_type_c::word_type_name); break;
- case 'd': case 'D': /* dword - 32 bits */ add_datatype_to_candidate_list(symbol, &search_constant_type_c::dword_type_name); break;
- case 'l': case 'L': /* lword - 64 bits */ add_datatype_to_candidate_list(symbol, &search_constant_type_c::lword_type_name); break;
+ case 'x': case 'X': /* bit - 1 bit */ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name); break;
+ case 'b': case 'B': /* byte - 8 bits */ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::byte_type_name); break;
+ case 'w': case 'W': /* word - 16 bits */ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::word_type_name); break;
+ case 'd': case 'D': /* dword - 32 bits */ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::dword_type_name); break;
+ case 'l': case 'L': /* lword - 64 bits */ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::lword_type_name); break;
/* if none of the above, then the empty string was used <=> boolean */
- default: add_datatype_to_candidate_list(symbol, &search_constant_type_c::bool_type_name); break;
+ default: add_datatype_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name); break;
}
return NULL;
}
@@ -776,44 +776,44 @@
for (unsigned int i = 0; i < symbol->direct_variable->candidate_datatypes.size(); i++) {
switch (get_sizeof_datatype_c::getsize(symbol->direct_variable->candidate_datatypes[i])) {
case 1: /* bit - 1 bit */
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::bool_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safebool_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::bool_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safebool_type_name);
break;
case 8: /* byte - 8 bits */
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::byte_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safebyte_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::sint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safesint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::usint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeusint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::byte_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safebyte_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::sint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safesint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::usint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeusint_type_name);
break;
case 16: /* word - 16 bits */
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::word_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeword_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::int_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::uint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeuint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::word_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeword_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::int_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::uint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeuint_type_name);
break;
case 32: /* dword - 32 bits */
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::dword_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safedword_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::dint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safedint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::udint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeudint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::real_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safereal_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::dword_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safedword_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::dint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safedint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::udint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeudint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::real_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safereal_type_name);
break;
case 64: /* lword - 64 bits */
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::lword_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safelword_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::lint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safelint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::ulint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safeulint_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::lreal_type_name);
- add_datatype_to_candidate_list(symbol, &search_constant_type_c::safelreal_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::lword_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safelword_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::lint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safelint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::ulint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safeulint_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::lreal_type_name);
+ add_datatype_to_candidate_list(symbol, &get_datatype_info_c::safelreal_type_name);
break;
default: /* if none of the above, then no valid datatype allowed... */
break;