|
|
@ -1,9 +1,7 @@
|
|
|
|
package chocopy.pa3;
|
|
|
|
package chocopy.pa3;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.Stack;
|
|
|
|
import java.util.Stack;
|
|
|
|
|
|
|
|
|
|
|
|
import chocopy.common.analysis.*;
|
|
|
|
import chocopy.common.analysis.*;
|
|
|
@ -220,20 +218,10 @@ public class CodeGenImpl extends CodeGenBase
|
|
|
|
registerAvilMap[handle] = true;
|
|
|
|
registerAvilMap[handle] = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private int getParamLocationOffset(int index, int paramSize)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return (paramSize - index - 1) * wordSize;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int getLocalVarLocationOffset(int index, int paramSize) {
|
|
|
|
private int getLocalVarLocationOffset(int index, int paramSize) {
|
|
|
|
return - (index - paramSize + 1) * wordSize;
|
|
|
|
return - (index - paramSize + 1) * wordSize;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private int getStaticLinkOffset(int paramSize)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return paramSize * wordSize;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An analyzer for the function described by FUNCINFO0, which is null for the
|
|
|
|
* An analyzer for the function described by FUNCINFO0, which is null for the
|
|
|
|
* top level.
|
|
|
|
* top level.
|
|
|
|