发明名称 Dynamic binding directed by static types
摘要 A static type, called “dynamic”, is introduced into a statically bound programming language. An expression or subexpression that is defined as a static type called “dynamic” in the source code of a program written in the statically bound programming language, is bound based on its runtime type instead of on its compile time type. Binding can be performed based on a mixture of compile time and runtime types that are based on the specification of types of expressions in source code. This type of binding is called hybrid binding. Operations are bound using the runtime type of constituent expressions (i.e., the runtime type of a receiver, an argument, or an operand) typed as dynamic and the compile time type of static constituents. If any constituent expression of an operation is dynamic, binding occurs at runtime instead of at compile time.
申请公布号 US9075667(B2) 申请公布日期 2015.07.07
申请号 US200912469696 申请日期 2009.05.21
申请人 Microsoft Technology Licensing, LLC 发明人 Torgersen Mads;Hejlsberg Anders;Hugunin James J.;Warren Matthew J.;Gafter Neal;Wischik Lucian Jules;Lippert Robert Eric;Ng Samuel Y.;Burrows Christopher Joseph;Turner Alex C.
分类号 G06F9/44;G06F9/45;G06F9/445 主分类号 G06F9/44
代理机构 代理人 Sullivan Kevin;Drakos Kate;Minhas Micky
主权项 1. A system comprising: a processor and a memory including a compiler configured to cause the processor to: determine if a source code statement in a programming language using semantics for a statically bound language includes an expression or subexpression associated with an operation includes a second type indicating that binding occurs at runtime; defer binding of the operation to runtime when the operation includes the second type indicating binding occurs at runtime, wherein binding of the operation is based on a compile time type of the expression associated with the operation, wherein the expression comprises a subexpression of a first type and wherein binding of the operation is based on a runtime type of a value of a subexpression of the second type; examining a universe of binding candidates for the second type indicating that binding occurs at runtime; determining if the universe of binding candidates is a closed set; generating an error list of dynamic binding errors at compile time when the universe is a closed set; and deferring generation of the error list of binding errors to runtime when the universe is not a closed set.
地址 Redmond WA US