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

Side by Side Diff: src/hydrogen.h

Issue 924453002: Fix invalid use of int in Zone. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Windows again... Created 5 years, 10 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_H_ 5 #ifndef V8_HYDROGEN_H_
6 #define V8_HYDROGEN_H_ 6 #define V8_HYDROGEN_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 void Bailout(BailoutReason reason); 2127 void Bailout(BailoutReason reason);
2128 2128
2129 HBasicBlock* CreateJoin(HBasicBlock* first, 2129 HBasicBlock* CreateJoin(HBasicBlock* first,
2130 HBasicBlock* second, 2130 HBasicBlock* second,
2131 BailoutId join_id); 2131 BailoutId join_id);
2132 2132
2133 FunctionState* function_state() const { return function_state_; } 2133 FunctionState* function_state() const { return function_state_; }
2134 2134
2135 void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE; 2135 void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE;
2136 2136
2137 void* operator new(size_t size, Zone* zone) { 2137 void* operator new(size_t size, Zone* zone) { return zone->New(size); }
2138 return zone->New(static_cast<int>(size));
2139 }
2140 void operator delete(void* pointer, Zone* zone) { } 2138 void operator delete(void* pointer, Zone* zone) { }
2141 void operator delete(void* pointer) { } 2139 void operator delete(void* pointer) { }
2142 2140
2143 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 2141 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
2144 2142
2145 protected: 2143 protected:
2146 // Type of a member function that generates inline code for a native function. 2144 // Type of a member function that generates inline code for a native function.
2147 typedef void (HOptimizedGraphBuilder::*InlineFunctionGenerator) 2145 typedef void (HOptimizedGraphBuilder::*InlineFunctionGenerator)
2148 (CallRuntime* call); 2146 (CallRuntime* call);
2149 2147
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
2793 public: 2791 public:
2794 HStatistics() 2792 HStatistics()
2795 : times_(5), 2793 : times_(5),
2796 names_(5), 2794 names_(5),
2797 sizes_(5), 2795 sizes_(5),
2798 total_size_(0), 2796 total_size_(0),
2799 source_size_(0) { } 2797 source_size_(0) { }
2800 2798
2801 void Initialize(CompilationInfo* info); 2799 void Initialize(CompilationInfo* info);
2802 void Print(); 2800 void Print();
2803 void SaveTiming(const char* name, base::TimeDelta time, unsigned size); 2801 void SaveTiming(const char* name, base::TimeDelta time, size_t size);
2804 2802
2805 void IncrementFullCodeGen(base::TimeDelta full_code_gen) { 2803 void IncrementFullCodeGen(base::TimeDelta full_code_gen) {
2806 full_code_gen_ += full_code_gen; 2804 full_code_gen_ += full_code_gen;
2807 } 2805 }
2808 2806
2809 void IncrementCreateGraph(base::TimeDelta delta) { create_graph_ += delta; } 2807 void IncrementCreateGraph(base::TimeDelta delta) { create_graph_ += delta; }
2810 2808
2811 void IncrementOptimizeGraph(base::TimeDelta delta) { 2809 void IncrementOptimizeGraph(base::TimeDelta delta) {
2812 optimize_graph_ += delta; 2810 optimize_graph_ += delta;
2813 } 2811 }
2814 2812
2815 void IncrementGenerateCode(base::TimeDelta delta) { generate_code_ += delta; } 2813 void IncrementGenerateCode(base::TimeDelta delta) { generate_code_ += delta; }
2816 2814
2817 void IncrementSubtotals(base::TimeDelta create_graph, 2815 void IncrementSubtotals(base::TimeDelta create_graph,
2818 base::TimeDelta optimize_graph, 2816 base::TimeDelta optimize_graph,
2819 base::TimeDelta generate_code) { 2817 base::TimeDelta generate_code) {
2820 IncrementCreateGraph(create_graph); 2818 IncrementCreateGraph(create_graph);
2821 IncrementOptimizeGraph(optimize_graph); 2819 IncrementOptimizeGraph(optimize_graph);
2822 IncrementGenerateCode(generate_code); 2820 IncrementGenerateCode(generate_code);
2823 } 2821 }
2824 2822
2825 private: 2823 private:
2826 List<base::TimeDelta> times_; 2824 List<base::TimeDelta> times_;
2827 List<const char*> names_; 2825 List<const char*> names_;
2828 List<unsigned> sizes_; 2826 List<size_t> sizes_;
2829 base::TimeDelta create_graph_; 2827 base::TimeDelta create_graph_;
2830 base::TimeDelta optimize_graph_; 2828 base::TimeDelta optimize_graph_;
2831 base::TimeDelta generate_code_; 2829 base::TimeDelta generate_code_;
2832 unsigned total_size_; 2830 size_t total_size_;
2833 base::TimeDelta full_code_gen_; 2831 base::TimeDelta full_code_gen_;
2834 double source_size_; 2832 double source_size_;
2835 }; 2833 };
2836 2834
2837 2835
2838 class HPhase : public CompilationPhase { 2836 class HPhase : public CompilationPhase {
2839 public: 2837 public:
2840 HPhase(const char* name, HGraph* graph) 2838 HPhase(const char* name, HGraph* graph)
2841 : CompilationPhase(name, graph->info()), 2839 : CompilationPhase(name, graph->info()),
2842 graph_(graph) { } 2840 graph_(graph) { }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2949 } 2947 }
2950 2948
2951 private: 2949 private:
2952 HGraphBuilder* builder_; 2950 HGraphBuilder* builder_;
2953 }; 2951 };
2954 2952
2955 2953
2956 } } // namespace v8::internal 2954 } } // namespace v8::internal
2957 2955
2958 #endif // V8_HYDROGEN_H_ 2956 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/hydrogen.cc » ('j') | src/zone.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698