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

Side by Side Diff: src/objects.h

Issue 10803032: Move all Copy* methods from descriptor array into the Copy* versions on the map. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comments 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 | « no previous file | 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 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 2537 matching lines...) Expand 10 before | Expand all | Expand 10 after
2548 const WhitenessWitness&, 2548 const WhitenessWitness&,
2549 int number_of_set_descriptors); 2549 int number_of_set_descriptors);
2550 2550
2551 // Transfer a complete descriptor from the src descriptor array to this 2551 // Transfer a complete descriptor from the src descriptor array to this
2552 // descriptor array. 2552 // descriptor array.
2553 void CopyFrom(int dst_index, 2553 void CopyFrom(int dst_index,
2554 DescriptorArray* src, 2554 DescriptorArray* src,
2555 int src_index, 2555 int src_index,
2556 const WhitenessWitness&); 2556 const WhitenessWitness&);
2557 2557
2558 // Copy the descriptor array, inserting new descriptor. Its enumeration index
2559 // is automatically set to the size of the descriptor array to which it was
2560 // added first.
2561 MUST_USE_RESULT MaybeObject* CopyAdd(Descriptor* descriptor);
2562
2563 // Copy the descriptor array, replacing a descriptor. Its enumeration index is
2564 // kept.
2565 MUST_USE_RESULT MaybeObject* CopyReplace(Descriptor* descriptor,
2566 int insertion_index);
2567
2568 // Indicates whether the search function should expect a sorted or an unsorted 2558 // Indicates whether the search function should expect a sorted or an unsorted
2569 // descriptor array as input. 2559 // descriptor array as input.
2570 enum SharedMode { 2560 enum SharedMode {
2571 MAY_BE_SHARED, 2561 MAY_BE_SHARED,
2572 CANNOT_BE_SHARED 2562 CANNOT_BE_SHARED
2573 }; 2563 };
2574 2564
2575 // Return a copy of the array with all transitions and null descriptors 2565 // Return a copy of the array with all transitions and null descriptors
2576 // removed. Return a Failure object in case of an allocation failure. 2566 // removed. Return a Failure object in case of an allocation failure.
2577 MUST_USE_RESULT MaybeObject* Copy(SharedMode shared_mode); 2567 MUST_USE_RESULT MaybeObject* Copy(SharedMode shared_mode);
(...skipping 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after
4905 LookupResult* result); 4895 LookupResult* result);
4906 4896
4907 void LookupTransition(JSObject* holder, 4897 void LookupTransition(JSObject* holder,
4908 String* name, 4898 String* name,
4909 LookupResult* result); 4899 LookupResult* result);
4910 4900
4911 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size); 4901 MUST_USE_RESULT MaybeObject* RawCopy(int instance_size);
4912 MUST_USE_RESULT MaybeObject* CopyWithPreallocatedFieldDescriptors(); 4902 MUST_USE_RESULT MaybeObject* CopyWithPreallocatedFieldDescriptors();
4913 MUST_USE_RESULT MaybeObject* CopyDropDescriptors(); 4903 MUST_USE_RESULT MaybeObject* CopyDropDescriptors();
4914 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptors( 4904 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptors(
4915 DescriptorArray* descriptors, String* name, TransitionFlag flag); 4905 DescriptorArray* descriptors,
4906 String* name,
4907 int last_added,
4908 TransitionFlag flag);
4916 MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor, 4909 MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor,
4917 TransitionFlag flag); 4910 TransitionFlag flag);
4918 MUST_USE_RESULT MaybeObject* CopyInsertDescriptor(Descriptor* descriptor, 4911 MUST_USE_RESULT MaybeObject* CopyInsertDescriptor(Descriptor* descriptor,
4919 TransitionFlag flag); 4912 TransitionFlag flag);
4920 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptor(Descriptor* descriptor, 4913 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptor(Descriptor* descriptor,
4921 int index, 4914 int index,
4922 TransitionFlag flag); 4915 TransitionFlag flag);
4923 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind, 4916 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind,
4924 TransitionFlag flag); 4917 TransitionFlag flag);
4925 4918
(...skipping 3962 matching lines...) Expand 10 before | Expand all | Expand 10 after
8888 } else { 8881 } else {
8889 value &= ~(1 << bit_position); 8882 value &= ~(1 << bit_position);
8890 } 8883 }
8891 return value; 8884 return value;
8892 } 8885 }
8893 }; 8886 };
8894 8887
8895 } } // namespace v8::internal 8888 } } // namespace v8::internal
8896 8889
8897 #endif // V8_OBJECTS_H_ 8890 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698