Skip to content

Commit 7200adb

Browse files
committed
Rename functions of bytecode component to have uniform style.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
1 parent a223133 commit 7200adb

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

jerry-core/ecma/operations/ecma-eval.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ ecma_op_eval_chars_buffer (const jerry_api_char_t *code_p, /**< code characters
114114

115115
if (!code_contains_functions)
116116
{
117-
jsp_bc_remove_bytecode_data (bytecode_data_p);
117+
bc_remove_bytecode_data (bytecode_data_p);
118118
}
119119
}
120120

jerry-core/jerry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ jerry_cleanup (void)
13681368

13691369
ecma_finalize ();
13701370
lit_finalize ();
1371-
jsp_bc_finalize ();
1371+
bc_finalize ();
13721372
mem_finalize (is_show_mem_stats);
13731373
vm_finalize ();
13741374
} /* jerry_cleanup */

jerry-core/parser/js/bc/bytecode-data.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
static bytecode_data_header_t *first_bytecode_header_p = NULL;
2121

2222
bytecode_data_header_t *
23-
jsp_bc_get_first_bytecode_data_header ()
23+
bc_get_first_bytecode_data_header ()
2424
{
2525
return first_bytecode_header_p;
26-
} /* jsp_bc_get_first_bytecode_header */
26+
} /* bc_get_first_bytecode_header */
2727

2828
void
29-
jsp_bc_add_bytecode_data (bytecode_data_header_t *bc_header_p,
29+
bc_add_bytecode_data (bytecode_data_header_t *bc_header_p,
3030
lit_id_hash_table *lit_id_hash_table_p,
3131
vm_instr_t *bytecode_p,
3232
vm_instr_counter_t instrs_count)
@@ -37,13 +37,13 @@ jsp_bc_add_bytecode_data (bytecode_data_header_t *bc_header_p,
3737
MEM_CP_SET_POINTER (bc_header_p->next_header_cp, first_bytecode_header_p);
3838

3939
first_bytecode_header_p = bc_header_p;
40-
} /* jsp_bc_add_bytecode */
40+
} /* bc_add_bytecode */
4141

4242
/**
4343
* Deletes bytecode and associated hash table
4444
*/
4545
void
46-
jsp_bc_remove_bytecode_data (const bytecode_data_header_t *bytecode_data_p)
46+
bc_remove_bytecode_data (const bytecode_data_header_t *bytecode_data_p)
4747
{
4848
bytecode_data_header_t *prev_header = NULL;
4949
bytecode_data_header_t *cur_header_p = first_bytecode_header_p;
@@ -67,7 +67,7 @@ jsp_bc_remove_bytecode_data (const bytecode_data_header_t *bytecode_data_p)
6767
prev_header = cur_header_p;
6868
cur_header_p = MEM_CP_GET_POINTER (bytecode_data_header_t, cur_header_p->next_header_cp);
6969
}
70-
} /* jsp_bc_remove_bytecode_data */
70+
} /* bc_remove_bytecode_data */
7171

7272
vm_instr_t bc_get_instr (const bytecode_data_header_t *bytecode_data_p,
7373
vm_instr_counter_t oc)
@@ -129,7 +129,7 @@ bc_merge_scopes_into_bytecode (scopes_tree scope_p,
129129

130130
bytecode_data_header_t *header_p = (bytecode_data_header_t *) buffer_p;
131131

132-
jsp_bc_add_bytecode_data (header_p, lit_id_hash, bytecode_p, instrs_count);
132+
bc_add_bytecode_data (header_p, lit_id_hash, bytecode_p, instrs_count);
133133

134134
if (is_show_instrs)
135135
{
@@ -141,7 +141,7 @@ bc_merge_scopes_into_bytecode (scopes_tree scope_p,
141141
} /* bc_merge_scopes_into_bytecode */
142142

143143
void
144-
jsp_bc_finalize ()
144+
bc_finalize ()
145145
{
146146
while (first_bytecode_header_p != NULL)
147147
{
@@ -150,7 +150,7 @@ jsp_bc_finalize ()
150150

151151
mem_heap_free_block (header_p);
152152
}
153-
} /* jsp_bc_finalize */
153+
} /* bc_finalize */
154154

155155
/**
156156
* Convert literal id (operand value of instruction) to compressed pointer to literal
@@ -310,10 +310,10 @@ bc_load_bytecode_with_idx_map (const uint8_t *bytecode_and_idx_map_p, /**< buffe
310310
hash_table_size)
311311
&& (vm_instr_counter_t) instructions_number == instructions_number)
312312
{
313-
jsp_bc_add_bytecode_data (header_p,
314-
(lit_id_hash_table *) lit_id_hash_table_buffer_p,
315-
instrs_p,
316-
(vm_instr_counter_t) instructions_number);
313+
bc_add_bytecode_data (header_p,
314+
(lit_id_hash_table *) lit_id_hash_table_buffer_p,
315+
instrs_p,
316+
(vm_instr_counter_t) instructions_number);
317317

318318
return header_p;
319319
}

jerry-core/parser/js/bc/bytecode-data.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ typedef struct __attribute__ ((aligned (MEM_ALIGNMENT))) bytecode_data_header_t
4949
} bytecode_data_header_t;
5050

5151

52-
bytecode_data_header_t * jsp_bc_get_first_bytecode_data_header ();
52+
bytecode_data_header_t * bc_get_first_bytecode_data_header ();
5353

54-
void jsp_bc_add_bytecode_data (bytecode_data_header_t *,
55-
lit_id_hash_table *,
56-
vm_instr_t *,
57-
vm_instr_counter_t);
54+
void bc_add_bytecode_data (bytecode_data_header_t *,
55+
lit_id_hash_table *,
56+
vm_instr_t *,
57+
vm_instr_counter_t);
5858

59-
void jsp_bc_remove_bytecode_data (const bytecode_data_header_t *);
59+
void bc_remove_bytecode_data (const bytecode_data_header_t *);
6060

6161
vm_instr_t bc_get_instr (const bytecode_data_header_t *,
6262
vm_instr_counter_t);
@@ -65,7 +65,7 @@ void bc_print_instrs (const bytecode_data_header_t *bytecode_data_p);
6565

6666
const bytecode_data_header_t *bc_merge_scopes_into_bytecode (scopes_tree, bool);
6767

68-
void jsp_bc_finalize ();
68+
void bc_finalize ();
6969

7070
lit_cpointer_t
7171
bc_get_literal_cp_by_uid (uint8_t,

jerry-core/vm/pretty-printer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ var_to_str (vm_instr_t instr, lit_cpointer_t lit_ids[], vm_instr_counter_t oc, u
110110
else
111111
{
112112
return lit_cp_to_str (bc_get_literal_cp_by_uid (instr.data.raw_args[current_arg - 1],
113-
jsp_bc_get_first_bytecode_data_header (),
113+
bc_get_first_bytecode_data_header (),
114114
oc));
115115
}
116116
}

tests/unit/test-parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ main (int __attr_unused___ argc,
131131
JERRY_ASSERT (instrs_equal (bytecode_data_p->instrs_p, instrs, 5));
132132

133133
lit_finalize ();
134-
jsp_bc_finalize ();
134+
bc_finalize ();
135135

136136
// #2
137137
char program2[] = "var var;";
@@ -143,7 +143,7 @@ main (int __attr_unused___ argc,
143143
JERRY_ASSERT (parse_status == JSP_STATUS_SYNTAX_ERROR && bytecode_data_p == NULL);
144144

145145
lit_finalize ();
146-
jsp_bc_finalize ();
146+
bc_finalize ();
147147

148148
mem_finalize (false);
149149

0 commit comments

Comments
 (0)