• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

vla5924-practice / compiler-project / 8926778176
84%

Build:
DEFAULT BRANCH: main
Ran 02 May 2024 03:57PM UTC
Jobs 1
Files 43
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 May 2024 03:53PM UTC coverage: 75.42% (-8.3%) from 83.685%
8926778176

push

github

web-flow
Add declarative operation tree description for tests (#129)

A DeclarativeModule class makes it possible to describe optree in a
concise, *declarative* style like this:

```cpp
DeclarativeModule m;
auto &v = m.values();
m.op<FunctionOp>().attr("myfunc").attr(m.tFunc({m.tI64, m.tF64}, m.tNone)).inward(v[0], m.tI64).inward(v[1], m.tF64).withBody();
    v[2] = m.op<ConstantOp>().attr(123).result(m.tI64);
    v[3] = m.op<AllocateOp>().result(m.tPtr(m.tI64));
    v[4] = m.op<ArithBinaryOp>(v[2], v[1]).attr(ArithBinOpKind::AddI).result(m.tI64);
    m.op<StoreOp>(v[3], v[4]);
    m.op<ReturnOp>();
m.endBody();
```

Optionally, the code above can be replaced with this one which uses
*adaptor initializers*:

```cpp
m.opInit<FunctionOp>("myfunc", m.tFunc({m.tI64, m.tF64}, m.tNone)).inward(v[0], 0).inward(v[1], 1).withBody();
    v[2] = m.opInit<ConstantOp>(m.tI64, 123);
    v[3] = m.opInit<AllocateOp>(m.tPtr(m.tI64));
    v[4] = m.opInit<ArithBinaryOp>(ArithBinOpKind::AddI, v[2], v[1]);
    m.opInit<StoreOp>(v[3], v[4]);
    m.opInit<ReturnOp>();
m.endBody();
```

This patch also adds test for DeclarativeModule and TypeStorage (which
is used by it).

67 of 79 new or added lines in 2 files covered. (84.81%)

1752 of 2323 relevant lines covered (75.42%)

275.73 hits per line

Jobs
ID Job ID Ran Files Coverage
1 8926778176.1 02 May 2024 03:57PM UTC 0
75.42
GitHub Action Run
Source Files on build 8926778176
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #8926778176
  • 130d4d1e on github
  • Prev Build on main (#8878826090)
  • Next Build on main (#8933814132)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc