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

Unified Diff: runtime/vm/assembler_arm64.cc

Issue 392343002: Cleanup of class id loading sequences. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/assembler_arm.cc ('k') | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm64.cc
===================================================================
--- runtime/vm/assembler_arm64.cc (revision 38317)
+++ runtime/vm/assembler_arm64.cc (working copy)
@@ -1095,18 +1095,13 @@
void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) {
- ASSERT(result != TMP);
- ASSERT(object != TMP);
-
- // Make a copy of object since result and object can be the same register.
- mov(TMP, object);
// Load up a null object. We only need it so we can use LoadClassId on it in
// the case that object is a Smi..
- LoadObject(result, Object::null_object(), PP);
+ LoadObject(TMP, Object::null_object(), PP);
// Check if the object is a Smi.
- tsti(TMP, kSmiTagMask);
- // If the object *is* a Smi, load the null object into tmp. o/w leave alone.
- csel(TMP, result, TMP, EQ);
+ tsti(object, kSmiTagMask);
+ // If the object *is* a Smi, use the null object instead. o/w leave alone.
+ csel(TMP, TMP, object, EQ);
// Loads either the cid of the object if it isn't a Smi, or the cid of null
// if it is a Smi, which will be ignored.
LoadClassId(result, TMP, PP);
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698