CakeML/cakeml

Reduce GiveUps in data_to_word

Aberta

#186 aberto em 26 de nov. de 2016

 (1 comentário) (0 reação) (0 responsável)Standard ML (98 forks)auto 404
good first issuehelp wantedlow effortmedium reward

Métricas do repositório

Stars
 (1.169 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Some of the GiveUps in data_to_word could be compiler failures rather than generating code that aborts at runtime. This is better for the user since the failure is caught earlier. However, it requires making the compiler able to fail (CompileError) at data_to_word. For example, Cons tag becomes GiveUp if tag < dimword (:'a) DIV 16 which is decidable at compile time.

(An alternative hack, maybe, is to produce code that will produce an encoding error in asm (i.e., a jump that's too big). Probably too hard and hacky.)

Guia do colaborador