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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 11358052: Various little cleanups to avoid excessive allocation of handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/intermediate_language.h ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 14483)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -455,7 +455,8 @@
ObjectStore* object_store = Isolate::Current()->object_store();
Condition cond = TokenKindToSmiCondition(kind);
Label done;
- for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) {
+ const intptr_t len = ic_data.NumberOfChecks();
+ for (intptr_t i = 0; i < len; i++) {
// Assert that the Smi is at position 0, if at all.
ASSERT((ic_data.GetReceiverClassIdAt(i) != kSmiCid) || (i == 0));
Label next_test;
@@ -538,9 +539,10 @@
__ j(EQUAL, &identity_compare);
__ LoadClassId(temp, left);
- for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) {
+ const intptr_t len = ic_data.NumberOfChecks();
+ for (intptr_t i = 0; i < len; i++) {
__ cmpl(temp, Immediate(ic_data.GetReceiverClassIdAt(i)));
- if (i == (ic_data.NumberOfChecks() - 1)) {
+ if (i == (len - 1)) {
__ j(NOT_EQUAL, deopt);
} else {
__ j(EQUAL, &identity_compare);
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698