mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
Merge
This commit is contained in:
commit
562ce20154
46 changed files with 1413 additions and 431 deletions
|
@ -625,11 +625,11 @@ void Arguments::describe_range_error(ArgsRange errcode) {
|
|||
}
|
||||
}
|
||||
|
||||
static bool set_bool_flag(char* name, bool value, FlagValueOrigin origin) {
|
||||
static bool set_bool_flag(char* name, bool value, Flag::Flags origin) {
|
||||
return CommandLineFlags::boolAtPut(name, &value, origin);
|
||||
}
|
||||
|
||||
static bool set_fp_numeric_flag(char* name, char* value, FlagValueOrigin origin) {
|
||||
static bool set_fp_numeric_flag(char* name, char* value, Flag::Flags origin) {
|
||||
double v;
|
||||
if (sscanf(value, "%lf", &v) != 1) {
|
||||
return false;
|
||||
|
@ -641,7 +641,7 @@ static bool set_fp_numeric_flag(char* name, char* value, FlagValueOrigin origin)
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool set_numeric_flag(char* name, char* value, FlagValueOrigin origin) {
|
||||
static bool set_numeric_flag(char* name, char* value, Flag::Flags origin) {
|
||||
julong v;
|
||||
intx intx_v;
|
||||
bool is_neg = false;
|
||||
|
@ -674,14 +674,14 @@ static bool set_numeric_flag(char* name, char* value, FlagValueOrigin origin) {
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool set_string_flag(char* name, const char* value, FlagValueOrigin origin) {
|
||||
static bool set_string_flag(char* name, const char* value, Flag::Flags origin) {
|
||||
if (!CommandLineFlags::ccstrAtPut(name, &value, origin)) return false;
|
||||
// Contract: CommandLineFlags always returns a pointer that needs freeing.
|
||||
FREE_C_HEAP_ARRAY(char, value, mtInternal);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool append_to_string_flag(char* name, const char* new_value, FlagValueOrigin origin) {
|
||||
static bool append_to_string_flag(char* name, const char* new_value, Flag::Flags origin) {
|
||||
const char* old_value = "";
|
||||
if (!CommandLineFlags::ccstrAt(name, &old_value)) return false;
|
||||
size_t old_len = old_value != NULL ? strlen(old_value) : 0;
|
||||
|
@ -709,7 +709,7 @@ static bool append_to_string_flag(char* name, const char* new_value, FlagValueOr
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Arguments::parse_argument(const char* arg, FlagValueOrigin origin) {
|
||||
bool Arguments::parse_argument(const char* arg, Flag::Flags origin) {
|
||||
|
||||
// range of acceptable characters spelled out for portability reasons
|
||||
#define NAME_RANGE "[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_]"
|
||||
|
@ -850,7 +850,7 @@ void Arguments::print_jvm_args_on(outputStream* st) {
|
|||
}
|
||||
|
||||
bool Arguments::process_argument(const char* arg,
|
||||
jboolean ignore_unrecognized, FlagValueOrigin origin) {
|
||||
jboolean ignore_unrecognized, Flag::Flags origin) {
|
||||
|
||||
JDK_Version since = JDK_Version();
|
||||
|
||||
|
@ -904,7 +904,7 @@ bool Arguments::process_argument(const char* arg,
|
|||
jio_fprintf(defaultStream::error_stream(),
|
||||
"Did you mean '%s%s%s'?\n",
|
||||
(fuzzy_matched->is_bool()) ? "(+/-)" : "",
|
||||
fuzzy_matched->name,
|
||||
fuzzy_matched->_name,
|
||||
(fuzzy_matched->is_bool()) ? "" : "=<value>");
|
||||
}
|
||||
}
|
||||
|
@ -952,7 +952,7 @@ bool Arguments::process_settings_file(const char* file_name, bool should_exist,
|
|||
// this allows a way to include spaces in string-valued options
|
||||
token[pos] = '\0';
|
||||
logOption(token);
|
||||
result &= process_argument(token, ignore_unrecognized, CONFIG_FILE);
|
||||
result &= process_argument(token, ignore_unrecognized, Flag::CONFIG_FILE);
|
||||
build_jvm_flags(token);
|
||||
pos = 0;
|
||||
in_white_space = true;
|
||||
|
@ -970,7 +970,7 @@ bool Arguments::process_settings_file(const char* file_name, bool should_exist,
|
|||
}
|
||||
if (pos > 0) {
|
||||
token[pos] = '\0';
|
||||
result &= process_argument(token, ignore_unrecognized, CONFIG_FILE);
|
||||
result &= process_argument(token, ignore_unrecognized, Flag::CONFIG_FILE);
|
||||
build_jvm_flags(token);
|
||||
}
|
||||
fclose(stream);
|
||||
|
@ -2438,7 +2438,7 @@ jint Arguments::parse_vm_init_args(const JavaVMInitArgs* args) {
|
|||
}
|
||||
|
||||
// Parse JavaVMInitArgs structure passed in
|
||||
result = parse_each_vm_init_arg(args, &scp, &scp_assembly_required, COMMAND_LINE);
|
||||
result = parse_each_vm_init_arg(args, &scp, &scp_assembly_required, Flag::COMMAND_LINE);
|
||||
if (result != JNI_OK) {
|
||||
return result;
|
||||
}
|
||||
|
@ -2510,7 +2510,7 @@ bool valid_hprof_or_jdwp_agent(char *name, bool is_path) {
|
|||
jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
|
||||
SysClassPath* scp_p,
|
||||
bool* scp_assembly_required_p,
|
||||
FlagValueOrigin origin) {
|
||||
Flag::Flags origin) {
|
||||
// Remaining part of option string
|
||||
const char* tail;
|
||||
|
||||
|
@ -3333,7 +3333,7 @@ jint Arguments::parse_options_environment_variable(const char* name, SysClassPat
|
|||
}
|
||||
}
|
||||
|
||||
return(parse_each_vm_init_arg(&vm_args, scp_p, scp_assembly_required_p, ENVIRON_VAR));
|
||||
return(parse_each_vm_init_arg(&vm_args, scp_p, scp_assembly_required_p, Flag::ENVIRON_VAR));
|
||||
}
|
||||
return JNI_OK;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue