You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by va...@apache.org on 2008/03/14 13:54:19 UTC
svn commit: r637085 - in /harmony/enhanced/drlvm/trunk/vm: include/
include/open/ interpreter/src/ jitrino/src/jet/ jitrino/src/vm/
vmcore/build/ vmcore/include/ vmcore/src/class_support/ vmcore/src/init/
vmcore/src/jit/ vmcore/src/kernel_classes/native/
Author: varlax
Date: Fri Mar 14 05:54:10 2008
New Revision: 637085
URL: http://svn.apache.org/viewvc?rev=637085&view=rev
Log:
Next chunk of interfaces cleanup:
- renamed exported const pool queries to "class_cp_get_*"
- renamed "class_property_is_" => "class_is_"
- dropped few outdated methods
- added vm_class_info.h header for declaring safe (read-only) queries
- added vm_java_support.h header for specific APIs
Added:
harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_info.h (with props)
harmony/enhanced/drlvm/trunk/vm/include/vm_java_support.h (with props)
Modified:
harmony/enhanced/drlvm/trunk/vm/include/jit_import.h
harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h
harmony/enhanced/drlvm/trunk/vm/include/open/types.h
harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_manipulation.h
harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h
harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp
harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_obj.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_stk.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/magics.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h
harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp
harmony/enhanced/drlvm/trunk/vm/vmcore/include/class_member.h
harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class.cpp
harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp
harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/method.cpp
harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMStack.cpp
Modified: harmony/enhanced/drlvm/trunk/vm/include/jit_import.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/jit_import.h?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/jit_import.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/jit_import.h Fri Mar 14 05:54:10 2008
@@ -489,72 +489,6 @@
//@{
/**
- * @return A UTF8 representation of a string declared in a class.
- *
- * The <code>idx</code> parameter is interpreted as a constant pool
- * index for JVM.
- * <code>class_get_const_string</code> is generally only for JIT internal use,
- * e.g. printing a string pool constant in a bytecode disassembler.
- * The resulting const char* should of course not be inserted into
- * the jitted code.
- */
-
-VMEXPORT const char *class_get_const_string(Class_Handle ch, unsigned idx);
-
-
-/**
- * @return The address where the interned version of the string
- * is stored.
- *
- * Calling <code>class_get_const_string_intern_addr</code> has
- * a side-effect of interning the string, so that the JIT can
- * load a reference to the interned string without checking if
- * it is null.
- */
-
-VMEXPORT void *class_get_const_string_intern_addr(Class_Handle ch, unsigned idx);
-
-/**
- * @return The type of a compile-time constant.
- *
- * The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
- */
-
- VMEXPORT VM_Data_Type class_get_const_type(Class_Handle ch, unsigned idx);
-
-/**
- * @return The signature for field or (interface) method in constant pool entry.
- * The <code>cp_index</code> parameter is interpreted as a constant pool index
- * for JVM.
- */
-
-VMEXPORT const char* class_get_cp_entry_signature(Class_Handle src_class,
- unsigned short cp_index);
-
-/**
- * @return The data type for field in constant pool entry.
- *
- * The <code>cp_index</code> parameter is interpreted as a constant pool index
- * for JVM.
- */
-
-VMEXPORT VM_Data_Type class_get_cp_field_type(Class_Handle src_class,
- unsigned short cp_index);
-
-/**
- * @return A pointer to the location where the constant is stored.
- *
- * The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
- * This function shouldn't be called for constant strings. Instead, either:<br>
- * <ul><li>The jitted code should get the string object at runtime by calling
- * <code>VM_RT_LDC_STRING</code>, or
- * <li>Use class_get_const_string_intern_addr().
- *</ul>
- */
-
-VMEXPORT const void *class_get_const_addr(Class_Handle ch, unsigned idx);
-
-/**
* Looks for a method in native libraries of a class loader.
*
* @param[in] method - a searching native-method structure
Modified: harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h Fri Mar 14 05:54:10 2008
@@ -14,32 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-/**
- * @author Intel, Alexei Fedotov
- * @version $Revision: 1.1.2.1.4.3 $
- */
-
-
-
#ifndef _JIT_INTF_H_
#define _JIT_INTF_H_
#include "open/types.h"
+#include "open/vm.h"
+#include "jit_export.h"
+#include "jit_import.h"
#ifdef __cplusplus
extern "C" {
#endif
-typedef const void *Arg_List_Iterator; // Java only
-typedef const void *Arg_List_Iter;
-
-
-#include "open/vm.h"
-#include "jit_export.h"
-#include "jit_import.h"
-
//////////////// begin C interface
//
@@ -104,12 +92,6 @@
resolve_special_method(Compile_Handle h, Class_Handle c, unsigned index);
//
-// Checks that t inherits (either extends or implements) s
-//
-VMEXPORT Boolean
-vm_instanceof_class(Class *s, Class *t);
-
-//
// resolve constant pool reference to a class
// used for
// (1) new
@@ -134,61 +116,22 @@
// Field
//
VMEXPORT Boolean field_is_public(Field_Handle f);
-VMEXPORT unsigned field_get_flags(Field_Handle f);
-VMEXPORT Java_Type field_get_type(Field_Handle f);
VMEXPORT Boolean field_is_injected(Field_Handle f);
-
-
-
-//
-// Method
-//
VMEXPORT Boolean method_is_public(Method_Handle m);
-// ? added. Needed in the callvirt opcode (among other places) to see if a "call" should
-// be generated rather than a callvirt.
-
-
VMEXPORT unsigned method_get_max_locals(Method_Handle m);
-VMEXPORT unsigned method_get_flags(Method_Handle m);
-
-VMEXPORT Boolean method_uses_fastcall(Method_Handle m);
VMEXPORT Boolean method_is_fake(Method_Handle m);
-#ifdef COMPACT_FIELD
-VMEXPORT Boolean class_is_compact_field() ;
-#endif
-
-VMEXPORT unsigned method_number_throws(Method_Handle m);
-VMEXPORT Class_Handle method_get_throws(Method_Handle m, unsigned idx);
-
-
VMEXPORT Method_Side_Effects method_get_side_effects(Method_Handle m);
VMEXPORT void method_set_side_effects(Method_Handle m, Method_Side_Effects mse);
-VMEXPORT Java_Type method_get_return_type(Method_Handle m);
VMEXPORT Class_Handle method_get_return_type_class(Method_Handle m);
-VMEXPORT Arg_List_Iterator initialize_arg_list_iterator(const char *descr);
-VMEXPORT Arg_List_Iterator method_get_argument_list(Method_Handle m);
-VMEXPORT Java_Type curr_arg(Arg_List_Iterator iter);
-VMEXPORT Class_Handle get_curr_arg_class(Arg_List_Iterator iter,
- Method_Handle m);
-VMEXPORT Arg_List_Iterator advance_arg_iterator(Arg_List_Iterator iter);
-
-
-VMEXPORT void method_set_inline_assumption(Compile_Handle h,
- Method_Handle caller,
- Method_Handle callee);
VMEXPORT Boolean method_has_annotation(Method_Handle target, Class_Handle antn_type);
-//
-// Class
-//
-VMEXPORT unsigned class_get_flags(Class_Handle cl);
-//VMEXPORT ClassLoaderHandle class_get_classloader(Class_Handle ch);
+
VMEXPORT unsigned class_number_fields(Class_Handle ch);
VMEXPORT Field_Handle class_get_field(Class_Handle ch, unsigned idx);
VMEXPORT int class_get_super_offset();
@@ -197,27 +140,10 @@
VMEXPORT Method_Handle class_get_method_by_name(Class_Handle ch, const char* name);
VMEXPORT int class_get_depth(Class_Handle cl);
-//#endif
-//::
-VMEXPORT Boolean class_has_non_default_finalizer(Class_Handle cl);
-VMEXPORT unsigned class_number_implements(Class_Handle ch);
-VMEXPORT Class_Handle class_get_implements(Class_Handle ch, unsigned idx);
VMEXPORT const char *class_get_source_file_name(Class_Handle cl);
-// Returns TRUE is the class is an interface.
-// is replaced with class_property_is_interface2.
-VMEXPORT Boolean class_property_is_interface(Class_Handle ch);
-
-VMEXPORT uint32 class_get_num_array_dimensions(Class_Handle cl, unsigned short cpIndex);
-
VMEXPORT ClassLoaderHandle class_get_class_loader(Class_Handle c);
-VMEXPORT void
-class_throw_linking_error_for_jit(Class_Handle ch, unsigned cp_index, unsigned opcode);
-
-void
-class_throw_linking_error(Class_Handle ch, unsigned cp_index, unsigned opcode);
-
VMEXPORT Class_Handle
class_load_class_by_name(const char *name,
Class_Handle c);
@@ -231,9 +157,6 @@
const char *name,
const char *descr);
-/// Returns 'TRUE' if the entry by the given cp_index is resolved.
-VMEXPORT Boolean class_is_cp_entry_resolved(Compile_Handle ch, Class_Handle clazz, unsigned cp_index);
-
// This function is for native library support
// It takes a class name with .s not /s.
VMEXPORT Class_Handle class_find_loaded(ClassLoaderHandle, const char*);
@@ -242,39 +165,7 @@
// It takes a class name with .s not /s.
VMEXPORT Class_Handle class_find_class_from_loader(ClassLoaderHandle, const char*, Boolean init);
-//
-// The following do not cause constant pools to be resolve, if they are not
-// resolved already
-//
-
-VMEXPORT const char *const_pool_get_field_name(Class_Handle cl,
- unsigned index);
-VMEXPORT const char *const_pool_get_field_class_name(Class_Handle cl,
- unsigned index);
-VMEXPORT const char *const_pool_get_field_descriptor(Class_Handle cl,
- unsigned index);
-VMEXPORT const char *const_pool_get_method_name(Class_Handle cl,
- unsigned index);
-VMEXPORT const char *const_pool_get_method_class_name(Class_Handle cl,
- unsigned index);
-VMEXPORT const char *const_pool_get_method_descriptor(Class_Handle cl,
- unsigned index);
-VMEXPORT const char *const_pool_get_class_name(Class_Handle cl,
- unsigned index);
-VMEXPORT const char *const_pool_get_interface_method_name(Class_Handle cl,
- unsigned index);
-VMEXPORT const char *const_pool_get_interface_method_class_name(Class_Handle cl,
- unsigned index);
-VMEXPORT const char *const_pool_get_interface_method_descriptor(Class_Handle cl,
- unsigned index);
-VMEXPORT Compile_Handle jit_get_comp_handle(JIT_Handle j);
-
-// Needed for DLL problems
-VMEXPORT void core_free(void*);
-
-// Deprecated. Please use vector_first_element_offset instead.
-//VMEXPORT int get_array_offset(Java_Type element_type);
/**
* Adds information about inlined method.
@@ -287,10 +178,10 @@
* @param[in] compileInfo - VM specific information.
* @param[in] outer_method - target method to which inlining was made
*/
-VMEXPORT void compiled_method_load(Method_Handle method, uint32 codeSize,
- void* codeAddr, uint32 mapLength,
+DECLARE_OPEN(void, compiled_method_load, (Method_Handle method, U_32 codeSize,
+ void* codeAddr, U_32 mapLength,
AddrLocation* addrLocationMap,
- void* compileInfo, Method_Handle outer_method);
+ void* compileInfo, Method_Handle outer_method));
//////////////// end C interface
Modified: harmony/enhanced/drlvm/trunk/vm/include/open/types.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/types.h?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/types.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/types.h Fri Mar 14 05:54:10 2008
@@ -55,25 +55,6 @@
VM_DATA_TYPE_END = ')' // For the iterator
} VM_Data_Type; //VM_Data_Type
-/**
- * (? 20030317) These defines are deprecated.
- * Use <code>VM_Data_Type</code> in all new code.
- */
-#define Java_Type VM_Data_Type
-#define JAVA_TYPE_BYTE VM_DATA_TYPE_INT8
-#define JAVA_TYPE_CHAR VM_DATA_TYPE_CHAR
-#define JAVA_TYPE_DOUBLE VM_DATA_TYPE_F8
-#define JAVA_TYPE_FLOAT VM_DATA_TYPE_F4
-#define JAVA_TYPE_INT VM_DATA_TYPE_INT32
-#define JAVA_TYPE_LONG VM_DATA_TYPE_INT64
-#define JAVA_TYPE_SHORT VM_DATA_TYPE_INT16
-#define JAVA_TYPE_BOOLEAN VM_DATA_TYPE_BOOLEAN
-#define JAVA_TYPE_CLASS VM_DATA_TYPE_CLASS
-#define JAVA_TYPE_ARRAY VM_DATA_TYPE_ARRAY
-#define JAVA_TYPE_VOID VM_DATA_TYPE_VOID
-#define JAVA_TYPE_STRING VM_DATA_TYPE_STRING
-#define JAVA_TYPE_INVALID VM_DATA_TYPE_INVALID
-#define JAVA_TYPE_END VM_DATA_TYPE_END
/**
* Handles for Various VM Structures.
Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm.h?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm.h Fri Mar 14 05:54:10 2008
@@ -106,9 +106,9 @@
* with the names of some internal macros.
*/
-VMEXPORT Boolean class_property_is_final(Class_Handle ch);
-VMEXPORT Boolean class_property_is_abstract(Class_Handle ch);
-VMEXPORT Boolean class_property_is_interface2(Class_Handle ch);
+VMEXPORT Boolean class_is_final(Class_Handle ch);
+VMEXPORT Boolean class_is_abstract(Class_Handle ch);
+VMEXPORT BOOLEAN class_is_interface(Class_Handle ch);
/**
* @return <code>TRUE</code> if the class is likely to be used as an exception object.
@@ -299,7 +299,7 @@
/**
* @return <code>TRUE</code> if the class has a non-trivial finalizer.
*/
- VMEXPORT Boolean class_is_finalizable(Class_Handle ch);
+ VMEXPORT BOOLEAN class_is_finalizable(Class_Handle ch);
/**
* This exactly what I want.
@@ -548,13 +548,6 @@
////
// begin method-related functions.
////
-
-/**
- * @return <code>TRUE</code> if this a Java method. Every Java JIT must call this
- * function before compiling a method and return <code>JIT_FAILURE</code> if
- * <code>method_is_java</code> returned <code>FALSE</code>.
- */
-VMEXPORT Boolean method_is_java(Method_Handle mh);
/**
* @return The method name.
Added: harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_info.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_info.h?rev=637085&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_info.h (added)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_info.h Fri Mar 14 05:54:10 2008
@@ -0,0 +1,116 @@
+/*
+ * 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.
+ */
+#ifndef _VM_CLASS_INFO_H
+#define _VM_CLASS_INFO_H
+
+#include "open/types.h"
+/**
+ * @file
+ * Part of Class Support interface related to inquiring class data.
+ * These functions do not have any side effect, such as
+ * classloading or resolving of constant pool entries.
+ * So they are safe for using out of execution context,
+ * e.g. for asynchronous compilation.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * @return A UTF8 representation of a string declared in a class.
+ *
+ * The <code>idx</code> parameter is interpreted as a constant pool
+ * index for JVM.
+ * This method is generally only for JIT internal use,
+ * e.g. printing a string pool constant in a bytecode disassembler.
+ * The resulting const char* should of course not be inserted into
+ * the jitted code.
+ */
+DECLARE_OPEN(const char *, class_cp_get_const_string, (Class_Handle ch, U_16 idx));
+
+
+/**
+ * @return The address where the interned version of the string
+ * is stored.
+ *
+ * Calling <code>class_get_const_string_intern_addr</code> has
+ * a side-effect of interning the string, so that the JIT can
+ * load a reference to the interned string without checking if
+ * it is null.
+ * FIXME the above side effect is no longer true.
+ * FIXME rename??
+ */
+DECLARE_OPEN(const void *, class_get_const_string_intern_addr, (Class_Handle ch, U_16 idx));
+
+/**
+ * @return A pointer to the location where the constant is stored.
+ *
+ * The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
+ * This function shouldn't be called for constant strings. Instead, either:<br>
+ * <ul><li>The jitted code should get the string object at runtime by calling
+ * <code>VM_RT_LDC_STRING</code>, or
+ * <li>Use class_get_const_string_intern_addr().
+ *</ul>
+ */
+DECLARE_OPEN(const void *, class_cp_get_const_addr, (Class_Handle ch, U_16 idx));
+
+/**
+ * @return The type of a compile-time constant.
+ *
+ * The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
+ */
+DECLARE_OPEN(VM_Data_Type, class_cp_get_const_type, (Class_Handle ch, U_16 idx));
+
+/**
+* @return The data type for field in constant pool entry.
+*
+* The <code>idx</code> parameter is interpreted as a constant pool index
+* for JVM.
+*/
+DECLARE_OPEN(VM_Data_Type, class_cp_get_field_type, (Class_Handle src_class, U_16 idx));
+
+/**
+* @return The signature for field or (interface) method in constant pool entry.
+* The <code>idx</code> parameter is interpreted as a constant pool index
+* for JVM.
+*/
+DECLARE_OPEN(const char *, class_cp_get_entry_signature, (Class_Handle src_class, U_16 idx));
+
+DECLARE_OPEN(U_32, class_cp_get_num_array_dimensions, (Class_Handle cl, U_16 cpIndex));
+/// Returns 'TRUE' if the entry by the given cp_index is resolved.
+DECLARE_OPEN(BOOLEAN, class_cp_is_entry_resolved, (Class_Handle clazz, U_16 cp_index));
+
+DECLARE_OPEN(const char *, class_cp_get_field_name, (Class_Handle cl, U_16 index));
+DECLARE_OPEN(const char *, class_cp_get_field_class_name, (Class_Handle cl, U_16 index));
+DECLARE_OPEN(const char *, class_cp_get_method_name, (Class_Handle cl, U_16 index));
+DECLARE_OPEN(const char *, class_cp_get_method_class_name, (Class_Handle cl, U_16 index));
+DECLARE_OPEN(const char *, class_cp_get_class_name, (Class_Handle cl, U_16 index));
+DECLARE_OPEN(const char *, class_cp_get_interface_method_name, (Class_Handle cl, U_16 index));
+DECLARE_OPEN(const char *, class_cp_get_interface_method_class_name, (Class_Handle cl, U_16 index));
+
+//FIXME redundant, replace with class_cp_get_entry_signature
+DECLARE_OPEN(const char *, class_cp_get_interface_method_descriptor, (Class_Handle cl, U_16 index));
+DECLARE_OPEN(const char *, class_cp_get_method_descriptor, (Class_Handle cl, U_16 index));
+DECLARE_OPEN(const char *, class_cp_get_field_descriptor, (Class_Handle cl, U_16 index));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _VM_CLASS_INFO_H
Propchange: harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_info.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_manipulation.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_manipulation.h?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_manipulation.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_manipulation.h Fri Mar 14 05:54:10 2008
@@ -124,7 +124,7 @@
* @return <code>TRUE</code> for an abstract class; otherwise, <code>FALSE</code>.
*
* @note An assertion is raised if <i>klass</i> equals to <code>NULL</code>.
- * @note Replaces the class_property_is_abstract function.
+ * @note Replaces the class_is_abstract function.
*/
Boolean
class_is_abstract(Open_Class_Handle klass);
@@ -137,7 +137,7 @@
* @return <code>TRUE</code> for an interface class; otherwise, <code>FALSE</code>.
*
* @note An assertion is raised if <i>klass</i> equals to <code>NULL</code>.
- * @note Replaces functions class_is_interface_ and class_property_is_interface2.
+ * @note Replaces functions class_is_interface_ and class_is_interface2.
*/
Boolean
class_is_interface(Open_Class_Handle klass);
@@ -150,7 +150,7 @@
* @return <code>TRUE</code> for a final class; otherwise, <code>FALSE</code>.
*
* @note An assertion is raised if <i>klass</i> equals to <code>NULL</code>.
- * @note Replaces functions class_is_final_ and class_property_is_final.
+ * @note Replaces functions class_is_final_ and class_is_final.
*/
Boolean
class_is_final(Open_Class_Handle klass);
@@ -432,7 +432,7 @@
* </ol>
*/
const void*
-class_get_const_addr(Open_Class_Handle klass, unsigned short index);
+class_cp_get_const_addr(Open_Class_Handle klass, unsigned short index);
/**
* Returns the type of the compile-time constant.
@@ -443,7 +443,7 @@
* @return The type of a compile-time constant.
*/
VM_Data_Type
-class_get_const_type(Open_Class_Handle klass, unsigned short index);
+class_cp_get_const_type(Open_Class_Handle klass, unsigned short index);
/**
* Returns the address of the interned version of the string.
@@ -483,7 +483,7 @@
* @return The data type for the field in the constant pool entry.
*/
VM_Data_Type
-class_get_cp_field_type(Open_Class_Handle klass, unsigned short cp_index);
+class_cp_get_field_type(Open_Class_Handle klass, unsigned short cp_index);
/**
* Initializes the <i>iterator</i> to iterate over all classes that
@@ -530,7 +530,7 @@
*
* @return The descriptor for the method.
*
- * @note Replaces the const_pool_get_method_descriptor function.
+ * @note Replaces the class_cp_get_method_descriptor function.
*/
const char*
class_get_cp_method_descriptor(Open_Class_Handle klass, unsigned short index);
@@ -543,7 +543,7 @@
*
* @return The descriptor for the field.
*
- * @note Replaces the const_pool_get_field_descriptor function.
+ * @note Replaces the class_cp_get_field_descriptor function.
*/
const char*
class_get_cp_field_descriptor(Open_Class_Handle klass, unsigned short index);
Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h Fri Mar 14 05:54:10 2008
@@ -48,26 +48,23 @@
PROTOTYPE_WITH_NAME(VTable_Handle, class_get_vtable, (Class_Handle cl));
PROTOTYPE_WITH_NAME(Allocation_Handle, class_get_allocation_handle, (Class_Handle ch));
PROTOTYPE_WITH_NAME(unsigned , class_get_boxed_data_size, (Class_Handle ch));
-PROTOTYPE_WITH_NAME(uint32 , class_get_num_array_dimensions, (Class_Handle cl, unsigned short cpIndex));
+
PROTOTYPE_WITH_NAME(Class_Handle, class_get_class_of_primitive_type, (VM_Data_Type typ));
-PROTOTYPE_WITH_NAME(void* , class_get_const_string_intern_addr, (Class_Handle cl, unsigned index));
-PROTOTYPE_WITH_NAME(VM_Data_Type, class_get_const_type, (Class_Handle cl, unsigned index));
-PROTOTYPE_WITH_NAME(const void* , class_get_const_addr, (Class_Handle cl, unsigned index));
PROTOTYPE_WITH_NAME(Method_Handle, class_get_method_by_name, (Class_Handle ch, const char* name));
PROTOTYPE_WITH_NAME(Field_Handle, class_get_field_by_name, (Class_Handle ch, const char* name));
PROTOTYPE_WITH_NAME(ClassLoaderHandle, class_get_class_loader, (Class_Handle ch));
PROTOTYPE_WITH_NAME(Boolean , class_is_array, (Class_Handle cl));
PROTOTYPE_WITH_NAME(Boolean , class_is_enum, (Class_Handle ch));
-PROTOTYPE_WITH_NAME(Boolean , class_is_final, (Class_Handle cl)); //class_property_is_final
+PROTOTYPE_WITH_NAME(Boolean , class_is_final, (Class_Handle cl)); //class_is_final
PROTOTYPE_WITH_NAME(Boolean , class_is_throwable, (Class_Handle ch)); //class_hint_is_exceptiontype
-PROTOTYPE_WITH_NAME(Boolean , class_is_interface, (Class_Handle cl)); //class_property_is_interface2
-PROTOTYPE_WITH_NAME(Boolean , class_is_abstract, (Class_Handle cl)); //class_property_is_abstract
+PROTOTYPE_WITH_NAME(BOOLEAN , class_is_interface, (Class_Handle cl)); //class_is_interface2
+PROTOTYPE_WITH_NAME(Boolean , class_is_abstract, (Class_Handle cl)); //class_is_abstract
PROTOTYPE_WITH_NAME(Boolean , class_is_initialized, (Class_Handle ch)); //class_needs_initialization && class_is_initialized()
-PROTOTYPE_WITH_NAME(Boolean , class_is_finalizable, (Class_Handle ch));
+PROTOTYPE_WITH_NAME(BOOLEAN , class_is_finalizable, (Class_Handle ch));
PROTOTYPE_WITH_NAME(Boolean , class_is_instanceof, (Class_Handle s, Class_Handle t));
PROTOTYPE_WITH_NAME(Boolean , class_is_support_fast_instanceof, (Class_Handle cl));// class_get_fast_instanceof_flag
-PROTOTYPE_WITH_NAME(bool , class_is_primitive, (Class_Handle vmTypeHandle));
+PROTOTYPE_WITH_NAME(Boolean , class_is_primitive, (Class_Handle vmTypeHandle));
PROTOTYPE_WITH_NAME(Class_Handle, class_lookup_class_by_name_using_bootstrap_class_loader, (const char *name));
PROTOTYPE_WITH_NAME(Method_Handle, class_lookup_method_recursively,
@@ -75,14 +72,6 @@
const char *name,
const char *descr));
-// Const Pool
-PROTOTYPE_WITH_NAME(VM_Data_Type, class_cp_get_field_type, (Class_Handle src_class, unsigned short cp_index));// VM_Data_Type class_get_cp_field_type(Class_Handle src_class, unsigned short cp_index);
-PROTOTYPE_WITH_NAME(const char* , class_cp_get_entry_signature, (Class_Handle src_class, unsigned short cp_index));//const char* class_get_cp_entry_signature(Class_Handle src_class, unsigned short index); ? const char* const_pool_get_field_descriptor(Class_Handle cl, unsigned index);
-PROTOTYPE_WITH_NAME(bool , class_cp_is_entry_resolved, (Compile_Handle ch, Class_Handle clazz, unsigned short cp_index));//bool class_is_cp_entry_resolved(Compile_Handle ch, Class_Handle clazz, unsigned cp_index);
-PROTOTYPE_WITH_NAME(const char* , class_cp_get_class_name, (Class_Handle cl, unsigned short cp_index));//const char* const_pool_get_class_name(Class_Handle cl, unsigned index);
-PROTOTYPE_WITH_NAME(const char* , class_cp_get_method_class_name,(Class_Handle cl, unsigned index));//const char *const_pool_get_method_class_name(Class_Handle cl, unsigned index);
-PROTOTYPE_WITH_NAME(const char* , class_cp_get_method_name, (Class_Handle cl, unsigned index));//const char* const_pool_get_method_name(Class_Handle cl, unsigned index);
-
//Field
@@ -92,10 +81,10 @@
PROTOTYPE_WITH_NAME(const char* , field_get_name, (Field_Handle fh));
PROTOTYPE_WITH_NAME(unsigned , field_get_offset, (Field_Handle fh));
PROTOTYPE_WITH_NAME(Type_Info_Handle, field_get_type_info, (Field_Handle fh)); //field_get_type_info_of_field_value
-PROTOTYPE_WITH_NAME(bool , field_is_final, (Field_Handle fh));
-PROTOTYPE_WITH_NAME(bool , field_is_magic, (Field_Handle fh)); //Boolean field_is_magic(Field_Handle fh);
-PROTOTYPE_WITH_NAME(bool , field_is_private, (Field_Handle fh));
-PROTOTYPE_WITH_NAME(bool , field_is_static, (Field_Handle fh));
+PROTOTYPE_WITH_NAME(Boolean , field_is_final, (Field_Handle fh));
+PROTOTYPE_WITH_NAME(Boolean , field_is_magic, (Field_Handle fh)); //Boolean field_is_magic(Field_Handle fh);
+PROTOTYPE_WITH_NAME(Boolean , field_is_private, (Field_Handle fh));
+PROTOTYPE_WITH_NAME(Boolean , field_is_static, (Field_Handle fh));
PROTOTYPE_WITH_NAME(Boolean , field_is_volatile, (Field_Handle fh));
//Method
@@ -133,16 +122,16 @@
int id));
PROTOTYPE_WITH_NAME(Method_Side_Effects, method_get_side_effects, (Method_Handle mh));
-PROTOTYPE_WITH_NAME(bool , method_has_annotation, (Method_Handle mh, Class_Handle antn_type));
-PROTOTYPE_WITH_NAME(bool , method_is_private, (Method_Handle mh));
-PROTOTYPE_WITH_NAME(bool , method_is_static, (Method_Handle mh));
-PROTOTYPE_WITH_NAME(bool , method_is_native, (Method_Handle mh));
-PROTOTYPE_WITH_NAME(bool , method_is_synchronized, (Method_Handle mh));
-PROTOTYPE_WITH_NAME(bool , method_is_final, (Method_Handle mh));
-PROTOTYPE_WITH_NAME(bool , method_is_abstract, (Method_Handle mh));
-PROTOTYPE_WITH_NAME(bool , method_is_strict, (Method_Handle mh));
-PROTOTYPE_WITH_NAME(bool , method_is_overridden, (Method_Handle mh));
-PROTOTYPE_WITH_NAME(bool , method_is_no_inlining, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(Boolean , method_has_annotation, (Method_Handle mh, Class_Handle antn_type));
+PROTOTYPE_WITH_NAME(Boolean , method_is_private, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(Boolean , method_is_static, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(Boolean , method_is_native, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(Boolean , method_is_synchronized, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(Boolean , method_is_final, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(Boolean , method_is_abstract, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(Boolean , method_is_strict, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(Boolean , method_is_overridden, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(Boolean , method_is_no_inlining, (Method_Handle mh));
PROTOTYPE_WITH_NAME(void , method_set_side_effects, (Method_Handle mh, Method_Side_Effects mse));
@@ -158,7 +147,7 @@
void *end_ip,
void *handler_ip,
Class_Handle catch_cl,
- bool exc_obj_is_dead));
+ Boolean exc_obj_is_dead));
PROTOTYPE_WITH_NAME(void , method_lock, (Method_Handle m));
Added: harmony/enhanced/drlvm/trunk/vm/include/vm_java_support.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/vm_java_support.h?rev=637085&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/vm_java_support.h (added)
+++ harmony/enhanced/drlvm/trunk/vm/include/vm_java_support.h Fri Mar 14 05:54:10 2008
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+#ifndef _JAVA_SUPPORT_INTF_H_
+#define _JAVA_SUPPORT_INTF_H_
+
+
+#include "open/types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+* (? 20030317) These defines are deprecated.
+* Use <code>VM_Data_Type</code> in all new code.
+*/
+#define Java_Type VM_Data_Type
+#define JAVA_TYPE_BYTE VM_DATA_TYPE_INT8
+#define JAVA_TYPE_CHAR VM_DATA_TYPE_CHAR
+#define JAVA_TYPE_DOUBLE VM_DATA_TYPE_F8
+#define JAVA_TYPE_FLOAT VM_DATA_TYPE_F4
+#define JAVA_TYPE_INT VM_DATA_TYPE_INT32
+#define JAVA_TYPE_LONG VM_DATA_TYPE_INT64
+#define JAVA_TYPE_SHORT VM_DATA_TYPE_INT16
+#define JAVA_TYPE_BOOLEAN VM_DATA_TYPE_BOOLEAN
+#define JAVA_TYPE_CLASS VM_DATA_TYPE_CLASS
+#define JAVA_TYPE_ARRAY VM_DATA_TYPE_ARRAY
+#define JAVA_TYPE_VOID VM_DATA_TYPE_VOID
+#define JAVA_TYPE_STRING VM_DATA_TYPE_STRING
+#define JAVA_TYPE_INVALID VM_DATA_TYPE_INVALID
+#define JAVA_TYPE_END VM_DATA_TYPE_END
+
+
+VMEXPORT Java_Type field_get_type(Field_Handle f);
+VMEXPORT Java_Type method_get_return_type(Method_Handle m);
+
+
+typedef const void *Arg_List_Iterator; // Java only
+VMEXPORT Arg_List_Iterator method_get_argument_list(Method_Handle m);
+VMEXPORT Java_Type curr_arg(Arg_List_Iterator iter);
+VMEXPORT Class_Handle get_curr_arg_class(Arg_List_Iterator iter,
+ Method_Handle m);
+VMEXPORT Arg_List_Iterator advance_arg_iterator(Arg_List_Iterator iter);
+
+VMEXPORT unsigned class_number_implements(Class_Handle ch);
+VMEXPORT Class_Handle class_get_implements(Class_Handle ch, unsigned idx);
+VMEXPORT unsigned method_number_throws(Method_Handle m);
+VMEXPORT Class_Handle method_get_throws(Method_Handle m, unsigned idx);
+
+/**
+* @return <code>TRUE</code> if this a Java method. Every Java JIT must call this
+* function before compiling a method and return <code>JIT_FAILURE</code> if
+* <code>method_is_java</code> returned <code>FALSE</code>.
+*/
+VMEXPORT Boolean method_is_java(Method_Handle mh);
+VMEXPORT unsigned field_get_flags(Field_Handle f);
+VMEXPORT unsigned method_get_flags(Method_Handle m);
+VMEXPORT unsigned class_get_flags(Class_Handle cl);
+
+void
+class_throw_linking_error(Class_Handle ch, unsigned cp_index, unsigned opcode);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_JAVA_SUPPORT_INTF_H_
Propchange: harmony/enhanced/drlvm/trunk/vm/include/vm_java_support.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_native_ia32.cpp Fri Mar 14 05:54:10 2008
@@ -27,7 +27,7 @@
#include "interp_native.h"
#include "interp_defs.h"
#include "ini.h"
-#include "open/jthread.h"
+//#include "open/jthread.h"
using namespace std;
Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp Fri Mar 14 05:54:10 2008
@@ -17,7 +17,7 @@
#include "interpreter.h"
#include "interpreter_exports.h"
#include "interpreter_imports.h"
-
+#include "open/vm_class_info.h"
#include <math.h>
#include "exceptions.h"
@@ -977,7 +977,7 @@
DEBUG_BYTECODE("#" << dec << (int)index << " Float: " << cp.get_float(index));
break;
case CONSTANT_Class:
- DEBUG_BYTECODE("#" << dec << (int)index << " Class: \"" << const_pool_get_class_name(clazz, index) << "\"");
+ DEBUG_BYTECODE("#" << dec << (int)index << " Class: \"" << class_cp_get_class_name(clazz, index) << "\"");
break;
default:
DEBUG_BYTECODE("#" << dec << (int)index << " Unknown type = " << cp.get_tag(index));
@@ -3117,7 +3117,7 @@
frame.locals(pos++).ref = ref;
}
- Arg_List_Iterator iter = method->get_argument_list();
+ Arg_List_Iterator iter = method_get_argument_list(method);
Java_Type typ;
DEBUG("\targs types = ");
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp Fri Mar 14 05:54:10 2008
@@ -22,6 +22,7 @@
#include "trace.h"
#include "stats.h"
+#include "open/vm_class_info.h"
#include "jit_import.h"
#include "jit_intf.h"
@@ -391,7 +392,7 @@
Method_Handle meth = NULL;
unsigned short cpIndex = (unsigned short)jinst.op0;
bool lazy = m_lazy_resolution;
- bool resolve = !lazy || class_is_cp_entry_resolved(m_compileHandle, m_klass, cpIndex);
+ bool resolve = !lazy || class_cp_is_entry_resolved(m_klass, cpIndex);
if (!resolve) {
assert(lazy);
gen_invoke(opkod, NULL, cpIndex, args, retType);
@@ -421,11 +422,10 @@
// which tries to resolve
// 'org/eclipse/core/resources/IProject::equals (Ljava/lang/Object;)Z'
meth = resolve_interface_method(m_compileHandle, m_klass, jinst.op0);
- //assert(class_property_is_interface2(method_get_class(meth)));
//
//*** workaround here:
if (meth != NULL &&
- !class_property_is_interface2(method_get_class(meth))) {
+ !class_is_interface(method_get_class(meth))) {
opkod = OPCODE_INVOKEVIRTUAL;
}
}
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp Fri Mar 14 05:54:10 2008
@@ -26,6 +26,7 @@
#include "cg.h"
#include <open/vm.h>
+#include <open/vm_class_info.h>
#include <jit_intf.h>
#include "trace.h"
@@ -204,7 +205,7 @@
bool needJVMTI = compilation_params.exe_notify_field_modification
|| compilation_params.exe_notify_field_access;
bool lazy = m_lazy_resolution && !needJVMTI; // JVMTI field access helpers are not ready for lazy resolution mode
- bool resolve = !lazy || class_is_cp_entry_resolved(m_compileHandle, enclClass, cpIndex);
+ bool resolve = !lazy || class_cp_is_entry_resolved(enclClass, cpIndex);
if (resolve) {
if (!fieldOp.isStatic()) {
fieldOp.fld = resolve_nonstatic_field(m_compileHandle, enclClass, cpIndex, fieldOp.isPut());
@@ -265,9 +266,9 @@
void CodeGen::do_field_op(const FieldOpInfo& fieldOp)
{
- jtype jt = to_jtype(class_get_cp_field_type(fieldOp.enclClass, fieldOp.cpIndex));
+ jtype jt = to_jtype(class_cp_get_field_type(fieldOp.enclClass, fieldOp.cpIndex));
- const char* fieldDescName = const_pool_get_field_descriptor(fieldOp.enclClass, fieldOp.cpIndex);
+ const char* fieldDescName = class_cp_get_field_descriptor(fieldOp.enclClass, fieldOp.cpIndex);
bool fieldIsMagic = VMMagicUtils::isVMMagicClass(fieldDescName);
if (fieldIsMagic) {
jt = iplatf;
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_obj.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_obj.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_obj.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_obj.cpp Fri Mar 14 05:54:10 2008
@@ -28,6 +28,7 @@
#include <assert.h>
#include <stdlib.h>
+#include "open/vm_class_info.h"
#include "jit_import.h"
#include "jit_intf.h"
@@ -42,7 +43,7 @@
void CodeGen::gen_new_array(Class_Handle enclClass, unsigned cpIndex)
{
bool lazy = m_lazy_resolution;
- bool resolve = !lazy || class_is_cp_entry_resolved(m_compileHandle, enclClass, cpIndex);
+ bool resolve = !lazy || class_cp_is_entry_resolved(enclClass, cpIndex);
if (resolve) {
Allocation_Handle ah = 0;
Class_Handle klass = resolve_class(m_compileHandle, enclClass, cpIndex);
@@ -116,7 +117,7 @@
Val klassVal;
bool lazy = m_lazy_resolution;
- bool resolve = !lazy || class_is_cp_entry_resolved(m_compileHandle, enclClass, cpIndex);
+ bool resolve = !lazy || class_cp_is_entry_resolved(enclClass, cpIndex);
if(!resolve) {
assert(lazy);
static CallSig ci_get_class_withresolve(CCONV_HELPERS, iplatf, i32);
@@ -158,7 +159,7 @@
void CodeGen::gen_new(Class_Handle enclClass, unsigned short cpIndex)
{
bool lazy = m_lazy_resolution;
- bool resolve = !lazy || class_is_cp_entry_resolved(m_compileHandle, enclClass, cpIndex);
+ bool resolve = !lazy || class_cp_is_entry_resolved(enclClass, cpIndex);
if (resolve) {
Class_Handle klass = resolve_class_new(m_compileHandle, enclClass, cpIndex);
if (klass == NULL) {
@@ -187,7 +188,7 @@
{
assert (opcode == OPCODE_INSTANCEOF || opcode == OPCODE_CHECKCAST);
bool lazy = m_lazy_resolution;
- bool resolve = !lazy || class_is_cp_entry_resolved(m_compileHandle, enclClass, cpIdx);
+ bool resolve = !lazy || class_cp_is_entry_resolved(enclClass, cpIdx);
if (resolve) {
Class_Handle klass = resolve_class(m_compileHandle, enclClass, cpIdx);
if (klass == NULL) {
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_stk.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_stk.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_stk.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_stk.cpp Fri Mar 14 05:54:10 2008
@@ -28,6 +28,7 @@
#include <assert.h>
#include <stdlib.h>
+#include <open/vm_class_info.h>
#include <jit_import.h>
/**
@@ -40,10 +41,10 @@
void CodeGen::gen_ldc(void)
{
- jtype jtyp = to_jtype(class_get_const_type(
+ jtype jtyp = to_jtype(class_cp_get_const_type(
m_klass, (unsigned short)m_curr_inst->op0));
if (jtyp != jobj) { // if not loading String
- const void * p = class_get_const_addr(m_klass, m_curr_inst->op0);
+ const void * p = class_cp_get_const_addr(m_klass, m_curr_inst->op0);
assert(p);
if (jtyp == dbl64 || jtyp == flt32) {
gen_push(jtyp, p);
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp Fri Mar 14 05:54:10 2008
@@ -29,6 +29,7 @@
#include <stdlib.h>
#endif
+#include "open/vm_class_info.h"
#include "open/vm.h"
#include "open/hythread_ext.h"
#include "open/vm_type_access.h"
@@ -1272,7 +1273,7 @@
void Compiler::get_args_info(bool is_static, unsigned cp_idx,
::std::vector<jtype>& args, jtype * retType)
{
- const char * cpentry = class_get_cp_entry_signature(m_klass,
+ const char * cpentry = class_cp_get_entry_signature(m_klass,
(short)cp_idx);
// expecting an empty vector
assert(args.size() == 0);
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/magics.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/magics.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/magics.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/magics.cpp Fri Mar 14 05:54:10 2008
@@ -27,6 +27,7 @@
#include "enc_defs.h"
#include "enc.h"
+#include "open/vm_class_info.h"
#include "open/vm.h"
#include "jit_intf.h"
#include "VMMagic.h"
@@ -94,14 +95,14 @@
return false;
}
- const char* kname = const_pool_get_method_class_name(m_klass, (unsigned short)jinst.op0);
+ const char* kname = class_cp_get_method_class_name(m_klass, (unsigned short)jinst.op0);
if (!VMMagicUtils::isVMMagicClass(kname)) {
return false;
}
// This is a magic -> transform it
- const char* mname = const_pool_get_method_name(m_klass, (unsigned short)jinst.op0);
+ const char* mname = class_cp_get_method_name(m_klass, (unsigned short)jinst.op0);
jtype magicType = iplatf;
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.cpp Fri Mar 14 05:54:10 2008
@@ -27,6 +27,7 @@
#include "compiler.h"
#include "../shared/mkernel.h"
+#include "open/vm_class_info.h"
#include "jit_intf.h"
#ifdef _WIN32
@@ -511,28 +512,28 @@
case OPCODE_INVOKESPECIAL:
case OPCODE_INVOKESTATIC:
case OPCODE_INVOKEVIRTUAL:
- lpClass = const_pool_get_method_class_name(m_klass, jinst.op0);
- lpItem = const_pool_get_method_name(m_klass, jinst.op0);
- lpDesc = const_pool_get_method_descriptor(m_klass, jinst.op0);
+ lpClass = class_cp_get_method_class_name(m_klass, jinst.op0);
+ lpItem = class_cp_get_method_name(m_klass, jinst.op0);
+ lpDesc = class_cp_get_method_descriptor(m_klass, jinst.op0);
break;
case OPCODE_INVOKEINTERFACE:
lpClass =
- const_pool_get_interface_method_class_name(m_klass, jinst.op0);
- lpItem = const_pool_get_interface_method_name(m_klass, jinst.op0);
- lpDesc = const_pool_get_interface_method_descriptor(m_klass, jinst.op0);
+ class_cp_get_interface_method_class_name(m_klass, jinst.op0);
+ lpItem = class_cp_get_interface_method_name(m_klass, jinst.op0);
+ lpDesc = class_cp_get_interface_method_descriptor(m_klass, jinst.op0);
break;
case OPCODE_GETFIELD:
case OPCODE_PUTFIELD:
case OPCODE_GETSTATIC:
case OPCODE_PUTSTATIC:
- lpClass = const_pool_get_field_class_name(m_klass, jinst.op0);
- lpItem = const_pool_get_field_name(m_klass, jinst.op0);
- lpDesc = const_pool_get_field_descriptor(m_klass, jinst.op0);
+ lpClass = class_cp_get_field_class_name(m_klass, jinst.op0);
+ lpItem = class_cp_get_field_name(m_klass, jinst.op0);
+ lpDesc = class_cp_get_field_descriptor(m_klass, jinst.op0);
break;
case OPCODE_NEW:
case OPCODE_INSTANCEOF:
case OPCODE_CHECKCAST:
- lpClass = const_pool_get_class_name(m_klass, jinst.op0);
+ lpClass = class_cp_get_class_name(m_klass, jinst.op0);
break;
default: break;
}
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp Fri Mar 14 05:54:10 2008
@@ -24,6 +24,7 @@
#define DYNAMIC_OPEN
#include "VMInterface.h"
+#include "open/vm_class_info.h"
#include "open/vm_interface.h"
#include "open/vm_type_access.h"
#include "jit_import_rt.h"
@@ -56,21 +57,21 @@
static class_get_vtable_t class_get_vtable = 0;
static class_get_allocation_handle_t class_get_allocation_handle = 0;
static class_get_boxed_data_size_t class_get_boxed_data_size = 0;
-static class_get_num_array_dimensions_t class_get_num_array_dimensions = 0;
+static class_cp_get_num_array_dimensions_t class_cp_get_num_array_dimensions = 0;
static class_get_class_of_primitive_type_t class_get_class_of_primitive_type = 0;
static class_get_const_string_intern_addr_t class_get_const_string_intern_addr = 0;
-static class_get_const_type_t class_get_const_type = 0;
-static class_get_const_addr_t class_get_const_addr = 0;
+static class_cp_get_const_type_t class_cp_get_const_type = 0;
+static class_cp_get_const_addr_t class_cp_get_const_addr = 0;
static class_get_method_by_name_t class_get_method_by_name = 0;
static class_get_field_by_name_t class_get_field_by_name = 0;
static class_get_class_loader_t class_get_class_loader = 0;
static class_is_array_t class_is_array = 0;
static class_is_enum_t class_is_enum = 0;
-static class_is_final_t class_is_final = 0; //class_property_is_final
+static class_is_final_t class_is_final = 0; //class_is_final
static class_is_throwable_t class_is_throwable = 0; //class_hint_is_exceptiontype
-static class_is_interface_t class_is_interface = 0; //class_property_is_interface2
-static class_is_abstract_t class_is_abstract = 0; //class_property_is_abstract
+static class_is_interface_t class_is_interface = 0; //class_is_interface2
+static class_is_abstract_t class_is_abstract = 0; //class_is_abstract
static class_is_initialized_t class_is_initialized = 0; //class_needs_initialization && class_is_initialized()
static class_is_finalizable_t class_is_finalizable = 0;
static class_is_instanceof_t class_is_instanceof = 0;
@@ -81,12 +82,12 @@
static class_lookup_method_recursively_t class_lookup_method_recursively = 0;
// Const Pool
-static class_cp_get_field_type_t class_cp_get_field_type = 0;// VM_Data_Type class_get_cp_field_type(Class_Handle src_class, unsigned short cp_index);
-static class_cp_get_entry_signature_t class_cp_get_entry_signature = 0;//const char* class_get_cp_entry_signature(Class_Handle src_class, unsigned short index); ? const char* const_pool_get_field_descriptor(Class_Handle cl, unsigned index);
-static class_cp_is_entry_resolved_t class_cp_is_entry_resolved = 0;//bool class_is_cp_entry_resolved(Compile_Handle ch, Class_Handle clazz, unsigned cp_index);
-static class_cp_get_class_name_t class_cp_get_class_name =0;//const char* const_pool_get_class_name(Class_Handle cl, unsigned index);
-static class_cp_get_method_class_name_t class_cp_get_method_class_name = 0;//const char *const_pool_get_method_class_name(Class_Handle cl, unsigned index);
-static class_cp_get_method_name_t class_cp_get_method_name = 0;//const char* const_pool_get_method_name(Class_Handle cl, unsigned index);
+static class_cp_get_field_type_t class_cp_get_field_type = 0;// VM_Data_Type class_cp_get_field_type(Class_Handle src_class, unsigned short cp_index);
+static class_cp_get_entry_signature_t class_cp_get_entry_signature = 0;//const char* class_cp_get_entry_signature(Class_Handle src_class, unsigned short index); ? const char* class_cp_get_field_descriptor(Class_Handle cl, unsigned index);
+static class_cp_is_entry_resolved_t class_cp_is_entry_resolved = 0;//bool class_cp_is_entry_resolved(Compile_Handle ch, Class_Handle clazz, unsigned cp_index);
+static class_cp_get_class_name_t class_cp_get_class_name =0;//const char* class_cp_get_class_name(Class_Handle cl, unsigned index);
+static class_cp_get_method_class_name_t class_cp_get_method_class_name = 0;//const char *class_cp_get_method_class_name(Class_Handle cl, unsigned index);
+static class_cp_get_method_name_t class_cp_get_method_name = 0;//const char* class_cp_get_method_name(Class_Handle cl, unsigned index);
//Field
@@ -250,11 +251,11 @@
class_get_vtable = GET_INTERFACE(vm, class_get_vtable);
class_get_allocation_handle = GET_INTERFACE(vm, class_get_allocation_handle);
class_get_boxed_data_size = GET_INTERFACE(vm, class_get_boxed_data_size);
- class_get_num_array_dimensions = GET_INTERFACE(vm, class_get_num_array_dimensions);
+ class_cp_get_num_array_dimensions = GET_INTERFACE(vm, class_cp_get_num_array_dimensions);
class_get_class_of_primitive_type = GET_INTERFACE(vm, class_get_class_of_primitive_type);
class_get_const_string_intern_addr = GET_INTERFACE(vm, class_get_const_string_intern_addr);
- class_get_const_type = GET_INTERFACE(vm, class_get_const_type);
- class_get_const_addr = GET_INTERFACE(vm, class_get_const_addr);
+ class_cp_get_const_type = GET_INTERFACE(vm, class_cp_get_const_type);
+ class_cp_get_const_addr = GET_INTERFACE(vm, class_cp_get_const_addr);
class_get_method_by_name = GET_INTERFACE(vm, class_get_method_by_name);
class_get_field_by_name = GET_INTERFACE(vm, class_get_field_by_name);
class_get_class_loader = GET_INTERFACE(vm, class_get_class_loader);
@@ -982,7 +983,7 @@
-void*
+const void*
CompilationInterface::getStringInternAddr(MethodDesc* enclosingMethodDesc,
uint32 stringToken) {
Class_Handle enclosingDrlVMClass = enclosingMethodDesc->getParentHandle();
@@ -993,14 +994,14 @@
CompilationInterface::getConstantType(MethodDesc* enclosingMethodDesc,
uint32 constantToken) {
Class_Handle enclosingDrlVMClass = enclosingMethodDesc->getParentHandle();
- Java_Type drlType = (Java_Type)class_get_const_type(enclosingDrlVMClass,constantToken);
+ VM_Data_Type drlType = class_cp_get_const_type(enclosingDrlVMClass,constantToken);
switch (drlType) {
- case JAVA_TYPE_STRING: return typeManager.getSystemStringType();
- case JAVA_TYPE_CLASS: return typeManager.getSystemClassType();
- case JAVA_TYPE_DOUBLE: return typeManager.getDoubleType();
- case JAVA_TYPE_FLOAT: return typeManager.getSingleType();
- case JAVA_TYPE_INT: return typeManager.getInt32Type();
- case JAVA_TYPE_LONG: return typeManager.getInt64Type();
+ case VM_DATA_TYPE_STRING: return typeManager.getSystemStringType();
+ case VM_DATA_TYPE_CLASS: return typeManager.getSystemClassType();
+ case VM_DATA_TYPE_F8: return typeManager.getDoubleType();
+ case VM_DATA_TYPE_F4: return typeManager.getSingleType();
+ case VM_DATA_TYPE_INT32: return typeManager.getInt32Type();
+ case VM_DATA_TYPE_INT64: return typeManager.getInt64Type();
default: assert(0);
}
assert(0);
@@ -1011,7 +1012,7 @@
CompilationInterface::getConstantValue(MethodDesc* enclosingMethodDesc,
uint32 constantToken) {
Class_Handle enclosingDrlVMClass = enclosingMethodDesc->getParentHandle();
- return class_get_const_addr(enclosingDrlVMClass,constantToken);
+ return class_cp_get_const_addr(enclosingDrlVMClass,constantToken);
}
MethodDesc*
@@ -1169,7 +1170,7 @@
static uint32 getArrayDims(Class_Handle cl, uint32 cpIndex) {
- return class_get_num_array_dimensions(cl, (unsigned short)cpIndex);
+ return class_cp_get_num_array_dimensions(cl, (unsigned short)cpIndex);
}
static NamedType* getUnresolvedType(TypeManager& typeManager, Class_Handle enclClass, uint32 cpIndex) {
@@ -1196,7 +1197,7 @@
NamedType* CompilationInterface::getNamedType(Class_Handle enclClass, uint32 cpIndex, ResolveNewCheck checkNew) {
Class_Handle ch = NULL;
- if (typeManager.isLazyResolutionMode() && !class_cp_is_entry_resolved(compileHandle, enclClass, cpIndex)) {
+ if (typeManager.isLazyResolutionMode() && !class_cp_is_entry_resolved(enclClass, cpIndex)) {
const char* className = class_cp_get_class_name(enclClass, cpIndex);
bool forceResolve = VMMagicUtils::isVMMagicClass(className);
if (!forceResolve) {
@@ -1227,7 +1228,7 @@
CompilationInterface::getSpecialMethod(Class_Handle enclClass, uint32 cpIndex) {
Method_Handle res = NULL;
bool lazy = typeManager.isLazyResolutionMode();
- if (!lazy || class_cp_is_entry_resolved(compileHandle, enclClass, cpIndex)) {
+ if (!lazy || class_cp_is_entry_resolved(enclClass, cpIndex)) {
res = resolve_special_method(compileHandle,enclClass, cpIndex);
}
if (!res) return NULL;
@@ -1238,7 +1239,7 @@
CompilationInterface::getInterfaceMethod(Class_Handle enclClass, uint32 cpIndex) {
Method_Handle res = NULL;
bool lazy = typeManager.isLazyResolutionMode();
- if (!lazy || class_cp_is_entry_resolved(compileHandle, enclClass, cpIndex)) {
+ if (!lazy || class_cp_is_entry_resolved(enclClass, cpIndex)) {
res = resolve_interface_method(compileHandle,enclClass, cpIndex);
}
if (!res) return NULL;
@@ -1249,7 +1250,7 @@
CompilationInterface::getStaticMethod(Class_Handle enclClass, uint32 cpIndex) {
Method_Handle res = NULL;
bool lazy = typeManager.isLazyResolutionMode();
- if (!lazy || class_cp_is_entry_resolved(compileHandle, enclClass, cpIndex)) {
+ if (!lazy || class_cp_is_entry_resolved(enclClass, cpIndex)) {
res = resolve_static_method(compileHandle,enclClass, cpIndex);
}
if (!res) return NULL;
@@ -1260,7 +1261,7 @@
CompilationInterface::getVirtualMethod(Class_Handle enclClass, uint32 cpIndex) {
Method_Handle res = NULL;
bool lazy = typeManager.isLazyResolutionMode();
- if (!lazy || class_cp_is_entry_resolved(compileHandle, enclClass, cpIndex)) {
+ if (!lazy || class_cp_is_entry_resolved(enclClass, cpIndex)) {
res = resolve_virtual_method(compileHandle,enclClass, cpIndex);
}
if (!res) return NULL;
@@ -1272,7 +1273,7 @@
CompilationInterface::getNonStaticField(Class_Handle enclClass, uint32 cpIndex, bool putfield) {
Field_Handle res = NULL;
bool lazy = typeManager.isLazyResolutionMode();
- if (!lazy || class_cp_is_entry_resolved(compileHandle, enclClass, cpIndex)) {
+ if (!lazy || class_cp_is_entry_resolved(enclClass, cpIndex)) {
res = resolve_nonstatic_field(compileHandle, enclClass, cpIndex, putfield);
}
if (!res) {
@@ -1286,7 +1287,7 @@
CompilationInterface::getStaticField(Class_Handle enclClass, uint32 cpIndex, bool putfield) {
Field_Handle res = NULL;
bool lazy = typeManager.isLazyResolutionMode();
- if (!lazy || class_cp_is_entry_resolved(compileHandle, enclClass, cpIndex)) {
+ if (!lazy || class_cp_is_entry_resolved(enclClass, cpIndex)) {
res = resolve_static_field(compileHandle, enclClass, cpIndex, putfield);
}
if (!res) {
@@ -1310,20 +1311,20 @@
Type*
CompilationInterface::getFieldType(Class_Handle enclClass, uint32 cpIndex) {
- Java_Type drlType = (Java_Type)class_cp_get_field_type(enclClass, (unsigned short)cpIndex);
+ VM_Data_Type drlType = class_cp_get_field_type(enclClass, (unsigned short)cpIndex);
bool lazy = typeManager.isLazyResolutionMode();
switch (drlType) {
- case JAVA_TYPE_BOOLEAN: return typeManager.getBooleanType();
- case JAVA_TYPE_CHAR: return typeManager.getCharType();
- case JAVA_TYPE_BYTE: return typeManager.getInt8Type();
- case JAVA_TYPE_SHORT: return typeManager.getInt16Type();
- case JAVA_TYPE_INT: return typeManager.getInt32Type();
- case JAVA_TYPE_LONG: return typeManager.getInt64Type();
- case JAVA_TYPE_DOUBLE: return typeManager.getDoubleType();
- case JAVA_TYPE_FLOAT: return typeManager.getSingleType();
- case JAVA_TYPE_ARRAY:
+ case VM_DATA_TYPE_BOOLEAN: return typeManager.getBooleanType();
+ case VM_DATA_TYPE_CHAR: return typeManager.getCharType();
+ case VM_DATA_TYPE_INT8: return typeManager.getInt8Type();
+ case VM_DATA_TYPE_INT16: return typeManager.getInt16Type();
+ case VM_DATA_TYPE_INT32: return typeManager.getInt32Type();
+ case VM_DATA_TYPE_INT64: return typeManager.getInt64Type();
+ case VM_DATA_TYPE_F8: return typeManager.getDoubleType();
+ case VM_DATA_TYPE_F4: return typeManager.getSingleType();
+ case VM_DATA_TYPE_ARRAY:
- case JAVA_TYPE_CLASS:
+ case VM_DATA_TYPE_CLASS:
if (lazy) {
const char* fieldTypeName = class_cp_get_entry_signature(enclClass, cpIndex);
assert(fieldTypeName);
@@ -1331,8 +1332,8 @@
}
return typeManager.getUnresolvedObjectType();
- case JAVA_TYPE_VOID: // class_get_cp_field_type can't return VOID
- case JAVA_TYPE_STRING: // class_get_cp_field_type can't return STRING
+ case VM_DATA_TYPE_VOID: // class_cp_get_field_type can't return VOID
+ case VM_DATA_TYPE_STRING: // class_cp_get_field_type can't return STRING
default: assert(0);
}
assert(0);
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h Fri Mar 14 05:54:10 2008
@@ -344,7 +344,7 @@
MethodDesc* getOverriddenMethod(NamedType *type, MethodDesc * methodDesc);
- void* getStringInternAddr(MethodDesc* enclosingMethodDesc, uint32 stringToken);
+ const void* getStringInternAddr(MethodDesc* enclosingMethodDesc, uint32 stringToken);
Type* getConstantType(MethodDesc* enclosingMethodDesc, uint32 constantToken);
const void* getConstantValue(MethodDesc* enclosingMethodDesc, uint32 constantToken);
const char* getSignatureString(MethodDesc* enclosingMethodDesc, uint32 methodToken);
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp Fri Mar 14 05:54:10 2008
@@ -18,12 +18,12 @@
class_get_boxed_data_size;
class_get_class_loader;
class_get_class_of_primitive_type;
- class_get_const_addr;
- class_get_const_string;
+ class_cp_get_const_addr;
+ class_cp_get_const_string;
class_get_const_string_intern_addr;
- class_get_const_type;
- class_get_cp_entry_signature;
- class_get_cp_field_type;
+ class_cp_get_const_type;
+ class_cp_get_entry_signature;
+ class_cp_get_field_type;
class_get_declaring_class;
class_get_depth;
class_get_element_type_info;
@@ -38,7 +38,7 @@
class_get_method;
class_get_method_by_name;
class_get_name;
- class_get_num_array_dimensions;
+ class_cp_get_num_array_dimensions;
class_get_number_methods;
class_get_package_name;
class_get_primitive_type_of_class;
@@ -47,11 +47,9 @@
class_get_super_class;
class_get_super_offset;
class_get_vtable;
- class_has_non_default_finalizer;
class_hint_is_exceptiontype;
class_is_array;
- class_is_before_field_init;
- class_is_cp_entry_resolved;
+ class_cp_is_entry_resolved;
class_is_enum;
class_is_finalizable;
class_is_initialized;
@@ -77,22 +75,21 @@
class_number_inner_classes;
class_num_instance_fields;
class_num_instance_fields_recursive;
- class_property_is_abstract;
- class_property_is_final;
- class_property_is_interface2;
+ class_is_abstract;
+ class_is_final;
+ class_is_interface;
compiled_method_load;
compress_reference;
- const_pool_get_class_name;
- const_pool_get_field_class_name;
- const_pool_get_field_descriptor;
- const_pool_get_field_name;
- const_pool_get_interface_method_class_name;
- const_pool_get_interface_method_descriptor;
- const_pool_get_interface_method_name;
- const_pool_get_method_class_name;
- const_pool_get_method_descriptor;
- const_pool_get_method_name;
- core_free;
+ class_cp_get_class_name;
+ class_cp_get_field_class_name;
+ class_cp_get_field_descriptor;
+ class_cp_get_field_name;
+ class_cp_get_interface_method_class_name;
+ class_cp_get_interface_method_descriptor;
+ class_cp_get_interface_method_name;
+ class_cp_get_method_class_name;
+ class_cp_get_method_descriptor;
+ class_cp_get_method_name;
curr_arg;
destroy_properties_keys;
destroy_property_value;
@@ -118,7 +115,6 @@
field_is_static;
field_is_unmanaged_static;
field_is_volatile;
- free_string_buffer;
gc_force_gc;
gc_free_memory;
gc_heap_base_address;
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/class_member.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/class_member.h?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/class_member.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/class_member.h Fri Mar 14 05:54:10 2008
@@ -19,7 +19,7 @@
#include "annotation.h"
#include "Class.h"
-#include "jit_intf.h"
+#include "vm_java_support.h"
struct String;
class ByteReader;
@@ -488,9 +488,7 @@
unsigned get_max_locals() { return _max_locals; }
// Returns an iterator for the argument list.
- Arg_List_Iterator get_argument_list() {
- return initialize_arg_list_iterator(_descriptor->bytes);
- }
+ Arg_List_Iterator get_argument_list();
// Returns number of bytes of arguments pushed on the stack.
// This value depends on the descriptor and the calling convention.
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp Fri Mar 14 05:54:10 2008
@@ -38,18 +38,20 @@
#include "Package.h"
#include "open/vm_type_access.h"
+#include "open/vm_class_info.h"
+#include "jit_intf.h"
-Boolean class_property_is_final(Class_Handle cl) {
+Boolean class_is_final(Class_Handle cl) {
assert(cl);
return cl->is_final();
}
-Boolean class_property_is_abstract(Class_Handle cl) {
+Boolean class_is_abstract(Class_Handle cl) {
assert(cl);
return cl->is_abstract();
}
-Boolean class_property_is_interface2(Class_Handle cl) {
+BOOLEAN class_is_interface(Class_Handle cl) {
assert(cl);
return cl->is_interface();
}
@@ -69,7 +71,7 @@
return n;
}
-VMEXPORT uint32 class_get_num_array_dimensions(Class_Handle cl, unsigned short cpIndex) {
+U_32 class_cp_get_num_array_dimensions(Class_Handle cl, U_16 cpIndex) {
ConstantPool& cp = cl->get_constant_pool();
unsigned char tag = cp.get_tag(cpIndex);
char c = '[';
@@ -80,7 +82,7 @@
return countLeadingChars(str, c);
}
case CONSTANT_Fieldref: {
- const char* str = class_get_cp_entry_signature(cl, cpIndex);
+ const char* str = class_cp_get_entry_signature(cl, cpIndex);
return countLeadingChars(str, c);
}
default:
@@ -501,15 +503,6 @@
} //method_is_overridden
-
-Boolean method_uses_fastcall(Method_Handle m)
-{
- assert(m);
- return FALSE;
-} //method_uses_fastcall
-
-
-
Boolean method_is_fake(Method_Handle m)
{
assert(m);
@@ -527,21 +520,6 @@
-void method_set_inline_assumption(Compile_Handle h,
- Method_Handle caller,
- Method_Handle callee)
-{
- assert(h);
- assert(caller);
- assert(callee);
- Compilation_Handle* ch = (Compilation_Handle*)h;
- JIT *jit = ch->jit;
- Method *caller_method = (Method *)caller;
- Method *callee_method = (Method *)callee;
- callee_method->set_inline_assumption(jit, caller_method);
-} //method_set_inline_assumption
-
-
const char* class_get_name(Class_Handle cl)
{
assert(cl);
@@ -600,16 +578,6 @@
return !ch->is_initialized();
} //class_needs_initialization
-
-
-Boolean class_has_non_default_finalizer(Class_Handle cl)
-{
- assert(cl);
- return cl->has_finalizer();
-} //class_has_non_default_finalizer
-
-
-
Class_Handle class_get_super_class(Class_Handle cl)
{
assert(cl);
@@ -764,7 +732,7 @@
} // class_get_source_file_name
-const char* class_get_const_string(Class_Handle cl, unsigned index)
+const char* class_cp_get_const_string(Class_Handle cl, U_16 index)
{
assert(cl);
return cl->get_constant_pool().get_string_chars(index);
@@ -775,7 +743,7 @@
// Returns the address where the interned version of the string is stored: this will be the address
// of a slot containing a Java_java_lang_String* or a uint32 compressed reference. Also interns the
// string so that the JIT can load a reference to the interned string without checking if it is null.
-void *class_get_const_string_intern_addr(Class_Handle cl, unsigned index)
+const void *class_get_const_string_intern_addr(Class_Handle cl, U_16 index)
{
assert(cl);
Global_Env* env = VM_Global_State::loader_env;
@@ -788,7 +756,7 @@
} //class_get_const_string_intern_addr
-const char* class_get_cp_entry_signature(Class_Handle src_class, unsigned short index)
+const char* class_cp_get_entry_signature(Class_Handle src_class, U_16 index)
{
Class* clss = (Class*)src_class;
ConstantPool& cp = src_class->get_constant_pool();
@@ -800,14 +768,14 @@
index = cp.get_ref_name_and_type_index(index);
index = cp.get_name_and_type_descriptor_index(index);
return cp.get_utf8_chars(index);
-} // class_get_cp_entry_signature
+} // class_cp_get_entry_signature
-VM_Data_Type class_get_cp_field_type(Class_Handle src_class, unsigned short cp_index)
+VM_Data_Type class_cp_get_field_type(Class_Handle src_class, U_16 cp_index)
{
assert(src_class->get_constant_pool().is_fieldref(cp_index));
- char class_id = (class_get_cp_entry_signature(src_class, cp_index))[0];
+ char class_id = (class_cp_get_entry_signature(src_class, cp_index))[0];
switch(class_id)
{
case VM_DATA_TYPE_BOOLEAN:
@@ -833,10 +801,10 @@
ABORT("Unknown vm data type");
}
return VM_DATA_TYPE_INVALID;
-} // class_get_cp_field_type
+} // class_cp_get_field_type
-VM_Data_Type class_get_const_type(Class_Handle cl, unsigned index)
+VM_Data_Type class_cp_get_const_type(Class_Handle cl, U_16 index)
{
assert(cl);
Java_Type jt = JAVA_TYPE_INVALID;
@@ -873,15 +841,15 @@
}
return (VM_Data_Type)jt;
-} //class_get_const_type
+} //class_cp_get_const_type
-const void *class_get_const_addr(Class_Handle cl, unsigned index)
+const void *class_cp_get_const_addr(Class_Handle cl, U_16 index)
{
assert(cl);
return cl->get_constant_pool().get_address_of_constant(index);
-} //class_get_const_addr
+} //class_cp_get_const_addr
void* method_get_native_func_addr(Method_Handle method) {
@@ -1066,7 +1034,7 @@
// The following do not cause constant pools to be resolve, if they are not
// resolved already
//
-const char* const_pool_get_field_name(Class_Handle cl, unsigned index)
+const char* class_cp_get_field_name(Class_Handle cl, U_16 index)
{
assert(cl);
ConstantPool& const_pool = cl->get_constant_pool();
@@ -1077,11 +1045,11 @@
index = const_pool.get_ref_name_and_type_index(index);
index = const_pool.get_name_and_type_name_index(index);
return const_pool.get_utf8_chars(index);
-} // const_pool_get_field_name
+} // class_cp_get_field_name
-const char* const_pool_get_field_class_name(Class_Handle cl, unsigned index)
+const char* class_cp_get_field_class_name(Class_Handle cl, U_16 index)
{
assert(cl);
ConstantPool& const_pool = cl->get_constant_pool();
@@ -1090,12 +1058,12 @@
return 0;
}
index = const_pool.get_ref_class_index(index);
- return const_pool_get_class_name(cl, index);
-} //const_pool_get_field_class_name
+ return class_cp_get_class_name(cl, index);
+} //class_cp_get_field_class_name
-const char* const_pool_get_field_descriptor(Class_Handle cl, unsigned index)
+const char* class_cp_get_field_descriptor(Class_Handle cl, U_16 index)
{
assert(cl);
ConstantPool& const_pool = cl->get_constant_pool();
@@ -1106,11 +1074,11 @@
index = const_pool.get_ref_name_and_type_index(index);
index = const_pool.get_name_and_type_descriptor_index(index);
return const_pool.get_utf8_chars(index);
-} // const_pool_get_field_descriptor
+} // class_cp_get_field_descriptor
-const char* const_pool_get_method_name(Class_Handle cl, unsigned index)
+const char* class_cp_get_method_name(Class_Handle cl, U_16 index)
{
assert(cl);
ConstantPool& const_pool = cl->get_constant_pool();
@@ -1121,11 +1089,11 @@
index = const_pool.get_ref_name_and_type_index(index);
index = const_pool.get_name_and_type_name_index(index);
return const_pool.get_utf8_chars(index);
-} // const_pool_get_method_name
+} // class_cp_get_method_name
-const char *const_pool_get_method_class_name(Class_Handle cl, unsigned index)
+const char *class_cp_get_method_class_name(Class_Handle cl, U_16 index)
{
assert(cl);
ConstantPool& const_pool = cl->get_constant_pool();
@@ -1134,12 +1102,12 @@
return 0;
}
index = const_pool.get_ref_class_index(index);
- return const_pool_get_class_name(cl,index);
-} //const_pool_get_method_class_name
+ return class_cp_get_class_name(cl,index);
+} //class_cp_get_method_class_name
-const char* const_pool_get_interface_method_name(Class_Handle cl, unsigned index)
+const char* class_cp_get_interface_method_name(Class_Handle cl, U_16 index)
{
assert(cl);
ConstantPool& const_pool = cl->get_constant_pool();
@@ -1150,11 +1118,11 @@
index = const_pool.get_ref_name_and_type_index(index);
index = const_pool.get_name_and_type_name_index(index);
return const_pool.get_utf8_chars(index);
-} // const_pool_get_interface_method_name
+} // class_cp_get_interface_method_name
-const char* const_pool_get_interface_method_class_name(Class_Handle cl, unsigned index)
+const char* class_cp_get_interface_method_class_name(Class_Handle cl, U_16 index)
{
assert(cl);
ConstantPool& const_pool = cl->get_constant_pool();
@@ -1163,12 +1131,12 @@
return 0;
}
index = const_pool.get_ref_class_index(index);
- return const_pool_get_class_name(cl,index);
-} //const_pool_get_interface_method_class_name
+ return class_cp_get_class_name(cl,index);
+} //class_cp_get_interface_method_class_name
-const char* const_pool_get_method_descriptor(Class_Handle cl, unsigned index)
+const char* class_cp_get_method_descriptor(Class_Handle cl, U_16 index)
{
assert(cl);
ConstantPool& const_pool = cl->get_constant_pool();
@@ -1179,11 +1147,11 @@
index = const_pool.get_ref_name_and_type_index(index);
index = const_pool.get_name_and_type_descriptor_index(index);
return const_pool.get_utf8_chars(index);
-} // const_pool_get_method_descriptor
+} // class_cp_get_method_descriptor
-const char* const_pool_get_interface_method_descriptor(Class_Handle cl, unsigned index)
+const char* class_cp_get_interface_method_descriptor(Class_Handle cl, U_16 index)
{
assert(cl);
ConstantPool& const_pool = cl->get_constant_pool();
@@ -1194,11 +1162,11 @@
index = const_pool.get_ref_name_and_type_index(index);
index = const_pool.get_name_and_type_descriptor_index(index);
return const_pool.get_utf8_chars(index);
-} // const_pool_get_interface_method_descriptor
+} // class_cp_get_interface_method_descriptor
-const char* const_pool_get_class_name(Class_Handle cl, unsigned index)
+const char* class_cp_get_class_name(Class_Handle cl, U_16 index)
{
assert(cl);
ConstantPool& const_pool = cl->get_constant_pool();
@@ -1207,7 +1175,7 @@
return 0;
}
return const_pool.get_utf8_chars(const_pool.get_class_name_index(index));
-} // const_pool_get_class_name
+} // class_cp_get_class_name
unsigned method_number_throws(Method_Handle m)
@@ -1318,24 +1286,6 @@
static ChList* chs = NULL;
-Compile_Handle jit_get_comp_handle(JIT_Handle j)
-{
- for (ChList *c = chs; c != NULL; c = c->next) {
- if (c->jit == j) {
- return (Compile_Handle)(&c->ch);
- }
- }
- ChList* n = (ChList*)STD_MALLOC(sizeof(ChList));
- assert(n);
- n->jit = j;
- n->ch.env = VM_Global_State::loader_env;
- n->ch.jit = (JIT*)j;
- n->next = chs;
- chs = n;
- return &n->ch;
-} //jit_get_comp_handle
-
-
int object_get_vtable_offset()
{
@@ -1392,16 +1342,6 @@
} //field_is_literal
-
-Boolean class_is_before_field_init(Class_Handle ch)
-{
- assert(ch);
- return FALSE;
-} //class_is_before_field_init
-
-
-
-
int vector_first_element_offset_unboxed(Class_Handle element_type)
{
assert(element_type);
@@ -1471,14 +1411,6 @@
return class_is_primitive(ch);
} //class_is_valuetype
-
-#ifdef COMPACT_FIELD
-Boolean class_is_compact_field()
-{
- return Class::compact_fields && Class::sort_fields ;
-}
-#endif
-
Boolean class_is_enum(Class_Handle ch)
{
assert(ch);
@@ -1833,7 +1765,7 @@
Boolean field_is_reference(Field_Handle fh)
{
assert((Field *)fh);
- Java_Type typ = field_get_type(fh);
+ Java_Type typ = fh->get_java_type();
return (typ == JAVA_TYPE_CLASS || typ == JAVA_TYPE_ARRAY);
} //field_is_reference
@@ -2008,11 +1940,12 @@
} // class_is_pinned
-Boolean class_is_finalizable(Class_Handle ch)
+BOOLEAN class_is_finalizable(Class_Handle ch)
{
assert(ch);
- return (ch->get_vtable()->class_properties & CL_PROP_FINALIZABLE_MASK) != 0
- ? TRUE : FALSE;
+ assert(ch->has_finalizer() ==
+ ((ch->get_vtable()->class_properties & CL_PROP_FINALIZABLE_MASK) != 0));
+ return ch->has_finalizer() ? TRUE : FALSE;
} // class_is_finalizable
WeakReferenceType class_is_reference(Class_Handle clss)
@@ -2149,13 +2082,6 @@
}
return m;
} //method_find_overridden_method
-
-
-
-void core_free(void* p)
-{
- STD_FREE(p);
-}
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class.cpp Fri Mar 14 05:54:10 2008
@@ -26,6 +26,7 @@
#include <sstream>
+#include "open/vm_class_info.h"
#include "Class.h"
#include "classloader.h"
#include "environment.h"
@@ -905,7 +906,7 @@
if(m_enclosing_class_index)
{
const char* enclosing_name =
- const_pool_get_class_name(this, m_enclosing_class_index);
+ class_cp_get_class_name(this, m_enclosing_class_index);
start = fn + strlen(enclosing_name);
while (*start == '$' || isdigit(*start)) start++;
}
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp Fri Mar 14 05:54:10 2008
@@ -102,6 +102,7 @@
#include "interpreter.h"
#include "open/bytecodes.h"
+#include "open/vm_class_info.h"
#include "open/vm_util.h"
@@ -968,9 +969,9 @@
return c->_resolve_class(compile_handle_to_environment(h), index);
} //resolve_class
-Boolean class_is_cp_entry_resolved(Compile_Handle ch, Class_Handle clazz, unsigned cp_index) {
+BOOLEAN class_cp_is_entry_resolved(Class_Handle clazz, U_16 cp_index) {
ConstantPool& cp = clazz->get_constant_pool();
- Boolean res = cp.is_entry_resolved(cp_index);
+ bool res = cp.is_entry_resolved(cp_index);
if (!res) {
unsigned char tag = cp.get_tag(cp_index);
//during the loading of a class not all items in it's constant pool are updated
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/method.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/method.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/method.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/method.cpp Fri Mar 14 05:54:10 2008
@@ -52,6 +52,9 @@
return descr + 1;
} //initialize_iterator
+Arg_List_Iterator Method::get_argument_list() {
+ return initialize_arg_list_iterator(_descriptor->bytes);
+}
Java_Type curr_arg(Arg_List_Iterator it)
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp Fri Mar 14 05:54:10 2008
@@ -49,8 +49,9 @@
#include "slot.h"
#include "classpath_const.h"
#include "finalize.h"
+#include "jit_intf.h"
-#ifdef PLATFORM_NT
+#ifdef _WIN32
// 20040427 Used to turn on heap checking on every allocation
#include <crtdbg.h>
#endif
@@ -147,25 +148,11 @@
} else if (strcmp(func_name,"class_is_support_fast_instanceof") == 0) {
return (void*)class_get_fast_instanceof_flag;
} else if (strcmp(func_name,"class_is_final") == 0) {
- return (void*)class_property_is_final;
+ return (void*)class_is_final;
} else if (strcmp(func_name,"class_is_throwable") == 0) {
return (void*)class_hint_is_exceptiontype;
- } else if (strcmp(func_name,"class_is_interface") == 0) {
- return (void*)class_property_is_interface2;
} else if (strcmp(func_name,"class_is_abstract") == 0) {
- return (void*)class_property_is_abstract;
- } else if (strcmp(func_name,"class_cp_get_field_type") == 0) {
- return (void*)class_get_cp_field_type;
- } else if (strcmp(func_name,"class_cp_get_entry_signature") == 0) {
- return (void*)class_get_cp_entry_signature;
- } else if (strcmp(func_name,"class_cp_get_method_class_name") == 0) {
- return (void*)const_pool_get_method_class_name;
- } else if (strcmp(func_name,"class_cp_get_method_name") == 0) {
- return (void*)const_pool_get_method_name;
- } else if (strcmp(func_name,"class_cp_is_entry_resolved") == 0) {
- return (void*)class_is_cp_entry_resolved;
- } else if (strcmp(func_name,"class_cp_get_class_name") == 0) {
- return (void*)const_pool_get_class_name;
+ return (void*)class_is_abstract;
} else if (strcmp(func_name,"field_get_type_info") == 0) {
return (void*)field_get_type_info_of_field_value;
} else if (strcmp(func_name,"method_get_overridden_method") == 0) {
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp Fri Mar 14 05:54:10 2008
@@ -3065,11 +3065,6 @@
} // class_is_subtype_fast
-Boolean vm_instanceof_class(Class *s, Class *t) {
- return s->is_instanceof(t);
-}
-
-
// Returns TRUE if "s" represents a class that is a subtype of "t",
// according to the Java instanceof rules.
//
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMStack.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMStack.cpp?rev=637085&r1=637084&r2=637085&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMStack.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_vm_VMStack.cpp Fri Mar 14 05:54:10 2008
@@ -148,7 +148,7 @@
jarray arr = jenv->NewObjectArray(length, ste, NULL);
if (arr == NULL) {
// OutOfMemoryError
- core_free(frames);
+ STD_FREE(frames);
assert(hythread_is_suspend_enabled());
return NULL;
}
@@ -169,7 +169,7 @@
i++;
}
- core_free(frames);
+ STD_FREE(frames);
assert(hythread_is_suspend_enabled());
return arr;
}
@@ -238,7 +238,7 @@
// OutOfMemoryError
assert(exn_raised());
}
- core_free(frames);
+ STD_FREE(frames);
return arr;
}
@@ -277,7 +277,7 @@
memcpy(array_data, frames, data_size);
jenv->ReleaseLongArrayElements(array, array_data, 0);
- core_free(frames);
+ STD_FREE(frames);
return array;
} // Java_org_apache_harmony_vm_VMStack_getStackState
@@ -614,6 +614,6 @@
jenv->SetObjectArrayElement(arr, i, obj);
}
- core_free(frames);
+ STD_FREE(frames);
return arr;
}