/** Access codes for dereferencing(解引用), assignment,
 * and pre/post increment/decrement.
 * Access codes for assignment operations are determined
 * by method accessCode below.
 *
 *  All access codes for accesses to the current class are even. 都是偶数
 *  If a member of the superclass should be accessed instead (because
 *  access was via a qualified super), add one to the corresponding code
 *  for the current class, making the number odd.
 *  This numbering scheme is used by the backend to decide whether
 *  to issue an invokevirtual or invokespecial call.
 *  后端使用他的编号方案来决定是否发出一个invokevirtual或invokespecial call。
 *  @see Gen.visitSelect(Select tree)
 */
// 关于invokevirtual与invokespecial指令相关介绍:
// https://www.cnblogs.com/extjs4/p/9103190.html
// 如下的编号都为偶数
private static final int
    DEREFcode = 0, // deref
    ASSIGNcode = 2, // assign
    PREINCcode = 4, // preinc
    PREDECcode = 6, // predec
    POSTINCcode = 8, // postinc
    POSTDECcode = 10, // postdec
    FIRSTASGOPcode = 12; // first assignment op

定义了accessCode为:0、2、4、6、8、10、12

举个例子,如下:

class TestAccessPrivateVar {
	private int a = 1;
	class MyInner {
		public void t() {
			int b = a; // deref
			a = 2;   // assign
			int c;
			c = ++a; // preinc
			c = --a; // predec
			c = a++; // postinc
			c = a--; // postdec
			a += 1; // first assignment op
		}
	}
}
iadd            = 96,// 0x60	iadd	将栈顶两int型数值相加并将结果压入栈顶
ladd            = 97,// 0x61	ladd	将栈顶两long型数值相加并将结果压入栈顶
fadd            = 98,// 0x62	fadd	将栈顶两float型数值相加并将结果压入栈顶
dadd            = 99,// 0x63	dadd	将栈顶两double型数值相加并将结果压入栈顶
isub            = 100,// 0x64	is	    将栈顶两int型数值相减并将结果压入栈顶
lsub            = 101,// 0x65	ls	    将栈顶两long型数值相减并将结果压入栈顶
fsub            = 102,// 0x66	fs	    将栈顶两float型数值相减并将结果压入栈顶
dsub            = 103,// 0x67	ds	    将栈顶两double型数值相减并将结果压入栈顶
imul            = 104,// 0x68	imul	将栈顶两int型数值相乘并将结果压入栈顶
lmul            = 105,// 0x69	lmul	将栈顶两long型数值相乘并将结果压入栈顶
fmul            = 106,// 0x6a	fmul	将栈顶两float型数值相乘并将结果压入栈顶
dmul            = 107,// 0x6b	dmul	将栈顶两double型数值相乘并将结果压入栈顶
idiv            = 108,// 0x6c           将栈顶两int型数值相除并将结果压入栈顶
ldiv            = 109,// 0x6d	ldiv	将栈顶两long型数值相除并将结果压入栈顶
fdiv            = 110,// 0x6e	fdiv	将栈顶两float型数值相除并将结果压入栈顶
ddiv            = 111,// 0x6f	ddiv	将栈顶两double型数值相除并将结果压入栈顶
imod            = 112,// 0x70	irem	将栈顶两int型数值作取模运算并将结果压入栈顶
lmod            = 113,// 0x71	lrem	将栈顶两long型数值作取模运算并将结果压入栈顶
fmod            = 114,// 0x72	frem	将栈顶两float型数值作取模运算并将结果压入栈顶
dmod            = 115,// 0x73	drem	将栈顶两double型数值作取模运算并将结果压入栈顶
ineg            = 116,// 0x74	ineg	将栈顶int型数值取负并将结果压入栈顶
lneg            = 117,// 0x75	lneg	将栈顶long型数值取负并将结果压入栈顶
fneg            = 118,// 0x76	fneg	将栈顶float型数值取负并将结果压入栈顶
dneg            = 119,// 0x77	dneg	将栈顶double型数值取负并将结果压入栈顶

ishl            = 120,// 0x78	ishl	将int型数值左移位指定位数并将结果压入栈顶
lshl            = 121,// 0x79	lshl	将long型数值左移位指定位数并将结果压入栈顶
ishr            = 122,// 0x7a	ishr	将int型数值右(符号)移位指定位数并将结果压入栈顶
lshr            = 123,// 0x7b	lshr	将long型数值右(符号)移位指定位数并将结果压入栈顶
iushr           = 124,// 0x7c	iushr	将int型数值右(无符号)移位指定位数并将结果压入栈顶
lushr           = 125,// 0x7d	lushr	将long型数值右(无符号)移位指定位数并将结果压入栈顶

iand            = 126,// 0x7e	iand	将栈顶两int型数值作“按位与”并将结果压入栈顶
land            = 127,// 0x7f	land	将栈顶两long型数值作“按位与”并将结果压入栈顶
ior             = 128,// 0x80	ior	将栈顶两int型数值作“按位或”并将结果压入栈顶
lor             = 129,// 0x81	lor	将栈顶两long型数值作“按位或”并将结果压入栈顶
ixor            = 130,// 0x82	ixor	将栈顶两int型数值作“按位异或”并将结果压入栈顶
lxor            = 131,// 0x83	lxor	将栈顶两long型数值作“按位异或”并将结果压入栈顶

算出来的accessCode为:12、14、16 ... 80 、 82

int string_add      = 256,  // string +

算出来的accessCode为:84

 int ishll           = 270,  // int shift left with long count 向左移动,移动类型为long
        lshll           = 271,  // long shift left with long count
        ishrl           = 272,  // int shift right with long count
        lshrl           = 273,  // long shift right with long count
        iushrl          = 274,  // int unsigned shift right with long count
        lushrl          = 275;  // long unsigned shift right with long count 例如>>>

算出来的accessCode为:86、88、... 96  

  

 

lower类的accessCode解读的更多相关文章

  1. java.lang.system 类源码解读

    通过每块代码进行源码解读,并发现源码使用的技术栈,扩展视野. registerNatives 方法解读 /* register the natives via the static initializ ...

  2. java.lang.String 类源码解读

    String类定义实现了java.io.Serializable, Comparable<String>, CharSequence 三个接口:并且为final修饰. public fin ...

  3. java.lang.Long 类源码解读

    总体阅读了Long的源码,基本跟Integer类类似,所以特别全部贴出源码,直接注释进行理解. // final修饰符 public final class Long extends Number i ...

  4. 【QT相关】类头文件解读、QT编辑模式、读取text文本

    Wizard产生的头文件类包含了必须的#include文件.构造函数.析构函数和UI对象: #include <QMainWindow> namespace Ui {class Notep ...

  5. SimpleVisitorMemberType类的visitClassType解读

    举个例子,如下: class CA<T>{ public T getVal(){ return null; } } interface IA{} interface IB{} public ...

  6. python装饰器2:类装饰器

    装饰器1:函数装饰器 装饰器2:类装饰器 装饰器3:进阶 本文是装饰器相关内容的第二篇,关于类装饰器. "类装饰器"有两种解读方式:用来装饰类的装饰器:类作为装饰器装饰其它东西.你 ...

  7. Volley 框架解析(二)--RequestQueue核心解读

    主要围绕RequestQueue进行解读,它的两个请求队列CacheQueue.NetworkQueue是如何调用的,第一条请求的执行过程及如何处理重复请求?对RequestQueue及相关的类进行详 ...

  8. Large Class--过大的类--要重构的信号

    如果想利用单个类做太多事情,其内往往就会出现太多实例变量.一旦如此,Duplicated Code也就接踵而至.     解决方法:     1.将类内彼此相关的变量,将它们放在一起.使用Extrac ...

  9. TypeScript完全解读(26课时)_汇总贴

    ECMAScript 6 入门:http://es6.ruanyifeng.com/ 官网:http://www.typescriptlang.org/ 中文网:https://www.tslang. ...

随机推荐

  1. 13.A={1,2,3,5}和为10的问题

    题目:集合A={1,2,3,5},从中任取几个数相加等于10,并打印各得哪几个数?补充参照:http://www.cnblogs.com/tinaluo/p/5294341.html上午弄明白了幂集的 ...

  2. Lucene.net 基本示例 《第一篇》

    Lucene.net是java平台搜索插件Lucene的移植版.它的主要用于开发搜索引擎,站内搜索等. 开篇之前,写个最简单的DEMO,让自己先体验下Lucene.net的魅力,顺便搭建环境. sta ...

  3. calltree+graphviz 绘出项目函数调用图

    install calltree: download from http://linux.softpedia.com/progDownload/calltree-Download-971.html f ...

  4. 自适应XAML布局经验总结 (一)原则和页面结构设计

    XAML布局回顾 Grid和StackPanel是核心布局,尤其以Grid最为重要. Grid是网格布局,XAML的设计者有可能参考了Html里的Table设计了Grid布局,但进行了改进.Html中 ...

  5. .NET 任务调度Quartz系列(1)——自建定时任务

    在我们平时项目中经常会遇到定时任务,比如定时同步数据,定时备份数据,定时统计数据等,定时任务我们都知道使用Quartz.net,此系列写的也是Quartz,但是在此之前,我们先用其他方式做个简单的定时 ...

  6. 基于VMware Workstation搭建开发服务器

    基于VMware Workstation搭建开发服务器   文章为本人原创,转载请联系作者并注明出处.晓松 源URL: https://www.jianshu.com/p/e62ab7de0124 我 ...

  7. webapi token、参数签名是如何生成的(转载)

    API接口保障安全性原则:1.有调用者身份2.请求的唯一性3.请求的参数不能被篡改4.请求的有效时间 在刚接触接口开发时,可能脑子里压根就没有这个接口调用安全性的原则,但常识性的经验告诉我们,每一个请 ...

  8. 使用JQuery插件Jcrop进行图片截取

    Jcrop插件本身并不含有图片截取功能,它仅仅是在前端层面构建一套截取动画效果并产生4个坐标点,插件使用者将这4个坐标点传回至服务器接口上进行截取操作.其优点是具有较高的通用性.浏览器兼容性(IE6+ ...

  9. H - The LCIS on the Tree HDU - 4718

    The LCIS on the Tree Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Oth ...

  10. kolla-ansible 源码下载

    下载地址: https://pypi.org/project/kolla-ansible/ ansible下载: https://releases.ansible.com/ansible/rpm/re ...