Generation of specialized methods based on generic methods and type parameterizations
Abstract
Generic method specialization represents the ability to specialize generic methods over various types. When implementing generic method specialization an annotated class file may include a generic method declaration that is annotated with specialization metadata indicating elements of the generic method to be adjusted during specialization. The annotated method may be usable directly as an erased method implementation (e.g., to load the method when instantiated with reference types) and may also be usable as a template for specialization. When a generic method is being prepared for execution, such as when it is first invoked during runtime, a specialization method generator function may be used to specialize the generic method based on the specialization metadata in the generic method declaration. The specialization method generator function may use the annotated generic method declaration as a template for specialization.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 50 · Forward citations: 4.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A non-transitory, computer-readable storage medium storing program instructions that when executed on a computing device cause the computing device to perform: passing a generic method and specialization metadata to a specialized method generator, wherein the specialization metadata comprises information identifying one or more program elements of the generic method to be adjusted when specializing the generic method for a particular type parameterization; generating, by the specialized method generator in response to said passing, a specialized method based, at least in part, on the generic m
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (4 of 4 total)
References Cited — Backward Prior Art (50)
Non-Patent Literature (5)
- "Common Language Infrastructure (CLI) Partitions I to VI," 6th Edition / Jun. 2012, ECMA International, Standard ECMA-335, pp. 1-574.
- "Design Pattern Instantiation Directed by Concretization and Specialization"-Peter Kajsa-ComSIS vol. 8, No. 1, Jan. 2011 (DOI:10.2298/CSIS091212032K), pp. 1-32.
- "Templates, C++ FAQ", Jan. 15, 2014, Retrieved from the Internet: URL:http://web.archive.org/web/20140115082944/http://isoccp.org.wiki/faq/templates, pp. 2-27.
- “Design Pattern Instantiation Directed by Concretization and Specialization”—Peter Kajsa—ComSIS vol. 8, No. 1, Jan. 2011 (DOI:10.2298/CSIS091212032K), pp. 1-32.
- Alessandra Warth, et al., "Statically Scoped Object Adaptation with Expanders", ACM OOPSLA'06, Oct. 22-26, 2006, pp. 1-19.