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

Unified Diff: src/arm/macro-assembler-arm.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
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/bootstrapper.cc » ('J')
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 7089a6213de8b2e0494dc085f5fe8ff4411b5312..d51197b374b841796bdf3e3a9a02a1ab3dfe8d98 100644
--- a/src/arm/macro-assembler-arm.cc
+++ b/src/arm/macro-assembler-arm.cc
@@ -3679,15 +3679,16 @@ void MacroAssembler::ClampDoubleToUint8(Register result_reg,
void MacroAssembler::LoadInstanceDescriptors(Register map,
Register descriptors,
Register scratch) {
- ldr(descriptors,
- FieldMemOperand(map, Map::kInstanceDescriptorsOrBackPointerOffset));
+ Register temp = descriptors;
+ ldr(temp, FieldMemOperand(map, Map::kTransitionsOrBackPointerOffset));
Label ok, fail;
- CheckMap(descriptors,
+ CheckMap(temp,
scratch,
isolate()->factory()->fixed_array_map(),
&fail,
DONT_DO_SMI_CHECK);
+ ldr(descriptors, FieldMemOperand(temp, TransitionArray::kDescriptorsOffset));
jmp(&ok);
bind(&fail);
mov(descriptors, Operand(FACTORY->empty_descriptor_array()));
@@ -3700,9 +3701,6 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) {
// Preload a couple of values used in the loop.
Register empty_fixed_array_value = r6;
LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex);
- Register empty_descriptor_array_value = r7;
- LoadRoot(empty_descriptor_array_value,
- Heap::kEmptyDescriptorArrayRootIndex);
mov(r1, r0);
bind(&next);
@@ -3716,7 +3714,7 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) {
// check for an enum cache. Leave the map in r2 for the subsequent
// prototype load.
ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset));
- ldr(r3, FieldMemOperand(r2, Map::kInstanceDescriptorsOrBackPointerOffset));
+ ldr(r3, FieldMemOperand(r2, Map::kTransitionsOrBackPointerOffset));
CheckMap(r3,
r7,
@@ -3724,6 +3722,11 @@ void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) {
call_runtime,
DONT_DO_SMI_CHECK);
+ LoadRoot(r7, Heap::kEmptyDescriptorArrayRootIndex);
+ ldr(r3, FieldMemOperand(r3, TransitionArray::kDescriptorsOffset));
+ cmp(r3, r7);
+ b(eq, call_runtime);
+
// Check that there is an enum cache in the non-empty instance
// descriptors (r3). This is the case if the next enumeration
// index field does not contain a smi.
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/bootstrapper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698