当前位置:网站首页>JVM method return address
JVM method return address
2022-06-29 10:03:00 【Hao_ JunJie】
One 、 It stores the caller's pc Register value :
Two 、 The end of a method , There are two ways :
1. Normal execution complete .
2 An unhandled exception occurred , Abnormal exit .
3、 ... and 、 Either way, exit , After the method exits, it returns to the location where the method was called . When the method exits normally , Of the caller pc The value of the register is used as the return address , That is, the address of the next instruction that calls the method . And the abnormal exit , The return address is determined through the exception table , This part of information will not be saved in stack frame .
Four 、 Essentially , Fang The exit of the method is the process of the current stack frame out of the stack , In this case, we need to restore the local variable table of the upper method , The stack of operands , Push the return value into the operand stack of the caller's stack frame , Set up pc Register values, etc , Let the caller method continue to execute .
5、 ... and . The difference between a normal completion exit and an abnormal completion exit is that : Exiting through an exception completion exit will not generate any return value for its upper level caller .
6、 ... and 、 Method exit instruction :
(1) The normal exit :
a. The execution engine encountered a bytecode instruction returned by any method (return), There will be a return value passed to the upper level method caller , abbreviation Complete the exit normally .
b. type : It depends on the actual data type of the return value of the method .
c.ireturn: The return value is boolean,byte,char,short,int
lreturn: The return value is long.
dreturn: The return value is double.
freturn: The return value is flot
areturn: The return value is Reference type
return: The return value is void.
(2) Abnormal exit :
a. Concept : Exception encountered during method execution , And this exception is not handled in the method , That is, as long as no matching exception handler is found in the exception table of this method , Will cause the method to exit , abbreviation Abnormal completion exit .
b. Example :

In bytecode 4-8 Exception encountered in line , Use bytecode 11 Line exception handler .
边栏推荐
- 图片验证码控件
- Automatic Multi-Organ SegmVentation on Abdominal CT With Dense V-Networks
- 共用体Union
- linux环境下安装配置redis,并设置开机自启动
- kdevelop新建工程
- Pipeline details of IPC (interprocess communication)
- Deep Learning-based Automated Delineation of Head and Neck Malignant Lesions from PET Images
- 367. effective complete square dichotomy
- Wechat applet rewrites the page function to realize global logging
- 数据源连接池未关闭的问题 Could not open JDBC Connection for transaction
猜你喜欢

JVM之方法返回地址

1424. diagonal traversal II

FreeRTOS(九)——队列

弧形 View 和弧形 ViewPager

zabbix4.4配置监控服务器指标,以及图形页乱码解决

Fully Automated Gross Tumor Volume Delineation From PET in Head and Neck Cancer Using Deep Learning

Student增删gaih

Custom MVC framework implementation

RecyclerView 通用适配器封装

Force deduction 85 question maximum rectangle
随机推荐
微信小程序实现store功能
A comparison of methods for fully automatic segmentation of tumors and involved nodes in PET/CT of h
Language characteristics
弧形 View 和弧形 ViewPager
滑块验证代码
linux下centos7中mysql5.7安装教程
Leetcode MySQL database topic 178
Idea debugging fails, reporting jdwp no transports initialized, jvmtierror=agent_ ERROR_ TRANSPORT_ LOAD(196)
Set up lamp environment under cenos7
监控数据源连接池使用情况
Constructing SQL statements by sprintf() function in C language
acwing271【杨老师的照相排列】【线性DP】
我想要股票开户优惠,怎么得到?还有,在线开户安全么?
Wechat applet rewrites the page function to realize global logging
2019icpc上海区域赛赛后总结
JVM之方法返回地址
Hystrix熔断器:服务熔断与服务降级
Fully Automated Gross Tumor Volume Delineation From PET in Head and Neck Cancer Using Deep Learning
IDEA调试失败,报JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_LOAD(196)
MySQL modify auto increment initial value