File tree Expand file tree Collapse file tree 6 files changed +23
-5
lines changed
src/compiler/scala/tools/nsc Expand file tree Collapse file tree 6 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ trait Primitives { self: ICodes =>
210
210
case LSL => " LSL"
211
211
case ASR => " ASR"
212
212
case LSR => " LSR"
213
- case _ => throw new RuntimeException (" ShitOp unknown case" )
213
+ case _ => throw new RuntimeException (" ShiftOp unknown case" )
214
214
}
215
215
}
216
216
Original file line number Diff line number Diff line change @@ -452,10 +452,10 @@ abstract class ICodeReader extends ClassfileParser {
452
452
453
453
case JVM .ishl => code.emit(CALL_PRIMITIVE (Shift (LSL , INT )))
454
454
case JVM .lshl => code.emit(CALL_PRIMITIVE (Shift (LSL , LONG )))
455
- case JVM .ishr => code.emit(CALL_PRIMITIVE (Shift (LSR , INT )))
456
- case JVM .lshr => code.emit(CALL_PRIMITIVE (Shift (LSR , LONG )))
457
- case JVM .iushr => code.emit(CALL_PRIMITIVE (Shift (ASR , INT )))
458
- case JVM .lushr => code.emit(CALL_PRIMITIVE (Shift (ASR , LONG )))
455
+ case JVM .ishr => code.emit(CALL_PRIMITIVE (Shift (ASR , INT )))
456
+ case JVM .lshr => code.emit(CALL_PRIMITIVE (Shift (ASR , LONG )))
457
+ case JVM .iushr => code.emit(CALL_PRIMITIVE (Shift (LSR , INT )))
458
+ case JVM .lushr => code.emit(CALL_PRIMITIVE (Shift (LSR , LONG )))
459
459
case JVM .iand => code.emit(CALL_PRIMITIVE (Logical (AND , INT )))
460
460
case JVM .land => code.emit(CALL_PRIMITIVE (Logical (AND , LONG )))
461
461
case JVM .ior => code.emit(CALL_PRIMITIVE (Logical (OR , INT )))
Original file line number Diff line number Diff line change
1
+ -1073741824
2
+ 1073741824
Original file line number Diff line number Diff line change
1
+ -optimise -Ybackend:GenASM -Yinline-warnings
Original file line number Diff line number Diff line change
1
+
2
+ object Test extends App {
3
+ val i = shifty.X .f(Int .MinValue )
4
+ val j = shifty.X .g(Int .MinValue )
5
+ println(i)
6
+ println(j)
7
+ }
8
+
Original file line number Diff line number Diff line change
1
+
2
+ package shifty
3
+
4
+ object X {
5
+ @ inline def f (i : Int ): Int = i >> 1
6
+ @ inline def g (i : Int ): Int = i >>> 1
7
+ }
You can’t perform that action at this time.
0 commit comments