Skip to content
Snippets Groups Projects
Commit 828888b2 authored by stepan's avatar stepan
Browse files

Initialize RFFIVariables#R_Home lazily

parent 35e748da
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ import com.oracle.truffle.r.runtime.env.REnvironment; ...@@ -41,7 +41,7 @@ import com.oracle.truffle.r.runtime.env.REnvironment;
* Note: regenerate the C glue code upon any change in this enum, use {@link #main(String[])}. * Note: regenerate the C glue code upon any change in this enum, use {@link #main(String[])}.
*/ */
public enum RFFIVariables { public enum RFFIVariables {
R_Home(REnvVars.rHome()), R_Home("dummy string"),
R_TempDir("dummy string"), // Set later R_TempDir("dummy string"), // Set later
R_GlobalEnv(null), // Set later R_GlobalEnv(null), // Set later
R_BaseEnv(null), // Set later R_BaseEnv(null), // Set later
...@@ -120,6 +120,7 @@ public enum RFFIVariables { ...@@ -120,6 +120,7 @@ public enum RFFIVariables {
* Sets {@link #R_TempDir} for the initial context. * Sets {@link #R_TempDir} for the initial context.
*/ */
public static RFFIVariables[] initialize(RContext context) { public static RFFIVariables[] initialize(RContext context) {
R_Home.value = REnvVars.rHome();
R_TempDir.value = TempPathName.tempDirPath(); R_TempDir.value = TempPathName.tempDirPath();
R_GlobalEnv.value = RContext.getInstance().stateREnvironment.getGlobalEnv(); R_GlobalEnv.value = RContext.getInstance().stateREnvironment.getGlobalEnv();
R_BaseEnv.value = RContext.getInstance().stateREnvironment.getBaseEnv(); R_BaseEnv.value = RContext.getInstance().stateREnvironment.getBaseEnv();
......
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