aboutsummaryrefslogtreecommitdiff
path: root/src/jdk/nashorn/internal/runtime/resources/Options.properties
blob: 57943e01e2145c37e29b9d1a169079242f8a9858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
#
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.  Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
option.error.invalid.option="{0}" is not a recognized option. Use "{1}" or "{2}" to see a list of all supported options.

nashorn.options = Usage: jjs [option=value]* [filename.js]+ [-- options...]\n\
                \n\
                Valid options are:

#
# Localized meta descriptions
#
nashorn.options.param = param
nashorn.options.default = default

#
# Which option is "help".
#
nashorn.options.help.key = nashorn.option.help

#
# Which option is "xhelp".
#
nashorn.options.xhelp.key = nashorn.option.xhelp

#
# Which option is "D".
#
nashorn.options.D.key = nashorn.option.D

##
## Grammar: at least short or long form. Arguments are optional, in that case they are given as
##
## params - a description of the parameters for command line usage
## name - the name of the option, e.g. "--long-name"
## short_name - the short name of the option, e.g. "-l"
## type - the type of the option, currently allowed: boolean, integer, string, log, timezone. defaults to boolean if left out
## is_undocumented - should this option never appear in the online help. defaults to no.
## desc - description of what the option does
## default - default value of the option. e.g. debug.lines is true by default. Not set means option not available by default
## dependency - does this arg imply another arg.
## confict - does this arg conflict with another arg e.g trace && instrument
## value_next_arg - is the opton's value passed as next argument in command line?
##
## At least short_name or name needs to be in place for an argument descriptor to be valid.

nashorn.option.help = {                       \
    name="-help",                             \
    short_name="-h",                          \
    desc="Print help for command line flags." \
}

nashorn.option.xhelp = {                               \
    name="-xhelp",                                     \
    is_undocumented=true,                              \
    desc="Print extended help for command line flags." \
}

nashorn.option.class.cache.size ={                            \
    name="--class-cache-size",                                \
    short_name="-ccs",                                        \
    desc="Size of the Class cache size per global scope.",    \
    is_undocumented=true,                                     \
    type=Integer,                                             \
    default=50                                                \
}

nashorn.option.classpath ={                                   \
    name="-classpath",                                        \
    short_name="-cp",                                         \
    desc="-cp path. Specify where to find user class files.", \
    value_next_arg=true,                                      \
    type=String                                               \
}

nashorn.option.compile.only = {       \
    name="--compile-only",            \
    short_name="-co",                 \
    is_undocumented=true,             \
    desc="Compile without running.",  \
    type=Boolean                      \
}

nashorn.option.const.as.var = {          \
    name="--const-as-var",               \
    is_undocumented=true,                \
    desc="Replace 'const' with 'var'.",  \
    type=Boolean                         \
}

nashorn.option.d = {                                             \
    name="--dump-debug-dir",                                     \
    short_name="-d",                                             \
    is_undocumented=true,                                        \
    params="<path>",                                             \
    desc="specify a destination directory to dump class files.", \
    type=String                                                  \
}

nashorn.option.doe = {                   \
    name="-dump-on-error",               \
    short_name="-doe",                   \
    desc="Dump a stack trace on errors." \
}

nashorn.option.empty.statements = {          \
    name="--empty-statements",               \
    is_undocumented=true,                    \
    desc="Preserve empty statements in AST." \
}

nashorn.option.early.lvalue.error = {                                      \
    name="--early-lvalue-error",                                           \
    is_undocumented=true,                                                  \
    desc="invalid lvalue expressions should be reported as early errors.", \
    type=Boolean,                                                          \
    default=true                                                           \
}

nashorn.option.fullversion = {                 \
    name="-fullversion",                       \
    short_name="-fv",                          \
    desc="Print full version info of Nashorn." \
}

nashorn.option.function.statement.error= {                                    \
    name="--function-statement-error",                                        \
    desc="Report an error when function declaration is used as a statement.", \
    is_undocumented=true,                                                     \
    default=false                                                             \
}

nashorn.option.function.statement.warning = {                      \
    name="--function-statement-warning",                           \
    desc="Warn when function declaration is used as a statement.", \
    is_undocumented=true,                                          \
    default=false                                                  \
}

nashorn.option.fx = {                           \
    name="-fx",                                 \
    desc="Launch script as an fx application.", \
    default=false                               \
}

nashorn.option.global.per.engine = {            \
    name="--global-per-engine",                 \
    desc="Use single Global instance per script engine instance.", \
    is_undocumented=true,                                          \
    type=Boolean,                               \
    default=false                               \
}

nashorn.option.log = {                                                       \
    name="--log",                                                            \
    is_undocumented=true,                                                    \
    params="<module:level>,*",                                               \
    desc="Enable logging of a given level for a given number of sub systems. \
        [for example: --log=fields:finest,codegen:info].",                   \
    type=Log                                                                 \
}

nashorn.option.debug.lines = {                          \
    name="--debug-lines",                               \
    is_undocumented=true,                               \
    desc="Generate line number table in .class files.", \
    default=true                                        \
}

nashorn.option.debug.locals = {                           \
    name="--debug-locals",                                \
    is_undocumented=true,                                 \
    desc="Generate local variable table in .class files." \
}

nashorn.option.lazy.compilation = {                                                                      \
    name="--lazy-compilation",                                                                           \
    is_undocumented=true,                                                                                \
    desc="Use lazy code generation strategies - do not compile the entire script at once.", \
    default=true                                   \
}

nashorn.option.optimistic.types = {                                                                      \
    name="--optimistic-types",                                                                           \
    short_name="-ot",                                                                                    \
    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 disabled by default, but can be enabled for significantly better peak performance.",                     \
    default=false                                                                                        \
}

nashorn.option.loader.per.compile = {              \
    name="--loader-per-compile",                   \
    is_undocumented=true,                          \
    desc="Create a new class loader per compile.", \
    default=true                                   \
}

nashorn.option.no.java = {                         \
    name="--no-java",                              \
    short_name="-nj",                              \
    is_undocumented=true,                          \
    desc="Disable Java support.",                  \
    default=false                                  \
}

nashorn.option.no.syntax.extensions = {              \
    name="--no-syntax-extensions",                   \
    short_name="-nse",                               \
    is_undocumented=true,                            \
    desc="Disallow non-standard syntax extensions.", \
    default=false                                    \
}

nashorn.option.no.typed.arrays = {                 \
    name="--no-typed-arrays",                      \
    short_name="-nta",                             \
    is_undocumented=true,                          \
    desc="Disable typed arrays support.",          \
    default=false                                  \
}

nashorn.option.parse.only = {       \
    name="--parse-only",            \
    is_undocumented=true,           \
    desc="Parse without compiling." \
}

nashorn.option.persistent.code.cache = {            \
    name="--persistent-code-cache",                 \
    short_name="-pcc",                              \
    desc="Enable disk cache for compiled scripts.", \
    is_undocumented=true,                           \
    default=false                                   \
}

nashorn.option.profile.callsites = {   \
    name="--profile-callsites",        \
    short_name="-pcs",                 \
    is_undocumented=true,              \
    desc="Dump callsite profile data." \
}

nashorn.option.print.ast = {            \
    name="--print-ast",                 \
    is_undocumented=true,               \
    desc="Print abstract syntax tree."  \
}

nashorn.option.print.lower.ast = {              \
    name="--print-lower-ast",                   \
    is_undocumented=true,                       \
    desc="Print lowered abstract syntax tree."  \
}

nashorn.option.print.code = { \
    name="--print-code",      \
    short_name="-pc",         \
    is_undocumented=true,     \
    params="[dir:<output-dir>,function:<name>]", \
    type=keyvalues,           \
    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."  \
}

nashorn.option.print.mem.usage = {                            \
    name="--print-mem-usage",                                 \
    is_undocumented=true,                                     \
    desc="Print memory usage of IR after each compile stage." \
}

nashorn.option.print.no.newline = {                     \
    name="--print-no-newline",                          \
    is_undocumented=true,                               \
    desc="Print function will not print new line char." \
}

nashorn.option.print.parse = {   \
    name="--print-parse",        \
    short_name="-pp",            \
    is_undocumented=true,        \
    desc="Print the parse tree." \
}

nashorn.option.print.lower.parse = {            \
    name="--print-lower-parse",                 \
    short_name="-plp",                          \
    is_undocumented=true,                       \
    desc="Print the parse tree after lowering." \
}

nashorn.option.print.symbols = {   \
    name="--print-symbols",        \
    is_undocumented=true,          \
    desc="Print the symbol table." \
}

nashorn.option.D = {                                                          \
    name="-D",                                                                \
    desc="-Dname=value. Set a system property. This option can be repeated.", \
    type=String                                                               \
}

nashorn.option.strict = {              \
    name="-strict",                    \
    desc="Run scripts in strict mode." \
}

nashorn.option.scripting = {            \
    name="-scripting",                  \
    desc="Enable scripting features."   \
}

nashorn.option.language = {                      \
    name="--language",                           \
    type=String,                                 \
    params=[es5|es6],                            \
    default=es5,                                 \
    desc="Specify ECMAScript language version."  \
}

nashorn.option.stdout = {                                                \
    name="--stdout",                                                     \
    is_undocumented=true,                                                \
    type=String,                                                         \
    params="<output console>",                                           \
    desc="Redirect stdout to a filename or to another tty, e.g. stderr." \
}

nashorn.option.stderr = {                                                \
    name="--stderr",                                                     \
    is_undocumented=true,                                                \
    type=String,                                                         \
    params="<output console>",                                           \
    desc="Redirect stderr to a filename or to another tty, e.g. stdout." \
}

nashorn.option.timezone = {                    \
    name="-timezone",                          \
    short_name="-t",                           \
    params="<timezone>",                       \
    desc="Set timezone for script execution.", \
    type=TimeZone                              \
}

nashorn.option.locale = {                    \
    name="--locale",                         \
    short_name="-l",                         \
    is_undocumented=true,                    \
    params="<locale>",                       \
    desc="Set Locale for script execution.", \
    type=Locale                              \
}

nashorn.option.trace.callsites = {                                               \
    name="--trace-callsites",                                                    \
    short_name="-tcs",                                                           \
    is_undocumented=true,                                                        \
    type=keyvalues,                                                              \
    params="[=[option,]*]",                                                      \
    desc="Enable callsite trace mode. Options are: miss [trace callsite misses]  \
    enterexit [trace callsite enter/exit], objects [print object properties]."   \
}

nashorn.option.verify.code = {              \
    name="--verify-code",                   \
    is_undocumented=true,                   \
    desc="Verify byte code before running." \
}

nashorn.option.version = {                \
    name="-version",                      \
    short_name="-v",                      \
    desc="Print version info of Nashorn." \
}