Index: vm/include/jit_runtime_support.h
===================================================================
--- vm/include/jit_runtime_support.h (revision 583684)
+++ vm/include/jit_runtime_support.h (working copy)
@@ -29,7 +29,7 @@
* of those function.
*
* If changes are made to enum VM_RT_SUPPORT below, the list of
- * JIT support functions in vm_stats.cpp must also be changed.
+ * descriptions in tr_helper_info.cpp must also be changed.
*/
#ifdef __cplusplus
@@ -39,6 +39,9 @@
typedef
enum VM_RT_SUPPORT {
+/** Void id marker */
+ VM_RT_UNKNOWN=0,
+
/**
* Object creation routines.
*/
@@ -701,6 +704,14 @@
} VM_RT_SUPPORT;
+/**
+* VM RT helpers have different calling conventions.
+*/
+enum HELPER_CALLING_CONVENTION {
+ CALLING_CONVENTION_DRL = 0,
+ CALLING_CONVENTION_STDCALL,
+ CALLING_CONVENTION_CDECL,
+};
/**
* VM RT helpers can be interrupted differently.
@@ -746,10 +757,18 @@
/**
* Checks if helper is a suspension point
*/
-
VMEXPORT HELPER_INTERRUPTIBILITY_KIND vm_helper_get_interruptibility_kind(VM_RT_SUPPORT f);
+VMEXPORT HELPER_CALLING_CONVENTION vm_helper_get_calling_convention(VM_RT_SUPPORT f);
+VMEXPORT const char* vm_helper_get_name(VM_RT_SUPPORT id);
+/**
+* Returns Id of runtime helper by its string representation.
+* Name comparison is case-insensitive.
+* If the helperName is unknown, then VM_RT_UNKNOWN is returned.
+*/
+VMEXPORT VM_RT_SUPPORT vm_helper_get_by_name(const char* name);
+
#ifdef __cplusplus
}
#endif // __cplusplus
Index: vm/vmcore/include/vm_stats.h
===================================================================
--- vm/vmcore/include/vm_stats.h (revision 583684)
+++ vm/vmcore/include/vm_stats.h (working copy)
@@ -241,7 +241,6 @@
uint64 total_hot_statics_bytes;
uint64 total_hot_vtable_bytes;
- SimpleHashtable rt_function_map;
SimpleHashtable rt_function_requests;
SimpleHashtable rt_function_calls;
Index: vm/vmcore/src/jit/rt_helper_info.cpp
===================================================================
--- vm/vmcore/src/jit/rt_helper_info.cpp (revision 0)
+++ vm/vmcore/src/jit/rt_helper_info.cpp (revision 0)
@@ -0,0 +1,313 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#define LOG_DOMAIN "vm.helpers"
+#include "cxxlog.h"
+#include "jit_runtime_support.h"
+#include