search for: callabl

Displaying 20 results from an estimated 342 matches for "callabl".

Did you mean: callable
2018 Apr 05
1
[nbdkit PATCH] python: Make sure callbacks are actually callable
Rather than catching a Python error at runtime when trying to call an object that wasn't callable, just ignore that object up front when loading the plugin. Signed-off-by: Eric Blake <eblake@redhat.com> --- Various examples on calling Python functions from C recommend doing this filtering check. plugins/python/python.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/...
2006 May 21
3
acts_as_list scope and polymorphic association.
this is my model: class Person < ActiveRecord::Base has_many :phones, :as => :callable, :order => :position end class Phone < ActiveRecord::Base belongs_to :callable, :polymorphic => true acts_as_list :scope => :callable_id end how can i add the callable_type to the scope. how can i say the scope is the {:callable_id,:callable_type} couple? is it even possible?...
2014 May 23
3
[LLVMdev] Changing the design of GlobalAliases to represent what is actually possible in object files.
I'm not there yet, but at some point I'm going to need the notion of a global callable function like symbol that's resolved at runtime. I've not given it much thought but I may need a new callable entity here (this is for the gnu ifunc stuff). Don't even know if this fits into the discussion, but since we were talking about weird symbols... -eric On Fri, May 23, 2014...
2019 Nov 18
2
HowToUseLLJIT crashes in debug build
Using llvm 9, visual studio, HowToUseLLJIT.cpp It works fine in a release build. In a debug build It aborts due to an assert failure on Core.cpp (383) because the lhs flags are (Exported | Callable) and the rhs flags are (Callable). What mods should be made to fix this issue? Side note: The comments at the top reference HowToUseJIT.cpp rather than HotToUseLLJIT.cpp Thanks, Rob Conde -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/p...
2007 Nov 14
0
7 commits - libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_super.c libswfdec/swfdec_as_super.h
...wfdec/swfdec_as_super.c b/libswfdec/swfdec_as_super.c index 1a4df38..9e67b40 100644 --- a/libswfdec/swfdec_as_super.c +++ b/libswfdec/swfdec_as_super.c @@ -43,8 +43,6 @@ swfdec_as_super_call (SwfdecAsFunction *function) SwfdecAsFunctionClass *klass; SwfdecAsFrame *frame; - //if (!super->callable) - // return NULL; if (super->object == NULL) { SWFDEC_WARNING ("super () called without an object."); return NULL; @@ -146,13 +144,14 @@ swfdec_as_super_init (SwfdecAsSuper *super) } void -swfdec_as_super_new (SwfdecAsFrame *frame, SwfdecAsObject *ref, gboolean cal...
2011 Dec 14
1
[LLVMdev] Changes to the PTX calling conventions
...ne also for the pocl use case. It's enough >> if there is a way to differentiate OpenCL C kernels from the "device >> functions" for the reason I discussed in the previous email. That is, >> in the pocl point of view we just need a way to pick the >> "host-callable" kernel functions as they need the special treatment >> before they can be called (like a C function). Remember OpenCL kernels are also callable from inside another kernels. It is not a big deal though, as calling conventions in LLVM IR are just markers to the code generation, they d...
2014 Apr 21
1
read.table() code fails outside of the utils package
...there's something here about how R C programming works that I don't understand.) Finally, since it is generally useful to be able to experiment with and re-use parts of the stock read.table() implementation, I suggest: 1. R add "attribute_visible" or otherwise make readtablehead callable from user C code. 2. R make readtablehead callable from user R code via .External(). What do you think? Note that I'm not asking that the current interface or behavior of readtablehead necessarily be SUPPORTED in any way, just that it be callable for experimental purposes, much as the old...
2018 Jul 05
7
RFC: should we spell lambdas like functions?
I argue we should spell C++ lambdas (and other function-like variables) like functions, not like variables. - Use verbs, not nouns. - Use lowerCamelCase. Here's a patch that implements the change to the coding standards: https://reviews.llvm.org/D48991 <https://reviews.llvm.org/D48991> Thoughts? -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Dec 14
2
[LLVMdev] Changes to the PTX calling conventions
...ions" instead of metadata is fine also for the pocl use case. It's enough if there is a way to differentiate OpenCL C kernels from the "device functions" for the reason I discussed in the previous email. That is, in the pocl point of view we just need a way to pick the "host-callable" kernel functions as they need the special treatment before they can be called (like a C function). BTW what about the other OpenCL data like required_wg_size which affect the possible "kernel treatment" of pocl and can be converted to some special instructions (I suppose) for the...
2012 Jun 17
1
[LLVMdev] Adding code after compilation
Hi, I want to be able add a function to a module after it is (partly) compiled in JIT. Let's say we have these functions: Foo() { Stuff; } Bar() { Foo(); MoreStuff; } I want to have a module with Foo optimized and have a callable pointer to Foo. Later, I want to generate Bar, optimize it (so Foo is inlined) and than get a callable pointer to Bar. Is this possible? If so, is there a way to run the optimizer so it will only process Bar, taking less time? Thanks, Eran. -------------- next part -------------- An HTML attachme...
2019 Aug 13
2
Re: [PATCH libnbd 5/6] generator: Implement OClosure.
...on > + | OClosure { cbname } -> > + pr " if (%s_user_data) {\n" cbname; > + pr " /* Increment refcount since pointer may be saved by libnbd. */\n"; > + pr " Py_INCREF (%s_user_data);\n" cbname; > + pr " if (!PyCallable_Check (%s_user_data)) {\n" cbname; I don't think PyNone is callable; this probably needs to gain a special case for when the user omitted the optional argument and we thus... > + pr " PyErr_SetString (PyExc_TypeError,\n"; > + pr "...
2019 Jul 16
1
Re: [PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
...ct %s_user_data *user_data = vp;\n" name; > + pr "\n"; > + List.iter ( > + fun { cbname } -> > + pr " Py_DECREF (user_data->%s);\n" cbname Oh, good fix. We were not previously incrementing the ref-count of the Python Callable, and could have ended up deferencing a garbage-collected object. > + ) cls; > + pr " free (user_data);\n"; > + pr "}\n"; > + pr "\n"; > + ); > + > | Flags n -> > pr " uint32_t %s_u...
2011 Dec 14
0
[LLVMdev] Changes to the PTX calling conventions
...is fine also for the pocl use case. It's enough if there is a > way > to differentiate OpenCL C kernels from the "device functions" for the > reason > I discussed in the previous email. That is, in the pocl point of view we > just > need a way to pick the "host-callable" kernel functions as they need the > special treatment before they can be called (like a C function). > > BTW what about the other OpenCL data like required_wg_size which > affect the possible "kernel treatment" of pocl and can be converted to some > special instructi...
2014 May 23
2
[LLVMdev] Changing the design of GlobalAliases to represent what is actually possible in object files.
...e Espindola <rafael.espindola at gmail.com> wrote: > > > Sent from my iPhone > >> On May 23, 2014, at 17:51, Eric Christopher <echristo at gmail.com> wrote: >> >> I'm not there yet, but at some point I'm going to need the notion of a >> global callable function like symbol that's resolved at runtime. I've >> not given it much thought but I may need a new callable entity here >> (this is for the gnu ifunc stuff). >> >> Don't even know if this fits into the discussion, but since we were >> talking about we...
2019 Aug 13
1
Re: [PATCH libnbd v2 1/3] generator: Implement OClosure.
...| OClosure { cbname } -> > + pr " if (%s_user_data != Py_None) {\n" cbname; > + pr " /* Increment refcount since pointer may be saved by libnbd. */\n"; > + pr " Py_INCREF (%s_user_data);\n" cbname; > + pr " if (!PyCallable_Check (%s_user_data)) {\n" cbname; > + pr " PyErr_SetString (PyExc_TypeError,\n"; > + pr " \"callback parameter %s is not callable\");\n" cbname; > + pr " return NULL;\n"; Leaks %s_user_data, b...
2013 Jan 11
0
[LLVMdev] adding IR attributes to llvm
...r its actually the calling convention, or just an annotation (I don't know MIPS that well). Could you ever have a case where you want to declare a function as both mips16 and fastcc, or some other explicit calling convention? For PTX, we added two calling conventions to mark kernel functions (callable by host) from device functions (not callable by host). But this designation is actually part of the function calling convention. On Fri, Jan 11, 2013 at 12:20 AM, reed kotler <rkotler at mips.com> wrote: > For target dependent function level attributes, do I need to actually add >...
2013 Jan 11
2
[LLVMdev] adding IR attributes to llvm
For target dependent function level attributes, do I need to actually add them to the enumeration in attributes.h? I have for example, mips16 and nomips16 as attributes. Or is this supposed to be done with cc <n>
2013 Jan 11
2
[LLVMdev] adding IR attributes to llvm
...tion, or just an > annotation (I don't know MIPS that well). Could you ever have a case > where you want to declare a function as both mips16 and fastcc, or > some other explicit calling convention? > > For PTX, we added two calling conventions to mark kernel functions > (callable by host) from device functions (not callable by host). But > this designation is actually part of the function calling convention. > > > On Fri, Jan 11, 2013 at 12:20 AM, reed kotler <rkotler at mips.com > <mailto:rkotler at mips.com>> wrote: > > For target...
2011 Dec 13
3
[LLVMdev] Changes to the PTX calling conventions
...ions, one set for OpenCL: cl_device/cl_kernel, and another set for general accelerators, e.g. accel_device/accel_global. [Villmow, Micah] Yeah, that is true. What about leaving the calling convention alone for 'device' and just having a calling convention for 'kernel'(i.e. functions callable from another device). The normal calling conventions handle calls from the same device, but there is no calling convention that handles functions that are callable from a seperate device. This would handle the CPU/GPU and accelerator cases. That I believe is the fundamental difference between the...
2014 Jun 30
3
[LLVMdev] LLD dynamic compilation
...;optimized out>, __closure=0x7fffffffde40) at /home/rengolin/devel/llvm/src/llvm/tools/lld/unittests/DriverTests/InputGraphTest.cpp:197 #1 llvm::function_ref<void(lld::File*)>::callback_fn<InputGraphTest_Observer_Test::TestBody()::<lambda(lld::File*)> >(intptr_t, lld::File *) (callable=140737488346688, param1=<optimized out>) at /home/rengolin/devel/llvm/src/llvm/include/llvm/ADT/STLExtras.h:117 #2 0x00000000005b3ec4 in operator() (param1=<optimized out>, this=0xa1e2a0) at /home/rengolin/devel/llvm/src/llvm/include/llvm/ADT/STLExtras.h:126 #3 callback_fn<llv...