ir: Tweak monomorphization to instantiate recursively after inserting to the replacements map.

That way the check to prevent double-instantiation also works to prevent
infinite recursion.
This commit is contained in:
Emilio Cobos Álvarez
2021-04-07 13:13:26 +02:00
parent 52de917d25
commit a9af0ad5ad
12 changed files with 81 additions and 20 deletions
@@ -0,0 +1,4 @@
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
@@ -0,0 +1,5 @@
#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <ostream>
#include <new>
@@ -0,0 +1,8 @@
from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t
from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t
cdef extern from *:
ctypedef bint bool
ctypedef struct va_list
cdef extern from *:
pass
@@ -0,0 +1,4 @@
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
@@ -0,0 +1,5 @@
#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <ostream>
#include <new>
@@ -0,0 +1,8 @@
from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t
from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t
cdef extern from *:
ctypedef bint bool
ctypedef struct va_list
cdef extern from *:
pass
@@ -0,0 +1,2 @@
pub type TryVec<T> = fallible_collections::TryVec<T>;
pub type TryString = fallible_collections::TryVec<u8>;