From 4a0fbe2a1c7e535aacbf53e56a2322b1a97ac2ef Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Fri, 29 Jun 2018 22:04:55 +0100 Subject: Try to fix some tricky C compilation bugs, break everything instead --- language/bytecode.ott | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'language/bytecode.ott') diff --git a/language/bytecode.ott b/language/bytecode.ott index 32b04bb4..caa94a53 100644 --- a/language/bytecode.ott +++ b/language/bytecode.ott @@ -102,12 +102,12 @@ cval :: 'CV_' ::= {{ lem fragment * ctyp }} clexp :: 'CL_' ::= - | id :: :: id - | id . string :: :: field - | * id :: :: addr - | id -> string :: :: addr_field - | current_exception :: :: current_exception - | have_exception :: :: have_exception + | id : ctyp :: :: id + | id . string : ctyp :: :: field + | * id : ctyp :: :: addr + | id -> string : ctyp :: :: addr_field + | current_exception : ctyp :: :: current_exception + | have_exception :: :: have_exception ctype_def :: 'CTD_' ::= {{ com C type definition }} @@ -128,7 +128,6 @@ instr :: 'I_' ::= | jump ( cval ) string :: :: jump | clexp = bool id ( cval0 , ... , cvaln ) : ctyp :: :: funcall | clexp = cval :: :: copy - | clexp = ( ctyp ) id : ctyp' :: :: convert | clear ctyp id :: :: clear | return cval :: :: return | { instr0 ; ... ; instrn } :: :: block -- cgit v1.2.3 From 53210d77dafb13ba1d84c7fbf2e12ce570a20ad0 Mon Sep 17 00:00:00 2001 From: Alasdair Date: Sat, 30 Jun 2018 00:44:48 +0100 Subject: Passes all tests and now builds mips and cheri again --- language/bytecode.ott | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'language/bytecode.ott') diff --git a/language/bytecode.ott b/language/bytecode.ott index caa94a53..16492716 100644 --- a/language/bytecode.ott +++ b/language/bytecode.ott @@ -126,7 +126,7 @@ instr :: 'I_' ::= | if ( cval ) { instr0 ; ... ; instrn } else { instr0 ; ... ; instrm } : ctyp :: :: if | jump ( cval ) string :: :: jump - | clexp = bool id ( cval0 , ... , cvaln ) : ctyp :: :: funcall + | clexp = bool id ( cval0 , ... , cvaln ) :: :: funcall | clexp = cval :: :: copy | clear ctyp id :: :: clear | return cval :: :: return @@ -137,6 +137,7 @@ instr :: 'I_' ::= | C string :: :: raw % only used for GCC attributes | string : :: :: label | goto string :: :: goto + | undefined ctyp :: :: undefined | match_failure :: :: match_failure % For optimising away allocations. -- cgit v1.2.3