mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
zend_vm_gen: Fix line numbers for --with-lines (#19789)
The removal of empty lines and lines containing only semicolons moved the offsets around. Remove just the standalone semicolons without removing entire lines to keep both files in sync. This is also useful for IDE split view mode even when not enabling `--with-lines`.
This commit is contained in:
2164
Zend/zend_vm_execute.h
generated
2164
Zend/zend_vm_execute.h
generated
File diff suppressed because it is too large
Load Diff
@@ -919,10 +919,7 @@ function gen_code($f, $spec, $kind, $code, $op1, $op2, $name, $extra_spec=null)
|
||||
}
|
||||
|
||||
/* Remove unnecessary ';' */
|
||||
$code = preg_replace('/^\s*;\s*$/m', '', $code);
|
||||
|
||||
/* Remove WS */
|
||||
$code = preg_replace('/[ \t]+\n/m', "\n", $code);
|
||||
$code = preg_replace('/^\s*;\s*$/m', "\n", $code);
|
||||
|
||||
out($f, $code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user