Skip to content

Commit

Permalink
feat(#540): disable parallelism temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Oct 9, 2024
1 parent 0bef809 commit 3fca43e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/main/java/org/eolang/jeo/BachedTranslator.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public final class BachedTranslator implements Translator {

@Override
public Stream<Representation> apply(final Stream<? extends Representation> representations) {
return representations.parallel().map(this::translate);
return representations
// .parallel()
.map(this::translate);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ private int computeLocals() {


private int computeLocalsWithCFG() {
Logger.info(this, "Computing locals for %s", this.properties);
Map<Integer, Integer> variables = new HashMap<>(0);
int first = 0;
if (!this.properties.isStatic()) {
Expand Down Expand Up @@ -633,7 +634,10 @@ private int computeLocalsWithCFG(
max = Math.max(
max,
this.computeLocalsWithCFG(
new HashMap<>(variables), index1, new HashSet<>(visited))
new HashMap<>(variables),
index1,
new HashSet<>(visited)
)
);
}
}
Expand All @@ -644,7 +648,8 @@ private int computeLocalsWithCFG(
return variables.values().stream().mapToInt(Integer::intValue).sum();
} else {
visited.add(jump);
return this.computeLocalsWithCFG(new HashMap<>(variables), jump, visited);
return this.computeLocalsWithCFG(
new HashMap<>(variables), jump, new HashSet<>(visited));
}
}
if (var.isVarInstruction()) {
Expand Down

0 comments on commit 3fca43e

Please sign in to comment.