Skip to content

Commit a6f84ef

Browse files
committed
Update man pages for scala and scalac.
They had fallen quite a bit behind the output of "scalac -X" and "scalac -Xshow-phases".
1 parent 527fd9a commit a6f84ef

File tree

2 files changed

+136
-55
lines changed

2 files changed

+136
-55
lines changed

src/manual/scala/man1/scala.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ object scala extends Command {
3939
CmdOptionBound("howtorun:", Argument("how")),
4040
"How to execute " & Argument("torun") & ", if it is present. " &
4141
"Options for " & Argument("how") & " are " & Mono("guess") &
42-
" (the default), " & Mono("script") & ", and " & Mono("object") &
42+
" (the default), " & Mono("script") & ", " & Mono("jar") & ", and " & Mono("object") &
4343
"."),
4444

4545
Definition(
46-
CmdOption("i"),
46+
CmdOption("i", Argument("file")),
4747
"Requests that a file be pre-loaded. It is only " &
4848
"meaningful for interactive shells."),
4949

5050
Definition(
51-
CmdOption("e"),
51+
CmdOption("e", Argument("string")),
5252
"Requests that its argument be executed as Scala code."),
5353

5454
Definition(

src/manual/scala/man1/scalac.scala

Lines changed: 133 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ object scalac extends Command {
108108
Definition(
109109
CmdOption("extdirs", Argument("dirs")),
110110
"Override location of installed extensions."),
111+
Definition(
112+
CmdOption("feature"),
113+
"Emit warning and location for usages of features that should be imported explicitly."),
111114
Definition(
112115
CmdOptionBound("g:", "{none,source,line,vars,notailcalls}"),
113116
SeqPara(
@@ -127,6 +130,9 @@ object scalac extends Command {
127130
Definition(
128131
CmdOption("javaextdirs", Argument("path")),
129132
"Override Java extdirs classpath."),
133+
Definition(
134+
CmdOptionBound("language:", Argument("feature")),
135+
"Enable one or more language features."),
130136
Definition(
131137
CmdOption("no-specialization"),
132138
"Ignore " & MItalic("@specialize") & " annotations."),
@@ -145,6 +151,12 @@ object scalac extends Command {
145151
Definition(
146152
CmdOption("sourcepath", Argument("path")),
147153
"Specify location(s) of source files."),
154+
Definition(
155+
CmdOptionBound("target:", "{jvm-1.5,jvm-1.6,jvm-1.7}"),
156+
SeqPara(
157+
Mono("\"jvm-1.5\"") & " target JVM 1.5 (deprecated),",
158+
Mono("\"jvm-1.6\"") & " target JVM 1.6 (default),",
159+
Mono("\"jvm-1.7\"") & " target JVM 1.7,")),
148160
Definition(
149161
CmdOption("toolcp", Argument("path")),
150162
"Add to the runner classpath."),
@@ -158,6 +170,12 @@ object scalac extends Command {
158170
Definition(
159171
CmdOption("uniqid"),
160172
"Uniquely tag all identifiers in debugging output."),
173+
Definition(
174+
CmdOption("usejavacp"),
175+
"Utilize the java.class.path in classpath resolution."),
176+
Definition(
177+
CmdOption("usemanifestcp"),
178+
"Utilize the manifest in classpath resolution."),
161179
Definition(
162180
CmdOption("verbose"),
163181
"Output messages about what the compiler is doing"),
@@ -174,12 +192,12 @@ object scalac extends Command {
174192

175193
Section("Advanced Options",
176194
DefinitionList(
177-
Definition(
178-
CmdOption("Xcheck-null"),
179-
"Warn upon selection of nullable reference"),
180195
Definition(
181196
CmdOption("Xcheckinit"),
182197
"Wrap field accessors to throw an exception on uninitialized access."),
198+
Definition(
199+
CmdOption("Xdev"),
200+
"Enable warnings for developers working on the Scala compiler"),
183201
Definition(
184202
CmdOption("Xdisable-assertions"),
185203
"Generate no assertions and assumptions"),
@@ -193,6 +211,9 @@ object scalac extends Command {
193211
Definition(
194212
CmdOption("Xfatal-warnings"),
195213
"Fail the compilation if there are any warnings."),
214+
Definition(
215+
CmdOption("Xfull-lubs"),
216+
"Retain pre 2.10 behavior of less aggressive truncation of least upper bounds."),
196217
Definition(
197218
CmdOption("Xfuture"),
198219
"Turn on future language features."),
@@ -202,45 +223,66 @@ object scalac extends Command {
202223
Definition(
203224
CmdOption("Xlint"),
204225
"Enable recommended additional warnings."),
226+
Definition(
227+
CmdOption("Xlog-free-terms"),
228+
"Print a message when reification creates a free term."),
229+
Definition(
230+
CmdOption("Xlog-free-types"),
231+
"Print a message when reification resorts to generating a free type."),
232+
Definition(
233+
CmdOption("Xlog-implicit-conversions"),
234+
"Print a message whenever an implicit conversion is inserted."),
205235
Definition(
206236
CmdOption("Xlog-implicits"),
207237
"Show more detail on why some implicits are not applicable."),
238+
Definition(
239+
CmdOption("Xlog-reflective-calls"),
240+
"Print a message when a reflective method call is generated."),
241+
Definition(
242+
CmdOptionBound("Xmacro-settings:", Argument("option")),
243+
"Custom settings for macros."),
244+
Definition(
245+
CmdOption("Xmain-class", Argument("path")),
246+
"Class for manifest's Main-Class entry (only useful with -d <jar>)."),
208247
Definition(
209248
CmdOption("Xmax-classfile-name", Argument("n")),
210249
"Maximum filename length for generated classes."),
211250
Definition(
212-
CmdOption("Xmigration"),
213-
"Warn about constructs whose behavior may have changed between 2.7 and 2.8."),
251+
CmdOptionBound("Xmigration:", Argument("version")),
252+
"Warn about constructs whose behavior may have changed since" & Argument("version") & "."),
214253
Definition(
215254
CmdOption("Xno-forwarders"),
216255
"Do not generate static forwarders in mirror classes."),
256+
Definition(
257+
CmdOption("Xno-patmat-analysis"),
258+
"Don't perform exhaustivity/unreachability analysis. Also, ignore " & MItalic("@switch") & " annotation."),
217259
Definition(
218260
CmdOption("Xno-uescape"),
219261
"Disable handling of " & BSlash & "u unicode escapes"),
220262
Definition(
221263
CmdOption("Xnojline"),
222264
"Do not use JLine for editing."),
223265
Definition(
224-
CmdOptionBound("Xplugin:", Argument("file")),
225-
"Load a plugin from a file"),
266+
CmdOptionBound("Xplugin:", Argument("paths")),
267+
"Load a plugin from each classpath."),
226268
Definition(
227269
CmdOptionBound("Xplugin-disable:", Argument("plugin")),
228-
"Disable a plugin"),
270+
"Disable plugins by name."),
229271
Definition(
230272
CmdOption("Xplugin-list"),
231-
"Print a synopsis of loaded plugins"),
273+
"Print a synopsis of loaded plugins."),
232274
Definition(
233275
CmdOptionBound("Xplugin-require:", Argument("plugin")),
234-
"Abort unless the given plugin(s) are available"),
276+
"Abort if a named plugin is not loaded."),
235277
Definition(
236278
CmdOption("Xpluginsdir", Argument("path")),
237-
"Path to search compiler plugins."),
279+
"Path to search for plugin archives."),
238280
Definition(
239281
CmdOptionBound("Xprint:", Argument("phases")),
240282
"Print out program after " & Argument("phases") & " (see below)."),
241283
Definition(
242-
CmdOption("Xprint-icode"),
243-
"Log internal icode to *.icode files."),
284+
CmdOptionBound("Xprint-icode", "[:" & Argument("phases") & "]"),
285+
"Log internal icode to *.icode files after" & Argument("phases") & " (default: icode)."),
244286
Definition(
245287
CmdOption("Xprint-pos"),
246288
"Print tree positions, as offsets."),
@@ -269,9 +311,12 @@ object scalac extends Command {
269311
Definition(
270312
CmdOption("Xsource-reader", Argument("classname")),
271313
"Specify a custom method for reading source files."),
314+
Definition(
315+
CmdOption("Xstrict-inference"),
316+
"Don't infer known-unsound types."),
272317
Definition(
273318
CmdOption("Xverify"),
274-
"Verify generic signatures in generated bytecode."),
319+
"Verify generic signatures in generated bytecode (asm backend only)."),
275320
Definition(
276321
CmdOption("Y"),
277322
"Print a synopsis of private options.")
@@ -281,65 +326,101 @@ object scalac extends Command {
281326
Section("Compilation Phases",
282327
DefinitionList(
283328
Definition(
284-
MItalic("initial"),
285-
"initializing compiler"),
286-
Definition(
287-
MItalic("parse"),
288-
"parse source files"),
329+
MItalic("parser"),
330+
"parse source into ASTs, perform simple desugaring"),
289331
Definition(
290332
MItalic("namer"),
291-
"create symbols"),
333+
"resolve names, attach symbols to named trees"),
334+
Definition(
335+
MItalic("packageobjects"),
336+
"load package objects"),
337+
Definition(
338+
MItalic("typer"),
339+
"the meat and potatoes: type the trees"),
340+
Definition(
341+
MItalic("patmat"),
342+
"translate match expressions"),
343+
Definition(
344+
MItalic("superaccessors"),
345+
"add super accessors in traits and nested classes"),
346+
Definition(
347+
MItalic("extmethods"),
348+
"add extension methods for inline classes"),
349+
Definition(
350+
MItalic("pickler"),
351+
"serialize symbol tables"),
352+
Definition(
353+
MItalic("refchecks"),
354+
"reference/override checking, translate nested objects"),
355+
Definition(
356+
MItalic("selectiveanf"),
357+
"ANF pre-transform for " & MItalic("@cps") & " (CPS plugin)"),
358+
Definition(
359+
MItalic("selectivecps"),
360+
MItalic("@cps") & "-driven transform of selectiveanf assignements (CPS plugin)"),
361+
Definition(
362+
MItalic("uncurry"),
363+
"uncurry, translate function values to anonymous classes"),
292364
Definition(
293-
MItalic("analyze"),
294-
"name and type analysis"),
365+
MItalic("tailcalls"),
366+
"replace tail calls by jumps"),
295367
Definition(
296-
MItalic("refcheck"),
297-
"reference checking"),
368+
MItalic("specialize"),
369+
MItalic("@specialized") & "-driven class and method specialization"),
298370
Definition(
299-
MItalic("uncurry"),
300-
"uncurry function types and applications"),
371+
MItalic("explicitouter"),
372+
"this refs to outer pointers, translate patterns"),
373+
Definition(
374+
MItalic("erasure"),
375+
"erase types, add interfaces for traits"),
376+
Definition(
377+
MItalic("posterasure"),
378+
"clean up erased inline classes"),
379+
Definition(
380+
MItalic("lazyvals"),
381+
"allocate bitmaps, translate lazy vals into lazified defs"),
301382
Definition(
302383
MItalic("lambdalift"),
303-
"lambda lifter"),
384+
"move nested functions to top level"),
304385
Definition(
305-
MItalic("typesasvalues"),
306-
"represent types as values"),
386+
MItalic("constructors"),
387+
"move field definitions into constructors"),
307388
Definition(
308-
MItalic("addaccessors"),
309-
"add accessors for constructor arguments"),
389+
MItalic("flatten"),
390+
"eliminate inner classes"),
310391
Definition(
311-
MItalic("explicitouterclasses"),
312-
"make links from inner classes to enclosing one explicit"),
392+
MItalic("mixin"),
393+
"mixin composition"),
313394
Definition(
314-
MItalic("addconstructors"),
315-
"add explicit constructor for each class"),
395+
MItalic("cleanup"),
396+
"platform-specific cleanups, generate reflective calls"),
316397
Definition(
317-
MItalic("tailcall"),
318-
"add tail-calls"),
398+
MItalic("delambdafy"),
399+
"remove lambdas"),
319400
Definition(
320-
MItalic("wholeprog"),
321-
"perform whole program analysis"),
401+
MItalic("icode"),
402+
"generate portable intermediate code"),
322403
Definition(
323-
MItalic("addinterfaces"),
324-
"add one interface per class"),
404+
MItalic("inliner"),
405+
"optimization: do inlining"),
325406
Definition(
326-
MItalic("expandmixins"),
327-
"expand mixins by code copying"),
407+
MItalic("inlineHandlers"),
408+
"optimization: inline exception handlers"),
328409
Definition(
329-
MItalic("boxing"),
330-
"makes boxing explicit"),
410+
MItalic("closelim"),
411+
"optimization: eliminate uncalled closures"),
331412
Definition(
332-
MItalic("erasure"),
333-
"type eraser"),
413+
MItalic("constopt"),
414+
"optimization: optimize null and other constants"),
334415
Definition(
335-
MItalic("icode"),
336-
"generate icode"),
416+
MItalic("dce"),
417+
"optimization: eliminate dead code"),
337418
Definition(
338-
MItalic("codegen"),
339-
"enable code generation"),
419+
MItalic("jvm"),
420+
"generate JVM bytecode"),
340421
Definition(
341422
MItalic("terminal"),
342-
"compilation terminated"),
423+
"the last phase in the compiler chain"),
343424
Definition(
344425
MItalic("all"),
345426
"matches all phases"))))

0 commit comments

Comments
 (0)