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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 7033024: Add bit_field3 to Map objects (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 // Check that there are no elements. Register r1 contains the 917 // Check that there are no elements. Register r1 contains the
918 // current JS object we've reached through the prototype chain. 918 // current JS object we've reached through the prototype chain.
919 __ ldr(r2, FieldMemOperand(r1, JSObject::kElementsOffset)); 919 __ ldr(r2, FieldMemOperand(r1, JSObject::kElementsOffset));
920 __ cmp(r2, empty_fixed_array_value); 920 __ cmp(r2, empty_fixed_array_value);
921 __ b(ne, &call_runtime); 921 __ b(ne, &call_runtime);
922 922
923 // Check that instance descriptors are not empty so that we can 923 // Check that instance descriptors are not empty so that we can
924 // check for an enum cache. Leave the map in r2 for the subsequent 924 // check for an enum cache. Leave the map in r2 for the subsequent
925 // prototype load. 925 // prototype load.
926 __ ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset)); 926 __ ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset));
927 __ ldr(r3, FieldMemOperand(r2, Map::kInstanceDescriptorsOffset)); 927 __ ldr(r3, FieldMemOperand(r2, Map::kInstanceDescriptorsOrBitField3Offset));
928 __ cmp(r3, empty_descriptor_array_value); 928 __ JumpIfSmi(r3, &call_runtime);
929 __ b(eq, &call_runtime);
930 929
931 // Check that there is an enum cache in the non-empty instance 930 // Check that there is an enum cache in the non-empty instance
932 // descriptors (r3). This is the case if the next enumeration 931 // descriptors (r3). This is the case if the next enumeration
933 // index field does not contain a smi. 932 // index field does not contain a smi.
934 __ ldr(r3, FieldMemOperand(r3, DescriptorArray::kEnumerationIndexOffset)); 933 __ ldr(r3, FieldMemOperand(r3, DescriptorArray::kEnumerationIndexOffset));
935 __ JumpIfSmi(r3, &call_runtime); 934 __ JumpIfSmi(r3, &call_runtime);
936 935
937 // For all objects but the receiver, check that the cache is empty. 936 // For all objects but the receiver, check that the cache is empty.
938 Label check_prototype; 937 Label check_prototype;
939 __ cmp(r1, r0); 938 __ cmp(r1, r0);
(...skipping 24 matching lines...) Expand all
964 // to do a slow check. 963 // to do a slow check.
965 Label fixed_array; 964 Label fixed_array;
966 __ mov(r2, r0); 965 __ mov(r2, r0);
967 __ ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset)); 966 __ ldr(r1, FieldMemOperand(r2, HeapObject::kMapOffset));
968 __ LoadRoot(ip, Heap::kMetaMapRootIndex); 967 __ LoadRoot(ip, Heap::kMetaMapRootIndex);
969 __ cmp(r1, ip); 968 __ cmp(r1, ip);
970 __ b(ne, &fixed_array); 969 __ b(ne, &fixed_array);
971 970
972 // We got a map in register r0. Get the enumeration cache from it. 971 // We got a map in register r0. Get the enumeration cache from it.
973 __ bind(&use_cache); 972 __ bind(&use_cache);
974 __ ldr(r1, FieldMemOperand(r0, Map::kInstanceDescriptorsOffset)); 973 __ LoadInstanceDescriptors(r0, r1);
975 __ ldr(r1, FieldMemOperand(r1, DescriptorArray::kEnumerationIndexOffset)); 974 __ ldr(r1, FieldMemOperand(r1, DescriptorArray::kEnumerationIndexOffset));
976 __ ldr(r2, FieldMemOperand(r1, DescriptorArray::kEnumCacheBridgeCacheOffset)); 975 __ ldr(r2, FieldMemOperand(r1, DescriptorArray::kEnumCacheBridgeCacheOffset));
977 976
978 // Setup the four remaining stack slots. 977 // Setup the four remaining stack slots.
979 __ push(r0); // Map. 978 __ push(r0); // Map.
980 __ ldr(r1, FieldMemOperand(r2, FixedArray::kLengthOffset)); 979 __ ldr(r1, FieldMemOperand(r2, FixedArray::kLengthOffset));
981 __ mov(r0, Operand(Smi::FromInt(0))); 980 __ mov(r0, Operand(Smi::FromInt(0)));
982 // Push enumeration cache, enumeration cache length (as smi) and zero. 981 // Push enumeration cache, enumeration cache length (as smi) and zero.
983 __ Push(r2, r1, r0); 982 __ Push(r2, r1, r0);
984 __ jmp(&loop); 983 __ jmp(&loop);
(...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
2537 // Check for fast case object. Generate false result for slow case object. 2536 // Check for fast case object. Generate false result for slow case object.
2538 __ ldr(r2, FieldMemOperand(r0, JSObject::kPropertiesOffset)); 2537 __ ldr(r2, FieldMemOperand(r0, JSObject::kPropertiesOffset));
2539 __ ldr(r2, FieldMemOperand(r2, HeapObject::kMapOffset)); 2538 __ ldr(r2, FieldMemOperand(r2, HeapObject::kMapOffset));
2540 __ LoadRoot(ip, Heap::kHashTableMapRootIndex); 2539 __ LoadRoot(ip, Heap::kHashTableMapRootIndex);
2541 __ cmp(r2, ip); 2540 __ cmp(r2, ip);
2542 __ b(eq, if_false); 2541 __ b(eq, if_false);
2543 2542
2544 // Look for valueOf symbol in the descriptor array, and indicate false if 2543 // Look for valueOf symbol in the descriptor array, and indicate false if
2545 // found. The type is not checked, so if it is a transition it is a false 2544 // found. The type is not checked, so if it is a transition it is a false
2546 // negative. 2545 // negative.
2547 __ ldr(r4, FieldMemOperand(r1, Map::kInstanceDescriptorsOffset)); 2546 __ LoadInstanceDescriptors(r1, r4);
2548 __ ldr(r3, FieldMemOperand(r4, FixedArray::kLengthOffset)); 2547 __ ldr(r3, FieldMemOperand(r4, FixedArray::kLengthOffset));
2549 // r4: descriptor array 2548 // r4: descriptor array
2550 // r3: length of descriptor array 2549 // r3: length of descriptor array
2551 // Calculate the end of the descriptor array. 2550 // Calculate the end of the descriptor array.
2552 STATIC_ASSERT(kSmiTag == 0); 2551 STATIC_ASSERT(kSmiTag == 0);
2553 STATIC_ASSERT(kSmiTagSize == 1); 2552 STATIC_ASSERT(kSmiTagSize == 1);
2554 STATIC_ASSERT(kPointerSize == 4); 2553 STATIC_ASSERT(kPointerSize == 4);
2555 __ add(r2, r4, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 2554 __ add(r2, r4, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
2556 __ add(r2, r2, Operand(r3, LSL, kPointerSizeLog2 - kSmiTagSize)); 2555 __ add(r2, r2, Operand(r3, LSL, kPointerSizeLog2 - kSmiTagSize));
2557 2556
(...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after
4355 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 4354 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
4356 __ add(pc, r1, Operand(masm_->CodeObject())); 4355 __ add(pc, r1, Operand(masm_->CodeObject()));
4357 } 4356 }
4358 4357
4359 4358
4360 #undef __ 4359 #undef __
4361 4360
4362 } } // namespace v8::internal 4361 } } // namespace v8::internal
4363 4362
4364 #endif // V8_TARGET_ARCH_ARM 4363 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698