aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-10-22 16:17:40 -0400
committerGravatar Jason Gross <jgross@mit.edu>2017-10-22 16:17:40 -0400
commitd810c151b464a461cf93003fbba8054a286e7dd8 (patch)
tree653f7233c917620c69159c11bbd034c0a9898029
parent28508c6fa3ee811d8e51f365cd6cbdabe96352cd (diff)
Add inline_const_and_op{f,} specializations
-rw-r--r--src/Compilers/Z/InlineConstAndOp.v4
-rw-r--r--src/Compilers/ZExtended/InlineConstAndOp.v4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/Compilers/Z/InlineConstAndOp.v b/src/Compilers/Z/InlineConstAndOp.v
index bdcc0a21b..ad2a2ab58 100644
--- a/src/Compilers/Z/InlineConstAndOp.v
+++ b/src/Compilers/Z/InlineConstAndOp.v
@@ -3,5 +3,9 @@ Require Import Crypto.Compilers.InlineConstAndOp.
Require Import Crypto.Compilers.Z.Syntax.
Require Import Crypto.Compilers.Z.Syntax.Util.
+Definition inline_const_and_opf {var} {t} (e : exprf _ _ t) : @exprf base_type op var t
+ := @inline_const_and_opf base_type op interp_base_type (@interp_op) var make_const t e.
+Definition inline_const_and_op {var} {t} (e : expr _ _ t) : @expr base_type op var t
+ := @inline_const_and_op base_type op interp_base_type (@interp_op) var make_const t e.
Definition InlineConstAndOp {t} (e : Expr t) : Expr t
:= @InlineConstAndOp base_type op interp_base_type interp_op make_const t e.
diff --git a/src/Compilers/ZExtended/InlineConstAndOp.v b/src/Compilers/ZExtended/InlineConstAndOp.v
index f12f273c9..c1fd77e9d 100644
--- a/src/Compilers/ZExtended/InlineConstAndOp.v
+++ b/src/Compilers/ZExtended/InlineConstAndOp.v
@@ -2,5 +2,9 @@ Require Import Crypto.Compilers.Syntax.
Require Import Crypto.Compilers.InlineConstAndOp.
Require Import Crypto.Compilers.ZExtended.Syntax.
+Definition inline_const_and_opf {var} {t} (e : exprf _ _ t) : @exprf base_type op var t
+ := @inline_const_and_opf base_type op interp_base_type (@interp_op) var (@Const) t e.
+Definition inline_const_and_op {var} {t} (e : expr _ _ t) : @expr base_type op var t
+ := @inline_const_and_op base_type op interp_base_type (@interp_op) var (@Const) t e.
Definition InlineConstAndOp {t} (e : Expr t) : Expr t
:= @InlineConstAndOp base_type op interp_base_type (@interp_op) (@Const) t e.