OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 #include "src/hydrogen-gvn.h" | 6 #include "src/hydrogen-gvn.h" |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
11 | 11 |
12 class HInstructionMap FINAL : public ZoneObject { | 12 class HInstructionMap final : public ZoneObject { |
13 public: | 13 public: |
14 HInstructionMap(Zone* zone, SideEffectsTracker* side_effects_tracker) | 14 HInstructionMap(Zone* zone, SideEffectsTracker* side_effects_tracker) |
15 : array_size_(0), | 15 : array_size_(0), |
16 lists_size_(0), | 16 lists_size_(0), |
17 count_(0), | 17 count_(0), |
18 array_(NULL), | 18 array_(NULL), |
19 lists_(NULL), | 19 lists_(NULL), |
20 free_list_head_(kNil), | 20 free_list_head_(kNil), |
21 side_effects_tracker_(side_effects_tracker) { | 21 side_effects_tracker_(side_effects_tracker) { |
22 ResizeLists(kInitialSize, zone); | 22 ResizeLists(kInitialSize, zone); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 HInstructionMapListElement* array_; | 63 HInstructionMapListElement* array_; |
64 // Primary store - contains the first value | 64 // Primary store - contains the first value |
65 // with a given hash. Colliding elements are stored in linked lists. | 65 // with a given hash. Colliding elements are stored in linked lists. |
66 HInstructionMapListElement* lists_; | 66 HInstructionMapListElement* lists_; |
67 // The linked lists containing hash collisions. | 67 // The linked lists containing hash collisions. |
68 int free_list_head_; // Unused elements in lists_ are on the free list. | 68 int free_list_head_; // Unused elements in lists_ are on the free list. |
69 SideEffectsTracker* side_effects_tracker_; | 69 SideEffectsTracker* side_effects_tracker_; |
70 }; | 70 }; |
71 | 71 |
72 | 72 |
73 class HSideEffectMap FINAL BASE_EMBEDDED { | 73 class HSideEffectMap final BASE_EMBEDDED { |
74 public: | 74 public: |
75 HSideEffectMap(); | 75 HSideEffectMap(); |
76 explicit HSideEffectMap(HSideEffectMap* other); | 76 explicit HSideEffectMap(HSideEffectMap* other); |
77 HSideEffectMap& operator= (const HSideEffectMap& other); | 77 HSideEffectMap& operator= (const HSideEffectMap& other); |
78 | 78 |
79 void Kill(SideEffects side_effects); | 79 void Kill(SideEffects side_effects); |
80 | 80 |
81 void Store(SideEffects side_effects, HInstruction* instr); | 81 void Store(SideEffects side_effects, HInstruction* instr); |
82 | 82 |
83 bool IsEmpty() const { return count_ == 0; } | 83 bool IsEmpty() const { return count_ == 0; } |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 dominated); | 888 dominated); |
889 successor_map->Kill(side_effects_on_all_paths); | 889 successor_map->Kill(side_effects_on_all_paths); |
890 successor_dominators->Kill(side_effects_on_all_paths); | 890 successor_dominators->Kill(side_effects_on_all_paths); |
891 } | 891 } |
892 } | 892 } |
893 current = next; | 893 current = next; |
894 } | 894 } |
895 } | 895 } |
896 | 896 |
897 } } // namespace v8::internal | 897 } } // namespace v8::internal |
OLD | NEW |