From 5b67aead38ca43744b9a18cb1b5570de0c3f8c75 Mon Sep 17 00:00:00 2001 From: Sacha Verweij Date: Mon, 18 Dec 2017 12:44:31 -0800 Subject: [PATCH] Remove special lowering of ' in *, /, and \ expressions to A[c]_(mul|ldiv|rdiv)_B[c]. --- src/julia-syntax.scm | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index bf1aa50dc83f8..799d32258fb46 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -1515,22 +1515,6 @@ (kwcall-unless-empty f pa kw-container kw-container) `(call (call (core kwfunc) ,f) ,kw-container ,f ,@pa))))) -;; convert e.g. A'*B to Ac_mul_B(A,B) -(define (expand-transposed-op e ops) - (let ((a (caddr e)) - (b (cadddr e))) - (cond ((ctrans? a) - (if (ctrans? b) - `(call ,(aref ops 0) #;Ac_mul_Bc ,(expand-forms (cadr a)) - ,(expand-forms (cadr b))) - `(call ,(aref ops 1) #;Ac_mul_B ,(expand-forms (cadr a)) - ,(expand-forms b)))) - ((ctrans? b) - `(call ,(aref ops 2) #;A_mul_Bc ,(expand-forms a) - ,(expand-forms (cadr b)))) - (else - `(call ,(cadr e) ,(expand-forms a) ,(expand-forms b)))))) - ;; convert `a+=b` to `a=a+b` (define (expand-update-operator- op op= lhs rhs declT) (let ((e (remove-argument-side-effects lhs))) @@ -2212,19 +2196,6 @@ ((and (eq? f '^) (length= e 4) (integer? (cadddr e))) (expand-forms `(call (top literal_pow) ^ ,(caddr e) (call (call (core apply_type) (top Val) ,(cadddr e)))))) - - ((and (eq? f '*) (length= e 4)) - (expand-transposed-op - e - #(Ac_mul_Bc Ac_mul_B A_mul_Bc))) - ((and (eq? f '/) (length= e 4)) - (expand-transposed-op - e - #(Ac_rdiv_Bc Ac_rdiv_B A_rdiv_Bc))) - ((and (eq? f '\\) (length= e 4)) - (expand-transposed-op - e - #(Ac_ldiv_Bc Ac_ldiv_B A_ldiv_Bc))) (else (map expand-forms e)))) (map expand-forms e)))