Skip to content

Commit

Permalink
Disable @switch for when not able to produece switch
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasstucki committed Nov 23, 2017
1 parent d4bb866 commit 924483f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
* Otherwise it's safe to call from multiple threads.
*/
def genConstant(const: Constant): Unit = {
(const.tag: @switch) match {
(const.tag/*: @switch*/) match {

case BooleanTag => bc.boolconst(const.booleanValue)

Expand Down Expand Up @@ -625,7 +625,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
for (i <- args.length until dims) elemKind = ArrayBType(elemKind)
}
genLoadArguments(args, List.fill(args.size)(INT))
(argsSize : @switch) match {
(argsSize /*: @switch*/) match {
case 1 => bc newarray elemKind
case _ =>
val descr = ("[" * argsSize) + elemKind.descriptor // denotes the same as: arrayN(elemKind, argsSize).descriptor
Expand Down

0 comments on commit 924483f

Please sign in to comment.