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. ...
随机推荐
- mysql中要根据某个逗号分割的字符串关联查询另一张表的数据
首先观察下面的查询 select * from company where f_id in ('210','205','208') select * from company where f_id i ...
- (欧拉公式 很水) Coprimes -- sgu -- 1002
链接: http://vj.acmclub.cn/contest/view.action?cid=168#problem/B Coprimes 时限:250MS 内存:4096KB 6 ...
- CodeForces - 589J —(DFS)
Masha has recently bought a cleaner robot, it can clean a floor without anybody's assistance. Schema ...
- Type conversions in C++类型转换
###Implicit conversions隐式转换* 可以在基本类型之间自由转换:* 可以把任何类型的pointer转换为void pointer:* 可以将子类pointer转换为基类point ...
- 微软在线实验室启用谷歌的reCAPTCHA,我们又丢失了一个好东东
在没有启用reCAPTCHA的日子,我们可以在微软的在线实验室www.microsoft.com/handsonlabs 中找到许许多多的文档.视频.动手实验环境. 不需要任何硬件.技术,就可以快速的 ...
- 找不到请求的 .Net Framework Data Provider
1.安装 mysql-connector-net-6.9.10.msi 2.修改C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine ...
- 2D Polygons( Poygon) CGAL 4.13 -User Manual
1 Introduction A polygon is a closed chain of edges. Several algorithms are available for polygons. ...
- Visual Studio 编译信息细度显示设置
visual studio 项目在编译时,可根据调试需要设置output窗口输出内容的详细程度,这对于bug或warning的解决具有很大帮助.具体设置如下: 依次点击:"Tools&quo ...
- 《JavaScript模式》一书中提到的一些坑
1. 应当用数组字面量来创建数组,而不是用new Array() //反模式 var a = new Array('itsy', 'bitsy', 'spider'); //用字面量 var a = ...
- linux系统下安装Jenkins
1.首先准备java环境,安装JDK 2.部署jenkins wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redha ...