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

Unified Diff: runtime/vm/intermediate_language.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/flow_graph_compiler.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index a2a9d2768a3eeca3dde6f90e183d07cca37b1d3b..faa7c143b204a54bf7897f9bea6be48048da39c7 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -2404,7 +2404,8 @@ static bool MayBeBoxableNumber(intptr_t cid) {
return (cid == kDynamicCid) ||
(cid == kMintCid) ||
(cid == kBigintCid) ||
- (cid == kDoubleCid);
+ (cid == kDoubleCid) ||
+ (cid == kFractionCid);
}
@@ -2423,8 +2424,8 @@ static bool MaybeNumber(CompileType* type) {
static Definition* CanonicalizeStrictCompare(StrictCompareInstr* compare,
bool* negated) {
// Use propagated cid and type information to eliminate number checks.
- // If one of the inputs is not a boxable number (Mint, Double, Bigint), or
- // is not a subtype of num, no need for number checks.
+ // If one of the inputs is not a boxable number (Mint, Double, Bigint,
+ // Fraction), or is not a subtype of num, no need for number checks.
if (compare->needs_number_check()) {
if (!MayBeBoxableNumber(compare->left()->Type()->ToCid()) ||
!MayBeBoxableNumber(compare->right()->Type()->ToCid())) {
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698