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

Side by Side Diff: src/objects.h

Issue 3434004: Prevent inline constructor generation when duplicate properties are present i... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 3 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
« src/heap.cc ('K') | « src/heap.cc ('k') | src/objects.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 // If adding a real property, map transitions must be removed. If adding 1885 // If adding a real property, map transitions must be removed. If adding
1886 // a transition, they must not be removed. All null descriptors are removed. 1886 // a transition, they must not be removed. All null descriptors are removed.
1887 MUST_USE_RESULT Object* CopyInsert(Descriptor* descriptor, 1887 MUST_USE_RESULT Object* CopyInsert(Descriptor* descriptor,
1888 TransitionFlag transition_flag); 1888 TransitionFlag transition_flag);
1889 1889
1890 // Remove all transitions. Return a copy of the array with all transitions 1890 // Remove all transitions. Return a copy of the array with all transitions
1891 // removed, or a Failure object if the new array could not be allocated. 1891 // removed, or a Failure object if the new array could not be allocated.
1892 MUST_USE_RESULT Object* RemoveTransitions(); 1892 MUST_USE_RESULT Object* RemoveTransitions();
1893 1893
1894 // Sort the instance descriptors by the hash codes of their keys. 1894 // Sort the instance descriptors by the hash codes of their keys.
1895 // Does not check for duplicates.
1896 void SortUnchecked();
1897
1898 // Sort the instance descriptors by the hash codes of their keys.
1899 // Checks the result for duplicates.
1895 void Sort(); 1900 void Sort();
1896 1901
1897 // Search the instance descriptors for given name. 1902 // Search the instance descriptors for given name.
1898 inline int Search(String* name); 1903 inline int Search(String* name);
1899 1904
1900 // As the above, but uses DescriptorLookupCache and updates it when 1905 // As the above, but uses DescriptorLookupCache and updates it when
1901 // necessary. 1906 // necessary.
1902 inline int SearchWithCache(String* name); 1907 inline int SearchWithCache(String* name);
1903 1908
1904 // Tells whether the name is present int the array. 1909 // Tells whether the name is present int the array.
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
3535 // Age is reset when GC notices that the code object is referenced 3540 // Age is reset when GC notices that the code object is referenced
3536 // from the stack or compilation cache. 3541 // from the stack or compilation cache.
3537 inline int code_age(); 3542 inline int code_age();
3538 inline void set_code_age(int age); 3543 inline void set_code_age(int age);
3539 3544
3540 3545
3541 // Check whether a inlined constructor can be generated with the given 3546 // Check whether a inlined constructor can be generated with the given
3542 // prototype. 3547 // prototype.
3543 bool CanGenerateInlineConstructor(Object* prototype); 3548 bool CanGenerateInlineConstructor(Object* prototype);
3544 3549
3550 // Prevents further attempts to generate inline constructors.
3551 // To be called if generation failed for any reason.
3552 void ForbidInlineConstructor();
3553
3545 // For functions which only contains this property assignments this provides 3554 // For functions which only contains this property assignments this provides
3546 // access to the names for the properties assigned. 3555 // access to the names for the properties assigned.
3547 DECL_ACCESSORS(this_property_assignments, Object) 3556 DECL_ACCESSORS(this_property_assignments, Object)
3548 inline int this_property_assignments_count(); 3557 inline int this_property_assignments_count();
3549 inline void set_this_property_assignments_count(int value); 3558 inline void set_this_property_assignments_count(int value);
3550 String* GetThisPropertyAssignmentName(int index); 3559 String* GetThisPropertyAssignmentName(int index);
3551 bool IsThisPropertyAssignmentArgument(int index); 3560 bool IsThisPropertyAssignmentArgument(int index);
3552 int GetThisPropertyAssignmentArgument(int index); 3561 int GetThisPropertyAssignmentArgument(int index);
3553 Object* GetThisPropertyAssignmentConstant(int index); 3562 Object* GetThisPropertyAssignmentConstant(int index);
3554 3563
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
5562 } else { 5571 } else {
5563 value &= ~(1 << bit_position); 5572 value &= ~(1 << bit_position);
5564 } 5573 }
5565 return value; 5574 return value;
5566 } 5575 }
5567 }; 5576 };
5568 5577
5569 } } // namespace v8::internal 5578 } } // namespace v8::internal
5570 5579
5571 #endif // V8_OBJECTS_H_ 5580 #endif // V8_OBJECTS_H_
OLDNEW
« src/heap.cc ('K') | « src/heap.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698