line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#pragma once |
2
|
|
|
|
|
|
|
#include |
3
|
|
|
|
|
|
|
#include |
4
|
|
|
|
|
|
|
#include |
5
|
|
|
|
|
|
|
#include |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
namespace xs { namespace exp { |
8
|
|
|
|
|
|
|
|
9
|
144
|
|
|
|
|
|
struct Constant { |
10
|
|
|
|
|
|
|
using string_view = panda::string_view; |
11
|
|
|
|
|
|
|
string_view name; |
12
|
|
|
|
|
|
|
Sv value; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Constant (string_view name, const Sv& val) : name(name), value(val) {} |
15
|
|
|
|
|
|
|
Constant (string_view name, string_view val) : name(name), value(Simple(val)) {} |
16
|
144
|
|
|
|
|
|
Constant (string_view name, int64_t val) : name(name), value(Simple(val)) {} |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
void create_constant (Stash stash, const Constant& c); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
inline void create_constant (Stash stash, panda::string_view name, const Sv& value) { create_constant(stash, Constant(name, value)); } |
22
|
|
|
|
|
|
|
inline void create_constant (Stash stash, panda::string_view name, panda::string_view value) { create_constant(stash, Constant(name, value)); } |
23
|
|
|
|
|
|
|
inline void create_constant (Stash stash, panda::string_view name, int64_t value) { create_constant(stash, Constant(name, value)); } |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
void create_constants (Stash stash, const std::initializer_list& l); |
26
|
|
|
|
|
|
|
void create_constants (Stash stash, const Hash& h); |
27
|
|
|
|
|
|
|
void create_constants (Stash stash, SV*const* list, size_t items); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
void register_export (const Stash& stash, panda::string_view name); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
void export_sub (const Stash& from, Stash to, panda::string_view name); |
32
|
|
|
|
|
|
|
void export_constants (const Stash& from, Stash to); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Array constants_list (const Stash& stash); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
void autoexport (Stash stash); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
}} |