{"title":"通过基于指针的寄存器实现面向对象编程","authors":"Andr ás Zs ót ér","doi":"10.1006/jmca.1995.0019","DOIUrl":null,"url":null,"abstract":"<div><p>This paper describes an implementation method for object-oriented applications. In the common practice the base address of the current object instance is passed on the stack as a pointer from one virtual method to another. The way suggested in this paper uses a global pointer pointing to the currently active object. This pointer is implemented by using some of the CPU registers exclusively for this purpose, thus saving the time of reloading it. Provided that some instructions manipulate on the same object instance before the program switches to another object a smaller and faster executing code can be achieved and at the same time some stack space can be saved.</p></div>","PeriodicalId":100806,"journal":{"name":"Journal of Microcomputer Applications","volume":"18 3","pages":"Pages 279-285"},"PeriodicalIF":0.0000,"publicationDate":"1995-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1006/jmca.1995.0019","citationCount":"1","resultStr":"{\"title\":\"Implementation of object-oriented programming via register based pointer\",\"authors\":\"Andr ás Zs ót ér\",\"doi\":\"10.1006/jmca.1995.0019\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>This paper describes an implementation method for object-oriented applications. In the common practice the base address of the current object instance is passed on the stack as a pointer from one virtual method to another. The way suggested in this paper uses a global pointer pointing to the currently active object. This pointer is implemented by using some of the CPU registers exclusively for this purpose, thus saving the time of reloading it. Provided that some instructions manipulate on the same object instance before the program switches to another object a smaller and faster executing code can be achieved and at the same time some stack space can be saved.</p></div>\",\"PeriodicalId\":100806,\"journal\":{\"name\":\"Journal of Microcomputer Applications\",\"volume\":\"18 3\",\"pages\":\"Pages 279-285\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1995-07-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://sci-hub-pdf.com/10.1006/jmca.1995.0019\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Journal of Microcomputer Applications\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S074571388570019X\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Microcomputer Applications","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S074571388570019X","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Implementation of object-oriented programming via register based pointer
This paper describes an implementation method for object-oriented applications. In the common practice the base address of the current object instance is passed on the stack as a pointer from one virtual method to another. The way suggested in this paper uses a global pointer pointing to the currently active object. This pointer is implemented by using some of the CPU registers exclusively for this purpose, thus saving the time of reloading it. Provided that some instructions manipulate on the same object instance before the program switches to another object a smaller and faster executing code can be achieved and at the same time some stack space can be saved.