Options.properties revision 1504:252538e8c232
1#
2# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation.  Oracle designates this
8# particular file as subject to the "Classpath" exception as provided
9# by Oracle in the LICENSE file that accompanied this code.
10#
11# This code is distributed in the hope that it will be useful, but WITHOUT
12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14# version 2 for more details (a copy is included in the LICENSE file that
15# accompanied this code).
16#
17# You should have received a copy of the GNU General Public License version
18# 2 along with this work; if not, write to the Free Software Foundation,
19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20#
21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22# or visit www.oracle.com if you need additional information or have any
23# questions.
24#
25option.error.invalid.option="{0}" is not a recognized option. Use "{1}" or "{2}" to see a list of all supported options.
26
27nashorn.options = Usage: jjs [option=value]* [filename.js]+ [-- options...]\n\
28                \n\
29                Valid options are:
30
31#
32# Localized meta descriptions
33#
34nashorn.options.param = param
35nashorn.options.default = default
36
37#
38# Which option is "help".
39#
40nashorn.options.help.key = nashorn.option.help
41
42#
43# Which option is "xhelp".
44#
45nashorn.options.xhelp.key = nashorn.option.xhelp
46
47#
48# Which option is "D".
49#
50nashorn.options.D.key = nashorn.option.D
51
52##
53## Grammar: at least short or long form. Arguments are optional, in that case they are given as
54##
55## params - a description of the parameters for command line usage
56## name - the name of the option, e.g. "--long-name"
57## short_name - the short name of the option, e.g. "-l"
58## type - the type of the option, currently allowed: boolean, integer, string, log, timezone. defaults to boolean if left out
59## is_undocumented - should this option never appear in the online help. defaults to no.
60## desc - description of what the option does
61## default - default value of the option. e.g. debug.lines is true by default. Not set means option not available by default
62## dependency - does this arg imply another arg.
63## confict - does this arg conflict with another arg e.g trace && instrument
64## value_next_arg - is the opton's value passed as next argument in command line?
65##
66## At least short_name or name needs to be in place for an argument descriptor to be valid.
67
68nashorn.option.help = {                       \
69    name="-help",                             \
70    short_name="-h",                          \
71    desc="Print help for command line flags." \
72}
73
74nashorn.option.xhelp = {                               \
75    name="-xhelp",                                     \
76    is_undocumented=true,                              \
77    desc="Print extended help for command line flags." \
78}
79
80nashorn.option.class.cache.size ={                            \
81    name="--class-cache-size",                                \
82    short_name="-ccs",                                        \
83    desc="Size of the Class cache size per global scope.",    \
84    is_undocumented=true,                                     \
85    type=Integer,                                             \
86    default=50                                                \
87}
88
89nashorn.option.classpath ={                                   \
90    name="-classpath",                                        \
91    short_name="-cp",                                         \
92    desc="-cp path. Specify where to find user class files.", \
93    value_next_arg=true,                                      \
94    type=String                                               \
95}
96
97nashorn.option.compile.only = {       \
98    name="--compile-only",            \
99    short_name="-co",                 \
100    is_undocumented=true,             \
101    desc="Compile without running.",  \
102    type=Boolean                      \
103}
104
105nashorn.option.const.as.var = {          \
106    name="--const-as-var",               \
107    is_undocumented=true,                \
108    desc="Replace 'const' with 'var'.",  \
109    type=Boolean                         \
110}
111
112nashorn.option.d = {                                             \
113    name="--dump-debug-dir",                                     \
114    short_name="-d",                                             \
115    is_undocumented=true,                                        \
116    params="<path>",                                             \
117    desc="specify a destination directory to dump source and class files.", \
118    type=String                                                  \
119}
120
121nashorn.option.doe = {                   \
122    name="-dump-on-error",               \
123    short_name="-doe",                   \
124    desc="Dump a stack trace on errors." \
125}
126
127nashorn.option.empty.statements = {          \
128    name="--empty-statements",               \
129    is_undocumented=true,                    \
130    desc="Preserve empty statements in AST." \
131}
132
133nashorn.option.early.lvalue.error = {                                      \
134    name="--early-lvalue-error",                                           \
135    is_undocumented=true,                                                  \
136    desc="invalid lvalue expressions should be reported as early errors.", \
137    type=Boolean,                                                          \
138    default=true                                                           \
139}
140
141nashorn.option.fullversion = {                 \
142    name="-fullversion",                       \
143    short_name="-fv",                          \
144    desc="Print full version info of Nashorn." \
145}
146
147nashorn.option.function.statement.error= {                                    \
148    name="--function-statement-error",                                        \
149    desc="Report an error when function declaration is used as a statement.", \
150    is_undocumented=true,                                                     \
151    default=false                                                             \
152}
153
154nashorn.option.function.statement.warning = {                      \
155    name="--function-statement-warning",                           \
156    desc="Warn when function declaration is used as a statement.", \
157    is_undocumented=true,                                          \
158    default=false                                                  \
159}
160
161nashorn.option.fx = {                           \
162    name="-fx",                                 \
163    desc="Launch script as an fx application.", \
164    default=false                               \
165}
166
167nashorn.option.global.per.engine = {            \
168    name="--global-per-engine",                 \
169    desc="Use single Global instance per script engine instance.", \
170    is_undocumented=true,                                          \
171    type=Boolean,                               \
172    default=false                               \
173}
174
175nashorn.option.log = {                                                       \
176    name="--log",                                                            \
177    is_undocumented=true,                                                    \
178    params="<module:level>,*",                                               \
179    desc="Enable logging of a given level for a given number of sub systems. \
180        [for example: --log=fields:finest,codegen:info].",                   \
181    type=Log                                                                 \
182}
183
184nashorn.option.debug.lines = {                          \
185    name="--debug-lines",                               \
186    is_undocumented=true,                               \
187    desc="Generate line number table in .class files.", \
188    default=true                                        \
189}
190
191nashorn.option.debug.locals = {                           \
192    name="--debug-locals",                                \
193    is_undocumented=true,                                 \
194    desc="Generate local variable table in .class files." \
195}
196
197nashorn.option.lazy.compilation = {                                                                      \
198    name="--lazy-compilation",                                                                           \
199    is_undocumented=true,                                                                                \
200    desc="Use lazy code generation strategies - do not compile the entire script at once.", \
201    default=true                                   \
202}
203
204nashorn.option.optimistic.types = {                                                                      \
205    name="--optimistic-types",                                                                           \
206    short_name="-ot",                                                                                    \
207    desc="Use optimistic type assumptions with deoptimizing recompilation. This makes the compiler try, for any program symbol whose type cannot be proven at compile time, to type it as narrow and primitive as possible. If the runtime encounters an error because symbol type is too narrow, a wider method will be generated until steady stage is reached. While this produces as optimal Java Bytecode as possible, erroneous type guesses will lead to longer warmup. Optimistic typing is currently enabled by default, but can be disabled for faster startup performance.",                     \
208    default=true                                                                                         \
209}
210
211nashorn.option.loader.per.compile = {              \
212    name="--loader-per-compile",                   \
213    is_undocumented=true,                          \
214    desc="Create a new class loader per compile.", \
215    default=true                                   \
216}
217
218nashorn.option.no.java = {                         \
219    name="--no-java",                              \
220    short_name="-nj",                              \
221    is_undocumented=true,                          \
222    desc="Disable Java support.",                  \
223    default=false                                  \
224}
225
226nashorn.option.no.syntax.extensions = {              \
227    name="--no-syntax-extensions",                   \
228    short_name="-nse",                               \
229    is_undocumented=true,                            \
230    desc="Disallow non-standard syntax extensions.", \
231    default=false                                    \
232}
233
234nashorn.option.no.typed.arrays = {                 \
235    name="--no-typed-arrays",                      \
236    short_name="-nta",                             \
237    is_undocumented=true,                          \
238    desc="Disable typed arrays support.",          \
239    default=false                                  \
240}
241
242nashorn.option.parse.only = {       \
243    name="--parse-only",            \
244    is_undocumented=true,           \
245    desc="Parse without compiling." \
246}
247
248nashorn.option.persistent.code.cache = {            \
249    name="--persistent-code-cache",                 \
250    short_name="-pcc",                              \
251    desc="Enable disk cache for compiled scripts.", \
252    is_undocumented=true,                           \
253    default=false                                   \
254}
255
256nashorn.option.profile.callsites = {   \
257    name="--profile-callsites",        \
258    short_name="-pcs",                 \
259    is_undocumented=true,              \
260    desc="Dump callsite profile data." \
261}
262
263nashorn.option.print.ast = {            \
264    name="--print-ast",                 \
265    is_undocumented=true,               \
266    desc="Print abstract syntax tree."  \
267}
268
269nashorn.option.print.lower.ast = {              \
270    name="--print-lower-ast",                   \
271    is_undocumented=true,                       \
272    desc="Print lowered abstract syntax tree."  \
273}
274
275nashorn.option.print.code = { \
276    name="--print-code",      \
277    short_name="-pc",         \
278    is_undocumented=true,     \
279    params="[dir:<output-dir>,function:<name>]", \
280    type=keyvalues,           \
281    desc="Print generated bytecode. If a directory is specified, nothing will be dumped to stderr. Also, in that case, .dot files will be generated for all functions or for the function with the specified name only."  \
282}
283
284nashorn.option.print.mem.usage = {                            \
285    name="--print-mem-usage",                                 \
286    is_undocumented=true,                                     \
287    desc="Print memory usage of IR after each compile stage." \
288}
289
290nashorn.option.print.no.newline = {                     \
291    name="--print-no-newline",                          \
292    is_undocumented=true,                               \
293    desc="Print function will not print new line char." \
294}
295
296nashorn.option.print.parse = {   \
297    name="--print-parse",        \
298    short_name="-pp",            \
299    is_undocumented=true,        \
300    desc="Print the parse tree." \
301}
302
303nashorn.option.print.lower.parse = {            \
304    name="--print-lower-parse",                 \
305    short_name="-plp",                          \
306    is_undocumented=true,                       \
307    desc="Print the parse tree after lowering." \
308}
309
310nashorn.option.print.symbols = {   \
311    name="--print-symbols",        \
312    is_undocumented=true,          \
313    desc="Print the symbol table." \
314}
315
316nashorn.option.D = {                                                          \
317    name="-D",                                                                \
318    desc="-Dname=value. Set a system property. This option can be repeated.", \
319    type=String                                                               \
320}
321
322nashorn.option.strict = {              \
323    name="-strict",                    \
324    desc="Run scripts in strict mode." \
325}
326
327nashorn.option.scripting = {            \
328    name="-scripting",                  \
329    desc="Enable scripting features."   \
330}
331
332nashorn.option.language = {                      \
333    name="--language",                           \
334    type=String,                                 \
335    params=[es5|es6],                            \
336    default=es5,                                 \
337    desc="Specify ECMAScript language version."  \
338}
339
340nashorn.option.stdout = {                                                \
341    name="--stdout",                                                     \
342    is_undocumented=true,                                                \
343    type=String,                                                         \
344    params="<output console>",                                           \
345    desc="Redirect stdout to a filename or to another tty, e.g. stderr." \
346}
347
348nashorn.option.stderr = {                                                \
349    name="--stderr",                                                     \
350    is_undocumented=true,                                                \
351    type=String,                                                         \
352    params="<output console>",                                           \
353    desc="Redirect stderr to a filename or to another tty, e.g. stdout." \
354}
355
356nashorn.option.timezone = {                    \
357    name="-timezone",                          \
358    short_name="-t",                           \
359    params="<timezone>",                       \
360    desc="Set timezone for script execution.", \
361    type=TimeZone                              \
362}
363
364nashorn.option.locale = {                    \
365    name="--locale",                         \
366    short_name="-l",                         \
367    is_undocumented=true,                    \
368    params="<locale>",                       \
369    desc="Set Locale for script execution.", \
370    type=Locale                              \
371}
372
373nashorn.option.trace.callsites = {                                               \
374    name="--trace-callsites",                                                    \
375    short_name="-tcs",                                                           \
376    is_undocumented=true,                                                        \
377    type=keyvalues,                                                              \
378    params="[=[option,]*]",                                                      \
379    desc="Enable callsite trace mode. Options are: miss [trace callsite misses]  \
380    enterexit [trace callsite enter/exit], objects [print object properties]."   \
381}
382
383nashorn.option.anonymous.classes = {                      \
384    name="--anonymous-classes",                           \
385    is_undocumented=true,                                 \
386    params=[auto|true|false],                             \
387    default=auto,                                         \
388    type=string,                                          \
389    desc="Use VM anonymous classes for compiled scripts." \
390}
391
392nashorn.option.unstable.relink.threshold ={                   \
393    name="--unstable-relink-threshold",                       \
394    short_name="-urt",                                        \
395    desc="Number of times a dynamic call site has to be \
396    relinked before it is considered unstable, when the \
397    runtime will try to link it as if it is megamorphic.",    \
398    is_undocumented=true,                                     \
399    type=Integer,                                             \
400    default=-1                                                \
401}
402
403
404nashorn.option.verify.code = {              \
405    name="--verify-code",                   \
406    is_undocumented=true,                   \
407    desc="Verify byte code before running." \
408}
409
410nashorn.option.version = {                \
411    name="-version",                      \
412    short_name="-v",                      \
413    desc="Print version info of Nashorn." \
414}
415
416