summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2016-11-09 22:59:34 -0800
committerSom Snytt <som.snytt@gmail.com>2016-11-10 19:54:41 -0800
commit1dfdb9cf709be3234479cf4db089007fd63c3402 (patch)
tree2d80a26f6ef5904c4d7fe93c08366c7eb2130311 /src/compiler/scala/tools/nsc
parent74ed575a0f62c814595d159a8fd2290c04bcff5f (diff)
downloadscala-1dfdb9cf709be3234479cf4db089007fd63c3402.tar.gz
scala-1dfdb9cf709be3234479cf4db089007fd63c3402.tar.bz2
scala-1dfdb9cf709be3234479cf4db089007fd63c3402.zip
[nomerge] SI-10037 ASR/LSR switched in ICodeReader
Noticed when inlining from a class file. The test doesn't work because inlining fails with bytecode unavailable due to: ``` scala.reflect.internal.MissingRequirementError: object X in compiler mirror not found. ```
Diffstat (limited to 'src/compiler/scala/tools/nsc')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/Primitives.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/Primitives.scala b/src/compiler/scala/tools/nsc/backend/icode/Primitives.scala
index 27bf836484..dd930ba52f 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/Primitives.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/Primitives.scala
@@ -210,7 +210,7 @@ trait Primitives { self: ICodes =>
case LSL => "LSL"
case ASR => "ASR"
case LSR => "LSR"
- case _ => throw new RuntimeException("ShitOp unknown case")
+ case _ => throw new RuntimeException("ShiftOp unknown case")
}
}
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
index b2f5a4119d..7f18565cdf 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
@@ -452,10 +452,10 @@ abstract class ICodeReader extends ClassfileParser {
case JVM.ishl => code.emit(CALL_PRIMITIVE(Shift(LSL, INT)))
case JVM.lshl => code.emit(CALL_PRIMITIVE(Shift(LSL, LONG)))
- case JVM.ishr => code.emit(CALL_PRIMITIVE(Shift(LSR, INT)))
- case JVM.lshr => code.emit(CALL_PRIMITIVE(Shift(LSR, LONG)))
- case JVM.iushr => code.emit(CALL_PRIMITIVE(Shift(ASR, INT)))
- case JVM.lushr => code.emit(CALL_PRIMITIVE(Shift(ASR, LONG)))
+ case JVM.ishr => code.emit(CALL_PRIMITIVE(Shift(ASR, INT)))
+ case JVM.lshr => code.emit(CALL_PRIMITIVE(Shift(ASR, LONG)))
+ case JVM.iushr => code.emit(CALL_PRIMITIVE(Shift(LSR, INT)))
+ case JVM.lushr => code.emit(CALL_PRIMITIVE(Shift(LSR, LONG)))
case JVM.iand => code.emit(CALL_PRIMITIVE(Logical(AND, INT)))
case JVM.land => code.emit(CALL_PRIMITIVE(Logical(AND, LONG)))
case JVM.ior => code.emit(CALL_PRIMITIVE(Logical(OR, INT)))