search for: hasarg

Displaying 20 results from an estimated 29 matches for "hasarg".

Did you mean: has_arg
2004 Jun 28
2
Problem with hasArg and the ... argument (PR#7027)
Full_Name: Jelle Goeman Version: 1.9.0 OS: mingw32, windows 2000 Submission from: (NULL) (145.88.209.33) Hi Everyone, I get very strange results using the function hasArg with the ... function argument. In my own function: > gt <- globaltest(X,Y) > sampling(gt) works fine, but > sampling(globaltest(X,Y)) results in: Error in eval(expr, envir, enclos) : "missing" illegal use of missing I've tracked down the problem. Define the simple...
2004 Jan 23
1
Problem with hasArg() using R-files
Please do give reproducible example. The code you gave, which you claimed `works correctly' doesn't: > SDT.Optim <- function(crit = NULL, Hess = F) + { + q <- length(par); x <- data + if(hasArg(crit)) + cat("\n Crit present\n") + else + cat("\n Crit not present\n") + } > > Gauss.Obj <- SDT.Optim(Par0, Freq, crit, T) Error in SDT.Optim(Par0, Freq, crit, T) : unused argument(...
2012 Jul 02
1
Dependency problem for "hasArg"
...an R script which first line is: #!/usr/bin/Rscript While running that script from the system console (in Red Hat Enterprise Linux 6) I got the following error: Error in plot2(x = sim, y = obs, plot.type = "single", main = paste("Daily", : could not find function "hasArg" Calls: plot_results -> plot_out -> ggof -> plot2 However, if I call EXACTLY the same script from the R console, by using > source("myRscript.R") I do not get any error. As you can see in the error message, the function 'plot_results' calls 'plot_out...
2015 Jul 22
2
[LLVMdev] (no subject)
Hello, I have tried a lot fix this error but am not able to can you please find me a solution am trying to compile the SAFECode in Cygwin Environment to work for windows. used make -j4 command to make the files in cygwin i have got this error make[5]: Leaving directory '/home/uidr7475/Work/LLVM_OBJ/projects/safecode/tools/clang/include' /usr/bin/cp: cannot stat
2011 Oct 07
1
modify "..." (optional args)
...he optional arguments (...) passed to a function, so that these can be passed in modified form to a subsequent function call? I checked "Programming with Data" but could not find a solution there. What I'd like is something along these lines: test <- function(x,y,...) { if(!hasArg(xlab)) { ___add xlab to ...___ } if(hasArg(xlab)) { ___remove xlab from ...___ } # alternative plot(x,y,...) } Of course, I could use separate calls, like if(hasArg(xlab)) plot(x,y,...) else plot(x,y,xlab="label",...) but this gets complicated if there is more than one such cas...
2008 Aug 22
0
R CMD check warning "no visible binding for global variable" and hasArg()
...warnings and instead helped me to detect some missing bindings for global variables --- thank you Kurt for this! In some occasions the warning "no visible binding for global variable XY" seems overly fuzzy to me, however: R CMD check also issues this warning, if, by means of function hasArg() from package 'methods', I want to test the presence of a certain argument 'x' in a function call when 'x' is not a formal argument but "..." is. Clearly, then 'x' in general will have no binding. I am not sure whether this is of general interest, but I t...
2003 Sep 16
7
Retrieve ... argument values
Dear R users, I want to retrieve "..." argument values within a function. Here is a small exmaple: myfunc <- function(x, ...) { if (hasArg(ylim)) a <- ylim plot(x, ...) } x <- rnorm(100) myfunc(x, ylim=c(-0.5, 0.5)) Error in myfunc(x, ylim = c(-0.5, 0.5)) : Object "ylim" not found > I need to retrieve values of "ylim" (if it is defined when function is called) for later use in the function. Can an...
2005 Aug 18
1
problem with repeated formal arguments and ...
I want to add an argument if it is not present. Following the Green Book, p. 337: test <- function(x, ...){ dots <- list(...) if (!hasArg(from)) from <- 0 else from <- dots$from curve(x, from=from, ...) } > test(sin) > test(sin, from=4) Error in curve(x, from = from, ...) : formal argument "from" matched by multiple actual arguments The FAQ says, in the section on differences between R and S, &quot...
2017 Aug 31
2
LLD: patch to fix libCOFF calling exit() on success in a library function
...g/zig/commit/41da9fdb69065082f57c604b12eb02ca166cb18d diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 854c3e69098..8b17f039870 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -1030,7 +1030,7 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { if (!Args.hasArgNoClaim(OPT_INPUT)) { fixupExports(); createImportLibrary(/*AsLib=*/true); - exit(0); + return; } // Handle /delayload @@ -1122,7 +1122,7 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { // This is useful because MSVC link.exe can generate complete PDBs....
2017 Aug 31
2
LLD: patch to fix libCOFF calling exit() on success in a library function
...; diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp >> index 854c3e69098..8b17f039870 100644 >> --- a/lld/COFF/Driver.cpp >> +++ b/lld/COFF/Driver.cpp >> @@ -1030,7 +1030,7 @@ void LinkerDriver::link(ArrayRef<const char *> >> ArgsArr) { >> if (!Args.hasArgNoClaim(OPT_INPUT)) { >> fixupExports(); >> createImportLibrary(/*AsLib=*/true); >> - exit(0); >> + return; >> } >> >> // Handle /delayload >> @@ -1122,7 +1122,7 @@ void LinkerDriver::link(ArrayRef<const char *> >> Arg...
2017 Jul 31
3
[RFC] Profile guided section layout
Hi Rafael, On 07/31/2017 04:20 PM, Rafael Avila de Espindola via llvm-dev wrote: > However, do we need to start with instrumentation? The original paper > uses sampling with good results and current intel cpus can record every > branch in a program. > > I would propose starting with just an lld patch that reads the call > graph from a file. The format would be very similar to
2013 Oct 01
3
[LLVMdev] RFH: passing options from clang down to opt
...--- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -3594,6 +3594,11 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, D.Diag(diag::err_drv_argument_not_allowed_with) << "-fomit-frame-pointer" << A->getAsString(Args); + if (Args.hasArg(options::OPT_fauto_profile)) { + CmdArgs.push_back("-auto-profile"); + } + // Claim some arguments which clang supports automatically. // -fpch-preprocess is used with gcc to add a special marker in the output to
2015 Jun 05
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 5:33 PM, Reid Kleckner <rnk at google.com> wrote: > On Thu, Jun 4, 2015 at 5:17 PM, Teresa Johnson <tejohnson at google.com> wrote: >> >> Agreed. Although I assume you mean invoke the new pass under a >> ThinLTO-only option so that avail extern are not dropped in the >> compile pass before the LTO link? > > > No, this pass
2013 Jul 28
0
[LLVMdev] IR Passes and TargetTransformInfo: Straw Man
...// Dependency Output Options Index: lib/Frontend/CompilerInvocation.cpp =================================================================== --- lib/Frontend/CompilerInvocation.cpp (revision 187135) +++ lib/Frontend/CompilerInvocation.cpp (working copy) @@ -402,6 +402,7 @@ Opts.VectorizeBB = Args.hasArg(OPT_vectorize_slp_aggressive); Opts.VectorizeLoop = Args.hasArg(OPT_vectorize_loops); Opts.VectorizeSLP = Args.hasArg(OPT_vectorize_slp); + Opts.IsPreIPO = Args.hasArg(OPT_preipo); Opts.MainFileName = Args.getLastArgValue(OPT_main_file_name); Opts.VerifyModule = !Args.hasArg(OPT_disa...
2015 Jun 04
5
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 3:58 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > > Personally, I think the right approach is to add a bool to > createGlobalDCEPass defaulting to true named something like > IsAfterInlining. In most standard pass pipelines, GlobalDCE runs after > inlining for obvious reasons, so the default makes sense. The special case > is
2013 Jul 18
3
[LLVMdev] IR Passes and TargetTransformInfo: Straw Man
Andy and I briefly discussed this the other day, we have not yet got chance to list a detailed pass order for the pre- and post- IPO scalar optimizations. This is wish-list in our mind: pre-IPO: based on the ordering he propose, get rid of the inlining (or just inline tiny func), get rid of all loop xforms... post-IPO: get rid of inlining, or maybe we still need it, only
2015 Jun 08
2
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
...ocation.cpp =================================================================== --- lib/Frontend/CompilerInvocation.cpp (revision 237590) +++ lib/Frontend/CompilerInvocation.cpp (working copy) @@ -489,6 +489,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, Opts.MergeFunctions = Args.hasArg(OPT_fmerge_functions); + Opts.LTO = Args.hasArg(OPT_flto); + Opts.MSVolatile = Args.hasArg(OPT_fms_volatile); Opts.VectorizeBB = Args.hasArg(OPT_vectorize_slp_aggressive); Index: test/CodeGen/available-externally-suppress.c ================================================================...
2013 Oct 01
0
[LLVMdev] RFH: passing options from clang down to opt
...+ b/lib/Driver/Tools.cpp > @@ -3594,6 +3594,11 @@ void Clang::ConstructJob(Compilation &C, const > JobAction &JA, > D.Diag(diag::err_drv_argument_not_allowed_with) > << "-fomit-frame-pointer" << A->getAsString(Args); > > + if (Args.hasArg(options::OPT_fauto_profile)) { > + CmdArgs.push_back("-auto-profile"); > + } > + > // Claim some arguments which clang supports automatically. > > // -fpch-preprocess is used with gcc to add a special marker in the output to > _______________________________...
2015 Jun 12
2
[LLVMdev] Self compiling latest clang from SVN
Makes sense, yeah, trying something in a different environment is usually a good way to find problems. I had indeed moved the renamed clang-cl.exe to a different directory, but when I move it back into its home directory and retry the build, I get the same errors. On Thu, Jun 11, 2015 at 11:16 PM, Reid Kleckner <rnk at google.com> wrote: > Thanks for trying the self-host, it's
2016 Apr 12
2
Availability of "-export_dynamic" when compiling with support for older OS X releases
Looking at tools/clang/lib/Driver/Tools.cpp , there's this fragment of code: if (Args.hasArg(options::OPT_rdynamic) && Version[0] >= 137) CmdArgs.push_back("-export_dynamic"); I built LLVM 3.4.2 from a OS X 10.11 "El Capitan" but specifying a fat build (386+x86_64) and requesting support back up to 10.6. It went fine, and the build passes all tests when...