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

Side by Side Diff: src/ia32/macro-assembler-ia32.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/ia32/lithium-codegen-ia32.cc ('k') | src/ic.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 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after
2894 mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset)); 2894 mov(ebx, FieldOperand(ecx, HeapObject::kMapOffset));
2895 mov(edx, FieldOperand(ebx, Map::kInstanceDescriptorsOrBackPointerOffset)); 2895 mov(edx, FieldOperand(ebx, Map::kInstanceDescriptorsOrBackPointerOffset));
2896 CheckMap(edx, 2896 CheckMap(edx,
2897 isolate()->factory()->fixed_array_map(), 2897 isolate()->factory()->fixed_array_map(),
2898 call_runtime, 2898 call_runtime,
2899 DONT_DO_SMI_CHECK); 2899 DONT_DO_SMI_CHECK);
2900 2900
2901 // Check that there is an enum cache in the non-empty instance 2901 // Check that there is an enum cache in the non-empty instance
2902 // descriptors (edx). This is the case if the next enumeration 2902 // descriptors (edx). This is the case if the next enumeration
2903 // index field does not contain a smi. 2903 // index field does not contain a smi.
2904 mov(edx, FieldOperand(edx, DescriptorArray::kEnumerationIndexOffset)); 2904 mov(edx, FieldOperand(edx, DescriptorArray::kLastAddedOffset));
2905 JumpIfSmi(edx, call_runtime); 2905 JumpIfSmi(edx, call_runtime);
2906 2906
2907 // For all objects but the receiver, check that the cache is empty. 2907 // For all objects but the receiver, check that the cache is empty.
2908 Label check_prototype; 2908 Label check_prototype;
2909 cmp(ecx, eax); 2909 cmp(ecx, eax);
2910 j(equal, &check_prototype, Label::kNear); 2910 j(equal, &check_prototype, Label::kNear);
2911 mov(edx, FieldOperand(edx, DescriptorArray::kEnumCacheBridgeCacheOffset)); 2911 mov(edx, FieldOperand(edx, DescriptorArray::kEnumCacheBridgeCacheOffset));
2912 cmp(edx, isolate()->factory()->empty_fixed_array()); 2912 cmp(edx, isolate()->factory()->empty_fixed_array());
2913 j(not_equal, call_runtime); 2913 j(not_equal, call_runtime);
2914 2914
2915 // Load the prototype from the map and loop if non-null. 2915 // Load the prototype from the map and loop if non-null.
2916 bind(&check_prototype); 2916 bind(&check_prototype);
2917 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset)); 2917 mov(ecx, FieldOperand(ebx, Map::kPrototypeOffset));
2918 cmp(ecx, isolate()->factory()->null_value()); 2918 cmp(ecx, isolate()->factory()->null_value());
2919 j(not_equal, &next); 2919 j(not_equal, &next);
2920 } 2920 }
2921 2921
2922 } } // namespace v8::internal 2922 } } // namespace v8::internal
2923 2923
2924 #endif // V8_TARGET_ARCH_IA32 2924 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698