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 "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
(...skipping 2296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2307 // be represented as a double and not a Smi. | 2307 // be represented as a double and not a Smi. |
2308 bool ShouldConvertToFastDoubleElements(bool* has_smi_only_elements); | 2308 bool ShouldConvertToFastDoubleElements(bool* has_smi_only_elements); |
2309 | 2309 |
2310 // Computes the new capacity when expanding the elements of a JSObject. | 2310 // Computes the new capacity when expanding the elements of a JSObject. |
2311 static int NewElementsCapacity(int old_capacity) { | 2311 static int NewElementsCapacity(int old_capacity) { |
2312 // (old_capacity + 50%) + 16 | 2312 // (old_capacity + 50%) + 16 |
2313 return old_capacity + (old_capacity >> 1) + 16; | 2313 return old_capacity + (old_capacity >> 1) + 16; |
2314 } | 2314 } |
2315 | 2315 |
2316 // These methods do not perform access checks! | 2316 // These methods do not perform access checks! |
2317 MUST_USE_RESULT static MaybeHandle<AccessorPair> GetOwnPropertyAccessorPair( | |
2318 Handle<JSObject> object, | |
2319 Handle<Name> name); | |
2320 MUST_USE_RESULT static MaybeHandle<AccessorPair> GetOwnElementAccessorPair( | 2317 MUST_USE_RESULT static MaybeHandle<AccessorPair> GetOwnElementAccessorPair( |
2321 Handle<JSObject> object, | 2318 Handle<JSObject> object, |
2322 uint32_t index); | 2319 uint32_t index); |
2323 | 2320 |
2324 MUST_USE_RESULT static MaybeHandle<Object> SetFastElement( | 2321 MUST_USE_RESULT static MaybeHandle<Object> SetFastElement( |
2325 Handle<JSObject> object, | 2322 Handle<JSObject> object, |
2326 uint32_t index, | 2323 uint32_t index, |
2327 Handle<Object> value, | 2324 Handle<Object> value, |
2328 StrictMode strict_mode, | 2325 StrictMode strict_mode, |
2329 bool check_prototype); | 2326 bool check_prototype); |
(...skipping 8905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11235 } else { | 11232 } else { |
11236 value &= ~(1 << bit_position); | 11233 value &= ~(1 << bit_position); |
11237 } | 11234 } |
11238 return value; | 11235 return value; |
11239 } | 11236 } |
11240 }; | 11237 }; |
11241 | 11238 |
11242 } } // namespace v8::internal | 11239 } } // namespace v8::internal |
11243 | 11240 |
11244 #endif // V8_OBJECTS_H_ | 11241 #endif // V8_OBJECTS_H_ |
OLD | NEW |