@@ -25,47 +25,40 @@ object trace extends TraceSyntax {
25
25
abstract class TraceSyntax {
26
26
val isForced : Boolean
27
27
28
- @ forceInline
29
- def onDebug [TD ](question : => String )(op : => TD )(implicit ctx : Context ): TD =
28
+ inline def onDebug [TD ](question : => String )(op : => TD )(implicit ctx : Context ): TD =
30
29
conditionally(ctx.settings.YdebugTrace .value, question, false )(op)
31
30
32
- @ forceInline
33
- def conditionally [TC ](cond : Boolean , question : => String , show : Boolean )(op : => TC )(implicit ctx : Context ): TC =
34
- if (isForced || Config .tracingEnabled) {
31
+ inline def conditionally [TC ](cond : Boolean , question : => String , show : Boolean )(op : => TC )(implicit ctx : Context ): TC =
32
+ inline if (isForced || Config .tracingEnabled) {
35
33
def op1 = op
36
34
if (cond) apply[TC ](question, Printers .default, show)(op1)
37
35
else op1
38
36
}
39
37
else op
40
38
41
- @ forceInline
42
- def apply [T ](question : => String , printer : Printers .Printer , showOp : Any => String )(op : => T )(implicit ctx : Context ): T =
43
- if (isForced || Config .tracingEnabled) {
39
+ inline def apply [T ](question : => String , printer : Printers .Printer , showOp : Any => String )(op : => T )(implicit ctx : Context ): T =
40
+ inline if (isForced || Config .tracingEnabled) {
44
41
def op1 = op
45
42
if (! isForced && printer.eq(config.Printers .noPrinter)) op1
46
43
else doTrace[T ](question, printer, showOp)(op1)
47
44
}
48
45
else op
49
46
50
- @ forceInline
51
- def apply [T ](question : => String , printer : Printers .Printer , show : Boolean )(op : => T )(implicit ctx : Context ): T =
52
- if (isForced || Config .tracingEnabled) {
47
+ inline def apply [T ](question : => String , printer : Printers .Printer , show : Boolean )(op : => T )(implicit ctx : Context ): T =
48
+ inline if (isForced || Config .tracingEnabled) {
53
49
def op1 = op
54
50
if (! isForced && printer.eq(config.Printers .noPrinter)) op1
55
51
else doTrace[T ](question, printer, if (show) showShowable(_) else alwaysToString)(op1)
56
52
}
57
53
else op
58
54
59
- @ forceInline
60
- def apply [T ](question : => String , printer : Printers .Printer )(op : => T )(implicit ctx : Context ): T =
55
+ inline def apply [T ](question : => String , printer : Printers .Printer )(op : => T )(implicit ctx : Context ): T =
61
56
apply[T ](question, printer, false )(op)
62
57
63
- @ forceInline
64
- def apply [T ](question : => String , show : Boolean )(op : => T )(implicit ctx : Context ): T =
58
+ inline def apply [T ](question : => String , show : Boolean )(op : => T )(implicit ctx : Context ): T =
65
59
apply[T ](question, Printers .default, show)(op)
66
60
67
- @ forceInline
68
- def apply [T ](question : => String )(op : => T )(implicit ctx : Context ): T =
61
+ inline def apply [T ](question : => String )(op : => T )(implicit ctx : Context ): T =
69
62
apply[T ](question, Printers .default, false )(op)
70
63
71
64
private def showShowable (x : Any )(implicit ctx : Context ) = x match {
0 commit comments