diff options
author | Paul Phillips <paulp@improving.org> | 2012-12-20 12:58:03 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-12-20 14:47:50 -0800 |
commit | 106ca1b6767c60912b6726eeb1d435f6e22a025f (patch) | |
tree | c3c4c9a0d988720973b69f196c04e781e6e3f767 /src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala | |
parent | a313fa1d2c03d49fa7bc2a5f9c1886c48e08aab6 (diff) | |
parent | 9ddb4cf41f9832e46fa1109d96fc6708c4586c53 (diff) | |
download | scala-106ca1b6767c60912b6726eeb1d435f6e22a025f.tar.gz scala-106ca1b6767c60912b6726eeb1d435f6e22a025f.tar.bz2 scala-106ca1b6767c60912b6726eeb1d435f6e22a025f.zip |
Merge remote-tracking branch 'origin/2.10.x' into merge-2.10.x
* origin/2.10.x: (31 commits)
Implicit vars should have non-implicit setters.
Deprecate `scala.tools.nsc.Phases` because it's dead-code.
scaladoc Template: remove duplicate code and several usages of Option.get.
adds scala-reflect.jar to MIMA in ant
Test showing the absence of a forward reference
update mailmap
Remove dead code from `Global`.
Cleanup MemberLookup. Better explain ambiguous link targets.
typedIdent no longer destroys attachments
fixes incorrect handling of Annotated in lazy copier
simplifies checkBounds
Recurse into instantiations when stripping type vars.
Extract base scaladoc functionality for the IDE.
Expand pattern match position tests.
SI-6288 Remedy ill-positioned extractor binding.
SI-6288 Fix positioning of label jumps
SI-6288 Position argument of unapply
Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef
SI-6795 Simplify errors related to "abstract override" on type members
SI-6795 Adds negative check for "abstract override" on types in traits
...
Conflicts:
.mailmap
src/compiler/scala/tools/nsc/Global.scala
src/compiler/scala/tools/nsc/ast/DocComments.scala
src/compiler/scala/tools/nsc/doc/base/CommentFactoryBase.scala
src/compiler/scala/tools/nsc/doc/html/page/Source.scala
src/compiler/scala/tools/nsc/doc/html/page/Template.scala
src/compiler/scala/tools/nsc/doc/model/LinkTo.scala
src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala
src/compiler/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala
src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/reflect/scala/reflect/runtime/JavaMirrors.scala
test/scaladoc/run/links.scala
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala b/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala index 34bdc1ede4..24c18e6530 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala @@ -308,7 +308,12 @@ trait BasicBlocks { else instrs.zipWithIndex collect { case (oldInstr, i) if map contains oldInstr => - code.touched |= replaceInstruction(i, map(oldInstr)) + // SI-6288 clone important here because `replaceInstruction` assigns + // a position to `newInstr`. Without this, a single instruction can + // be added twice, and the position last position assigned clobbers + // all previous positions in other usages. + val newInstr = map(oldInstr).clone() + code.touched |= replaceInstruction(i, newInstr) } ////////////////////// Emit ////////////////////// |