Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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* descs, String* name, int last_add, TransitionFlag flag); |
|
Jakob Kummerow
2012/07/19 12:55:10
nit: for method declarations, one line per argumen
| |
| 4916 MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor, | 4906 MUST_USE_RESULT MaybeObject* CopyAddDescriptor(Descriptor* descriptor, |
| 4917 TransitionFlag flag); | 4907 TransitionFlag flag); |
| 4918 MUST_USE_RESULT MaybeObject* CopyInsertDescriptor(Descriptor* descriptor, | 4908 MUST_USE_RESULT MaybeObject* CopyInsertDescriptor(Descriptor* descriptor, |
| 4919 TransitionFlag flag); | 4909 TransitionFlag flag); |
| 4920 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptor(Descriptor* descriptor, | 4910 MUST_USE_RESULT MaybeObject* CopyReplaceDescriptor(Descriptor* descriptor, |
| 4921 int index, | 4911 int index, |
| 4922 TransitionFlag flag); | 4912 TransitionFlag flag); |
| 4923 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind, | 4913 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind, |
| 4924 TransitionFlag flag); | 4914 TransitionFlag flag); |
| 4925 | 4915 |
| (...skipping 3962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8888 } else { | 8878 } else { |
| 8889 value &= ~(1 << bit_position); | 8879 value &= ~(1 << bit_position); |
| 8890 } | 8880 } |
| 8891 return value; | 8881 return value; |
| 8892 } | 8882 } |
| 8893 }; | 8883 }; |
| 8894 | 8884 |
| 8895 } } // namespace v8::internal | 8885 } } // namespace v8::internal |
| 8896 | 8886 |
| 8897 #endif // V8_OBJECTS_H_ | 8887 #endif // V8_OBJECTS_H_ |
| OLD | NEW |