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

Unified Diff: src/arm/macro-assembler-arm.cc

Issue 10692130: Swap bitfield3 and backpointer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: u Created 8 years, 5 months 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
Index: src/arm/macro-assembler-arm.cc
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
index 933399e00f43bd62c65993cb1b820d0035aa2cc7..cac8ffb5129d8be2c3de037e88d6f28dfaa124b6 100644
--- a/src/arm/macro-assembler-arm.cc
+++ b/src/arm/macro-assembler-arm.cc
@@ -3014,6 +3014,20 @@ void MacroAssembler::AbortIfNotSmi(Register object) {
}
+void MacroAssembler::AbortIfNotFixedArray(Register object, Register scratch) {
+ Label ok, fail;
+ CheckMap(object,
+ scratch,
+ isolate()->factory()->fixed_array_map(),
+ &fail,
+ DONT_DO_SMI_CHECK);
+ jmp(&ok);
+ bind(&fail);
+ Abort("Operand is not a fixed array");
+ bind(&ok);
+}
+
+
void MacroAssembler::AbortIfNotString(Register object) {
STATIC_ASSERT(kSmiTag == 0);
tst(object, Operand(kSmiTagMask));
@@ -3673,13 +3687,25 @@ void MacroAssembler::ClampDoubleToUint8(Register result_reg,
void MacroAssembler::LoadInstanceDescriptors(Register map,
- Register descriptors) {
+ Register descriptors,
+ Register scratch) {
ldr(descriptors,
- FieldMemOperand(map, Map::kInstanceDescriptorsOrBitField3Offset));
- Label not_smi;
- JumpIfNotSmi(descriptors, &not_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);
mov(descriptors, Operand(FACTORY->empty_descriptor_array()));
- bind(&not_smi);
+ bind(&ok);
+
+ if (emit_debug_code()) {
+ AbortIfNotFixedArray(descriptors, scratch);
+ }
}
@@ -3704,8 +3730,17 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) {
// check for an enum cache. Leave the map in r2 for the subsequent
// prototype load.
ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset));
- ldr(r3, FieldMemOperand(r2, Map::kInstanceDescriptorsOrBitField3Offset));
- JumpIfSmi(r3, call_runtime);
+ ldr(r3, FieldMemOperand(r2, Map::kInstanceDescriptorsOrBackPointerOffset));
+
+ CheckMap(r3,
+ r7,
+ isolate()->factory()->fixed_array_map(),
+ call_runtime,
+ DONT_DO_SMI_CHECK);
+
+ if (emit_debug_code()) {
+ AbortIfNotFixedArray(r3, r7);
+ }
// Check that there is an enum cache in the non-empty instance
// descriptors (r3). This is the case if the next enumeration
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/heap.cc » ('j') | src/ia32/macro-assembler-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698