From ba89fc84267bfd09f1c8abf10a5b85d09bbc79de Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:15:21 -0400 Subject: Refactor `dmul(This, Differential)` to `dmul(T, Differential)` (#3029) * Refactor `dmul(This, Differential)` to `dmul(T, Differential)` - Add AST synthesis support for generic containers - Refactor relevant tests * Merge dmul synthesis with dadd and dzero, and disambiguate using an enum * Fix trailing spaces --- source/slang/slang-ast-synthesis.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/slang/slang-ast-synthesis.cpp') diff --git a/source/slang/slang-ast-synthesis.cpp b/source/slang/slang-ast-synthesis.cpp index 872088d54..65955e815 100644 --- a/source/slang/slang-ast-synthesis.cpp +++ b/source/slang/slang-ast-synthesis.cpp @@ -122,6 +122,14 @@ Expr* ASTSynthesizer::emitInvokeExpr(Expr* callee, List&& args) return rs; } +Expr* ASTSynthesizer::emitGenericAppExpr(Expr* genericExpr, List&& args) +{ + auto rs = m_builder->create(); + rs->functionExpr = genericExpr; + rs->arguments = _Move(args); + return rs; +} + Expr* ASTSynthesizer::emitMemberExpr(Type* type, Name* name) { auto rs = m_builder->create(); -- cgit v1.2.3