opt_dead_code: Optimizer: Dead Code Elimination.

View source: R/opt-dead-code.R

opt_dead_codeR Documentation

Optimizer: Dead Code Elimination.

Description

Performs one dead code elimination pass. Carefully examine the results after running this function!

Usage

opt_dead_code(texts)

Arguments

texts

A list of character vectors with the code to optimize.

Examples

code <- paste(
  "while (TRUE) {",
  "  break",
  "  dead_code()",
  "}",
  sep = "\n"
)
cat(opt_dead_code(list(code))$codes[[1]])

jcrodriguez1989/rco documentation built on Nov. 12, 2024, 12:23 p.m.