| 313 | } |
| 314 | |
| 315 | std::string TD_TL_writer_java::gen_field_fetch(int field_num, const tl::arg &a, std::vector<tl::var_description> &vars, |
| 316 | bool flat, int parser_type) const { |
| 317 | assert(parser_type >= 0); |
| 318 | |
| 319 | if (a.type->get_type() == tl::NODE_TYPE_VAR_TYPE) { |
| 320 | assert(parser_type == 1); |
| 321 | |
| 322 | const tl::tl_tree_var_type *t = static_cast<const tl::tl_tree_var_type *>(a.type); |
| 323 | assert(a.flags == tl::FLAG_EXCL); |
| 324 | |
| 325 | assert(a.var_num == -1); |
| 326 | assert(a.exist_var_num == -1); |
| 327 | |
| 328 | assert(t->var_num >= 0); |
| 329 | assert(vars[t->var_num].is_type); |
| 330 | assert(!vars[t->var_num].is_stored); |
| 331 | vars[t->var_num].is_stored = true; |
| 332 | |
| 333 | return ""; |
| 334 | } |
| 335 | |
| 336 | assert(!(a.flags & tl::FLAG_EXCL)); |
| 337 | assert(!(a.flags & tl::FLAG_OPT_VAR)); |
| 338 | |
| 339 | if (a.exist_var_num != -1) { |
| 340 | assert(0 <= a.exist_var_num && a.exist_var_num < static_cast<int>(vars.size())); |
| 341 | } |
| 342 | |
| 343 | if (flat) { |
| 344 | // TODO |
| 345 | // return gen_field_fetch(const tl::arg &a, std::vector<tl::var_description> &vars, int num, bool flat); |
| 346 | } |
| 347 | |
| 348 | assert(a.type->get_type() == tl::NODE_TYPE_TYPE); |
| 349 | if (a.var_num >= 0) { |
| 350 | assert(static_cast<const tl::tl_tree_type *>(a.type)->type->id == tl::ID_VAR_NUM); |
| 351 | assert(0 <= a.var_num && a.var_num < static_cast<int>(vars.size())); |
| 352 | } |
| 353 | |
| 354 | return ""; |
| 355 | } |
| 356 | |
| 357 | std::string TD_TL_writer_java::gen_field_store(const tl::arg &a, std::vector<tl::var_description> &vars, bool flat, |
| 358 | int storer_type) const { |
nothing calls this directly
no outgoing calls
no test coverage detected