| 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 inline HInstruction* at(int i) const { return operator[](i); } |
| 1243 |
| 1244 private: |
| 1245 int count_; |
| 1246 HInstruction* data_[kNumberOfTrackedSideEffects]; |
| 1247 }; |
| 1248 |
| 1249 |
| 1226 class HStatistics: public Malloced { | 1250 class HStatistics: public Malloced { |
| 1227 public: | 1251 public: |
| 1228 void Initialize(CompilationInfo* info); | 1252 void Initialize(CompilationInfo* info); |
| 1229 void Print(); | 1253 void Print(); |
| 1230 void SaveTiming(const char* name, int64_t ticks, unsigned size); | 1254 void SaveTiming(const char* name, int64_t ticks, unsigned size); |
| 1231 static HStatistics* Instance() { | 1255 static HStatistics* Instance() { |
| 1232 static SetOncePointer<HStatistics> instance; | 1256 static SetOncePointer<HStatistics> instance; |
| 1233 if (!instance.is_set()) { | 1257 if (!instance.is_set()) { |
| 1234 instance.set(new HStatistics()); | 1258 instance.set(new HStatistics()); |
| 1235 } | 1259 } |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 const char* filename_; | 1398 const char* filename_; |
| 1375 HeapStringAllocator string_allocator_; | 1399 HeapStringAllocator string_allocator_; |
| 1376 StringStream trace_; | 1400 StringStream trace_; |
| 1377 int indent_; | 1401 int indent_; |
| 1378 }; | 1402 }; |
| 1379 | 1403 |
| 1380 | 1404 |
| 1381 } } // namespace v8::internal | 1405 } } // namespace v8::internal |
| 1382 | 1406 |
| 1383 #endif // V8_HYDROGEN_H_ | 1407 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |