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 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1435 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) | 1435 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) |
1436 #undef DECLARE_STRUCT_PREDICATE | 1436 #undef DECLARE_STRUCT_PREDICATE |
1437 | 1437 |
1438 INLINE(bool IsSpecObject()); | 1438 INLINE(bool IsSpecObject()); |
1439 INLINE(bool IsSpecFunction()); | 1439 INLINE(bool IsSpecFunction()); |
1440 bool IsCallable(); | 1440 bool IsCallable(); |
1441 | 1441 |
1442 // Oddball testing. | 1442 // Oddball testing. |
1443 INLINE(bool IsUndefined()); | 1443 INLINE(bool IsUndefined()); |
1444 INLINE(bool IsNull()); | 1444 INLINE(bool IsNull()); |
1445 INLINE(bool IsTheHole()); // Shadows MaybeObject's implementation. | 1445 INLINE(bool IsTheHole()); |
| 1446 INLINE(bool IsException()); |
1446 INLINE(bool IsUninitialized()); | 1447 INLINE(bool IsUninitialized()); |
1447 INLINE(bool IsTrue()); | 1448 INLINE(bool IsTrue()); |
1448 INLINE(bool IsFalse()); | 1449 INLINE(bool IsFalse()); |
1449 inline bool IsArgumentsMarker(); | 1450 inline bool IsArgumentsMarker(); |
1450 inline bool NonFailureIsHeapObject(); | 1451 inline bool NonFailureIsHeapObject(); |
1451 | 1452 |
1452 // Filler objects (fillers and free space objects). | 1453 // Filler objects (fillers and free space objects). |
1453 inline bool IsFiller(); | 1454 inline bool IsFiller(); |
1454 | 1455 |
1455 // Extract the number. | 1456 // Extract the number. |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1516 static inline MaybeHandle<JSReceiver> ToObject(Isolate* isolate, | 1517 static inline MaybeHandle<JSReceiver> ToObject(Isolate* isolate, |
1517 Handle<Object> object); | 1518 Handle<Object> object); |
1518 static MaybeHandle<JSReceiver> ToObject(Isolate* isolate, | 1519 static MaybeHandle<JSReceiver> ToObject(Isolate* isolate, |
1519 Handle<Object> object, | 1520 Handle<Object> object, |
1520 Handle<Context> context); | 1521 Handle<Context> context); |
1521 | 1522 |
1522 // Converts this to a Smi if possible. | 1523 // Converts this to a Smi if possible. |
1523 // Failure is returned otherwise. | 1524 // Failure is returned otherwise. |
1524 static MUST_USE_RESULT inline Handle<Object> ToSmi(Isolate* isolate, | 1525 static MUST_USE_RESULT inline Handle<Object> ToSmi(Isolate* isolate, |
1525 Handle<Object> object); | 1526 Handle<Object> object); |
1526 MUST_USE_RESULT inline MaybeObject* ToSmi(); | |
1527 | 1527 |
1528 void Lookup(Name* name, LookupResult* result); | 1528 void Lookup(Name* name, LookupResult* result); |
1529 | 1529 |
1530 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithReceiver( | 1530 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithReceiver( |
1531 Handle<Object> object, | 1531 Handle<Object> object, |
1532 Handle<Object> receiver, | 1532 Handle<Object> receiver, |
1533 Handle<Name> name, | 1533 Handle<Name> name, |
1534 PropertyAttributes* attributes); | 1534 PropertyAttributes* attributes); |
1535 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement( | 1535 MUST_USE_RESULT static inline MaybeHandle<Object> GetPropertyOrElement( |
1536 Handle<Object> object, | 1536 Handle<Object> object, |
(...skipping 8242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9779 | 9779 |
9780 static const byte kFalse = 0; | 9780 static const byte kFalse = 0; |
9781 static const byte kTrue = 1; | 9781 static const byte kTrue = 1; |
9782 static const byte kNotBooleanMask = ~1; | 9782 static const byte kNotBooleanMask = ~1; |
9783 static const byte kTheHole = 2; | 9783 static const byte kTheHole = 2; |
9784 static const byte kNull = 3; | 9784 static const byte kNull = 3; |
9785 static const byte kArgumentMarker = 4; | 9785 static const byte kArgumentMarker = 4; |
9786 static const byte kUndefined = 5; | 9786 static const byte kUndefined = 5; |
9787 static const byte kUninitialized = 6; | 9787 static const byte kUninitialized = 6; |
9788 static const byte kOther = 7; | 9788 static const byte kOther = 7; |
| 9789 static const byte kException = 8; |
9789 | 9790 |
9790 typedef FixedBodyDescriptor<kToStringOffset, | 9791 typedef FixedBodyDescriptor<kToStringOffset, |
9791 kToNumberOffset + kPointerSize, | 9792 kToNumberOffset + kPointerSize, |
9792 kSize> BodyDescriptor; | 9793 kSize> BodyDescriptor; |
9793 | 9794 |
9794 STATIC_CHECK(kKindOffset == Internals::kOddballKindOffset); | 9795 STATIC_CHECK(kKindOffset == Internals::kOddballKindOffset); |
9795 STATIC_CHECK(kNull == Internals::kNullOddballKind); | 9796 STATIC_CHECK(kNull == Internals::kNullOddballKind); |
9796 STATIC_CHECK(kUndefined == Internals::kUndefinedOddballKind); | 9797 STATIC_CHECK(kUndefined == Internals::kUndefinedOddballKind); |
9797 | 9798 |
9798 private: | 9799 private: |
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11104 } else { | 11105 } else { |
11105 value &= ~(1 << bit_position); | 11106 value &= ~(1 << bit_position); |
11106 } | 11107 } |
11107 return value; | 11108 return value; |
11108 } | 11109 } |
11109 }; | 11110 }; |
11110 | 11111 |
11111 } } // namespace v8::internal | 11112 } } // namespace v8::internal |
11112 | 11113 |
11113 #endif // V8_OBJECTS_H_ | 11114 #endif // V8_OBJECTS_H_ |
OLD | NEW |