1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-11 12:23:45 +00:00

Restructured code in new packages

This commit is contained in:
Jesper Gravgaard 2017-07-18 18:12:11 +02:00
parent 92747454c7
commit 1b0b81baf2
3 changed files with 6 additions and 7 deletions

View File

@ -12,7 +12,7 @@ public class CompileLog {
public void append(String msg) { public void append(String msg) {
log.append(msg); log.append(msg);
log.append("\n"); log.append("\n");
System.out.printf(msg+"\n"); //System.out.printf(msg+"\n");
} }
public StringBuilder getLog() { public StringBuilder getLog() {

View File

@ -70,12 +70,13 @@ public class Pass3RegisterAllocation {
//allocation.allocate(symbols.getVariable("a#0"), new RegisterAllocation.RegisterAByte()); //allocation.allocate(symbols.getVariable("a#0"), new RegisterAllocation.RegisterAByte());
// Register allocation for fibmem.kc // Register allocation for fibmem.kc
/*
allocation.allocate(symbols.getVariable("i#1"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("i#1"), RegisterAllocation.getRegisterX());
allocation.allocate(symbols.getVariable("i#2"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("i#2"), RegisterAllocation.getRegisterX());
allocation.allocate(symbols.getVariable("$1"), new RegisterAllocation.RegisterAByte()); allocation.allocate(symbols.getVariable("$1"), new RegisterAllocation.RegisterAByte());
allocation.allocate(symbols.getVariable("$3"), new RegisterAllocation.RegisterALUByte()); allocation.allocate(symbols.getVariable("$3"), new RegisterAllocation.RegisterALUByte());
//allocation.allocate(symbols.getVariable("$4"), new RegisterAllocation.RegisterAByte()); //allocation.allocate(symbols.getVariable("$4"), new RegisterAllocation.RegisterAByte());
*/
// Registers for postinc.kc // Registers for postinc.kc
/* /*
@ -96,7 +97,6 @@ public class Pass3RegisterAllocation {
*/ */
// Optimal Registers for flipper-rex2.kc // Optimal Registers for flipper-rex2.kc
/*
allocation.allocate(symbols.getVariable("plot::i#0"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("plot::i#0"), RegisterAllocation.getRegisterX());
allocation.allocate(symbols.getVariable("plot::i#1"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("plot::i#1"), RegisterAllocation.getRegisterX());
allocation.allocate(symbols.getVariable("plot::i#2"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("plot::i#2"), RegisterAllocation.getRegisterX());
@ -152,7 +152,6 @@ public class Pass3RegisterAllocation {
allocation.allocate(symbols.getVariable("main::c#2"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("main::c#2"), RegisterAllocation.getRegisterX());
allocation.allocate(symbols.getVariable("main::c#3"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("main::c#3"), RegisterAllocation.getRegisterX());
allocation.allocate(symbols.getVariable("main::c#4"), RegisterAllocation.getRegisterX()); allocation.allocate(symbols.getVariable("main::c#4"), RegisterAllocation.getRegisterX());
*/
symbols.setAllocation(allocation); symbols.setAllocation(allocation);

View File

@ -30,9 +30,9 @@ public class TestCompilationOutput {
public static void main(String[] args) throws IOException, URISyntaxException { public static void main(String[] args) throws IOException, URISyntaxException {
TestCompilationOutput tester = new TestCompilationOutput(); TestCompilationOutput tester = new TestCompilationOutput();
tester.testFile("fibmem"); //tester.testFile("fibmem");
//tester.testFile("flipper-rex2"); tester.testFile("flipper-rex2");
//tester.testFile("bresenham"); tester.testFile("bresenham");
//tester.testFile("unused"); //tester.testFile("unused");
} }