stage4/generate_c/generate_c_il.cc
changeset 687 81dcb3987cbb
parent 683 2d96a47a75b1
child 690 6156ee2b4e32
equal deleted inserted replaced
686:9b87606d4c07 687:81dcb3987cbb
  1460   return NULL;
  1460   return NULL;
  1461 }
  1461 }
  1462 
  1462 
  1463 
  1463 
  1464 // SYM_REF1(il_simple_instruction_c, il_simple_instruction, symbol_c *prev_il_instruction;)
  1464 // SYM_REF1(il_simple_instruction_c, il_simple_instruction, symbol_c *prev_il_instruction;)
  1465 void *visit(il_simple_instruction_c *symbol)    {return symbol->il_simple_instruction->accept(*this);}
  1465 void *visit(il_simple_instruction_c *symbol)    {
       
  1466   /* all previous IL instructions should have the same datatype (checked in stage3), so we get the datatype from the first previous IL instruction we find */
       
  1467   implicit_variable_current.datatype = (symbol->prev_il_instruction.empty())? NULL : symbol->prev_il_instruction[0]->datatype;
       
  1468   implicit_variable_result .datatype = symbol->datatype;
       
  1469   
       
  1470   symbol->il_simple_instruction->accept(*this);
       
  1471   
       
  1472   implicit_variable_result .datatype = NULL;
       
  1473   implicit_variable_current.datatype = NULL;
       
  1474   return NULL;
       
  1475 }
       
  1476 
  1466 
  1477 
  1467 /* | il_initial_param_list il_param_instruction */
  1478 /* | il_initial_param_list il_param_instruction */
  1468 // SYM_LIST(il_param_list_c)
  1479 // SYM_LIST(il_param_list_c)
  1469 void *visit(il_param_list_c *symbol)            {ERROR; return NULL;} // should never get called!
  1480 void *visit(il_param_list_c *symbol)            {ERROR; return NULL;} // should never get called!
  1470 
  1481