~ubuntu-branches/debian/sid/scala/sid

« back to all changes in this revision

Viewing changes to src/compiler/scala/tools/nsc/backend/Platform.scala

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg, Mehdi Dogguy, Lucas Satabin, Frank S. Thomas, Emmanuel Bourg
  • Date: 2015-06-05 23:52:59 UTC
  • mfrom: (1.2.11)
  • Revision ID: package-import@ubuntu.com-20150605235259-wk00vgk83dh8o19g
Tags: 2.10.5-1
* Team upload.

[ Mehdi Dogguy ]
* New upstream release (Closes: #744278).

[ Lucas Satabin ]
* Update patches
* Update the clean target
* Update paths of elements to install
* Update watch file

[ Frank S. Thomas ]
* Remove myself from Uploaders.

[ Emmanuel Bourg ]
* The package has been adopted by the Java Team (Closes: #754935)
* Patched the build to avoid downloading libraries from the Internet
* Replaced the minified JavaScript files with unobfuscated ones
* No longer build scala-partest.jar until diffutils is packaged or replaced
* debian/watch: Fixed the versions matched (x.y.z instead of x.y.z..z)
* debian/rules:
  - Added the missing get-orig-source target (Closes: #724704)
  - Improved the clean target
* debian/control:
  - Build depend on scala (>= 2.10) and bnd
  - Use canonical URLs for the Vcs-* fields
  - Standards-Version updated to 3.9.6 (no changes)
* Switch to debhelper level 9

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* NSC -- new Scala compiler
2
 
 * Copyright 2005-2011 LAMP/EPFL
 
2
 * Copyright 2005-2013 LAMP/EPFL
3
3
 * @author  Paul Phillips
4
4
 */
5
5
 
7
7
package backend
8
8
 
9
9
import util.ClassPath
 
10
import io.AbstractFile
10
11
 
11
12
/** The platform dependent pieces of Global.
12
13
 */
13
 
trait Platform[T] {
 
14
trait Platform {
14
15
  val global: Global
15
16
  import global._
16
17
 
 
18
  /** The binary classfile representation type */
 
19
  type BinaryRepr
 
20
 
17
21
  /** The compiler classpath. */
18
 
  def classPath: ClassPath[T]
 
22
  def classPath: ClassPath[BinaryRepr]
19
23
 
20
24
  /** The root symbol loader. */
21
25
  def rootLoader: LazyType
22
26
 
 
27
  /** Update classpath with a substitution that maps entries to entries */
 
28
  def updateClassPath(subst: Map[ClassPath[BinaryRepr], ClassPath[BinaryRepr]])
 
29
 
23
30
  /** Any platform-specific phases. */
24
31
  def platformPhases: List[SubComponent]
25
32
 
28
35
 
29
36
  /** The various ways a boxed primitive might materialize at runtime. */
30
37
  def isMaybeBoxed(sym: Symbol): Boolean
 
38
 
 
39
  /** Create a new class loader to load class file `bin` */
 
40
  def newClassLoader(bin: BinaryRepr): loaders.SymbolLoader
 
41
 
 
42
  /**
 
43
   * Tells whether a class should be loaded and entered into the package
 
44
   * scope. On .NET, this method returns `false` for all synthetic classes
 
45
   * (anonymous classes, implementation classes, module classes), their
 
46
   * symtab is encoded in the pickle of another class.
 
47
   */
 
48
  def doLoad(cls: ClassPath[BinaryRepr]#ClassRep): Boolean
 
49
 
 
50
  /**
 
51
   * Tells whether a class with both a binary and a source representation
 
52
   * (found in classpath and in sourcepath) should be re-compiled. Behaves
 
53
   * on the JVM similar to javac, i.e. if the source file is newer than the classfile,
 
54
   * a re-compile is triggered. On .NET by contrast classfiles always take precedence.
 
55
   */
 
56
  def needCompile(bin: BinaryRepr, src: AbstractFile): Boolean
31
57
}
32
58