comparison mc-codegen.c @ 256:d80e6387c539

powerpc function call complex arugment pre computation. (incomplete)
author kono
date Sat, 15 May 2004 12:04:56 +0900
parents 8cd8d72286ae
children 22949117768f
comparison
equal deleted inserted replaced
255:8cd8d72286ae 256:d80e6387c539
1634 int 1634 int
1635 contains(int e,int type) 1635 contains(int e,int type)
1636 { 1636 {
1637 while(e) { 1637 while(e) {
1638 if (car(e)==type) return 1; 1638 if (car(e)==type) return 1;
1639 if (!car(e)) return 0;
1639 if (LIST_ARGS(car(e))){ 1640 if (LIST_ARGS(car(e))){
1640 /* list arguments */ 1641 /* list arguments */
1641 return contains_in_list(caddr(e),type); 1642 return contains_in_list(caddr(e),type);
1642 } else if (UNARY_ARGS(car(e))) { 1643 } else if (UNARY_ARGS(car(e))) {
1643 /* unary operators */ 1644 /* unary operators */
1678 1679
1679 int 1680 int
1680 contains_p(int e,int (*p)(int)) 1681 contains_p(int e,int (*p)(int))
1681 { 1682 {
1682 while(e) { 1683 while(e) {
1684 if (!car(e)) return 0;
1683 if (p(car(e))) return 1; 1685 if (p(car(e))) return 1;
1684 if (LIST_ARGS(car(e))){ 1686 if (LIST_ARGS(car(e))){
1685 /* list arguments */ 1687 /* list arguments */
1686 return contains_in_list_p(caddr(e),p); 1688 return contains_in_list_p(caddr(e),p);
1687 } else if (UNARY_ARGS(car(e))) { 1689 } else if (UNARY_ARGS(car(e))) {