aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/core/pickling/PickleFormat.scala4
-rw-r--r--src/dotty/tools/dotc/core/pickling/TastyBuffer.scala13
-rw-r--r--src/dotty/tools/dotc/core/pickling/TreePickler.scala4
3 files changed, 5 insertions, 16 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/PickleFormat.scala b/src/dotty/tools/dotc/core/pickling/PickleFormat.scala
index 6769cd016..338342459 100644
--- a/src/dotty/tools/dotc/core/pickling/PickleFormat.scala
+++ b/src/dotty/tools/dotc/core/pickling/PickleFormat.scala
@@ -113,8 +113,8 @@ Standard-Section: "ASTs" Tree*
INTneg NegNat
LONGconst LongNat
LONGneg NegLongNat
- FLOATconst FullInt
- DOUBLEconst FullLong
+ FLOATconst LongNat
+ DOUBLEconst LongNat
STRINGconst NameRef
NULLconst
CLASSconst Length Type
diff --git a/src/dotty/tools/dotc/core/pickling/TastyBuffer.scala b/src/dotty/tools/dotc/core/pickling/TastyBuffer.scala
index 0e44dbd76..ba033461e 100644
--- a/src/dotty/tools/dotc/core/pickling/TastyBuffer.scala
+++ b/src/dotty/tools/dotc/core/pickling/TastyBuffer.scala
@@ -61,8 +61,7 @@ class TastyBuffer(initialSize: Int) {
writeLongNat(x.toLong & 0x00000000FFFFFFFFL)
/**
- * Like writeNat, but for longs. This is not the same as
- * writeRaw, which writes in base 256. Note that the
+ * Like writeNat, but for longs. Note that the
* binary representation of LongNat is identical to Nat
* if the long value is in the range Int.MIN_VALUE to
* Int.MAX_VALUE.
@@ -77,16 +76,6 @@ class TastyBuffer(initialSize: Int) {
if (y != 0L) writeNatPrefix(y)
writeByte(((x & 0x7f) | 0x80).toInt)
}
-
- /** Write the `nbytes` least significant bytes of `x` in big endian format */
- def writeRaw(x: Long, nbytes: Int): Unit = {
- def recur(x: Long, n: Int): Unit =
- if (n > 0) {
- recur(x >>> 8, n - 1)
- writeByte((x & 0xff).toInt)
- }
- recur(x, nbytes)
- }
// -- Address handling --------------------------------------------
diff --git a/src/dotty/tools/dotc/core/pickling/TreePickler.scala b/src/dotty/tools/dotc/core/pickling/TreePickler.scala
index cc5a8b8f2..b3f228040 100644
--- a/src/dotty/tools/dotc/core/pickling/TreePickler.scala
+++ b/src/dotty/tools/dotc/core/pickling/TreePickler.scala
@@ -88,10 +88,10 @@ class TreePickler(pickler: TastyPickler, picklePositions: Boolean) {
pickleNum(LONGconst, LONGneg)
case FloatTag =>
writeByte(FLOATconst)
- writeRaw(java.lang.Float.floatToRawIntBits(c.floatValue), 4)
+ writeNat(java.lang.Float.floatToRawIntBits(c.floatValue))
case DoubleTag =>
writeByte(DOUBLEconst)
- writeRaw(java.lang.Double.doubleToRawLongBits(c.doubleValue), 8)
+ writeLongNat(java.lang.Double.doubleToRawLongBits(c.doubleValue))
case StringTag =>
writeByte(STRINGconst)
writeNat(nameIndex(c.stringValue).index)