发明授权
- 专利标题: Dynamically typed unsafe variance
- 专利标题(中): 动态类型不安全差异
-
申请号: US11193692申请日: 2005-07-29
-
公开(公告)号: US07694274B2公开(公告)日: 2010-04-06
- 发明人: Erik Meijer , Anders Hejlsberg , Matthew J. Warren , Luca Bolognese , Peter A. Hallam , Gary S. Katzenberger
- 申请人: Erik Meijer , Anders Hejlsberg , Matthew J. Warren , Luca Bolognese , Peter A. Hallam , Gary S. Katzenberger
- 申请人地址: US WA Redmond
- 专利权人: Microsoft Corporation
- 当前专利权人: Microsoft Corporation
- 当前专利权人地址: US WA Redmond
- 代理机构: Workman Nydegger
- 主分类号: G06F9/44
- IPC分类号: G06F9/44 ; G06F9/45
摘要:
A program execution engine that facilitates generic type variance verification is provided. The execution engine receives a program executable in the form of intermediate language (IL). The program executable can be based on code that includes expression(s) with generic type(s) which have been identified as requiring variance verification (e.g., covariance and/or contra-variance). The execution engine includes a variance verification component that dynamically determines whether value(s) associated with the generic type(s) identified as requiring variance verification comply with the particular variance verification requirement. The variance verification component can provide error information (e.g., throw an exception), if the specified variance is not safely compliant. Variance verification can be based on static checking which places the burden on a source language compiler to emit the run-time checks in intermediate language (IL), if run-time checked variance is required. Additionally, language(s) that do not support variance can treat generic type(s) as non-variant.
公开/授权文献
- US20070028210A1 Dynamically typed unsafe variance 公开/授权日:2007-02-01
信息查询