OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 2934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2945 | 2945 |
2946 | 2946 |
2947 /** | 2947 /** |
2948 * An instance of the built-in Map constructor (ECMA-262, 6th Edition, 23.1.1). | 2948 * An instance of the built-in Map constructor (ECMA-262, 6th Edition, 23.1.1). |
2949 */ | 2949 */ |
2950 class V8_EXPORT Map : public Object { | 2950 class V8_EXPORT Map : public Object { |
2951 public: | 2951 public: |
2952 size_t Size() const; | 2952 size_t Size() const; |
2953 | 2953 |
2954 /** | 2954 /** |
| 2955 * Returns an array of [key, value] arrays representing the contents |
| 2956 * of this Map. |
| 2957 */ |
| 2958 Local<Array> AsArray() const; |
| 2959 |
| 2960 /** |
2955 * Creates a new Map. | 2961 * Creates a new Map. |
2956 */ | 2962 */ |
2957 static Local<Map> New(Isolate* isolate); | 2963 static Local<Map> New(Isolate* isolate); |
2958 | 2964 |
2959 V8_INLINE static Map* Cast(Value* obj); | 2965 V8_INLINE static Map* Cast(Value* obj); |
2960 | 2966 |
2961 private: | 2967 private: |
2962 Map(); | 2968 Map(); |
2963 static void CheckCast(Value* obj); | 2969 static void CheckCast(Value* obj); |
2964 }; | 2970 }; |
2965 | 2971 |
2966 | 2972 |
2967 /** | 2973 /** |
2968 * An instance of the built-in Set constructor (ECMA-262, 6th Edition, 23.2.1). | 2974 * An instance of the built-in Set constructor (ECMA-262, 6th Edition, 23.2.1). |
2969 */ | 2975 */ |
2970 class V8_EXPORT Set : public Object { | 2976 class V8_EXPORT Set : public Object { |
2971 public: | 2977 public: |
2972 size_t Size() const; | 2978 size_t Size() const; |
2973 | 2979 |
2974 /** | 2980 /** |
| 2981 * Returns an array of the keys in this Set. |
| 2982 */ |
| 2983 Local<Array> AsArray() const; |
| 2984 |
| 2985 /** |
2975 * Creates a new Set. | 2986 * Creates a new Set. |
2976 */ | 2987 */ |
2977 static Local<Set> New(Isolate* isolate); | 2988 static Local<Set> New(Isolate* isolate); |
2978 | 2989 |
2979 V8_INLINE static Set* Cast(Value* obj); | 2990 V8_INLINE static Set* Cast(Value* obj); |
2980 | 2991 |
2981 private: | 2992 private: |
2982 Set(); | 2993 Set(); |
2983 static void CheckCast(Value* obj); | 2994 static void CheckCast(Value* obj); |
2984 }; | 2995 }; |
(...skipping 5273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8258 */ | 8269 */ |
8259 | 8270 |
8260 | 8271 |
8261 } // namespace v8 | 8272 } // namespace v8 |
8262 | 8273 |
8263 | 8274 |
8264 #undef TYPE_CHECK | 8275 #undef TYPE_CHECK |
8265 | 8276 |
8266 | 8277 |
8267 #endif // V8_H_ | 8278 #endif // V8_H_ |
OLD | NEW |