google / lldb-eval

lldb-eval is a library for evaluating expressions in the debugger context
Apache License 2.0
72 stars 17 forks source link

Implement `reinterpret_cast` #167

Closed tonkosi closed 3 years ago

tonkosi commented 3 years ago

Explicitly handles reinterpret_cast instead of using just C-style cast.

Result of C-style cast to reference types is also fixed to be lvalue instead of rvalue.

github-actions[bot] commented 3 years ago

Benchmark comparison for a7b788de (base) vs 2c7c791e (PR)

Benchmark                             Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------
BM/AddTwoNumbers                   +0.0045         +0.0045        190179        191037        190148        191002
BM/ArrayDereference                +0.0434         +0.0434        192456        200803        192386        200742
BM/ArraySubscript                  -0.0501         -0.0501        255250        242467        255209        242417
BM/TypeCasting                     +0.0984         +0.0983        542118        595459        542068        595355
BM/ParseInteger                    +0.0181         +0.0184        263064        267826        262923        267769
github-actions[bot] commented 3 years ago

Benchmark comparison for a7b788de (base) vs 6b4bdcc2 (PR)

Benchmark                             Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------
BM/AddTwoNumbers                   +0.0165         +0.0127        180834        183825        180783        183074
BM/ArrayDereference                +0.0053         +0.0057        191265        192272        191160        192251
BM/ArraySubscript                  -0.0001         -0.0008        239654        239628        239628        239435
BM/TypeCasting                     -0.0088         -0.0088        565969        560966        565893        560891
BM/ParseInteger                    -0.0399         -0.0397        253743        243615        253654        243587
github-actions[bot] commented 3 years ago

Benchmark comparison for a7b788de (base) vs c7665ce8 (PR)

Benchmark                             Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------
BM/AddTwoNumbers                   -0.0547         -0.0542        178267        168517        178109        168454
BM/ArrayDereference                -0.1050         -0.1042        186954        167326        186773        167316
BM/ArraySubscript                  -0.0514         -0.0516        220372        209053        220350        208970
BM/TypeCasting                     -0.0099         -0.0099        508753        503723        508726        503671
BM/ParseInteger                    -0.0466         -0.0464        234049        223140        233977        223128
github-actions[bot] commented 3 years ago

Benchmark comparison for a7b788de (base) vs 5b76c8c6 (PR)

Benchmark                             Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------
BM/AddTwoNumbers                   +0.0006         +0.0007        103338        103405        103311        103386
BM/ArrayDereference                +0.0027         +0.0027        106103        106389        106094        106382
BM/ArraySubscript                  +0.0124         +0.0123        138067        139785        138040        139744
BM/TypeCasting                     +0.0248         +0.0248        362349        371346        362298        371268
BM/ParseInteger                    +0.0190         +0.0189        154402        157332        154391        157313