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

Side by Side Diff: src/full-codegen.h

Issue 9845019: Port count-based profiler to x64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 8 years, 8 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
« no previous file with comments | « src/debug.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 scope_(info->scope()), 83 scope_(info->scope()),
84 nesting_stack_(NULL), 84 nesting_stack_(NULL),
85 loop_depth_(0), 85 loop_depth_(0),
86 global_count_(0), 86 global_count_(0),
87 context_(NULL), 87 context_(NULL),
88 bailout_entries_(info->HasDeoptimizationSupport() 88 bailout_entries_(info->HasDeoptimizationSupport()
89 ? info->function()->ast_node_count() : 0), 89 ? info->function()->ast_node_count() : 0),
90 stack_checks_(2), // There's always at least one. 90 stack_checks_(2), // There's always at least one.
91 type_feedback_cells_(info->HasDeoptimizationSupport() 91 type_feedback_cells_(info->HasDeoptimizationSupport()
92 ? info->function()->ast_node_count() : 0), 92 ? info->function()->ast_node_count() : 0),
93 ic_total_count_(0), 93 ic_total_count_(0) { }
94 has_self_optimization_header_(false) { }
95 94
96 static bool MakeCode(CompilationInfo* info); 95 static bool MakeCode(CompilationInfo* info);
97 96
98 // Returns the platform-specific size in bytes of the self-optimization
99 // header.
100 static int self_optimization_header_size();
101
102 // Encode state and pc-offset as a BitField<type, start, size>. 97 // Encode state and pc-offset as a BitField<type, start, size>.
103 // Only use 30 bits because we encode the result as a smi. 98 // Only use 30 bits because we encode the result as a smi.
104 class StateField : public BitField<State, 0, 1> { }; 99 class StateField : public BitField<State, 0, 1> { };
105 class PcField : public BitField<unsigned, 1, 30-1> { }; 100 class PcField : public BitField<unsigned, 1, 30-1> { };
106 101
107 static const char* State2String(State state) { 102 static const char* State2String(State state) {
108 switch (state) { 103 switch (state) {
109 case NO_REGISTERS: return "NO_REGISTERS"; 104 case NO_REGISTERS: return "NO_REGISTERS";
110 case TOS_REG: return "TOS_REG"; 105 case TOS_REG: return "TOS_REG";
111 } 106 }
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 Scope* scope_; 784 Scope* scope_;
790 Label return_label_; 785 Label return_label_;
791 NestedStatement* nesting_stack_; 786 NestedStatement* nesting_stack_;
792 int loop_depth_; 787 int loop_depth_;
793 int global_count_; 788 int global_count_;
794 const ExpressionContext* context_; 789 const ExpressionContext* context_;
795 ZoneList<BailoutEntry> bailout_entries_; 790 ZoneList<BailoutEntry> bailout_entries_;
796 ZoneList<BailoutEntry> stack_checks_; 791 ZoneList<BailoutEntry> stack_checks_;
797 ZoneList<TypeFeedbackCellEntry> type_feedback_cells_; 792 ZoneList<TypeFeedbackCellEntry> type_feedback_cells_;
798 int ic_total_count_; 793 int ic_total_count_;
799 bool has_self_optimization_header_;
800 Handle<FixedArray> handler_table_; 794 Handle<FixedArray> handler_table_;
801 Handle<JSGlobalPropertyCell> profiling_counter_; 795 Handle<JSGlobalPropertyCell> profiling_counter_;
802 796
803 friend class NestedStatement; 797 friend class NestedStatement;
804 798
805 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); 799 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator);
806 }; 800 };
807 801
808 802
809 // A map from property names to getter/setter pairs allocated in the zone. 803 // A map from property names to getter/setter pairs allocated in the zone.
(...skipping 14 matching lines...) Expand all
824 } 818 }
825 819
826 private: 820 private:
827 Zone* zone_; 821 Zone* zone_;
828 }; 822 };
829 823
830 824
831 } } // namespace v8::internal 825 } } // namespace v8::internal
832 826
833 #endif // V8_FULL_CODEGEN_H_ 827 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698