Skip to content

Commit ac2d4f3

Browse files
committed
fix -O again
1 parent a41c8a7 commit ac2d4f3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

source/backends/uxn.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ class BackendUXN : CompilerBackend {
164164

165165
override void Init() {
166166
output ~= "|0 @vsp $2 @arraySrc $2 @arrayDest $2 @temp $2\n";
167+
168+
if (org != 0x100) {
169+
output ~= "|100\n";
170+
output ~= format("#%.4x JMP2\n", org);
171+
}
172+
167173
output ~= format("|%x\n", org);
168174
output ~= "@on-reset\n";
169175
output ~= " #ffff .vsp STZ2\n";

source/codeRemover.d

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ class CodeRemover {
117117
funcStack = funcStack[0 .. $ - 1];
118118
break;
119119
}
120+
case NodeType.Unsafe: {
121+
auto node = cast(UnsafeNode) inode;
122+
123+
FindFunctions(node.nodes);
124+
break;
125+
}
120126
default: break;
121127
}
122128
}

0 commit comments

Comments
 (0)