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 3042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3053 | 3053 |
3054 // Shrink length and insert filler objects. | 3054 // Shrink length and insert filler objects. |
3055 void Shrink(int length); | 3055 void Shrink(int length); |
3056 | 3056 |
3057 // Copy operations. | 3057 // Copy operations. |
3058 MUST_USE_RESULT inline MaybeObject* Copy(); | 3058 MUST_USE_RESULT inline MaybeObject* Copy(); |
3059 MUST_USE_RESULT MaybeObject* CopySize(int new_length, | 3059 MUST_USE_RESULT MaybeObject* CopySize(int new_length, |
3060 PretenureFlag pretenure = NOT_TENURED); | 3060 PretenureFlag pretenure = NOT_TENURED); |
3061 | 3061 |
3062 // Add the elements of a JSArray to this FixedArray. | 3062 // Add the elements of a JSArray to this FixedArray. |
3063 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array); | 3063 static Handle<FixedArray> AddKeysFromJSArray(Handle<FixedArray> content, |
| 3064 Handle<JSArray> array); |
3064 | 3065 |
3065 // Compute the union of this and other. | 3066 // Computes the union of keys and return the result. |
3066 MUST_USE_RESULT MaybeObject* UnionOfKeys(FixedArray* other); | 3067 // Used for implementing "for (n in object) { }" |
| 3068 static Handle<FixedArray> UnionOfKeys(Handle<FixedArray> first, |
| 3069 Handle<FixedArray> second); |
3067 | 3070 |
3068 // Copy a sub array from the receiver to dest. | 3071 // Copy a sub array from the receiver to dest. |
3069 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len); | 3072 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len); |
3070 | 3073 |
3071 // Garbage collection support. | 3074 // Garbage collection support. |
3072 static int SizeFor(int length) { return kHeaderSize + length * kPointerSize; } | 3075 static int SizeFor(int length) { return kHeaderSize + length * kPointerSize; } |
3073 | 3076 |
3074 // Code Generation support. | 3077 // Code Generation support. |
3075 static int OffsetOfElementAt(int index) { return SizeFor(index); } | 3078 static int OffsetOfElementAt(int index) { return SizeFor(index); } |
3076 | 3079 |
(...skipping 7746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10823 } else { | 10826 } else { |
10824 value &= ~(1 << bit_position); | 10827 value &= ~(1 << bit_position); |
10825 } | 10828 } |
10826 return value; | 10829 return value; |
10827 } | 10830 } |
10828 }; | 10831 }; |
10829 | 10832 |
10830 } } // namespace v8::internal | 10833 } } // namespace v8::internal |
10831 | 10834 |
10832 #endif // V8_OBJECTS_H_ | 10835 #endif // V8_OBJECTS_H_ |
OLD | NEW |