Skip to content

Commit 0f2d513

Browse files
committed
Remove unspec'ed features
1 parent 508d55d commit 0f2d513

File tree

5 files changed

+4
-48
lines changed

5 files changed

+4
-48
lines changed

Zend/tests/pattern_matching/is/wildcard.phpt

Lines changed: 0 additions & 24 deletions
This file was deleted.

Zend/tests/pattern_matching/match/basic.phpt

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,16 @@ var_dump(match ('Foo') {
5151
is 6 => wrong(),
5252
});
5353

54-
var_dump(match ('Foo') {
55-
is 1 => wrong(),
56-
is 2 => wrong(),
57-
is 3 => wrong(),
58-
is * => 'Wildcard pattern',
54+
var_dump(match ('foo') {
55+
is 'bar' => wrong(),
56+
is Foo::FOO => 'Class constant literal',
5957
});
6058

61-
// var_dump(match (15) {
62-
// is 0 ..< 10 => wrong(),
63-
// is 10 ..< 20 => 'Range pattern',
64-
// is 20 ..< 30 => wrong(),
65-
// });
66-
67-
// var_dump(match ('foo') {
68-
// is 'bar' => wrong(),
69-
// is Foo::FOO => 'Class constant literal',
70-
// });
71-
7259
?>
7360
--EXPECT--
7461
string(25) "Literal pattern with null"
7562
string(25) "Literal pattern with bool"
7663
string(24) "Literal pattern with int"
7764
string(27) "Literal pattern with string"
7865
string(23) "Identifier pattern: Foo"
79-
string(16) "Wildcard pattern"
66+
string(22) "Class constant literal"

Zend/zend_ast.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ enum _zend_ast_kind {
8080
ZEND_AST_TYPE,
8181
ZEND_AST_CONSTANT_CLASS,
8282
ZEND_AST_CALLABLE_CONVERT,
83-
ZEND_AST_WILDCARD_PATTERN,
8483

8584
/* 1 child node */
8685
ZEND_AST_VAR = 1 << ZEND_AST_NUM_CHILDREN_SHIFT,

Zend/zend_compile.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6919,11 +6919,6 @@ static void zend_pm_compile_container(
69196919
static void zend_compile_pattern(zend_ast *ast, znode *expr_node, bool consume_expr, uint32_t false_opnum, zend_pm_context *context)
69206920
{
69216921
switch (ast->kind) {
6922-
case ZEND_AST_WILDCARD_PATTERN:
6923-
if (consume_expr && (expr_node->op_type & (IS_VAR|IS_TMP_VAR))) {
6924-
zend_emit_op(NULL, ZEND_FREE, expr_node, NULL);
6925-
}
6926-
break;
69276922
case ZEND_AST_EXPR_LIKE_PATTERN:
69286923
zend_pm_compile_expr_like(ast, expr_node, consume_expr, false_opnum);
69296924
break;

Zend/zend_language_parser.y

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,6 @@ atomic_pattern:
14191419
| array_pattern { $$ = $1; }
14201420
| binding_pattern { $$ = $1; }
14211421
| class_const_pattern { $$ = zend_ast_create(ZEND_AST_EXPR_LIKE_PATTERN, $1); }
1422-
| '*' { $$ = zend_ast_create(ZEND_AST_WILDCARD_PATTERN); }
14231422
| '(' pattern ')' {
14241423
$$ = $2;
14251424
$$->attr = ZEND_PARENTHESIZED_PATTERN;

0 commit comments

Comments
 (0)