diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2009-10-06 16:22:11 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2009-10-06 16:22:11 +0000 |
commit | fe8658350be10057c5794ab3ccfa32894a46c710 (patch) | |
tree | 50d1e149d0793242a17c975b87aa1181ef259392 | |
parent | 3e417979855b4a5c14db88c9d62f4264cbbcf631 (diff) | |
download | scala-fe8658350be10057c5794ab3ccfa32894a46c710.tar.gz scala-fe8658350be10057c5794ab3ccfa32894a46c710.tar.bz2 scala-fe8658350be10057c5794ab3ccfa32894a46c710.zip |
Fixed stability issues for optimised
-rw-r--r-- | build.xml | 2 | ||||
-rw-r--r-- | compiler.iml | 12 | ||||
-rw-r--r-- | scala-lang.ipr | 3 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala | 6 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala | 12 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/icode/Printers.scala | 3 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/opt/Inliners.scala | 2 |
7 files changed, 27 insertions, 13 deletions
@@ -1601,7 +1601,7 @@ FORWARDED TARGETS FOR NIGHTLY BUILDS <target name="nightly"> <antcall target="nightly-nopt"> <!-- disabled until problems are fixed --> - <!-- <param name="scalac.args.optimise" value="-optimise"/> --> + <param name="scalac.args.optimise" value="-optimise"/> </antcall> </target> diff --git a/compiler.iml b/compiler.iml index a41887aa3b..fe440df844 100644 --- a/compiler.iml +++ b/compiler.iml @@ -2,17 +2,23 @@ <module relativePaths="true" type="JAVA_MODULE" version="4"> <component name="FacetManager"> <facet type="Scala" name="Scala"> - <configuration /> + <configuration> + <option name="takeFromSettings" value="true" /> + <option name="myScalaCompilerJarPath" value="$MODULE_DIR$/build/locker/classes/compiler:/localhome/dragos/workspace-laptop/git/scala/lib/fjbg.jar" /> + <option name="myScalaSdkJarPath" value="$MODULE_DIR$/build/locker/classes/library" /> + </configuration> </facet> </component> - <component name="NewModuleRootManager" inherit-compiler-output="true"> + <component name="NewModuleRootManager" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/build/quick/classes/compiler" /> + <output-test url="file://$MODULE_DIR$/out/test/compiler" /> <exclude-output /> <content url="file://$MODULE_DIR$/src/compiler"> <sourceFolder url="file://$MODULE_DIR$/src/compiler" isTestSource="false" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> - <orderEntry type="module" module-name="library" /> + <orderEntry type="library" name="Locker Lib" level="project" /> <orderEntry type="library" name="Project ant library" level="project" /> <orderEntry type="library" name="Project Scala SDK" level="project" /> <orderEntry type="library" name="ant" level="application" /> diff --git a/scala-lang.ipr b/scala-lang.ipr index 341d636b25..40e134b243 100644 --- a/scala-lang.ipr +++ b/scala-lang.ipr @@ -1487,6 +1487,9 @@ <option name="myVersion" value="124" /> <option name="mySupportsUserInfoFilter" value="true" /> </component> + <component name="VcsDirectoryMappings"> + <mapping directory="" vcs="Git" /> + </component> <component name="WebServicesPlugin" addRequiredLibraries="true" /> <component name="libraryTable"> <library name="Project ant library"> diff --git a/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala b/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala index def5f1060d..a774473167 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala @@ -167,7 +167,7 @@ trait BasicBlocks { def replaceInstruction(pos: Int, instr: Instruction): Boolean = { assert(closed, "Instructions can be replaced only after the basic block is closed") - instr.pos = instrs(pos).pos + instr.setPos(instrs(pos).pos) instrs(pos) = instr true } @@ -184,7 +184,7 @@ trait BasicBlocks { var changed = false while (i < instrs.length && !changed) { if (instrs(i) == oldInstr) { - newInstr.pos = oldInstr.pos + newInstr.setPos(oldInstr.pos) instrs(i) = newInstr changed = true } @@ -330,7 +330,7 @@ trait BasicBlocks { if (!ignore) { touched = true - instr.pos = pos + instr.setPos(pos) instructionList = instr :: instructionList _lastInstruction = instr } diff --git a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala index 07e9f07454..ca2a0591ed 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala @@ -59,7 +59,7 @@ trait Opcodes { self: ICodes => /** This class represents an instruction of the intermediate code. * Each case subclass will represent a specific operation. */ - abstract class Instruction { + abstract class Instruction extends Cloneable { /** This abstract method returns the number of used elements on the stack */ def consumed : Int = 0 @@ -79,15 +79,21 @@ trait Opcodes { self: ICodes => def difference = produced-consumed /** The corresponding position in the source file */ - var pos: Position = NoPosition + private var _pos: Position = NoPosition + + def pos: Position = _pos /** Used by dead code elimination. */ var useful: Boolean = false def setPos(p: Position): this.type = { - pos = p + _pos = p this } + + /** Clone this instruction. */ + override def clone: Instruction = + super.clone.asInstanceOf[Instruction] } object opcodes { diff --git a/src/compiler/scala/tools/nsc/backend/icode/Printers.scala b/src/compiler/scala/tools/nsc/backend/icode/Printers.scala index 1dd51a3741..f03b84a50e 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/Printers.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/Printers.scala @@ -128,8 +128,7 @@ trait Printers { self: ICodes => def printInstruction(i: Instruction) { // if (settings.Xdce.value) // print(if (i.useful) " " else " * "); - if (settings.debug.value) - if (i.pos.isDefined) print(i.pos.line.toString) + if (i.pos.isDefined) print(i.pos.line.toString + "\t") else print("undef\t") println(i.toString()) } } diff --git a/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala b/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala index 829052cf6d..487e66fc9e 100644 --- a/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala +++ b/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala @@ -199,7 +199,7 @@ abstract class Inliners extends SubComponent { case CALL_METHOD(meth, Static(true)) if (meth.isClassConstructor) => CALL_METHOD(meth, Static(true)) - case _ => i + case _ => i.clone } // check any pending NEW's if (pending isDefinedAt i) { |