| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 int present_flags_; // All flags that are in any value in the HValueMap. | 931 int present_flags_; // All flags that are in any value in the HValueMap. |
| 932 HValueMapListElement* array_; // Primary store - contains the first value | 932 HValueMapListElement* array_; // Primary store - contains the first value |
| 933 // with a given hash. Colliding elements are stored in linked lists. | 933 // with a given hash. Colliding elements are stored in linked lists. |
| 934 HValueMapListElement* lists_; // The linked lists containing hash collisions. | 934 HValueMapListElement* lists_; // The linked lists containing hash collisions. |
| 935 int free_list_head_; // Unused elements in lists_ are on the free list. | 935 int free_list_head_; // Unused elements in lists_ are on the free list. |
| 936 }; | 936 }; |
| 937 | 937 |
| 938 | 938 |
| 939 class HStatistics: public Malloced { | 939 class HStatistics: public Malloced { |
| 940 public: | 940 public: |
| 941 void Initialize(CompilationInfo* info); |
| 941 void Print(); | 942 void Print(); |
| 942 void SaveTiming(const char* name, int64_t ticks, unsigned size); | 943 void SaveTiming(const char* name, int64_t ticks, unsigned size); |
| 943 static HStatistics* Instance() { | 944 static HStatistics* Instance() { |
| 944 static SetOncePointer<HStatistics> instance; | 945 static SetOncePointer<HStatistics> instance; |
| 945 if (!instance.is_set()) { | 946 if (!instance.is_set()) { |
| 946 instance.set(new HStatistics()); | 947 instance.set(new HStatistics()); |
| 947 } | 948 } |
| 948 return instance.get(); | 949 return instance.get(); |
| 949 } | 950 } |
| 950 | 951 |
| 951 private: | 952 private: |
| 952 | 953 |
| 953 HStatistics() | 954 HStatistics() |
| 954 : timing_(5), | 955 : timing_(5), |
| 955 names_(5), | 956 names_(5), |
| 956 sizes_(5), | 957 sizes_(5), |
| 957 total_(0), | 958 total_(0), |
| 958 total_size_(0), | 959 total_size_(0), |
| 959 full_code_gen_(0) { } | 960 full_code_gen_(0), |
| 961 source_size_(0) { } |
| 960 | 962 |
| 961 List<int64_t> timing_; | 963 List<int64_t> timing_; |
| 962 List<const char*> names_; | 964 List<const char*> names_; |
| 963 List<unsigned> sizes_; | 965 List<unsigned> sizes_; |
| 964 int64_t total_; | 966 int64_t total_; |
| 965 unsigned total_size_; | 967 unsigned total_size_; |
| 966 int64_t full_code_gen_; | 968 int64_t full_code_gen_; |
| 969 double source_size_; |
| 967 }; | 970 }; |
| 968 | 971 |
| 969 | 972 |
| 970 class HPhase BASE_EMBEDDED { | 973 class HPhase BASE_EMBEDDED { |
| 971 public: | 974 public: |
| 972 static const char* const kFullCodeGen; | 975 static const char* const kFullCodeGen; |
| 973 static const char* const kTotal; | 976 static const char* const kTotal; |
| 974 | 977 |
| 975 explicit HPhase(const char* name) { Begin(name, NULL, NULL, NULL); } | 978 explicit HPhase(const char* name) { Begin(name, NULL, NULL, NULL); } |
| 976 HPhase(const char* name, HGraph* graph) { | 979 HPhase(const char* name, HGraph* graph) { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 const char* filename_; | 1093 const char* filename_; |
| 1091 HeapStringAllocator string_allocator_; | 1094 HeapStringAllocator string_allocator_; |
| 1092 StringStream trace_; | 1095 StringStream trace_; |
| 1093 int indent_; | 1096 int indent_; |
| 1094 }; | 1097 }; |
| 1095 | 1098 |
| 1096 | 1099 |
| 1097 } } // namespace v8::internal | 1100 } } // namespace v8::internal |
| 1098 | 1101 |
| 1099 #endif // V8_HYDROGEN_H_ | 1102 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |