Displaying 20 results from an estimated 1053 matches for "closures".
Did you mean:
closure
2019 Aug 13
0
[PATCH libnbd 1/6] generator: Share single list of all Closures.
...b/generator/generator
index 401a451..9dbef2a 100755
--- a/generator/generator
+++ b/generator/generator
@@ -916,6 +916,32 @@ let non_blocking_test_call_description = "\n
This call does not block, because it returns data that is saved in
the handle from the NBD protocol handshake."
+(* Closures. *)
+let chunk_closure = {
+ cbname = "chunk";
+ cbargs = [ CBBytesIn ("subbuf", "count");
+ CBUInt64 "offset"; CBUInt "status";
+ CBMutable (Int "error") ]
+}
+let completion_closure = {
+ cbname = "complet...
2019 Jul 24
2
Re: [PATCH libnbd 1/3] generator: Change Closure so it describes single callbacks.
On 7/24/19 7:17 AM, Richard W.M. Jones wrote:
> In preparation for closure lifetimes, split up the Closure so it no
> longer describes a list of closures, but a single callback.
>
> This changes the API because functions which take 2 or more closures
> now pass a separate user_data for each one.
> ---
> docs/libnbd.pod | 3 +-
> examples/strict-structured-reads.c | 2 +-
> generator/generator...
2019 Jul 24
0
[PATCH libnbd 2/3] lib: Implement closure lifetimes.
Previously closures had a crude flag which tells if they are
persistent or transient. Transient closures (flag = false) last for
the lifetime of the currently called libnbd function. Persistent
closures had an indefinite lifetime which could last for as long as
the handle. In language bindings handling persistent c...
2019 Jul 24
6
[PATCH libnbd 0/3] Implement closure lifetimes.
This implements most of what I wrote here:
https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html
2019 Jul 24
0
[PATCH libnbd 1/3] generator: Change Closure so it describes single callbacks.
In preparation for closure lifetimes, split up the Closure so it no
longer describes a list of closures, but a single callback.
This changes the API because functions which take 2 or more closures
now pass a separate user_data for each one.
---
docs/libnbd.pod | 3 +-
examples/strict-structured-reads.c | 2 +-
generator/generator | 760 ++++++++++++----------...
2008 Dec 28
3
[LLVMdev] Efficient implementation of closures?
A somewhat random question: I'm wondering if there's any kind of trick
in LLVM that would allow me to implement closures efficiently.
We can assume that a closure function has a hidden parameter which
points to its environment, that is, the values of the variables which
were in scope at the point where the closure function was defined.
The problem comes when mixing closure and non-closure functions, because
clos...
2019 Jul 16
1
Re: [PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
On 7/16/19 6:04 AM, Richard W.M. Jones wrote:
> A Closure is a list of (usually one, but can be more) closures. In C
> there is also a singe ‘void *user_data’ parameter which is passed by
> the caller into the function and through as the first parameter of
> each callback invocation.
>
> By grouping the previously separate Opaque and Callback* parameters
> together we can avoid the awkwa...
2019 Jul 25
0
[PATCH libnbd v3 1/2] lib: Implement closure lifetimes.
Previously closures had a crude flag which tells if they are
persistent or transient. Transient closures (flag = false) last for
the lifetime of the currently called libnbd function. Persistent
closures had an indefinite lifetime which could last for as long as
the handle. In language bindings handling persistent c...
2019 Jul 24
8
[PATCH libnbd v2 0/5] lib: Implement closure lifetimes.
v1 was here:
https://www.redhat.com/archives/libguestfs/2019-July/thread.html#00231
The changes address everything that Eric picked up in his review of
the first two patches. I have also added two more patches (4 and 5)
which respectively fix docs and change int status -> unsigned status,
as discussed.
Passes make, check, check-valgrind.
Rich.
2019 Jul 24
0
Re: [PATCH libnbd 1/3] generator: Change Closure so it describes single callbacks.
On Wed, Jul 24, 2019 at 10:02:04AM -0500, Eric Blake wrote:
> On 7/24/19 7:17 AM, Richard W.M. Jones wrote:
> > In preparation for closure lifetimes, split up the Closure so it no
> > longer describes a list of closures, but a single callback.
> >
> > This changes the API because functions which take 2 or more closures
> > now pass a separate user_data for each one.
> > ---
> > docs/libnbd.pod | 3 +-
> > examples/strict-structured-reads.c | 2 +-
>...
2019 Jul 24
0
[PATCH libnbd v2 2/5] lib: Implement closure lifetimes.
Previously closures had a crude flag which tells if they are
persistent or transient. Transient closures (flag = false) last for
the lifetime of the currently called libnbd function. Persistent
closures had an indefinite lifetime which could last for as long as
the handle. In language bindings handling persistent c...
2019 Aug 13
12
[PATCH 0/6] Implement OClosure.
Patches 1-4 are basically uncontroversial, straightforward refactoring
and IMHO we should just push them. Possibly 1-3 should be squashed
together, but I posted them separately so they are easier to review.
Patches 5 and 6 together implement OClosure. Patch 5 adds the feature
and is simple to understand.
Patch 6 changes the Closure completion callbacks into OClosure, but
because it doesn't
2019 Jul 24
2
Re: [PATCH libnbd 2/3] lib: Implement closure lifetimes.
On 7/24/19 7:17 AM, Richard W.M. Jones wrote:
> Previously closures had a crude flag which tells if they are
> persistent or transient. Transient closures (flag = false) last for
> the lifetime of the currently called libnbd function. Persistent
> closures had an indefinite lifetime which could last for as long as
> the handle. In language bindings h...
2013 Jun 30
2
[LLVMdev] Implementing closures and continuations
Hi all,
In getting to know the LLVM infrastructure, I'm having a hard time finding implementation details for closures and continuations.
For closures, I've read comments such as "using a struct" as an environment to hold references to free variables, linked lists to dictionaries for various scope levels, and even things like "it's just like virtual methods". I have a couple of questio...
2019 Jul 25
4
[PATCH libnbd v3 0/2] lib: Implement closure lifetimes.
I think I've addressed everything that was raised in review.
Some of the highlights:
- Callbacks should be freed reliably along all exit paths.
- There's a simple test of closure lifetimes.
- I've tried to use VALID|FREE in all the places where I'm confident
that it's safe and correct to do. There may be more places. Note
this is an optimization and shouldn't
2013 Jun 30
0
[LLVMdev] Implementing closures and continuations
On Sat, Jun 29, 2013 at 7:51 PM, David Farler <accumulator at icloud.com>wrote:
> Hi all,
>
> In getting to know the LLVM infrastructure, I'm having a hard time finding
> implementation details for closures and continuations.
>
> For closures, I've read comments such as "using a struct" as an
> environment to hold references to free variables, linked lists to
> dictionaries for various scope levels, and even things like "it's just like
> virtual methods". I h...
2012 Jan 19
2
What is a 'closure'?
The "R Language Definition" at http://cran.r-project.org/doc/manuals/R-lang.html states in the following section
4.3.2 Argument matching
This subsection applies to closures but not to primitive functions.
What are 'closures'?
[[alternative HTML version deleted]]
2004 Oct 26
0
[LLVMdev] Some question on LLVM design
...cts the target's C calling convention. But I'm trying to
> see if other types of languages can be implemented using LLVM.
Sure they can. :)
> > What is that you are looking to express that isn't captured by the
> > `call' instruction?
> >
>
> Tail calls, closures, continuations, lazy allocation... Basically I'm
> trying to see how am I going to implement high-level functions on LLVM.
As for tail calls, my plans are here:
http://nondot.org/sabre/LLVMNotes/GuaranteedEfficientTailCalls.txt
Note that LLVM already has a pretty aggressive tail-call elimin...
2013 Jan 26
2
[LLVMdev] Closures, newbie question
So I read the Kaleidoscope tutorial, big thanks to Chris Latter. Good pace, still excellent coverage.
Just at the end it mentions closures and I was wondering how those are done in llvm.
The link was to wikipedia, and i do know what closures/blocks/continuations are, (i think) but maybe someone could point me to where to read about how to do them in llvm.
Thanks
Torsten
2007 Sep 23
2
Plotting numbers at a specified decimal length on a plot()
...able (which obviously
should have limited scope). I already figured out how to plot the
means, but without limiting their precision to 2 decimal places. This
is the code I used once I had the scatterplot drawn:
text(c(1990, 1992, 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003), 25,
mean.yrly.closures$values, cex=.7)
It's a plot of school closures by Year. The closures variable is
labeled "values" in the "mean.yrly.closures" data set. I managed to
*display* the mean.yrly.closures data set with a precision of 2 decimal
places (options(digits=2)), but then once I plo...