| 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 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 // is defined. However as include/v8.h contain some of the instance type | 765 // is defined. However as include/v8.h contain some of the instance type |
| 766 // constants always having them avoids them getting different numbers | 766 // constants always having them avoids them getting different numbers |
| 767 // depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not. | 767 // depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not. |
| 768 DEBUG_INFO_TYPE, | 768 DEBUG_INFO_TYPE, |
| 769 BREAK_POINT_INFO_TYPE, | 769 BREAK_POINT_INFO_TYPE, |
| 770 | 770 |
| 771 FIXED_ARRAY_TYPE, | 771 FIXED_ARRAY_TYPE, |
| 772 CONSTANT_POOL_ARRAY_TYPE, | 772 CONSTANT_POOL_ARRAY_TYPE, |
| 773 SHARED_FUNCTION_INFO_TYPE, | 773 SHARED_FUNCTION_INFO_TYPE, |
| 774 | 774 |
| 775 JS_MESSAGE_OBJECT_TYPE, | |
| 776 | |
| 777 // All the following types are subtypes of JSReceiver, which corresponds to | 775 // All the following types are subtypes of JSReceiver, which corresponds to |
| 778 // objects in the JS sense. The first and the last type in this range are | 776 // objects in the JS sense. The first and the last type in this range are |
| 779 // the two forms of function. This organization enables using the same | 777 // the two forms of function. This organization enables using the same |
| 780 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the | 778 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the |
| 781 // NONCALLABLE_JS_OBJECT range. | 779 // NONCALLABLE_JS_OBJECT range. |
| 782 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE | 780 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE |
| 783 JS_PROXY_TYPE, // LAST_JS_PROXY_TYPE | 781 JS_PROXY_TYPE, // LAST_JS_PROXY_TYPE |
| 784 | 782 |
| 785 JS_VALUE_TYPE, // FIRST_JS_OBJECT_TYPE | 783 JS_VALUE_TYPE, // FIRST_JS_OBJECT_TYPE |
| 784 JS_MESSAGE_OBJECT_TYPE, |
| 786 JS_DATE_TYPE, | 785 JS_DATE_TYPE, |
| 787 JS_OBJECT_TYPE, | 786 JS_OBJECT_TYPE, |
| 788 JS_CONTEXT_EXTENSION_OBJECT_TYPE, | 787 JS_CONTEXT_EXTENSION_OBJECT_TYPE, |
| 789 JS_GENERATOR_OBJECT_TYPE, | 788 JS_GENERATOR_OBJECT_TYPE, |
| 790 JS_MODULE_TYPE, | 789 JS_MODULE_TYPE, |
| 791 JS_GLOBAL_OBJECT_TYPE, | 790 JS_GLOBAL_OBJECT_TYPE, |
| 792 JS_BUILTINS_OBJECT_TYPE, | 791 JS_BUILTINS_OBJECT_TYPE, |
| 793 JS_GLOBAL_PROXY_TYPE, | 792 JS_GLOBAL_PROXY_TYPE, |
| 794 JS_ARRAY_TYPE, | 793 JS_ARRAY_TYPE, |
| 795 JS_ARRAY_BUFFER_TYPE, | 794 JS_ARRAY_BUFFER_TYPE, |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1437 inline bool IsExternal(); | 1436 inline bool IsExternal(); |
| 1438 inline bool IsAccessorInfo(); | 1437 inline bool IsAccessorInfo(); |
| 1439 | 1438 |
| 1440 inline bool IsStruct(); | 1439 inline bool IsStruct(); |
| 1441 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name(); | 1440 #define DECLARE_STRUCT_PREDICATE(NAME, Name, name) inline bool Is##Name(); |
| 1442 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) | 1441 STRUCT_LIST(DECLARE_STRUCT_PREDICATE) |
| 1443 #undef DECLARE_STRUCT_PREDICATE | 1442 #undef DECLARE_STRUCT_PREDICATE |
| 1444 | 1443 |
| 1445 INLINE(bool IsSpecObject()); | 1444 INLINE(bool IsSpecObject()); |
| 1446 INLINE(bool IsSpecFunction()); | 1445 INLINE(bool IsSpecFunction()); |
| 1446 INLINE(bool IsTemplateInfo()); |
| 1447 bool IsCallable(); | 1447 bool IsCallable(); |
| 1448 | 1448 |
| 1449 // Oddball testing. | 1449 // Oddball testing. |
| 1450 INLINE(bool IsUndefined()); | 1450 INLINE(bool IsUndefined()); |
| 1451 INLINE(bool IsNull()); | 1451 INLINE(bool IsNull()); |
| 1452 INLINE(bool IsTheHole()); | 1452 INLINE(bool IsTheHole()); |
| 1453 INLINE(bool IsException()); | 1453 INLINE(bool IsException()); |
| 1454 INLINE(bool IsUninitialized()); | 1454 INLINE(bool IsUninitialized()); |
| 1455 INLINE(bool IsTrue()); | 1455 INLINE(bool IsTrue()); |
| 1456 INLINE(bool IsFalse()); | 1456 INLINE(bool IsFalse()); |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2527 int capacity, | 2527 int capacity, |
| 2528 int length); | 2528 int length); |
| 2529 | 2529 |
| 2530 // Lookup interceptors are used for handling properties controlled by host | 2530 // Lookup interceptors are used for handling properties controlled by host |
| 2531 // objects. | 2531 // objects. |
| 2532 inline bool HasNamedInterceptor(); | 2532 inline bool HasNamedInterceptor(); |
| 2533 inline bool HasIndexedInterceptor(); | 2533 inline bool HasIndexedInterceptor(); |
| 2534 | 2534 |
| 2535 // Computes the enumerable keys from interceptors. Used for debug mirrors and | 2535 // Computes the enumerable keys from interceptors. Used for debug mirrors and |
| 2536 // by JSReceiver::GetKeys. | 2536 // by JSReceiver::GetKeys. |
| 2537 MUST_USE_RESULT static MaybeHandle<JSArray> GetKeysForNamedInterceptor( | 2537 MUST_USE_RESULT static MaybeHandle<JSObject> GetKeysForNamedInterceptor( |
| 2538 Handle<JSObject> object, | 2538 Handle<JSObject> object, |
| 2539 Handle<JSReceiver> receiver); | 2539 Handle<JSReceiver> receiver); |
| 2540 MUST_USE_RESULT static MaybeHandle<JSArray> GetKeysForIndexedInterceptor( | 2540 MUST_USE_RESULT static MaybeHandle<JSObject> GetKeysForIndexedInterceptor( |
| 2541 Handle<JSObject> object, | 2541 Handle<JSObject> object, |
| 2542 Handle<JSReceiver> receiver); | 2542 Handle<JSReceiver> receiver); |
| 2543 | 2543 |
| 2544 // Support functions for v8 api (needed for correct interceptor behavior). | 2544 // Support functions for v8 api (needed for correct interceptor behavior). |
| 2545 static bool HasRealNamedProperty(Handle<JSObject> object, | 2545 static bool HasRealNamedProperty(Handle<JSObject> object, |
| 2546 Handle<Name> key); | 2546 Handle<Name> key); |
| 2547 static bool HasRealElementProperty(Handle<JSObject> object, uint32_t index); | 2547 static bool HasRealElementProperty(Handle<JSObject> object, uint32_t index); |
| 2548 static bool HasRealNamedCallbackProperty(Handle<JSObject> object, | 2548 static bool HasRealNamedCallbackProperty(Handle<JSObject> object, |
| 2549 Handle<Name> key); | 2549 Handle<Name> key); |
| 2550 | 2550 |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3081 | 3081 |
| 3082 // Copy operations. | 3082 // Copy operations. |
| 3083 MUST_USE_RESULT inline MaybeObject* Copy(); | 3083 MUST_USE_RESULT inline MaybeObject* Copy(); |
| 3084 MUST_USE_RESULT MaybeObject* CopySize(int new_length, | 3084 MUST_USE_RESULT MaybeObject* CopySize(int new_length, |
| 3085 PretenureFlag pretenure = NOT_TENURED); | 3085 PretenureFlag pretenure = NOT_TENURED); |
| 3086 static Handle<FixedArray> CopySize(Handle<FixedArray> array, | 3086 static Handle<FixedArray> CopySize(Handle<FixedArray> array, |
| 3087 int new_length, | 3087 int new_length, |
| 3088 PretenureFlag pretenure = NOT_TENURED); | 3088 PretenureFlag pretenure = NOT_TENURED); |
| 3089 | 3089 |
| 3090 // Add the elements of a JSArray to this FixedArray. | 3090 // Add the elements of a JSArray to this FixedArray. |
| 3091 MUST_USE_RESULT static MaybeHandle<FixedArray> AddKeysFromJSArray( | 3091 MUST_USE_RESULT static MaybeHandle<FixedArray> AddKeysFromArrayLike( |
| 3092 Handle<FixedArray> content, | 3092 Handle<FixedArray> content, |
| 3093 Handle<JSArray> array); | 3093 Handle<JSObject> array); |
| 3094 | 3094 |
| 3095 // Computes the union of keys and return the result. | 3095 // Computes the union of keys and return the result. |
| 3096 // Used for implementing "for (n in object) { }" | 3096 // Used for implementing "for (n in object) { }" |
| 3097 MUST_USE_RESULT static MaybeHandle<FixedArray> UnionOfKeys( | 3097 MUST_USE_RESULT static MaybeHandle<FixedArray> UnionOfKeys( |
| 3098 Handle<FixedArray> first, | 3098 Handle<FixedArray> first, |
| 3099 Handle<FixedArray> second); | 3099 Handle<FixedArray> second); |
| 3100 | 3100 |
| 3101 // Copy a sub array from the receiver to dest. | 3101 // Copy a sub array from the receiver to dest. |
| 3102 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len); | 3102 void CopyTo(int pos, FixedArray* dest, int dest_pos, int len); |
| 3103 | 3103 |
| (...skipping 8179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11283 } else { | 11283 } else { |
| 11284 value &= ~(1 << bit_position); | 11284 value &= ~(1 << bit_position); |
| 11285 } | 11285 } |
| 11286 return value; | 11286 return value; |
| 11287 } | 11287 } |
| 11288 }; | 11288 }; |
| 11289 | 11289 |
| 11290 } } // namespace v8::internal | 11290 } } // namespace v8::internal |
| 11291 | 11291 |
| 11292 #endif // V8_OBJECTS_H_ | 11292 #endif // V8_OBJECTS_H_ |
| OLD | NEW |