Skip to content

Commit 07b9a4e

Browse files
committed
Rename context
1 parent 24489bf commit 07b9a4e

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Zend/zend_compile.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6648,35 +6648,35 @@ typedef struct {
66486648
uint32_t num_bindings;
66496649
uint32_t first_tmp;
66506650
zend_stack labels;
6651-
} zend_compile_pattern_context;
6651+
} zend_pm_context;
66526652

6653-
static void zend_pm_context_init(zend_compile_pattern_context *context)
6653+
static void zend_pm_context_init(zend_pm_context *context)
66546654
{
66556655
zend_stack_init(&context->labels, sizeof(uint32_t));
66566656
/* Avoid offset 0. */
66576657
uint32_t dummy = 0;
66586658
zend_stack_push(&context->labels, &dummy);
66596659
}
66606660

6661-
static void zend_pm_context_free(zend_compile_pattern_context *context)
6661+
static void zend_pm_context_free(zend_pm_context *context)
66626662
{
66636663
zend_stack_destroy(&context->labels);
66646664
}
66656665

6666-
static uint32_t zend_pm_label_create(zend_compile_pattern_context *context)
6666+
static uint32_t zend_pm_label_create(zend_pm_context *context)
66676667
{
66686668
uint32_t dummy = 0;
66696669
return -zend_stack_push(&context->labels, &dummy);
66706670
}
66716671

6672-
static void zend_pm_label_set_next(zend_compile_pattern_context *context, uint32_t label_offset)
6672+
static void zend_pm_label_set_next(zend_pm_context *context, uint32_t label_offset)
66736673
{
66746674
uint32_t *labels = zend_stack_base(&context->labels);
66756675
uint32_t *label = &labels[-label_offset];
66766676
*label = get_next_op_number();
66776677
}
66786678

6679-
static void zend_pm_labels_replace(zend_compile_pattern_context *context, uint32_t start_opnum)
6679+
static void zend_pm_labels_replace(zend_pm_context *context, uint32_t start_opnum)
66806680
{
66816681
uint32_t *labels = zend_stack_base(&context->labels);
66826682
if (!labels) {
@@ -6899,7 +6899,7 @@ static void zend_compile_match(znode *result, zend_ast *ast)
68996899
efree(jmp_end_opnums);
69006900
}
69016901

6902-
static void zend_compile_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum, zend_compile_pattern_context *context);
6902+
static void zend_compile_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum, zend_pm_context *context);
69036903
static zend_type zend_compile_single_typename(zend_ast *ast);
69046904

69056905
static void zend_compile_expr_like_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum)
@@ -6922,7 +6922,7 @@ static void verify_parenthesized_compound_pattern(zend_ast *ast, zend_ast_kind k
69226922
}
69236923
}
69246924

6925-
static void zend_compile_or_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum, zend_compile_pattern_context *context)
6925+
static void zend_compile_or_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum, zend_pm_context *context)
69266926
{
69276927
verify_parenthesized_compound_pattern(ast, ZEND_AST_AND_PATTERN);
69286928

@@ -6963,7 +6963,7 @@ static void zend_compile_or_pattern(zend_ast *ast, znode *expr_node, bool consum
69636963
context->inside_or_pattern = false;
69646964
}
69656965

6966-
static void zend_compile_and_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum, zend_compile_pattern_context *context)
6966+
static void zend_compile_and_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum, zend_pm_context *context)
69676967
{
69686968
verify_parenthesized_compound_pattern(ast, ZEND_AST_OR_PATTERN);
69696969

@@ -7014,7 +7014,7 @@ static void zend_compile_type_pattern(zend_ast *ast, znode *expr_node, bool cons
70147014
zend_emit_cond_jump(ZEND_JMPZ, &result, false_opnum);
70157015
}
70167016

7017-
static void zend_compile_binding_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum, zend_compile_pattern_context *context)
7017+
static void zend_compile_binding_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum, zend_pm_context *context)
70187018
{
70197019
if (context->inside_or_pattern) {
70207020
zend_error_noreturn(E_COMPILE_ERROR, "Must not bind to variables inside | pattern");
@@ -7049,7 +7049,7 @@ static void zend_compile_container_pattern(
70497049
znode *expr_node,
70507050
bool consume_expr,
70517051
uint32_t false_opnum,
7052-
zend_compile_pattern_context *context,
7052+
zend_pm_context *context,
70537053
bool is_array
70547054
) {
70557055
// FIXME: These copies are annoying...
@@ -7130,7 +7130,7 @@ static void zend_compile_container_pattern(
71307130
}
71317131
}
71327132

7133-
static void zend_compile_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum, zend_compile_pattern_context *context)
7133+
static void zend_compile_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum, zend_pm_context *context)
71347134
{
71357135
switch (ast->kind) {
71367136
case ZEND_AST_WILDCARD_PATTERN:
@@ -7172,7 +7172,7 @@ static void pattern_matching_count_bindings(zend_ast **ast_ptr, void *context)
71727172
}
71737173

71747174
if (ast->kind == ZEND_AST_BINDING_PATTERN) {
7175-
zend_compile_pattern_context *pattern_context = context;
7175+
zend_pm_context *pattern_context = context;
71767176
pattern_context->num_bindings++;
71777177
}
71787178

@@ -7187,7 +7187,7 @@ static void pattern_matching_emit_assigns(zend_ast **ast_ptr, void *context)
71877187
}
71887188

71897189
if (ast->kind == ZEND_AST_BINDING_PATTERN) {
7190-
zend_compile_pattern_context *pattern_context = context;
7190+
zend_pm_context *pattern_context = context;
71917191

71927192
znode var_node;
71937193
var_node.op_type = IS_CV;
@@ -7217,7 +7217,7 @@ static void zend_emit_is(znode *result, znode *expr_node, bool consume_expr, zen
72177217
expr_copy_node = *expr_node;
72187218
}
72197219

7220-
zend_compile_pattern_context context = {0};
7220+
zend_pm_context context = {0};
72217221
zend_pm_context_init(&context);
72227222
pattern_matching_count_bindings(&pattern_ast, &context);
72237223
context.first_tmp = CG(active_op_array)->T;

0 commit comments

Comments
 (0)