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

Unified Diff: runtime/vm/intrinsifier_x64.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_mips.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_x64.cc
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index cdb11df87889566bef98ccde1b8fa09180d47a1d..3837aa5f6d3ecde070ea89e266e195ae757fb443 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -660,11 +660,14 @@ void Intrinsifier::Integer_equalToInteger(Assembler* assembler) {
__ testq(RAX, 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.
__ movq(RAX, Address(RSP, + kArgumentOffset * kWordSize));
- __ CompareClassId(RAX, kDoubleCid);
+ __ LoadClassId(TMP, RAX);
+ __ cmpl(TMP, Immediate(kDoubleCid));
+ __ j(EQUAL, &fall_through);
+ __ cmpl(TMP, Immediate(kFractionCid));
__ j(EQUAL, &fall_through);
__ LoadObject(RAX, Bool::False());
__ ret();
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698