OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 3494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3505 DCHECK(index != 0); | 3505 DCHECK(index != 0); |
3506 this->set(kNextEnumerationIndexIndex, Smi::FromInt(index)); | 3506 this->set(kNextEnumerationIndexIndex, Smi::FromInt(index)); |
3507 } | 3507 } |
3508 | 3508 |
3509 int NextEnumerationIndex() { | 3509 int NextEnumerationIndex() { |
3510 return Smi::cast(this->get(kNextEnumerationIndexIndex))->value(); | 3510 return Smi::cast(this->get(kNextEnumerationIndexIndex))->value(); |
3511 } | 3511 } |
3512 | 3512 |
3513 // Creates a new dictionary. | 3513 // Creates a new dictionary. |
3514 MUST_USE_RESULT static Handle<Derived> New( | 3514 MUST_USE_RESULT static Handle<Derived> New( |
3515 Isolate* isolate, | 3515 Isolate* isolate, int at_least_space_for, |
3516 int at_least_space_for, | 3516 PretenureFlag pretenure = NOT_TENURED, |
3517 PretenureFlag pretenure = NOT_TENURED); | 3517 MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY); |
3518 | 3518 |
3519 // Ensures that a new dictionary is created when the capacity is checked. | 3519 // Ensures that a new dictionary is created when the capacity is checked. |
3520 void SetRequiresCopyOnCapacityChange(); | 3520 void SetRequiresCopyOnCapacityChange(); |
3521 | 3521 |
3522 // Ensure enough space for n additional elements. | 3522 // Ensure enough space for n additional elements. |
3523 static Handle<Derived> EnsureCapacity(Handle<Derived> obj, int n, Key key); | 3523 static Handle<Derived> EnsureCapacity(Handle<Derived> obj, int n, Key key); |
3524 | 3524 |
3525 #ifdef OBJECT_PRINT | 3525 #ifdef OBJECT_PRINT |
3526 // For our gdb macros, we should perhaps change these in the future. | 3526 // For our gdb macros, we should perhaps change these in the future. |
3527 void Print(); | 3527 void Print(); |
(...skipping 7493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11021 } | 11021 } |
11022 return value; | 11022 return value; |
11023 } | 11023 } |
11024 }; | 11024 }; |
11025 | 11025 |
11026 | 11026 |
11027 } // NOLINT, false-positive due to second-order macros. | 11027 } // NOLINT, false-positive due to second-order macros. |
11028 } // NOLINT, false-positive due to second-order macros. | 11028 } // NOLINT, false-positive due to second-order macros. |
11029 | 11029 |
11030 #endif // V8_OBJECTS_H_ | 11030 #endif // V8_OBJECTS_H_ |
OLD | NEW |