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

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

Issue 10918097: Allow smi comparisons to have constant operands. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_FLOW_GRAPH_COMPILER_X64_H_ 5 #ifndef VM_FLOW_GRAPH_COMPILER_X64_H_
6 #define VM_FLOW_GRAPH_COMPILER_X64_H_ 6 #define VM_FLOW_GRAPH_COMPILER_X64_H_
7 7
8 #ifndef VM_FLOW_GRAPH_COMPILER_H_ 8 #ifndef VM_FLOW_GRAPH_COMPILER_H_
9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_x64.h. 9 #error Include flow_graph_compiler.h instead of flow_graph_compiler_x64.h.
10 #endif 10 #endif
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if (current_block_ == NULL) { 201 if (current_block_ == NULL) {
202 return CatchClauseNode::kInvalidTryIndex; 202 return CatchClauseNode::kInvalidTryIndex;
203 } 203 }
204 return current_block_->try_index(); 204 return current_block_->try_index();
205 } 205 }
206 206
207 // Returns true if the generated code does not call other Dart code or 207 // Returns true if the generated code does not call other Dart code or
208 // runtime. Only deoptimization is allowed to occur. Closures are not leaf. 208 // runtime. Only deoptimization is allowed to occur. Closures are not leaf.
209 bool IsLeaf() const; 209 bool IsLeaf() const;
210 210
211 static Condition FlipCondition(Condition condition);
212
213 static bool EvaluateCondition(Condition condition, intptr_t l, intptr_t r);
214
211 private: 215 private:
212 void GenerateDeferredCode(); 216 void GenerateDeferredCode();
213 217
214 void EmitInstructionPrologue(Instruction* instr); 218 void EmitInstructionPrologue(Instruction* instr);
215 void EmitInstructionEpilogue(Instruction* instr); 219 void EmitInstructionEpilogue(Instruction* instr);
216 220
217 // Emit code to load a Value into register 'dst'. 221 // Emit code to load a Value into register 'dst'.
218 void LoadValue(Register dst, Value* value); 222 void LoadValue(Register dst, Value* value);
219 223
220 void EmitStaticCall(const Function& function, 224 void EmitStaticCall(const Function& function,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 // that should be used when deoptimizing we store it in this variable. 321 // that should be used when deoptimizing we store it in this variable.
318 // In future AddDeoptStub should be moved out of the instruction template. 322 // In future AddDeoptStub should be moved out of the instruction template.
319 Environment* pending_deoptimization_env_; 323 Environment* pending_deoptimization_env_;
320 324
321 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler); 325 DISALLOW_COPY_AND_ASSIGN(FlowGraphCompiler);
322 }; 326 };
323 327
324 } // namespace dart 328 } // namespace dart
325 329
326 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_ 330 #endif // VM_FLOW_GRAPH_COMPILER_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698