OSDN Git Service

Fix and improve static evaluation of constant expressions.
authorRoland Levillain <rpl@google.com>
Mon, 6 Oct 2014 18:24:02 +0000 (19:24 +0100)
committerRoland Levillain <rpl@google.com>
Wed, 8 Oct 2014 14:25:11 +0000 (15:25 +0100)
commit93445689c714e53cabf347da4321ecf3023e926c
tree459c38b3c12b335358278b745f431e68c18d0824
parent50940ea8fe668a80c15920d98cae228851ceb990
Fix and improve static evaluation of constant expressions.

- Fix the definition of art::HSub::Evaluate.
- Qualify Evaluate methods as OVERRIDE.
- Evaluate comparisons in a deterministic way: if a
  comparison is true, always return 1 (instead of letting
  the compiler return any non-null value).
- Better exercise static evaluation of constant expressions
  in compiler/optimizing/constant_propagation_test.cc.

Change-Id: I13d0862e5f4eba1275016fb8c3c17e9aff54408b
compiler/optimizing/constant_propagation_test.cc
compiler/optimizing/nodes.h