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

Unified Diff: src/ia32/macro-assembler-ia32.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/ia32/macro-assembler-ia32.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index 9c5f31e2cf4c5d00af038c08f8852ffb0dceba4d..c71fa005cea1660ce10a490422f29b752e1f29df 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -2576,19 +2576,36 @@ void MacroAssembler::LoadInstanceDescriptors(Register map,
Register temp = descriptors;
mov(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);
- mov(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset));
+ mov(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset));
+ mov(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset));
jmp(&ok);
+
bind(&fail);
+ cmp(temp, isolate()->factory()->undefined_value());
+ j(not_equal, &load_from_back_pointer, Label::kNear);
mov(descriptors, isolate()->factory()->empty_descriptor_array());
+ jmp(&ok);
+
+ bind(&load_from_back_pointer);
+ mov(temp, FieldOperand(temp, Map::kTransitionsOrBackPointerOffset));
+ mov(temp, FieldOperand(temp, TransitionArray::kDescriptorsPointerOffset));
+ mov(descriptors, FieldOperand(temp, JSGlobalPropertyCell::kValueOffset));
+
bind(&ok);
}
+void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) {
+ mov(dst, FieldOperand(map, Map::kBitField3Offset));
+ DecodeField<Map::NumberOfOwnDescriptorsBits>(dst);
+}
+
+
void MacroAssembler::LoadPowerOf2(XMMRegister dst,
Register scratch,
int power) {
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698