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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 class ObjectTemplate; | 107 class ObjectTemplate; |
108 class Primitive; | 108 class Primitive; |
109 class RawOperationDescriptor; | 109 class RawOperationDescriptor; |
110 class Signature; | 110 class Signature; |
111 class StackFrame; | 111 class StackFrame; |
112 class StackTrace; | 112 class StackTrace; |
113 class String; | 113 class String; |
114 class StringObject; | 114 class StringObject; |
115 class Symbol; | 115 class Symbol; |
116 class SymbolObject; | 116 class SymbolObject; |
| 117 class Private; |
117 class Uint32; | 118 class Uint32; |
118 class Utils; | 119 class Utils; |
119 class Value; | 120 class Value; |
120 template <class T> class Handle; | 121 template <class T> class Handle; |
121 template <class T> class Local; | 122 template <class T> class Local; |
122 template <class T> class Eternal; | 123 template <class T> class Eternal; |
123 template<class T> class NonCopyablePersistentTraits; | 124 template<class T> class NonCopyablePersistentTraits; |
124 template<class T, | 125 template<class T, |
125 class M = NonCopyablePersistentTraits<T> > class Persistent; | 126 class M = NonCopyablePersistentTraits<T> > class Persistent; |
126 template<class T, class P> class WeakCallbackObject; | 127 template<class T, class P> class WeakCallbackObject; |
(...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1919 /** | 1920 /** |
1920 * A JavaScript symbol (ECMA-262 edition 6) | 1921 * A JavaScript symbol (ECMA-262 edition 6) |
1921 * | 1922 * |
1922 * This is an experimental feature. Use at your own risk. | 1923 * This is an experimental feature. Use at your own risk. |
1923 */ | 1924 */ |
1924 class V8_EXPORT Symbol : public Primitive { | 1925 class V8_EXPORT Symbol : public Primitive { |
1925 public: | 1926 public: |
1926 // Returns the print name string of the symbol, or undefined if none. | 1927 // Returns the print name string of the symbol, or undefined if none. |
1927 Local<Value> Name() const; | 1928 Local<Value> Name() const; |
1928 | 1929 |
1929 // Create a symbol without a print name. | 1930 // Create a symbol. If data is not NULL, it will be used as a print name. |
1930 static Local<Symbol> New(Isolate* isolate); | 1931 static Local<Symbol> New( |
1931 | 1932 Isolate *isolate, const char* data = NULL, int length = -1); |
1932 // Create a symbol with a print name. | |
1933 static Local<Symbol> New(Isolate *isolate, const char* data, int length = -1); | |
1934 | 1933 |
1935 V8_INLINE static Symbol* Cast(v8::Value* obj); | 1934 V8_INLINE static Symbol* Cast(v8::Value* obj); |
1936 private: | 1935 private: |
1937 Symbol(); | 1936 Symbol(); |
1938 static void CheckCast(v8::Value* obj); | 1937 static void CheckCast(v8::Value* obj); |
1939 }; | 1938 }; |
1940 | 1939 |
1941 | 1940 |
1942 /** | 1941 /** |
| 1942 * A private symbol |
| 1943 * |
| 1944 * This is an experimental feature. Use at your own risk. |
| 1945 */ |
| 1946 class V8_EXPORT Private : public Data { |
| 1947 public: |
| 1948 // Returns the print name string of the private symbol, or undefined if none. |
| 1949 Local<Value> Name() const; |
| 1950 |
| 1951 // Create a private symbol. If data is not NULL, it will be the print name. |
| 1952 static Local<Private> New( |
| 1953 Isolate *isolate, const char* data = NULL, int length = -1); |
| 1954 |
| 1955 private: |
| 1956 Private(); |
| 1957 }; |
| 1958 |
| 1959 |
| 1960 /** |
1943 * A JavaScript number value (ECMA-262, 4.3.20) | 1961 * A JavaScript number value (ECMA-262, 4.3.20) |
1944 */ | 1962 */ |
1945 class V8_EXPORT Number : public Primitive { | 1963 class V8_EXPORT Number : public Primitive { |
1946 public: | 1964 public: |
1947 double Value() const; | 1965 double Value() const; |
1948 static Local<Number> New(double value); | 1966 static Local<Number> New(double value); |
1949 static Local<Number> New(Isolate* isolate, double value); | 1967 static Local<Number> New(Isolate* isolate, double value); |
1950 V8_INLINE static Number* Cast(v8::Value* obj); | 1968 V8_INLINE static Number* Cast(v8::Value* obj); |
1951 private: | 1969 private: |
1952 Number(); | 1970 Number(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2102 AccessControl settings = DEFAULT, | 2120 AccessControl settings = DEFAULT, |
2103 PropertyAttribute attribute = None); | 2121 PropertyAttribute attribute = None); |
2104 | 2122 |
2105 // This function is not yet stable and should not be used at this time. | 2123 // This function is not yet stable and should not be used at this time. |
2106 bool SetDeclaredAccessor(Local<String> name, | 2124 bool SetDeclaredAccessor(Local<String> name, |
2107 Local<DeclaredAccessorDescriptor> descriptor, | 2125 Local<DeclaredAccessorDescriptor> descriptor, |
2108 PropertyAttribute attribute = None, | 2126 PropertyAttribute attribute = None, |
2109 AccessControl settings = DEFAULT); | 2127 AccessControl settings = DEFAULT); |
2110 | 2128 |
2111 /** | 2129 /** |
| 2130 * Functionality for private properties. |
| 2131 * This is an experimental feature, use at your own risk. |
| 2132 * Note: Private properties are inherited. Do not rely on this, since it may |
| 2133 * change. |
| 2134 */ |
| 2135 bool HasPrivate(Handle<Private> key); |
| 2136 bool SetPrivate(Handle<Private> key, Handle<Value> value); |
| 2137 bool DeletePrivate(Handle<Private> key); |
| 2138 Local<Value> GetPrivate(Handle<Private> key); |
| 2139 |
| 2140 /** |
2112 * Returns an array containing the names of the enumerable properties | 2141 * Returns an array containing the names of the enumerable properties |
2113 * of this object, including properties from prototype objects. The | 2142 * of this object, including properties from prototype objects. The |
2114 * array returned by this method contains the same values as would | 2143 * array returned by this method contains the same values as would |
2115 * be enumerated by a for-in statement over this object. | 2144 * be enumerated by a for-in statement over this object. |
2116 */ | 2145 */ |
2117 Local<Array> GetPropertyNames(); | 2146 Local<Array> GetPropertyNames(); |
2118 | 2147 |
2119 /** | 2148 /** |
2120 * This function has the same functionality as GetPropertyNames but | 2149 * This function has the same functionality as GetPropertyNames but |
2121 * the returned array doesn't contain the names of properties from | 2150 * the returned array doesn't contain the names of properties from |
(...skipping 4377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6499 */ | 6528 */ |
6500 | 6529 |
6501 | 6530 |
6502 } // namespace v8 | 6531 } // namespace v8 |
6503 | 6532 |
6504 | 6533 |
6505 #undef TYPE_CHECK | 6534 #undef TYPE_CHECK |
6506 | 6535 |
6507 | 6536 |
6508 #endif // V8_H_ | 6537 #endif // V8_H_ |
OLD | NEW |