search for: arglist

Displaying 20 results from an estimated 154 matches for "arglist".

2017 Jun 27
0
Seg Fault memory violation
...ache=useCache at entry=TRUE) at eval.c:5873 #1 0x00007ffff78d4138 in Rf_eval (e=0x857990, rho=rho at entry=0x17f3d798) at eval.c:624 #2 0x00007ffff78d61af in R_execClosure (call=call at entry=0x6079c0, newrho=<optimized out>, sysparent=<optimized out>, rho=rho at entry=0x17f3d450, arglist=arglist at entry=0x0, op=op at entry=0x857a70) at eval.c:1614 #3 0x00007ffff78d6539 in Rf_applyClosure (call=call at entry=0x3ae5cb0, op=op at entry=0x857a70, arglist=<optimized out>, rho=rho at entry=0x17f3d450, suppliedvars=<optimized out>) at eval.c:1549 #4 0x00007ffff78cd101 i...
2008 Feb 16
3
[LLVMdev] linux/x86-64 codegen support
See the bug for a reduction and the gimple trees. validate_arglist definately is rejecting the arglist in EmitBuiltinAlloca. (try: bool TreeToLLVM::EmitBuiltinAlloca(tree exp, Value *&Result) { tree arglist = TREE_OPERAND(exp, 1); if (!validate_arglist(arglist, INTEGER_TYPE, VOID_TYPE)) { debug_tree(arglist); return false; } Value *Amt = Emit(...
2019 Jan 25
0
[klibc:update-dash] builtin: Fix handling of trailing IFS white spaces
...1..9079b74b 100644 --- a/usr/dash/expand.c +++ b/usr/dash/expand.c @@ -50,6 +50,7 @@ #include <glob.h> #endif #include <ctype.h> +#include <stdbool.h> /* * Routines to expand arguments to commands. We have to deal with @@ -203,7 +204,7 @@ expandarg(union node *arg, struct arglist *arglist, int flag) * TODO - EXP_REDIR */ if (flag & EXP_FULL) { - ifsbreakup(p, &exparg); + ifsbreakup(p, -1, &exparg); *exparg.lastp = NULL; exparg.lastp = &exparg.list; expandmeta(exparg.list, flag); @@ -1016,15 +1017,18 @@ recordregion(int start, int end, int...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Fix handling of trailing IFS white spaces
...1..9079b74b 100644 --- a/usr/dash/expand.c +++ b/usr/dash/expand.c @@ -50,6 +50,7 @@ #include <glob.h> #endif #include <ctype.h> +#include <stdbool.h> /* * Routines to expand arguments to commands. We have to deal with @@ -203,7 +204,7 @@ expandarg(union node *arg, struct arglist *arglist, int flag) * TODO - EXP_REDIR */ if (flag & EXP_FULL) { - ifsbreakup(p, &exparg); + ifsbreakup(p, -1, &exparg); *exparg.lastp = NULL; exparg.lastp = &exparg.list; expandmeta(exparg.list, flag); @@ -1016,15 +1017,18 @@ recordregion(int start, int end, int...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...tr, - builtin: bltincmd + .name = nullstr, + .builtin = bltincmd, + .flags = BUILTIN_REGULAR, }; @@ -648,22 +649,42 @@ out: result->fd, result->buf, result->nleft, result->jp)); } -static char ** -parse_command_args(char **argv, const char **path) +static struct strlist *fill_arglist(struct arglist *arglist, + union node **argpp) { + struct strlist **lastp = arglist->lastp; + union node *argp; + + while ((argp = *argpp)) { + expandarg(argp, arglist, EXP_FULL | EXP_TILDE); + *argpp = argp->narg.next; + if (*lastp) + break; + } + + return *lastp; +} + +static i...
2018 Aug 09
2
ArgList flag values
I've come across a need to know whether an option was set true, false or unspecified. If it is true I want to do one thing, if it is false I want to do something else and if it is unspecified I want to do nothing. ArgList::hasFlag is a convenient way to check true/false with a default value. An ArgList::hasFlag that returned Optional<bool> would allow checking the unspecified case. Returning some kind Tribool class object would allow the same. Both Optional<bool> and Tribool are somewhat overkill for...
2020 Mar 28
0
[klibc:update-dash] dash: eval: avoid leaking memory associated with redirections
...status = 0; + + setstackmark(&smark); + if (n == NULL) { TRACE(("evaltree(NULL) called\n")); goto out; @@ -317,6 +321,8 @@ exexit: exraise(EXEXIT); } + popstackmark(&smark); + return exitstatus; } @@ -396,14 +402,12 @@ evalfor(union node *n, int flags) struct arglist arglist; union node *argp; struct strlist *sp; - struct stackmark smark; int status; errlinno = lineno = n->nfor.linno; if (funcline) lineno -= funcline - 1; - setstackmark(&smark); arglist.lastp = &arglist.list; for (argp = n->nfor.args ; argp ; argp = argp->n...
2008 Feb 16
0
[LLVMdev] linux/x86-64 codegen support
Andrew Lenharth wrote: > Interestingly, in the .i file there are 2 __builtin_alloca, and > EmitBuiltinAlloca is only being called once. > > Hmm, here EmitBuiltinAlloca gets called twice, but it looks like validate_arglist is rejecting the args both times. I have 2 calls to alloca generated: $ grep alloca x.bc|grep call %tmp21 = call i8* @alloca( i64 %tmp20 ) nounwind ; <i8*> [#uses=1] %tmp3 = call i8* @alloca( i64 %tmp2 ) nounwind ; <i8*> [#uses=1] I added some p...
2008 Feb 16
2
[LLVMdev] linux/x86-64 codegen support
Interestingly, in the .i file there are 2 __builtin_alloca, and EmitBuiltinAlloca is only being called once. Andrew On 2/16/08, Andrew Lenharth <andrewl at lenharth.org> wrote: > libcpp/charset.c:631 turns into: > > %tmp16 = tail call i64 @strlen( i8* %to ) nounwind readonly > ; <i64> [#uses=1] > %tmp18 = tail call i64 @strlen( i8* %from ) nounwind
2010 Oct 05
2
How to convert a list to a ... argument for a function
...I have a function f <- function(..., func){ something }, where func is a function of the form function(...). ?I would like to pass func all the arguments passed to f except the last. ?I know that I can manipulate the variable number of arguments passed to f by converting ... to a list, i.e., arglist <- list(...). ?But how do I pass func the first n-1 list items of arglist (n <- length(arglist)), as n-1 arguments, not as one list of n-1 items? Regards, Richard Richard R. Liu richard.liu at pueo-owl.ch
2005 Feb 22
1
Error when using do.call
...s a reproduction of the problem: #*************************************************************************** ************************* A <- data.frame(X = sample(c("A","B"),size=10,replace=T), Y = sample(c(T,F),size = 10, replace = T), Z = sample(1:10,size=10,replace=T)); arglist <- list(); ind <- 3:1 for(i in 1:3) { arglist[[i]] <- as.name(paste("A[,",ind[i],"]",sep="")); } do.call(what="order",args=arglist) #*************************************************************************** ************************* I get the fo...
2004 Nov 29
1
Call to trellis.focus(); thenpanel.superpose()
...first of which still has the red border from having the focus, while the second is the plot that I want. library(lattice); library(grid) plt <- xyplot(uptake ~ conc, groups=Plant, data=CO2) print(plt) trellis.focus("panel", row=1, column=1) arglist=trellis.panelArgs() arglist$type <- "l" do.call("panel.superpose", args=arglist) trellis.unfocus() Should I be able to use panel.superpose() in this way? The new abilities provided by trellis.focus() etc add greatly to the flexibility of what can...
2016 Sep 12
3
RFC: FileCheck Enhancements
Hi, I have question again about modifiers for pattern parameters. Vedant suggested such way. > CHECK-DEFINE-PATTERN: one_or_more(x): x {{+}} But I have some doubts. This should be equal to x+. This approach differs from standard one. In FileCheck I can write CHECK: {{x|y}}{{something}} This line will be equal to regex (x|y)(something). But if I use suggested approach and write same
2004 Dec 17
6
take precisely one named argument
Hi I want a function that takes precisely one named argument and no unnamed arguments. The named argument must be one of "a" or "b". If "a" is supplied, return "a". If "b" is supplied, return 2*b. That is, the desired behaviour is: R> f(a=4) #return 4 R> f(b=33) #return 66 R> f(5) #error R> f(a=3,b=5) #error R>
2012 May 24
1
use list as function arguments
...et of specified arguments. I'm trying to figure out how to pass in a list of argument lists, then loop through the top-level list, passing in the lower-level list as function arguments. pseudocode: b = list( list( arg1 = 1, arg2 = 2 ), list( arg1 = 3, arg2 = 4 ) ) a <- apply_function(arglist) { for (i in length(arglist)) { b(arglist[i]) } } Specifically, the actual use I'm trying to implement is a function to format columns of data frames and matrices independently. What I have so far is below, but it's not working. Perhaps I'm going about this the wrong way? form...
2019 Jan 25
0
[klibc:update-dash] eval: Return status in eval functions
...lags); - status = exitstatus; + status = evaltree(n->nbinary.ch2, flags); skip = skiploop(); } while (!(skip & ~SKIPCONT)); - if (skip != SKIPFUNC) - exitstatus = status; loopnest--; + + return status; } -STATIC void +STATIC int evalfor(union node *n, int flags) { struct arglist arglist; union node *argp; struct strlist *sp; struct stackmark smark; + int status; errlinno = lineno = n->nfor.linno; if (funcline) @@ -414,28 +409,31 @@ evalfor(union node *n, int flags) } *arglist.lastp = NULL; - exitstatus = 0; + status = 0; loopnest++; flags &= EV...
2012 Oct 04
2
How to build a list with missing values? What is missing, anyway?
...names. What I need is a list with names and quoted values, but the values are "empty". Say I have argnames <- c("a", "b", "c"). >From that I want to construct the equivalent of alist(a=, b=, c=). "missing" seems different from NULL; if I do arglist <- rep(list(NULL), length(argnames)) names(arglist) <- argnames make_function(arglist, quote(a+b+c)) I get a function where NULL is the default value for each argument, rather than a function with no default values. It seems I can assign a "missing value" to a variable by the_mis...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Return status in eval functions
...lags); - status = exitstatus; + status = evaltree(n->nbinary.ch2, flags); skip = skiploop(); } while (!(skip & ~SKIPCONT)); - if (skip != SKIPFUNC) - exitstatus = status; loopnest--; + + return status; } -STATIC void +STATIC int evalfor(union node *n, int flags) { struct arglist arglist; union node *argp; struct strlist *sp; struct stackmark smark; + int status; errlinno = lineno = n->nfor.linno; if (funcline) @@ -414,28 +409,31 @@ evalfor(union node *n, int flags) } *arglist.lastp = NULL; - exitstatus = 0; + status = 0; loopnest++; flags &= EV...
2013 Jan 24
3
[LLVMdev] [lld] driver and options questions
...hought of LinkerOptions as the options needed by the core-linking phase (resolver), and the WriterOptions were flavor specific. Here is how I see it currently works: 1) The flavor determines the driver class instantiated. 2) The driver transforms flavor specific options into a "core" ArgList; 3) LinkerOptions constructor requires a core ArgList and sets ivars base on the ArgList. 4) The LinkerInvocation object is constructed from LinkerOptions object. 5) The LinkerInvocation object instantiates a Target object from the LinkerOptions which also creates a TargetInfo object and passes own...
2014 Dec 13
2
[LLVMdev] Correct way to access Function ArgumentList?
...ey All, I’m working with Mac OS X 10.10, and everything seems generally fine but when I started working on a FunctionPass I get the following: error: call to deleted constructor of 'Function::ArgumentListType' (aka 'iplist<llvm::Argument>') Function::ArgumentListType argList = f.getArgumentList(); Any pointers as to the correct way access the Arguments of a Function object? From what I saw on the docs it seems like this ought to work... Thanks, Jared -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/piperma...