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 2964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2975 static void CheckCast(Value* obj); | 2975 static void CheckCast(Value* obj); |
2976 }; | 2976 }; |
2977 | 2977 |
2978 | 2978 |
2979 /** | 2979 /** |
2980 * An instance of the built-in Map constructor (ECMA-262, 6th Edition, 23.1.1). | 2980 * An instance of the built-in Map constructor (ECMA-262, 6th Edition, 23.1.1). |
2981 */ | 2981 */ |
2982 class V8_EXPORT Map : public Object { | 2982 class V8_EXPORT Map : public Object { |
2983 public: | 2983 public: |
2984 size_t Size() const; | 2984 size_t Size() const; |
| 2985 void Clear(); |
| 2986 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context, |
| 2987 Local<Value> key); |
| 2988 V8_WARN_UNUSED_RESULT MaybeLocal<Map> Set(Local<Context> context, |
| 2989 Local<Value> key, |
| 2990 Local<Value> value); |
| 2991 V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, |
| 2992 Local<Value> key); |
| 2993 V8_WARN_UNUSED_RESULT Maybe<bool> Delete(Local<Context> context, |
| 2994 Local<Value> key); |
2985 | 2995 |
2986 /** | 2996 /** |
2987 * Returns an array of length Size() * 2, where index N is the Nth key and | 2997 * Returns an array of length Size() * 2, where index N is the Nth key and |
2988 * index N + 1 is the Nth value. | 2998 * index N + 1 is the Nth value. |
2989 */ | 2999 */ |
2990 Local<Array> AsArray() const; | 3000 Local<Array> AsArray() const; |
2991 | 3001 |
2992 /** | 3002 /** |
2993 * Creates a new empty Map. | 3003 * Creates a new empty Map. |
2994 */ | 3004 */ |
(...skipping 14 matching lines...) Expand all Loading... |
3009 static void CheckCast(Value* obj); | 3019 static void CheckCast(Value* obj); |
3010 }; | 3020 }; |
3011 | 3021 |
3012 | 3022 |
3013 /** | 3023 /** |
3014 * An instance of the built-in Set constructor (ECMA-262, 6th Edition, 23.2.1). | 3024 * An instance of the built-in Set constructor (ECMA-262, 6th Edition, 23.2.1). |
3015 */ | 3025 */ |
3016 class V8_EXPORT Set : public Object { | 3026 class V8_EXPORT Set : public Object { |
3017 public: | 3027 public: |
3018 size_t Size() const; | 3028 size_t Size() const; |
| 3029 void Clear(); |
| 3030 V8_WARN_UNUSED_RESULT MaybeLocal<Set> Add(Local<Context> context, |
| 3031 Local<Value> key); |
| 3032 V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, |
| 3033 Local<Value> key); |
| 3034 V8_WARN_UNUSED_RESULT Maybe<bool> Delete(Local<Context> context, |
| 3035 Local<Value> key); |
3019 | 3036 |
3020 /** | 3037 /** |
3021 * Returns an array of the keys in this Set. | 3038 * Returns an array of the keys in this Set. |
3022 */ | 3039 */ |
3023 Local<Array> AsArray() const; | 3040 Local<Array> AsArray() const; |
3024 | 3041 |
3025 /** | 3042 /** |
3026 * Creates a new empty Set. | 3043 * Creates a new empty Set. |
3027 */ | 3044 */ |
3028 static Local<Set> New(Isolate* isolate); | 3045 static Local<Set> New(Isolate* isolate); |
(...skipping 5318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8347 */ | 8364 */ |
8348 | 8365 |
8349 | 8366 |
8350 } // namespace v8 | 8367 } // namespace v8 |
8351 | 8368 |
8352 | 8369 |
8353 #undef TYPE_CHECK | 8370 #undef TYPE_CHECK |
8354 | 8371 |
8355 | 8372 |
8356 #endif // V8_H_ | 8373 #endif // V8_H_ |
OLD | NEW |