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

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

Issue 10816005: Swapped transition array and descriptor array. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments, and updated additional code comments. Created 8 years, 4 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/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 9e6c4c978e83246ad351ce4e5d3d1ffc9f018d5b..598e778fdc12eba14e485ce843992f1b123a6496 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -2852,14 +2852,15 @@ void MacroAssembler::ClampDoubleToUint8(XMMRegister input_reg,
void MacroAssembler::LoadInstanceDescriptors(Register map,
Register descriptors) {
- movq(descriptors, FieldOperand(map,
- Map::kInstanceDescriptorsOrBackPointerOffset));
+ Register temp = descriptors;
+ movq(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset));
Label ok, fail;
- CheckMap(descriptors,
+ CheckMap(temp,
isolate()->factory()->fixed_array_map(),
&fail,
DONT_DO_SMI_CHECK);
+ movq(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset));
jmp(&ok);
bind(&fail);
Move(descriptors, isolate()->factory()->empty_descriptor_array());
@@ -4463,13 +4464,17 @@ 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::kInstanceDescriptorsOrBackPointerOffset));
+ movq(rdx, FieldOperand(rbx, Map::kTransitionsOrBackPointerOffset));
CheckMap(rdx,
isolate()->factory()->fixed_array_map(),
call_runtime,
DONT_DO_SMI_CHECK);
+ movq(rdx, FieldOperand(rdx, TransitionArray::kDescriptorsOffset));
+ cmpq(rdx, empty_descriptor_array_value);
+ j(equal, call_runtime);
+
// Check that there is an enum cache in the non-empty instance
// descriptors (rdx). This is the case if the next enumeration
// index field does not contain a smi.
« src/bootstrapper.cc ('K') | « src/transitions-inl.h ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698