harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlyd...@apache.org
Subject svn commit: r565137 - /harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/native.c
Date Sun, 12 Aug 2007 20:32:34 GMT
Author: dlydick
Date: Sun Aug 12 13:32:34 2007
New Revision: 565137

URL: http://svn.apache.org/viewvc?view=rev&rev=565137
Log:
Simplified POP_THIS_OBJHASH() macro.

Minor comment changes.

Modified:
    harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/native.c

Modified: harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/native.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/native.c?view=diff&rev=565137&r1=565136&r2=565137
==============================================================================
--- harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/native.c (original)
+++ harmony/enhanced/sandbox/bootjvm/bootJVM/jvm/src/native.c Sun Aug 12 13:32:34 2007
@@ -473,11 +473,6 @@
  * top of the JVM stack into real machine local variable @b objhashTHIS
  * for use as a parameter to local native object instance method calls.
  *
- * @internal The null reference and access_flags logic is also
- *           implemented in the virtual opcode processing area
- *           in @link #opcode_run() opcode_run()@endlink
- *           for non-native method invocations.
- *
  *
  * @param thridx  Thead index of stack to access.
  *
@@ -488,55 +483,18 @@
  *       happens in the case that the object reference is not
  *       of the current class or one of its subclasses.  It is
  *       @e assumed that @b VerifyError should be thrown.  Is this
- *       a valid assumption?
- *
- * @internal Before/after the invocation of
- *           @link #CHECK_SUPERCLASS_VALID_METHOD_FOUND()
-             CHECK_SUPERCLASS_VALID_METHOD_FOUND()@endlink,
- *           for the @b INVOKEINTERFACE/INVOKESPECIAL opcodes, the
- *           spec says, "The @e objectref must be of type
- *           @c @b reference ..." It is assumed that @e all object
- *           references are of type @c @b reference, or they would
- *           not be object references-- this implies a self-referential
- *           definition.
+ *       a valid assumption?  If so, what should be be done in the
+ *       main opcode area to complain that is not already being done?
  *
+ * @todo HARMONY-6-jvm-native.c-7 This is a handy place to mention
+ *       that the JNI interface still needs to get written.  It must
+ *       be invoked back out into the Java world to handle other
+ *       exception types, such as NULL object references on parameters.
  *
  */
-#define POP_THIS_OBJHASH(thridx)                                       \
-    POP(thridx, objhashTHIS, jvm_object_hash);                         \
-                                                                       \
-    if (jvm_object_hash_null == objhashTHIS)                           \
-    {                                                                  \
-        exit_throw_exception(EXIT_JVM_OBJECT,                          \
-                             JVMCLASS_JAVA_LANG_NULLPOINTEREXCEPTION); \
-    }                                                                  \
-                                                                       \
-    switch(opcode)                                                     \
-    {                                                                  \
-        case OPCODE_B6_INVOKEVIRTUAL:                                  \
-        case OPCODE_B7_INVOKESPECIAL:                                  \
-            if ((ACC_PROTECTED & access_flags) &&                      \
-                (rtrue ==                                              \
-                 classutil_class_is_a(                                 \
-                     GET_PC_FIELD_IMMEDIATE(thridx, clsidx),           \
-                     clsidx)))                                         \
-            {                                                          \
-                if (rfalse ==                                          \
-                    classutil_class_is_a(                              \
-                           OBJECT_CLASS_LINKAGE(objhashTHIS)->clsidx,  \
-                           GET_PC_FIELD_IMMEDIATE(thridx, clsidx)))    \
-                {                                                      \
-                    exit_throw_exception(EXIT_JVM_CLASS,               \
-                                     JVMCLASS_JAVA_LANG_VERIFYERROR);  \
-/*NOTREACHED*/                                                         \
-                }                                                      \
-            }                                                          \
-                                                                       \
-            break;                                                     \
-    }                                                                  \
-                                                                       \
-    CHECK_OBJECT_CLASS_STRUCTURE(clsidx, objhashTHIS, isinitmethod);
-                                                           /*Extra ; */
+#define POP_THIS_OBJHASH(thridx)              \
+    POP(thridx, objhashTHIS, jvm_object_hash)
+
 
 /*!
  * @brief Retrieve a (jobject) method parameter from the top of
@@ -1461,8 +1419,9 @@
  *            @link
               #exit_throw_exception() exit_throw_exception()@endlink
  *            so as to avoid crossing from real- to Java-domain
- *            functionality.  Each and every possible subclass of
- *            @c @b java.lang.Error and every possible subclass
+ *            functionality.  (Notice that this does @e not apply to
+ *            normal native methods.)  Each and every possible subclass
+ *            of @c @b java.lang.Error and every possible subclass
  *            of @c @b java.lang.Exception is available through
  *            this interface.  It will be loaded and an instance created
  *            in the usual manner after being thrown by the native



Mime
View raw message