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

Unified Diff: runtime/vm/intrinsifier_ia32.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_ia32.cc
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index b9ea3a19f671a6678add2fa67f781d6402924614..f46e7d0e93819c95f3f13ac68a245b4c77d940c5 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -736,11 +736,14 @@ void Intrinsifier::Integer_equalToInteger(Assembler* assembler) {
__ testl(EAX, Immediate(kSmiTagMask));
__ j(NOT_ZERO, &receiver_not_smi);
- // Left (receiver) is Smi, return false if right is not Double.
+ // Left (receiver) is Smi, return false if right is not Double or Fraction.
// Note that an instance of Mint or Bigint never contains a value that can be
// represented by Smi.
__ movl(EAX, Address(ESP, + 1 * kWordSize)); // Right argument.
- __ CompareClassId(EAX, kDoubleCid, EDI);
+ __ LoadClassId(EDI, EAX);
+ __ cmpl(EDI, Immediate(kDoubleCid));
+ __ j(EQUAL, &fall_through);
+ __ cmpl(EDI, Immediate(kFractionCid));
__ j(EQUAL, &fall_through);
__ LoadObject(EAX, Bool::False()); // Smi == Mint -> false.
__ ret();
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698