• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright JS Foundation and other contributors, http://js.foundation
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef ECMA_CONTAINER_OBJECT_H
17 #define ECMA_CONTAINER_OBJECT_H
18 
19 #include "ecma-globals.h"
20 #include "ecma-builtins.h"
21 
22 #if ENABLED (JERRY_ES2015_BUILTIN_CONTAINER)
23 
24 /** \addtogroup ecma ECMA
25  * @{
26  *
27  * \addtogroup ecmamaphelpers ECMA builtin map/set helper functions
28  * @{
29  */
30 
31 uint8_t ecma_op_container_entry_size (lit_magic_string_id_t lit_id);
32 ecma_value_t ecma_op_container_create (const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len,
33                                        lit_magic_string_id_t lit_id, ecma_builtin_id_t proto_id);
34 ecma_value_t ecma_op_container_size (ecma_value_t this_arg, lit_magic_string_id_t lit_id);
35 ecma_value_t ecma_op_container_get (ecma_value_t this_arg, ecma_value_t key_arg, lit_magic_string_id_t lit_id);
36 ecma_value_t ecma_op_container_foreach (ecma_value_t this_arg, ecma_value_t predicate, ecma_value_t predicate_this_arg,
37                                         lit_magic_string_id_t lit_id);
38 ecma_value_t ecma_op_container_has (ecma_value_t this_arg, ecma_value_t key_arg, lit_magic_string_id_t lit_id);
39 ecma_value_t ecma_op_container_set (ecma_value_t this_arg, ecma_value_t key_arg, ecma_value_t value_arg,
40                                     lit_magic_string_id_t lit_id);
41 ecma_value_t ecma_op_container_clear (ecma_value_t this_arg, lit_magic_string_id_t lit_id);
42 ecma_value_t ecma_op_container_delete (ecma_value_t this_arg, ecma_value_t key_arg, lit_magic_string_id_t lit_id);
43 ecma_value_t ecma_op_container_delete_weak (ecma_value_t this_arg, ecma_value_t key_arg, lit_magic_string_id_t lit_id);
44 void ecma_op_container_unref_weak (ecma_object_t *object_p, ecma_value_t ref_holder);
45 void ecma_op_container_remove_weak_entry (ecma_object_t *container_p, ecma_value_t key_arg);
46 void ecma_op_container_free_entries (ecma_object_t *object_p);
47 ecma_value_t ecma_op_container_create_iterator (ecma_value_t this_arg, uint8_t type, lit_magic_string_id_t lit_id,
48                                                 ecma_builtin_id_t proto_id, ecma_pseudo_array_type_t iterator_type);
49 ecma_value_t ecma_op_container_iterator_next (ecma_value_t this_val, ecma_pseudo_array_type_t iterator_type);
50 
51 /**
52  * @}
53  * @}
54  */
55 
56 #endif /* ENABLED (JERRY_ES2015_BUILTIN_CONTAINER) */
57 
58 #endif /* !ECMA_CONTAINER_OBJECT_H */
59