Revision: 19456
Author: [email protected]
Date: Tue Feb 18 15:14:23 2014 UTC
Log: A64: Minor code generation improvement: only load the object map
if needed.
[email protected]
Review URL: https://codereview.chromium.org/170503004
http://code.google.com/p/v8/source/detail?r=19456
Modified:
/branches/bleeding_edge/src/a64/stub-cache-a64.cc
=======================================
--- /branches/bleeding_edge/src/a64/stub-cache-a64.cc Tue Feb 18 10:14:11
2014 UTC
+++ /branches/bleeding_edge/src/a64/stub-cache-a64.cc Tue Feb 18 15:14:23
2014 UTC
@@ -888,9 +888,13 @@
reg = holder_reg; // From now on the object will be in holder_reg.
__ Ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset));
} else {
- Register map_reg = scratch1;
- // TODO(jbramley): Skip this load when we don't need the map.
- __ Ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
+ bool need_map = (depth != 1 || check == CHECK_ALL_MAPS) ||
+ heap()->InNewSpace(*prototype);
+ Register map_reg = NoReg;
+ if (need_map) {
+ map_reg = scratch1;
+ __ Ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
+ }
if (depth != 1 || check == CHECK_ALL_MAPS) {
__ CheckMap(map_reg, current_map, miss, DONT_DO_SMI_CHECK);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.