Mercurial > hg > graal-jvmci-8
changeset 21587:59c3f921e454
fixes for windows build (size_t conversion, missing precompiled.hpp, missing strtof, strtoll in Windows SDK)
author | Christian Wirth <christian.wirth@oracle.com> |
---|---|
date | Fri, 29 May 2015 12:59:12 +0200 |
parents | 9bb04af58490 |
children | 40d794ac4352 |
files | src/share/vm/jvmci/jvmciHashtable.cpp src/share/vm/jvmci/jvmciHashtable.hpp src/share/vm/jvmci/jvmciOptions.hpp src/share/vm/jvmci/jvmciRuntime.cpp |
diffstat | 4 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/jvmci/jvmciHashtable.cpp Fri May 29 11:35:20 2015 +0200 +++ b/src/share/vm/jvmci/jvmciHashtable.cpp Fri May 29 12:59:12 2015 +0200 @@ -21,6 +21,7 @@ * questions. */ +#include "precompiled.hpp" #include "jvmci/jvmciHashtable.hpp" template<class K, class V> bool JVMCIHashtable<K,V>::add(V value, bool replace) { @@ -54,7 +55,7 @@ template<class K, class V> void JVMCIHashtable<K, V>::for_each(ValueClosure<V>* closure) { for (size_t i = 0; i < table_size(); ++i) { - for (JVMCIHashtableEntry<V>* e = bucket(i); e != NULL && !closure->is_aborted(); e = e->next()) { + for (JVMCIHashtableEntry<V>* e = bucket((int)i); e != NULL && !closure->is_aborted(); e = e->next()) { closure->do_value(e->literal_addr()); } } @@ -62,7 +63,7 @@ template<class K, class V> JVMCIHashtable<K,V>::~JVMCIHashtable() { for (size_t i = 0; i < table_size(); ++i) { - JVMCIHashtableEntry<V>* e = bucket(i); + JVMCIHashtableEntry<V>* e = bucket((int)i); while (e != NULL) { JVMCIHashtableEntry<V>* current = e; e = e->next();
--- a/src/share/vm/jvmci/jvmciHashtable.hpp Fri May 29 11:35:20 2015 +0200 +++ b/src/share/vm/jvmci/jvmciHashtable.hpp Fri May 29 12:59:12 2015 +0200 @@ -79,7 +79,7 @@ unsigned int _number_of_entries; public: - JVMCIHashtable(size_t size) : _table_size(size), _number_of_entries(0) { + JVMCIHashtable(size_t size) : _table_size((int)size), _number_of_entries(0) { _buckets = NEW_C_HEAP_ARRAY(JVMCIHashtableEntry<V>*, table_size(), mtCompiler); for (size_t i = 0; i < table_size(); ++i) { _buckets[i] = NULL;
--- a/src/share/vm/jvmci/jvmciOptions.hpp Fri May 29 11:35:20 2015 +0200 +++ b/src/share/vm/jvmci/jvmciOptions.hpp Fri May 29 12:59:12 2015 +0200 @@ -58,7 +58,7 @@ class OptionsTable : public JVMCIHashtable<const char*, OptionDesc> { protected: - unsigned int compute_hash(const char* key) { return compute_string_hash(key, strlen(key)); } + unsigned int compute_hash(const char* key) { return compute_string_hash(key, (int)strlen(key)); } bool key_equals(const char* k1, const char* k2) { return strcmp(k1, k2) == 0; } const char* get_key(OptionDesc value) { return value.name; } ; const char* get_key(OptionDesc* value) { return value->name; } ; @@ -87,7 +87,7 @@ class OptionsValueTable : public JVMCIHashtable<const char*, OptionValue> { OptionsTable* _table; protected: - unsigned int compute_hash(const char* key) { return compute_string_hash(key, strlen(key)); } + unsigned int compute_hash(const char* key) { return compute_string_hash(key, (int)strlen(key)); } bool key_equals(const char* k1, const char* k2) { return strcmp(k1, k2) == 0; } const char* get_key(OptionValue value) { return value.desc.name; } ; const char* get_key(OptionValue* value) { return value->desc.name; } ;
--- a/src/share/vm/jvmci/jvmciRuntime.cpp Fri May 29 11:35:20 2015 +0200 +++ b/src/share/vm/jvmci/jvmciRuntime.cpp Fri May 29 12:59:12 2015 +0200 @@ -39,7 +39,11 @@ #include "utilities/debug.hpp" #include "utilities/defaultStream.hpp" - jobject JVMCIRuntime::_HotSpotJVMCIRuntime_instance = NULL; +#if defined(_MSC_VER) +#define strtoll _strtoi64 +#endif + +jobject JVMCIRuntime::_HotSpotJVMCIRuntime_instance = NULL; bool JVMCIRuntime::_HotSpotJVMCIRuntime_initialized = false; bool JVMCIRuntime::_shutdown_called = false; @@ -854,7 +858,7 @@ break; } case _float: { - optionValue.float_value = ::strtof(value, &check); + optionValue.float_value = (float)::strtod(value, &check); //strtof not available in Windows SDK yet if (*check != '\0' || errno == ERANGE) { jio_fprintf(defaultStream::error_stream(), "Expected float value for VM option '%s'\n", name); return false;