@@ -419,7 +419,7 @@ def test_pep7_condition(self):
419
419
def test_error_if_plain (self ):
420
420
input = """
421
421
inst(OP, (--)) {
422
- ERROR_IF(cond, label );
422
+ ERROR_IF(cond);
423
423
}
424
424
"""
425
425
output = """
@@ -432,7 +432,7 @@ def test_error_if_plain(self):
432
432
next_instr += 1;
433
433
INSTRUCTION_STATS(OP);
434
434
if (cond) {
435
- JUMP_TO_LABEL(label );
435
+ JUMP_TO_LABEL(error );
436
436
}
437
437
DISPATCH();
438
438
}
@@ -442,7 +442,7 @@ def test_error_if_plain(self):
442
442
def test_error_if_plain_with_comment (self ):
443
443
input = """
444
444
inst(OP, (--)) {
445
- ERROR_IF(cond, label ); // Comment is ok
445
+ ERROR_IF(cond); // Comment is ok
446
446
}
447
447
"""
448
448
output = """
@@ -455,7 +455,7 @@ def test_error_if_plain_with_comment(self):
455
455
next_instr += 1;
456
456
INSTRUCTION_STATS(OP);
457
457
if (cond) {
458
- JUMP_TO_LABEL(label );
458
+ JUMP_TO_LABEL(error );
459
459
}
460
460
DISPATCH();
461
461
}
@@ -467,7 +467,7 @@ def test_error_if_pop(self):
467
467
inst(OP, (left, right -- res)) {
468
468
SPAM(left, right);
469
469
INPUTS_DEAD();
470
- ERROR_IF(cond, label );
470
+ ERROR_IF(cond);
471
471
res = 0;
472
472
}
473
473
"""
@@ -487,7 +487,7 @@ def test_error_if_pop(self):
487
487
left = stack_pointer[-2];
488
488
SPAM(left, right);
489
489
if (cond) {
490
- JUMP_TO_LABEL(pop_2_label );
490
+ JUMP_TO_LABEL(pop_2_error );
491
491
}
492
492
res = 0;
493
493
stack_pointer[-2] = res;
@@ -503,7 +503,7 @@ def test_error_if_pop_with_result(self):
503
503
inst(OP, (left, right -- res)) {
504
504
res = SPAM(left, right);
505
505
INPUTS_DEAD();
506
- ERROR_IF(cond, label );
506
+ ERROR_IF(cond);
507
507
}
508
508
"""
509
509
output = """
@@ -522,7 +522,7 @@ def test_error_if_pop_with_result(self):
522
522
left = stack_pointer[-2];
523
523
res = SPAM(left, right);
524
524
if (cond) {
525
- JUMP_TO_LABEL(pop_2_label );
525
+ JUMP_TO_LABEL(pop_2_error );
526
526
}
527
527
stack_pointer[-2] = res;
528
528
stack_pointer += -1;
@@ -903,7 +903,7 @@ def test_array_error_if(self):
903
903
inst(OP, (extra, values[oparg] --)) {
904
904
DEAD(extra);
905
905
DEAD(values);
906
- ERROR_IF(oparg == 0, somewhere );
906
+ ERROR_IF(oparg == 0);
907
907
}
908
908
"""
909
909
output = """
@@ -922,7 +922,7 @@ def test_array_error_if(self):
922
922
if (oparg == 0) {
923
923
stack_pointer += -1 - oparg;
924
924
assert(WITHIN_STACK_BOUNDS());
925
- JUMP_TO_LABEL(somewhere );
925
+ JUMP_TO_LABEL(error );
926
926
}
927
927
stack_pointer += -1 - oparg;
928
928
assert(WITHIN_STACK_BOUNDS());
@@ -1319,7 +1319,7 @@ def test_pop_on_error_peeks(self):
1319
1319
1320
1320
op(THIRD, (j, k --)) {
1321
1321
INPUTS_DEAD(); // Mark j and k as used
1322
- ERROR_IF(cond, error );
1322
+ ERROR_IF(cond);
1323
1323
}
1324
1324
1325
1325
macro(TEST) = FIRST + SECOND + THIRD;
@@ -1369,7 +1369,7 @@ def test_push_then_error(self):
1369
1369
1370
1370
op(SECOND, (a -- a, b)) {
1371
1371
b = 1;
1372
- ERROR_IF(cond, error );
1372
+ ERROR_IF(cond);
1373
1373
}
1374
1374
1375
1375
macro(TEST) = FIRST + SECOND;
@@ -1414,10 +1414,10 @@ def test_error_if_true(self):
1414
1414
1415
1415
input = """
1416
1416
inst(OP1, ( --)) {
1417
- ERROR_IF(true, here );
1417
+ ERROR_IF(true);
1418
1418
}
1419
1419
inst(OP2, ( --)) {
1420
- ERROR_IF(1, there );
1420
+ ERROR_IF(1);
1421
1421
}
1422
1422
"""
1423
1423
output = """
@@ -1429,7 +1429,7 @@ def test_error_if_true(self):
1429
1429
frame->instr_ptr = next_instr;
1430
1430
next_instr += 1;
1431
1431
INSTRUCTION_STATS(OP1);
1432
- JUMP_TO_LABEL(here );
1432
+ JUMP_TO_LABEL(error );
1433
1433
}
1434
1434
1435
1435
TARGET(OP2) {
@@ -1440,7 +1440,7 @@ def test_error_if_true(self):
1440
1440
frame->instr_ptr = next_instr;
1441
1441
next_instr += 1;
1442
1442
INSTRUCTION_STATS(OP2);
1443
- JUMP_TO_LABEL(there );
1443
+ JUMP_TO_LABEL(error );
1444
1444
}
1445
1445
"""
1446
1446
self .run_cases_test (input , output )
@@ -1716,7 +1716,7 @@ def test_no_escaping_calls_in_branching_macros(self):
1716
1716
1717
1717
input = """
1718
1718
inst(OP, ( -- )) {
1719
- ERROR_IF(escaping_call(), error );
1719
+ ERROR_IF(escaping_call());
1720
1720
}
1721
1721
"""
1722
1722
with self .assertRaises (SyntaxError ):
0 commit comments