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

Side by Side Diff: runtime/vm/intrinsifier_arm.cc

Issue 2005723004: Fraction class prototype and test (not to be committed). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: work in progress Created 4 years, 5 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
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 __ LoadObject(R0, Bool::True()); 700 __ LoadObject(R0, Bool::True());
701 __ Ret(); 701 __ Ret();
702 702
703 // At least one of the arguments was not Smi. 703 // At least one of the arguments was not Smi.
704 Label receiver_not_smi; 704 Label receiver_not_smi;
705 __ Bind(&check_for_mint); 705 __ Bind(&check_for_mint);
706 706
707 __ tst(R1, Operand(kSmiTagMask)); // Check receiver. 707 __ tst(R1, Operand(kSmiTagMask)); // Check receiver.
708 __ b(&receiver_not_smi, NE); 708 __ b(&receiver_not_smi, NE);
709 709
710 // Left (receiver) is Smi, return false if right is not Double. 710 // Left (receiver) is Smi, return false if right is not Double or Fraction.
711 // Note that an instance of Mint or Bigint never contains a value that can be 711 // Note that an instance of Mint or Bigint never contains a value that can be
712 // represented by Smi. 712 // represented by Smi.
713 713
714 __ CompareClassId(R0, kDoubleCid, R2); 714 __ LoadClassId(R2, R0);
715 __ CompareImmediate(R2, kDoubleCid);
716 __ b(&fall_through, EQ);
717 __ CompareImmediate(R2, kFractionCid);
715 __ b(&fall_through, EQ); 718 __ b(&fall_through, EQ);
716 __ LoadObject(R0, Bool::False()); // Smi == Mint -> false. 719 __ LoadObject(R0, Bool::False()); // Smi == Mint -> false.
717 __ Ret(); 720 __ Ret();
718 721
719 __ Bind(&receiver_not_smi); 722 __ Bind(&receiver_not_smi);
720 // R1:: receiver. 723 // R1:: receiver.
721 724
722 __ CompareClassId(R1, kMintCid, R2); 725 __ CompareClassId(R1, kMintCid, R2);
723 __ b(&fall_through, NE); 726 __ b(&fall_through, NE);
724 // Receiver is Mint, return false if right is Smi. 727 // Receiver is Mint, return false if right is Smi.
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 __ ldr(R0, Address(R0, TimelineStream::enabled_offset())); 2135 __ ldr(R0, Address(R0, TimelineStream::enabled_offset()));
2133 __ cmp(R0, Operand(0)); 2136 __ cmp(R0, Operand(0));
2134 __ LoadObject(R0, Bool::True(), NE); 2137 __ LoadObject(R0, Bool::True(), NE);
2135 __ LoadObject(R0, Bool::False(), EQ); 2138 __ LoadObject(R0, Bool::False(), EQ);
2136 __ Ret(); 2139 __ Ret();
2137 } 2140 }
2138 2141
2139 } // namespace dart 2142 } // namespace dart
2140 2143
2141 #endif // defined TARGET_ARCH_ARM 2144 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698