File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
src/compiler/scala/tools/nsc Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ abstract class BCodeHelpers extends BCodeTypes with BytecodeWriters {
240240
241241 /*
242242 * Populates the InnerClasses JVM attribute with `refedInnerClasses`.
243- * In additiona to inner classes mentioned somewhere in `jclass` (where `jclass` is a class file being emitted)
243+ * In addition to inner classes mentioned somewhere in `jclass` (where `jclass` is a class file being emitted)
244244 * `refedInnerClasses` should contain those inner classes defined as direct member classes of `jclass`
245245 * but otherwise not mentioned in `jclass`.
246246 *
@@ -1000,6 +1000,9 @@ abstract class BCodeHelpers extends BCodeTypes with BytecodeWriters {
10001000
10011001 trait BCClassGen extends BCInnerClassGen {
10021002
1003+ // Used as threshold above which a tableswitch bytecode instruction is preferred over a lookupswitch.
1004+ // There's a space tradeoff between these multi-branch instructions (details in the JVM spec).
1005+ // The particular value in use for `MIN_SWITCH_DENSITY` reflects a heuristic.
10031006 val MIN_SWITCH_DENSITY = 0.7
10041007
10051008 /*
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ abstract class GenBCode extends BCodeSyncAndTry {
4343 class BCodePhase (prev : Phase ) extends StdPhase (prev) {
4444
4545 override def name = phaseName
46- override def description = " Generate bytecode from ASTs"
46+ override def description = " Generate bytecode from ASTs using the ASM library "
4747 override def erasedTypes = true
4848
4949 private var bytecodeWriter : BytecodeWriter = null
Original file line number Diff line number Diff line change @@ -406,6 +406,8 @@ abstract class CleanUp extends Transform with ast.TreeDSL {
406406 if (entryPoints != null ) &&
407407 genBCode.isJavaEntryPoint(tree.symbol, currentUnit)
408408 =>
409+ // collecting symbols for entry points here (as opposed to GenBCode where they are used)
410+ // has the advantage of saving an additional pass over all ClassDefs.
409411 entryPoints ::= tree.symbol
410412 super .transform(tree)
411413
You can’t perform that action at this time.
0 commit comments