Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: src/hydrogen.h

Issue 23295034: Add Chromium-style TimeDelta, Time and TimeTicks classes, and a new ElapsedTimer class. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix windows build. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2148 DISALLOW_COPY_AND_ASSIGN(HOptimizedGraphBuilder); 2148 DISALLOW_COPY_AND_ASSIGN(HOptimizedGraphBuilder);
2149 }; 2149 };
2150 2150
2151 2151
2152 Zone* AstContext::zone() const { return owner_->zone(); } 2152 Zone* AstContext::zone() const { return owner_->zone(); }
2153 2153
2154 2154
2155 class HStatistics V8_FINAL: public Malloced { 2155 class HStatistics V8_FINAL: public Malloced {
2156 public: 2156 public:
2157 HStatistics() 2157 HStatistics()
2158 : timing_(5), 2158 : times_(5),
2159 names_(5), 2159 names_(5),
2160 sizes_(5), 2160 sizes_(5),
2161 create_graph_(0),
2162 optimize_graph_(0),
2163 generate_code_(0),
2164 total_size_(0), 2161 total_size_(0),
2165 full_code_gen_(0),
2166 source_size_(0) { } 2162 source_size_(0) { }
2167 2163
2168 void Initialize(CompilationInfo* info); 2164 void Initialize(CompilationInfo* info);
2169 void Print(); 2165 void Print();
2170 void SaveTiming(const char* name, int64_t ticks, unsigned size); 2166 void SaveTiming(const char* name, TimeDelta time, unsigned size);
2171 2167
2172 void IncrementFullCodeGen(int64_t full_code_gen) { 2168 void IncrementFullCodeGen(TimeDelta full_code_gen) {
2173 full_code_gen_ += full_code_gen; 2169 full_code_gen_ += full_code_gen;
2174 } 2170 }
2175 2171
2176 void IncrementSubtotals(int64_t create_graph, 2172 void IncrementSubtotals(TimeDelta create_graph,
2177 int64_t optimize_graph, 2173 TimeDelta optimize_graph,
2178 int64_t generate_code) { 2174 TimeDelta generate_code) {
2179 create_graph_ += create_graph; 2175 create_graph_ += create_graph;
2180 optimize_graph_ += optimize_graph; 2176 optimize_graph_ += optimize_graph;
2181 generate_code_ += generate_code; 2177 generate_code_ += generate_code;
2182 } 2178 }
2183 2179
2184 private: 2180 private:
2185 List<int64_t> timing_; 2181 List<TimeDelta> times_;
2186 List<const char*> names_; 2182 List<const char*> names_;
2187 List<unsigned> sizes_; 2183 List<unsigned> sizes_;
2188 int64_t create_graph_; 2184 TimeDelta create_graph_;
2189 int64_t optimize_graph_; 2185 TimeDelta optimize_graph_;
2190 int64_t generate_code_; 2186 TimeDelta generate_code_;
2191 unsigned total_size_; 2187 unsigned total_size_;
2192 int64_t full_code_gen_; 2188 TimeDelta full_code_gen_;
2193 double source_size_; 2189 double source_size_;
2194 }; 2190 };
2195 2191
2196 2192
2197 class HPhase : public CompilationPhase { 2193 class HPhase : public CompilationPhase {
2198 public: 2194 public:
2199 HPhase(const char* name, HGraph* graph) 2195 HPhase(const char* name, HGraph* graph)
2200 : CompilationPhase(name, graph->info()), 2196 : CompilationPhase(name, graph->info()),
2201 graph_(graph) { } 2197 graph_(graph) { }
2202 ~HPhase(); 2198 ~HPhase();
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 } 2304 }
2309 2305
2310 private: 2306 private:
2311 HGraphBuilder* builder_; 2307 HGraphBuilder* builder_;
2312 }; 2308 };
2313 2309
2314 2310
2315 } } // namespace v8::internal 2311 } } // namespace v8::internal
2316 2312
2317 #endif // V8_HYDROGEN_H_ 2313 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/globals.h ('k') | src/hydrogen.cc » ('j') | src/time/elapsed-timer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698