OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 int count_; // The number of values stored in the HValueMap. | 1216 int count_; // The number of values stored in the HValueMap. |
1217 GVNFlagSet present_flags_; // All flags that are in any value in the | 1217 GVNFlagSet present_flags_; // All flags that are in any value in the |
1218 // HValueMap. | 1218 // HValueMap. |
1219 HValueMapListElement* array_; // Primary store - contains the first value | 1219 HValueMapListElement* array_; // Primary store - contains the first value |
1220 // with a given hash. Colliding elements are stored in linked lists. | 1220 // with a given hash. Colliding elements are stored in linked lists. |
1221 HValueMapListElement* lists_; // The linked lists containing hash collisions. | 1221 HValueMapListElement* lists_; // The linked lists containing hash collisions. |
1222 int free_list_head_; // Unused elements in lists_ are on the free list. | 1222 int free_list_head_; // Unused elements in lists_ are on the free list. |
1223 }; | 1223 }; |
1224 | 1224 |
1225 | 1225 |
| 1226 class HSideEffectMap BASE_EMBEDDED { |
| 1227 public: |
| 1228 HSideEffectMap(); |
| 1229 HSideEffectMap(HSideEffectMap& other); |
| 1230 |
| 1231 void Kill(GVNFlagSet flags); |
| 1232 |
| 1233 void Store(GVNFlagSet flags, HInstruction* instr); |
| 1234 |
| 1235 bool IsEmpty() const { return count_ == 0; } |
| 1236 |
| 1237 inline HInstruction* operator[](int i) const { |
| 1238 ASSERT(0 <= i); |
| 1239 ASSERT(i < kNumberOfTrackedSideEffects); |
| 1240 return data_[i]; |
| 1241 } |
| 1242 |
| 1243 private: |
| 1244 int count_; |
| 1245 HInstruction* data_[kNumberOfTrackedSideEffects]; |
| 1246 }; |
| 1247 |
| 1248 |
1226 class HStatistics: public Malloced { | 1249 class HStatistics: public Malloced { |
1227 public: | 1250 public: |
1228 void Initialize(CompilationInfo* info); | 1251 void Initialize(CompilationInfo* info); |
1229 void Print(); | 1252 void Print(); |
1230 void SaveTiming(const char* name, int64_t ticks, unsigned size); | 1253 void SaveTiming(const char* name, int64_t ticks, unsigned size); |
1231 static HStatistics* Instance() { | 1254 static HStatistics* Instance() { |
1232 static SetOncePointer<HStatistics> instance; | 1255 static SetOncePointer<HStatistics> instance; |
1233 if (!instance.is_set()) { | 1256 if (!instance.is_set()) { |
1234 instance.set(new HStatistics()); | 1257 instance.set(new HStatistics()); |
1235 } | 1258 } |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 const char* filename_; | 1397 const char* filename_; |
1375 HeapStringAllocator string_allocator_; | 1398 HeapStringAllocator string_allocator_; |
1376 StringStream trace_; | 1399 StringStream trace_; |
1377 int indent_; | 1400 int indent_; |
1378 }; | 1401 }; |
1379 | 1402 |
1380 | 1403 |
1381 } } // namespace v8::internal | 1404 } } // namespace v8::internal |
1382 | 1405 |
1383 #endif // V8_HYDROGEN_H_ | 1406 #endif // V8_HYDROGEN_H_ |
OLD | NEW |