home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #4 / amigaacscoverdisc1998-041998.iso / utilities / shareware / dev / ppcsmalleiffel / source.lha / bin_c / compile_to_jvm34.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  7.5 KB  |  246 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "compile_to_jvm.h"
  9. int r90standard_compile_to_jvm_into(T90* C,T0* a1){
  10. int R=0;
  11. /*[IRF3.4compile_to_jvm*//*[IRF3.6call_proc_call_c2jvm*/{T90* C1=C;
  12. r228b_put_cpc(((T228*)(oBC364jvm)),(T0*)C1);
  13. }/*]*/
  14. /*]*/
  15. R=X291jvm_convert_to(X291run_type((((T90*)C))->_result_type/*20*/),a1);
  16. return R;
  17. }
  18. /*No:CALL_INFIX_IMPLIES.call_proc_call_c2jvm*/
  19. void r90afd_check(T90* C){
  20. T0* _running=NULL;
  21. T0* _rc=NULL;
  22. _rc=X291run_class(X662result_type((((T90*)C))->_target/*12*/));
  23. _running=(((T355*)((T355*)_rc)))->_running/*12*/;
  24. /*IF*/if ((_running)==((void*)(NULL))) {
  25. r683add_position(X662start_position((((T90*)C))->_target/*12*/));
  26. /*[IRF3.6append*/{T0* b1=((T0*)ms1_135);
  27. r7append(((T7*)(oBC683explanation)),b1);
  28. }/*]*/
  29. /*[IRF3.6append*/{T0* b1=X291run_time_mark((((T355*)((T355*)_rc)))->_current_type/*0*/);
  30. r7append(((T7*)(oBC683explanation)),b1);
  31. }/*]*/
  32. /*[IRF3.6append*/{T0* b1=((T0*)ms141_470);
  33. r7append(((T7*)(oBC683explanation)),b1);
  34. }/*]*/
  35. r683print_as_warning(((T683*)(oBC364eh)));
  36. r355set_at_run_time(((T355*)_rc));
  37. }
  38.  else if ((r396count(((T396*)_running)))>(0)) {
  39. r576update((((T90*)C))->_target/*12*/,(((T90*)C))->_run_feature/*16*/);
  40. }
  41. /*FI*/X662afd_check((((T90*)C))->_target/*12*/);
  42. /*IF*/{/*AT*/r431afd_check(((T431*)((((T90*)C))->_arguments/*24*/)));
  43. }
  44. /*FI*/}
  45. T0* r715add_comment(T715* C,T0* a1){
  46. T0* R=NULL;
  47. /*IF*/if (((a1)==((void*)(NULL)))||((/*(IRF4.6count*/r52count(((T52*)((((T393*)((T393*)a1)))->_list/*4*/)))/*)*/)==(0))) {
  48. R=(T0*)C;
  49. }
  50. else {
  51. {T529*n=malloc(sizeof(*n));
  52. *n=M529;
  53. r529make(n,(T0*)C,a1);
  54. R=(T0*)n;
  55. }
  56. }
  57. /*FI*/return R;
  58. }
  59. int r715to_integer(T715* C){
  60. int R=0;
  61. r715error((((T715*)C))->_start_position/*16*/,((T0*)ms69_470));
  62. return R;
  63. }
  64. int r715is_a(T715* C,T0* a1){
  65. int R=0;
  66. R=X291is_a(X291run_type((((T715*)C))->_result_type/*20*/),X291run_type(X662result_type(a1)));
  67. /*IF*/if (!(R)) {
  68. r683add_position((((T715*)C))->_start_position/*16*/);
  69. r715error(X662start_position(a1),((T0*)ms4_662));
  70. }
  71. /*FI*/return R;
  72. }
  73. /*No:E_RESULT.is_current*/
  74. int r715jvm_branch_if_false(T715* C){
  75. int R=0;
  76. r715compile_to_jvm(C);
  77. R=r256opcode_ifeq(((T256*)(oBC364code_attribute)));
  78. return R;
  79. }
  80. /*No:E_RESULT.static_value*/
  81. void r715make(T715* C,T0* a1){
  82. C->_to_string=((T0*)ms146_473);
  83. C->_start_position=a1;
  84. }
  85. /*No:E_RESULT.to_string*/
  86. void r715compile_to_jvm_assignment(T715* C,T0* a1){
  87. int _jvm_offset=0;
  88. int _space=0;
  89. _jvm_offset=r228result_offset(((T228*)(oBC364jvm)));
  90. _space=X662compile_to_jvm_into((((T629*)((T629*)a1)))->_right_side/*12*/,X291run_type((((T715*)C))->_result_type/*20*/));
  91. X291jvm_write_local(X291run_type((((T715*)C))->_result_type/*20*/),_jvm_offset);
  92. }
  93. /*No:E_RESULT.fz_iinaiv*/
  94. int r715jvm_branch_if_true(T715* C){
  95. int R=0;
  96. r715compile_to_jvm(C);
  97. R=r256opcode_ifne(((T256*)(oBC364code_attribute)));
  98. return R;
  99. }
  100. /*No:E_RESULT.start_position*/
  101. /*No:E_RESULT.compile_to_jvm_old*/
  102. T0* r715to_runnable(T715* C,T0* a1){
  103. T0* R=NULL;
  104. /*IF*/if (((((T715*)C))->_current_type/*8*/)==((void*)(NULL))) {
  105. C->_current_type=a1;
  106. C->_result_type=/*X496*/((T0*)(((T832*)((T832*)(r604top_rf(((T604*)(oBC364small_eiffel)))))))->_result_type/*24*/);
  107. R=(T0*)C;
  108. }
  109. else {
  110. {T715*n=malloc(sizeof(*n));
  111. *n=M715;
  112. r715make(n,(((T715*)C))->_start_position/*16*/);
  113. R=(T0*)n;
  114. }
  115. R=r715to_runnable(((T715*)R),a1);
  116. }
  117. /*FI*/return R;
  118. }
  119. /*No:E_RESULT.result_type*/
  120. /*No:E_RESULT.is_result*/
  121. /*No:E_RESULT.is_static*/
  122. void r715standard_compile_target_to_jvm(T715* C){
  123. r715compile_to_jvm(C);
  124. X291jvm_check_class_invariant((((T715*)C))->_result_type/*20*/);
  125. }
  126. int r715compile_to_jvm_into(T715* C,T0* a1){
  127. int R=0;
  128. R=r715standard_compile_to_jvm_into(C,a1);
  129. return R;
  130. }
  131. /*No:E_RESULT.compile_target_to_jvm*/
  132. /*No:E_RESULT.us_result*/
  133. /*No:E_RESULT.can_be_dropped*/
  134. /*No:E_RESULT.current_type*/
  135. void r715jvm_assign(T715* C){
  136. int _jvm_offset=0;
  137. _jvm_offset=r228result_offset(((T228*)(oBC364jvm)));
  138. X291jvm_write_local(X291run_type((((T715*)C))->_result_type/*20*/),_jvm_offset);
  139. }
  140. /*No:E_RESULT.static_value_mem*/
  141. /*No:E_RESULT.is_manifest_string*/
  142. /*No:E_RESULT.is_void*/
  143. void r715compile_to_jvm(T715* C){
  144. int _jvm_offset=0;
  145. _jvm_offset=r228result_offset(((T228*)(oBC364jvm)));
  146. X291jvm_push_local(X291run_type((((T715*)C))->_result_type/*20*/),_jvm_offset);
  147. }
  148. /*No:E_RESULT.is_pre_computable*/
  149. /*No:E_RESULT.use_current*/
  150. void r715error(T0* a1,T0* a2){
  151. r683add_position(a1);
  152. r683error(((T683*)(oBC364eh)),a2);
  153. }
  154. /*No:E_RESULT.isa_dca_inline_argument*/
  155. int r715standard_compile_to_jvm_into(T715* C,T0* a1){
  156. int R=0;
  157. r715compile_to_jvm(C);
  158. R=X291jvm_convert_to(X291run_type((((T715*)C))->_result_type/*20*/),a1);
  159. return R;
  160. }
  161. /*No:E_RESULT.afd_check*/
  162. /*No:CREATION_CLAUSE_LIST.make*/
  163. T0* r391start_position(T391* C){
  164. T0* R=NULL;
  165. R=(((T583*)((T583*)(r235first(((T235*)((((T391*)C))->_list/*0*/)))))))->_start_position/*0*/;
  166. return R;
  167. }
  168. void r391check_expanded_with(T391* C,T0* a1){
  169. /*IF*/if (((((T235*)((T235*)((((T391*)C))->_list/*0*/))))->_upper/*8*/)>(1)) {
  170. r683add_type(a1,((T0*)ms65_470));
  171. r683add_position((((T583*)((T583*)(r235item(((T235*)((((T391*)C))->_list/*0*/)),1)))))->_start_position/*0*/);
  172. r683add_position((((T583*)((T583*)(r235item(((T235*)((((T391*)C))->_list/*0*/)),2)))))->_start_position/*0*/);
  173. /*[IRF3.2fatal_error_vtec_2*//*[IRF3.6fatal_error*/{T0* b1=((T0*)ms12_364);
  174. r683fatal_error(((T683*)(oBC364eh)),b1);
  175. }/*]*/
  176. /*]*/
  177. }
  178. /*FI*/r583check_expanded_with(((T583*)(r235item(((T235*)((((T391*)C))->_list/*0*/)),1))),a1);
  179. }
  180. T0* r391get_clause(T391* C,T0* a1){
  181. T0* R=NULL;
  182. int _i=0;
  183. _i=1;
  184. while (!(((_i)>((((T235*)((T235*)((((T391*)C))->_list/*0*/))))->_upper/*8*/))||(r583has(((T583*)(r235item(((T235*)((((T391*)C))->_list/*0*/)),_i))),a1)))) {
  185. _i=(_i)+(1);
  186. }
  187. /*IF*/if ((_i)<=((((T235*)((T235*)((((T391*)C))->_list/*0*/))))->_upper/*8*/)) {
  188. R=r235item(((T235*)((((T391*)C))->_list/*0*/)),_i);
  189. }
  190. /*FI*/return R;
  191. }
  192. /*No:CREATION_CLAUSE_LIST.list*/
  193. T0* r391expanded_initializer(T391* C,T0* a1){
  194. T0* R=NULL;
  195. R=r583expanded_initializer(((T583*)(r235item(((T235*)((((T391*)C))->_list/*0*/)),1))),a1);
  196. return R;
  197. }
  198. /*No:CREATION_CLAUSE_LIST.fz_cbe*/
  199. /*No:CREATION_CLAUSE_LIST.fatal_error_vtec_2*/
  200. /*No:CREATION_CLAUSE_LIST.add_last*/
  201. /*No:CREATION_CLAUSE_LIST.fatal_error*/
  202. /*No:RUN_REQUIRE.make*/
  203. /*No:RUN_REQUIRE.list*/
  204. void r567compile_to_jvm(T567* C){
  205. T0* _ca=NULL;
  206. int _i=0;
  207. /*IF*/if (r590require_check(((T590*)(oBC364run_control)))) {
  208. _ca=oBC364code_attribute;
  209. /*IF*/if (((((T522*)((T522*)((((T567*)C))->_list/*0*/))))->_upper/*8*/)==(1)) {
  210. r343compile_to_jvm(((T343*)(r522first(((T522*)((((T567*)C))->_list/*0*/))))),1);
  211. }
  212. else {
  213. /*[IRF3.3clear*/((((T226*)(((T226*)(oBC567points1)))))->_upper)=(-(1));
  214. /*]*/
  215. _i=1;
  216. while (!((_i)>(((((T522*)((T522*)((((T567*)C))->_list/*0*/))))->_upper/*8*/)-(1)))) {
  217. r343compile_to_jvm(((T343*)(r522item(((T522*)((((T567*)C))->_list/*0*/)),_i))),0);
  218. r226add_last(((T226*)(oBC567points1)),r256opcode_ifne(((T256*)_ca)));
  219. _i=(_i)+(1);
  220. }
  221. r343compile_to_jvm(((T343*)(r522item(((T522*)((((T567*)C))->_list/*0*/)),_i))),1);
  222. r256resolve_with(oBC567points1);
  223. }
  224. /*FI*/}
  225. /*FI*/}
  226. int r567use_current(T567* C){
  227. int R=0;
  228. int _i=0;
  229. _i=1;
  230. while (!((R)||((_i)>((((T522*)((T522*)((((T567*)C))->_list/*0*/))))->_upper/*8*/)))) {
  231. R=r343use_current(((T343*)(r522item(((T522*)((((T567*)C))->_list/*0*/)),_i))));
  232. _i=(_i)+(1);
  233. }
  234. return R;
  235. }
  236. void r567afd_check(T567* C){
  237. int _i=0;
  238. _i=(((T522*)((T522*)((((T567*)C))->_list/*0*/))))->_upper/*8*/;
  239. while (!((_i)==(0))) {
  240. r343afd_check(((T343*)(r522item(((T522*)((((T567*)C))->_list/*0*/)),_i))));
  241. _i=(_i)-(1);
  242. }
  243. }
  244. T0*oBC567points1=NULL;
  245.  
  246.