| OLD | NEW |
| 1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 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 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 class Array : public Object { | 1702 class Array : public Object { |
| 1703 public: | 1703 public: |
| 1704 V8EXPORT uint32_t Length() const; | 1704 V8EXPORT uint32_t Length() const; |
| 1705 | 1705 |
| 1706 /** | 1706 /** |
| 1707 * Clones an element at index |index|. Returns an empty | 1707 * Clones an element at index |index|. Returns an empty |
| 1708 * handle if cloning fails (for any reason). | 1708 * handle if cloning fails (for any reason). |
| 1709 */ | 1709 */ |
| 1710 V8EXPORT Local<Object> CloneElementAt(uint32_t index); | 1710 V8EXPORT Local<Object> CloneElementAt(uint32_t index); |
| 1711 | 1711 |
| 1712 /** |
| 1713 * Creates a JavaScript array with the given length. If the length |
| 1714 * is negative the returned array will have length 0. |
| 1715 */ |
| 1712 V8EXPORT static Local<Array> New(int length = 0); | 1716 V8EXPORT static Local<Array> New(int length = 0); |
| 1717 |
| 1713 static inline Array* Cast(Value* obj); | 1718 static inline Array* Cast(Value* obj); |
| 1714 private: | 1719 private: |
| 1715 V8EXPORT Array(); | 1720 V8EXPORT Array(); |
| 1716 static void CheckCast(Value* obj); | 1721 static void CheckCast(Value* obj); |
| 1717 }; | 1722 }; |
| 1718 | 1723 |
| 1719 | 1724 |
| 1720 /** | 1725 /** |
| 1721 * A JavaScript function object (ECMA-262, 15.3). | 1726 * A JavaScript function object (ECMA-262, 15.3). |
| 1722 */ | 1727 */ |
| (...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2798 * intended to be used in the before-garbage-collection callback | 2803 * intended to be used in the before-garbage-collection callback |
| 2799 * function, for instance to simulate DOM tree connections among JS | 2804 * function, for instance to simulate DOM tree connections among JS |
| 2800 * wrapper objects. | 2805 * wrapper objects. |
| 2801 * See v8-profiler.h for RetainedObjectInfo interface description. | 2806 * See v8-profiler.h for RetainedObjectInfo interface description. |
| 2802 */ | 2807 */ |
| 2803 static void AddObjectGroup(Persistent<Value>* objects, | 2808 static void AddObjectGroup(Persistent<Value>* objects, |
| 2804 size_t length, | 2809 size_t length, |
| 2805 RetainedObjectInfo* info = NULL); | 2810 RetainedObjectInfo* info = NULL); |
| 2806 | 2811 |
| 2807 /** | 2812 /** |
| 2813 * Allows the host application to declare implicit references between |
| 2814 * the objects: if |parent| is alive, all |children| are alive too. |
| 2815 * After each garbage collection, all implicit references |
| 2816 * are removed. It is intended to be used in the before-garbage-collection |
| 2817 * callback function. |
| 2818 */ |
| 2819 static void AddImplicitReferences(Persistent<Object> parent, |
| 2820 Persistent<Value>* children, |
| 2821 size_t length); |
| 2822 |
| 2823 /** |
| 2808 * Initializes from snapshot if possible. Otherwise, attempts to | 2824 * Initializes from snapshot if possible. Otherwise, attempts to |
| 2809 * initialize from scratch. This function is called implicitly if | 2825 * initialize from scratch. This function is called implicitly if |
| 2810 * you use the API without calling it first. | 2826 * you use the API without calling it first. |
| 2811 */ | 2827 */ |
| 2812 static bool Initialize(); | 2828 static bool Initialize(); |
| 2813 | 2829 |
| 2814 /** | 2830 /** |
| 2815 * Adjusts the amount of registered external memory. Used to give | 2831 * Adjusts the amount of registered external memory. Used to give |
| 2816 * V8 an indication of the amount of externally allocated memory | 2832 * V8 an indication of the amount of externally allocated memory |
| 2817 * that is kept alive by JavaScript objects. V8 uses this to decide | 2833 * that is kept alive by JavaScript objects. V8 uses this to decide |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3970 | 3986 |
| 3971 | 3987 |
| 3972 } // namespace v8 | 3988 } // namespace v8 |
| 3973 | 3989 |
| 3974 | 3990 |
| 3975 #undef V8EXPORT | 3991 #undef V8EXPORT |
| 3976 #undef TYPE_CHECK | 3992 #undef TYPE_CHECK |
| 3977 | 3993 |
| 3978 | 3994 |
| 3979 #endif // V8_H_ | 3995 #endif // V8_H_ |
| OLD | NEW |