for (auto it = builtins.begin (); it != builtins.end (); it++)
{
HirId ref;
- rust_assert (
- tyctx->lookup_type_by_node_id ((*it)->get_node_id (), &ref));
+ bool ok = tyctx->lookup_type_by_node_id ((*it)->get_node_id (), &ref);
+ rust_assert (ok);
TyTy::BaseType *lookup;
- rust_assert (tyctx->lookup_type (ref, &lookup));
+ ok = tyctx->lookup_type (ref, &lookup);
+ rust_assert (ok);
Btype *compiled = TyTyCompile::compile (backend, lookup);
compiled_type_map.insert (std::pair<HirId, Btype *> (ref, compiled));
Bexpression *value = CompileExpr::Compile (constant.get_expr (), ctx);
const Resolver::CanonicalPath *canonical_path = nullptr;
- rust_assert (ctx->get_mappings ()->lookup_canonical_path (
+ ok = ctx->get_mappings ()->lookup_canonical_path (
constant.get_mappings ().get_crate_num (),
- constant.get_mappings ().get_nodeid (), &canonical_path));
+ constant.get_mappings ().get_nodeid (), &canonical_path);
+ rust_assert (ok);
std::string ident = canonical_path->get ();
Bexpression *const_expr = ctx->get_backend ()->named_constant_expression (
flags |= Backend::function_is_visible;
const Resolver::CanonicalPath *canonical_path = nullptr;
- rust_assert (ctx->get_mappings ()->lookup_canonical_path (
+ bool ok = ctx->get_mappings ()->lookup_canonical_path (
function.get_mappings ().get_crate_num (),
- function.get_mappings ().get_nodeid (), &canonical_path));
+ function.get_mappings ().get_nodeid (), &canonical_path);
+ rust_assert (ok);
std::string ir_symbol_name
= canonical_path->get () + fntype->subst_as_string ();
}
std::vector<Bvariable *> locals;
- bool ok = compile_locals_for_block (*rib, fndecl, locals);
+ ok = compile_locals_for_block (*rib, fndecl, locals);
rust_assert (ok);
Bblock *enclosing_scope = NULL;
= CompileExpr::Compile (constant.get_expr ().get (), ctx);
const Resolver::CanonicalPath *canonical_path = nullptr;
- rust_assert (ctx->get_mappings ()->lookup_canonical_path (
+ bool ok = ctx->get_mappings ()->lookup_canonical_path (
constant.get_mappings ().get_crate_num (),
- constant.get_mappings ().get_nodeid (), &canonical_path));
+ constant.get_mappings ().get_nodeid (), &canonical_path);
+ rust_assert (ok);
std::string ident = canonical_path->get ();
Bexpression *const_expr = ctx->get_backend ()->named_constant_expression (
unsigned int flags = 0;
const Resolver::CanonicalPath *canonical_path = nullptr;
- rust_assert (ctx->get_mappings ()->lookup_canonical_path (
+ bool ok = ctx->get_mappings ()->lookup_canonical_path (
func.get_mappings ().get_crate_num (), func.get_mappings ().get_nodeid (),
- &canonical_path));
+ &canonical_path);
+ rust_assert (ok);
std::string fn_identifier = canonical_path->get ();
std::string asm_name = ctx->mangle_item (fntype, *canonical_path);
}
std::vector<Bvariable *> locals;
- bool ok = compile_locals_for_block (*rib, fndecl, locals);
+ ok = compile_locals_for_block (*rib, fndecl, locals);
rust_assert (ok);
Bblock *enclosing_scope = NULL;
Bexpression *value = CompileExpr::Compile (var.get_expr (), ctx);
const Resolver::CanonicalPath *canonical_path = nullptr;
- rust_assert (ctx->get_mappings ()->lookup_canonical_path (
+ ok = ctx->get_mappings ()->lookup_canonical_path (
var.get_mappings ().get_crate_num (), var.get_mappings ().get_nodeid (),
- &canonical_path));
+ &canonical_path);
+ rust_assert (ok);
std::string name = canonical_path->get ();
std::string asm_name = ctx->mangle_item (resolved_type, *canonical_path);
Bexpression *value = CompileExpr::Compile (constant.get_expr (), ctx);
const Resolver::CanonicalPath *canonical_path = nullptr;
- rust_assert (ctx->get_mappings ()->lookup_canonical_path (
+ ok = ctx->get_mappings ()->lookup_canonical_path (
constant.get_mappings ().get_crate_num (),
- constant.get_mappings ().get_nodeid (), &canonical_path));
+ constant.get_mappings ().get_nodeid (), &canonical_path);
+ rust_assert (ok);
std::string ident = canonical_path->get ();
Bexpression *const_expr
flags |= Backend::function_is_visible;
const Resolver::CanonicalPath *canonical_path = nullptr;
- rust_assert (ctx->get_mappings ()->lookup_canonical_path (
+ bool ok = ctx->get_mappings ()->lookup_canonical_path (
function.get_mappings ().get_crate_num (),
- function.get_mappings ().get_nodeid (), &canonical_path));
+ function.get_mappings ().get_nodeid (), &canonical_path);
+ rust_assert (ok);
std::string ir_symbol_name
= canonical_path->get () + fntype->subst_as_string ();
}
std::vector<Bvariable *> locals;
- bool ok = compile_locals_for_block (*rib, fndecl, locals);
+ ok = compile_locals_for_block (*rib, fndecl, locals);
rust_assert (ok);
Bblock *enclosing_scope = NULL;
Bexpression *value = CompileExpr::Compile (constant.get_expr (), ctx);
const Resolver::CanonicalPath *canonical_path = nullptr;
- rust_assert (ctx->get_mappings ()->lookup_canonical_path (
+ ok = ctx->get_mappings ()->lookup_canonical_path (
constant.get_mappings ().get_crate_num (),
- constant.get_mappings ().get_nodeid (), &canonical_path));
+ constant.get_mappings ().get_nodeid (), &canonical_path);
+ rust_assert (ok);
std::string ident = canonical_path->get ();
Bexpression *const_expr