Added init_polyfills()

This commit is contained in:
Justin Ethier 2021-05-02 19:30:11 -07:00
parent a0b4b7f74f
commit b8ed157105
3 changed files with 9 additions and 0 deletions

View file

@ -1003,5 +1003,6 @@ list assoc(void *data, object x, list l);
list assoc_cdr(void *data, object x, list l);
/**@}*/
void init_polyfills(void);
#endif /* CYCLONE_RUNTIME_H */

View file

@ -8234,3 +8234,10 @@ int Cyc_utf8_encode(char *dest, int sz, uint32_t *src, int srcsz)
////////////// END UTF-8 Section //////////////
void init_polyfills(void)
{
#ifdef CYCLONE_CK_POLYFILL_H
ck_polyfill_init();
#endif
}

View file

@ -93,6 +93,7 @@
{gc_thread_data *thd;
long stack_size = global_stack_size = STACK_SIZE;
long heap_size = global_heap_size = HEAP_SIZE;
init_polyfills();
mclosure0(clos_halt,&Cyc_halt); // Halt if final closure is reached
mclosure0(entry_pt,&c_entry_pt); // First function to execute
_cyc_argc = argc;