diff options
| author | Gabriel Kerneis | 2014-03-11 16:46:28 +0000 |
|---|---|---|
| committer | Gabriel Kerneis | 2014-03-11 16:47:02 +0000 |
| commit | 5cd0091db01bb953b4f0716e98c86218f6dfcd52 (patch) | |
| tree | ed4894c505b7f80ca72d9054fe7e7452cf624e5f /src/lem_interp/interp_lib.lem | |
| parent | 86d2bae0050c6587259b42209d48660e19652312 (diff) | |
More work on interpreter and Power model
Diffstat (limited to 'src/lem_interp/interp_lib.lem')
| -rw-r--r-- | src/lem_interp/interp_lib.lem | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lem_interp/interp_lib.lem b/src/lem_interp/interp_lib.lem index efccc9bb..8a0083a7 100644 --- a/src/lem_interp/interp_lib.lem +++ b/src/lem_interp/interp_lib.lem @@ -61,6 +61,14 @@ let rec add (V_tuple args) = match args with let len = List.length l in add (V_tuple [v; (if d then to_vec_inc else to_vec_dec) len n]) (* assume other literals are L_bin or L_hex, ie. vectors *) + | [(V_lit (L_aux L_zero _) as l); x] -> + add (V_tuple [V_vector 0 true [l]; x]) + | [(V_lit (L_aux L_one _) as l); x] -> + add (V_tuple [V_vector 0 true [l]; x]) + | [x; (V_lit (L_aux L_zero _) as l)] -> + add (V_tuple [x; V_vector 0 true [l]]) + | [x; (V_lit (L_aux L_one _) as l)] -> + add (V_tuple [x; V_vector 0 true [l]]) | [V_lit l; x ] -> add (V_tuple [litV_to_vec l; x]) | [ x ; V_lit l ] -> add (V_tuple [x; litV_to_vec l]) end ;; |
