You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Chunrong Lai (JIRA)" <ji...@apache.org> on 2008/11/12 08:17:44 UTC
[jira] Commented: (HARMONY-5714) [drlvm] Remove extra
synchronization runtime helpers.
[ https://issues.apache.org/jira/browse/HARMONY-5714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646819#action_12646819 ]
Chunrong Lai commented on HARMONY-5714:
---------------------------------------
The confused issues in this patch are listed in below:
- * Throw <code>java/lang/NullPointerException</code>, if the argument is null.
+ * Doesn't throw <code>java/lang/NullPointerException</code>, if the argument
+ * is null, it assumes that the argument is non-null. Passing a null argument
+ * will result in undefined behavior..
- * Throw <code>java/lang/NullPointerException</code>, if the argument is null.
+ * Doesn't throw <code>java/lang/NullPointerException</code>, if the argument
+ * is null, it assumes that the argument is non-null. Passing a null argument
+ * will result in undefined behavior.
+#ifdef _DEBUG_CHECK_NULL_ //_DEBUG
+ //npe check
ss = test(ss, ecx_opnd, ecx_opnd);
ss = branch8(ss, Condition_Z, Imm_Opnd(size_8, 0));
char *backpatch_address__null_pointer = ((char *)ss) - 1;
+#endif
+#ifdef _DEBUG_CHECK_NULL_//_DEBUG
// Handle NPE here
signed npe_offset = (signed)ss - (signed)backpatch_address__null_pointer - 1;
*backpatch_address__null_pointer = (char)npe_offset;
@@ -118,53 +101,10 @@
}
// Object is null so throw a null pointer exception
ss = jump(ss, (char*)exn_get_rth_throw_null_pointer());
-
+#endif
Say, the patch removed the null_check in the stub of vm_moniter_enter but
requires JIT's support to never pass a NullObject to it.
I am not sure if we have previous discussion about such convention to allow that.
Anyway a safe way to me is re-enable the CHECK_NULL in the stub.
Can some JIT experts also give your opinion in this issue?
> [drlvm] Remove extra synchronization runtime helpers.
> -----------------------------------------------------
>
> Key: HARMONY-5714
> URL: https://issues.apache.org/jira/browse/HARMONY-5714
> Project: Harmony
> Issue Type: Improvement
> Components: DRLVM
> Reporter: Pavel Afremov
> Assignee: Chunrong Lai
> Attachments: extra_strong_assert_fix.patch, extra_strong_assert_fix.patch, remove_extra_monitors_helper_1.patch, remove_extra_monitors_helper_2.patch, remove_extra_monitors_helper_3.patch
>
>
> Remove extra synchronization runtime helpers.
> All list of synchronization runtime helpers:
> • VM_RT_MONITOR_ENTER_NON_NULL
> • VM_RT_MONITOR_EXIT_NON_NULL
> • VM_RT_MONITOR_ENTER_STATIC
> • VM_RT_MONITOR_EXIT_STATIC
> • VM_RT_MONITOR_ENTER
> • VM_RT_MONITOR_EXIT
> can be replace by two helpers only:
> • VM_RT_MONITOR_ENTER
> • VM_RT_MONITOR_EXIT
> It reduces quantity of synchronization helpers in 3 times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.