Skip to content

Commit

Permalink
Merge #1003
Browse files Browse the repository at this point in the history
1003: Add more intrinsics and refactor how we implement them r=philberty a=philberty

This patch series implements:

1. offset
2. size_of
3. unreachable
4. abort

It removes the GCC wrapper mappings to make them much easier to implement. It also demonstrates in single commits
the implementation of each of these intrinsic to make it easy to follow in how we implement them.

Addresses #658 #849 

Co-authored-by: Philip Herron <philip.herron@embecosm.com>
  • Loading branch information
bors[bot] and philberty authored Mar 11, 2022
2 parents 1f4e2de + f057445 commit ddd087b
Show file tree
Hide file tree
Showing 13 changed files with 439 additions and 172 deletions.
8 changes: 8 additions & 0 deletions gcc/rust/backend/rust-compile-fnparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ class CompileFnParam : public HIRCompileBase, public HIR::HIRPatternVisitor
return compiler.compiled_param;
}

static Bvariable *compile (Context *ctx, tree fndecl, HIR::Pattern *param,
tree decl_type, Location locus)
{
CompileFnParam compiler (ctx, fndecl, decl_type, locus);
param->accept_vis (compiler);
return compiler.compiled_param;
}

void visit (HIR::IdentifierPattern &pattern) override
{
if (!pattern.is_mut ())
Expand Down
Loading

0 comments on commit ddd087b

Please sign in to comment.