lower类的accessCode解读
/** 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解读的更多相关文章
- java.lang.system 类源码解读
通过每块代码进行源码解读,并发现源码使用的技术栈,扩展视野. registerNatives 方法解读 /* register the natives via the static initializ ...
- java.lang.String 类源码解读
String类定义实现了java.io.Serializable, Comparable<String>, CharSequence 三个接口:并且为final修饰. public fin ...
- java.lang.Long 类源码解读
总体阅读了Long的源码,基本跟Integer类类似,所以特别全部贴出源码,直接注释进行理解. // final修饰符 public final class Long extends Number i ...
- 【QT相关】类头文件解读、QT编辑模式、读取text文本
Wizard产生的头文件类包含了必须的#include文件.构造函数.析构函数和UI对象: #include <QMainWindow> namespace Ui {class Notep ...
- SimpleVisitorMemberType类的visitClassType解读
举个例子,如下: class CA<T>{ public T getVal(){ return null; } } interface IA{} interface IB{} public ...
- python装饰器2:类装饰器
装饰器1:函数装饰器 装饰器2:类装饰器 装饰器3:进阶 本文是装饰器相关内容的第二篇,关于类装饰器. "类装饰器"有两种解读方式:用来装饰类的装饰器:类作为装饰器装饰其它东西.你 ...
- Volley 框架解析(二)--RequestQueue核心解读
主要围绕RequestQueue进行解读,它的两个请求队列CacheQueue.NetworkQueue是如何调用的,第一条请求的执行过程及如何处理重复请求?对RequestQueue及相关的类进行详 ...
- Large Class--过大的类--要重构的信号
如果想利用单个类做太多事情,其内往往就会出现太多实例变量.一旦如此,Duplicated Code也就接踵而至. 解决方法: 1.将类内彼此相关的变量,将它们放在一起.使用Extrac ...
- TypeScript完全解读(26课时)_汇总贴
ECMAScript 6 入门:http://es6.ruanyifeng.com/ 官网:http://www.typescriptlang.org/ 中文网:https://www.tslang. ...
随机推荐
- Swift要点:从Objective-C开发者的角度看Swift
代码环境是Xcode6.3-Beta3. Swift已经极大的改变了开发iOS应用的方式.本文中,我会列出Swift的几个重点,并且和Objective-C一一做出对比. 注意,本文不是Swift的入 ...
- MySQL性能调优与架构设计——第 17 章 高可用设计之思路及方案
第 17 章 高可用设计之思路及方案 前言: 数据库系统是一个应用系统的核心部分,要想系统整体可用性得到保证,数据库系统就不能出现任何问题.对于一个企业级的系统来说,数据库系统的可用性尤为重要.数据库 ...
- The First Android App----Adding the Action Bar
In its most basic form, the action bar displays the title for the activity and the app icon on the l ...
- struts2 跳转类型 result type=chain、dispatcher、redirect(redirect-action)
dispatcher 为默认跳转类型,用于返回一个视图资源(如:jsp) Xml代码 : <result name="success">/main.jsp</re ...
- AME
http://wenku.baidu.com/view/a9dbebc789eb172ded63b7f4.htmlhttp://wenku.baidu.com/view/dde6eb040740be1 ...
- 【Win10】一些零碎不好归档的小总结(原谅我这个该死的标题吧)
一.同步方式获取设备的屏幕分辨率 public static class ScreenResolution { /// <summary> /// 获取屏幕高度. /// </sum ...
- dorado-menu
1.menu控件是一个下拉菜单控件,可以设置数icon(图标),click事件,Dorado事件中都有self和arg两个参数,其中self是当前控件本身 2.menu控件可以和toolBar结合使用 ...
- Linear and Quadratic Programming Solver ( Arithmetic and Algebra) CGAL 4.13 -User Manual
1 Which Programs can be Solved? This package lets you solve convex quadratic programs of the general ...
- 浏览器对HTTP请求的编码行为
浏览器对请求的URL编码行为 浏览器会对请求的URL中非ASCII码字符进行编码.这里不是指对整个URL进行编码,而是仅仅对非ASCII码字符部分进行编码,详情请看下面的实验记录. 实验一:在URL参 ...
- 《JavaScript高级程序设计》5.5 Function类型
5.5 Function类型 函数实质上是对象, 每个函数都是Function类型的实例, 并且都和其他引用类型一样具有属性和方法. 因此函数名实际上也是一个指向函数对象的指针, 不会与某个函数绑定. ...