public void push(boolean value) { push(value ? 1 : 0); }
public void processDefault() { e.push(-1); e.return_value(); } }
public void processDefault() { e.push(-1); e.return_value(); } });
public void processCase(Object key, Label end) { e.push(ints[stringList.indexOf(key)]); e.return_value(); } public void processDefault() {
public void processCase(Object key, Label end) { // TODO: remove linear indexOf e.push(signatures.indexOf(key)); e.return_value(); } public void processDefault() {
public void processDefault() { e.push(-1); e.return_value(); } };
public void aaload(int index) { push(index); aaload(); }
public void processElement(Type type) { append_string_helper(e, type, d, registry, this); e.push(d.inside); e.invoke_virtual(Constants.TYPE_STRING_BUFFER, APPEND_STRING); } };
/** * Toggles the integer on the top of the stack from 1 to 0 or vice versa */ public void not() { push(1); math(XOR, Type.INT_TYPE); }
public void processCase(Object key, Label end) { e.push(((Integer)indexes.get(key)).intValue()); e.return_value(); }
public void processDefault() { e.push(-1); e.return_value(); } });
public void processCase(Object key, Label end) { e.push(ints[stringList.indexOf(key)]); e.return_value(); } public void processDefault() {
public void throw_exception(Type type, String msg) { new_instance(type); dup(); push(msg); invoke_constructor(type, CSTRUCT_STRING); athrow(); }
private static void hash_long(CodeEmitter e) { // (int)(f ^ (f >>> 32)) e.dup2(); e.push(32); e.math(e.USHR, Type.LONG_TYPE); e.math(e.XOR, Type.LONG_TYPE); e.cast_numeric(Type.LONG_TYPE, Type.INT_TYPE); }
private static void shrinkStringBuffer(CodeEmitter e, int amt) { e.dup(); e.dup(); e.invoke_virtual(Constants.TYPE_STRING_BUFFER, LENGTH); e.push(amt); e.math(e.SUB, Type.INT_TYPE); e.invoke_virtual(Constants.TYPE_STRING_BUFFER, SET_LENGTH); }
private static void shrinkStringBuffer(CodeEmitter e, int amt) { e.dup(); e.dup(); e.invoke_virtual(Constants.TYPE_STRING_BUFFER, LENGTH); e.push(amt); e.math(e.SUB, Type.INT_TYPE); e.invoke_virtual(Constants.TYPE_STRING_BUFFER, SET_LENGTH); }
public void processCase(Object key, Label end) { MethodInfo constructor = (MethodInfo)key; Type types[] = constructor.getSignature().getArgumentTypes(); for (int i = 0; i < types.length; i++) { e.load_arg(1); e.push(i); e.aaload(); e.unbox(types[i]); } e.invoke_constructor(thisType, constructor.getSignature()); e.goTo(end); } public void processDefault() {
public static void load_method(CodeEmitter e, MethodInfo method) { load_class(e, method.getClassInfo().getType()); e.push(method.getSignature().getName()); push_object(e, method.getSignature().getArgumentTypes()); e.invoke_virtual(Constants.TYPE_CLASS, GET_DECLARED_METHOD); }