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

Unified Diff: src/arm/lithium-codegen-arm.cc

Issue 11369014: Remove redundant loads in DoCheckMaps (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years 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
« src/arm/lithium-codegen-arm.h ('K') | « src/arm/lithium-codegen-arm.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-codegen-arm.cc
===================================================================
--- src/arm/lithium-codegen-arm.cc (revision 12764)
+++ src/arm/lithium-codegen-arm.cc (working copy)
@@ -4828,13 +4828,12 @@
}
-void LCodeGen::DoCheckMapCommon(Register reg,
- Register scratch,
+void LCodeGen::DoCheckMapCommon(Register scratch,
danno 2012/12/07 10:47:11 can you please rename this to map_reg here and els
Handle<Map> map,
CompareMapMode mode,
LEnvironment* env) {
Label success;
- __ CompareMap(reg, scratch, map, &success, mode);
+ __ CompareMap(scratch, map, &success, mode);
DeoptimizeIf(ne, env);
__ bind(&success);
}
@@ -4848,13 +4847,14 @@
Label success;
SmallMapList* map_set = instr->hydrogen()->map_set();
+ __ ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset));
danno 2012/12/07 10:47:11 can you please rename this to map_reg here and els
for (int i = 0; i < map_set->length() - 1; i++) {
Handle<Map> map = map_set->at(i);
- __ CompareMap(reg, scratch, map, &success, REQUIRE_EXACT_MAP);
+ __ CompareMap(scratch, map, &success, REQUIRE_EXACT_MAP);
__ b(eq, &success);
}
Handle<Map> map = map_set->last();
- DoCheckMapCommon(reg, scratch, map, REQUIRE_EXACT_MAP, instr->environment());
+ DoCheckMapCommon(scratch, map, REQUIRE_EXACT_MAP, instr->environment());
__ bind(&success);
}
@@ -4923,7 +4923,8 @@
// Check prototype maps up to the holder.
while (!current_prototype.is_identical_to(holder)) {
- DoCheckMapCommon(temp1, temp2,
+ __ ldr(temp2, FieldMemOperand(temp1, HeapObject::kMapOffset));
+ DoCheckMapCommon(temp2,
Handle<Map>(current_prototype->map()),
ALLOW_ELEMENT_TRANSITION_MAPS, instr->environment());
current_prototype =
@@ -4933,7 +4934,7 @@
}
// Check the holder map.
- DoCheckMapCommon(temp1, temp2,
+ DoCheckMapCommon(temp2,
Handle<Map>(current_prototype->map()),
ALLOW_ELEMENT_TRANSITION_MAPS, instr->environment());
DeoptimizeIf(ne, instr->environment());
« src/arm/lithium-codegen-arm.h ('K') | « src/arm/lithium-codegen-arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698