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

Unified Diff: src/objects-inl.h

Issue 2625873009: [ast] Remove heap accesses from AST numbering (Closed)
Patch Set: Change climit to real_climit Created 3 years, 11 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
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 5ad593bfa6630d6fe0df69e71a15f6d8efe4a722..e27e04f0d714ec9bc5a2fa6c0aacf33906bd2eec 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1107,12 +1107,7 @@ bool Object::ToUint32(uint32_t* value) {
}
if (IsHeapNumber()) {
double num = HeapNumber::cast(this)->value();
- if (num < 0) return false;
- uint32_t uint_value = FastD2UI(num);
- if (FastUI2D(uint_value) == num) {
- *value = uint_value;
- return true;
- }
+ return DoubleToUint32IfEqualToSelf(num, value);
}
return false;
}

Powered by Google App Engine
This is Rietveld 408576698