Revision: 12075
Author: [email protected]
Date: Fri Jul 13 02:13:10 2012
Log: MIPS: Swap bitfield3 and backpointer.
Port r12034 (f17b84c0)
Original commit message:
Bitfield3 now has its own field, while the backpointer shares the field
with the descriptor array; which will become the transition array.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10692192
Patch from Akos Palfi <[email protected]>.
http://code.google.com/p/v8/source/detail?r=12075
Modified:
/branches/bleeding_edge/src/mips/full-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.h
/branches/bleeding_edge/src/mips/macro-assembler-mips.cc
/branches/bleeding_edge/src/mips/macro-assembler-mips.h
=======================================
--- /branches/bleeding_edge/src/mips/full-codegen-mips.cc Wed Jun 20
01:58:41 2012
+++ /branches/bleeding_edge/src/mips/full-codegen-mips.cc Fri Jul 13
02:13:10 2012
@@ -1148,7 +1148,7 @@
// We got a map in register v0. Get the enumeration cache from it.
__ bind(&use_cache);
- __ LoadInstanceDescriptors(v0, a1);
+ __ LoadInstanceDescriptors(v0, a1, a2);
__ lw(a1, FieldMemOperand(a1, DescriptorArray::kEnumerationIndexOffset));
__ lw(a2, FieldMemOperand(a1,
DescriptorArray::kEnumCacheBridgeCacheOffset));
@@ -2759,7 +2759,7 @@
// Look for valueOf symbol in the descriptor array, and indicate false if
// found. The type is not checked, so if it is a transition it is a false
// negative.
- __ LoadInstanceDescriptors(a1, t0);
+ __ LoadInstanceDescriptors(a1, t0, a3);
__ lw(a3, FieldMemOperand(t0, FixedArray::kLengthOffset));
// t0: descriptor array
// a3: length of descriptor array
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Thu Jul 5
06:54:20 2012
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Fri Jul 13
02:13:10 2012
@@ -5165,7 +5165,8 @@
void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) {
Register map = ToRegister(instr->map());
Register result = ToRegister(instr->result());
- __ LoadInstanceDescriptors(map, result);
+ Register scratch = ToRegister(instr->scratch());
+ __ LoadInstanceDescriptors(map, result, scratch);
__ lw(result,
FieldMemOperand(result, DescriptorArray::kEnumerationIndexOffset));
__ lw(result,
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.cc Thu Jul 12 08:29:14
2012
+++ /branches/bleeding_edge/src/mips/lithium-mips.cc Fri Jul 13 02:13:10
2012
@@ -2200,8 +2200,9 @@
LInstruction* LChunkBuilder::DoForInCacheArray(HForInCacheArray* instr) {
LOperand* map = UseRegister(instr->map());
+ LOperand* scratch = TempRegister();
return AssignEnvironment(DefineAsRegister(
- new(zone()) LForInCacheArray(map)));
+ new(zone()) LForInCacheArray(map, scratch)));
}
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.h Thu Jul 12 08:29:14 2012
+++ /branches/bleeding_edge/src/mips/lithium-mips.h Fri Jul 13 02:13:10 2012
@@ -2143,13 +2143,15 @@
};
-class LForInCacheArray: public LTemplateInstruction<1, 1, 0> {
+class LForInCacheArray: public LTemplateInstruction<1, 1, 1> {
public:
- explicit LForInCacheArray(LOperand* map) {
+ explicit LForInCacheArray(LOperand* map, LOperand* scratch) {
inputs_[0] = map;
+ temps_[0] = scratch;
}
LOperand* map() { return inputs_[0]; }
+ LOperand* scratch() { return temps_[0]; }
DECLARE_CONCRETE_INSTRUCTION(ForInCacheArray, "for-in-cache-array")
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Mon Jun 18
03:51:23 2012
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Fri Jul 13
02:13:10 2012
@@ -5290,13 +5290,21 @@
void MacroAssembler::LoadInstanceDescriptors(Register map,
- Register descriptors) {
+ Register descriptors,
+ Register scratch) {
lw(descriptors,
- FieldMemOperand(map, Map::kInstanceDescriptorsOrBitField3Offset));
- Label not_smi;
- JumpIfNotSmi(descriptors, ¬_smi);
+ FieldMemOperand(map, Map::kInstanceDescriptorsOrBackPointerOffset));
+
+ Label ok, fail;
+ CheckMap(descriptors,
+ scratch,
+ isolate()->factory()->fixed_array_map(),
+ &fail,
+ DONT_DO_SMI_CHECK);
+ jmp(&ok);
+ bind(&fail);
LoadRoot(descriptors, Heap::kEmptyDescriptorArrayRootIndex);
- bind(¬_smi);
+ bind(&ok);
}
@@ -5320,8 +5328,13 @@
// 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::kInstanceDescriptorsOrBitField3Offset));
- JumpIfSmi(a3, call_runtime);
+ lw(a3, FieldMemOperand(a2,
Map::kInstanceDescriptorsOrBackPointerOffset));
+
+ CheckMap(a3,
+ t3,
+ isolate()->factory()->fixed_array_map(),
+ call_runtime,
+ DONT_DO_SMI_CHECK);
// Check that there is an enum cache in the non-empty instance
// descriptors (a3). This is the case if the next enumeration
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.h Wed Jun 13
04:09:28 2012
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.h Fri Jul 13
02:13:10 2012
@@ -1396,7 +1396,9 @@
DoubleRegister temp_double_reg);
- void LoadInstanceDescriptors(Register map, Register descriptors);
+ void LoadInstanceDescriptors(Register map,
+ Register descriptors,
+ Register scratch);
// Activation support.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev