public void processDefault() { e.goTo(def); } });
public void processDefault() throws Exception { e.goTo(def); } });
public void processDefault() { e.goTo(illegalArg); } });
public void processDefault() { e.goTo(def); } });
public void processDefault() throws Exception { e.goTo(def); } });
public void processDefault() throws Exception { e.goTo(def); } });
public void processCase(int key, Label end) { e.getfield(getCallbackField(key)); e.goTo(end); } public void processDefault() {
public void processCase(int key, Label end) { e.load_this(); e.load_arg(1); e.checkcast(callbackTypes[key]); e.putfield(getCallbackField(key)); e.goTo(end); } public void processDefault() {
/** * If both objects on the top of the stack are non-null, does nothing. * If one is null, or both are null, both are popped off and execution * branches to the respective label. * @param oneNull label to branch to if only one of the objects is null * @param bothNull label to branch to if both of the objects are null */ private static void nullcmp(CodeEmitter e, Label oneNull, Label bothNull) { e.dup2(); Label nonNull = e.make_label(); Label oneNullHelper = e.make_label(); Label end = e.make_label(); e.ifnonnull(nonNull); e.ifnonnull(oneNullHelper); e.pop2(); e.goTo(bothNull); e.mark(nonNull); e.ifnull(oneNullHelper); e.goTo(end); e.mark(oneNullHelper); e.pop2(); e.goTo(oneNull); e.mark(end); }
e.goTo(def); } else { checked.set(index);
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_this(constructor.getSignature()); e.goTo(end); } public void processDefault() {
private static void hash_array(final CodeEmitter e, Type type, final int multiplier, final Customizer customizer) { Label skip = e.make_label(); Label end = e.make_label(); e.dup(); e.ifnull(skip); EmitUtils.process_array(e, type, new ProcessArrayCallback() { public void processElement(Type type) { hash_code(e, type, multiplier, customizer); } }); e.goTo(end); e.mark(skip); e.pop(); e.mark(end); }
private static void hash_object(CodeEmitter e, Type type, Customizer customizer) { // (f == null) ? 0 : f.hashCode(); Label skip = e.make_label(); Label end = e.make_label(); e.dup(); e.ifnull(skip); if (customizer != null) { customizer.customize(e, type); } e.invoke_virtual(Constants.TYPE_OBJECT, HASH_CODE); e.goTo(end); e.mark(skip); e.pop(); e.push(0); e.mark(end); }
/** * Unboxes the object on the top of the stack. If the object is null, the * unboxed primitive value becomes zero. */ public void unbox_or_zero(Type type) { if (TypeUtils.isPrimitive(type)) { if (type != Type.VOID_TYPE) { Label nonNull = make_label(); Label end = make_label(); dup(); ifnonnull(nonNull); pop(); zero_or_null(type); goTo(end); mark(nonNull); unbox(type); mark(end); } } else { checkcast(type); } }
e.push(0); e.store_local(loopvar); e.goTo(checkloop);
e.invoke_virtual(Constants.TYPE_STRING_BUFFER, APPEND_STRING); e.goTo(end); e.mark(skip); e.pop();
e.if_icmp(e.EQ, checkContents); e.pop2(); e.goTo(notEquals); e.mark(checkContents); EmitUtils.process_arrays(e, type, callback);
e.push(0); e.store_local(loopvar); e.goTo(checkloop);
private void addWriteMethod(String name, Type type) { CodeEmitter e = super.begin_method(Constants.ACC_PUBLIC, writeMethodSig(name, type.getDescriptor()), null); e.load_this(); e.dup(); e.invoke_interface(ENABLED,ENABLED_GET); Label skip = e.make_label(); e.ifnull(skip); e.load_this(); e.invoke_interface(ENABLED,ENABLED_GET); e.load_this(); e.push(name); e.load_this(); e.getfield(name); e.load_arg(0); e.invoke_interface(CALLBACK, writeCallbackSig(type)); if (!TypeUtils.isPrimitive(type)) { e.checkcast(type); } Label go = e.make_label(); e.goTo(go); e.mark(skip); e.load_arg(0); e.mark(go); e.putfield(name); e.return_value(); e.end_method(); }
e.ifnonnull(found_callback); e.pop(); e.goTo(end);