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

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

Issue 23747003: Wire up profiling budget to the Code object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 globals_(NULL), 93 globals_(NULL),
94 context_(NULL), 94 context_(NULL),
95 bailout_entries_(info->HasDeoptimizationSupport() 95 bailout_entries_(info->HasDeoptimizationSupport()
96 ? info->function()->ast_node_count() : 0, 96 ? info->function()->ast_node_count() : 0,
97 info->zone()), 97 info->zone()),
98 back_edges_(2, info->zone()), 98 back_edges_(2, info->zone()),
99 type_feedback_cells_(info->HasDeoptimizationSupport() 99 type_feedback_cells_(info->HasDeoptimizationSupport()
100 ? info->function()->ast_node_count() : 0, 100 ? info->function()->ast_node_count() : 0,
101 info->zone()), 101 info->zone()),
102 ic_total_count_(0), 102 ic_total_count_(0),
103 profiling_budget_(),
103 zone_(info->zone()) { 104 zone_(info->zone()) {
104 Initialize(); 105 Initialize();
105 } 106 }
106 107
107 void Initialize(); 108 void Initialize();
108 109
109 static bool MakeCode(CompilationInfo* info); 110 static bool MakeCode(CompilationInfo* info);
110 111
111 // Encode state and pc-offset as a BitField<type, start, size>. 112 // Encode state and pc-offset as a BitField<type, start, size>.
112 // Only use 30 bits because we encode the result as a smi. 113 // Only use 30 bits because we encode the result as a smi.
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 void VisitComma(BinaryOperation* expr); 689 void VisitComma(BinaryOperation* expr);
689 void VisitLogicalExpression(BinaryOperation* expr); 690 void VisitLogicalExpression(BinaryOperation* expr);
690 void VisitArithmeticExpression(BinaryOperation* expr); 691 void VisitArithmeticExpression(BinaryOperation* expr);
691 692
692 void VisitForTypeofValue(Expression* expr); 693 void VisitForTypeofValue(Expression* expr);
693 694
694 void Generate(); 695 void Generate();
695 void PopulateDeoptimizationData(Handle<Code> code); 696 void PopulateDeoptimizationData(Handle<Code> code);
696 void PopulateTypeFeedbackInfo(Handle<Code> code); 697 void PopulateTypeFeedbackInfo(Handle<Code> code);
697 void PopulateTypeFeedbackCells(Handle<Code> code); 698 void PopulateTypeFeedbackCells(Handle<Code> code);
699 void SetProfilingBudgetCell(Handle<Code> code);
698 700
699 Handle<FixedArray> handler_table() { return handler_table_; } 701 Handle<FixedArray> handler_table() { return handler_table_; }
700 702
701 struct BailoutEntry { 703 struct BailoutEntry {
702 BailoutId id; 704 BailoutId id;
703 unsigned pc_and_state; 705 unsigned pc_and_state;
704 }; 706 };
705 707
706 struct BackEdgeEntry { 708 struct BackEdgeEntry {
707 BailoutId id; 709 BailoutId id;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 ZoneList<Handle<Object> >* globals_; 902 ZoneList<Handle<Object> >* globals_;
901 Handle<FixedArray> modules_; 903 Handle<FixedArray> modules_;
902 int module_index_; 904 int module_index_;
903 const ExpressionContext* context_; 905 const ExpressionContext* context_;
904 ZoneList<BailoutEntry> bailout_entries_; 906 ZoneList<BailoutEntry> bailout_entries_;
905 GrowableBitVector prepared_bailout_ids_; 907 GrowableBitVector prepared_bailout_ids_;
906 ZoneList<BackEdgeEntry> back_edges_; 908 ZoneList<BackEdgeEntry> back_edges_;
907 ZoneList<TypeFeedbackCellEntry> type_feedback_cells_; 909 ZoneList<TypeFeedbackCellEntry> type_feedback_cells_;
908 int ic_total_count_; 910 int ic_total_count_;
909 Handle<FixedArray> handler_table_; 911 Handle<FixedArray> handler_table_;
910 Handle<Cell> profiling_counter_; 912 Handle<Cell> profiling_budget_;
911 bool generate_debug_code_; 913 bool generate_debug_code_;
912 Zone* zone_; 914 Zone* zone_;
913 915
914 friend class NestedStatement; 916 friend class NestedStatement;
915 917
916 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 918 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
917 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); 919 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator);
918 }; 920 };
919 921
920 922
(...skipping 15 matching lines...) Expand all
936 } 938 }
937 939
938 private: 940 private:
939 Zone* zone_; 941 Zone* zone_;
940 }; 942 };
941 943
942 944
943 } } // namespace v8::internal 945 } } // namespace v8::internal
944 946
945 #endif // V8_FULL_CODEGEN_H_ 947 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/full-codegen.cc » ('j') | src/full-codegen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698