Changeset 344 for eaccelerator/trunk/ea_dasm.c
- Timestamp:
- 06/19/08 18:01:31 (6 months ago)
- Files:
-
- eaccelerator/trunk/ea_dasm.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
eaccelerator/trunk/ea_dasm.c
r286 r344 99 99 "FETCH_GLOBAL", /* 0 */ 100 100 "FETCH_LOCAL", /* 1 */ 101 "FETCH_STATIC" /* 2 */ 102 #ifdef ZEND_ENGINE_2 103 , 104 "FETCH_STATIC_MEMBER" /* 3 */ 105 #ifdef ZEND_ENGINE_2_1 106 , 101 "FETCH_STATIC", /* 2 */ 102 "FETCH_STATIC_MEMBER", /* 3 */ 107 103 "UNKNOWN 1" /* 4 */ 108 #endif109 #endif110 104 }; 111 105 /* }}} */ … … 272 266 buf[0] = '\0'; 273 267 } 274 #ifdef ZEND_ENGINE_2275 268 } else if ((op->ops & EXT_MASK) == EXT_ASSIGN) { 276 269 if (opline->extended_value == ZEND_ASSIGN_OBJ) { … … 281 274 buf[0] = '\0'; 282 275 } 283 #ifndef ZEND_ENGINE_2_1284 } else if (opline->opcode == ZEND_UNSET_DIM_OBJ) {285 if (opline->extended_value == ZEND_UNSET_DIM) {286 snprintf(buf, sizeof(buf), "ZEND_UNSET_DIM");287 } else if (opline->extended_value == ZEND_UNSET_OBJ) {288 snprintf(buf, sizeof(buf), "ZEND_UNSET_OBJ");289 } else {290 buf[0] = '\0';291 }292 #endif293 #endif294 276 } else if (opline->extended_value != 0) { 295 277 snprintf(buf, sizeof(buf), "%ld", opline->extended_value); … … 301 283 /* op1 */ 302 284 zval_used = 0; 303 #ifdef ZEND_ENGINE_2_1304 285 if (opline->op1.op_type == IS_CV) { 305 286 snprintf(buf, sizeof(buf), "$cv%u(%s)", opline->op1.u.var, op_array->vars[opline->op1.u.var].name); 306 } else 307 #endif 308 if ((op->ops & OP1_MASK) == OP1_OPLINE) { 287 } else if ((op->ops & OP1_MASK) == OP1_OPLINE) { 309 288 snprintf(buf, sizeof(buf), "opline(%d)", opline->op1.u.opline_num); 310 #ifdef ZEND_ENGINE_2311 289 } else if ((op->ops & OP1_MASK) == OP1_JMPADDR) { 312 290 snprintf(buf, sizeof(buf), "opline(%u)", (unsigned int)(opline->op1.u.jmp_addr - op_array->opcodes)); … … 319 297 snprintf(buf, sizeof(buf), "$class%u", VAR_NUM(opline->op1.u.var)); 320 298 } 321 #endif322 299 } else if ((op->ops & OP1_MASK) == OP1_BRK) { 323 300 if (opline->op1.u.opline_num != -1 && opline->op2.op_type == IS_CONST && opline->op2.u.constant.type == IS_LONG) { … … 380 357 /* op2 */ 381 358 zval_used = 0; 382 #ifdef ZEND_ENGINE_2_1383 359 if (opline->op2.op_type == IS_CV) { 384 360 snprintf(buf, sizeof(buf), "$cv%u(%s)", opline->op2.u.var, op_array->vars[opline->op2.u.var].name); 385 } else 386 #endif 387 if ((op->ops & OP2_MASK) == OP2_OPLINE) { 361 } else if ((op->ops & OP2_MASK) == OP2_OPLINE) { 388 362 snprintf(buf, sizeof(buf), "opline(%d)", opline->op2.u.opline_num); 389 #ifdef ZEND_ENGINE_2390 363 } else if ((op->ops & OP2_MASK) == OP2_JMPADDR) { 391 364 snprintf(buf, sizeof(buf), "opline(%u)", (unsigned int) (opline->op2.u.jmp_addr - op_array->opcodes)); 392 365 } else if ((op->ops & OP2_MASK) == OP2_CLASS) { 393 366 snprintf(buf, sizeof(buf), "$class%u", VAR_NUM(opline->op2.u.var)); 394 #endif395 367 } else if ((op->ops & OP2_MASK) == OP2_VAR) { 396 368 snprintf(buf, sizeof(buf), "$var%u", VAR_NUM(opline->op2.u.var)); 397 369 } else if ((op->ops & OP2_MASK) == OP2_FETCH) { 398 #ifdef ZEND_ENGINE_2399 370 if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) { 400 371 snprintf(buf, sizeof(buf), "%s $class%u", fetchtypename[opline->op2.u.EA.type], VAR_NUM(opline->op2.u.var)); … … 402 373 snprintf(buf, sizeof(buf), "%s", fetchtypename[opline->op2.u.EA.type]); 403 374 } 404 #else405 strncpy(buf, fetchtypename[opline->op2.u.fetch_type], sizeof(buf));406 #endif407 375 } else if ((op->ops & OP2_MASK) == OP2_INCLUDE) { 408 376 if (opline->op2.u.constant.value.lval == ZEND_EVAL) { … … 449 417 /* result */ 450 418 zval_used = 0; 451 #ifdef ZEND_ENGINE_2_1452 419 if (opline->result.op_type == IS_CV) { 453 420 snprintf(buf, sizeof(buf), "$cv%u(%s)", opline->result.u.var, op_array->vars[opline->result.u.var].name); 454 421 } else 455 #endif456 422 switch (op->ops & RES_MASK) { 457 423 case RES_STD: