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 9705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9716 inline byte kind(); | 9716 inline byte kind(); |
9717 inline void set_kind(byte kind); | 9717 inline void set_kind(byte kind); |
9718 | 9718 |
9719 // Casting. | 9719 // Casting. |
9720 static inline Oddball* cast(Object* obj); | 9720 static inline Oddball* cast(Object* obj); |
9721 | 9721 |
9722 // Dispatched behavior. | 9722 // Dispatched behavior. |
9723 DECLARE_VERIFIER(Oddball) | 9723 DECLARE_VERIFIER(Oddball) |
9724 | 9724 |
9725 // Initialize the fields. | 9725 // Initialize the fields. |
9726 static void Initialize(Isolate* isolate, | 9726 MUST_USE_RESULT MaybeObject* Initialize(Heap* heap, |
9727 Handle<Oddball> oddball, | 9727 const char* to_string, |
9728 const char* to_string, | 9728 Object* to_number, |
9729 Handle<Object> to_number, | 9729 byte kind); |
9730 byte kind); | |
9731 | 9730 |
9732 // Layout description. | 9731 // Layout description. |
9733 static const int kToStringOffset = HeapObject::kHeaderSize; | 9732 static const int kToStringOffset = HeapObject::kHeaderSize; |
9734 static const int kToNumberOffset = kToStringOffset + kPointerSize; | 9733 static const int kToNumberOffset = kToStringOffset + kPointerSize; |
9735 static const int kKindOffset = kToNumberOffset + kPointerSize; | 9734 static const int kKindOffset = kToNumberOffset + kPointerSize; |
9736 static const int kSize = kKindOffset + kPointerSize; | 9735 static const int kSize = kKindOffset + kPointerSize; |
9737 | 9736 |
9738 static const byte kFalse = 0; | 9737 static const byte kFalse = 0; |
9739 static const byte kTrue = 1; | 9738 static const byte kTrue = 1; |
9740 static const byte kNotBooleanMask = ~1; | 9739 static const byte kNotBooleanMask = ~1; |
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11062 } else { | 11061 } else { |
11063 value &= ~(1 << bit_position); | 11062 value &= ~(1 << bit_position); |
11064 } | 11063 } |
11065 return value; | 11064 return value; |
11066 } | 11065 } |
11067 }; | 11066 }; |
11068 | 11067 |
11069 } } // namespace v8::internal | 11068 } } // namespace v8::internal |
11070 | 11069 |
11071 #endif // V8_OBJECTS_H_ | 11070 #endif // V8_OBJECTS_H_ |
OLD | NEW |