Skip to content

Commit

Permalink
Fix style gate on GitHub Actions and use only single frameType profil…
Browse files Browse the repository at this point in the history
…e object (#219)
  • Loading branch information
smarr authored Oct 4, 2024
2 parents e155420 + ae3ece1 commit f9513bd
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 18 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ jobs:
- name: Download Eclipse
run: |
export ECLIPSE_TAR=eclipse.tar.gz
export ECLIPSE_URL=https://ftp.fau.de/eclipse/eclipse/downloads/drops4/R-4.30-202312010110/eclipse-SDK-4.30-linux-gtk-x86_64.tar.gz
export ECLIPSE_URL=https://archive.eclipse.org/eclipse/downloads/drops4/R-4.30-202312010110/eclipse-SDK-4.30-linux-gtk-x86_64.tar.gz
curl -L ${ECLIPSE_URL} -o ${ECLIPSE_TAR}
tar --warning=no-unknown-keyword -C ${GITHUB_WORKSPACE}/.. -xzf ${ECLIPSE_TAR}
- name: Install Black and PyLint
run: |
pip install black pylint==2.4
- name: Run Style Gate
run: |
export ECLIPSE_EXE=${GITHUB_WORKSPACE}/../eclipse/eclipse
Expand Down
30 changes: 17 additions & 13 deletions mx.trufflesom/mx_trufflesom.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,21 @@ def build_native_image_tool(args, **kwargs):
svm_path = get_svm_path()
mx.run_mx(["build"], svm_path)


BASE_DIR = suite.dir
TRUFFLE_DIR = BASE_DIR + '/../graal'
TRUFFLE_DIR = BASE_DIR + "/../graal"

MODULE_PATH_ENTRIES = [
BASE_DIR + '/mxbuild/dists/trufflesom.jar',
TRUFFLE_DIR + '/sdk/mxbuild/dists/graal-sdk.jar',
TRUFFLE_DIR + '/sdk/mxbuild/dists/collections.jar',
TRUFFLE_DIR + '/sdk/mxbuild/dists/polyglot.jar',
TRUFFLE_DIR + '/sdk/mxbuild/dists/word.jar',
TRUFFLE_DIR + '/sdk/mxbuild/dists/jniutils.jar',
TRUFFLE_DIR + '/truffle/mxbuild/dists/truffle-runtime.jar',
TRUFFLE_DIR + '/substratevm/mxbuild/dists/truffle-runtime-svm.jar',
TRUFFLE_DIR + '/truffle/mxbuild/dists/truffle-api.jar']
BASE_DIR + "/mxbuild/dists/trufflesom.jar",
TRUFFLE_DIR + "/sdk/mxbuild/dists/graal-sdk.jar",
TRUFFLE_DIR + "/sdk/mxbuild/dists/collections.jar",
TRUFFLE_DIR + "/sdk/mxbuild/dists/polyglot.jar",
TRUFFLE_DIR + "/sdk/mxbuild/dists/word.jar",
TRUFFLE_DIR + "/sdk/mxbuild/dists/jniutils.jar",
TRUFFLE_DIR + "/truffle/mxbuild/dists/truffle-runtime.jar",
TRUFFLE_DIR + "/substratevm/mxbuild/dists/truffle-runtime-svm.jar",
TRUFFLE_DIR + "/truffle/mxbuild/dists/truffle-api.jar",
]


@mx.command(
Expand Down Expand Up @@ -173,7 +175,8 @@ def build_native(args, **kwargs):
"--no-fallback",
"--link-at-build-time",
"-H:+ReportExceptionStackTraces",
"-H:+UnlockExperimentalVMOptions", "-H:-DeleteLocalSymbols",
"-H:+UnlockExperimentalVMOptions",
"-H:-DeleteLocalSymbols",
"-Dsom.interp=" + opt.type,
]

Expand All @@ -197,12 +200,13 @@ def build_native(args, **kwargs):
# -H:+EnforceMaxRuntimeCompileMethods

cmd += [
'--module-path', ':'.join(MODULE_PATH_ENTRIES),
"--module-path",
":".join(MODULE_PATH_ENTRIES),
"-o",
suite.dir + output_name,
]

if opt.use_g1 and opt.graalvm and os.uname().sysname != 'Darwin':
if opt.use_g1 and opt.graalvm and os.uname().sysname != "Darwin":
cmd += ["--gc=G1"]

cmd += ["trufflesom.Launcher"]
Expand Down
4 changes: 3 additions & 1 deletion mx.trufflesom/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@
},
},
"dependencies": ["trufflesom"],
"distDependencies": ["truffle:TRUFFLE_API"], # , "tools:TRUFFLE_COVERAGE", "tools:TRUFFLE_PROFILER"
"distDependencies": [
"truffle:TRUFFLE_API"
], # , "tools:TRUFFLE_COVERAGE", "tools:TRUFFLE_PROFILER"
},
"TRUFFLESOM_TEST": {
"description": "TruffleSOM JUnit Tests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

public abstract class ContextualNode extends NoPreEvalExprNode {

private static final ValueProfile frameType = ValueProfile.createClassProfile();
public static final ValueProfile frameType = ValueProfile.createClassProfile();

protected final int contextLevel;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package trufflesom.interpreter.nodes.bc;

import static trufflesom.interpreter.nodes.ContextualNode.frameType;
import static trufflesom.compiler.bc.BytecodeGenerator.emit1;
import static trufflesom.compiler.bc.BytecodeGenerator.emit3;
import static trufflesom.compiler.bc.BytecodeGenerator.emit3WithDummy;
Expand Down Expand Up @@ -147,8 +148,7 @@


public class BytecodeLoopNode extends NoPreEvalExprNode implements ScopeReference {
private static final ValueProfile frameType = ValueProfile.createClassProfile();
private static final LiteralNode dummyNode = new IntegerLiteralNode(0);
private static final LiteralNode dummyNode = new IntegerLiteralNode(0);

@CompilationFinal(dimensions = 1) private final byte[] bytecodesField;
@CompilationFinal(dimensions = 1) private final Object[] literalsAndConstantsField;
Expand Down

0 comments on commit f9513bd

Please sign in to comment.