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

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

Issue 11344011: Relational comparisons for unboxed mints. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: better test coverage Created 8 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) 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_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2318 void set_operands_class_id(intptr_t value) { 2318 void set_operands_class_id(intptr_t value) {
2319 operands_class_id_ = value; 2319 operands_class_id_ = value;
2320 } 2320 }
2321 2321
2322 intptr_t operands_class_id() const { return operands_class_id_; } 2322 intptr_t operands_class_id() const { return operands_class_id_; }
2323 2323
2324 virtual void PrintOperandsTo(BufferFormatter* f) const; 2324 virtual void PrintOperandsTo(BufferFormatter* f) const;
2325 2325
2326 virtual bool CanDeoptimize() const { 2326 virtual bool CanDeoptimize() const {
2327 return (operands_class_id() != kDoubleCid) 2327 return (operands_class_id() != kDoubleCid)
2328 && (operands_class_id() != kMintCid)
2328 && (operands_class_id() != kSmiCid); 2329 && (operands_class_id() != kSmiCid);
2329 } 2330 }
2330 virtual bool HasSideEffect() const { 2331 virtual bool HasSideEffect() const {
2331 return (operands_class_id() != kDoubleCid) 2332 return (operands_class_id() != kDoubleCid)
2333 && (operands_class_id() != kMintCid)
2332 && (operands_class_id() != kSmiCid); 2334 && (operands_class_id() != kSmiCid);
2333 } 2335 }
2334 2336
2335 virtual intptr_t ResultCid() const; 2337 virtual intptr_t ResultCid() const;
2336 2338
2337 virtual void EmitBranchCode(FlowGraphCompiler* compiler, 2339 virtual void EmitBranchCode(FlowGraphCompiler* compiler,
2338 BranchInstr* branch); 2340 BranchInstr* branch);
2339 2341
2340 2342
2341 virtual intptr_t DeoptimizationTarget() const { 2343 virtual intptr_t DeoptimizationTarget() const {
2342 return GetDeoptId(); 2344 return GetDeoptId();
2343 } 2345 }
2344 2346
2345 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 2347 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
2346 ASSERT((idx == 0) || (idx == 1)); 2348 ASSERT((idx == 0) || (idx == 1));
2347 return (operands_class_id() == kDoubleCid) ? kUnboxedDouble : kTagged; 2349 if (operands_class_id() == kDoubleCid) return kUnboxedDouble;
2350 if (operands_class_id() == kMintCid) return kUnboxedMint;
2351 return kTagged;
2348 } 2352 }
2349 2353
2350 private: 2354 private:
2351 const ICData* ic_data_; 2355 const ICData* ic_data_;
2352 const intptr_t token_pos_; 2356 const intptr_t token_pos_;
2353 intptr_t operands_class_id_; // class id of both operands. 2357 intptr_t operands_class_id_; // class id of both operands.
2354 2358
2355 DISALLOW_COPY_AND_ASSIGN(RelationalOpInstr); 2359 DISALLOW_COPY_AND_ASSIGN(RelationalOpInstr);
2356 }; 2360 };
2357 2361
(...skipping 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after
4171 ForwardInstructionIterator* current_iterator_; 4175 ForwardInstructionIterator* current_iterator_;
4172 4176
4173 private: 4177 private:
4174 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 4178 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
4175 }; 4179 };
4176 4180
4177 4181
4178 } // namespace dart 4182 } // namespace dart
4179 4183
4180 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 4184 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698