Revision: 12319
Author: [email protected]
Date: Thu Aug 16 04:42:02 2012
Log: MIPS: Swapped transition array and descriptor array.
Port r12298 (7b39ef67)
Original commit message:
Now a map points to a transition array which contains the descriptor array.
The descriptor array is now immutable. The next step is to share the
descriptor array with all back-pointed maps as long as there is a single
line of extension. Maps that require a descriptor array but don't need
transitions will still need a pseudo-empty transition array to contain the
descriptor array.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10827335
Patch from Akos Palfi <[email protected]>.
http://code.google.com/p/v8/source/detail?r=12319
Modified:
/branches/bleeding_edge/src/mips/macro-assembler-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Mon Aug 6
07:13:09 2012
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Thu Aug 16
04:42:02 2012
@@ -5293,15 +5293,16 @@
void MacroAssembler::LoadInstanceDescriptors(Register map,
Register descriptors,
Register scratch) {
- lw(descriptors,
- FieldMemOperand(map, Map::kInstanceDescriptorsOrBackPointerOffset));
+ Register temp = descriptors;
+ lw(temp, FieldMemOperand(map, Map::kTransitionsOrBackPointerOffset));
Label ok, fail;
- CheckMap(descriptors,
+ CheckMap(temp,
scratch,
isolate()->factory()->fixed_array_map(),
&fail,
DONT_DO_SMI_CHECK);
+ lw(descriptors, FieldMemOperand(temp,
TransitionArray::kDescriptorsOffset));
jmp(&ok);
bind(&fail);
LoadRoot(descriptors, Heap::kEmptyDescriptorArrayRootIndex);
@@ -5314,9 +5315,6 @@
// Preload a couple of values used in the loop.
Register empty_fixed_array_value = t2;
LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex);
- Register empty_descriptor_array_value = t3;
- LoadRoot(empty_descriptor_array_value,
- Heap::kEmptyDescriptorArrayRootIndex);
mov(a1, a0);
bind(&next);
@@ -5329,7 +5327,7 @@
// check for an enum cache. Leave the map in a2 for the subsequent
// prototype load.
lw(a2, FieldMemOperand(a1, HeapObject::kMapOffset));
- lw(a3, FieldMemOperand(a2,
Map::kInstanceDescriptorsOrBackPointerOffset));
+ lw(a3, FieldMemOperand(a2, Map::kTransitionsOrBackPointerOffset));
CheckMap(a3,
t3,
@@ -5337,6 +5335,10 @@
call_runtime,
DONT_DO_SMI_CHECK);
+ LoadRoot(t3, Heap::kEmptyDescriptorArrayRootIndex);
+ lw(a3, FieldMemOperand(a3, TransitionArray::kDescriptorsOffset));
+ Branch(call_runtime, eq, a3, Operand(t3));
+
// Check that there is an enum cache in the non-empty instance
// descriptors (a3). This is the case if the next enumeration
// index field does not contain a smi.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev