- 专利标题: Optimizing intermediate representation of script code by eliminating redundant reference count operations
-
申请号: US14614263申请日: 2015-02-04
-
公开(公告)号: US09383979B2公开(公告)日: 2016-07-05
- 发明人: Ali-Reza Adl-Tabatabai , Guilherme de Lima Ottoni , Michael Paleczny
- 申请人: Facebook, Inc.
- 申请人地址: US CA Menlo Park
- 专利权人: Facebook, Inc.
- 当前专利权人: Facebook, Inc.
- 当前专利权人地址: US CA Menlo Park
- 代理机构: Perkins Coie LLP
- 主分类号: G06F9/45
- IPC分类号: G06F9/45 ; G06F12/02
摘要:
Disclosed here are methods, systems, paradigms and structures for optimizing generation of intermediate representation (IR) for a script code by eliminating redundant object reference count operations from the IR. An IR of the script includes (a) a set of first code that increments a reference count of an object when a programming construct refers to the object, and (b) an associated set of second code which decrements the reference count of the object when a reference to the object is removed. The IR is analyzed to identify a subset of the set of second code which, upon execution, does not decrement the reference count of the object to a zero value. The subset of second code and the first code corresponding to the subset is removed from the IR to generate an optimized IR. The optimized IR is further converted to an executable code.