Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaced the System.getenv,System.getProperty functions with FuzionOp… #3569

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/dev/flang/ast/Loop.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import dev.flang.util.ANY;
import dev.flang.util.FuzionConstants;
import dev.flang.util.FuzionOptions;
import dev.flang.util.List;
import dev.flang.util.Pair;
import dev.flang.util.SourcePosition;
Expand Down Expand Up @@ -152,7 +153,7 @@ public class Loop extends ANY
/**
* env var to enable debug output for code generated for loops:
*/
static private final boolean FUZION_DEBUG_LOOPS = "true".equals(System.getenv("FUZION_DEBUG_LOOPS"));
static private final boolean FUZION_DEBUG_LOOPS = FuzionOptions.boolPropertyOrEnv("FUZION_DEBUG_LOOPS");


/*---------------------------- constants ----------------------------*/
Expand Down
3 changes: 2 additions & 1 deletion src/dev/flang/be/jvm/CodeGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import dev.flang.be.jvm.classfile.ClassFileConstants;

import dev.flang.util.Errors;
import dev.flang.util.FuzionOptions;
import dev.flang.util.List;
import dev.flang.util.Pair;

Expand Down Expand Up @@ -64,7 +65,7 @@ class CodeGen
/**
* env var to enable debug output for tail call optimization:
*/
static private final boolean FUZION_DEBUG_TAIL_CALL = "true".equals(System.getenv("FUZION_DEBUG_TAIL_CALL"));
static private final boolean FUZION_DEBUG_TAIL_CALL = FuzionOptions.boolPropertyOrEnv("FUZION_DEBUG_TAIL_CALL");



Expand Down
4 changes: 3 additions & 1 deletion src/dev/flang/fe/LibraryModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
import dev.flang.mir.MIR;

import dev.flang.util.FuzionConstants;
import dev.flang.util.FuzionOptions;

import static dev.flang.util.FuzionConstants.MirExprKind;
import dev.flang.util.HexDump;
import dev.flang.util.List;
Expand Down Expand Up @@ -81,7 +83,7 @@ public class LibraryModule extends Module
* NYI: Instead of using env var, create a new tool "fzdump" or similar to
* dump intermediate files.
*/
static final boolean DUMP = "true".equals(System.getenv("FUZION_DUMP_MODULE_FILE"));
static final boolean DUMP = FuzionOptions.boolPropertyOrEnv("FUZION_DUMP_MODULE_FILE");


/**
Expand Down