[vmkit-commits] [PATCH] Don't abort in EnsureLocalCapacity, assume we have capacity

Nicolas Geoffray nicolas.geoffray at gmail.com
Tue Nov 1 12:09:09 PDT 2011


Looks good!

Alternatively, we could allocate space up front in the method, but I don't
think that's worth the trouble.

Nicolas

On Tue, Nov 1, 2011 at 5:53 AM, Will Dietz <wdietz2 at illinois.edu> wrote:

> Inlined below.
>
> The idea here is simply that we'll more or less always have capacity,
> and since we dynamically allocate new blocks of references (100 at a
> time) there's no meaningful way to check if we're at capacity.
>
> Thoughts welcome of course :).
>
> ~Will
>
> >From b40f02d173d5aeff6b5e68522ac5d8342f58c2c0 Mon Sep 17 00:00:00 2001
> From: Will Dietz <w at wdtz.org>
> Date: Mon, 31 Oct 2011 16:36:17 -0500
> Subject: [PATCH 5/8] Don't abort in JNI EnsureLocalCapacity, assume we have
>  capacity.
>
> ---
>  lib/J3/VMCore/Jni.cpp |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/lib/J3/VMCore/Jni.cpp b/lib/J3/VMCore/Jni.cpp
> index 8f5a19f..6fceac6 100644
> --- a/lib/J3/VMCore/Jni.cpp
> +++ b/lib/J3/VMCore/Jni.cpp
> @@ -297,8 +297,7 @@ jobject NewLocalRef(JNIEnv *env, jobject ref) {
>
>
>  jint EnsureLocalCapacity(JNIEnv* env, jint capacity) {
> -  NYI();
> -  abort();
> +  // Assume we have capacity
>   return 0;
>  }
>
> --
> 1.7.5.1
> _______________________________________________
> vmkit-commits mailing list
> vmkit-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/vmkit-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/vmkit-commits/attachments/20111101/6444c50a/attachment.html>


More information about the vmkit-commits mailing list