fix(runtime): disable compressed headers and fix bugs
This commit is contained in:
parent
3b762d4dc0
commit
124c5da414
2 changed files with 4 additions and 4 deletions
|
|
@ -16,7 +16,7 @@ Author: Leonardo de Moura
|
|||
#endif
|
||||
|
||||
#define LEAN_SMALL_ALLOCATOR
|
||||
#define LEAN_COMPRESSED_OBJECT_HEADER
|
||||
// #define LEAN_COMPRESSED_OBJECT_HEADER
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <atomic>
|
||||
|
|
@ -1530,7 +1530,7 @@ static inline uint64_t lean_unbox_uint64(b_lean_obj_arg o) {
|
|||
}
|
||||
|
||||
static inline lean_obj_res lean_box_usize(size_t v) {
|
||||
lean_obj_res r = lean_alloc_ctor(0, 1, 0);
|
||||
lean_obj_res r = lean_alloc_ctor(0, 0, sizeof(size_t));
|
||||
lean_ctor_set_usize(r, 0, v);
|
||||
return r;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ static inline lean_object * get_next(lean_object * o) {
|
|||
LEAN_BYTE(header, 7) = 0;
|
||||
return (lean_object*)(header);
|
||||
#else
|
||||
return (lean_object*)(o->m_rc);
|
||||
return (lean_object*)((size_t)(o->m_rc));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ static inline void set_next(lean_object * o, lean_object * n) {
|
|||
LEAN_BYTE(new_header, 7) = LEAN_BYTE(o->m_header, 7);
|
||||
o->m_header = new_header;
|
||||
#else
|
||||
*(lean_object*)(o->m_rc) = n;
|
||||
o->m_rc = (size_t)n;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue