diff options
Diffstat (limited to 'Zend/zend_vm_gen.php')
| -rw-r--r-- | Zend/zend_vm_gen.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 1821ef4eca..392c02491a 100644 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -456,6 +456,9 @@ function gen_code($f, $spec, $kind, $code, $op1, $op2) { /* Remove unnecessary ';' */ $code = preg_replace('/^\s*;\s*$/m', '', $code); + /* Remove WS */ + $code = preg_replace('/[ \t]+\n/m', "\n", $code); + out($f, $code); } @@ -581,7 +584,7 @@ function gen_labels($f, $spec, $kind, $prolog) { // Try to use unspecialized handler $op2 = "ANY"; } - // Check if specialized handler is defined + // Check if specialized handler is defined if (isset($dsc["op1"][$op1]) && isset($dsc["op2"][$op2])) { // Emit pointer to specialized handler @@ -670,7 +673,7 @@ function gen_labels($f, $spec, $kind, $prolog) { function gen_null_handler($f) { static $done = 0; - // New and all executors with CALL threading model can use the same handler + // New and all executors with CALL threading model can use the same handler // for undefined opcodes, do we emit code for it only once if (!$done) { $done = 1; @@ -689,10 +692,10 @@ function gen_executor_code($f, $spec, $kind, $prolog) { if ($spec) { // Produce specialized executor $op1t = $op_types; - // for each op1.op_type + // for each op1.op_type foreach($op1t as $op1) { $op2t = $op_types; - // for each op2.op_type + // for each op2.op_type foreach($op2t as $op2) { // for each handlers in helpers in original order foreach ($list as $lineno => $dsc) { @@ -1068,7 +1071,7 @@ function gen_vm($def, $skel) { $code_len = strlen((string)$max_opcode); $f = fopen("zend_vm_opcodes.h", "w+") or die("ERROR: Cannot create zend_vm_opcodes.h\n"); - // Insert header + // Insert header out($f, $GLOBALS['header_text']); foreach ($opcodes as $code => $dsc) { @@ -1083,7 +1086,7 @@ function gen_vm($def, $skel) { $f = fopen("zend_vm_execute.h", "w+") or die("ERROR: Cannot create zend_vm_execute.h\n"); $executor_file = realpath("zend_vm_execute.h"); - // Insert header + // Insert header out($f, $GLOBALS['header_text']); // Support for ZEND_USER_OPCODE @@ -1158,8 +1161,8 @@ function gen_vm($def, $skel) { out($f, "}\n\n"); // Export handlers and helpers - if (count($export) > 0 && - !ZEND_VM_OLD_EXECUTOR && + if (count($export) > 0 && + !ZEND_VM_OLD_EXECUTOR && ZEND_VM_KIND != ZEND_VM_KIND_CALL) { out($f,"#undef EX\n"); out($f,"#define EX(element) execute_data->element\n\n"); |
