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 36 of file core.c.
36 {
38
39 switch (tag) {
46 default:
47 break;
48 }
49
53
54
56
57 switch (tag) {
59 v->
as.
i64 = *(int64_t *)payload;
60 break;
62 v->
as.
f64 = *(
double *)payload;
63 break;
66 break;
69 break;
71 PANIC(
"Not implemented");
73 PANIC(
"Not implemented");
76 break;
79 break;
82 break;
85 break;
88 break;
91 break;
92 default:
93 PANIC(
"Should never happen");
94 }
95 return v;
96}
@ VError
VError should be last.
A runtime error, a tag classifying the failure and a human-readable message.
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)
◆ absurd_metadata
We use this for testing. Defined once in core.c.
Definition at line 26 of file core.c.
◆ false_v
◆ nil_v
◆ true_v