cvs: ZendEngine2 / zend_vm_gen.php
"Marcus Boerger" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.zend |
|---|---|
| Message-ID | <cvshelly1216628059@cvsserver> |
helly Mon Jul 21 08:14:19 2008 UTC
Modified files:
/ZendEngine2 zend_vm_gen.php
Log:
- Little debug hack to allow printing vm function
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_gen.php?r1=1.25&r2=1.26&diff_format=u
Index: ZendEngine2/zend_vm_gen.php
diff -u ZendEngine2/zend_vm_gen.php:1.25 ZendEngine2/zend_vm_gen.php:1.26
--- ZendEngine2/zend_vm_gen.php:1.25 Wed Jun 11 13:19:14 2008
+++ ZendEngine2/zend_vm_gen.php Mon Jul 21 08:14:19 2008
@@ -16,7 +16,7 @@
| Authors: Dmitry Stogov <[email protected]> |
+----------------------------------------------------------------------+
- $Id: zend_vm_gen.php,v 1.25 2008/06/11 13:19:14 dmitry Exp $
+ $Id: zend_vm_gen.php,v 1.26 2008/07/21 08:14:19 helly Exp $
*/
$header_text = <<< DATA
@@ -304,7 +304,7 @@
}
// Generates code for opcode handler or helper
-function gen_code($f, $spec, $kind, $export, $code, $op1, $op2) {
+function gen_code($f, $spec, $kind, $export, $code, $op1, $op2, $name) {
global $op1_type, $op2_type, $op1_get_zval_ptr, $op2_get_zval_ptr,
$op1_get_zval_ptr_ptr, $op2_get_zval_ptr_ptr,
$op1_get_obj_zval_ptr, $op2_get_obj_zval_ptr,
@@ -381,6 +381,9 @@
),
$code);
+ if (0 && strpos($code, '{') === 0) {
+ $code = "{\n\tfprintf(stderr, \"$name\\n\");\n" . substr($code, 1);
+ }
// Updating code according to selected threading model
switch($kind) {
case ZEND_VM_KIND_CALL:
@@ -485,7 +488,7 @@
// Generate opcode handler's entry point according to selected threading model
switch($kind) {
case ZEND_VM_KIND_CALL:
- out($f,"static int ZEND_FASTCALL ".$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."_HANDLER(ZEND_OPCODE_HANDLER_ARGS)\n");
+ out($f,"static int ZEND_FASTCALL ".$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."_HANDLER(ZEND_OPCODE_HANDLER_ARGS)\n");
break;
case ZEND_VM_KIND_SWITCH:
if ($spec) {
@@ -506,7 +509,7 @@
}
// Generate opcode handler's code
- gen_code($f, $spec, $kind, 0, $code, $op1, $op2);
+ gen_code($f, $spec, $kind, 0, $code, $op1, $op2, $name);
}
// Generates helper
@@ -537,7 +540,7 @@
}
// Generate helper's code
- gen_code($f, $spec, $kind, 0, $code, $op1, $op2);
+ gen_code($f, $spec, $kind, 0, $code, $op1, $op2, $name);
}
// Generates array of opcode handlers (specialized or unspecialized)
@@ -1254,7 +1257,7 @@
}
}
if (!$done) {
- gen_code($f, 0, ZEND_VM_KIND_CALL, 1, $code, 'ANY', 'ANY');
+ gen_code($f, 0, ZEND_VM_KIND_CALL, 1, $code, 'ANY', 'ANY', $name);
}
}
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php