diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2008-12-17 14:09:49 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2008-12-17 14:09:49 +0000 |
commit | fef6bc4f30f7421851a414d92153a209699c8b97 (patch) | |
tree | 3dca462c7e4dc2ad541b940de4e93a504a8d757f /src/compiler | |
parent | af7c1282930008c6f69b87c93aa2d4460e2c4ff0 (diff) | |
download | scala-fef6bc4f30f7421851a414d92153a209699c8b97.tar.gz scala-fef6bc4f30f7421851a414d92153a209699c8b97.tar.bz2 scala-fef6bc4f30f7421851a414d92153a209699c8b97.zip |
Fixed warnings.
Diffstat (limited to 'src/compiler')
5 files changed, 6 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala b/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala index dc435bd2e9..d04eb308f8 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala @@ -422,7 +422,7 @@ abstract class Checkers { case CALL_METHOD(method, style) => style match { - case Dynamic => + case Dynamic | InvokeDynamic => checkStack(1 + method.info.paramTypes.length) checkMethodArgs(method) checkMethod(stack.pop, method) diff --git a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala index 9b11c588d0..923481b1c4 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala @@ -314,7 +314,7 @@ trait Opcodes { self: ICodes => override def consumed = { var result = method.tpe.paramTypes.length; result = result + (style match { - case Dynamic => 1 + case Dynamic | InvokeDynamic => 1 case Static(true) => 1 case Static(false) => 0 case SuperCall(_) => 1 @@ -624,6 +624,7 @@ trait Opcodes { self: ICodes => /** Returns a string representation of this style. */ override def toString(): String = this match { case Dynamic => "dynamic" + case InvokeDynamic => "invoke-dynamic" case Static(false) => "static-class" case Static(true) => "static-instance" case SuperCall(mix) => "super(" + mix + ")" diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/CopyPropagation.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/CopyPropagation.scala index 9b9b58c39b..0981d858c4 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/analysis/CopyPropagation.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/CopyPropagation.scala @@ -304,7 +304,7 @@ abstract class CopyPropagation { out.stack = Unknown :: out.stack.drop(i.consumed) case CALL_METHOD(method, style) => style match { - case Dynamic => + case Dynamic | InvokeDynamic => out = simulateCall(in, method, false) case Static(onInstance) => diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala index 20e473f7b0..12c0dc7742 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala @@ -470,7 +470,7 @@ abstract class TypeFlowAnalysis { } case CALL_METHOD(method, style) => style match { - case Dynamic => + case Dynamic | InvokeDynamic => stack.pop(1 + method.info.paramTypes.length) stack.push(toTypeKind(method.info.resultType)) diff --git a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala index dbabae1387..f1059516be 100644 --- a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala +++ b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala @@ -1468,7 +1468,7 @@ abstract class GenMSIL extends SubComponent { if (doEmit) { val methodInfo: MethodInfo = getMethod(msym) - style match { + (style: @unchecked) match { case SuperCall(_) => mcode.Emit(OpCodes.Call, methodInfo) case Dynamic => |