search for: getarraylength

Displaying 13 results from an estimated 13 matches for "getarraylength".

2009 May 18
0
[LLVMdev] llvm-java
...ont end mark an array.length > field in such a way that LLVM knows that field doesn't alias anything else > and is constant, so it can be hoisted out of loops. > For that matter, VMKit already has this optimization. Instead of emitting an LLVM load of the size field, VMKit emits a GetArrayLength call, flagged readnone. The GVN pass will merge all GetArrayLength of a same array and the LICM pass will hoist the call. Once theses passes are complete, VMKit lowers the call to the actual load. :) Cheers, Nicolas > Andrew. > _______________________________________________ > LLVM D...
2009 May 18
2
[LLVMdev] llvm-java
Samuel Crow wrote: >> From: Andre Tavares <andrelct at dcc.ufmg.br> >> I'm working on a project to remove unnecessary array bound checks in >> Java. For this purpose I will need to use llvm-java. >> >> What is the state of llvm-java? Can someone explain how to build and use it? >> >> I saw some old emails on the list, and some about a SoC 2008
2008 May 29
0
Again, teach me speex AEC please!
...*/ JNIEXPORT jint JNICALL Java_com_peterhi_Speex_encode(JNIEnv* env, jclass c, jint p, jbyteArray buf1, jbyteArray buf2) { jbyte* bytes1 = (*env)->GetByteArrayElements(env, buf1, JNI_FALSE); jbyte* bytes2 = (*env)->GetByteArrayElements(env, buf2, JNI_FALSE); int len1 = (*env)->GetArrayLength(env, buf1); int len2 = (*env)->GetArrayLength(env, buf2); jint ret = 0; Codec* pCodec = (Codec* )p; if (pCodec->type != TYPE_ENCODE) { return ret; } // How to use AEC to cancel? speex_preprocess_run(pCodec->pPre, (spx_int16_t* )bytes1);...
2009 May 18
2
[LLVMdev] llvm-java
...array.length >> field in such a way that LLVM knows that field doesn't alias anything else >> and is constant, so it can be hoisted out of loops. > > For that matter, VMKit already has this optimization. Instead of > emitting an LLVM load of the size field, VMKit emits a GetArrayLength > call, flagged readnone. The GVN pass will merge all GetArrayLength of a > same array and the LICM pass will hoist the call. Once theses passes are > complete, VMKit lowers the call to > the actual load. Right, so that part should be trivial. So, does the array bounds check elimin...
2016 Feb 05
7
[PATCH 0/7] lib: Stop exporting the safe_malloc, etc. functions.
The safe_malloc (etc) functions call g->abort_fn on failure. That's not appropriate for language bindings, and we never intended that these internal functions be used from language bindings, that was just a historical accident. This patch series removes any external use of the safe_* functions. Rich.
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...pr " char **%s;\n" n | Bool n @@ -979,7 +979,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) | BufferIn n -> pr " %s = (char *) (*env)->GetByteArrayElements (env, j%s, NULL);\n" n n; pr " %s_size = (*env)->GetArrayLength (env, j%s);\n" n n - | StringList n | DeviceList n -> + | StringList n | DeviceList n | RelativePathnameList n -> pr " %s_len = (*env)->GetArrayLength (env, j%s);\n" n n; pr " %s = guestfs_int_safe_malloc (g, sizeof (char *) * (...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...pr " char **%s;\n" n | Bool n @@ -979,7 +979,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) | BufferIn n -> pr " %s = (char *) (*env)->GetByteArrayElements (env, j%s, NULL);\n" n n; pr " %s_size = (*env)->GetArrayLength (env, j%s);\n" n n - | StringList n | DeviceList n -> + | StringList n | DeviceList n | FilenameList n -> pr " %s_len = (*env)->GetArrayLength (env, j%s);\n" n n; pr " %s = guestfs_int_safe_malloc (g, sizeof (char *) * (%s_len+1...
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky for development (too easy to miss new ones) so I spent some time last week and today working on removing them. The first patch gets us down to almost no warnings with the original -Wall setting. That was by far the hardest part. Once I'd done that, I enabled nearly all of gcc's warnings via gnulib's warnings and manywarnings modules
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880 https://bugzilla.redhat.com/show_bug.cgi?id=847881 This patch series adds various optional arguments to the tar-in and tar-out commands. Firstly (1/7) an optional "compress" flag is added to select compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out deprecated, and expands the range of compression types available.
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...This is completely undocumented, but Java null becomes @@ -788,7 +763,7 @@ throw_out_of_memory (JNIEnv *env, const char *msg) | BufferIn n -> pr " %s = (char *) (*env)->GetByteArrayElements (env, j%s, NULL);\n" n n; pr " %s_size = (*env)->GetArrayLength (env, j%s);\n" n n - | StringList n | DeviceList n | FilenameList n -> + | StringList (_, n) -> pr " %s_len = (*env)->GetArrayLength (env, j%s);\n" n n; pr " %s = malloc (sizeof (char *) * (%s_len+1));\n" n n;...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
..., NULL);\n" n n - | OptString n -> - (* This is completely undocumented, but Java null becomes - * a NULL parameter. - *) - pr " %s = j%s ? (*env)->GetStringUTFChars (env, j%s, NULL) : NULL;\n" n n n - | StringList n -> - pr " %s_len = (*env)->GetArrayLength (env, j%s);\n" n n; - pr " %s = guestfs_safe_malloc (g, sizeof (char *) * (%s_len+1));\n" n n; - pr " for (i = 0; i < %s_len; ++i) {\n" n; - pr " jobject o = (*env)->GetObjectArrayElement (env, j%s, i);\n" - n; - pr " %s[i]...