Go to the source code of this file.
◆ srn_value_make()
Creates a new serene value.
We always heap allocate the values. So, ANY value creation should go through this function
Definition at line 24 of file core.c.
25 {
27
28 switch (tag) {
35 default:
36 break;
37 }
38
42
43
45
46 switch (tag) {
48 v->
as.
i64 = *(int64_t *)payload;
49 break;
51 v->
as.
f64 = *(
double *)payload;
52 break;
55 break;
58 break;
60 PANIC(
"Not implemented");
62 PANIC(
"Not implemented");
65 break;
68 break;
71 break;
74 break;
77 break;
80 break;
81 default:
82 PANIC(
"Should never happen");
83 }
84 return v;
85}
static srn_value_t false_v
@ VError
VError should be last.
static srn_value_t true_v
Since all the values are immutable and persistent.
A persistent, immutable map.
A persistent, immutable, indexed sequence.
srn_metadata_t * metadata
int64_t i64
We represent all the immidiate numbers with this field and cast as we to an appropriate type.
union srn_value_t::@033047061046230251001111174367071167226300135003 as
IMPORTANT NOTE: The size of this union should never be larger than a word.
#define PANIC_IF_NULL(ptr)