Package net.sf.cglib.asm

Examples of net.sf.cglib.asm.Label


/*     */
/*  92 */     e.load_this();
/*  93 */     e.getfield(name);
/*  94 */     e.load_this();
/*  95 */     e.invoke_interface(ENABLED, ENABLED_GET);
/*  96 */     Label intercept = e.make_label();
/*  97 */     e.ifnonnull(intercept);
/*  98 */     e.return_value();
/*     */
/* 100 */     e.mark(intercept);
/* 101 */     Local result = e.make_local(type);
View Full Code Here


/* 117 */     CodeEmitter e = super.begin_method(1, writeMethodSig(name, type.getDescriptor()), null, null);
/*     */
/* 121 */     e.load_this();
/* 122 */     e.dup();
/* 123 */     e.invoke_interface(ENABLED, ENABLED_GET);
/* 124 */     Label skip = e.make_label();
/* 125 */     e.ifnull(skip);
/*     */
/* 127 */     e.load_this();
/* 128 */     e.invoke_interface(ENABLED, ENABLED_GET);
/* 129 */     e.load_this();
/* 130 */     e.push(name);
/* 131 */     e.load_this();
/* 132 */     e.getfield(name);
/* 133 */     e.load_arg(0);
/* 134 */     e.invoke_interface(CALLBACK, writeCallbackSig(type));
/* 135 */     if (!TypeUtils.isPrimitive(type)) {
/* 136 */       e.checkcast(type);
/*     */     }
/* 138 */     Label go = e.make_label();
/* 139 */     e.goTo(go);
/* 140 */     e.mark(skip);
/* 141 */     e.load_arg(0);
/* 142 */     e.mark(go);
/* 143 */     e.putfield(name);
View Full Code Here

/* 58 */       CodeEmitter e = ce.begin_method(50, loadMethod(index), null, null);
/*    */
/* 64 */       e.load_this();
/* 65 */       e.getfield(delegate);
/* 66 */       e.dup();
/* 67 */       Label end = e.make_label();
/* 68 */       e.ifnonnull(end);
/* 69 */       e.pop();
/* 70 */       e.load_this();
/* 71 */       context.emitCallback(e, index);
/* 72 */       e.invoke_interface(LAZY_LOADER, LOAD_OBJECT);
View Full Code Here

/*     */   public static void process_array(CodeEmitter e, Type type, ProcessArrayCallback callback)
/*     */   {
/* 102 */     Type componentType = TypeUtils.getComponentType(type);
/* 103 */     Local array = e.make_local();
/* 104 */     Local loopvar = e.make_local(Type.INT_TYPE);
/* 105 */     Label loopbody = e.make_label();
/* 106 */     Label checkloop = e.make_label();
/* 107 */     e.store_local(array);
/* 108 */     e.push(0);
/* 109 */     e.store_local(loopvar);
/* 110 */     e.goTo(checkloop);
/*     */
View Full Code Here

/*     */   {
/* 134 */     Type componentType = TypeUtils.getComponentType(type);
/* 135 */     Local array1 = e.make_local();
/* 136 */     Local array2 = e.make_local();
/* 137 */     Local loopvar = e.make_local(Type.INT_TYPE);
/* 138 */     Label loopbody = e.make_label();
/* 139 */     Label checkloop = e.make_label();
/* 140 */     e.store_local(array1);
/* 141 */     e.store_local(array2);
/* 142 */     e.push(0);
/* 143 */     e.store_local(loopvar);
/* 144 */     e.goTo(checkloop);
View Full Code Here

/*     */   }
/*     */
/*     */   private static void string_switch_trie(CodeEmitter e, String[] strings, ObjectSwitchCallback callback)
/*     */     throws Exception
/*     */   {
/* 190 */     Label def = e.make_label();
/* 191 */     Label end = e.make_label();
/* 192 */     Map buckets = CollectionUtils.bucket(Arrays.asList(strings), new Transformer() {
/*     */       public Object transform(Object value) {
/* 194 */         return new Integer(((String)value).length());
/*     */       }
/*     */     });
View Full Code Here

/* 259 */     Map buckets = CollectionUtils.bucket(Arrays.asList(strings), new Transformer() {
/*     */       public Object transform(Object value) {
/* 261 */         return new Integer(value.hashCode());
/*     */       }
/*     */     });
/* 264 */     Label def = e.make_label();
/* 265 */     Label end = e.make_label();
/* 266 */     e.dup();
/* 267 */     e.invoke_virtual(Constants.TYPE_OBJECT, HASH_CODE);
/* 268 */     e.process_switch(getSwitchKeys(buckets), new ProcessSwitchCallback(buckets, skipEquals, e, callback, end, def) {
/*     */       public void processCase(int key, Label ignore_end) throws Exception {
/* 270 */         List bucket = (List)this.val$buckets.get(new Integer(key));
/* 271 */         Label next = null;
/*     */         Iterator it;
/* 272 */         if ((this.val$skipEquals) && (bucket.size() == 1)) {
/* 273 */           if (this.val$skipEquals)
/* 274 */             this.val$e.pop();
/* 275 */           this.val$callback.processCase((String)bucket.get(0), this.val$end);
View Full Code Here

/* 402 */       e.math(96, Type.INT_TYPE);
/*     */     }
/*     */   }
/*     */
/*     */   private static void hash_array(CodeEmitter e, Type type, int multiplier, Customizer customizer) {
/* 407 */     Label skip = e.make_label();
/* 408 */     Label end = e.make_label();
/* 409 */     e.dup();
/* 410 */     e.ifnull(skip);
/* 411 */     process_array(e, type, new ProcessArrayCallback(e, multiplier, customizer) {
/*     */       public void processElement(Type type) {
/* 413 */         EmitUtils.hash_code(this.val$e, type, this.val$multiplier, this.val$customizer);
View Full Code Here

/* 419 */     e.mark(end);
/*     */   }
/*     */
/*     */   private static void hash_object(CodeEmitter e, Type type, Customizer customizer)
/*     */   {
/* 424 */     Label skip = e.make_label();
/* 425 */     Label end = e.make_label();
/* 426 */     e.dup();
/* 427 */     e.ifnull(skip);
/* 428 */     if (customizer != null) {
/* 429 */       customizer.customize(e, type);
/*     */     }
View Full Code Here

/*     */   private static void not_equals_helper(CodeEmitter e, Type type, Label notEquals, Customizer customizer, ProcessArrayCallback callback)
/*     */   {
/* 492 */     if (TypeUtils.isPrimitive(type)) {
/* 493 */       e.if_cmp(type, 154, notEquals);
/*     */     } else {
/* 495 */       Label end = e.make_label();
/* 496 */       nullcmp(e, notEquals, end);
/* 497 */       if (TypeUtils.isArray(type)) {
/* 498 */         Label checkContents = e.make_label();
/* 499 */         e.dup2();
/* 500 */         e.arraylength();
/* 501 */         e.swap();
/* 502 */         e.arraylength();
/* 503 */         e.if_icmp(153, checkContents);
View Full Code Here

TOP

Related Classes of net.sf.cglib.asm.Label

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.