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

Unified Diff: src/arm/macro-assembler-arm.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/arm/macro-assembler-arm.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/macro-assembler-arm.cc
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
index 2a677be525855425b814bb88c8add2440b2ba363..d2663102657a5f6eb04d189435b1582fc7a9d3fa 100644
--- a/src/arm/macro-assembler-arm.cc
+++ b/src/arm/macro-assembler-arm.cc
@@ -3703,20 +3703,37 @@ void MacroAssembler::LoadInstanceDescriptors(Register map,
Register temp = descriptors;
ldr(temp, FieldMemOperand(map, Map::kTransitionsOrBackPointerOffset));
- Label ok, fail;
+ Label ok, fail, load_from_back_pointer;
CheckMap(temp,
scratch,
isolate()->factory()->fixed_array_map(),
&fail,
DONT_DO_SMI_CHECK);
- ldr(descriptors, FieldMemOperand(temp, TransitionArray::kDescriptorsOffset));
+ ldr(temp, FieldMemOperand(temp, TransitionArray::kDescriptorsPointerOffset));
+ ldr(descriptors, FieldMemOperand(temp, JSGlobalPropertyCell::kValueOffset));
jmp(&ok);
+
bind(&fail);
+ CompareRoot(temp, Heap::kUndefinedValueRootIndex);
+ b(ne, &load_from_back_pointer);
mov(descriptors, Operand(FACTORY->empty_descriptor_array()));
+ jmp(&ok);
+
+ bind(&load_from_back_pointer);
+ ldr(temp, FieldMemOperand(temp, Map::kTransitionsOrBackPointerOffset));
+ ldr(temp, FieldMemOperand(temp, TransitionArray::kDescriptorsPointerOffset));
+ ldr(descriptors, FieldMemOperand(temp, JSGlobalPropertyCell::kValueOffset));
+
bind(&ok);
}
+void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) {
+ ldr(dst, FieldMemOperand(map, Map::kBitFieldOffset));
+ DecodeField<Map::NumberOfOwnDescriptorsBits>(dst);
+}
+
+
void MacroAssembler::EnumLength(Register dst, Register map) {
STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
ldr(dst, FieldMemOperand(map, Map::kBitField3Offset));
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698