Lines Matching refs:op_array
458 static void zend_file_cache_serialize_op_array(zend_op_array *op_array, argument
463 ZEND_MAP_PTR_INIT(op_array->static_variables_ptr, NULL);
464 ZEND_MAP_PTR_INIT(op_array->run_time_cache, NULL);
467 if (IS_SERIALIZED(op_array->opcodes)) {
468 ZEND_ASSERT(op_array->scope && "Only method op_arrays should be shared");
472 if (op_array->scope) {
473 if (UNEXPECTED(zend_shared_alloc_get_xlat_entry(op_array->opcodes))) {
474 op_array->refcount = (uint32_t*)(intptr_t)-1;
475 SERIALIZE_PTR(op_array->static_variables);
476 SERIALIZE_PTR(op_array->literals);
477 SERIALIZE_PTR(op_array->opcodes);
478 SERIALIZE_PTR(op_array->arg_info);
479 SERIALIZE_PTR(op_array->vars);
480 SERIALIZE_STR(op_array->function_name);
481 SERIALIZE_STR(op_array->filename);
482 SERIALIZE_PTR(op_array->live_range);
483 SERIALIZE_PTR(op_array->scope);
484 SERIALIZE_STR(op_array->doc_comment);
485 SERIALIZE_ATTRIBUTES(op_array->attributes);
486 SERIALIZE_PTR(op_array->try_catch_array);
487 SERIALIZE_PTR(op_array->prototype);
490 zend_shared_alloc_register_xlat_entry(op_array->opcodes, op_array->opcodes);
493 if (op_array->static_variables) {
496 SERIALIZE_PTR(op_array->static_variables);
497 ht = op_array->static_variables;
502 if (op_array->literals) {
505 SERIALIZE_PTR(op_array->literals);
506 p = op_array->literals;
508 end = p + op_array->last_literal;
519 zval *literals = op_array->literals;
523 SERIALIZE_PTR(op_array->opcodes);
524 opline = op_array->opcodes;
526 end = opline + op_array->last;
580 if (op_array->arg_info) {
582 SERIALIZE_PTR(op_array->arg_info);
583 p = op_array->arg_info;
585 end = p + op_array->num_args;
586 if (op_array->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
589 if (op_array->fn_flags & ZEND_ACC_VARIADIC) {
601 if (op_array->vars) {
604 SERIALIZE_PTR(op_array->vars);
605 p = op_array->vars;
607 end = p + op_array->last_var;
616 if (op_array->num_dynamic_func_defs) {
618 SERIALIZE_PTR(op_array->dynamic_func_defs);
619 defs = op_array->dynamic_func_defs;
621 for (uint32_t i = 0; i < op_array->num_dynamic_func_defs; i++) {
630 SERIALIZE_STR(op_array->function_name);
631 SERIALIZE_STR(op_array->filename);
632 SERIALIZE_PTR(op_array->live_range);
633 SERIALIZE_PTR(op_array->scope);
634 SERIALIZE_STR(op_array->doc_comment);
635 SERIALIZE_ATTRIBUTES(op_array->attributes);
636 SERIALIZE_PTR(op_array->try_catch_array);
637 SERIALIZE_PTR(op_array->prototype);
651 zend_file_cache_serialize_op_array(&func->op_array, script, info, buf);
1306 static void zend_file_cache_unserialize_op_array(zend_op_array *op_array, argument
1311 if (op_array != &script->script.main_op_array) {
1312 op_array->fn_flags |= ZEND_ACC_IMMUTABLE;
1313 ZEND_MAP_PTR_NEW(op_array->run_time_cache);
1315 ZEND_ASSERT(!(op_array->fn_flags & ZEND_ACC_IMMUTABLE));
1316 ZEND_MAP_PTR_INIT(op_array->run_time_cache, NULL);
1318 if (op_array->static_variables) {
1319 ZEND_MAP_PTR_NEW(op_array->static_variables_ptr);
1322 op_array->fn_flags &= ~ZEND_ACC_IMMUTABLE;
1323 ZEND_MAP_PTR_INIT(op_array->static_variables_ptr, NULL);
1324 ZEND_MAP_PTR_INIT(op_array->run_time_cache, NULL);
1328 if (IS_UNSERIALIZED(op_array->opcodes)) {
1329 ZEND_ASSERT(op_array->scope && "Only method op_arrays should be shared");
1333 if (op_array->refcount) {
1334 op_array->refcount = NULL;
1335 UNSERIALIZE_PTR(op_array->static_variables);
1336 UNSERIALIZE_PTR(op_array->literals);
1337 UNSERIALIZE_PTR(op_array->opcodes);
1338 UNSERIALIZE_PTR(op_array->arg_info);
1339 UNSERIALIZE_PTR(op_array->vars);
1340 UNSERIALIZE_STR(op_array->function_name);
1341 UNSERIALIZE_STR(op_array->filename);
1342 UNSERIALIZE_PTR(op_array->live_range);
1343 UNSERIALIZE_PTR(op_array->scope);
1344 UNSERIALIZE_STR(op_array->doc_comment);
1345 UNSERIALIZE_ATTRIBUTES(op_array->attributes);
1346 UNSERIALIZE_PTR(op_array->try_catch_array);
1347 UNSERIALIZE_PTR(op_array->prototype);
1351 if (op_array->static_variables) {
1354 UNSERIALIZE_PTR(op_array->static_variables);
1355 ht = op_array->static_variables;
1360 if (op_array->literals) {
1363 UNSERIALIZE_PTR(op_array->literals);
1364 p = op_array->literals;
1365 end = p + op_array->last_literal;
1375 UNSERIALIZE_PTR(op_array->opcodes);
1376 opline = op_array->opcodes;
1377 end = opline + op_array->last;
1388 ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, opline->op1);
1391 ZEND_PASS_TWO_UPDATE_CONSTANT(op_array, opline, opline->op2);
1430 UNSERIALIZE_PTR(op_array->scope);
1432 if (op_array->arg_info) {
1434 UNSERIALIZE_PTR(op_array->arg_info);
1435 p = op_array->arg_info;
1436 end = p + op_array->num_args;
1437 if (op_array->fn_flags & ZEND_ACC_HAS_RETURN_TYPE) {
1440 if (op_array->fn_flags & ZEND_ACC_VARIADIC) {
1447 …zend_file_cache_unserialize_type(&p->type, (op_array->fn_flags & ZEND_ACC_CLOSURE) ? NULL : op_arr…
1452 if (op_array->vars) {
1455 UNSERIALIZE_PTR(op_array->vars);
1456 p = op_array->vars;
1457 end = p + op_array->last_var;
1466 if (op_array->num_dynamic_func_defs) {
1467 UNSERIALIZE_PTR(op_array->dynamic_func_defs);
1468 for (uint32_t i = 0; i < op_array->num_dynamic_func_defs; i++) {
1469 UNSERIALIZE_PTR(op_array->dynamic_func_defs[i]);
1470 zend_file_cache_unserialize_op_array(op_array->dynamic_func_defs[i], script, buf);
1474 UNSERIALIZE_STR(op_array->function_name);
1475 UNSERIALIZE_STR(op_array->filename);
1476 UNSERIALIZE_PTR(op_array->live_range);
1477 UNSERIALIZE_STR(op_array->doc_comment);
1478 UNSERIALIZE_ATTRIBUTES(op_array->attributes);
1479 UNSERIALIZE_PTR(op_array->try_catch_array);
1480 UNSERIALIZE_PTR(op_array->prototype);
1492 zend_file_cache_unserialize_op_array(&func->op_array, script, buf);