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

Unified Diff: src/ia32/macro-assembler-ia32.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/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index 2012a5ad9d304b0c5c3ebb47c5c4c4283b64d4cc..21ba1d154040dc07c93feafc8ade302acdd2b482 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -669,6 +669,19 @@ void MacroAssembler::AbortIfNotSmi(Register object) {
}
+void MacroAssembler::AbortIfNotFixedArray(Register object) {
+ Label ok, fail;
+ CheckMap(object,
+ 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) {
test(object, Immediate(kSmiTagMask));
Assert(not_equal, "Operand is not a string");
@@ -2518,12 +2531,22 @@ void MacroAssembler::Abort(const char* msg) {
void MacroAssembler::LoadInstanceDescriptors(Register map,
Register descriptors) {
- mov(descriptors,
- FieldOperand(map, Map::kInstanceDescriptorsOrBitField3Offset));
- Label not_smi;
- JumpIfNotSmi(descriptors, &not_smi);
+ mov(descriptors, FieldOperand(map,
+ Map::kInstanceDescriptorsOrBackPointerOffset));
+
+ Label ok, fail;
+ CheckMap(descriptors,
+ isolate()->factory()->fixed_array_map(),
+ &fail,
+ DONT_DO_SMI_CHECK);
+ jmp(&ok);
+ bind(&fail);
mov(descriptors, isolate()->factory()->empty_descriptor_array());
- bind(&not_smi);
+ bind(&ok);
+
+ if (emit_debug_code()) {
+ AbortIfNotFixedArray(descriptors);
Jakob Kummerow 2012/07/10 12:26:25 This check is pretty pointless, don't you think? Y
Toon Verwaest 2012/07/10 13:28:28 Done.
Toon Verwaest 2012/07/10 13:28:28 Done.
+ }
}
@@ -2886,8 +2909,15 @@ void MacroAssembler::CheckEnumCache(Label* call_runtime) {
// check for an enum cache. Leave the map in ebx for the subsequent
// prototype load.
mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset));
- mov(edx, FieldOperand(ebx, Map::kInstanceDescriptorsOrBitField3Offset));
- JumpIfSmi(edx, call_runtime);
+ mov(edx, FieldOperand(ebx, Map::kInstanceDescriptorsOrBackPointerOffset));
+ CheckMap(edx,
+ isolate()->factory()->fixed_array_map(),
+ call_runtime,
+ DONT_DO_SMI_CHECK);
+
+ if (emit_debug_code()) {
+ AbortIfNotFixedArray(edx);
Jakob Kummerow 2012/07/10 12:26:25 This check is entirely pointless. We just did a ma
Toon Verwaest 2012/07/10 13:28:28 Done.
Toon Verwaest 2012/07/10 13:28:28 Done.
+ }
// Check that there is an enum cache in the non-empty instance
// descriptors (edx). This is the case if the next enumeration
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/mark-compact.cc » ('j') | src/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698