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 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2158 DISALLOW_COPY_AND_ASSIGN(HOptimizedGraphBuilder); | 2158 DISALLOW_COPY_AND_ASSIGN(HOptimizedGraphBuilder); |
2159 }; | 2159 }; |
2160 | 2160 |
2161 | 2161 |
2162 Zone* AstContext::zone() const { return owner_->zone(); } | 2162 Zone* AstContext::zone() const { return owner_->zone(); } |
2163 | 2163 |
2164 | 2164 |
2165 class HStatistics V8_FINAL: public Malloced { | 2165 class HStatistics V8_FINAL: public Malloced { |
2166 public: | 2166 public: |
2167 HStatistics() | 2167 HStatistics() |
2168 : timing_(5), | 2168 : times_(5), |
2169 names_(5), | 2169 names_(5), |
2170 sizes_(5), | 2170 sizes_(5), |
2171 create_graph_(0), | |
2172 optimize_graph_(0), | |
2173 generate_code_(0), | |
2174 total_size_(0), | 2171 total_size_(0), |
2175 full_code_gen_(0), | |
2176 source_size_(0) { } | 2172 source_size_(0) { } |
2177 | 2173 |
2178 void Initialize(CompilationInfo* info); | 2174 void Initialize(CompilationInfo* info); |
2179 void Print(); | 2175 void Print(); |
2180 void SaveTiming(const char* name, int64_t ticks, unsigned size); | 2176 void SaveTiming(const char* name, TimeDelta time, unsigned size); |
2181 | 2177 |
2182 void IncrementFullCodeGen(int64_t full_code_gen) { | 2178 void IncrementFullCodeGen(TimeDelta full_code_gen) { |
2183 full_code_gen_ += full_code_gen; | 2179 full_code_gen_ += full_code_gen; |
2184 } | 2180 } |
2185 | 2181 |
2186 void IncrementSubtotals(int64_t create_graph, | 2182 void IncrementSubtotals(TimeDelta create_graph, |
2187 int64_t optimize_graph, | 2183 TimeDelta optimize_graph, |
2188 int64_t generate_code) { | 2184 TimeDelta generate_code) { |
2189 create_graph_ += create_graph; | 2185 create_graph_ += create_graph; |
2190 optimize_graph_ += optimize_graph; | 2186 optimize_graph_ += optimize_graph; |
2191 generate_code_ += generate_code; | 2187 generate_code_ += generate_code; |
2192 } | 2188 } |
2193 | 2189 |
2194 private: | 2190 private: |
2195 List<int64_t> timing_; | 2191 List<TimeDelta> times_; |
2196 List<const char*> names_; | 2192 List<const char*> names_; |
2197 List<unsigned> sizes_; | 2193 List<unsigned> sizes_; |
2198 int64_t create_graph_; | 2194 TimeDelta create_graph_; |
2199 int64_t optimize_graph_; | 2195 TimeDelta optimize_graph_; |
2200 int64_t generate_code_; | 2196 TimeDelta generate_code_; |
2201 unsigned total_size_; | 2197 unsigned total_size_; |
2202 int64_t full_code_gen_; | 2198 TimeDelta full_code_gen_; |
2203 double source_size_; | 2199 double source_size_; |
2204 }; | 2200 }; |
2205 | 2201 |
2206 | 2202 |
2207 class HPhase : public CompilationPhase { | 2203 class HPhase : public CompilationPhase { |
2208 public: | 2204 public: |
2209 HPhase(const char* name, HGraph* graph) | 2205 HPhase(const char* name, HGraph* graph) |
2210 : CompilationPhase(name, graph->info()), | 2206 : CompilationPhase(name, graph->info()), |
2211 graph_(graph) { } | 2207 graph_(graph) { } |
2212 ~HPhase(); | 2208 ~HPhase(); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2318 } | 2314 } |
2319 | 2315 |
2320 private: | 2316 private: |
2321 HGraphBuilder* builder_; | 2317 HGraphBuilder* builder_; |
2322 }; | 2318 }; |
2323 | 2319 |
2324 | 2320 |
2325 } } // namespace v8::internal | 2321 } } // namespace v8::internal |
2326 | 2322 |
2327 #endif // V8_HYDROGEN_H_ | 2323 #endif // V8_HYDROGEN_H_ |
OLD | NEW |