aboutsummaryrefslogtreecommitdiffhomepage
path: root/notes/reduced_slul.txt
blob: 4ae946494a55e8c14c15f16041f9319e63b93255 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

Reduced variants of SLUL
========================

There should be an \option or \disable attribute for modules.

This is needed for disabling or limiting features:
* Disabling floating point (nofp)
* Allowing 16 bit compilation (allow16)
* Disabling arena support (noarena)
* Disabling restrictions for subarenas (norestrict)
* Disabling division/multiplication with by a non-constant (nodiv/nomul)

It could also be used to allow extensions:
* Allowing 128 bit integers (int128)

It makes sense to be able to enable/disable a functionality only in the
interface, or to enable a functionality only in the implementation.


For anything that is not a implementation-only \enable, there has to be a
"since" version.

    \enable int128 implonly
    \enable int128 since 1.0

    \disable fp since 1.0
    \disable arena since 1.0
    \disable restrict since 1.0
    \disable default32 ifaceonly since 1.0
    \disable int32 ifaceonly since 1.0      # <-- requires \disable int64 also
    \disable int64 ifaceonly since 1.0
    \disable div since 1.0
    \disable mul since 1.0

How to un-\disable a feature in later version?

Make "implonly" default for \enable? And add "iface_also"

What names should be used?

    \enable int128 iface_also
    \disable fp

    \enable int128 iface_also
    \supports no_fp ifaceonly
    \supports int_16
    \supports no_int64
    \supports no_div
    \supports no_mul since 1.0