@@ -1687,13 +1687,13 @@ static term build_datetime_from_tm(Context *ctx, struct tm *broken_down_time)
16871687 term time_tuple = term_alloc_tuple (3 , & ctx -> heap );
16881688 term date_time_tuple = term_alloc_tuple (2 , & ctx -> heap );
16891689
1690- term_put_tuple_element (date_tuple , 0 , term_from_int32 (1900 + broken_down_time -> tm_year ));
1691- term_put_tuple_element (date_tuple , 1 , term_from_int32 (broken_down_time -> tm_mon + 1 ));
1692- term_put_tuple_element (date_tuple , 2 , term_from_int32 (broken_down_time -> tm_mday ));
1690+ term_put_tuple_element (date_tuple , 0 , term_from_int11 (1900 + broken_down_time -> tm_year ));
1691+ term_put_tuple_element (date_tuple , 1 , term_from_int11 (broken_down_time -> tm_mon + 1 ));
1692+ term_put_tuple_element (date_tuple , 2 , term_from_int11 (broken_down_time -> tm_mday ));
16931693
1694- term_put_tuple_element (time_tuple , 0 , term_from_int32 (broken_down_time -> tm_hour ));
1695- term_put_tuple_element (time_tuple , 1 , term_from_int32 (broken_down_time -> tm_min ));
1696- term_put_tuple_element (time_tuple , 2 , term_from_int32 (broken_down_time -> tm_sec ));
1694+ term_put_tuple_element (time_tuple , 0 , term_from_int11 (broken_down_time -> tm_hour ));
1695+ term_put_tuple_element (time_tuple , 1 , term_from_int11 (broken_down_time -> tm_min ));
1696+ term_put_tuple_element (time_tuple , 2 , term_from_int11 (broken_down_time -> tm_sec ));
16971697
16981698 term_put_tuple_element (date_time_tuple , 0 , date_tuple );
16991699 term_put_tuple_element (date_time_tuple , 1 , time_tuple );
@@ -1772,9 +1772,9 @@ term nif_erlang_timestamp_0(Context *ctx, int argc, term argv[])
17721772 struct timespec ts ;
17731773 sys_time (& ts );
17741774
1775- term_put_tuple_element (timestamp_tuple , 0 , term_from_int32 (ts .tv_sec / 1000000 ));
1776- term_put_tuple_element (timestamp_tuple , 1 , term_from_int32 (ts .tv_sec % 1000000 ));
1777- term_put_tuple_element (timestamp_tuple , 2 , term_from_int32 (ts .tv_nsec / 1000 ));
1775+ term_put_tuple_element (timestamp_tuple , 0 , term_from_int28 (ts .tv_sec / 1000000 ));
1776+ term_put_tuple_element (timestamp_tuple , 1 , term_from_int28 (ts .tv_sec % 1000000 ));
1777+ term_put_tuple_element (timestamp_tuple , 2 , term_from_int28 (ts .tv_nsec / 1000 ));
17781778
17791779 return timestamp_tuple ;
17801780}
@@ -2943,16 +2943,16 @@ static term nif_erlang_system_info(Context *ctx, int argc, term argv[])
29432943 }
29442944
29452945 if (key == PROCESS_COUNT_ATOM ) {
2946- return term_from_int32 (nif_num_processes (ctx -> global ));
2946+ return term_from_int28 (nif_num_processes (ctx -> global ));
29472947 }
29482948 if (key == PORT_COUNT_ATOM ) {
2949- return term_from_int32 (nif_num_ports (ctx -> global ));
2949+ return term_from_int28 (nif_num_ports (ctx -> global ));
29502950 }
29512951 if (key == ATOM_COUNT_ATOM ) {
2952- return term_from_int32 (atom_table_count (ctx -> global -> atom_table ));
2952+ return term_from_int28 (atom_table_count (ctx -> global -> atom_table ));
29532953 }
29542954 if (key == WORDSIZE_ATOM ) {
2955- return term_from_int32 (TERM_BYTES );
2955+ return term_from_int28 (TERM_BYTES );
29562956 }
29572957 if (key == MACHINE_ATOM ) {
29582958 if (memory_ensure_free_opt (ctx , (sizeof ("ATOM" ) - 1 ) * 2 , MEMORY_CAN_SHRINK ) != MEMORY_GC_OK ) {
@@ -2961,7 +2961,7 @@ static term nif_erlang_system_info(Context *ctx, int argc, term argv[])
29612961 return term_from_string ((const uint8_t * ) "ATOM" , sizeof ("ATOM" ) - 1 , & ctx -> heap );
29622962 }
29632963 if (key == AVM_FLOATSIZE_ATOM ) {
2964- return term_from_int32 (sizeof (avm_float_t ));
2964+ return term_from_int11 (sizeof (avm_float_t ));
29652965 }
29662966 if (key == SYSTEM_ARCHITECTURE_ATOM ) {
29672967 char buf [128 ];
@@ -3008,16 +3008,16 @@ static term nif_erlang_system_info(Context *ctx, int argc, term argv[])
30083008 }
30093009 if (key == SCHEDULERS_ATOM ) {
30103010#ifndef AVM_NO_SMP
3011- return term_from_int32 (smp_get_online_processors ());
3011+ return term_from_int11 (smp_get_online_processors ());
30123012#else
3013- return term_from_int32 (1 );
3013+ return term_from_int11 (1 );
30143014#endif
30153015 }
30163016 if (key == SCHEDULERS_ONLINE_ATOM ) {
30173017#ifndef AVM_NO_SMP
3018- return term_from_int32 (ctx -> global -> online_schedulers );
3018+ return term_from_int11 (ctx -> global -> online_schedulers );
30193019#else
3020- return term_from_int32 (1 );
3020+ return term_from_int11 (1 );
30213021#endif
30223022 }
30233023 if (key == EMU_FLAVOR_ATOM ) {
@@ -3055,7 +3055,7 @@ static term nif_erlang_system_flag(Context *ctx, int argc, term argv[])
30553055 }
30563056 while (!ATOMIC_COMPARE_EXCHANGE_WEAK_INT (& ctx -> global -> online_schedulers , & old_value , new_value )) {
30573057 };
3058- return term_from_int32 (old_value );
3058+ return term_from_int11 (old_value );
30593059 }
30603060#else
30613061 UNUSED (value );
@@ -3802,7 +3802,7 @@ static term nif_erts_debug_flat_size(Context *ctx, int argc, term argv[])
38023802
38033803 terms_count = memory_estimate_usage (argv [0 ]);
38043804
3805- return term_from_int32 (terms_count );
3805+ return term_from_int28 (terms_count );
38063806}
38073807
38083808static term make_list_from_ascii_buf (const uint8_t * buf , size_t len , Context * ctx )
0 commit comments