85 void dump (FILE *,
bool formatted)
const;
105 void set (
const char *key,
value *v);
115 template <
typename JsonType>
116 void set (
const char *key, std::unique_ptr<JsonType> v)
118 set (key, v.release ());
123 void set_string (
const char *key,
const char *utf8_value);
125 void set_float (
const char *key,
double v);
128 void set_bool (
const char *key,
bool v);
160 template <
typename JsonType>
161 void append (std::unique_ptr<JsonType> v)
218 explicit string (
const char *utf8);
219 string (
const char *utf8,
size_t len);
355extern void assert_print_eq (
const location &loc,
358 const char *expected_json);
bool is_empty() const
Definition hash-map.h:252
value ** end()
Definition json.h:170
enum kind get_kind() const final override
Definition json.h:146
void print(pretty_printer *pp, bool formatted) const final override
Definition json.cc:254
auto_vec< value * > m_elements
Definition json.h:177
void append_string(const char *utf8_value)
Definition json.cc:291
const value *const * end() const
Definition json.h:172
~array()
Definition json.cc:243
size_t size() const
Definition json.h:166
value ** begin()
Definition json.h:169
value * operator[](size_t i) const
Definition json.h:167
size_t length() const
Definition json.h:173
value * get(size_t idx) const
Definition json.h:174
const value *const * begin() const
Definition json.h:171
void append(value *v)
Definition json.cc:284
void append(std::unique_ptr< JsonType > v)
Definition json.h:161
enum kind get_kind() const final override
Definition json.h:187
float_number(double value)
Definition json.h:185
void print(pretty_printer *pp, bool formatted) const final override
Definition json.cc:302
double get() const
Definition json.h:190
double m_value
Definition json.h:193
long m_value
Definition json.h:209
enum kind get_kind() const final override
Definition json.h:203
integer_number(long value)
Definition json.h:201
long get() const
Definition json.h:206
void print(pretty_printer *pp, bool formatted) const final override
Definition json.cc:315
void print(pretty_printer *pp, bool formatted) const final override
Definition json.cc:357
literal(bool value)
Definition json.h:242
enum kind m_kind
Definition json.h:248
literal(enum kind kind)
Definition json.h:239
enum kind get_kind() const final override
Definition json.h:244
void set(const char *key, value *v)
Definition json.cc:163
void set_string(const char *key, const char *utf8_value)
Definition json.cc:206
void set_float(const char *key, double v)
Definition json.cc:224
enum kind get_kind() const final override
Definition json.h:100
auto_vec< const char * > m_keys
Definition json.h:136
hash_map< char *, value *, simple_hashmap_traits< nofree_string_hash, value * > > map_t
Definition json.h:132
void set_bool(const char *key, bool v)
Definition json.cc:233
map_t m_map
Definition json.h:133
void set_integer(const char *key, long v)
Definition json.cc:215
value * get(const char *key) const
Definition json.cc:191
void set(const char *key, std::unique_ptr< JsonType > v)
Definition json.h:116
bool is_empty() const
Definition json.h:103
~object()
Definition json.cc:109
void print(pretty_printer *pp, bool formatted) const final override
Definition json.cc:121
string(const char *utf8)
Definition json.cc:328
enum kind get_kind() const final override
Definition json.h:222
~string()
Definition json.h:220
const char * get_string() const
Definition json.h:225
size_t m_len
Definition json.h:230
void print(pretty_printer *pp, bool formatted) const final override
Definition json.cc:346
char * m_utf8
Definition json.h:229
size_t get_length() const
Definition json.h:226
virtual enum kind get_kind() const =0
virtual void print(pretty_printer *pp, bool formatted) const =0
void DEBUG_FUNCTION dump() const
Definition json.cc:98
virtual ~value()
Definition json.h:81
Definition pretty-print.h:241
void final(rtx_insn *first, FILE *file, int optimize_p)
Definition final.cc:2002
Definition json-parsing.h:27
@ JSON_ARRAY
Definition json.h:58
@ JSON_FALSE
Definition json.h:72
@ JSON_INTEGER
Definition json.h:61
@ JSON_NULL
Definition json.h:73
@ JSON_OBJECT
Definition json.h:55
@ JSON_TRUE
Definition json.h:71
@ JSON_FLOAT
Definition json.h:64
@ JSON_STRING
Definition json.h:67
Definition dump-context.h:31
i
Definition poly-int.h:776
Definition hash-map-traits.h:33
#define DEBUG_FUNCTION
Definition system.h:1236