| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 Unique<Map> MapConstant(HValue* value) { | 392 Unique<Map> MapConstant(HValue* value) { |
| 393 return Unique<Map>::cast(HConstant::cast(value)->GetUnique()); | 393 return Unique<Map>::cast(HConstant::cast(value)->GetUnique()); |
| 394 } | 394 } |
| 395 | 395 |
| 396 friend class HCheckMapsEffects; | 396 friend class HCheckMapsEffects; |
| 397 | 397 |
| 398 HCheckEliminationPhase* phase_; | 398 HCheckEliminationPhase* phase_; |
| 399 HCheckTableEntry entries_[kMaxTrackedObjects]; | 399 HCheckTableEntry entries_[kMaxTrackedObjects]; |
| 400 int16_t cursor_; // Must be <= kMaxTrackedObjects | 400 int16_t cursor_; // Must be <= kMaxTrackedObjects |
| 401 int16_t size_; // Must be <= kMaxTrackedObjects | 401 int16_t size_; // Must be <= kMaxTrackedObjects |
| 402 | 402 // TODO(titzer): STATIC_ASSERT kMaxTrackedObjects < max(cursor_) |
| 403 STATIC_ASSERT((1L << (sizeof(cursor_) * 8)) > kMaxTrackedObjects); | |
| 404 STATIC_ASSERT((1L << (sizeof(size_) * 8)) > kMaxTrackedObjects); | |
| 405 }; | 403 }; |
| 406 | 404 |
| 407 | 405 |
| 408 // Collects instructions that can cause effects that invalidate information | 406 // Collects instructions that can cause effects that invalidate information |
| 409 // needed for check elimination. | 407 // needed for check elimination. |
| 410 class HCheckMapsEffects : public ZoneObject { | 408 class HCheckMapsEffects : public ZoneObject { |
| 411 public: | 409 public: |
| 412 explicit HCheckMapsEffects(Zone* zone) | 410 explicit HCheckMapsEffects(Zone* zone) |
| 413 : maps_stored_(false), | 411 : maps_stored_(false), |
| 414 stores_(5, zone) { } | 412 stores_(5, zone) { } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 if (narrowed_ > 0) PrintF(" narrowed = %2d\n", narrowed_); | 493 if (narrowed_ > 0) PrintF(" narrowed = %2d\n", narrowed_); |
| 496 if (loads_ > 0) PrintF(" loads = %2d\n", loads_); | 494 if (loads_ > 0) PrintF(" loads = %2d\n", loads_); |
| 497 if (empty_ > 0) PrintF(" empty = %2d\n", empty_); | 495 if (empty_ > 0) PrintF(" empty = %2d\n", empty_); |
| 498 if (compares_true_ > 0) PrintF(" cmp_true = %2d\n", compares_true_); | 496 if (compares_true_ > 0) PrintF(" cmp_true = %2d\n", compares_true_); |
| 499 if (compares_false_ > 0) PrintF(" cmp_false = %2d\n", compares_false_); | 497 if (compares_false_ > 0) PrintF(" cmp_false = %2d\n", compares_false_); |
| 500 if (transitions_ > 0) PrintF(" transitions = %2d\n", transitions_); | 498 if (transitions_ > 0) PrintF(" transitions = %2d\n", transitions_); |
| 501 #endif | 499 #endif |
| 502 } | 500 } |
| 503 | 501 |
| 504 } } // namespace v8::internal | 502 } } // namespace v8::internal |
| OLD | NEW |