Mercurial > hg > truffle
comparison src/share/vm/runtime/globals.hpp @ 11070:6e3634222155
8017611: Auto corrector for mistyped vm options
Summary: The auto corrector for mistyped vm options fuzzy-matches existing flags based on string similarity (Dice's coefficient).
Reviewed-by: kvn, dsamersoff, hseigel, johnc
author | tamao |
---|---|
date | Fri, 28 Jun 2013 20:18:04 -0700 |
parents | f2110083203d |
children | 8b789ce47503 |
comparison
equal
deleted
inserted
replaced
11069:5ea20b3bd249 | 11070:6e3634222155 |
---|---|
218 static Flag *flags; | 218 static Flag *flags; |
219 | 219 |
220 // number of flags | 220 // number of flags |
221 static size_t numFlags; | 221 static size_t numFlags; |
222 | 222 |
223 static Flag* find_flag(char* name, size_t length, bool allow_locked = false); | 223 static Flag* find_flag(const char* name, size_t length, bool allow_locked = false); |
224 static Flag* fuzzy_match(const char* name, size_t length, bool allow_locked = false); | |
224 | 225 |
225 bool is_bool() const { return strcmp(type, "bool") == 0; } | 226 bool is_bool() const { return strcmp(type, "bool") == 0; } |
226 bool get_bool() const { return *((bool*) addr); } | 227 bool get_bool() const { return *((bool*) addr); } |
227 void set_bool(bool value) { *((bool*) addr) = value; } | 228 void set_bool(bool value) { *((bool*) addr) = value; } |
228 | 229 |