Skip to content

renaming in GenBCode: scala.tools.asm -> dotty.tools.asm #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/backend/jvm/BCodeBodyBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package jvm
import scala.collection.{ mutable, immutable }
import scala.annotation.switch

import scala.tools.asm
import dotty.tools.asm

import dotc.ast.Trees._
import core.Types.Type
Expand Down
8 changes: 4 additions & 4 deletions src/dotty/tools/dotc/backend/jvm/BCodeGlue.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package dotty.tools
package dotc
package backend.jvm

import scala.tools.asm
import dotty.tools.asm
import scala.annotation.switch
import scala.collection.{ immutable, mutable }

Expand Down Expand Up @@ -256,8 +256,8 @@ abstract class BCodeGlue {
/*
* can-multi-thread
*/
def toASMType: scala.tools.asm.Type = {
import scala.tools.asm
def toASMType: dotty.tools.asm.Type = {
import dotty.tools.asm
// using `asm.Type.SHORT` instead of `BType.SHORT` because otherwise "warning: could not emit switch for @switch annotated match"
(sort: @switch) match {
case asm.Type.VOID => asm.Type.VOID_TYPE
Expand Down Expand Up @@ -533,7 +533,7 @@ abstract class BCodeGlue {
* can-multi-thread
*/
def getOpcode(opcode: Int): Int = {
import scala.tools.asm.Opcodes
import dotty.tools.asm.Opcodes
if (opcode == Opcodes.IALOAD || opcode == Opcodes.IASTORE) {
// the offset for IALOAD or IASTORE is in byte 1 of 'off' for
// primitive types (buf == null)
Expand Down
4 changes: 2 additions & 2 deletions src/dotty/tools/dotc/backend/jvm/BCodeHelpers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package dotty.tools
package dotc
package backend.jvm

import scala.tools.asm
import dotty.tools.asm
import scala.annotation.switch
import scala.collection.{ immutable, mutable }
import dotty.tools.io.AbstractFile
Expand Down Expand Up @@ -823,7 +823,7 @@ abstract class BCodeHelpers extends BCodeTypes with BytecodeWriters {
// Run the signature parser to catch bogus signatures.
val isValidSignature = wrap {
// Alternative: scala.tools.reflect.SigParser (frontend to sun.reflect.generics.parser.SignatureParser)
import scala.tools.asm.util.CheckClassAdapter
import dotty.tools.asm.util.CheckClassAdapter
if (sym.isMethod) { CheckClassAdapter checkMethodSignature sig }
else if (sym.isTerm) { CheckClassAdapter checkFieldSignature sig }
else { CheckClassAdapter checkClassSignature sig }
Expand Down
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/backend/jvm/BCodeIdiomatic.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package dotty.tools
package dotc
package backend.jvm

import scala.tools.asm
import dotty.tools.asm
import scala.annotation.switch
import scala.collection.{ immutable, mutable }
import collection.convert.Wrappers.JListWrapper
Expand Down
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/backend/jvm/BCodeSkelBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import scala.collection.{ mutable, immutable }
import scala.tools.nsc.symtab._
import scala.annotation.switch

import scala.tools.asm
import dotty.tools.asm

import dotc.ast.Trees._
import dotc.core.Types.Type
Expand Down
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/backend/jvm/BCodeSyncAndTry.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package jvm
import scala.collection.{ mutable, immutable }
import scala.annotation.switch

import scala.tools.asm
import dotty.tools.asm

import dotc.ast.Trees._
import dotc.core.Types.Type
Expand Down
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/backend/jvm/BCodeTypes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package dotty.tools
package dotc
package backend.jvm

import scala.tools.asm
import dotty.tools.asm
import scala.collection.{ immutable, mutable }

import dotc.ast.Trees.Tree
Expand Down
4 changes: 2 additions & 2 deletions src/dotty/tools/dotc/backend/jvm/BytecodeWriters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ trait BytecodeWriters {
*
* */
trait AsmpBytecodeWriter extends BytecodeWriter {
import scala.tools.asm
import dotty.tools.asm

private val baseDir = Directory(settings.Ygenasmp.value).createDirectory()

Expand All @@ -95,7 +95,7 @@ trait BytecodeWriters {
val cnode = new asm.tree.ClassNode()
val cr = new asm.ClassReader(jclassBytes)
cr.accept(cnode, 0)
val trace = new scala.tools.asm.util.TraceClassVisitor(new java.io.PrintWriter(new java.io.StringWriter()))
val trace = new dotty.tools.asm.util.TraceClassVisitor(new java.io.PrintWriter(new java.io.StringWriter()))
cnode.accept(trace)
trace.p.print(pw)
}
Expand Down
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/backend/jvm/GenBCode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package jvm
import scala.collection.{ mutable, immutable }
import scala.annotation.switch

import scala.tools.asm
import dotty.tools.asm

import dotc.ast.Trees
import dotc.core.Types.Type
Expand Down
24 changes: 12 additions & 12 deletions src/dotty/tools/dotc/backend/jvm/icodes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,48 +32,48 @@ object icodes {
case object EQ extends TestOp {
def negate() = NE
override def toString() = "EQ"
override def opcodeIF() = scala.tools.asm.Opcodes.IFEQ
override def opcodeIFICMP() = scala.tools.asm.Opcodes.IF_ICMPEQ
override def opcodeIF() = dotty.tools.asm.Opcodes.IFEQ
override def opcodeIFICMP() = dotty.tools.asm.Opcodes.IF_ICMPEQ
}

/** A non-equality test */
case object NE extends TestOp {
def negate() = EQ
override def toString() = "NE"
override def opcodeIF() = scala.tools.asm.Opcodes.IFNE
override def opcodeIFICMP() = scala.tools.asm.Opcodes.IF_ICMPNE
override def opcodeIF() = dotty.tools.asm.Opcodes.IFNE
override def opcodeIFICMP() = dotty.tools.asm.Opcodes.IF_ICMPNE
}

/** A less-than test */
case object LT extends TestOp {
def negate() = GE
override def toString() = "LT"
override def opcodeIF() = scala.tools.asm.Opcodes.IFLT
override def opcodeIFICMP() = scala.tools.asm.Opcodes.IF_ICMPLT
override def opcodeIF() = dotty.tools.asm.Opcodes.IFLT
override def opcodeIFICMP() = dotty.tools.asm.Opcodes.IF_ICMPLT
}

/** A greater-than-or-equal test */
case object GE extends TestOp {
def negate() = LT
override def toString() = "GE"
override def opcodeIF() = scala.tools.asm.Opcodes.IFGE
override def opcodeIFICMP() = scala.tools.asm.Opcodes.IF_ICMPGE
override def opcodeIF() = dotty.tools.asm.Opcodes.IFGE
override def opcodeIFICMP() = dotty.tools.asm.Opcodes.IF_ICMPGE
}

/** A less-than-or-equal test */
case object LE extends TestOp {
def negate() = GT
override def toString() = "LE"
override def opcodeIF() = scala.tools.asm.Opcodes.IFLE
override def opcodeIFICMP() = scala.tools.asm.Opcodes.IF_ICMPLE
override def opcodeIF() = dotty.tools.asm.Opcodes.IFLE
override def opcodeIFICMP() = dotty.tools.asm.Opcodes.IF_ICMPLE
}

/** A greater-than test */
case object GT extends TestOp {
def negate() = LE
override def toString() = "GT"
override def opcodeIF() = scala.tools.asm.Opcodes.IFGT
override def opcodeIFICMP() = scala.tools.asm.Opcodes.IF_ICMPGT
override def opcodeIF() = dotty.tools.asm.Opcodes.IFGT
override def opcodeIFICMP() = dotty.tools.asm.Opcodes.IF_ICMPGT
}

/** This class represents an arithmetic operation. */
Expand Down