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

Unified Diff: src/ia32/macro-assembler-ia32.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
« src/bootstrapper.cc ('K') | « src/heap.cc ('k') | src/mark-compact.h » ('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 6b5c8dabf67351cb50364bf9dd1100d2866b4816..1f7b77ff520d43e12651642ab3d9b0ea392114dd 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -2519,14 +2519,15 @@ void MacroAssembler::Abort(const char* msg) {
void MacroAssembler::LoadInstanceDescriptors(Register map,
Register descriptors) {
- mov(descriptors, FieldOperand(map,
- Map::kInstanceDescriptorsOrBackPointerOffset));
+ Register temp = descriptors;
+ mov(temp, FieldOperand(map, Map::kTransitionsOrBackPointerOffset));
Label ok, fail;
- CheckMap(descriptors,
+ CheckMap(temp,
isolate()->factory()->fixed_array_map(),
&fail,
DONT_DO_SMI_CHECK);
+ mov(descriptors, FieldOperand(temp, TransitionArray::kDescriptorsOffset));
jmp(&ok);
bind(&fail);
mov(descriptors, isolate()->factory()->empty_descriptor_array());
@@ -2893,12 +2894,16 @@ void MacroAssembler::CheckEnumCache(Label* call_runtime) {
// check for an enum cache. Leave the map in ebx for the subsequent
// prototype load.
mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset));
- mov(edx, FieldOperand(ebx, Map::kInstanceDescriptorsOrBackPointerOffset));
+ mov(edx, FieldOperand(ebx, Map::kTransitionsOrBackPointerOffset));
CheckMap(edx,
isolate()->factory()->fixed_array_map(),
call_runtime,
DONT_DO_SMI_CHECK);
+ mov(edx, FieldOperand(edx, TransitionArray::kDescriptorsOffset));
+ cmp(edx, isolate()->factory()->empty_descriptor_array());
+ j(equal, call_runtime);
+
// Check that there is an enum cache in the non-empty instance
// descriptors (edx). This is the case if the next enumeration
// index field does not contain a smi.
« src/bootstrapper.cc ('K') | « src/heap.cc ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698