powered by
Performs one constant propagation pass. Carefully examine the results after running this function!
opt_constant_propagation(texts, in_fun_call = FALSE)
A list of character vectors with the code to optimize.
A logical indicating whether it should propagate in function calls. Note: this could change the semantics of the program.
# NOT RUN { code <- paste( "i <- 170", "x <- -170", "y <- x + 124", "z <- i - 124", sep = "\n" ) cat(opt_constant_propagation(list(code))$codes[[1]]) # }
Run the code above in your browser using DataLab