Skip to content

Commit

Permalink
Additional removal of old wrapper function and rTrace environment fun…
Browse files Browse the repository at this point in the history
…ction
  • Loading branch information
DylanKierans committed Mar 4, 2024
1 parent 4ee1840 commit 40aaada
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
19 changes: 2 additions & 17 deletions R/r_instrument_ll.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
get_wrapper_expression <- function() {
wrapper_expression <- expression(
{

if (pkg.env$INSTRUMENTATION_ENABLED) {
NULL
## Append to depth counter
Expand All @@ -29,22 +30,6 @@ get_wrapper_expression <- function() {
}
)

## Version 9 - only otf2, no max depth
#if (VERSION_9) {
#.wrapper_expression <- eval( substitute(
#expression(
#{
# if (pkg.env$INSTRUMENTATION_ENABLED) {
# ## OTF2 Event
# evtWriter_Write(X_regionRef_X,T)
# on.exit(evtWriter_Write(X_regionRef_X,F), add=TRUE)
# }
#}
#)
# , list(X_regionRef_X=regionRef)
#) )
#}

wrapper_expression
}

Expand All @@ -64,7 +49,7 @@ get_wrapper_expression <- function() {
#' @export
insert_instrumentation <- function(func, func_name, func_index, regionRef, package_name, flag_user_function=FALSE, env_is_locked=TRUE) {

.wrapper_expression= eval(substitute(get_wrapper_expression(),
.wrapper_expression = eval(substitute(get_wrapper_expression(),
list(X_regionRef_X=regionRef)))

## Copy and wrap function definition
Expand Down
8 changes: 0 additions & 8 deletions R/r_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,3 @@ rTrace_time <- function() {
Sys.time()
}

#' get_env
#' @description Get environment object for this package rTrace
#' @return Environment
get_env <- function() {
as.environment("package:rTrace")
}


0 comments on commit 40aaada

Please sign in to comment.