OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2044 | 2044 |
2045 enum SetFastElementsCapacitySmiMode { | 2045 enum SetFastElementsCapacitySmiMode { |
2046 kAllowSmiElements, | 2046 kAllowSmiElements, |
2047 kForceSmiElements, | 2047 kForceSmiElements, |
2048 kDontAllowSmiElements | 2048 kDontAllowSmiElements |
2049 }; | 2049 }; |
2050 | 2050 |
2051 static Handle<FixedArray> SetFastElementsCapacity( | 2051 static Handle<FixedArray> SetFastElementsCapacity( |
2052 Handle<JSObject> object, int capacity, | 2052 Handle<JSObject> object, int capacity, |
2053 SetFastElementsCapacitySmiMode smi_mode); | 2053 SetFastElementsCapacitySmiMode smi_mode); |
2054 static Handle<FixedArrayBase> SetFastDoubleElementsCapacity( | |
2055 Handle<JSObject> object, int capacity); | |
2056 | 2054 |
2057 // Replace the elements' backing store with fast elements of the given | 2055 // Replace the elements' backing store with fast elements of the given |
2058 // capacity. Update the length for JSArrays. Returns the new backing | 2056 // capacity. Update the length for JSArrays. Returns the new backing |
2059 // store. | 2057 // store. |
2060 static Handle<FixedArray> SetFastElementsCapacityAndLength( | 2058 static Handle<FixedArray> SetFastElementsCapacityAndLength( |
2061 Handle<JSObject> object, | 2059 Handle<JSObject> object, |
2062 int capacity, | 2060 int capacity, |
2063 int length, | 2061 int length, |
2064 SetFastElementsCapacitySmiMode smi_mode); | 2062 SetFastElementsCapacitySmiMode smi_mode); |
2065 static Handle<FixedArrayBase> SetFastDoubleElementsCapacityAndLength( | 2063 static void SetFastDoubleElementsCapacityAndLength(Handle<JSObject> object, |
2066 Handle<JSObject> object, int capacity, int length); | 2064 int capacity, int length); |
2067 | 2065 |
2068 // Lookup interceptors are used for handling properties controlled by host | 2066 // Lookup interceptors are used for handling properties controlled by host |
2069 // objects. | 2067 // objects. |
2070 inline bool HasNamedInterceptor(); | 2068 inline bool HasNamedInterceptor(); |
2071 inline bool HasIndexedInterceptor(); | 2069 inline bool HasIndexedInterceptor(); |
2072 | 2070 |
2073 // Computes the enumerable keys from interceptors. Used for debug mirrors and | 2071 // Computes the enumerable keys from interceptors. Used for debug mirrors and |
2074 // by JSReceiver::GetKeys. | 2072 // by JSReceiver::GetKeys. |
2075 MUST_USE_RESULT static MaybeHandle<JSObject> GetKeysForNamedInterceptor( | 2073 MUST_USE_RESULT static MaybeHandle<JSObject> GetKeysForNamedInterceptor( |
2076 Handle<JSObject> object, | 2074 Handle<JSObject> object, |
(...skipping 8774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10851 } else { | 10849 } else { |
10852 value &= ~(1 << bit_position); | 10850 value &= ~(1 << bit_position); |
10853 } | 10851 } |
10854 return value; | 10852 return value; |
10855 } | 10853 } |
10856 }; | 10854 }; |
10857 | 10855 |
10858 } } // namespace v8::internal | 10856 } } // namespace v8::internal |
10859 | 10857 |
10860 #endif // V8_OBJECTS_H_ | 10858 #endif // V8_OBJECTS_H_ |
OLD | NEW |