| 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 4036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4047 int NextEnumerationIndex() { | 4047 int NextEnumerationIndex() { |
| 4048 return Smi::cast(this->get(kNextEnumerationIndexIndex))->value(); | 4048 return Smi::cast(this->get(kNextEnumerationIndexIndex))->value(); |
| 4049 } | 4049 } |
| 4050 | 4050 |
| 4051 // Returns a new array for dictionary usage. Might return Failure. | 4051 // Returns a new array for dictionary usage. Might return Failure. |
| 4052 MUST_USE_RESULT static MaybeObject* Allocate( | 4052 MUST_USE_RESULT static MaybeObject* Allocate( |
| 4053 Heap* heap, | 4053 Heap* heap, |
| 4054 int at_least_space_for, | 4054 int at_least_space_for, |
| 4055 PretenureFlag pretenure = NOT_TENURED); | 4055 PretenureFlag pretenure = NOT_TENURED); |
| 4056 | 4056 |
| 4057 // Creates a new dictionary. |
| 4058 static Handle<Derived> New( |
| 4059 Isolate* isolate, |
| 4060 int at_least_space_for, |
| 4061 PretenureFlag pretenure = NOT_TENURED); |
| 4062 |
| 4057 // Ensure enough space for n additional elements. | 4063 // Ensure enough space for n additional elements. |
| 4058 MUST_USE_RESULT MaybeObject* EnsureCapacity(int n, Key key); | 4064 MUST_USE_RESULT MaybeObject* EnsureCapacity(int n, Key key); |
| 4059 | 4065 |
| 4060 #ifdef OBJECT_PRINT | 4066 #ifdef OBJECT_PRINT |
| 4061 void Print(FILE* out = stdout); | 4067 void Print(FILE* out = stdout); |
| 4062 #endif | 4068 #endif |
| 4063 // Returns the key (slow). | 4069 // Returns the key (slow). |
| 4064 Object* SlowReverseLookup(Object* value); | 4070 Object* SlowReverseLookup(Object* value); |
| 4065 | 4071 |
| 4066 // Sets the entry to (key, value) pair. | 4072 // Sets the entry to (key, value) pair. |
| (...skipping 5683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9750 inline byte kind(); | 9756 inline byte kind(); |
| 9751 inline void set_kind(byte kind); | 9757 inline void set_kind(byte kind); |
| 9752 | 9758 |
| 9753 // Casting. | 9759 // Casting. |
| 9754 static inline Oddball* cast(Object* obj); | 9760 static inline Oddball* cast(Object* obj); |
| 9755 | 9761 |
| 9756 // Dispatched behavior. | 9762 // Dispatched behavior. |
| 9757 DECLARE_VERIFIER(Oddball) | 9763 DECLARE_VERIFIER(Oddball) |
| 9758 | 9764 |
| 9759 // Initialize the fields. | 9765 // Initialize the fields. |
| 9760 MUST_USE_RESULT MaybeObject* Initialize(Heap* heap, | 9766 static void Initialize(Isolate* isolate, |
| 9761 const char* to_string, | 9767 Handle<Oddball> oddball, |
| 9762 Object* to_number, | 9768 const char* to_string, |
| 9763 byte kind); | 9769 Handle<Object> to_number, |
| 9770 byte kind); |
| 9764 | 9771 |
| 9765 // Layout description. | 9772 // Layout description. |
| 9766 static const int kToStringOffset = HeapObject::kHeaderSize; | 9773 static const int kToStringOffset = HeapObject::kHeaderSize; |
| 9767 static const int kToNumberOffset = kToStringOffset + kPointerSize; | 9774 static const int kToNumberOffset = kToStringOffset + kPointerSize; |
| 9768 static const int kKindOffset = kToNumberOffset + kPointerSize; | 9775 static const int kKindOffset = kToNumberOffset + kPointerSize; |
| 9769 static const int kSize = kKindOffset + kPointerSize; | 9776 static const int kSize = kKindOffset + kPointerSize; |
| 9770 | 9777 |
| 9771 static const byte kFalse = 0; | 9778 static const byte kFalse = 0; |
| 9772 static const byte kTrue = 1; | 9779 static const byte kTrue = 1; |
| 9773 static const byte kNotBooleanMask = ~1; | 9780 static const byte kNotBooleanMask = ~1; |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11095 } else { | 11102 } else { |
| 11096 value &= ~(1 << bit_position); | 11103 value &= ~(1 << bit_position); |
| 11097 } | 11104 } |
| 11098 return value; | 11105 return value; |
| 11099 } | 11106 } |
| 11100 }; | 11107 }; |
| 11101 | 11108 |
| 11102 } } // namespace v8::internal | 11109 } } // namespace v8::internal |
| 11103 | 11110 |
| 11104 #endif // V8_OBJECTS_H_ | 11111 #endif // V8_OBJECTS_H_ |
| OLD | NEW |