You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by dl...@apache.org on 2006/04/05 07:19:55 UTC
svn commit: r391513 -
/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/utf.c
Author: dlydick
Date: Tue Apr 4 22:19:53 2006
New Revision: 391513
URL: http://svn.apache.org/viewcvs?rev=391513&view=rev
Log:
Added utf_prchar_strcmp() function.
Completed all names for function name strings.
Minor comment changes.
Modified:
incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/utf.c
Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/utf.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/utf.c?rev=391513&r1=391512&r2=391513&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/utf.c (original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/utf.c Tue Apr 4 22:19:53 2006
@@ -364,8 +364,7 @@
/*!
- * @brief Compare two UTF strings from @c @b constant_pool as
- * @b s1 minus @b s2
+ * @brief Compare two UTF strings as @b s1 minus @b s2
*
*
* @param s1 First of two UTF strings to compare
@@ -379,7 +378,7 @@
*/
jbyte utf_utf_strcmp(CONSTANT_Utf8_info *s1, CONSTANT_Utf8_info *s2)
{
- ARCH_FUNCTION_NAME(utf_);
+ ARCH_FUNCTION_NAME(utf_utf_strcmp);
/* Perform unified comparison of both UTF strings */
return(utf_s1_s2_strncmp(s1->bytes,
@@ -391,6 +390,32 @@
/*!
+ * @brief Compare a UTF string to a null-terminated string.
+ *
+ *
+ * @param s1 UTF string to compare
+ *
+ * @param s2 Null-terminated string to compare
+ *
+ *
+ * @returns lexicographical value of first difference in strings,
+ * else 0.
+ *
+ */
+jbyte utf_prchar_strcmp(CONSTANT_Utf8_info *s1, rchar *s2)
+{
+ ARCH_FUNCTION_NAME(utf_prchar_strcmp);
+
+ /* Perform unified comparison of UTF vs null-terminated string */
+ return(utf_s1_s2_strncmp(s1->bytes,
+ s1->length,
+ s2,
+ portable_strlen(s2)));
+
+} /* END of utf_utf_strcmp() */
+
+
+/*!
* @brief Compare contents of null-terminated string to contents of
* a UTF string from a class file structure.
*
@@ -410,7 +435,7 @@
ClassFile *pcfs2,
jvm_constant_pool_index cpidx2)
{
- ARCH_FUNCTION_NAME(utf_);
+ ARCH_FUNCTION_NAME(utf_prchar_pcfs_strcmp);
int l1 = portable_strlen(s1);
@@ -444,7 +469,7 @@
ClassFile *pcfs2,
jvm_constant_pool_index cpidx2)
{
- ARCH_FUNCTION_NAME(utf_);
+ ARCH_FUNCTION_NAME(utf_pcfs_strcmp);
u1 *s2 = PTR_CP_THIS_STRNAME(pcfs2, cpidx2);
@@ -494,7 +519,7 @@
ClassFile *pcfs2,
jvm_constant_pool_index cpidx2)
{
- ARCH_FUNCTION_NAME(utf_);
+ ARCH_FUNCTION_NAME(utf_common_classname_strcmp);
CONSTANT_Class_info *pci = PTR_CP_ENTRY_CLASS(pcfs2, cpidx2);
@@ -552,7 +577,7 @@
ClassFile *pcfs2,
jvm_constant_pool_index cpidx2)
{
- ARCH_FUNCTION_NAME(utf_);
+ ARCH_FUNCTION_NAME(utf_prchar_classname_strcmp);
return(utf_common_classname_strcmp((u1 *) s1,
portable_strlen(s1),
@@ -588,7 +613,7 @@
ClassFile *pcfs2,
jvm_constant_pool_index cpidx2)
{
- ARCH_FUNCTION_NAME(utf_);
+ ARCH_FUNCTION_NAME(utf_classname_strcmp);
return(utf_common_classname_strcmp(s1->bytes,
s1->length,
@@ -634,7 +659,7 @@
jvm_array_dim utf_get_utf_arraydims(CONSTANT_Utf8_info *inbfr)
{
- ARCH_FUNCTION_NAME(utf_);
+ ARCH_FUNCTION_NAME(utf_get_utf_arraydims);
/* Make return code wider than max to check overflow */
u4 rc = 0;
@@ -676,7 +701,7 @@
rboolean utf_isarray(CONSTANT_Utf8_info *inbfr)
{
- ARCH_FUNCTION_NAME(utf_);
+ ARCH_FUNCTION_NAME(utf_isarray);
return((BASETYPE_CHAR_ARRAY == (u1)inbfr->bytes[0]) ? rtrue : rfalse);
@@ -684,9 +709,9 @@
/*!
- * @brief Convert and an un-formatted class name UTF string (of the
- * type @c @b ClassName and not of type
- * @c @b [[[LClassName) from a (CONSTANT_Utf8_info *) into
+ * @brief Convert an un-formatted class name UTF string (of the
+ * type @c @b ClassName and not of type @c @b [[[LClassName;)
+ * from a (CONSTANT_Utf8_info *) into
* a null-terminated string with Java class formatting items. Result
* is delivered in a heap-allocated buffer. When done with result,
* perform HEAP_FREE_DATA(result) to return that buffer to the heap.
@@ -706,7 +731,7 @@
rchar *utf_utf2prchar_classname(CONSTANT_Utf8_info *src)
{
- ARCH_FUNCTION_NAME(utf_);
+ ARCH_FUNCTION_NAME(utf_utf2prchar_classname);
/* Retrieve string from UTF data first */
rchar *pstr = utf_utf2prchar(src);
@@ -779,7 +804,7 @@
rboolean utf_utf_isclassformatted(CONSTANT_Utf8_info *src)
{
- ARCH_FUNCTION_NAME(utf_);
+ ARCH_FUNCTION_NAME(utf_utf_isclassformatted);
jvm_utf_string_index utfidx;
rboolean rc = rfalse;
@@ -863,7 +888,7 @@
cp_info_dup *utf_utf2utf_unformatted_classname(cp_info_dup *inbfr)
{
- ARCH_FUNCTION_NAME(utf_);
+ ARCH_FUNCTION_NAME(utf_u2f2utf_unformatted_classname);
rchar *pstr = utf_utf2prchar(PTR_THIS_CP_Utf8(inbfr));