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

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

Issue 10695120: Ensure that all descriptors have a valid enumeration index, and replace NextEnumIndex with LastAdde… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment. Created 8 years, 5 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 | « src/transitions-inl.h ('k') | src/x64/lithium-codegen-x64.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 // modification check. Otherwise, we got a fixed array, and we have 1102 // modification check. Otherwise, we got a fixed array, and we have
1103 // to do a slow check. 1103 // to do a slow check.
1104 Label fixed_array; 1104 Label fixed_array;
1105 __ CompareRoot(FieldOperand(rax, HeapObject::kMapOffset), 1105 __ CompareRoot(FieldOperand(rax, HeapObject::kMapOffset),
1106 Heap::kMetaMapRootIndex); 1106 Heap::kMetaMapRootIndex);
1107 __ j(not_equal, &fixed_array, Label::kNear); 1107 __ j(not_equal, &fixed_array, Label::kNear);
1108 1108
1109 // We got a map in register rax. Get the enumeration cache from it. 1109 // We got a map in register rax. Get the enumeration cache from it.
1110 __ bind(&use_cache); 1110 __ bind(&use_cache);
1111 __ LoadInstanceDescriptors(rax, rcx); 1111 __ LoadInstanceDescriptors(rax, rcx);
1112 __ movq(rcx, FieldOperand(rcx, DescriptorArray::kEnumerationIndexOffset)); 1112 __ movq(rcx, FieldOperand(rcx, DescriptorArray::kLastAddedOffset));
1113 __ movq(rdx, FieldOperand(rcx, DescriptorArray::kEnumCacheBridgeCacheOffset)); 1113 __ movq(rdx, FieldOperand(rcx, DescriptorArray::kEnumCacheBridgeCacheOffset));
1114 1114
1115 // Set up the four remaining stack slots. 1115 // Set up the four remaining stack slots.
1116 __ push(rax); // Map. 1116 __ push(rax); // Map.
1117 __ push(rdx); // Enumeration cache. 1117 __ push(rdx); // Enumeration cache.
1118 __ movq(rax, FieldOperand(rdx, FixedArray::kLengthOffset)); 1118 __ movq(rax, FieldOperand(rdx, FixedArray::kLengthOffset));
1119 __ push(rax); // Enumeration cache length (as smi). 1119 __ push(rax); // Enumeration cache length (as smi).
1120 __ Push(Smi::FromInt(0)); // Initial index. 1120 __ Push(Smi::FromInt(0)); // Initial index.
1121 __ jmp(&loop); 1121 __ jmp(&loop);
1122 1122
(...skipping 3420 matching lines...) Expand 10 before | Expand all | Expand 10 after
4543 *context_length = 0; 4543 *context_length = 0;
4544 return previous_; 4544 return previous_;
4545 } 4545 }
4546 4546
4547 4547
4548 #undef __ 4548 #undef __
4549 4549
4550 } } // namespace v8::internal 4550 } } // namespace v8::internal
4551 4551
4552 #endif // V8_TARGET_ARCH_X64 4552 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/transitions-inl.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698