927 * |
927 * |
928 * @return the method emitter |
928 * @return the method emitter |
929 */ |
929 */ |
930 public MethodEmitter loadCallee() { |
930 public MethodEmitter loadCallee() { |
931 debug("load callee " + functionNode.getCalleeNode().getSymbol()); |
931 debug("load callee " + functionNode.getCalleeNode().getSymbol()); |
932 assert functionNode.getCalleeNode().getSymbol().getSlot() != 0; |
932 assert functionNode.getCalleeNode().getSymbol().getSlot() != 0 : "callee has wrong slot " + functionNode.getCalleeNode().getSymbol().getSlot() + " in " + functionNode.getName(); |
933 |
933 |
934 return load(functionNode.getCalleeNode().getSymbol()); |
934 return load(functionNode.getCalleeNode().getSymbol()); |
935 } |
935 } |
936 |
936 |
937 /** |
937 /** |
990 * by the given symbol. If the symbol has no slot, this is a NOP |
990 * by the given symbol. If the symbol has no slot, this is a NOP |
991 * |
991 * |
992 * @param symbol symbol to store stack to |
992 * @param symbol symbol to store stack to |
993 */ |
993 */ |
994 public void store(final Symbol symbol) { |
994 public void store(final Symbol symbol) { |
995 assert symbol != null; |
995 assert symbol != null : "No symbol to store"; |
996 if (symbol.hasSlot()) { |
996 if (symbol.hasSlot()) { |
997 debug("store", symbol); |
997 debug("store", symbol); |
998 popType(symbol.getSymbolType()).store(method, symbol.getSlot()); |
998 popType(symbol.getSymbolType()).store(method, symbol.getSlot()); |
999 } |
999 } |
1000 } |
1000 } |
1556 if (labelStack == null) { |
1556 if (labelStack == null) { |
1557 assert stack != null; |
1557 assert stack != null; |
1558 label.setStack(stack.clone()); |
1558 label.setStack(stack.clone()); |
1559 return; |
1559 return; |
1560 } |
1560 } |
1561 assert stacksEquivalent(stack, labelStack); |
1561 assert stacksEquivalent(stack, labelStack) : "stacks " + stack + " is not equivalent with " + labelStack + " at join point"; |
1562 } |
1562 } |
1563 |
1563 |
1564 /** |
1564 /** |
1565 * Register a new label, enter it here. |
1565 * Register a new label, enter it here. |
1566 * |
1566 * |