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

Unified Diff: src/x64/macro-assembler-x64.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
« src/objects-inl.h ('K') | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index cda7549df5e24bc2b8ef53478101b2cb85ef1522..5053d6768a66cefd0a21d358cba1475cd17413f8 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -2853,11 +2853,21 @@ void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg,
void MacroAssembler::LoadInstanceDescriptors(Register map,
Register descriptors) {
movq(descriptors, FieldOperand(map,
- Map::kInstanceDescriptorsOrBitField3Offset));
- Label not_smi;
- JumpIfNotSmi(descriptors, &not_smi, Label::kNear);
+ Map::kInstanceDescriptorsOrBackPointerOffset));
+
+ Label ok, fail;
+ CheckMap(descriptors,
+ isolate()->factory()->fixed_array_map(),
+ &fail,
+ DONT_DO_SMI_CHECK);
+ jmp(&ok);
+ bind(&fail);
Move(descriptors, isolate()->factory()->empty_descriptor_array());
- bind(&not_smi);
+ bind(&ok);
+
+ if (emit_debug_code()) {
+ AbortIfNotFixedArray(descriptors);
+ }
}
@@ -2905,6 +2915,19 @@ void MacroAssembler::AbortIfNotSmi(const Operand& 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::AbortIfNotZeroExtended(Register int32_register) {
ASSERT(!int32_register.is(kScratchRegister));
movq(kScratchRegister, 0x100000000l, RelocInfo::NONE);
@@ -4457,8 +4480,16 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) {
// check for an enum cache. Leave the map in rbx for the subsequent
// prototype load.
movq(rbx, FieldOperand(rcx, HeapObject::kMapOffset));
- movq(rdx, FieldOperand(rbx, Map::kInstanceDescriptorsOrBitField3Offset));
- JumpIfSmi(rdx, call_runtime);
+ movq(rdx, FieldOperand(rbx, Map::kInstanceDescriptorsOrBackPointerOffset));
+
+ CheckMap(rdx,
+ isolate()->factory()->fixed_array_map(),
+ call_runtime,
+ DONT_DO_SMI_CHECK);
+
+ if (emit_debug_code()) {
+ AbortIfNotFixedArray(rdx);
+ }
// Check that there is an enum cache in the non-empty instance
// descriptors (rdx). This is the case if the next enumeration
« src/objects-inl.h ('K') | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698