diff options
author | Miguel Garcia <miguelalfredo.garcia@epfl.ch> | 2012-03-06 19:36:33 +0100 |
---|---|---|
committer | Miguel Garcia <miguelalfredo.garcia@epfl.ch> | 2012-03-06 19:36:33 +0100 |
commit | d5caf821ae2d8a9746919407c929d644c8baaa10 (patch) | |
tree | c63b3f97f31ebae9f8dd00ce1db74d9778dc009d /src/compiler | |
parent | 6b67c3e23d5a9691a18a15866b95f15384ccc006 (diff) | |
download | scala-d5caf821ae2d8a9746919407c929d644c8baaa10.tar.gz scala-d5caf821ae2d8a9746919407c929d644c8baaa10.tar.bz2 scala-d5caf821ae2d8a9746919407c929d644c8baaa10.zip |
de-specialcasing
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 075b4c29e5..a11024fbc6 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -1654,7 +1654,15 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid with case Arithmetic(op, kind) => op match { - case ADD => jcode.emitADD(javaType(kind)) + case ADD => + (kind: @unchecked) match { + case BOOL | BYTE | CHAR | SHORT | INT => + jcode.emitIADD() + case LONG => jcode.emitLADD() + case FLOAT => jcode.emitFADD() + case DOUBLE => jcode.emitDADD() + } + case SUB => (kind: @unchecked) match { case BOOL | BYTE | CHAR | SHORT | INT => |