| Mercury Bugs - mercury | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update | 
| 0000475 | mercury | Feature Request | public | 2019-02-04 01:14 | 2019-02-04 01:14 | 
| Reporter | zs | ||||
|---|---|---|---|---|---|
| Assigned To | zs | ||||
| Priority | normal | Severity | minor | Reproducibility | N/A | 
| Status | assigned | Resolution | open | ||
| Platform | OS | OS Version | |||
| Product Version | |||||
| Target Version | Fixed in Version | ||||
| Summary | 0000475: flatten maybe output args across calls | ||||
| Description | Many predicates have an output argument which is a maybe(T): they either return no, or they return yes(value). The caller tests whether the result is yes(X). If it is, it picks up X = value, and the heap cell containing the yes wrapper is never referred to again. A compiler optimization should look for predicates where every call is like this, and transform them so that the callee returns TWO results: a boolean which is always meaningful, and a value of type T, which is meaningful only if the bool is yes. | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| There are no notes attached to this issue. | 
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
|---|---|---|---|---|---|
| 2019-02-04 01:14 | zs | New Issue | |||
| 2019-02-04 01:14 | zs | Status | new => assigned | ||
| 2019-02-04 01:14 | zs | Assigned To | => zs | ||