Skip to content

Commit

Permalink
Additional optimization and tests updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Flux Flu committed Jan 1, 2024
1 parent 13d1954 commit 59f65ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/optimization/simulation/simulation_utils.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const { logCompilerError } = require("../../error/compiler_error");
const { CREATE_STATE } = require("../../preparation/utils/instructions");
// const { END_LOOP, RIGHT } = require("../../preparation/utils/instructions");
const { END_LOOP, RIGHT } = require("../../preparation/utils/instructions");

const UNKNOWN = Symbol("UNKNOWN");

function createState(result, tape, positionCompromised, ptr) {
// if (result.at(-1)?.instr == END_LOOP && tape.filter(e => typeof e == "number").length == 1 && tape[0] == 0 && positionCompromised) {
// result.push({ instr: RIGHT, value: ptr });
// return;
// }
if (result.at(-1)?.instr == END_LOOP && tape.filter(e => typeof e == "number").length == 1 && tape[0] == 0 && positionCompromised) {
result.push({ instr: RIGHT, value: ptr });
return;
}
if (ptr === UNKNOWN) {
logCompilerError("generic", "POINTER UNKNOWN.");
console.trace();
Expand Down
Loading

0 comments on commit 59f65ca

Please sign in to comment.