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

Side by Side Diff: runtime/vm/opt_code_generator_ia32.h

Issue 8588002: Better tracing of deoptimization (added a reason id and printing of source). Fix a bug with exces... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_OPT_CODE_GENERATOR_IA32_H_ 5 #ifndef VM_OPT_CODE_GENERATOR_IA32_H_
6 #define VM_OPT_CODE_GENERATOR_IA32_H_ 6 #define VM_OPT_CODE_GENERATOR_IA32_H_
7 7
8 #ifndef VM_OPT_CODE_GENERATOR_H_ 8 #ifndef VM_OPT_CODE_GENERATOR_H_
9 #error Do not include opt_code_generator_ia32.h; use opt_code_generator.h. 9 #error Do not include opt_code_generator_ia32.h; use opt_code_generator.h.
10 #endif 10 #endif
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 virtual bool TryIntrinsify(); 47 virtual bool TryIntrinsify();
48 virtual void GeneratePreEntryCode(); 48 virtual void GeneratePreEntryCode();
49 virtual bool IsOptimizing() const { return true; } 49 virtual bool IsOptimizing() const { return true; }
50 50
51 virtual void CountBackwardLoop() {} 51 virtual void CountBackwardLoop() {}
52 virtual void GenerateDeferredCode(); 52 virtual void GenerateDeferredCode();
53 53
54 private: 54 private:
55 friend class DeoptimizationBlob; 55 friend class DeoptimizationBlob;
56 56
57 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node);
58 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node, 57 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node,
59 Register reg1); 58 DeoptReasonId reason_id);
60 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node, 59 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node,
61 Register reg1, 60 Register reg1,
62 Register reg2); 61 DeoptReasonId reason_id);
63 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node, 62 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node,
64 Register reg1, 63 Register reg1,
65 Register reg2, 64 Register reg2,
66 Register reg3); 65 DeoptReasonId reason_id);
66 DeoptimizationBlob* AddDeoptimizationBlob(AstNode* node,
67 Register reg1,
68 Register reg2,
69 Register reg3,
70 DeoptReasonId reason_id);
67 71
68 void IntrinsifyGetter(); 72 void IntrinsifyGetter();
69 void IntrinsifySetter(); 73 void IntrinsifySetter();
70 74
71 void InlineInstanceGettersWithSameTarget(AstNode* node, 75 void InlineInstanceGettersWithSameTarget(AstNode* node,
72 intptr_t id, 76 intptr_t id,
73 AstNode* receiver, 77 AstNode* receiver,
74 const String& field_name, 78 const String& field_name,
75 Register recv_reg); 79 Register recv_reg);
76 void InlineInstanceSettersWithSameTarget(AstNode* node, 80 void InlineInstanceSettersWithSameTarget(AstNode* node,
(...skipping 29 matching lines...) Expand all
106 void GenerateSmiShiftBinaryOp(BinaryOpNode* node); 110 void GenerateSmiShiftBinaryOp(BinaryOpNode* node);
107 111
108 void GenerateDoubleBinaryOp(BinaryOpNode* node); 112 void GenerateDoubleBinaryOp(BinaryOpNode* node);
109 void GenerateMintBinaryOp(BinaryOpNode* node, bool allow_smi); 113 void GenerateMintBinaryOp(BinaryOpNode* node, bool allow_smi);
110 void CheckIfDoubleOrSmi(Register reg, 114 void CheckIfDoubleOrSmi(Register reg,
111 Register temp, 115 Register temp,
112 Label* is_smi, 116 Label* is_smi,
113 Label* not_double_or_smi); 117 Label* not_double_or_smi);
114 void GenerateDirectCall(intptr_t node_id, 118 void GenerateDirectCall(intptr_t node_id,
115 intptr_t token_index, 119 intptr_t token_index,
116 Function& target, 120 const Function& target,
117 intptr_t arg_count, 121 intptr_t arg_count,
118 const Array& optional_argument_names); 122 const Array& optional_argument_names);
119 void GenerateCheckedInstanceCalls(AstNode* node, 123 void GenerateCheckedInstanceCalls(AstNode* node,
120 AstNode* receiver, 124 AstNode* receiver,
121 intptr_t node_id, 125 intptr_t node_id,
122 intptr_t token_index, 126 intptr_t token_index,
123 intptr_t num_args, 127 intptr_t num_args,
124 const Array& optional_argument_names); 128 const Array& optional_arguments_names);
129 void GenerateInlineCacheCall(intptr_t node_id,
130 intptr_t token_index,
131 const ICData& ic_data,
132 intptr_t num_args,
133 const Array& optional_arguments_names);
134 void NormalizeClassChecks(const ICData& ic_data,
135 const Function& null_target,
136 GrowableArray<const Class*>* classes,
137 GrowableArray<const Function*>* targets);
125 bool GenerateSmiComparison(ComparisonNode* node); 138 bool GenerateSmiComparison(ComparisonNode* node);
126 void GenerateSmiEquality(ComparisonNode* node); 139 void GenerateSmiEquality(ComparisonNode* node);
127 bool GenerateDoubleComparison(ComparisonNode* node); 140 bool GenerateDoubleComparison(ComparisonNode* node);
128 bool GenerateEqualityComparison(ComparisonNode* node); 141 bool GenerateEqualityComparison(ComparisonNode* node);
129 void GenerateLogicalBinaryOp(BinaryOpNode* node); 142 void GenerateLogicalBinaryOp(BinaryOpNode* node);
130 void GenerateConditionalJumps(const CodeGenInfo& nInfo, Condition condition); 143 void GenerateConditionalJumps(const CodeGenInfo& nInfo, Condition condition);
131 bool TryInlineInstanceCall(InstanceCallNode* node); 144 bool TryInlineInstanceCall(InstanceCallNode* node);
132 bool TryInlineStaticCall(StaticCallNode* node); 145 bool TryInlineStaticCall(StaticCallNode* node);
133 146
134 bool IsResultInEaxRequested(AstNode* node) const; 147 bool IsResultInEaxRequested(AstNode* node) const;
135 bool NodeMayBeSmi(AstNode* node) const; 148 bool NodeMayBeSmi(AstNode* node) const;
136 149
137 void PrintCollectedClassesAtId(AstNode* node, intptr_t id); 150 void PrintCollectedClassesAtId(AstNode* node, intptr_t id);
138 void TraceOpt(AstNode* node, const char* message); 151 void TraceOpt(AstNode* node, const char* message);
139 void TraceNotOpt(AstNode* node, const char* message); 152 void TraceNotOpt(AstNode* node, const char* message);
140 153
141 GrowableArray<DeoptimizationBlob*> deoptimization_blobs_; 154 GrowableArray<DeoptimizationBlob*> deoptimization_blobs_;
142 const Class& smi_class_; 155 const Class& smi_class_;
143 const Class& double_class_; 156 const Class& double_class_;
144 157
145 DISALLOW_IMPLICIT_CONSTRUCTORS(OptimizingCodeGenerator); 158 DISALLOW_IMPLICIT_CONSTRUCTORS(OptimizingCodeGenerator);
146 }; 159 };
147 160
148 } // namespace dart 161 } // namespace dart
149 162
150 163
151 #endif // VM_OPT_CODE_GENERATOR_IA32_H_ 164 #endif // VM_OPT_CODE_GENERATOR_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698