aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/pickling/TastyBuffer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-02-12 12:10:53 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-03-18 11:09:43 +0100
commit4f804782950d6efcd979df2dc60c2bcf9a04f115 (patch)
treebd3bd6eecb92fa71d1b8ac5108b9e9d935d9fbad /src/dotty/tools/dotc/core/pickling/TastyBuffer.scala
parentf9eaa3eebb7d98f9a4163d44d2a70fcd3522b645 (diff)
downloaddotty-4f804782950d6efcd979df2dc60c2bcf9a04f115.tar.gz
dotty-4f804782950d6efcd979df2dc60c2bcf9a04f115.tar.bz2
dotty-4f804782950d6efcd979df2dc60c2bcf9a04f115.zip
Eliminate raw numbers from Tasy format
They are an irregularity and don't buy us much. Might as well pickle these numbers as Nats/Longs.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/TastyBuffer.scala')
-rw-r--r--src/dotty/tools/dotc/core/pickling/TastyBuffer.scala13
1 files changed, 1 insertions, 12 deletions
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 --------------------------------------------