Skip to content

Commit c50c7e0

Browse files
author
odersky
committed
Changes to reflection. First reflection test runs. Review by extempore.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25312 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
1 parent 0daba05 commit c50c7e0

File tree

15 files changed

+286
-294
lines changed

15 files changed

+286
-294
lines changed

src/compiler/scala/reflect/internal/AnnotationInfos.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package scala.reflect
77
package internal
88

99
import util._
10+
import pickling.ByteCodecs
1011

1112
/** AnnotationInfo and its helpers */
1213
trait AnnotationInfos extends api.AnnotationInfos { self: SymbolTable =>

src/compiler/scala/reflect/internal/ByteCodecs.scala

Lines changed: 0 additions & 216 deletions
This file was deleted.

src/compiler/scala/reflect/internal/Definitions.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,13 +647,16 @@ trait Definitions extends reflect.api.StandardDefinitions {
647647
var j = fullname.pos('.', i)
648648
while (j < fullname.length) {
649649
sym = sym.info.member(fullname.subName(i, j))
650+
// if (sym == NoSymbol)
651+
// println("no member "+fullname.subName(i, j)+" found in "+sym0+sym0.info.getClass+" "+sym0.info.typeSymbol.info.getClass)
650652
i = j + 1
651653
j = fullname.pos('.', i)
652654
}
653655
val result =
654656
if (module) sym.info.member(fullname.subName(i, j)).suchThat(_ hasFlag MODULE)
655657
else sym.info.member(fullname.subName(i, j).toTypeName)
656658
if (result == NoSymbol) {
659+
// println("no member "+fullname.subName(i, j)+" found in "+sym+" "+module)
657660
if (settings.debug.value)
658661
{ log(sym.info); log(sym.info.members) }//debug
659662
throw new MissingRequirementError((if (module) "object " else "class ") + fullname)

src/compiler/scala/reflect/internal/Phase.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,8 @@ object NoPhase extends Phase(null) {
5151
def name = "<no phase>"
5252
def run() { throw new Error("NoPhase.run") }
5353
}
54+
55+
object SomePhase extends Phase(NoPhase) {
56+
def name = "<some phase>"
57+
def run() { throw new Error("SomePhase.run") }
58+
}

src/compiler/scala/reflect/internal/SymbolTable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ abstract class SymbolTable extends api.Universe
5050
final val NoRunId = 0
5151

5252
private var ph: Phase = NoPhase
53-
protected var per = NoPeriod
53+
private var per = NoPeriod
5454

5555
final def phase: Phase = ph
5656

src/compiler/scala/reflect/internal/pickling/ByteCodecs.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ object ByteCodecs {
4444
if (in == 0xc0 && (src(i + 1) & 0xff) == 0x80) {
4545
src(j) = 0x7f
4646
i += 2
47+
} else if (in == 0) {
48+
src(j) = 0x7f
49+
i += 1
4750
} else {
4851
src(j) = (in - 1).toByte
4952
i += 1

0 commit comments

Comments
 (0)