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

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

Issue 10909007: Sharing of descriptor arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 years, 3 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
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/test-heap-profiler.cc » ('j') | 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 1b0f2fa2d4fb196b3184ef9cf9e8ba8c6fe7ac82..6759b19a28868e5c3c0ce134aea8e6211531b3de 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -2920,19 +2920,36 @@ void MacroAssembler::LoadInstanceDescriptors(Register map,
Register temp = descriptors;
movq(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset));
- Label ok, fail;
+ Label ok, fail, load_from_back_pointer;
CheckMap(temp,
isolate()->factory()->fixed_array_map(),
&fail,
DONT_DO_SMI_CHECK);
- movq(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset));
+ movq(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset));
+ movq(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset));
jmp(&ok);
+
bind(&fail);
+ CompareRoot(temp, Heap::kUndefinedValueRootIndex);
+ j(not_equal, &load_from_back_pointer, Label::kNear);
Move(descriptors, isolate()->factory()->empty_descriptor_array());
+ jmp(&ok);
+
+ bind(&load_from_back_pointer);
+ movq(temp, FieldOperand(temp, Map::kTransitionsOrBackPointerOffset));
+ movq(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset));
+ movq(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset));
+
bind(&ok);
}
+void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) {
+ movq(dst, FieldOperand(map, Map::kBitField3Offset));
+ DecodeField<Map::NumberOfOwnDescriptorsBits>(dst);
+}
+
+
void MacroAssembler::EnumLength(Register dst, Register map) {
STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
movq(dst, FieldOperand(map, Map::kBitField3Offset));
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698