From b766a0baf330c46dbab05afc61364e04bb5ffb6c Mon Sep 17 00:00:00 2001 From: michelou Date: Mon, 9 Jul 2007 17:21:06 +0000 Subject: updated svn:keywords and file headers --- src/compiler/scala/tools/nsc/matching/Set64.scala | 19 +++++++++++++------ .../scala/tools/nsc/matching/TagIndexPair.scala | 12 ++++++++++-- .../scala/tools/nsc/matching/TransMatcher.scala | 13 +++++++------ 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/src/compiler/scala/tools/nsc/matching/Set64.scala b/src/compiler/scala/tools/nsc/matching/Set64.scala index 5323e2662a..a157139c63 100644 --- a/src/compiler/scala/tools/nsc/matching/Set64.scala +++ b/src/compiler/scala/tools/nsc/matching/Set64.scala @@ -1,17 +1,24 @@ +/* NSC -- new Scala compiler + * Copyright 2006-2007 LAMP/EPFL + * @author Burak Emir + */ +// $Id$ + package scala.tools.nsc.matching /** An enumeration bit set that can handle enumeration values with ids up - * to 63 in a Long. copied, pasted and mutabilitized from Sean's Enumeration. + * to 63 in a Long. copied, pasted and mutabilitized from + * Sean's Enumeration. */ class Set64 { - var underlying : Long = 0 + var underlying: Long = 0 def contains(value: Int) = (underlying & (1L << value)) != 0 -// def |=( set : IntSet64) { underlying = underlying | set.underlying } - def |=(value : Int) { underlying = underlying | (1L << value) } -// def &~=(value : Value) { underlying = underlying & (~(1L << value) } -// def &=(set : Set64) { underlying = underlying & set.underlying) } +// def |=( set: IntSet64) { underlying = underlying | set.underlying } + def |=(value: Int) { underlying = underlying | (1L << value) } +// def &~=(value: Value) { underlying = underlying & (~(1L << value) } +// def &=(set: Set64) { underlying = underlying & set.underlying) } } diff --git a/src/compiler/scala/tools/nsc/matching/TagIndexPair.scala b/src/compiler/scala/tools/nsc/matching/TagIndexPair.scala index 86e599be25..50c7221a51 100644 --- a/src/compiler/scala/tools/nsc/matching/TagIndexPair.scala +++ b/src/compiler/scala/tools/nsc/matching/TagIndexPair.scala @@ -1,3 +1,9 @@ +/* NSC -- new Scala compiler + * Copyright 2006-2007 LAMP/EPFL + * @author Burak Emir + */ +// $Id$ + package scala.tools.nsc.matching object TagIndexPair { @@ -13,8 +19,10 @@ object TagIndexPair { } /** sorted, null-terminated list of (int,int) pairs */ -class TagIndexPair(val tag:Int, val index: Int, val next: TagIndexPair) { +class TagIndexPair(val tag: Int, val index: Int, val next: TagIndexPair) { - def find(tag:Int): Int = if(this.tag == tag) index else next.find(tag) // assumes argument can always be found + def find(tag: Int): Int = + if (this.tag == tag) index + else next.find(tag) // assumes argument can always be found } diff --git a/src/compiler/scala/tools/nsc/matching/TransMatcher.scala b/src/compiler/scala/tools/nsc/matching/TransMatcher.scala index 5a17202a78..1f03d5decb 100644 --- a/src/compiler/scala/tools/nsc/matching/TransMatcher.scala +++ b/src/compiler/scala/tools/nsc/matching/TransMatcher.scala @@ -1,5 +1,5 @@ /* NSC -- new Scala compiler - * Copyright 2005-2006 LAMP/EPFL + * Copyright 2005-2007 LAMP/EPFL * @author Burak Emir */ // $Id$ @@ -15,7 +15,6 @@ trait TransMatcher { self: transform.ExplicitOuter => import global._ import definitions._ import posAssigner.atPos - import typer.typed import symtab.Flags var cunit: CompilationUnit = _ @@ -33,10 +32,11 @@ trait TransMatcher { self: transform.ExplicitOuter => def containsBinding(pat: Tree): Boolean = { var generatedVars = false - def handleVariableSymbol(sym: Symbol): Unit = + def handleVariableSymbol(sym: Symbol) { if (sym.name.toString().indexOf("$") == -1) { generatedVars = true // .add(sym) } + } def isVariableName(name: Name): Boolean = (treeInfo.isVariableName(name)) && (name != nme.USCOREkw) @@ -44,7 +44,7 @@ trait TransMatcher { self: transform.ExplicitOuter => def isVariableSymbol(sym: Symbol): Boolean = (sym ne null) && (!sym.isPrimaryConstructor) - def traverse(tree: Tree): Unit = { + def traverse(tree: Tree) { tree match { case x @ Ident(name) => if (x.symbol != definitions.PatternWildcard) @@ -88,7 +88,7 @@ trait TransMatcher { self: transform.ExplicitOuter => * (( tree.args.length == 1 ) && tree.args(0).isInstanceOf[Sequence]) * but fails */ - protected def isSeqApply( tree: Apply ): Boolean = { + protected def isSeqApply(tree: Apply): Boolean = { // Console.print("isSeqApply? "+tree.toString()); // val res = tree match { @@ -277,7 +277,8 @@ trait TransMatcher { self: transform.ExplicitOuter => /** handles all translation of pattern matching */ - def handlePattern(sel: Tree, ocases: List[CaseDef], doCheckExhaustive: Boolean, owner:Symbol, handleOuter:Tree=>Tree): Tree = { + def handlePattern(sel: Tree, ocases: List[CaseDef], doCheckExhaustive: Boolean, + owner: Symbol, handleOuter: Tree => Tree): Tree = { // TEMPORARY //new NewMatcher().toIR(sel, ocases) // -- cgit v1.2.3