@@ -1593,14 +1593,6 @@ void
15931593action_proc_construct (Reduce * rc ,
15941594 Compile * compile , HeapNode * * arg , PElement * out )
15951595{
1596- if (trace_flags & TRACE_CLASS_NEW ) {
1597- VipsBuf * buf = trace_push ();
1598-
1599- vips_buf_appendf (buf , "constructor \"%s\" " ,
1600- IOBJECT (compile -> sym )-> name );
1601- trace_args (arg , compile -> nparam + compile -> nsecret );
1602- }
1603-
16041596 if (reduce_safe_pointer (rc ,
16051597 (reduce_safe_pointer_fn ) action_proc_construct_sub ,
16061598 compile , arg , out , NULL ))
@@ -1614,11 +1606,6 @@ action_proc_construct(Reduce *rc,
16141606 printf ("reduce: invoking arg checker\n" );
16151607#endif
16161608 }
1617-
1618- if (trace_flags & TRACE_CLASS_NEW ) {
1619- trace_result (TRACE_CLASS_NEW , out );
1620- trace_pop ();
1621- }
16221609}
16231610
16241611static void *
@@ -1647,24 +1634,8 @@ static void
16471634action_proc_class_binary (Reduce * rc , Compile * compile ,
16481635 int op , const char * name , PElement * a , PElement * b , PElement * out )
16491636{
1650- TraceFlags flags = op >= 0 ? TRACE_OPERATOR : TRACE_BUILTIN ;
16511637 PElement fn ;
16521638
1653- if (trace_flags & flags ) {
1654- VipsBuf * buf = trace_push ();
1655-
1656- vips_buf_appendf (buf , "%s\n" , _ ("invoking method:" ));
1657- vips_buf_appends (buf , " " );
1658- trace_pelement (a );
1659- vips_buf_appendf (buf , ".%s \"%s\" " , MEMBER_OO_BINARY , name );
1660- trace_pelement (b );
1661- vips_buf_appends (buf , "\n" );
1662-
1663- trace_text (flags , "%s" , vips_buf_all (buf ));
1664-
1665- trace_pop ();
1666- }
1667-
16681639 /* Look up a.oo_binary and build (a.dispatch_binary "add" b)
16691640 * application.
16701641 */
@@ -1683,24 +1654,8 @@ static void
16831654action_proc_class_binary2 (Reduce * rc , Compile * compile ,
16841655 int op , const char * name , PElement * a , PElement * b , PElement * out )
16851656{
1686- TraceFlags flags = op >= 0 ? TRACE_OPERATOR : TRACE_BUILTIN ;
16871657 PElement fn ;
16881658
1689- if (trace_flags & flags ) {
1690- VipsBuf * buf = trace_push ();
1691-
1692- vips_buf_appendf (buf , "%s\n" , _ ("invoking method:" ));
1693- vips_buf_appends (buf , " " );
1694- trace_pelement (b );
1695- vips_buf_appendf (buf , ".%s \"%s\" " , MEMBER_OO_BINARY2 , name );
1696- trace_pelement (a );
1697- vips_buf_appends (buf , "\n" );
1698-
1699- trace_text (flags , "%s" , vips_buf_all (buf ));
1700-
1701- trace_pop ();
1702- }
1703-
17041659 /* Look up b.dispatch_binary2 and build
17051660 * (b.dispatch_binary2 "add" a) application.
17061661 */
@@ -1724,63 +1679,34 @@ action_landlor(Reduce *rc, Compile *compile,
17241679 */
17251680 return ;
17261681
1727- if (trace_flags & TRACE_OPERATOR )
1728- trace_push ();
1729-
17301682 /* Examine the LHS and see if we can avoid RHS eval.
17311683 */
17321684 if (PEISCLASS (a ))
17331685 action_proc_class_binary (rc , compile , op , name , a , b , out );
17341686 else if (PEISBOOL (a )) {
1735- if (op == BI_LOR && PEGETBOOL (a )) {
1736- if (trace_flags & TRACE_OPERATOR )
1737- trace_binop (compile , a , op , b );
1738-
1687+ if (op == BI_LOR && PEGETBOOL (a ))
17391688 PEPUTP (out , ELEMENT_BOOL , TRUE);
1740-
1741- if (trace_flags & TRACE_OPERATOR )
1742- trace_result (TRACE_OPERATOR , out );
1743- }
1744- else if (op == BI_LAND && !PEGETBOOL (a )) {
1745- if (trace_flags & TRACE_OPERATOR )
1746- trace_binop (compile , a , op , b );
1747-
1689+ else if (op == BI_LAND && !PEGETBOOL (a ))
17481690 PEPUTP (out , ELEMENT_BOOL , FALSE);
1749-
1750- if (trace_flags & TRACE_OPERATOR )
1751- trace_result (TRACE_OPERATOR , out );
1752- }
17531691 else {
17541692 /* Need to look at RHS too.
17551693 */
17561694 reduce_spine (rc , b );
17571695
17581696 if (PEISCOMB (b ) && PEGETCOMB (b ) != COMB_I ) {
1759- if (trace_flags & TRACE_OPERATOR )
1760- trace_pop ();
17611697 return ;
17621698 }
17631699
17641700 if (PEISCLASS (b ))
17651701 action_proc_class_binary2 (rc , compile , op , name , a , b , out );
1766- else if (PEISBOOL (b )) {
1767- if (trace_flags & TRACE_OPERATOR )
1768- trace_binop (compile , a , op , b );
1769-
1702+ else if (PEISBOOL (b ))
17701703 PEPUTP (out , ELEMENT_BOOL , PEGETBOOL (b ));
1771-
1772- if (trace_flags & TRACE_OPERATOR )
1773- trace_result (TRACE_OPERATOR , out );
1774- }
17751704 else
17761705 action_boperror (rc , compile , NULL , op , name , a , b );
17771706 }
17781707 }
17791708 else
17801709 action_boperror (rc , compile , NULL , op , name , a , b );
1781-
1782- if (trace_flags & TRACE_OPERATOR )
1783- trace_pop ();
17841710}
17851711
17861712static void
@@ -1800,40 +1726,20 @@ action_if(Reduce *rc, Compile *compile,
18001726 PElement t , e ;
18011727
18021728 /* a is condition, b should be [then-part, else-part] ...
1803- * look down b and find them. Block trace for this, not very
1804- * interesting.
1729+ * look down b and find them.
18051730 */
1806- trace_block ();
18071731 reduce_list_index (rc , b , 0 , & t );
18081732 reduce_list_index (rc , b , 1 , & e );
1809- trace_unblock ();
18101733
18111734 /* Can be BOOL or image.
18121735 */
18131736 if (PEISBOOL (a )) {
1814- if (trace_flags & TRACE_OPERATOR ) {
1815- VipsBuf * buf = trace_push ();
1816-
1817- vips_buf_appendf (buf , "if " );
1818- trace_pelement (a );
1819- vips_buf_appendf (buf , " then " );
1820- trace_pelement (& t );
1821- vips_buf_appendf (buf , " else " );
1822- trace_pelement (& e );
1823- vips_buf_appendf (buf , " ->\n" );
1824- }
1825-
18261737 if (PEGETBOOL (a )) {
18271738 PEPUTPE (out , & t );
18281739 }
18291740 else {
18301741 PEPUTPE (out , & e );
18311742 }
1832-
1833- if (trace_flags & TRACE_OPERATOR ) {
1834- trace_result (TRACE_OPERATOR , out );
1835- trace_pop ();
1836- }
18371743 }
18381744 else if (PEISIMAGE (a )) {
18391745 reduce_spine_strict (rc , & t );
@@ -2025,22 +1931,8 @@ static void
20251931action_proc_class_unary (Reduce * rc , Compile * compile ,
20261932 int op , const char * name , PElement * a , PElement * out )
20271933{
2028- TraceFlags flags = op >= 0 ? TRACE_OPERATOR : TRACE_BUILTIN ;
20291934 PElement fn ;
20301935
2031- if (trace_flags & flags ) {
2032- VipsBuf * buf = trace_push ();
2033-
2034- vips_buf_appendf (buf , "%s\n" , _ ("invoking method:" ));
2035- vips_buf_appends (buf , " " );
2036- trace_pelement (a );
2037- vips_buf_appendf (buf , ".%s \"%s\"\n" , MEMBER_OO_UNARY , name );
2038-
2039- trace_text (flags , "%s" , vips_buf_all (buf ));
2040-
2041- trace_pop ();
2042- }
2043-
20441936 /* Look up a.dispatch_unary and build
20451937 * (a.oo_unary "minus") application.
20461938 */
@@ -2062,7 +1954,6 @@ action_dispatch(Reduce *rc, Compile *compile, ReduceFunction rfn,
20621954 int op , const char * name , gboolean override ,
20631955 ActionFn afn , int nargs , HeapNode * * arg , void * user )
20641956{
2065- TraceFlags flags = op >= 0 ? TRACE_OPERATOR : TRACE_BUILTIN ;
20661957 PElement a , b ;
20671958 int i ;
20681959
@@ -2093,13 +1984,6 @@ action_dispatch(Reduce *rc, Compile *compile, ReduceFunction rfn,
20931984 PEPOINTRIGHT (arg [0 ], & b );
20941985 PEPOINTRIGHT (arg [1 ], & a );
20951986
2096- if (trace_flags & flags ) {
2097- VipsBuf * buf = trace_push ();
2098-
2099- vips_buf_appendf (buf , "\"%s\" " , name );
2100- trace_args (arg , nargs );
2101- }
2102-
21031987 if (override && nargs == 2 && PEISCLASS (& a ))
21041988 action_proc_class_binary (rc , compile , op , name , & a , & b , & b );
21051989 else if (override && nargs == 2 && PEISCLASS (& b ))
@@ -2110,9 +1994,4 @@ action_dispatch(Reduce *rc, Compile *compile, ReduceFunction rfn,
21101994 afn (rc , compile , op , name , arg , & b , user );
21111995
21121996 PPUTLEFT (arg [0 ], ELEMENT_COMB , COMB_I );
2113-
2114- if (trace_flags & flags ) {
2115- trace_result (flags , & b );
2116- trace_pop ();
2117- }
21181997}
0 commit comments