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

Unified Diff: runtime/vm/assembler_x64.cc

Issue 23594011: Loads some large Smis from the object pool on x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « no previous file | runtime/vm/object_x64_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64.cc
===================================================================
--- runtime/vm/assembler_x64.cc (revision 27881)
+++ runtime/vm/assembler_x64.cc (working copy)
@@ -2225,9 +2225,12 @@
bool Assembler::CanLoadFromObjectPool(const Object& object) {
- // TODO(zra, kmillikin): Move the use of large Smis into the constant pool.
+ // TODO(zra, kmillikin): Also load other large immediates from the object
+ // pool
if (object.IsSmi()) {
- return false;
+ // If the raw smi does not fit into a 32-bit signed int, then we'll keep
+ // the raw value in the object pool.
+ return !Utils::IsInt(32, reinterpret_cast<int64_t>(object.raw()));
}
ASSERT(object.IsNotTemporaryScopedHandle());
ASSERT(object.IsOld());
« no previous file with comments | « no previous file | runtime/vm/object_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698