{"title":"Aspect-aware bytecode combinators for a dynamic AOP system with invokedynamic","authors":"Santi Nopnipa, Chanwit Kaewkasi","doi":"10.1109/JCSSE.2013.6567353","DOIUrl":null,"url":null,"abstract":"This paper presents a weaving implementation named Aspect-Aware Bytecode Combinators (AABC) to help optimization of the dynamic AOP using invokedynamic, which has been included in the JVM since Java 7. The main contribution of this paper is to demonstrate how a dynamic AOP system could be developed with invokedynamic. This paper discusses 4 common kinds of advice, which are supported by AABC. They are before, after, around and after-return advice. This paper argues that filterArguments and filterReturnValue natively supported by the JVM are not suitable to use as the weaving mechanism as they have incorrect semantic to implement AOP advice. It is also found that they have some performance overheads to serve as the weaving mechanism. Thus, this paper presents a new set of bytecode combinators, named AABC, which are carefully designed to match the semantic of the pointcut-advice model of AspectJ. The experimental results showed that performance of AABC in the before advice experiment is faster than the standard bytecode combinators. In addition, the paper demonstrated that the around advice can be successfully implemented using MethodHandle supported in Java 7.","PeriodicalId":199516,"journal":{"name":"The 2013 10th International Joint Conference on Computer Science and Software Engineering (JCSSE)","volume":"19 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2013-05-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"3","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"The 2013 10th International Joint Conference on Computer Science and Software Engineering (JCSSE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/JCSSE.2013.6567353","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 3
Abstract
This paper presents a weaving implementation named Aspect-Aware Bytecode Combinators (AABC) to help optimization of the dynamic AOP using invokedynamic, which has been included in the JVM since Java 7. The main contribution of this paper is to demonstrate how a dynamic AOP system could be developed with invokedynamic. This paper discusses 4 common kinds of advice, which are supported by AABC. They are before, after, around and after-return advice. This paper argues that filterArguments and filterReturnValue natively supported by the JVM are not suitable to use as the weaving mechanism as they have incorrect semantic to implement AOP advice. It is also found that they have some performance overheads to serve as the weaving mechanism. Thus, this paper presents a new set of bytecode combinators, named AABC, which are carefully designed to match the semantic of the pointcut-advice model of AspectJ. The experimental results showed that performance of AABC in the before advice experiment is faster than the standard bytecode combinators. In addition, the paper demonstrated that the around advice can be successfully implemented using MethodHandle supported in Java 7.