Ignore:
Timestamp:
Aug 6, 2003, 5:30:09 PM (17 years ago)
Author:
luba
Message:
  • type_short_int is replaced by type_int32, class ShortInt? is renamed to Int32
File:
1 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/runtime/rf_short_int.cc

    r866 r1106  
    1414{
    1515
    16 unsigned ShortInt::compute_max_len ()
     16unsigned Int32::compute_max_len ()
    1717{
    1818  intptr_t i   = INTPTR_MAX / 10000;
     
    2222}
    2323
    24 const unsigned ShortInt::max_len = compute_max_len();
     24const unsigned Int32::max_len = compute_max_len();
    2525
    26 Expr ShortInt::create_expr (intptr_t _n)
     26Expr Int32::create_expr (intptr_t _n)
    2727{
    2828  Expr e = Term::create_expr(1);
    29   new(e.get_first()) ShortInt(_n);
     29  new(e.get_first()) Int32(_n);
    3030  return e;
    3131}
    3232
    3333
    34 Expr ShortInt::create_expr (pxx::WString& _str) {
     34Expr Int32::create_expr (pxx::WString& _str) {
    3535  wchar_t const* s = _str.get_data();
    36   return ShortInt::create_expr( wcstol(s, null, 10));
     36  return Int32::create_expr( wcstol(s, null, 10));
    3737}
    3838
     
    109109#endif
    110110
    111 void ShortInt::ctor (ShortInt* _to, ShortInt const* _from)
     111void Int32::ctor (Int32* _to, Int32 const* _from)
    112112{
    113113  _to->data1 = _from->data1;
     
    115115}
    116116
    117 int ShortInt::compare (ShortInt const* _shint1, ShortInt const* _shint2)
     117int Int32::compare (Int32 const* _shint1, Int32 const* _shint2)
    118118{
    119119  if (_shint1->int_data2 == _shint2->int_data2) return 0;
     
    122122}
    123123
    124 uint32_t ShortInt::hash (ShortInt const* _shint)
     124uint32_t Int32::hash (Int32 const* _shint)
    125125{
    126126  return _shint->uint_data2;
    127127}
    128128
    129 pxx::WString ShortInt::to_string (ShortInt const* _shint) {
     129pxx::WString Int32::to_string (Int32 const* _shint) {
    130130  intptr_t n = _shint->int_data2;
    131131  int flag = 0;
     
    158158}
    159159
    160 short_type_funcs_t ShortInt::funcs = {
    161   (void (*)(Term*, Term const*))(ShortInt::ctor),
     160short_type_funcs_t Int32::funcs = {
     161  (void (*)(Term*, Term const*))(Int32::ctor),
    162162  null, // ShortInt::dtor,
    163163  null, // ShortInt::eq,
    164   (int (*)(Term const*, Term const*))(ShortInt::compare),
    165   (uint32_t (*)(Term const*))(ShortInt::hash),
    166   (pxx::WString (*)(Term const*))(ShortInt::to_string)
     164  (int (*)(Term const*, Term const*))(Int32::compare),
     165  (uint32_t (*)(Term const*))(Int32::hash),
     166  (pxx::WString (*)(Term const*))(Int32::to_string)
    167167};
    168168
Note: See TracChangeset for help on using the changeset viewer.