首页>
外国专利>
Optimistically Assuming Types in a Dynamically Typed Language
Optimistically Assuming Types in a Dynamically Typed Language
展开▼
机译:动态类型化语言中的乐观假设类型
展开▼
页面导航
摘要
著录项
相似文献
摘要
Optimistically type assumptions in a dynamically typed language may involve a compiler parsing code and detecting a program element that results from an operation of the code that has an unspecified type. In response, the compiler may make a first type assumption treating the element as a first type. The assumed type may be selected from multiple types as expected to have a lowest performance cost of the multiple types. The compiler may generate compiled code using the first (assumed) type. During runtime of the compiled code, it may be detected that the first type assumption is invalid for the compiled code and in response a portion of the compiled code may be replaced with other compiled code. The other compiled code may treat the element according to a second type assumption that may be selected as a type expected to have the second lowest performance cost.
展开▼