boot: move early constants from main.d to boot.d

This commit is contained in:
Daniel Kochmański 2025-05-14 10:11:00 +02:00
parent 39fd5a954a
commit 1dbf4664d6
2 changed files with 22 additions and 21 deletions

View file

@ -6,9 +6,30 @@
/* -- imports ------------------------------------------------------- */
#include <ecl/ecl.h>
#include <ecl/ecl-inl.h>
#include <ecl/internal.h>
/* -- implementation------------------------------------------------- */
/* -- constants ----------------------------------------------------- */
const cl_object ecl_ct_Jan1st1970UT = ecl_make_fixnum(39052800);
ecl_def_ct_base_string(ecl_ct_null_string,"",0,,const);
ecl_def_ct_single_float(ecl_ct_default_rehash_size,1.5f,,const);
ecl_def_ct_single_float(ecl_ct_default_rehash_threshold,0.75f,,const);
ecl_def_ct_single_float(ecl_ct_singlefloat_zero,0,,const);
ecl_def_ct_double_float(ecl_ct_doublefloat_zero,0,,const);
ecl_def_ct_long_float(ecl_ct_longfloat_zero,0,,const);
ecl_def_ct_single_float(ecl_ct_singlefloat_minus_zero,-0.0,,const);
ecl_def_ct_double_float(ecl_ct_doublefloat_minus_zero,-0.0,,const);
ecl_def_ct_long_float(ecl_ct_longfloat_minus_zero,-0.0l,,const);
ecl_def_ct_ratio(ecl_ct_plus_half,ecl_make_fixnum(1),ecl_make_fixnum(2),,const);
ecl_def_ct_ratio(ecl_ct_minus_half,ecl_make_fixnum(-1),ecl_make_fixnum(2),,const);
/* -- implementation ------------------------------------------------ */
#if ECL_FIXNUM_BITS <= 32
/* 1GB */

View file

@ -106,26 +106,6 @@ ecl_boot(void)
return 0;
}
/* -- constants ----------------------------------------------------- */
const cl_object ecl_ct_Jan1st1970UT = ecl_make_fixnum(39052800);
ecl_def_ct_base_string(ecl_ct_null_string,"",0,,const);
ecl_def_ct_single_float(ecl_ct_default_rehash_size,1.5f,,const);
ecl_def_ct_single_float(ecl_ct_default_rehash_threshold,0.75f,,const);
ecl_def_ct_single_float(ecl_ct_singlefloat_zero,0,,const);
ecl_def_ct_double_float(ecl_ct_doublefloat_zero,0,,const);
ecl_def_ct_long_float(ecl_ct_longfloat_zero,0,,const);
ecl_def_ct_single_float(ecl_ct_singlefloat_minus_zero,-0.0,,const);
ecl_def_ct_double_float(ecl_ct_doublefloat_minus_zero,-0.0,,const);
ecl_def_ct_long_float(ecl_ct_longfloat_minus_zero,-0.0l,,const);
ecl_def_ct_ratio(ecl_ct_plus_half,ecl_make_fixnum(1),ecl_make_fixnum(2),,const);
ecl_def_ct_ratio(ecl_ct_minus_half,ecl_make_fixnum(-1),ecl_make_fixnum(2),,const);
/* These two tags have a special meaning for the frame stack. */
ecl_def_ct_base_string(ecl_ct_ptag_string,"PROTECT-TAG",11,static,const);