File tree 2 files changed +7
-12
lines changed
compiler/src/dotty/tools/dotc/ast 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,10 @@ abstract class Positioned(implicit @constructorOnly src: SourceFile) extends Pro
29
29
def uniqueId_= (id : Int ): Unit = {
30
30
def printTrace () = {
31
31
println(s " Debug tree (id= ${Positioned .debugId}) creation \n $this\n " )
32
- Reporter .displayPrompt(Console .in, new PrintWriter (Console .err, true ))
32
+ new Exception ().printStackTrace
33
+ // Reporter.displayPrompt(Console.in, new PrintWriter(Console.err, true))
33
34
}
34
- if (Positioned .debugId == id) printTrace()
35
+ if (13 == id) printTrace()
35
36
myUniqueId = id
36
37
}
37
38
Original file line number Diff line number Diff line change @@ -233,20 +233,14 @@ object Liftable {
233
233
}
234
234
235
235
given as Liftable [BigInt ] = new Liftable [BigInt ] {
236
- def toExpr (x : BigInt ): given QuoteContext => Expr [BigInt ] = {
237
- lazy val xInt : Int = x.intValue()
238
- if (x.isValidInt && - 1024 <= xInt && xInt < 1024 ) ' { BigInt ($ {xInt.toExpr}) } // Cached BigInt
239
- else ' { BigInt ($ {x.toString(Character .MAX_RADIX ).toExpr}, $ {Character .MAX_RADIX .toExpr}) } // Compact string BigInt
240
- }
236
+ def toExpr (x : BigInt ): given QuoteContext => Expr [BigInt ] =
237
+ ' { BigInt ($ {x.toString(Character .MAX_RADIX ).toExpr}, $ {Character .MAX_RADIX .toExpr}) }
241
238
}
242
239
243
240
/** Lift a BigDecimal using the default MathContext */
244
241
given as Liftable [BigDecimal ] = new Liftable [BigDecimal ] {
245
- def toExpr (x : BigDecimal ): given QuoteContext => Expr [BigDecimal ] = {
246
- lazy val xInt : Int = x.intValue()
247
- if (x.isValidInt && - 512 <= xInt && xInt < 512 ) ' { BigDecimal ($ {xInt.toExpr}) } // Cached BigDecimal
248
- else ' { BigDecimal ($ {x.toString.toExpr}) }
249
- }
242
+ def toExpr (x : BigDecimal ): given QuoteContext => Expr [BigDecimal ] =
243
+ ' { BigDecimal ($ {x.toString.toExpr}) }
250
244
}
251
245
252
246
}
You can’t perform that action at this time.
0 commit comments