-
公开(公告)号:US20160321046A1
公开(公告)日:2016-11-03
申请号:US15073500
申请日:2016-03-17
Applicant: Apple Inc.
Inventor: Filip J. Pizlo , Gavin Barraclough
IPC: G06F9/45
CPC classification number: G06F8/443 , G06F8/437 , G06F11/3409 , G06F11/3452 , G06F11/3466 , G06F2201/865 , G06F2201/88
Abstract: A method and an apparatus to execute a code compiled from a source code to access an untyped variable are described. An optimized access code may be compiled in the code with speculative optimization via a type prediction of runtime value of the untyped variable. Invalidity of the type prediction may be dynamically detected for future runtime values of the untyped variable. The code may be updated with an access code compiled for the access without the speculative optimization based on the invalidity detection. The updated code can be executed for the access to the untyped variable without executing the optimized access code.
Abstract translation: 描述了执行从源代码编译的代码以访问无类型变量的方法和装置。 优化的访问代码可以通过对类型预测的无类型变量的运行时值的推测优化来编译在代码中。 可以动态地检测类型预测的无效性,用于未类型化变量的未来运行时值。 可以使用针对访问编译的访问代码更新代码,而无需基于无效性检测的推测优化。 可以执行更新的代码来访问无类型的变量,而不执行优化的访问代码。