Skip to content
Snippets Groups Projects
Commit eb9efb54 authored by Florian Angerer's avatar Florian Angerer
Browse files

Cleanup

parent 964ccc1e
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,6 @@ import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.PRIMITIVE; ...@@ -28,7 +28,6 @@ import static com.oracle.truffle.r.runtime.builtins.RBuiltinKind.PRIMITIVE;
import com.oracle.truffle.api.dsl.Fallback; import com.oracle.truffle.api.dsl.Fallback;
import com.oracle.truffle.api.dsl.Specialization; import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.source.SourceSection; import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.r.nodes.builtin.RBuiltinNode; import com.oracle.truffle.r.nodes.builtin.RBuiltinNode;
...@@ -51,17 +50,16 @@ public abstract class FastRSourceInfo extends RBuiltinNode.Arg1 { ...@@ -51,17 +50,16 @@ public abstract class FastRSourceInfo extends RBuiltinNode.Arg1 {
} }
@Specialization @Specialization
public Object srcInfo(VirtualFrame frame, RFunction fun) { public Object srcInfo(RFunction fun) {
return execute(frame, fun.getRootNode()); return srcInfo(fun.getRootNode());
} }
@Specialization @Specialization
public Object srcInfo(VirtualFrame frame, RLanguage fun) { public Object srcInfo(RLanguage fun) {
return execute(frame, fun.getRep()); return srcInfo(fun.getRep());
} }
@Specialization private Object srcInfo(Node fun) {
protected Object srcInfo(Node fun) {
SourceSection ss = fun.getSourceSection(); SourceSection ss = fun.getSourceSection();
if (ss != null) { if (ss != null) {
String path = ss.getSource().getPath(); String path = ss.getSource().getPath();
......
...@@ -20,43 +20,6 @@ ...@@ -20,43 +20,6 @@
# questions. # questions.
eval(expression({ eval(expression({
makeLazyLoading <-
function(package, lib.loc = NULL, compress = TRUE,
keep.source = getOption("keep.source.pkgs"))
{
if(!is.logical(compress) && ! compress %in% c(2,3))
stop("invalid value for 'compress': should be FALSE, TRUE, 2 or 3")
options(warn = 1L)
findpack <- function(package, lib.loc) {
pkgpath <- find.package(package, lib.loc, quiet = TRUE)
if(!length(pkgpath))
stop(gettextf("there is no package called '%s'", package),
domain = NA)
pkgpath
}
if (package == "base")
stop("this cannot be used for package 'base'")
loaderFile <- file.path(R.home("share"), "R", "nspackloader.R")
pkgpath <- findpack(package, lib.loc)
codeFile <- file.path(pkgpath, "R", package)
if (!file.exists(codeFile)) {
warning("package contains no R code")
return(invisible())
}
if (file.size(codeFile) == file.size(loaderFile))
warning("package seems to be using lazy loading already")
else {
code2LazyLoadDB(package, lib.loc = lib.loc,
keep.source = keep.source, compress = compress)
file.copy(loaderFile, codeFile, TRUE)
}
invisible()
}
.install_package_code_files <- .install_package_code_files <-
function(dir, outDir) function(dir, outDir)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment