OLD | NEW |
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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
6 | 6 |
7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
8 | 8 |
9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 | 477 |
478 void FlowGraphCompiler::GenerateNumberTypeCheck(Register kClassIdReg, | 478 void FlowGraphCompiler::GenerateNumberTypeCheck(Register kClassIdReg, |
479 const AbstractType& type, | 479 const AbstractType& type, |
480 Label* is_instance_lbl, | 480 Label* is_instance_lbl, |
481 Label* is_not_instance_lbl) { | 481 Label* is_not_instance_lbl) { |
482 GrowableArray<intptr_t> args; | 482 GrowableArray<intptr_t> args; |
483 if (type.IsNumberType()) { | 483 if (type.IsNumberType()) { |
484 args.Add(kDoubleCid); | 484 args.Add(kDoubleCid); |
485 args.Add(kMintCid); | 485 args.Add(kMintCid); |
486 args.Add(kBigintCid); | 486 args.Add(kBigintCid); |
487 } else if (type.IsIntInterface()) { | 487 } else if (type.IsIntType()) { |
488 args.Add(kMintCid); | 488 args.Add(kMintCid); |
489 args.Add(kBigintCid); | 489 args.Add(kBigintCid); |
490 } else if (type.IsDoubleType()) { | 490 } else if (type.IsDoubleType()) { |
491 args.Add(kDoubleCid); | 491 args.Add(kDoubleCid); |
492 } | 492 } |
493 CheckClassIds(kClassIdReg, args, is_instance_lbl, is_not_instance_lbl); | 493 CheckClassIds(kClassIdReg, args, is_instance_lbl, is_not_instance_lbl); |
494 } | 494 } |
495 | 495 |
496 | 496 |
497 void FlowGraphCompiler::GenerateStringTypeCheck(Register kClassIdReg, | 497 void FlowGraphCompiler::GenerateStringTypeCheck(Register kClassIdReg, |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 case ABOVE: return unsigned_left > unsigned_right; | 848 case ABOVE: return unsigned_left > unsigned_right; |
849 case ABOVE_EQUAL: return unsigned_left >= unsigned_right; | 849 case ABOVE_EQUAL: return unsigned_left >= unsigned_right; |
850 default: | 850 default: |
851 UNIMPLEMENTED(); | 851 UNIMPLEMENTED(); |
852 return false; | 852 return false; |
853 } | 853 } |
854 } | 854 } |
855 | 855 |
856 | 856 |
857 } // namespace dart | 857 } // namespace dart |
OLD | NEW |