summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-02-01 21:25:15 +0100
committerOndřej Surý <ondrej@sury.org>2012-02-01 21:25:15 +0100
commit96fb2ff5760132a915766f1d9ec7c63001feacd8 (patch)
tree160904a89a8f3522fa4e47632db101b045e7814a /Zend
parent8f1428d29ef91d74b4d272af171675f2971eb15b (diff)
downloadphp-96fb2ff5760132a915766f1d9ec7c63001feacd8.tar.gz
Imported Upstream version 5.4.0~rc6upstream/5.4.0_rc6
Diffstat (limited to 'Zend')
-rw-r--r--Zend/Makefile.am2
-rw-r--r--Zend/README.ZEND_MM11
-rw-r--r--Zend/Zend.dsp12
-rw-r--r--Zend/Zend.m437
-rw-r--r--Zend/ZendTS.dsp12
-rw-r--r--Zend/acconfig.h127
-rw-r--r--Zend/bench.php1
-rw-r--r--Zend/build.mk4
-rw-r--r--Zend/configure.in101
-rw-r--r--Zend/micro_bench.php358
-rw-r--r--Zend/tests/026.phpt2
-rw-r--r--Zend/tests/033.phpt4
-rw-r--r--Zend/tests/argument_restriction_001.phpt16
-rw-r--r--Zend/tests/argument_restriction_002.phpt16
-rw-r--r--Zend/tests/argument_restriction_003.phpt19
-rw-r--r--Zend/tests/argument_restriction_004.phpt17
-rw-r--r--Zend/tests/argument_restriction_005.phpt11
-rw-r--r--Zend/tests/argument_restriction_006.phpt16
-rwxr-xr-xZend/tests/array_type_hint_001.phpt2
-rw-r--r--Zend/tests/binary-32bit.phpt154
-rw-r--r--Zend/tests/binary.phpt154
-rw-r--r--Zend/tests/bug31098.phpt16
-rwxr-xr-xZend/tests/bug35655.phpt1
-rw-r--r--Zend/tests/bug39018.phpt39
-rwxr-xr-xZend/tests/bug39304.phpt9
-rw-r--r--Zend/tests/bug39304_2_4.phpt18
-rw-r--r--Zend/tests/bug42767.phpt1
-rw-r--r--Zend/tests/bug47981.phpt2
-rw-r--r--Zend/tests/bug51421.phpt18
-rw-r--r--Zend/tests/bug52041.phpt49
-rw-r--r--Zend/tests/bug52237.phpt1
-rw-r--r--Zend/tests/bug52614.phpt83
-rw-r--r--Zend/tests/bug52940.phpt23
-rw-r--r--Zend/tests/bug53347.phpt17
-rw-r--r--Zend/tests/bug53511.phpt33
-rw-r--r--Zend/tests/bug53748.phpt39
-rw-r--r--Zend/tests/bug54262.phpt2
-rw-r--r--Zend/tests/bug55086.phpt36
-rw-r--r--Zend/tests/bug55135.phpt38
-rw-r--r--Zend/tests/bug55137.phpt26
-rw-r--r--Zend/tests/bug55247.phpt33
-rw-r--r--Zend/tests/bug55305.phpt16
-rw-r--r--Zend/tests/bug55339.phpt31
-rw-r--r--Zend/tests/bug55445.phpt8
-rw-r--r--Zend/tests/bug55578.phpt20
-rw-r--r--Zend/tests/bug55705.phpt9
-rw-r--r--Zend/tests/bug55825.phpt17
-rw-r--r--Zend/tests/bug60139.phpt2
-rwxr-xr-xZend/tests/bug60169.phpt11
-rw-r--r--Zend/tests/bug60350.phpt11
-rw-r--r--Zend/tests/bug60362.phpt74
-rw-r--r--Zend/tests/bug60444.phpt18
-rw-r--r--Zend/tests/bug60536_001.phpt25
-rw-r--r--Zend/tests/bug60536_002.phpt40
-rw-r--r--Zend/tests/bug60536_003.phpt46
-rw-r--r--Zend/tests/bug60536_004.phpt37
-rw-r--r--Zend/tests/bug60536_005.phpt38
-rw-r--r--Zend/tests/bug60611.phpt27
-rw-r--r--Zend/tests/bug60613.phpt18
-rw-r--r--Zend/tests/bug60771.phpt9
-rw-r--r--Zend/tests/callable_type_hint_001.phpt39
-rw-r--r--Zend/tests/callable_type_hint_002.phpt27
-rw-r--r--Zend/tests/callable_type_hint_003.phpt21
-rw-r--r--Zend/tests/cast_to_string.phptbin621 -> 721 bytes
-rw-r--r--Zend/tests/class_exists_003.phpt6
-rw-r--r--Zend/tests/closure_005.phpt74
-rw-r--r--Zend/tests/closure_007.phpt38
-rw-r--r--Zend/tests/closure_020.phpt6
-rw-r--r--Zend/tests/closure_024.phpt26
-rw-r--r--Zend/tests/closure_026.phpt11
-rwxr-xr-xZend/tests/closure_036.phpt33
-rwxr-xr-xZend/tests/closure_037.phpt47
-rw-r--r--Zend/tests/closure_038.phpt58
-rw-r--r--Zend/tests/closure_039.phpt58
-rw-r--r--Zend/tests/closure_040.phpt45
-rw-r--r--Zend/tests/closure_041.phpt106
-rw-r--r--Zend/tests/closure_042.phpt29
-rw-r--r--Zend/tests/closure_043.phpt86
-rw-r--r--Zend/tests/closure_044.phpt78
-rw-r--r--Zend/tests/closure_045.phpt19
-rw-r--r--Zend/tests/closure_046.phpt70
-rw-r--r--Zend/tests/concat_001.phpt20
-rwxr-xr-xZend/tests/constants_005.phpt3
-rw-r--r--Zend/tests/debug_backtrace_limit.phpt133
-rw-r--r--[-rwxr-xr-x]Zend/tests/debug_backtrace_options.phpt0
-rw-r--r--Zend/tests/debug_print_backtrace_limit.phpt31
-rw-r--r--Zend/tests/declare_001.phpt20
-rw-r--r--Zend/tests/declare_002.phpt31
-rw-r--r--Zend/tests/declare_003.phpt24
-rw-r--r--Zend/tests/declare_004.phpt27
-rw-r--r--Zend/tests/dereference_001.phpt51
-rw-r--r--Zend/tests/dereference_002.phpt79
-rw-r--r--Zend/tests/dereference_003.phpt46
-rw-r--r--Zend/tests/dereference_004.phpt27
-rw-r--r--Zend/tests/dereference_005.phpt38
-rw-r--r--Zend/tests/dereference_006.phpt30
-rw-r--r--Zend/tests/dereference_007.phpt37
-rw-r--r--Zend/tests/dereference_008.phpt33
-rw-r--r--Zend/tests/dereference_009.phpt26
-rw-r--r--Zend/tests/dereference_010.phpt27
-rw-r--r--Zend/tests/dereference_011.phpt45
-rw-r--r--Zend/tests/dereference_012.phpt56
-rw-r--r--Zend/tests/dereference_013.phpt38
-rw-r--r--Zend/tests/dereference_014.phpt34
-rw-r--r--Zend/tests/empty_str_offset.phpt89
-rw-r--r--Zend/tests/error_reporting01.phpt2
-rw-r--r--Zend/tests/error_reporting05.phpt2
-rw-r--r--Zend/tests/error_reporting06.phpt2
-rw-r--r--Zend/tests/error_reporting07.phpt2
-rw-r--r--Zend/tests/error_reporting10.phpt4
-rw-r--r--Zend/tests/fr47160.phpt150
-rw-r--r--Zend/tests/function_arguments_001.phpt2
-rw-r--r--Zend/tests/function_arguments_002.phpt2
-rw-r--r--Zend/tests/gc_022.phpt2
-rw-r--r--Zend/tests/indexing_001.phpt2
-rw-r--r--Zend/tests/indirect_call_array_001.phpt11
-rw-r--r--Zend/tests/indirect_call_array_002.phpt11
-rw-r--r--Zend/tests/indirect_call_array_003.phpt38
-rw-r--r--Zend/tests/indirect_call_array_004.phpt71
-rw-r--r--Zend/tests/indirect_method_call_001.phpt20
-rw-r--r--Zend/tests/indirect_method_call_002.phpt32
-rw-r--r--Zend/tests/indirect_method_call_003.phpt23
-rw-r--r--Zend/tests/indirect_method_call_004.phpt26
-rw-r--r--Zend/tests/indirect_method_call_005.phpt16
-rw-r--r--Zend/tests/indirect_property_access.phpt26
-rw-r--r--Zend/tests/indirect_reference_this.phpt2
-rw-r--r--Zend/tests/isset_003.phpt4
-rw-r--r--Zend/tests/isset_003_2_4.phpt42
-rw-r--r--Zend/tests/isset_str_offset.phpt89
-rw-r--r--Zend/tests/magic_by_ref_010.phpt30
-rw-r--r--Zend/tests/method_static_var.phpt30
-rwxr-xr-xZend/tests/multibyte/multibyte_encoding_001.phpt3
-rwxr-xr-xZend/tests/multibyte/multibyte_encoding_002.phpt3
-rwxr-xr-xZend/tests/multibyte/multibyte_encoding_003.phptbin469 -> 471 bytes
-rw-r--r--Zend/tests/multibyte/multibyte_encoding_004.phpt5
-rw-r--r--Zend/tests/multibyte/multibyte_encoding_005.phpt5
-rw-r--r--Zend/tests/multibyte/multibyte_encoding_006.phptbin599 -> 629 bytes
-rw-r--r--Zend/tests/nowdoc_013.phpt1
-rw-r--r--Zend/tests/nowdoc_014.phpt1
-rw-r--r--Zend/tests/ns_071.phpt2
-rw-r--r--Zend/tests/ns_086.phpt8
-rw-r--r--Zend/tests/objects_002.phpt2
-rw-r--r--Zend/tests/objects_003.phpt2
-rw-r--r--Zend/tests/objects_004.phpt2
-rw-r--r--Zend/tests/objects_005.phpt2
-rw-r--r--Zend/tests/objects_006.phpt2
-rw-r--r--Zend/tests/objects_007.phpt2
-rw-r--r--Zend/tests/objects_008.phpt2
-rw-r--r--Zend/tests/objects_009.phpt2
-rw-r--r--Zend/tests/offset_assign.phpt8
-rw-r--r--Zend/tests/offset_string.phpt24
-rw-r--r--Zend/tests/result_unused.phpt29
-rw-r--r--Zend/tests/str_offset_001.phpt51
-rw-r--r--Zend/tests/str_offset_002.phpt9
-rw-r--r--Zend/tests/trait_exists_001.phpt21
-rw-r--r--Zend/tests/trait_exists_002.phpt21
-rw-r--r--Zend/tests/trait_exists_003.phpt24
-rw-r--r--Zend/tests/traits/bug54441.phpt19
-rw-r--r--Zend/tests/traits/bug55137.phpt26
-rw-r--r--Zend/tests/traits/bug55214.phpt71
-rw-r--r--Zend/tests/traits/bug55355.phpt46
-rw-r--r--Zend/tests/traits/bug55372.phpt28
-rw-r--r--Zend/tests/traits/bug55424.phpt35
-rw-r--r--Zend/tests/traits/bug55524.phpt15
-rw-r--r--Zend/tests/traits/bug55554a.phpt34
-rw-r--r--Zend/tests/traits/bug55554b.phpt56
-rw-r--r--Zend/tests/traits/bug55554c.phpt46
-rw-r--r--Zend/tests/traits/bug55554d.phpt32
-rw-r--r--Zend/tests/traits/bug55554e.phpt30
-rw-r--r--Zend/tests/traits/bug55554f.phpt29
-rw-r--r--Zend/tests/traits/bug55554g.phpt29
-rw-r--r--Zend/tests/traits/bug60145.phpt17
-rw-r--r--Zend/tests/traits/bug60153.phpt19
-rw-r--r--Zend/tests/traits/bug60165a.phpt17
-rw-r--r--Zend/tests/traits/bug60165b.phpt17
-rw-r--r--Zend/tests/traits/bug60165c.phpt22
-rw-r--r--Zend/tests/traits/bug60165d.phpt21
-rw-r--r--Zend/tests/traits/bug60173.phpt12
-rw-r--r--Zend/tests/traits/bug60217a.phpt26
-rw-r--r--Zend/tests/traits/bug60217b.phpt26
-rw-r--r--Zend/tests/traits/bug60217c.phpt26
-rw-r--r--Zend/tests/traits/bug60369.phpt17
-rw-r--r--Zend/tests/traits/bugs/abstract-methods01.phpt19
-rw-r--r--Zend/tests/traits/bugs/abstract-methods02.phpt26
-rw-r--r--Zend/tests/traits/bugs/abstract-methods03.phpt22
-rw-r--r--Zend/tests/traits/bugs/abstract-methods04.phpt36
-rw-r--r--Zend/tests/traits/bugs/abstract-methods05.phpt25
-rw-r--r--Zend/tests/traits/bugs/abstract-methods06.phpt26
-rw-r--r--Zend/tests/traits/bugs/alias-semantics.phpt23
-rw-r--r--Zend/tests/traits/bugs/alias-semantics02.phpt25
-rw-r--r--Zend/tests/traits/bugs/alias01.phpt26
-rw-r--r--Zend/tests/traits/bugs/case-sensitive.phpt23
-rw-r--r--Zend/tests/traits/bugs/interfaces.phpt19
-rw-r--r--Zend/tests/traits/bugs/missing-trait.phpt15
-rw-r--r--Zend/tests/traits/bugs/overridding-conflicting-methods.phpt31
-rw-r--r--Zend/tests/traits/bugs/overridding-conflicting-property-initializer.phpt23
-rw-r--r--Zend/tests/traits/conflict001.phpt25
-rw-r--r--Zend/tests/traits/conflict002.phpt32
-rw-r--r--Zend/tests/traits/conflict003.phpt31
-rw-r--r--Zend/tests/traits/error_001.phpt28
-rw-r--r--Zend/tests/traits/error_002.phpt12
-rw-r--r--Zend/tests/traits/error_003.phpt15
-rw-r--r--Zend/tests/traits/error_004.phpt15
-rw-r--r--Zend/tests/traits/error_005.phpt15
-rw-r--r--Zend/tests/traits/error_006.phpt15
-rw-r--r--Zend/tests/traits/error_007.phpt13
-rw-r--r--Zend/tests/traits/error_008.phpt12
-rw-r--r--Zend/tests/traits/error_009.phpt12
-rw-r--r--Zend/tests/traits/error_010.phpt27
-rw-r--r--Zend/tests/traits/error_011.phpt26
-rw-r--r--Zend/tests/traits/error_012.phpt19
-rw-r--r--Zend/tests/traits/error_013.phpt19
-rw-r--r--Zend/tests/traits/error_014.phpt23
-rw-r--r--Zend/tests/traits/error_015.phpt26
-rw-r--r--Zend/tests/traits/error_016.phpt12
-rw-r--r--Zend/tests/traits/flattening001.phpt42
-rw-r--r--Zend/tests/traits/flattening002.phpt28
-rw-r--r--Zend/tests/traits/flattening003.phpt32
-rw-r--r--Zend/tests/traits/get_declared_traits_001.phpt19
-rw-r--r--Zend/tests/traits/get_declared_traits_002.phpt20
-rw-r--r--Zend/tests/traits/get_declared_traits_003.phpt25
-rw-r--r--Zend/tests/traits/inheritance001.phpt24
-rw-r--r--Zend/tests/traits/inheritance002.phpt27
-rw-r--r--Zend/tests/traits/inheritance003.phpt38
-rw-r--r--Zend/tests/traits/interface_001.phpt25
-rw-r--r--Zend/tests/traits/interface_002.phpt24
-rw-r--r--Zend/tests/traits/interface_003.phpt27
-rw-r--r--Zend/tests/traits/language001.phpt21
-rw-r--r--Zend/tests/traits/language002.phpt32
-rw-r--r--Zend/tests/traits/language003.phpt29
-rw-r--r--Zend/tests/traits/language004.phpt31
-rw-r--r--Zend/tests/traits/language005.phpt40
-rw-r--r--Zend/tests/traits/language006.phpt31
-rw-r--r--Zend/tests/traits/language007.phpt30
-rw-r--r--Zend/tests/traits/language008a.phpt23
-rw-r--r--Zend/tests/traits/language008b.phpt30
-rw-r--r--Zend/tests/traits/language009.phpt36
-rw-r--r--Zend/tests/traits/language010.phpt30
-rw-r--r--Zend/tests/traits/language011.phpt30
-rw-r--r--Zend/tests/traits/language012.phpt27
-rw-r--r--Zend/tests/traits/language013.phpt37
-rw-r--r--Zend/tests/traits/methods_001.phpt39
-rw-r--r--Zend/tests/traits/methods_002.phpt28
-rw-r--r--Zend/tests/traits/methods_003.phpt24
-rw-r--r--Zend/tests/traits/noctor001.phpt28
-rw-r--r--Zend/tests/traits/property001.phpt41
-rw-r--r--Zend/tests/traits/property002.phpt32
-rw-r--r--Zend/tests/traits/property003.phpt30
-rw-r--r--Zend/tests/traits/property004.phpt30
-rw-r--r--Zend/tests/traits/property005.phpt40
-rw-r--r--Zend/tests/traits/property006.phpt37
-rw-r--r--Zend/tests/traits/property007.phpt38
-rw-r--r--Zend/tests/traits/property008.phpt62
-rw-r--r--Zend/tests/traits/property009.phpt59
-rw-r--r--Zend/tests/traits/static_001.phpt22
-rw-r--r--Zend/tests/traits/static_002.phpt23
-rw-r--r--Zend/tests/traits/static_003.phpt27
-rw-r--r--Zend/tests/traits/static_004.phpt22
-rw-r--r--Zend/tests/traits/static_forward_static_call.phpt28
-rw-r--r--Zend/tests/traits/static_get_called_class.phpt24
-rw-r--r--Zend/tests/traits/trait_constant_001.phpt36
-rw-r--r--Zend/tests/traits/trait_constant_002.phpt27
-rw-r--r--Zend/tests/unset_cv05.phpt10
-rw-r--r--Zend/tests/unset_cv06.phpt17
-rw-r--r--Zend/tests/unset_cv07.phpt2
-rw-r--r--Zend/tests/unset_cv08.phpt2
-rw-r--r--Zend/zend.c178
-rw-r--r--Zend/zend.h177
-rw-r--r--Zend/zend_API.c595
-rw-r--r--Zend/zend_API.h180
-rw-r--r--Zend/zend_alloc.c206
-rw-r--r--Zend/zend_alloc.h34
-rw-r--r--Zend/zend_builtin_functions.c301
-rw-r--r--Zend/zend_builtin_functions.h2
-rw-r--r--Zend/zend_closures.c241
-rw-r--r--Zend/zend_closures.h3
-rw-r--r--Zend/zend_compile.c3603
-rw-r--r--Zend/zend_compile.h268
-rw-r--r--Zend/zend_constants.c145
-rw-r--r--Zend/zend_constants.h1
-rw-r--r--Zend/zend_dtrace.c108
-rw-r--r--Zend/zend_dtrace.d37
-rw-r--r--Zend/zend_dtrace.h48
-rw-r--r--Zend/zend_errors.h2
-rw-r--r--Zend/zend_exceptions.c28
-rw-r--r--Zend/zend_execute.c849
-rw-r--r--Zend/zend_execute.h103
-rw-r--r--Zend/zend_execute_API.c277
-rw-r--r--Zend/zend_extensions.h2
-rw-r--r--Zend/zend_fast_cache.h141
-rw-r--r--Zend/zend_float.c20
-rw-r--r--Zend/zend_gc.c185
-rw-r--r--Zend/zend_gc.h2
-rw-r--r--Zend/zend_globals.h47
-rw-r--r--Zend/zend_hash.c193
-rw-r--r--Zend/zend_hash.h15
-rw-r--r--Zend/zend_highlight.c23
-rw-r--r--Zend/zend_highlight.h1
-rw-r--r--Zend/zend_indent.c8
-rw-r--r--Zend/zend_ini.c10
-rw-r--r--Zend/zend_ini.h2
-rw-r--r--Zend/zend_ini_parser.c309
-rw-r--r--Zend/zend_ini_parser.h29
-rw-r--r--Zend/zend_ini_parser.output6
-rw-r--r--Zend/zend_ini_scanner.c2
-rw-r--r--Zend/zend_ini_scanner_defs.h2
-rwxr-xr-xZend/zend_interfaces.c2
-rwxr-xr-xZend/zend_interfaces.h2
-rwxr-xr-xZend/zend_iterators.c6
-rw-r--r--Zend/zend_language_parser.c4903
-rw-r--r--Zend/zend_language_parser.h199
-rw-r--r--Zend/zend_language_parser.output37326
-rw-r--r--Zend/zend_language_parser.y485
-rw-r--r--Zend/zend_language_scanner.c5317
-rw-r--r--Zend/zend_language_scanner.h7
-rw-r--r--Zend/zend_language_scanner.l602
-rw-r--r--Zend/zend_language_scanner_defs.h2
-rw-r--r--Zend/zend_list.c17
-rw-r--r--Zend/zend_list.h14
-rw-r--r--Zend/zend_modules.h4
-rw-r--r--Zend/zend_multibyte.c1194
-rw-r--r--Zend/zend_multibyte.h78
-rw-r--r--Zend/zend_multiply.h12
-rw-r--r--Zend/zend_object_handlers.c535
-rw-r--r--Zend/zend_object_handlers.h30
-rw-r--r--Zend/zend_objects.c66
-rw-r--r--Zend/zend_objects_API.c15
-rw-r--r--Zend/zend_objects_API.h2
-rw-r--r--Zend/zend_opcode.c274
-rw-r--r--Zend/zend_operators.c103
-rw-r--r--Zend/zend_operators.h437
-rw-r--r--Zend/zend_ptr_stack.c5
-rw-r--r--Zend/zend_ptr_stack.h17
-rw-r--r--Zend/zend_signal.c414
-rw-r--r--Zend/zend_signal.h108
-rw-r--r--Zend/zend_stack.c12
-rw-r--r--Zend/zend_stream.c5
-rw-r--r--Zend/zend_stream.h2
-rw-r--r--Zend/zend_string.c233
-rw-r--r--Zend/zend_string.h71
-rw-r--r--Zend/zend_strtod.c67
-rw-r--r--Zend/zend_strtod.h7
-rw-r--r--Zend/zend_types.h2
-rw-r--r--Zend/zend_variables.c62
-rw-r--r--Zend/zend_variables.h16
-rw-r--r--Zend/zend_vm_def.h3255
-rw-r--r--Zend/zend_vm_execute.h27563
-rw-r--r--Zend/zend_vm_execute.skl19
-rw-r--r--Zend/zend_vm_gen.php214
-rw-r--r--Zend/zend_vm_opcodes.h6
350 files changed, 60426 insertions, 39296 deletions
diff --git a/Zend/Makefile.am b/Zend/Makefile.am
index 219d2d3fc..5ec4590fe 100644
--- a/Zend/Makefile.am
+++ b/Zend/Makefile.am
@@ -17,7 +17,7 @@ libZend_la_SOURCES=\
zend_objects_API.c zend_ts_hash.c zend_stream.c \
zend_default_classes.c \
zend_iterators.c zend_interfaces.c zend_exceptions.c \
- zend_strtod.c zend_closures.c zend_float.c
+ zend_strtod.c zend_closures.c zend_float.c zend_string.c zend_signal.c
libZend_la_LDFLAGS =
libZend_la_LIBADD = @ZEND_EXTRA_LIBS@
diff --git a/Zend/README.ZEND_MM b/Zend/README.ZEND_MM
index cf9a9b7e8..60c22556b 100644
--- a/Zend/README.ZEND_MM
+++ b/Zend/README.ZEND_MM
@@ -9,7 +9,7 @@ allocation overhead and speedup memory management.
The new manager's "configure" has no "--disable-zend-memory-manager" option,
but it has "--enable-malloc-mm" instead. It is enabled by default in DEBUG
-build and disabled by default in RELEASE build. when enabled it allows selecting
+build and disabled by default in RELEASE build. When enabled it allows selecting
between malloc and emalloc at runtime so you can use internal and external memory
debuggers without recompilation.
@@ -24,6 +24,15 @@ Zend MM disabled:
$ USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php -r 'leak();'
+Shared extensions:
+------------------
+
+Since PHP 5.4 it is possible to prevent shared extensions from unloading so
+that valgrind can correctly track the memory leaks in shared extensions. For
+this there is the ZEND_DONT_UNLOAD_MODULES environment variable. If set, then
+DL_UNLOAD() is skipped during the shutdown of shared extensions.
+
+
Tweaking:
---------
diff --git a/Zend/Zend.dsp b/Zend/Zend.dsp
index 0a7ed7753..ebe01978c 100644
--- a/Zend/Zend.dsp
+++ b/Zend/Zend.dsp
@@ -243,6 +243,10 @@ SOURCE=.\zend_stream.c
# End Source File
# Begin Source File
+SOURCE=.\zend_string.c
+# End Source File
+# Begin Source File
+
SOURCE=.\zend_strtod.c
# End Source File
# Begin Source File
@@ -315,10 +319,6 @@ SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
-SOURCE=.\zend_fast_cache.h
-# End Source File
-# Begin Source File
-
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
@@ -411,6 +411,10 @@ SOURCE=.\zend_stream.h
# End Source File
# Begin Source File
+SOURCE=.\zend_string.h
+# End Source File
+# Begin Source File
+
SOURCE=.\zend_strtod.h
# End Source File
# Begin Source File
diff --git a/Zend/Zend.m4 b/Zend/Zend.m4
index 089dce9d8..367c0c21f 100644
--- a/Zend/Zend.m4
+++ b/Zend/Zend.m4
@@ -1,5 +1,5 @@
dnl
-dnl $Id: Zend.m4 286859 2009-08-06 01:33:54Z scottmac $
+dnl $Id: Zend.m4 312377 2011-06-22 14:23:21Z iliaa $
dnl
dnl This file contains Zend specific autoconf functions.
dnl
@@ -176,13 +176,6 @@ AC_ARG_ENABLE(inline-optimization,
ZEND_INLINE_OPTIMIZATION=yes
])
-AC_ARG_ENABLE(zend-multibyte,
-[ --enable-zend-multibyte Compile with zend multibyte support], [
- ZEND_MULTIBYTE=$enableval
-],[
- ZEND_MULTIBYTE=no
-])
-
AC_MSG_CHECKING([virtual machine dispatch method])
AC_MSG_RESULT($PHP_ZEND_VM)
@@ -195,9 +188,6 @@ AC_MSG_RESULT($ZEND_INLINE_OPTIMIZATION)
AC_MSG_CHECKING(whether to enable Zend debugging)
AC_MSG_RESULT($ZEND_DEBUG)
-AC_MSG_CHECKING(whether to enable Zend multibyte)
-AC_MSG_RESULT($ZEND_MULTIBYTE)
-
case $PHP_ZEND_VM in
SWITCH)
AC_DEFINE(ZEND_VM_KIND,ZEND_VM_KIND_SWITCH,[virtual machine dispatch method])
@@ -232,10 +222,6 @@ if test "$ZEND_MAINTAINER_ZTS" = "yes"; then
LIBZEND_CPLUSPLUS_CHECKS
fi
-if test "$ZEND_MULTIBYTE" = "yes"; then
- AC_DEFINE(ZEND_MULTIBYTE, 1, [ ])
-fi
-
changequote({,})
if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then
INLINE_CFLAGS=`echo $ac_n "$CFLAGS $ac_c" | sed s/-O[0-9s]*//`
@@ -406,8 +392,22 @@ int main()
AC_CHECK_FUNCS(mremap)
+
+AC_CHECK_FUNC(sigaction, [
+ ZEND_SIGNALS=yes
+ AC_DEFINE(ZEND_SIGNALS, 1, [Use zend signal handling])
+ AC_DEFINE(HAVE_SIGACTION, 1, [Whether sigaction() is available])
+], [
+ ZEND_SIGNALS=no
])
+if test "$ZEND_SIGNALS" = "yes"; then
+ CFLAGS="$CFLAGS -DZEND_SIGNALS"
+fi
+AC_MSG_CHECKING(whether to enable zend signal handling)
+AC_MSG_RESULT($ZEND_SIGNALS)
+
+])
AC_DEFUN([LIBZEND_CPLUSPLUS_CHECKS],[
@@ -419,4 +419,11 @@ if test -r "/dev/urandom" && test -c "/dev/urandom"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
+ AC_MSG_CHECKING(whether /dev/arandom exists)
+ if test -r "/dev/arandom" && test -c "/dev/arandom"; then
+ AC_DEFINE([HAVE_DEV_ARANDOM], 1, [Define if the target system has /dev/arandom device])
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
fi
diff --git a/Zend/ZendTS.dsp b/Zend/ZendTS.dsp
index 2295b89eb..3494cd4e1 100644
--- a/Zend/ZendTS.dsp
+++ b/Zend/ZendTS.dsp
@@ -273,6 +273,10 @@ SOURCE=.\zend_stream.c
# End Source File
# Begin Source File
+SOURCE=.\zend_string.c
+# End Source File
+# Begin Source File
+
SOURCE=.\zend_strtod.c
# End Source File
# Begin Source File
@@ -345,10 +349,6 @@ SOURCE=.\zend_extensions.h
# End Source File
# Begin Source File
-SOURCE=.\zend_fast_cache.h
-# End Source File
-# Begin Source File
-
SOURCE=.\zend_globals.h
# End Source File
# Begin Source File
@@ -445,6 +445,10 @@ SOURCE=.\zend_stream.h
# End Source File
# Begin Source File
+SOURCE=.\zend_string.h
+# End Source File
+# Begin Source File
+
SOURCE=.\zend_strtod.h
# End Source File
# Begin Source File
diff --git a/Zend/acconfig.h b/Zend/acconfig.h
deleted file mode 100644
index 40cabfc9f..000000000
--- a/Zend/acconfig.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | Zend Engine |
- +----------------------------------------------------------------------+
- | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
- +----------------------------------------------------------------------+
- | This source file is subject to version 2.00 of the Zend license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.zend.com/license/2_00.txt. |
- | If you did not receive a copy of the Zend license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@zend.com so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Andi Gutmans <andi@zend.com> |
- | Zeev Suraski <zeev@zend.com> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id: acconfig.h 321634 2012-01-01 13:15:04Z felipe $ */
-
-#if defined(__GNUC__) && __GNUC__ >= 4
-# define ZEND_API __attribute__ ((visibility("default")))
-# define ZEND_DLEXPORT __attribute__ ((visibility("default")))
-#else
-# define ZEND_API
-# define ZEND_DLEXPORT
-#endif
-
-#define ZEND_DLIMPORT
-
-@TOP@
-
-#undef uint
-#undef ulong
-
-/* Define if you want to enable memory limit support */
-#define MEMORY_LIMIT 0
-
-@BOTTOM@
-
-#ifndef ZEND_ACCONFIG_H_NO_C_PROTOS
-
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
-#ifdef HAVE_IEEEFP_H
-# include <ieeefp.h>
-#endif
-
-#ifdef HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-
-#if ZEND_BROKEN_SPRINTF
-int zend_sprintf(char *buffer, const char *format, ...);
-#else
-# define zend_sprintf sprintf
-#endif
-
-#include <math.h>
-
-/* To enable the is_nan, is_infinite and is_finite PHP functions */
-#ifdef NETWARE
- #define HAVE_ISNAN 1
- #define HAVE_ISINF 1
- #define HAVE_ISFINITE 1
-#endif
-
-#ifndef zend_isnan
-#ifdef HAVE_ISNAN
-#define zend_isnan(a) isnan(a)
-#elif defined(HAVE_FPCLASS)
-#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
-#else
-#define zend_isnan(a) 0
-#endif
-#endif
-
-#ifdef HAVE_ISINF
-#define zend_isinf(a) isinf(a)
-#elif defined(INFINITY)
-/* Might not work, but is required by ISO C99 */
-#define zend_isinf(a) (((a)==INFINITY)?1:0)
-#elif defined(HAVE_FPCLASS)
-#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
-#else
-#define zend_isinf(a) 0
-#endif
-
-#ifdef HAVE_FINITE
-#define zend_finite(a) finite(a)
-#elif defined(HAVE_ISFINITE) || defined(isfinite)
-#define zend_finite(a) isfinite(a)
-#elif defined(fpclassify)
-#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
-#else
-#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
-#endif
-
-#endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
-
-#ifdef NETWARE
-#ifdef USE_WINSOCK
-#/*This detection against winsock is of no use*/ undef HAVE_SOCKLEN_T
-#/*This detection against winsock is of no use*/ undef HAVE_SYS_SOCKET_H
-#endif
-#endif
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * indent-tabs-mode: t
- * End:
- */
diff --git a/Zend/bench.php b/Zend/bench.php
index 42b333fce..5f771803c 100644
--- a/Zend/bench.php
+++ b/Zend/bench.php
@@ -3,7 +3,6 @@ if (function_exists("date_default_timezone_set")) {
date_default_timezone_set("UTC");
}
-date_default_timezone_set('UTC');
function simple() {
$a = 0;
for ($i = 0; $i < 1000000; $i++)
diff --git a/Zend/build.mk b/Zend/build.mk
index 0931c3f44..0fec53f49 100644
--- a/Zend/build.mk
+++ b/Zend/build.mk
@@ -5,7 +5,7 @@
#
# Written by Sascha Schumann
#
-# $Id: build.mk 242949 2007-09-26 15:44:16Z cvs2svn $
+# $Id: build.mk 311067 2011-05-16 00:14:47Z rasmus $
LT_TARGETS = ltmain.sh ltconfig
@@ -33,7 +33,7 @@ $(makefile_in_files): $(makefile_am_files)
aclocal.m4: configure.in acinclude.m4
aclocal
-$(config_h_in): configure.in acconfig.h
+$(config_h_in): configure.in
# explicitly remove target since autoheader does not seem to work
# correctly otherwise (timestamps are not updated)
@rm -f $@
diff --git a/Zend/configure.in b/Zend/configure.in
index 239b21fab..5c76686ef 100644
--- a/Zend/configure.in
+++ b/Zend/configure.in
@@ -1,4 +1,4 @@
-dnl $Id: configure.in 255174 2008-03-16 21:06:55Z helly $
+dnl $Id: configure.in 311067 2011-05-16 00:14:47Z rasmus $
dnl Process this file with autoconf to produce a configure script.
AC_INIT(zend.c)
@@ -11,6 +11,105 @@ AM_PROG_CC_STDC
ZEND_VERSION=$VERSION
AC_ZEND_C_BIGENDIAN
+AH_TOP([
+#if defined(__GNUC__) && __GNUC__ >= 4
+# define ZEND_API __attribute__ ((visibility("default")))
+# define ZEND_DLEXPORT __attribute__ ((visibility("default")))
+#else
+# define ZEND_API
+# define ZEND_DLEXPORT
+#endif
+
+#define ZEND_DLIMPORT
+
+#undef uint
+#undef ulong
+
+/* Define if you want to enable memory limit support */
+#define MEMORY_LIMIT 0
+])
+
+AH_BOTTOM([
+#ifndef ZEND_ACCONFIG_H_NO_C_PROTOS
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
+#if ZEND_BROKEN_SPRINTF
+int zend_sprintf(char *buffer, const char *format, ...);
+#else
+# define zend_sprintf sprintf
+#endif
+
+#include <math.h>
+
+/* To enable the is_nan, is_infinite and is_finite PHP functions */
+#ifdef NETWARE
+ #define HAVE_ISNAN 1
+ #define HAVE_ISINF 1
+ #define HAVE_ISFINITE 1
+#endif
+
+#ifndef zend_isnan
+#ifdef HAVE_ISNAN
+#define zend_isnan(a) isnan(a)
+#elif defined(HAVE_FPCLASS)
+#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
+#else
+#define zend_isnan(a) 0
+#endif
+#endif
+
+#ifdef HAVE_ISINF
+#define zend_isinf(a) isinf(a)
+#elif defined(INFINITY)
+/* Might not work, but is required by ISO C99 */
+#define zend_isinf(a) (((a)==INFINITY)?1:0)
+#elif defined(HAVE_FPCLASS)
+#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
+#else
+#define zend_isinf(a) 0
+#endif
+
+#ifdef HAVE_FINITE
+#define zend_finite(a) finite(a)
+#elif defined(HAVE_ISFINITE) || defined(isfinite)
+#define zend_finite(a) isfinite(a)
+#elif defined(fpclassify)
+#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
+#else
+#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
+#endif
+
+#endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
+
+#ifdef NETWARE
+#ifdef USE_WINSOCK
+#/*This detection against winsock is of no use*/ undef HAVE_SOCKLEN_T
+#/*This detection against winsock is of no use*/ undef HAVE_SYS_SOCKET_H
+#endif
+#endif
+])
+
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
diff --git a/Zend/micro_bench.php b/Zend/micro_bench.php
new file mode 100644
index 000000000..70525882e
--- /dev/null
+++ b/Zend/micro_bench.php
@@ -0,0 +1,358 @@
+<?php
+
+function hallo() {
+}
+
+function simpleucall($n) {
+ for ($i = 0; $i < $n; $i++)
+ hallo();
+}
+
+function simpleudcall($n) {
+ for ($i = 0; $i < $n; $i++)
+ hallo2();
+}
+
+function hallo2() {
+}
+
+function simpleicall($n) {
+ for ($i = 0; $i < $n; $i++)
+ func_num_args();
+}
+
+class Foo {
+ static $a = 0;
+ public $b = 0;
+ const TEST = 0;
+
+ static function read_static($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = self::$a;
+ }
+ }
+
+ static function write_static($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ self::$a = 0;
+ }
+ }
+
+ static function isset_static($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = isset(self::$a);
+ }
+ }
+
+ static function empty_static($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = empty(self::$a);
+ }
+ }
+
+ static function f() {
+ }
+
+ static function call_static($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ self::f();
+ }
+ }
+
+ function read_prop($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = $this->b;
+ }
+ }
+
+ function write_prop($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $this->b = 0;
+ }
+ }
+
+ function assign_add_prop($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $this->b += 2;
+ }
+ }
+
+ function pre_inc_prop($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ ++$this->b;
+ }
+ }
+
+ function pre_dec_prop($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ --$this->b;
+ }
+ }
+
+ function post_inc_prop($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $this->b++;
+ }
+ }
+
+ function post_dec_prop($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $this->b--;
+ }
+ }
+
+ function isset_prop($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = isset($this->b);
+ }
+ }
+
+ function empty_prop($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = empty($this->b);
+ }
+ }
+
+ function g() {
+ }
+
+ function call($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $this->g();
+ }
+ }
+
+ function read_const($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = $this::TEST;
+ }
+ }
+
+}
+
+function read_static($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = Foo::$a;
+ }
+}
+
+function write_static($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ Foo::$a = 0;
+ }
+}
+
+function isset_static($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = isset(Foo::$a);
+ }
+}
+
+function empty_static($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = empty(Foo::$a);
+ }
+}
+
+function call_static($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ Foo::f();
+ }
+}
+
+function create_object($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = new Foo();
+ }
+}
+
+define('TEST', null);
+
+function read_const($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = TEST;
+ }
+}
+
+function read_auto_global($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = $_GET;
+ }
+}
+
+$g_var = 0;
+
+function read_global_var($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ $x = $GLOBALS['g_var'];
+ }
+}
+
+function read_hash($n) {
+ $hash = array('test' => 0);
+ for ($i = 0; $i < $n; ++$i) {
+ $x = $hash['test'];
+ }
+}
+
+function read_str_offset($n) {
+ $str = "test";
+ for ($i = 0; $i < $n; ++$i) {
+ $x = $str[1];
+ }
+}
+
+function issetor($n) {
+ $val = array(0,1,2,3,4,5,6,7,8,9);
+ for ($i = 0; $i < $n; ++$i) {
+ $x = $val ?: null;
+ }
+}
+
+function issetor2($n) {
+ $f = false; $j = 0;
+ for ($i = 0; $i < $n; ++$i) {
+ $x = $f ?: $j + 1;
+ }
+}
+
+function ternary($n) {
+ $val = array(0,1,2,3,4,5,6,7,8,9);
+ $f = false;
+ for ($i = 0; $i < $n; ++$i) {
+ $x = $f ? null : $val;
+ }
+}
+
+function ternary2($n) {
+ $f = false; $j = 0;
+ for ($i = 0; $i < $n; ++$i) {
+ $x = $f ? $f : $j + 1;
+ }
+}
+
+/*****/
+
+function empty_loop($n) {
+ for ($i = 0; $i < $n; ++$i) {
+ }
+}
+
+function getmicrotime()
+{
+ $t = gettimeofday();
+ return ($t['sec'] + $t['usec'] / 1000000);
+}
+
+function start_test()
+{
+ ob_start();
+ return getmicrotime();
+}
+
+function end_test($start, $name, $overhead = null)
+{
+ global $total;
+ global $last_time;
+ $end = getmicrotime();
+ ob_end_clean();
+ $last_time = $end-$start;
+ $total += $last_time;
+ $num = number_format($last_time,3);
+ $pad = str_repeat(" ", 24-strlen($name)-strlen($num));
+ if (is_null($overhead)) {
+ echo $name.$pad.$num."\n";
+ } else {
+ $num2 = number_format($last_time - $overhead,3);
+ echo $name.$pad.$num." ".$num2."\n";
+ }
+ ob_start();
+ return getmicrotime();
+}
+
+function total()
+{
+ global $total;
+ $pad = str_repeat("-", 24);
+ echo $pad."\n";
+ $num = number_format($total,3);
+ $pad = str_repeat(" ", 24-strlen("Total")-strlen($num));
+ echo "Total".$pad.$num."\n";
+}
+
+const N = 5000000;
+
+$t0 = $t = start_test();
+empty_loop(N);
+$t = end_test($t, 'empty_loop');
+$overhead = $last_time;
+simpleucall(N);
+$t = end_test($t, 'func()', $overhead);
+simpleudcall(N);
+$t = end_test($t, 'undef_func()', $overhead);
+simpleicall(N);
+$t = end_test($t, 'int_func()', $overhead);
+Foo::read_static(N);
+$t = end_test($t, '$x = self::$x', $overhead);
+Foo::write_static(N);
+$t = end_test($t, 'self::$x = 0', $overhead);
+Foo::isset_static(N);
+$t = end_test($t, 'isset(self::$x)', $overhead);
+Foo::empty_static(N);
+$t = end_test($t, 'empty(self::$x)', $overhead);
+read_static(N);
+$t = end_test($t, '$x = Foo::$x', $overhead);
+write_static(N);
+$t = end_test($t, 'Foo::$x = 0', $overhead);
+isset_static(N);
+$t = end_test($t, 'isset(Foo::$x)', $overhead);
+empty_static(N);
+$t = end_test($t, 'empty(Foo::$x)', $overhead);
+Foo::call_static(N);
+$t = end_test($t, 'self::f()', $overhead);
+call_static(N);
+$t = end_test($t, 'Foo::f()', $overhead);
+$x = new Foo();
+$x->read_prop(N);
+$t = end_test($t, '$x = $this->x', $overhead);
+$x->write_prop(N);
+$t = end_test($t, '$this->x = 0', $overhead);
+$x->assign_add_prop(N);
+$t = end_test($t, '$this->x += 2', $overhead);
+$x->pre_inc_prop(N);
+$t = end_test($t, '++$this->x', $overhead);
+$x->pre_dec_prop(N);
+$t = end_test($t, '--$this->x', $overhead);
+$x->post_inc_prop(N);
+$t = end_test($t, '$this->x++', $overhead);
+$x->post_dec_prop(N);
+$t = end_test($t, '$this->x--', $overhead);
+$x->isset_prop(N);
+$t = end_test($t, 'isset($this->x)', $overhead);
+$x->empty_prop(N);
+$t = end_test($t, 'empty($this->x)', $overhead);
+$x->call(N);
+$t = end_test($t, '$this->f()', $overhead);
+$x->read_const(N);
+$t = end_test($t, '$x = Foo::TEST', $overhead);
+create_object(N);
+$t = end_test($t, 'new Foo()', $overhead);
+read_const(N);
+$t = end_test($t, '$x = TEST', $overhead);
+read_auto_global(N);
+$t = end_test($t, '$x = $_GET', $overhead);
+read_global_var(N);
+$t = end_test($t, '$x = $GLOBALS[\'v\']', $overhead);
+read_hash(N);
+$t = end_test($t, '$x = $hash[\'v\']', $overhead);
+read_str_offset(N);
+$t = end_test($t, '$x = $str[0]', $overhead);
+issetor(N);
+$t = end_test($t, '$x = $a ?: null', $overhead);
+issetor2(N);
+$t = end_test($t, '$x = $f ?: tmp', $overhead);
+ternary(N);
+$t = end_test($t, '$x = $f ? $f : $a', $overhead);
+ternary2(N);
+$t = end_test($t, '$x = $f ? $f : tmp', $overhead);
+total($t0, "Total");
diff --git a/Zend/tests/026.phpt b/Zend/tests/026.phpt
index 784b12c69..5fa0e1677 100644
--- a/Zend/tests/026.phpt
+++ b/Zend/tests/026.phpt
@@ -21,5 +21,5 @@ print "ok\n";
Notice: Trying to get property of non-object in %s on line %d
ok
-Strict Standards: Creating default object from empty value in %s on line %d
+Warning: Creating default object from empty value in %s on line %d
ok
diff --git a/Zend/tests/033.phpt b/Zend/tests/033.phpt
index c8651159a..17319e0d6 100644
--- a/Zend/tests/033.phpt
+++ b/Zend/tests/033.phpt
@@ -26,6 +26,6 @@ Notice: Undefined variable: arr in %s on line %d
Notice: Trying to get property of non-object in %s on line %d
-Strict Standards: Creating default object from empty value in %s on line %d
+Warning: Creating default object from empty value in %s on line %d
-Strict Standards: Creating default object from empty value in %s on line %d
+Warning: Creating default object from empty value in %s on line %d
diff --git a/Zend/tests/argument_restriction_001.phpt b/Zend/tests/argument_restriction_001.phpt
new file mode 100644
index 000000000..e62ad300c
--- /dev/null
+++ b/Zend/tests/argument_restriction_001.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #55719 (Argument restriction should come with a more specific error message)
+--FILE--
+<?php
+Class Base {
+ public function &test($foo, array $bar, $option = NULL, $extra = "lllllllllllllllllllllllllllllllllllllllllllllllllll") {
+ }
+}
+
+class Sub extends Base {
+ public function &test() {
+ }
+}
+?>
+--EXPECTF--
+Strict Standards: Declaration of Sub::test() should be compatible with & Base::test($foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_001.php on line %d
diff --git a/Zend/tests/argument_restriction_002.phpt b/Zend/tests/argument_restriction_002.phpt
new file mode 100644
index 000000000..c6a472e0f
--- /dev/null
+++ b/Zend/tests/argument_restriction_002.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #55719 (Argument restriction should come with a more specific error message)
+--FILE--
+<?php
+Abstract Class Base {
+ public function test($foo, array &$bar, $option = NULL, $extra = 3.141592653589793238462643383279502884197169399375105 ) {
+ }
+}
+
+class Sub extends Base {
+ public function test($foo, array &$bar) {
+ }
+}
+?>
+--EXPECTF--
+Strict Standards: Declaration of Sub::test() should be compatible with Base::test($foo, array &$bar, $option = NULL, $extra = 3.1415926535898) in %sargument_restriction_002.php on line %d
diff --git a/Zend/tests/argument_restriction_003.phpt b/Zend/tests/argument_restriction_003.phpt
new file mode 100644
index 000000000..393581fcf
--- /dev/null
+++ b/Zend/tests/argument_restriction_003.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #55719 (Argument restriction should come with a more specific error message)
+--FILE--
+<?php
+class Foo {
+}
+
+Abstract Class Base {
+ public function test(Foo $foo, array $bar, $option = NULL, $extra = "lllllllllllllllllllllllllllllllllllllllllllllllllll") {
+ }
+}
+
+class Sub extends Base {
+ public function test() {
+ }
+}
+?>
+--EXPECTF--
+Strict Standards: Declaration of Sub::test() should be compatible with Base::test(Foo $foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_003.php on line %d
diff --git a/Zend/tests/argument_restriction_004.phpt b/Zend/tests/argument_restriction_004.phpt
new file mode 100644
index 000000000..599b3e160
--- /dev/null
+++ b/Zend/tests/argument_restriction_004.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #55719 (Argument restriction should come with a more specific error message)
+--FILE--
+<?php
+class Foo {
+}
+
+Abstract Class Base {
+ abstract public function test(Foo $foo, array $bar, $option = NULL, $extra = 16777215) ;
+}
+
+class Sub extends Base {
+ public function test(Foo $foo, array $bar, $option = NULL, $extra = 0xffffff ) {
+ }
+}
+?>
+--EXPECTF--
diff --git a/Zend/tests/argument_restriction_005.phpt b/Zend/tests/argument_restriction_005.phpt
new file mode 100644
index 000000000..2826fe6a8
--- /dev/null
+++ b/Zend/tests/argument_restriction_005.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #55719 (Argument restriction should come with a more specific error message)
+--FILE--
+<?php
+class Sub implements ArrayAccess {
+ public function offsetSet() {
+ }
+}
+?>
+--EXPECTF--
+Fatal error: Declaration of Sub::offsetSet() must be compatible with ArrayAccess::offsetSet($offset, $value) in %sargument_restriction_005.php on line %d
diff --git a/Zend/tests/argument_restriction_006.phpt b/Zend/tests/argument_restriction_006.phpt
new file mode 100644
index 000000000..948fc304c
--- /dev/null
+++ b/Zend/tests/argument_restriction_006.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #60174 (Notice when array in method prototype error)
+--FILE--
+<?php
+Abstract Class Base {
+ public function test($foo, $extra = array("test")) {
+ }
+}
+
+class Sub extends Base {
+ public function test($foo, $extra) {
+ }
+}
+?>
+--EXPECTF--
+Strict Standards: Declaration of Sub::test() should be compatible with Base::test($foo, $extra = Array) in %sargument_restriction_006.php on line %d
diff --git a/Zend/tests/array_type_hint_001.phpt b/Zend/tests/array_type_hint_001.phpt
index 533319b6e..a67699277 100755
--- a/Zend/tests/array_type_hint_001.phpt
+++ b/Zend/tests/array_type_hint_001.phpt
@@ -12,4 +12,4 @@ foo(123);
--EXPECTF--
3
-Catchable fatal error: Argument 1 passed to foo() must be an array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php on line 2
+Catchable fatal error: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php on line 2
diff --git a/Zend/tests/binary-32bit.phpt b/Zend/tests/binary-32bit.phpt
new file mode 100644
index 000000000..4b87aded4
--- /dev/null
+++ b/Zend/tests/binary-32bit.phpt
@@ -0,0 +1,154 @@
+--TEST--
+testing binary literals
+--INI--
+precision=14
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
+--FILE--
+<?php
+var_dump(0b1);
+var_dump(0b11);
+var_dump(0b111);
+var_dump(0b1111);
+var_dump(0b11111);
+var_dump(0b111111);
+var_dump(0b1111111);
+var_dump(0b11111111);
+var_dump(0b111111111);
+var_dump(0b1111111111);
+var_dump(0b11111111111);
+var_dump(0b111111111111);
+var_dump(0b1111111111111);
+var_dump(0b11111111111111);
+var_dump(0b111111111111111);
+var_dump(0b1111111111111111);
+var_dump(0b11111111111111111);
+var_dump(0b111111111111111111);
+var_dump(0b1111111111111111111);
+var_dump(0b11111111111111111111);
+var_dump(0b111111111111111111111);
+var_dump(0b1111111111111111111111);
+var_dump(0b11111111111111111111111);
+var_dump(0b111111111111111111111111);
+var_dump(0b1111111111111111111111111);
+var_dump(0b11111111111111111111111111);
+var_dump(0b111111111111111111111111111);
+var_dump(0b1111111111111111111111111111);
+var_dump(0b11111111111111111111111111111);
+var_dump(0b111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111111111111111111);
+
+var_dump(-0b1111111111111111111111111111111111111111111111111111111111111111);
+var_dump(-0b111111111111111111111111111111111111111111111111111111111111111);
+var_dump(-0b11111111111111111111111111111111111111111111111111111111111111);
+var_dump(-0b111111111111111111111111111111111);
+var_dump(-0b11111111111111111111111111111111);
+var_dump(-0b1111111111111111111111111111111);
+var_dump(-0b111111111111111111111111111111);
+var_dump(-0b1);
+--EXPECT--
+int(1)
+int(3)
+int(7)
+int(15)
+int(31)
+int(63)
+int(127)
+int(255)
+int(511)
+int(1023)
+int(2047)
+int(4095)
+int(8191)
+int(16383)
+int(32767)
+int(65535)
+int(131071)
+int(262143)
+int(524287)
+int(1048575)
+int(2097151)
+int(4194303)
+int(8388607)
+int(16777215)
+int(33554431)
+int(67108863)
+int(134217727)
+int(268435455)
+int(536870911)
+int(1073741823)
+int(2147483647)
+float(4294967295)
+float(8589934591)
+float(17179869183)
+float(34359738367)
+float(68719476735)
+float(137438953471)
+float(274877906943)
+float(549755813887)
+float(1099511627775)
+float(2199023255551)
+float(4398046511103)
+float(8796093022207)
+float(17592186044415)
+float(35184372088831)
+float(70368744177663)
+float(1.4073748835533E+14)
+float(2.8147497671066E+14)
+float(5.6294995342131E+14)
+float(1.1258999068426E+15)
+float(2.2517998136852E+15)
+float(4.5035996273705E+15)
+float(9.007199254741E+15)
+float(1.8014398509482E+16)
+float(3.6028797018964E+16)
+float(7.2057594037928E+16)
+float(1.4411518807586E+17)
+float(2.8823037615171E+17)
+float(5.7646075230342E+17)
+float(1.1529215046068E+18)
+float(2.3058430092137E+18)
+float(4.6116860184274E+18)
+float(9.2233720368548E+18)
+float(1.844674407371E+19)
+float(-1.844674407371E+19)
+float(-9.2233720368548E+18)
+float(-4.6116860184274E+18)
+float(-8589934591)
+float(-4294967295)
+int(-2147483647)
+int(-1073741823)
+int(-1)
diff --git a/Zend/tests/binary.phpt b/Zend/tests/binary.phpt
new file mode 100644
index 000000000..039cf80ce
--- /dev/null
+++ b/Zend/tests/binary.phpt
@@ -0,0 +1,154 @@
+--TEST--
+testing binary literals
+--INI--
+precision=32
+--SKIPIF--
+<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
+--FILE--
+<?php
+var_dump(0b1);
+var_dump(0b11);
+var_dump(0b111);
+var_dump(0b1111);
+var_dump(0b11111);
+var_dump(0b111111);
+var_dump(0b1111111);
+var_dump(0b11111111);
+var_dump(0b111111111);
+var_dump(0b1111111111);
+var_dump(0b11111111111);
+var_dump(0b111111111111);
+var_dump(0b1111111111111);
+var_dump(0b11111111111111);
+var_dump(0b111111111111111);
+var_dump(0b1111111111111111);
+var_dump(0b11111111111111111);
+var_dump(0b111111111111111111);
+var_dump(0b1111111111111111111);
+var_dump(0b11111111111111111111);
+var_dump(0b111111111111111111111);
+var_dump(0b1111111111111111111111);
+var_dump(0b11111111111111111111111);
+var_dump(0b111111111111111111111111);
+var_dump(0b1111111111111111111111111);
+var_dump(0b11111111111111111111111111);
+var_dump(0b111111111111111111111111111);
+var_dump(0b1111111111111111111111111111);
+var_dump(0b11111111111111111111111111111);
+var_dump(0b111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111111111111111111);
+var_dump(0b111111111111111111111111111111111111111111111111111111111111111 + 1);
+var_dump(0b1111111111111111111111111111111111111111111111111111111111111111);
+var_dump(0b1111111111111111111111111111111111111111111111111111111111111111 + 1);
+var_dump(0b11111111111111111111111111111111111111111111111111111111111111111);
+var_dump(0b11111111111111111111111111111111111111111111111111111111111111111 + 1);
+
+var_dump(-0b1111111111111111111111111111111111111111111111111111111111111111);
+var_dump(-0b111111111111111111111111111111111111111111111111111111111111111);
+var_dump(-0b11111111111111111111111111111111111111111111111111111111111111);
+var_dump(-0b1);
+--EXPECT--
+int(1)
+int(3)
+int(7)
+int(15)
+int(31)
+int(63)
+int(127)
+int(255)
+int(511)
+int(1023)
+int(2047)
+int(4095)
+int(8191)
+int(16383)
+int(32767)
+int(65535)
+int(131071)
+int(262143)
+int(524287)
+int(1048575)
+int(2097151)
+int(4194303)
+int(8388607)
+int(16777215)
+int(33554431)
+int(67108863)
+int(134217727)
+int(268435455)
+int(536870911)
+int(1073741823)
+int(2147483647)
+int(4294967295)
+int(8589934591)
+int(17179869183)
+int(34359738367)
+int(68719476735)
+int(137438953471)
+int(274877906943)
+int(549755813887)
+int(1099511627775)
+int(2199023255551)
+int(4398046511103)
+int(8796093022207)
+int(17592186044415)
+int(35184372088831)
+int(70368744177663)
+int(140737488355327)
+int(281474976710655)
+int(562949953421311)
+int(1125899906842623)
+int(2251799813685247)
+int(4503599627370495)
+int(9007199254740991)
+int(18014398509481983)
+int(36028797018963967)
+int(72057594037927935)
+int(144115188075855871)
+int(288230376151711743)
+int(576460752303423487)
+int(1152921504606846975)
+int(2305843009213693951)
+int(4611686018427387903)
+int(9223372036854775807)
+float(9223372036854775808)
+float(18446744073709549568)
+float(18446744073709549568)
+float(36893488147419099136)
+float(36893488147419099136)
+float(-18446744073709549568)
+int(-9223372036854775807)
+int(-4611686018427387903)
+int(-1)
diff --git a/Zend/tests/bug31098.phpt b/Zend/tests/bug31098.phpt
index c8626abef..23cec9bbf 100644
--- a/Zend/tests/bug31098.phpt
+++ b/Zend/tests/bug31098.phpt
@@ -17,13 +17,12 @@ var_dump(isset($a['b']));
$simpleString = "Bogus String Text";
echo isset($simpleString->wrong)?"bug\n":"ok\n";
-echo isset($simpleString["wrong"])?"ok\n":"bug\n";
+echo isset($simpleString["wrong"])?"bug\n":"ok\n";
echo isset($simpleString[-1])?"bug\n":"ok\n";
echo isset($simpleString[0])?"ok\n":"bug\n";
echo isset($simpleString["0"])?"ok\n":"bug\n";
echo isset($simpleString["16"])?"ok\n":"bug\n";
echo isset($simpleString["17"])?"bug\n":"ok\n";
-echo isset($simpleString["wrong"][0])?"bug\n":"ok\n";
echo $simpleString->wrong === null?"ok\n":"bug\n";
echo $simpleString["wrong"] === "B"?"ok\n":"bug\n";
echo $simpleString["0"] === "B"?"ok\n":"bug\n";
@@ -35,9 +34,8 @@ bool(false)
bool(false)
bool(false)
bool(false)
-bool(true)
-bool(true)
-ok
+bool(false)
+bool(false)
ok
ok
ok
@@ -46,8 +44,12 @@ ok
ok
ok
-Notice: Trying to get property of non-object in %sbug31098.php on line %d
-ok
+Notice: Trying to get property of non-object in %s on line %d
ok
+
+Warning: Illegal string offset 'wrong' in %s on line %d
ok
ok
+
+Warning: Illegal string offset 'wrong' in %s on line %d
+ok \ No newline at end of file
diff --git a/Zend/tests/bug35655.phpt b/Zend/tests/bug35655.phpt
index 10d9c0c74..bbb137799 100755
--- a/Zend/tests/bug35655.phpt
+++ b/Zend/tests/bug35655.phpt
@@ -4,7 +4,6 @@ Bug #35655 (whitespace following end of heredoc is lost)
highlight.string = #DD0000
highlight.comment = #FF8000
highlight.keyword = #007700
-highlight.bg = #FFFFFF
highlight.default = #0000BB
highlight.html = #000000
--FILE--
diff --git a/Zend/tests/bug39018.phpt b/Zend/tests/bug39018.phpt
index 6de9092c9..e1968ad04 100644
--- a/Zend/tests/bug39018.phpt
+++ b/Zend/tests/bug39018.phpt
@@ -6,7 +6,7 @@ Bug #39018 (Error control operator '@' fails to suppress "Uninitialized string o
error_reporting(E_ALL);
$a = 'foo';
-$a[11111111111];
+$a[111111111111111111111];
$a = '';
@@ -62,21 +62,42 @@ print "\nDone\n";
?>
--EXPECTF--
+Notice: String offset cast occured in %s on line %d
-Notice: Uninitialized string offset: 0 in %s on line 12
+Notice: Uninitialized string offset: 0 in %s on line %d
-Notice: Uninitialized string offset: %i in %s on line 16
+Notice: Uninitialized string offset: 0 in %s on line %d
-Notice: Uninitialized string offset: 4 in %s on line 28
+Notice: String offset cast occured in %s on line %d
-Notice: Uninitialized string offset: 4 in %s on line 34
+Notice: Uninitialized string offset: %i in %s on line %d
-Notice: Uninitialized string offset: 4 in %s on line 38
+Notice: String offset cast occured in %s on line %d
-Notice: Uninitialized string offset: 4 in %s on line 42
+Notice: Uninitialized string offset: %i in %s on line %d
-Notice: Uninitialized string offset: 4 in %s on line 46
+Notice: Uninitialized string offset: 0 in %s on line %d
-Notice: Uninitialized string offset: 12 in %s on line 52
+Notice: Uninitialized string offset: 4 in %s on line %d
+
+Notice: Uninitialized string offset: 4 in %s on line %d
+
+Notice: Uninitialized string offset: 4 in %s on line %d
+
+Notice: Uninitialized string offset: 4 in %s on line %d
+
+Notice: Uninitialized string offset: 4 in %s on line %d
+
+Notice: String offset cast occured in %s on line %d
+
+Notice: Uninitialized string offset: 12 in %s on line %d
+
+Notice: String offset cast occured in %s on line %d
+
+Notice: Uninitialized string offset: 12 in %s on line %d
+
+Notice: String offset cast occured in %s on line %d
+
+Notice: String offset cast occured in %s on line %d
b
Done
diff --git a/Zend/tests/bug39304.phpt b/Zend/tests/bug39304.phpt
index 0129d2134..8303b8257 100755
--- a/Zend/tests/bug39304.phpt
+++ b/Zend/tests/bug39304.phpt
@@ -4,8 +4,13 @@ Bug #39304 (Segmentation fault with list unpacking of string offset)
<?php
$s = "";
list($a, $b) = $s[0];
+echo "I am alive";
?>
--EXPECTF--
-Notice: Uninitialized string offset: 0 in %sbug39304.php on line 3
+Notice: Uninitialized string offset: 0 in %sbug39304.php on line %d
+
+Notice: Uninitialized string offset: 1 in %sbug39304.php on line %d
+
+Notice: Uninitialized string offset: 0 in %sbug39304.php on line %d
+I am alive
-Fatal error: Cannot use string offset as an array in %sbug39304.php on line 3
diff --git a/Zend/tests/bug39304_2_4.phpt b/Zend/tests/bug39304_2_4.phpt
new file mode 100644
index 000000000..b0e6ddc72
--- /dev/null
+++ b/Zend/tests/bug39304_2_4.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #39304 (Segmentation fault with list unpacking of string offset)
+--SKIPIF--
+<?php if (version_compare(zend_version(), '2.4.0', '<')) die('skip ZendEngine 2.4 needed'); ?>
+--FILE--
+<?php
+ $s = "";
+ list($a, $b) = $s[0];
+ var_dump($a,$b);
+?>
+--EXPECTF--
+Notice: Uninitialized string offset: 0 in %sbug39304_2_4.php on line %d
+
+Notice: Uninitialized string offset: 1 in %sbug39304_2_4.php on line %d
+
+Notice: Uninitialized string offset: 0 in %sbug39304_2_4.php on line %d
+string(0) ""
+string(0) ""
diff --git a/Zend/tests/bug42767.phpt b/Zend/tests/bug42767.phpt
index 484918cdb..b57177e4b 100644
--- a/Zend/tests/bug42767.phpt
+++ b/Zend/tests/bug42767.phpt
@@ -4,7 +4,6 @@ Bug #42767 (highlight_string() truncates trailing comments)
highlight.string = #DD0000
highlight.comment = #FF8000
highlight.keyword = #007700
-highlight.bg = #FFFFFF
highlight.default = #0000BB
highlight.html = #000000
--FILE--
diff --git a/Zend/tests/bug47981.phpt b/Zend/tests/bug47981.phpt
index 2d68d3706..c16ae0ffc 100644
--- a/Zend/tests/bug47981.phpt
+++ b/Zend/tests/bug47981.phpt
@@ -14,6 +14,6 @@ class b implements a { function f($a=1) {}}
class c extends b {function f() {}}
?>
--EXPECTF--
-string(62) "Declaration of c::f() should be compatible with that of b::f()"
+string(60) "Declaration of c::f() should be compatible with b::f($a = 1)"
diff --git a/Zend/tests/bug51421.phpt b/Zend/tests/bug51421.phpt
new file mode 100644
index 000000000..bc1758c30
--- /dev/null
+++ b/Zend/tests/bug51421.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #51421 (Abstract __construct constructor argument list not enforced)
+--FILE--
+<?php
+
+class ExampleClass {}
+
+abstract class TestInterface {
+ abstract public function __construct(ExampleClass $var);
+}
+
+class Test extends TestInterface {
+ public function __construct() {}
+}
+
+?>
+--EXPECTF--
+Fatal error: Declaration of Test::__construct() must be compatible with TestInterface::__construct(ExampleClass $var) in %s on line %d
diff --git a/Zend/tests/bug52041.phpt b/Zend/tests/bug52041.phpt
index b481b894d..c4b9f97ee 100644
--- a/Zend/tests/bug52041.phpt
+++ b/Zend/tests/bug52041.phpt
@@ -13,38 +13,63 @@ foo()->a->b++;
foo()->a += 2;
foo()->a->b += 2;
-//foo()[0] = 1;
-//foo()[0][0] = 2;
-//foo()[0]++;
-//foo()[0][0]++;
-//foo()[0] += 2;
-//foo()[0][0] += 2;
+foo()[0] = 1;
+foo()[0][0] = 2;
+foo()[0]++;
+foo()[0][0]++;
+foo()[0] += 2;
+foo()[0][0] += 2;
+
var_dump(foo());
?>
--EXPECTF--
Notice: Undefined variable: x in %sbug52041.php on line 3
-Strict Standards: Creating default object from empty value in %sbug52041.php on line 6
+Warning: Creating default object from empty value in %sbug52041.php on line 6
+
+Notice: Undefined variable: x in %sbug52041.php on line 3
+
+Warning: Creating default object from empty value in %sbug52041.php on line 7
+
+Notice: Undefined variable: x in %sbug52041.php on line 3
+
+Warning: Creating default object from empty value in %sbug52041.php on line 8
Notice: Undefined variable: x in %sbug52041.php on line 3
-Strict Standards: Creating default object from empty value in %sbug52041.php on line 7
+Warning: Creating default object from empty value in %sbug52041.php on line 9
Notice: Undefined variable: x in %sbug52041.php on line 3
-Strict Standards: Creating default object from empty value in %sbug52041.php on line 8
+Warning: Creating default object from empty value in %sbug52041.php on line 10
Notice: Undefined variable: x in %sbug52041.php on line 3
-Strict Standards: Creating default object from empty value in %sbug52041.php on line 9
+Warning: Creating default object from empty value in %sbug52041.php on line 11
Notice: Undefined variable: x in %sbug52041.php on line 3
-Strict Standards: Creating default object from empty value in %sbug52041.php on line 10
+Notice: Undefined variable: x in %sbug52041.php on line 3
Notice: Undefined variable: x in %sbug52041.php on line 3
-Strict Standards: Creating default object from empty value in %sbug52041.php on line 11
+Notice: Undefined offset: 0 in %sbug52041.php on line 15
+
+Notice: Undefined variable: x in %sbug52041.php on line 3
+
+Notice: Undefined offset: 0 in %sbug52041.php on line 16
+
+Notice: Undefined offset: 0 in %sbug52041.php on line 16
+
+Notice: Undefined variable: x in %sbug52041.php on line 3
+
+Notice: Undefined offset: 0 in %sbug52041.php on line 17
+
+Notice: Undefined variable: x in %sbug52041.php on line 3
+
+Notice: Undefined offset: 0 in %sbug52041.php on line 18
+
+Notice: Undefined offset: 0 in %sbug52041.php on line 18
Notice: Undefined variable: x in %sbug52041.php on line 3
NULL
diff --git a/Zend/tests/bug52237.phpt b/Zend/tests/bug52237.phpt
index a466a8ce0..0b54787aa 100644
--- a/Zend/tests/bug52237.phpt
+++ b/Zend/tests/bug52237.phpt
@@ -7,5 +7,6 @@ preg_match('//', '', $data->info);
var_dump($data);
?>
--EXPECTF--
+
Warning: Attempt to modify property of non-object in %sbug52237.php on line 3
string(4) "test"
diff --git a/Zend/tests/bug52614.phpt b/Zend/tests/bug52614.phpt
new file mode 100644
index 000000000..d22088167
--- /dev/null
+++ b/Zend/tests/bug52614.phpt
@@ -0,0 +1,83 @@
+--TEST--
+Bug #52614 (Memory leak when writing on uninitialized variable returned from method call)
+--FILE--
+<?php
+class foo {
+ public $a1;
+ public $a2 = array();
+ public $a3;
+ public $o1;
+ public $o2;
+
+ public function f1() {
+ return $this->a1;
+ }
+
+ public function f2() {
+ return $this->a2;
+ }
+
+ public function f3() {
+ $this->a3 = array();
+ return $this->a3;
+ }
+
+ public function f4() {
+ return $this->o1;
+ }
+
+ public function f5() {
+ $this->o2 = new stdClass;
+ return $this->o2;
+ }
+
+ public function &f6() {
+ return $this->a1;
+ }
+
+ public function f7(&$x) {
+ $x = 2;
+ }
+
+}
+
+$foo = new foo;
+
+$foo->f1()[0] = 1;
+var_dump($foo->a1);
+
+$foo->f2()[0] = 1;
+var_dump($foo->a2);
+
+$foo->f3()[0] = 1;
+var_dump($foo->a3);
+
+$foo->f4()->a = 1;
+var_dump($foo->o1);
+
+$foo->f5()->a = 1;
+var_dump($foo->o2);
+
+$foo->a1[0] = 1;
+$foo->f7($foo->f6()[0]);
+var_dump($foo->a1[0]);
+$foo->f1()[0]++;
+var_dump($foo->a1[0]);
+$foo->f6()[0]++;
+var_dump($foo->a1[0]);
+--EXPECTF--
+NULL
+array(0) {
+}
+array(0) {
+}
+
+Warning: Creating default object from empty value in %sbug52614.php on line 52
+NULL
+object(stdClass)#%d (1) {
+ ["a"]=>
+ int(1)
+}
+int(2)
+int(2)
+int(3)
diff --git a/Zend/tests/bug52940.phpt b/Zend/tests/bug52940.phpt
new file mode 100644
index 000000000..f8d31c0db
--- /dev/null
+++ b/Zend/tests/bug52940.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #52940 (call_user_func_array still allows call-time pass-by-reference)
+--FILE--
+<?php
+function foo($a) {
+ $a++;
+ var_dump($a);
+}
+function bar(&$a) {
+ $a++;
+ var_dump($a);
+}
+$a = 1;
+call_user_func_array("foo", array(&$a));
+var_dump($a);
+call_user_func_array("bar", array(&$a));
+var_dump($a);
+?>
+--EXPECT--
+int(2)
+int(1)
+int(2)
+int(2)
diff --git a/Zend/tests/bug53347.phpt b/Zend/tests/bug53347.phpt
new file mode 100644
index 000000000..66e4ec261
--- /dev/null
+++ b/Zend/tests/bug53347.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #53347 Segfault accessing static method
+--FILE--
+<?php class ezcConsoleOutput
+{
+ protected static $color = array( 'gray' => 30 );
+
+ public static function isValidFormatCode( $type, $key )
+ {
+ return isset( self::${$type}[$key] );
+ }
+}
+
+var_dump( ezcConsoleOutput::isValidFormatCode( 'color', 'gray' ) );
+?>
+--EXPECT--
+bool(true)
diff --git a/Zend/tests/bug53511.phpt b/Zend/tests/bug53511.phpt
new file mode 100644
index 000000000..88f0cbe8f
--- /dev/null
+++ b/Zend/tests/bug53511.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Bug #53511 (Exceptions are lost in case an exception is thrown in catch operator)
+--FILE--
+<?php
+class Foo {
+ function __destruct() {
+ throw new Exception("ops 1");
+ }
+}
+
+function test() {
+ $e = new Foo();
+ try {
+ throw new Exception("ops 2");
+ } catch (Exception $e) {
+ echo $e->getMessage()."\n";
+ }
+}
+
+test();
+echo "bug\n";
+--EXPECTF--
+Fatal error: Uncaught exception 'Exception' with message 'ops 2' in %sbug53511.php:11
+Stack trace:
+#0 %sbug53511.php(17): test()
+#1 {main}
+
+Next exception 'Exception' with message 'ops 1' in %sbug53511.php:4
+Stack trace:
+#0 %sbug53511.php(12): Foo->__destruct()
+#1 %sbug53511.php(17): test()
+#2 {main}
+ thrown in %sbug53511.php on line 4
diff --git a/Zend/tests/bug53748.phpt b/Zend/tests/bug53748.phpt
new file mode 100644
index 000000000..2f171fe45
--- /dev/null
+++ b/Zend/tests/bug53748.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Bug #53748 (Using traits lead to a segmentation fault)
+--FILE--
+<?php
+
+trait Singleton {
+ protected static $instances=array();
+ abstract protected function __construct($config);
+ public static function getInstance($config) {
+ if (!isset(self::$instances[$serialize = serialize($config)])) {
+ self::$instances[$serialize] = new self($config);
+ }
+ return self::$instances[$serialize];
+ }
+}
+
+class MyHelloWorld {
+ use Singleton;
+ public function __construct($config)
+ {
+ var_dump( $config);
+ }
+}
+
+
+$o= myHelloWorld::getInstance(1);
+$o= myHelloWorld::getInstance(1);
+$o= myHelloWorld::getInstance(2);
+$o= myHelloWorld::getInstance(array(1=>2));
+$o= myHelloWorld::getInstance(array(1=>2));
+
+?>
+--EXPECTF--
+int(1)
+int(2)
+array(1) {
+ [1]=>
+ int(2)
+}
diff --git a/Zend/tests/bug54262.phpt b/Zend/tests/bug54262.phpt
index 1b9d3513c..17a6ea638 100644
--- a/Zend/tests/bug54262.phpt
+++ b/Zend/tests/bug54262.phpt
@@ -9,7 +9,7 @@ $simpleString["wrong"] = "f";
echo "ok\n";
?>
--EXPECTF--
-bool(true)
+bool(false)
Warning: Attempt to modify property of non-object in %sbug54262.php on line 4
diff --git a/Zend/tests/bug55086.phpt b/Zend/tests/bug55086.phpt
new file mode 100644
index 000000000..9a5c747b9
--- /dev/null
+++ b/Zend/tests/bug55086.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Bug #55086 (Namespace alias does not work inside trait's use block)
+--FILE--
+<?php
+namespace N1 {
+
+ trait T1 {
+ public function hello() { return 'hello from t1'; }
+ }
+
+ trait T2 {
+ public function hello() { return 'hello from t2'; }
+ }
+
+}
+namespace N2 {
+ use N1\T1;
+ use N1\T2;
+ class A {
+ use T1, T2 {
+ T1::hello insteadof T2;
+ T1::hello as foo;
+ }
+ }
+ $a = new A;
+ echo $a->hello(), PHP_EOL;
+ echo $a->foo(), PHP_EOL;
+ try {
+ } catch(namespace \Foo $e)
+ {
+ }
+}
+?>
+--EXPECT--
+hello from t1
+hello from t1
diff --git a/Zend/tests/bug55135.phpt b/Zend/tests/bug55135.phpt
new file mode 100644
index 000000000..f6d0aafac
--- /dev/null
+++ b/Zend/tests/bug55135.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Bug #55135 (Array keys are no longer type casted in unset())
+--FILE--
+<?php
+// This fails.
+$array = array(1 => 2);
+$a = "1";
+unset($array[$a]);
+print_r($array);
+
+// Those works.
+$array = array(1 => 2);
+$a = 1;
+unset($array[$a]);
+print_r($array);
+
+$array = array(1 => 2);
+unset($array[1]);
+print_r($array);
+
+$array = array(1 => 2);
+$a = 1;
+unset($array["1"]);
+print_r($array);
+?>
+--EXPECT--
+Array
+(
+)
+Array
+(
+)
+Array
+(
+)
+Array
+(
+)
diff --git a/Zend/tests/bug55137.phpt b/Zend/tests/bug55137.phpt
new file mode 100644
index 000000000..4a4e6e61a
--- /dev/null
+++ b/Zend/tests/bug55137.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #55137 (Changing trait static method visibility)
+--FILE--
+<?php
+
+trait A {
+ protected static function foo() { echo "abc\n"; }
+ private static function bar() { echo "def\n"; }
+}
+
+
+class B {
+ use A {
+ A::foo as public;
+ A::bar as public baz;
+ }
+}
+
+B::foo();
+B::baz();
+
+
+?>
+--EXPECT--
+abc
+def
diff --git a/Zend/tests/bug55247.phpt b/Zend/tests/bug55247.phpt
new file mode 100644
index 000000000..6fa893f89
--- /dev/null
+++ b/Zend/tests/bug55247.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Request #55247 (Parser problem with static calls using string method name)
+--FILE--
+<?php
+class Test{
+ public static function __callStatic($method, $arguments)
+ {
+ echo $method . PHP_EOL;
+ }
+ public function __call($method, $arguments)
+ {
+ echo $method . PHP_EOL;
+ }
+}
+
+$method = 'method';
+
+$test = new Test();
+
+$test->method();
+$test->$method();
+$test->{'method'}();
+
+Test::method();
+Test::$method();
+Test::{'method'}();
+--EXPECT--
+method
+method
+method
+method
+method
+method
diff --git a/Zend/tests/bug55305.phpt b/Zend/tests/bug55305.phpt
new file mode 100644
index 000000000..7f0749a31
--- /dev/null
+++ b/Zend/tests/bug55305.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #55305 (ref lost: 1st ref instantiated in class def, 2nd ref made w/o instantiating)
+--FILE--
+<?php
+class Foo {
+ var $foo = "test";
+}
+
+$f = new Foo();
+$f->bar =& $f->foo;
+var_dump($f->foo);
+var_dump($f->bar);
+?>
+--EXPECT--
+string(4) "test"
+string(4) "test"
diff --git a/Zend/tests/bug55339.phpt b/Zend/tests/bug55339.phpt
deleted file mode 100644
index 7d5ab4a78..000000000
--- a/Zend/tests/bug55339.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-Bug #55339 (Segfault with allow_call_time_pass_reference = Off)
---INI--
-allow_call_time_pass_reference=off
---FILE--
-<?php
-function error_handler($errno, $errstr, $errfile, $errline) {
- eval(';');
-}
-
-set_error_handler('error_handler');
-
-eval(<<<'EOF'
-function foo()
-{
- $array = array();
- foreach ($array as $key => $value) {
- bar($key, &$value);
- }
-}
-
-function bar()
-{
-
-}
-EOF
-);
-
-echo "OK\n";
---EXPECT--
-OK
diff --git a/Zend/tests/bug55445.phpt b/Zend/tests/bug55445.phpt
new file mode 100644
index 000000000..0f36ac5d8
--- /dev/null
+++ b/Zend/tests/bug55445.phpt
@@ -0,0 +1,8 @@
+--TEST--
+Bug #55445 (Lexer error with short open tags)
+--INI--
+short_open_tag=0
+--FILE--
+<?php $u = "chris"; ?><p>Welcome <?= $u ?></p>
+--EXPECTF--
+<p>Welcome chris</p>
diff --git a/Zend/tests/bug55578.phpt b/Zend/tests/bug55578.phpt
new file mode 100644
index 000000000..4a8604a23
--- /dev/null
+++ b/Zend/tests/bug55578.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #55578 (Segfault on implode/concat)
+--FILE--
+<?php
+$options = array();
+
+class Foo {
+ public function __toString() {
+ return 'Foo';
+ }
+}
+
+function test($options, $queryPart) {
+ return ''. (0 ? 1 : $queryPart);
+}
+
+var_dump(test($options, new Foo()));
+?>
+--EXPECT--
+string(3) "Foo"
diff --git a/Zend/tests/bug55705.phpt b/Zend/tests/bug55705.phpt
new file mode 100644
index 000000000..69220bfde
--- /dev/null
+++ b/Zend/tests/bug55705.phpt
@@ -0,0 +1,9 @@
+--TEST--
+Bug #55705 (Omitting a callable typehinted argument causes a segfault)
+--FILE--
+<?php
+function f(callable $c) {}
+f();
+?>
+--EXPECTF--
+Catchable fatal error: Argument 1 passed to f() must be callable, none given, called in %s on line 3 and defined in %s on line %d
diff --git a/Zend/tests/bug55825.phpt b/Zend/tests/bug55825.phpt
new file mode 100644
index 000000000..23fc933ee
--- /dev/null
+++ b/Zend/tests/bug55825.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #55825 (Missing initial value of static locals in trait methods)
+--FILE--
+<?php
+trait T1 {
+ public function inc() {
+ static $x=1;
+ echo $x++ . "\n";
+ }
+}
+class C { use T1; }
+$c1 = new C;
+$c1->inc();
+$c1->inc();
+--EXPECT--
+1
+2
diff --git a/Zend/tests/bug60139.phpt b/Zend/tests/bug60139.phpt
index e429fe2b0..414fa5651 100644
--- a/Zend/tests/bug60139.phpt
+++ b/Zend/tests/bug60139.phpt
@@ -26,5 +26,5 @@ new Bar;
var_dump(gc_collect_cycles());
?>
--EXPECT--
-int(0)
+int(2)
int(2)
diff --git a/Zend/tests/bug60169.phpt b/Zend/tests/bug60169.phpt
new file mode 100755
index 000000000..f97574191
--- /dev/null
+++ b/Zend/tests/bug60169.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #60169 (Conjunction of ternary and list crashes PHP)
+--FILE--
+<?php
+error_reporting(0);
+$arr = array("test");
+list($a,$b) = is_array($arr)? $arr : $arr;
+list($c,$d) = is_array($arr)?: NULL;
+echo "ok\n";
+--EXPECT--
+ok
diff --git a/Zend/tests/bug60350.phpt b/Zend/tests/bug60350.phpt
new file mode 100644
index 000000000..3facd54ac
--- /dev/null
+++ b/Zend/tests/bug60350.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #60350 No string escape code for ESC (ascii 27), normally \e
+--FILE--
+<?php
+$str = "\e";
+if (ord($str) == 27) {
+ echo "Works";
+}
+?>
+--EXPECT--
+Works
diff --git a/Zend/tests/bug60362.phpt b/Zend/tests/bug60362.phpt
new file mode 100644
index 000000000..e8d16ea4c
--- /dev/null
+++ b/Zend/tests/bug60362.phpt
@@ -0,0 +1,74 @@
+--TEST--
+Bug #60362: non-existent sub-sub keys should not have values
+--FILE--
+<?php
+$arr = array('exists' => 'foz');
+
+if (isset($arr['exists']['non_existent'])) {
+ echo "sub-key 'non_existent' is set: ";
+ var_dump($arr['exists']['non_existent']);
+} else {
+ echo "sub-key 'non_existent' is not set.\n";
+}
+if (isset($arr['exists'][1])) {
+ echo "sub-key 1 is set: ";
+ var_dump($arr['exists'][1]);
+} else {
+ echo "sub-key 1 is not set.\n";
+}
+
+echo "-------------------\n";
+if (isset($arr['exists']['non_existent']['sub_sub'])) {
+ echo "sub-key 'sub_sub' is set: ";
+ var_dump($arr['exists']['non_existent']['sub_sub']);
+} else {
+ echo "sub-sub-key 'sub_sub' is not set.\n";
+}
+if (isset($arr['exists'][1][0])) {
+ echo "sub-sub-key 0 is set: ";
+ var_dump($arr['exists'][1][0]);
+} else {
+ echo "sub-sub-key 0 is not set.\n";
+}
+
+echo "-------------------\n";
+if (empty($arr['exists']['non_existent'])) {
+ echo "sub-key 'non_existent' is empty.\n";
+} else {
+ echo "sub-key 'non_existent' is not empty: ";
+ var_dump($arr['exists']['non_existent']);
+}
+if (empty($arr['exists'][1])) {
+ echo "sub-key 1 is empty.\n";
+} else {
+ echo "sub-key 1 is not empty: ";
+ var_dump($arr['exists'][1]);
+}
+
+echo "-------------------\n";
+if (empty($arr['exists']['non_existent']['sub_sub'])) {
+ echo "sub-sub-key 'sub_sub' is empty.\n";
+} else {
+ echo "sub-sub-key 'sub_sub' is not empty: ";
+ var_dump($arr['exists']['non_existent']['sub_sub']);
+}
+if (empty($arr['exists'][1][0])) {
+ echo "sub-sub-key 0 is empty.\n";
+} else {
+ echo "sub-sub-key 0 is not empty: ";
+ var_dump($arr['exists'][1][0]);
+}
+echo "DONE";
+--EXPECT--
+sub-key 'non_existent' is not set.
+sub-key 1 is set: string(1) "o"
+-------------------
+sub-sub-key 'sub_sub' is not set.
+sub-sub-key 0 is set: string(1) "o"
+-------------------
+sub-key 'non_existent' is empty.
+sub-key 1 is not empty: string(1) "o"
+-------------------
+sub-sub-key 'sub_sub' is empty.
+sub-sub-key 0 is not empty: string(1) "o"
+DONE
diff --git a/Zend/tests/bug60444.phpt b/Zend/tests/bug60444.phpt
new file mode 100644
index 000000000..38f81bc41
--- /dev/null
+++ b/Zend/tests/bug60444.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #60444 (Segmentation fault with include & class extending)
+--FILE--
+<?php
+class Foo {
+ public function __construct() {
+ eval("class Bar extends Foo {}");
+ Some::foo($this);
+ }
+}
+class Some {
+ public static function foo(Foo $foo) {
+ }
+}
+new Foo;
+echo "done\n";
+--EXPECT--
+done
diff --git a/Zend/tests/bug60536_001.phpt b/Zend/tests/bug60536_001.phpt
new file mode 100644
index 000000000..916646727
--- /dev/null
+++ b/Zend/tests/bug60536_001.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #60536 (Traits Segfault)
+--FILE--
+<?php
+trait T { private $x = 0; }
+class X {
+ use T;
+}
+class Y extends X {
+ use T;
+ function x() {
+ return ++$this->x;
+ }
+}
+class Z extends Y {
+ function z() {
+ return ++$this->x;
+ }
+}
+$a = new Z();
+$a->x();
+echo "DONE";
+?>
+--EXPECTF--
+DONE
diff --git a/Zend/tests/bug60536_002.phpt b/Zend/tests/bug60536_002.phpt
new file mode 100644
index 000000000..0bca98382
--- /dev/null
+++ b/Zend/tests/bug60536_002.phpt
@@ -0,0 +1,40 @@
+--TEST--
+The same rules are applied for properties that are defined in the class hierarchy. Thus, if the properties are compatible, a notice is issued, if not a fatal error occures. (relevant with #60536)
+--FILE--
+<?php
+error_reporting(E_ALL | E_STRICT);
+
+class Base {
+ private $hello;
+}
+
+trait THello1 {
+ private $hello;
+}
+
+echo "PRE-CLASS-GUARD\n";
+class Notice extends Base {
+ use THello1;
+ private $hello;
+}
+echo "POST-CLASS-GUARD\n";
+
+// now we do the test for a fatal error
+
+class TraitsTest {
+ use THello1;
+ public $hello;
+}
+
+echo "POST-CLASS-GUARD2\n";
+
+$t = new TraitsTest;
+$t->hello = "foo";
+?>
+--EXPECTF--
+PRE-CLASS-GUARD
+
+Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
+POST-CLASS-GUARD
+
+Fatal error: TraitsTest and THello1 define the same property ($hello) in the composition of TraitsTest. However, the definition differs and is considered incompatible. Class was composed in %s on line %d
diff --git a/Zend/tests/bug60536_003.phpt b/Zend/tests/bug60536_003.phpt
new file mode 100644
index 000000000..d944a0a41
--- /dev/null
+++ b/Zend/tests/bug60536_003.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Properties should be initialized correctly (relevant to #60536)
+--FILE--
+<?php
+error_reporting(E_ALL | E_STRICT);
+
+class BaseWithPropA {
+ private $hello = 0;
+}
+
+trait AHelloProperty {
+ private $hello = 0;
+}
+
+class BaseWithTPropB {
+ use AHelloProperty;
+}
+
+class SubclassA extends BaseWithPropA {
+ use AHelloProperty;
+}
+
+class SubclassB extends BaseWithTPropB {
+ use AHelloProperty;
+}
+
+$a = new SubclassA;
+var_dump($a);
+
+$b = new SubclassB;
+var_dump($b);
+
+?>
+--EXPECTF--
+object(SubclassA)#%d (2) {
+ ["hello":"SubclassA":private]=>
+ int(0)
+ ["hello":"BaseWithPropA":private]=>
+ int(0)
+}
+object(SubclassB)#%d (2) {
+ ["hello":"SubclassB":private]=>
+ int(0)
+ ["hello":"BaseWithTPropB":private]=>
+ int(0)
+}
diff --git a/Zend/tests/bug60536_004.phpt b/Zend/tests/bug60536_004.phpt
new file mode 100644
index 000000000..4f2083609
--- /dev/null
+++ b/Zend/tests/bug60536_004.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Introducing new private variables of the same name in a subclass is ok, and does not lead to any output. That is consitent with normal inheritance handling. (relevant to #60536)
+--FILE--
+<?php
+error_reporting(E_ALL | E_STRICT);
+
+class Base {
+ private $hello;
+}
+
+trait THello1 {
+ private $hello;
+}
+
+// Now we use the trait, which happens to introduce another private variable
+// but they are distinct, and not related to each other, so no warning.
+echo "PRE-CLASS-GUARD\n";
+class SameNameInSubClassNoNotice extends Base {
+ use THello1;
+}
+echo "POST-CLASS-GUARD\n";
+
+// now the same with a class that defines the property itself,
+// that should give the expected strict warning.
+
+class Notice extends Base {
+ use THello1;
+ private $hello;
+}
+echo "POST-CLASS-GUARD2\n";
+?>
+--EXPECTF--
+PRE-CLASS-GUARD
+POST-CLASS-GUARD
+
+Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %sbug60536_004.php on line %d
+POST-CLASS-GUARD2
diff --git a/Zend/tests/bug60536_005.phpt b/Zend/tests/bug60536_005.phpt
new file mode 100644
index 000000000..378adcc9c
--- /dev/null
+++ b/Zend/tests/bug60536_005.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Introducing new private variables of the same name in a subclass is ok, and does not lead to any output. That is consitent with normal inheritance handling. (relevant to #60536)
+--FILE--
+<?php
+error_reporting(E_ALL | E_STRICT);
+
+class Base {
+ protected $hello;
+}
+
+trait THello1 {
+ protected $hello;
+}
+
+// Protected and public are handle more strict with a warning then what is
+// expected from normal inheritance since they can have easier coliding semantics
+echo "PRE-CLASS-GUARD\n";
+class SameNameInSubClassProducesNotice extends Base {
+ use THello1;
+}
+echo "POST-CLASS-GUARD\n";
+
+// now the same with a class that defines the property itself, too.
+
+class Notice extends Base {
+ use THello1;
+ protected $hello;
+}
+echo "POST-CLASS-GUARD2\n";
+?>
+--EXPECTF--
+PRE-CLASS-GUARD
+
+Strict Standards: Base and THello1 define the same property ($hello) in the composition of SameNameInSubClassProducesNotice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
+POST-CLASS-GUARD
+
+Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
+POST-CLASS-GUARD2
diff --git a/Zend/tests/bug60611.phpt b/Zend/tests/bug60611.phpt
new file mode 100644
index 000000000..abd04b089
--- /dev/null
+++ b/Zend/tests/bug60611.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #60611 (Segmentation fault with Cls::{expr}() syntax)
+--FILE--
+<?php
+class Cls {
+ function __call($name, $arg) {
+ }
+ static function __callStatic($name, $arg) {
+ }
+}
+
+$cls = new Cls;
+$cls->{0}();
+$cls->{1.0}();
+$cls->{true}();
+$cls->{false}();
+$cls->{null}();
+
+Cls::{0}();
+Cls::{1.0}();
+Cls::{true}();
+Cls::{false}();
+Cls::{null}();
+
+?>
+--EXPECTF--
+Fatal error: Method name must be a string in %sbug60611.php on line %d
diff --git a/Zend/tests/bug60613.phpt b/Zend/tests/bug60613.phpt
new file mode 100644
index 000000000..a9db68dea
--- /dev/null
+++ b/Zend/tests/bug60613.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Bug #60613 (Segmentation fault with $cls->{expr}() syntax)
+--FILE--
+<?php
+class Cls {
+ function __call($name, $arg) {
+ }
+}
+
+$cls = new Cls();
+$cls->{0}();
+$cls->{1.0}();
+$cls->{true}();
+$cls->{false}();
+$cls->{null}();
+echo "ok\n";
+--EXPECTF--
+Fatal error: Method name must be a string in %sbug60613.php on line %d
diff --git a/Zend/tests/bug60771.phpt b/Zend/tests/bug60771.phpt
new file mode 100644
index 000000000..2cf69f782
--- /dev/null
+++ b/Zend/tests/bug60771.phpt
@@ -0,0 +1,9 @@
+--TEST--
+test of larger than 8kb text file being parsed by require statement
+--FILE--
+<?php
+ file_put_contents('test.php',str_repeat('passed, ',1024));
+ require('test.php');
+?>
+--EXPECT--
+passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed,
diff --git a/Zend/tests/callable_type_hint_001.phpt b/Zend/tests/callable_type_hint_001.phpt
new file mode 100644
index 000000000..36643fa64
--- /dev/null
+++ b/Zend/tests/callable_type_hint_001.phpt
@@ -0,0 +1,39 @@
+--TEST--
+callable type hint#001
+--FILE--
+<?php
+
+class bar {
+ function baz() {}
+ static function foo() {}
+}
+function foo(callable $bar) {
+ var_dump($bar);
+}
+$closure = function () {};
+
+foo("strpos");
+foo("foo");
+foo(array("bar", "baz"));
+foo(array("bar", "foo"));
+foo($closure);
+--EXPECTF--
+string(6) "strpos"
+string(3) "foo"
+
+Strict Standards: Non-static method bar::baz() should not be called statically in %scallable_type_hint_001.php on line %d
+array(2) {
+ [0]=>
+ string(3) "bar"
+ [1]=>
+ string(3) "baz"
+}
+array(2) {
+ [0]=>
+ string(3) "bar"
+ [1]=>
+ string(3) "foo"
+}
+object(Closure)#%d (0) {
+}
+
diff --git a/Zend/tests/callable_type_hint_002.phpt b/Zend/tests/callable_type_hint_002.phpt
new file mode 100644
index 000000000..b1b7339c3
--- /dev/null
+++ b/Zend/tests/callable_type_hint_002.phpt
@@ -0,0 +1,27 @@
+--TEST--
+callable type hint#002 - Reflection
+--FILE--
+<?php
+
+class bar {
+ static function foo(callable $arg) {}
+}
+function foo(callable $bar) {
+}
+$closure = function (callable $arg) {};
+
+$rf = new ReflectionFunction("foo");
+var_dump($rf->getParameters()[0]->isCallable());
+
+$rm = new ReflectionMethod("bar", "foo");
+var_dump($rm->getParameters()[0]->isCallable());
+
+$rc = new ReflectionFunction($closure);
+var_dump($rc->getParameters()[0]->isCallable());
+
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+
diff --git a/Zend/tests/callable_type_hint_003.phpt b/Zend/tests/callable_type_hint_003.phpt
new file mode 100644
index 000000000..83f5090af
--- /dev/null
+++ b/Zend/tests/callable_type_hint_003.phpt
@@ -0,0 +1,21 @@
+--TEST--
+callable type hint#003
+--FILE--
+<?php
+
+function foo(callable $a, $b, callable $c) {
+ var_dump($a, $b, $c);
+}
+function bar(callable $a = null) {
+ var_dump($a);
+}
+
+foo("strpos", 123, "strpos");
+bar("substr");
+?>
+--EXPECT--
+string(6) "strpos"
+int(123)
+string(6) "strpos"
+string(6) "substr"
+
diff --git a/Zend/tests/cast_to_string.phpt b/Zend/tests/cast_to_string.phpt
index d06daa2e7..f8b57a22c 100644
--- a/Zend/tests/cast_to_string.phpt
+++ b/Zend/tests/cast_to_string.phpt
Binary files differ
diff --git a/Zend/tests/class_exists_003.phpt b/Zend/tests/class_exists_003.phpt
index ad7bafa3a..cba467509 100644
--- a/Zend/tests/class_exists_003.phpt
+++ b/Zend/tests/class_exists_003.phpt
@@ -1,5 +1,5 @@
--TEST--
-Checking if exists interface, abstract and final class
+Checking if exists interface, trait, abstract and final class
--FILE--
<?php
@@ -9,12 +9,16 @@ abstract class b { }
final class c { }
+trait d {}
+
var_dump(class_exists('a'));
var_dump(class_exists('b'));
var_dump(class_exists('c'));
+var_dump(class_exists('d'));
?>
--EXPECT--
bool(false)
bool(true)
bool(true)
+bool(false)
diff --git a/Zend/tests/closure_005.phpt b/Zend/tests/closure_005.phpt
new file mode 100644
index 000000000..4e32faa01
--- /dev/null
+++ b/Zend/tests/closure_005.phpt
@@ -0,0 +1,74 @@
+--TEST--
+Closure 005: Lambda inside class, lifetime of $this
+--FILE--
+<?php
+
+class A {
+ private $x;
+
+ function __construct($x) {
+ $this->x = $x;
+ }
+
+ function __destruct() {
+ echo "Destroyed\n";
+ }
+
+ function getIncer($val) {
+ return function() use ($val) {
+ $this->x += $val;
+ };
+ }
+
+ function getPrinter() {
+ return function() {
+ echo $this->x."\n";
+ };
+ }
+
+ function getError() {
+ return static function() {
+ echo $this->x."\n";
+ };
+ }
+
+ function printX() {
+ echo $this->x."\n";
+ }
+}
+
+$a = new A(3);
+$incer = $a->getIncer(2);
+$printer = $a->getPrinter();
+$error = $a->getError();
+
+$a->printX();
+$printer();
+$incer();
+$a->printX();
+$printer();
+
+unset($a);
+
+$incer();
+$printer();
+
+unset($incer);
+$printer();
+
+unset($printer);
+
+$error();
+
+echo "Done\n";
+?>
+--EXPECTF--
+3
+3
+5
+5
+7
+7
+Destroyed
+
+Fatal error: Using $this when not in object context in %sclosure_005.php on line 28
diff --git a/Zend/tests/closure_007.phpt b/Zend/tests/closure_007.phpt
new file mode 100644
index 000000000..89cd06d8a
--- /dev/null
+++ b/Zend/tests/closure_007.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Closure 007: Nested lambdas in classes
+--FILE--
+<?php
+
+class A {
+ private $x = 0;
+
+ function getClosureGetter () {
+ return function () {
+ return function () {
+ $this->x++;
+ };
+ };
+ }
+
+ function printX () {
+ echo $this->x."\n";
+ }
+}
+
+$a = new A;
+$a->printX();
+$getClosure = $a->getClosureGetter();
+$a->printX();
+$closure = $getClosure();
+$a->printX();
+$closure();
+$a->printX();
+
+echo "Done\n";
+?>
+--EXPECT--
+0
+0
+0
+1
+Done
diff --git a/Zend/tests/closure_020.phpt b/Zend/tests/closure_020.phpt
index 9d04a9af5..bec2bedd7 100644
--- a/Zend/tests/closure_020.phpt
+++ b/Zend/tests/closure_020.phpt
@@ -23,16 +23,18 @@ var_dump($y()->test);
?>
--EXPECTF--
-object(foo)#%d (%d) {
+object(foo)#%d (2) {
["test":"foo":private]=>
int(3)
["a"]=>
- object(Closure)#%d (1) {
+ object(Closure)#%d (2) {
["static"]=>
array(1) {
["a"]=>
*RECURSION*
}
+ ["this"]=>
+ *RECURSION*
}
}
bool(true)
diff --git a/Zend/tests/closure_024.phpt b/Zend/tests/closure_024.phpt
index 504e81efd..74083f73b 100644
--- a/Zend/tests/closure_024.phpt
+++ b/Zend/tests/closure_024.phpt
@@ -1,16 +1,26 @@
--TEST--
-Closure 024: Trying to clone the Closure object
+Closure 024: Clone the Closure object
--FILE--
<?php
-$a = function () {
- return clone function () {
- return 1;
- };
-};
+$a = 1;
+$c = function($add) use(&$a) { return $a+$add; };
-$a();
+$cc = clone $c;
+echo $c(10)."\n";
+echo $cc(10)."\n";
+
+$a++;
+
+echo $c(10)."\n";
+echo $cc(10)."\n";
+
+echo "Done.\n";
?>
--EXPECTF--
-Fatal error: Trying to clone an uncloneable object of class Closure in %s on line %d
+11
+11
+12
+12
+Done. \ No newline at end of file
diff --git a/Zend/tests/closure_026.phpt b/Zend/tests/closure_026.phpt
index f9e6bd5e2..150cc8658 100644
--- a/Zend/tests/closure_026.phpt
+++ b/Zend/tests/closure_026.phpt
@@ -32,7 +32,9 @@ object(foo)#%d (1) {
["a"]=>
array(1) {
[0]=>
- object(Closure)#%d (0) {
+ object(Closure)#%d (1) {
+ ["this"]=>
+ *RECURSION*
}
}
}
@@ -41,7 +43,12 @@ int(1)
string(1) "a"
array(1) {
[0]=>
- object(Closure)#%d (0) {
+ object(Closure)#%d (1) {
+ ["this"]=>
+ object(foo)#%d (1) {
+ ["a"]=>
+ *RECURSION*
+ }
}
}
int(1)
diff --git a/Zend/tests/closure_036.phpt b/Zend/tests/closure_036.phpt
new file mode 100755
index 000000000..77d7ce690
--- /dev/null
+++ b/Zend/tests/closure_036.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Closure 036: Rebinding closures, keep calling scope
+--FILE--
+<?php
+
+class A {
+ private $x;
+
+ public function __construct($v) {
+ $this->x = $v;
+ }
+
+ public function getIncrementor() {
+ return function() { return ++$this->x; };
+ }
+}
+
+$a = new A(0);
+$b = new A(10);
+
+$ca = $a->getIncrementor();
+$cb = $ca->bindTo($b);
+$cb2 = Closure::bind($ca, $b);
+
+var_dump($ca());
+var_dump($cb());
+var_dump($cb2());
+
+?>
+--EXPECTF--
+int(1)
+int(11)
+int(12) \ No newline at end of file
diff --git a/Zend/tests/closure_037.phpt b/Zend/tests/closure_037.phpt
new file mode 100755
index 000000000..4b24c85d1
--- /dev/null
+++ b/Zend/tests/closure_037.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Closure 037: self:: and static:: within closures
+--FILE--
+<?php
+class A {
+ private $x = 0;
+
+ function getClosure () {
+ return function () {
+ $this->x++;
+ self::printX();
+ self::print42();
+ static::print42();
+ };
+ }
+
+ function printX () {
+ echo $this->x."\n";
+ }
+
+ function print42() {
+ echo "42\n";
+ }
+}
+
+class B extends A {
+ function print42() {
+ echo "forty two\n";
+ }
+}
+
+$a = new A;
+$closure = $a->getClosure();
+$closure();
+$b = new B;
+$closure = $b->getClosure();
+$closure();
+?>
+Done.
+--EXPECTF--
+1
+42
+42
+1
+42
+forty two
+Done. \ No newline at end of file
diff --git a/Zend/tests/closure_038.phpt b/Zend/tests/closure_038.phpt
new file mode 100644
index 000000000..fef073478
--- /dev/null
+++ b/Zend/tests/closure_038.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Closure 038: Rebinding closures, change scope, different runtime type
+--FILE--
+<?php
+
+class A {
+ private $x;
+
+ public function __construct($v) {
+ $this->x = $v;
+ }
+
+ public function getIncrementor() {
+ return function() { return ++$this->x; };
+ }
+}
+class B extends A {
+ private $x;
+ public function __construct($v) {
+ parent::__construct($v);
+ $this->x = $v*2;
+ }
+}
+
+$a = new A(0);
+$b = new B(10);
+
+$ca = $a->getIncrementor();
+var_dump($ca());
+
+echo "Testing with scope given as object", "\n";
+
+$cb = $ca->bindTo($b, $b);
+$cb2 = Closure::bind($ca, $b, $b);
+var_dump($cb());
+var_dump($cb2());
+
+echo "Testing with scope as string", "\n";
+
+$cb = $ca->bindTo($b, 'B');
+$cb2 = Closure::bind($ca, $b, 'B');
+var_dump($cb());
+var_dump($cb2());
+
+$cb = $ca->bindTo($b, NULL);
+var_dump($cb());
+
+?>
+--EXPECTF--
+int(1)
+Testing with scope given as object
+int(21)
+int(22)
+Testing with scope as string
+int(23)
+int(24)
+
+Fatal error: Cannot access private property B::$x in %s on line %d
diff --git a/Zend/tests/closure_039.phpt b/Zend/tests/closure_039.phpt
new file mode 100644
index 000000000..c6a727c0f
--- /dev/null
+++ b/Zend/tests/closure_039.phpt
@@ -0,0 +1,58 @@
+--TEST--
+Closure 039: Rebinding closures, change scope, same runtime type
+--FILE--
+<?php
+
+class A {
+ private $x;
+
+ public function __construct($v) {
+ $this->x = $v;
+ }
+
+ public function getIncrementor() {
+ return function() { return ++$this->x; };
+ }
+}
+class B extends A {
+ private $x;
+ public function __construct($v) {
+ parent::__construct($v);
+ $this->x = $v*2;
+ }
+}
+
+$a = new B(-5);
+$b = new B(10);
+
+$ca = $a->getIncrementor();
+var_dump($ca());
+
+echo "Testing with scope given as object", "\n";
+
+$cb = $ca->bindTo($b, $b);
+$cb2 = Closure::bind($ca, $b, $b);
+var_dump($cb());
+var_dump($cb2());
+
+echo "Testing with scope as string", "\n";
+
+$cb = $ca->bindTo($b, 'B');
+$cb2 = Closure::bind($ca, $b, 'B');
+var_dump($cb());
+var_dump($cb2());
+
+$cb = $ca->bindTo($b, NULL);
+var_dump($cb());
+
+?>
+--EXPECTF--
+int(-4)
+Testing with scope given as object
+int(21)
+int(22)
+Testing with scope as string
+int(23)
+int(24)
+
+Fatal error: Cannot access private property B::$x in %s on line %d
diff --git a/Zend/tests/closure_040.phpt b/Zend/tests/closure_040.phpt
new file mode 100644
index 000000000..a1b6cd604
--- /dev/null
+++ b/Zend/tests/closure_040.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Closure 040: Rebinding closures, bad arguments
+--FILE--
+<?php
+
+class A {
+ private $x;
+ private static $xs = 10;
+
+ public function __construct($v) {
+ $this->x = $v;
+ }
+
+ public function getIncrementor() {
+ return function() { return ++$this->x; };
+ }
+ public function getStaticIncrementor() {
+ return static function() { return ++static::$xs; };
+ }
+}
+
+$a = new A(20);
+
+$ca = $a->getIncrementor();
+$cas = $a->getStaticIncrementor();
+
+$ca->bindTo($a, array());
+$ca->bindTo(array(), 'A');
+$ca->bindTo($a, array(), "");
+$ca->bindTo();
+$cas->bindTo($a, 'A');
+
+?>
+--EXPECTF--
+Notice: Array to string conversion in %s on line %d
+
+Warning: Class 'Array' not found in %s on line %d
+
+Warning: Closure::bindTo() expects parameter 1 to be object, array given in %s on line 25
+
+Warning: Closure::bindTo() expects at most 2 parameters, 3 given in %s on line %d
+
+Warning: Closure::bindTo() expects at least 1 parameter, 0 given in %s on line %d
+
+Warning: Cannot bind an instance to a static closure in %s on line %d
diff --git a/Zend/tests/closure_041.phpt b/Zend/tests/closure_041.phpt
new file mode 100644
index 000000000..79cf9f338
--- /dev/null
+++ b/Zend/tests/closure_041.phpt
@@ -0,0 +1,106 @@
+--TEST--
+Closure 041: Rebinding: preservation of previous scope when not given as arg unless impossible
+--FILE--
+<?php
+
+/* It's impossible to preserve the previous scope when doing so would break
+ * the invariants that, for non-static closures, having a scope is equivalent
+ * to having a bound instance. */
+
+$staticUnscoped = static function () {
+ echo "scoped to A: "; var_dump(isset(A::$priv));
+ echo "bound: ", isset($this)?get_class($this):"no";
+};
+
+$nonstaticUnscoped = function () {
+ echo "scoped to A: "; var_dump(isset(A::$priv));
+ echo "bound: ", isset($this)?get_class($this):"no";
+};
+
+class A {
+ private static $priv = 7;
+ function getClosure() {
+ return function () {
+ echo "scoped to A: "; var_dump(isset(A::$priv));
+ echo "bound: ", isset($this)?get_class($this):"no";
+ };
+ }
+ function getStaticClosure() {
+ return static function () {
+ echo "scoped to A: "; var_dump(isset(A::$priv));
+ echo "bound: ", isset($this)?get_class($this):"no";
+ };
+ }
+}
+class B extends A {}
+
+$a = new A();
+$staticScoped = $a->getStaticClosure();
+$nonstaticScoped = $a->getClosure();
+
+echo "Before binding", "\n";
+$staticUnscoped(); echo "\n";
+$nonstaticUnscoped(); echo "\n";
+$staticScoped(); echo "\n";
+$nonstaticScoped(); echo "\n";
+
+echo "After binding, no instance", "\n";
+$d = $staticUnscoped->bindTo(null); $d(); echo "\n";
+$d = $nonstaticUnscoped->bindTo(null); $d(); echo "\n";
+$d = $staticScoped->bindTo(null); $d(); echo "\n";
+$d = $nonstaticScoped->bindTo(null); $d(); echo "\n";
+//$d should have been turned to static
+$d->bindTo($d);
+
+echo "After binding, with same-class instance for the bound ones", "\n";
+$d = $staticUnscoped->bindTo(new A); $d(); echo "\n";
+$d = $nonstaticUnscoped->bindTo(new A); $d(); echo " (should be scoped to dummy class)\n";
+$d = $staticScoped->bindTo(new A); $d(); echo "\n";
+$d = $nonstaticScoped->bindTo(new A); $d(); echo "\n";
+
+echo "After binding, with different instance for the bound ones", "\n";
+$d = $nonstaticUnscoped->bindTo(new B); $d(); echo " (should be scoped to dummy class)\n";
+$d = $nonstaticScoped->bindTo(new B); $d(); echo "\n";
+
+echo "Done.\n";
+
+--EXPECTF--
+Before binding
+scoped to A: bool(false)
+bound: no
+scoped to A: bool(false)
+bound: no
+scoped to A: bool(true)
+bound: no
+scoped to A: bool(true)
+bound: A
+After binding, no instance
+scoped to A: bool(false)
+bound: no
+scoped to A: bool(false)
+bound: no
+scoped to A: bool(true)
+bound: no
+scoped to A: bool(true)
+bound: no
+
+Warning: Cannot bind an instance to a static closure in %s on line %d
+After binding, with same-class instance for the bound ones
+
+Warning: Cannot bind an instance to a static closure in %s on line %d
+scoped to A: bool(false)
+bound: no
+scoped to A: bool(false)
+bound: A (should be scoped to dummy class)
+
+Warning: Cannot bind an instance to a static closure in %s on line %d
+scoped to A: bool(true)
+bound: no
+scoped to A: bool(true)
+bound: A
+After binding, with different instance for the bound ones
+scoped to A: bool(false)
+bound: B (should be scoped to dummy class)
+scoped to A: bool(true)
+bound: B
+Done. \ No newline at end of file
diff --git a/Zend/tests/closure_042.phpt b/Zend/tests/closure_042.phpt
new file mode 100644
index 000000000..8969765bc
--- /dev/null
+++ b/Zend/tests/closure_042.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Closure 042: Binding an instance to a non-scoped non-static closures gives it a dummy scope
+--SKIPIF--
+<?php if(!extension_loaded("reflection")) print "skip no reflection"; ?>
+--FILE--
+<?php
+
+$c = function() { var_dump($this); };
+$d = $c->bindTo(new stdClass);
+$d();
+$rm = new ReflectionFunction($d);
+var_dump($rm->getClosureScopeClass()->name); //dummy sope is Closure
+
+//should have the same effect
+$d = $c->bindTo(new stdClass, NULL);
+$d();
+$rm = new ReflectionFunction($d);
+var_dump($rm->getClosureScopeClass()->name); //dummy sope is Closure
+
+echo "Done.\n";
+
+--EXPECTF--
+object(stdClass)#%d (0) {
+}
+string(7) "Closure"
+object(stdClass)#%d (0) {
+}
+string(7) "Closure"
+Done.
diff --git a/Zend/tests/closure_043.phpt b/Zend/tests/closure_043.phpt
new file mode 100644
index 000000000..98c88fda3
--- /dev/null
+++ b/Zend/tests/closure_043.phpt
@@ -0,0 +1,86 @@
+--TEST--
+Closure 043: Scope/bounding combination invariants; static closures
+--FILE--
+<?php
+/* Whether it's scoped or not, a static closure cannot have
+ * a bound instance. It should also not be automatically converted
+ * to a non-static instance when attempting to bind one */
+
+$staticUnscoped = static function () { var_dump(isset(A::$priv)); var_dump(isset($this)); };
+
+class A {
+ private static $priv = 7;
+ static function getStaticClosure() {
+ return static function() { var_dump(isset(A::$priv)); var_dump(isset($this)); };
+ }
+}
+
+$staticScoped = A::getStaticClosure();
+
+echo "Before binding", "\n";
+$staticUnscoped(); echo "\n";
+$staticScoped(); echo "\n";
+
+echo "After binding, null scope, no instance", "\n";
+$d = $staticUnscoped->bindTo(null, null); $d(); echo "\n";
+$d = $staticScoped->bindTo(null, null); $d(); echo "\n";
+
+echo "After binding, null scope, with instance", "\n";
+$d = $staticUnscoped->bindTo(new A, null); $d(); echo "\n";
+$d = $staticScoped->bindTo(new A, null); $d(); echo "\n";
+
+echo "After binding, with scope, no instance", "\n";
+$d = $staticUnscoped->bindTo(null, 'A'); $d(); echo "\n";
+$d = $staticScoped->bindTo(null, 'A'); $d(); echo "\n";
+
+echo "After binding, with scope, with instance", "\n";
+$d = $staticUnscoped->bindTo(new A, 'A'); $d(); echo "\n";
+$d = $staticScoped->bindTo(new A, 'A'); $d(); echo "\n";
+
+echo "Done.\n";
+
+--EXPECTF--
+Before binding
+bool(false)
+bool(false)
+
+bool(true)
+bool(false)
+
+After binding, null scope, no instance
+bool(false)
+bool(false)
+
+bool(false)
+bool(false)
+
+After binding, null scope, with instance
+
+Warning: Cannot bind an instance to a static closure in %s on line %d
+bool(false)
+bool(false)
+
+
+Warning: Cannot bind an instance to a static closure in %s on line %d
+bool(false)
+bool(false)
+
+After binding, with scope, no instance
+bool(true)
+bool(false)
+
+bool(true)
+bool(false)
+
+After binding, with scope, with instance
+
+Warning: Cannot bind an instance to a static closure in %s on line %d
+bool(true)
+bool(false)
+
+
+Warning: Cannot bind an instance to a static closure in %s on line %d
+bool(true)
+bool(false)
+
+Done.
diff --git a/Zend/tests/closure_044.phpt b/Zend/tests/closure_044.phpt
new file mode 100644
index 000000000..d2644c040
--- /dev/null
+++ b/Zend/tests/closure_044.phpt
@@ -0,0 +1,78 @@
+--TEST--
+Closure 044: Scope/bounding combination invariants; non static closures
+--FILE--
+<?php
+/* A non-static closure has a bound instance if it has a scope
+ * and does't have an instance if it has no scope */
+
+$nonstaticUnscoped = function () { var_dump(isset(A::$priv)); var_dump(isset($this)); };
+
+class A {
+ private static $priv = 7;
+ function getClosure() {
+ return function() { var_dump(isset(A::$priv)); var_dump(isset($this)); };
+ }
+}
+
+$a = new A();
+$nonstaticScoped = $a->getClosure();
+
+echo "Before binding", "\n";
+$nonstaticUnscoped(); echo "\n";
+$nonstaticScoped(); echo "\n";
+
+echo "After binding, null scope, no instance", "\n";
+$d = $nonstaticUnscoped->bindTo(null, null); $d(); echo "\n";
+$d = $nonstaticScoped->bindTo(null, null); $d(); echo "\n";
+
+echo "After binding, null scope, with instance", "\n";
+$d = $nonstaticUnscoped->bindTo(new A, null); $d(); echo "\n";
+$d = $nonstaticScoped->bindTo(new A, null); $d(); echo "\n";
+
+echo "After binding, with scope, no instance", "\n";
+$d = $nonstaticUnscoped->bindTo(null, 'A'); $d(); echo "\n";
+$d = $nonstaticScoped->bindTo(null, 'A'); $d(); echo "\n";
+
+echo "After binding, with scope, with instance", "\n";
+$d = $nonstaticUnscoped->bindTo(new A, 'A'); $d(); echo "\n";
+$d = $nonstaticScoped->bindTo(new A, 'A'); $d(); echo "\n";
+
+echo "Done.\n";
+
+--EXPECTF--
+Before binding
+bool(false)
+bool(false)
+
+bool(true)
+bool(true)
+
+After binding, null scope, no instance
+bool(false)
+bool(false)
+
+bool(false)
+bool(false)
+
+After binding, null scope, with instance
+bool(false)
+bool(true)
+
+bool(false)
+bool(true)
+
+After binding, with scope, no instance
+bool(true)
+bool(false)
+
+bool(true)
+bool(false)
+
+After binding, with scope, with instance
+bool(true)
+bool(true)
+
+bool(true)
+bool(true)
+
+Done.
diff --git a/Zend/tests/closure_045.phpt b/Zend/tests/closure_045.phpt
new file mode 100644
index 000000000..411569176
--- /dev/null
+++ b/Zend/tests/closure_045.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Closure 045: Closures created in static methods are static, even without the keyword
+--FILE--
+<?php
+
+class A {
+static function foo() {
+ return function () {};
+}
+}
+
+$a = A::foo();
+$a->bindTo(new A);
+
+echo "Done.\n";
+
+--EXPECTF--
+Warning: Cannot bind an instance to a static closure in %s on line %d
+Done.
diff --git a/Zend/tests/closure_046.phpt b/Zend/tests/closure_046.phpt
new file mode 100644
index 000000000..30a9d3e1b
--- /dev/null
+++ b/Zend/tests/closure_046.phpt
@@ -0,0 +1,70 @@
+--TEST--
+Closure 046: Rebinding: preservation of previous scope when "static" given as scope arg (same as closure #041)
+--FILE--
+<?php
+
+/* It's impossible to preserve the previous scope when doing so would break
+ * the invariants that, for non-static closures, having a scope is equivalent
+ * to having a bound instance. */
+
+$nonstaticUnscoped = function () { var_dump(isset(A::$priv)); var_dump(isset($this)); };
+
+class A {
+ private static $priv = 7;
+ function getClosure() {
+ return function() { var_dump(isset(A::$priv)); var_dump(isset($this)); };
+ }
+}
+class B extends A {}
+
+$a = new A();
+$nonstaticScoped = $a->getClosure();
+
+echo "Before binding", "\n";
+$nonstaticUnscoped(); echo "\n";
+$nonstaticScoped(); echo "\n";
+
+echo "After binding, no instance", "\n";
+$d = $nonstaticUnscoped->bindTo(null, "static"); $d(); echo "\n";
+$d = $nonstaticScoped->bindTo(null, "static"); $d(); echo "\n";
+//$d should have been turned to static
+$d->bindTo($d);
+
+echo "After binding, with same-class instance for the bound one", "\n";
+$d = $nonstaticUnscoped->bindTo(new A, "static"); $d(); echo "\n";
+$d = $nonstaticScoped->bindTo(new A, "static"); $d(); echo "\n";
+
+echo "After binding, with different instance for the bound one", "\n";
+$d = $nonstaticScoped->bindTo(new B, "static"); $d(); echo "\n";
+
+echo "Done.\n";
+
+--EXPECTF--
+Before binding
+bool(false)
+bool(false)
+
+bool(true)
+bool(true)
+
+After binding, no instance
+bool(false)
+bool(false)
+
+bool(true)
+bool(false)
+
+
+Warning: Cannot bind an instance to a static closure in %s on line %d
+After binding, with same-class instance for the bound one
+bool(false)
+bool(true)
+
+bool(true)
+bool(true)
+
+After binding, with different instance for the bound one
+bool(true)
+bool(true)
+
+Done.
diff --git a/Zend/tests/concat_001.phpt b/Zend/tests/concat_001.phpt
index d7bc525c4..1307c2893 100644
--- a/Zend/tests/concat_001.phpt
+++ b/Zend/tests/concat_001.phpt
@@ -50,26 +50,46 @@ var_dump($d.$d);
echo "Done\n";
?>
--EXPECTF--
+
+Notice: Array to string conversion in %sconcat_001.php on line %d
string(24) "Arraythis is test object"
+
+Notice: Array to string conversion in %sconcat_001.php on line %d
string(16) "Arraysome string"
+
+Notice: Array to string conversion in %sconcat_001.php on line %d
string(8) "Array222"
+
+Notice: Array to string conversion in %sconcat_001.php on line %d
string(13) "Array2323.444"
+
+Notice: Array to string conversion in %sconcat_001.php on line %d
+
+Notice: Array to string conversion in %sconcat_001.php on line %d
string(10) "ArrayArray"
+
+Notice: Array to string conversion in %sconcat_001.php on line %d
string(24) "this is test objectArray"
string(30) "this is test objectsome string"
string(22) "this is test object222"
string(27) "this is test object2323.444"
string(38) "this is test objectthis is test object"
string(30) "some stringthis is test object"
+
+Notice: Array to string conversion in %sconcat_001.php on line %d
string(16) "some stringArray"
string(14) "some string222"
string(19) "some string2323.444"
string(22) "some stringsome string"
+
+Notice: Array to string conversion in %sconcat_001.php on line %d
string(8) "222Array"
string(22) "222this is test object"
string(14) "222some string"
string(11) "2222323.444"
string(6) "222222"
+
+Notice: Array to string conversion in %sconcat_001.php on line %d
string(13) "2323.444Array"
string(27) "2323.444this is test object"
string(19) "2323.444some string"
diff --git a/Zend/tests/constants_005.phpt b/Zend/tests/constants_005.phpt
index 55f90fd94..d2a205b78 100755
--- a/Zend/tests/constants_005.phpt
+++ b/Zend/tests/constants_005.phpt
@@ -7,5 +7,6 @@ define("ZEND_THREAD_safe", 123);
var_dump(ZEND_THREAD_safe);
?>
--EXPECTF--
-bool(%s)
+Notice: Use of undefined constant ZEND_THREAD_safe - assumed 'ZEND_THREAD_safe' in %s on line %d
+string(16) "ZEND_THREAD_safe"
int(123)
diff --git a/Zend/tests/debug_backtrace_limit.phpt b/Zend/tests/debug_backtrace_limit.phpt
new file mode 100644
index 000000000..985c2cccb
--- /dev/null
+++ b/Zend/tests/debug_backtrace_limit.phpt
@@ -0,0 +1,133 @@
+--TEST--
+debug_backtrace limit
+--FILE--
+<?php
+function a() {
+ b();
+}
+
+function b() {
+ c();
+}
+
+function c() {
+ print_r(debug_backtrace(0, 1));
+ print_r(debug_backtrace(0, 2));
+ print_r(debug_backtrace(0, 0));
+ print_r(debug_backtrace(0, 4));
+}
+
+a();
+?>
+--EXPECTF--
+Array
+(
+ [0] => Array
+ (
+ [file] => %sdebug_backtrace_limit.php
+ [line] => 7
+ [function] => c
+ [args] => Array
+ (
+ )
+
+ )
+
+)
+Array
+(
+ [0] => Array
+ (
+ [file] => %sdebug_backtrace_limit.php
+ [line] => 7
+ [function] => c
+ [args] => Array
+ (
+ )
+
+ )
+
+ [1] => Array
+ (
+ [file] => %sdebug_backtrace_limit.php
+ [line] => 3
+ [function] => b
+ [args] => Array
+ (
+ )
+
+ )
+
+)
+Array
+(
+ [0] => Array
+ (
+ [file] => %sdebug_backtrace_limit.php
+ [line] => 7
+ [function] => c
+ [args] => Array
+ (
+ )
+
+ )
+
+ [1] => Array
+ (
+ [file] => %sdebug_backtrace_limit.php
+ [line] => 3
+ [function] => b
+ [args] => Array
+ (
+ )
+
+ )
+
+ [2] => Array
+ (
+ [file] => %sdebug_backtrace_limit.php
+ [line] => 17
+ [function] => a
+ [args] => Array
+ (
+ )
+
+ )
+
+)
+Array
+(
+ [0] => Array
+ (
+ [file] => %sdebug_backtrace_limit.php
+ [line] => 7
+ [function] => c
+ [args] => Array
+ (
+ )
+
+ )
+
+ [1] => Array
+ (
+ [file] => %sdebug_backtrace_limit.php
+ [line] => 3
+ [function] => b
+ [args] => Array
+ (
+ )
+
+ )
+
+ [2] => Array
+ (
+ [file] => %sdebug_backtrace_limit.php
+ [line] => 17
+ [function] => a
+ [args] => Array
+ (
+ )
+
+ )
+
+)
diff --git a/Zend/tests/debug_backtrace_options.phpt b/Zend/tests/debug_backtrace_options.phpt
index 1b2d7e548..1b2d7e548 100755..100644
--- a/Zend/tests/debug_backtrace_options.phpt
+++ b/Zend/tests/debug_backtrace_options.phpt
diff --git a/Zend/tests/debug_print_backtrace_limit.phpt b/Zend/tests/debug_print_backtrace_limit.phpt
new file mode 100644
index 000000000..5100387bd
--- /dev/null
+++ b/Zend/tests/debug_print_backtrace_limit.phpt
@@ -0,0 +1,31 @@
+--TEST--
+debug_print_backtrace limit
+--FILE--
+<?php
+function a() {
+ b();
+}
+
+function b() {
+ c();
+}
+
+function c() {
+ debug_print_backtrace(0, 1);
+ debug_print_backtrace(0, 2);
+ debug_print_backtrace(0, 0);
+ debug_print_backtrace(0, 4);
+}
+
+a();
+?>
+--EXPECTF--
+#0 c() called at [%sdebug_print_backtrace_limit.php:7]
+#0 c() called at [%sdebug_print_backtrace_limit.php:7]
+#1 b() called at [%sdebug_print_backtrace_limit.php:3]
+#0 c() called at [%sdebug_print_backtrace_limit.php:7]
+#1 b() called at [%sdebug_print_backtrace_limit.php:3]
+#2 a() called at [%sdebug_print_backtrace_limit.php:17]
+#0 c() called at [%sdebug_print_backtrace_limit.php:7]
+#1 b() called at [%sdebug_print_backtrace_limit.php:3]
+#2 a() called at [%sdebug_print_backtrace_limit.php:17]
diff --git a/Zend/tests/declare_001.phpt b/Zend/tests/declare_001.phpt
index 14c9a453d..21d797880 100644
--- a/Zend/tests/declare_001.phpt
+++ b/Zend/tests/declare_001.phpt
@@ -2,21 +2,29 @@
Testing declare statement with several type values
--SKIPIF--
<?php
-if (in_array("detect_unicode", array_keys(ini_get_all()))) {
- die("skip");
+if (!extension_loaded("mbstring")) {
+ die("skip Requires ext/mbstring");
}
?>
+--INI--
+zend.multibyte=1
--FILE--
<?php
declare(encoding = 1);
-declare(encoding = 1123131232131312321);
+declare(encoding = 112313123213131232100);
declare(encoding = NULL);
-declare(encoding = M_PI);
declare(encoding = 'utf-8');
+declare(encoding = M_PI);
print 'DONE';
?>
---EXPECT--
-DONE
+--EXPECTF--
+Warning: Unsupported encoding [1] in %sdeclare_001.php on line %d
+
+Warning: Unsupported encoding [1.1231312321313E+20] in %sdeclare_001.php on line %d
+
+Warning: Unsupported encoding [] in %sdeclare_001.php on line %d
+
+Fatal error: Cannot use constants as encoding in %sdeclare_001.php on line %d
diff --git a/Zend/tests/declare_002.phpt b/Zend/tests/declare_002.phpt
new file mode 100644
index 000000000..19844556f
--- /dev/null
+++ b/Zend/tests/declare_002.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Testing declare statement with several type values
+--SKIPIF--
+<?php
+if (!ini_get("zend.multibyte")) {
+ die("skip Requires zend.multibyte=1");
+}
+if (!extension_loaded("mbstring")) {
+ die("skip Requires ext/mbstring");
+}
+?>
+--FILE--
+<?php
+
+declare(encoding = 1);
+declare(encoding = 1123131232131312321);
+declare(encoding = NULL);
+declare(encoding = 'utf-8');
+declare(encoding = M_PI);
+
+print 'DONE';
+
+?>
+--EXPECTF--
+Warning: Unsupported encoding [%d] in %sdeclare_002.php on line 3
+
+Warning: Unsupported encoding [%f] in %sdeclare_002.php on line 4
+
+Warning: Unsupported encoding [] in %sdeclare_002.php on line 5
+
+Fatal error: Cannot use constants as encoding in %sdeclare_002.php on line 7
diff --git a/Zend/tests/declare_003.phpt b/Zend/tests/declare_003.phpt
new file mode 100644
index 000000000..2980f7589
--- /dev/null
+++ b/Zend/tests/declare_003.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Testing declare statement with several type values
+--INI--
+precision=15
+zend.multibyte=1
+--FILE--
+<?php
+
+declare(encoding = 1);
+declare(encoding = 11111111111111);
+declare(encoding = NULL);
+declare(encoding = M_PI);
+
+print 'DONE';
+
+?>
+--EXPECTF--
+Warning: Unsupported encoding [1] in %sdeclare_003.php on line %d
+
+Warning: Unsupported encoding [11111111111111] in %sdeclare_003.php on line %d
+
+Warning: Unsupported encoding [] in %sdeclare_003.php on line %d
+
+Fatal error: Cannot use constants as encoding in %sdeclare_003.php on line %d
diff --git a/Zend/tests/declare_004.phpt b/Zend/tests/declare_004.phpt
new file mode 100644
index 000000000..a2ba51ac9
--- /dev/null
+++ b/Zend/tests/declare_004.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Testing declare statement with several type values
+--SKIPIF--
+<?php
+if (!ini_get("zend.multibyte")) {
+ die("skip Requires zend.multibyte=1");
+}
+?>
+--FILE--
+<?php
+
+declare(encoding = 1);
+declare(encoding = 1123131232131312321);
+declare(encoding = NULL);
+declare(encoding = M_PI);
+
+print 'DONE';
+
+?>
+--EXPECTF--
+Warning: Unsupported encoding [%d] in %sdeclare_004.php on line 3
+
+Warning: Unsupported encoding [%f] in %sdeclare_004.php on line 4
+
+Warning: Unsupported encoding [] in %sdeclare_004.php on line 5
+
+Fatal error: Cannot use constants as encoding in %sdeclare_004.php on line 6
diff --git a/Zend/tests/dereference_001.phpt b/Zend/tests/dereference_001.phpt
new file mode 100644
index 000000000..e09ad2992
--- /dev/null
+++ b/Zend/tests/dereference_001.phpt
@@ -0,0 +1,51 @@
+--TEST--
+Testing array dereference
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+function a() {
+ return array(1,array(5));
+}
+var_dump(a()[1][0]); // int(5)
+
+function b() {
+ return array();
+}
+var_dump(b()[0]); // Notice: Undefined offset: 0
+
+class foo {
+ public $y = 1;
+
+ public function test() {
+ return array(array(array('foobar')));
+ }
+}
+
+function c() {
+ return array(new foo);
+}
+var_dump(c()[0]->y); // int(1)
+
+function d() {
+ $obj = new foo;
+ return $obj->test();
+}
+var_dump(d()[0][0][0][3]); // string(1) "b"
+
+function e() {
+ $y = 'bar';
+ $x = array('a' => 'foo', 'b' => $y);
+ return $x;
+}
+var_dump(e()['b']); // string(3) "bar"
+
+?>
+--EXPECTF--
+int(5)
+
+Notice: Undefined offset: 0 in %s on line %d
+NULL
+int(1)
+string(1) "b"
+string(3) "bar"
diff --git a/Zend/tests/dereference_002.phpt b/Zend/tests/dereference_002.phpt
new file mode 100644
index 000000000..022ff370d
--- /dev/null
+++ b/Zend/tests/dereference_002.phpt
@@ -0,0 +1,79 @@
+--TEST--
+Testing array dereference on method calls
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+class foo {
+ public function bar() {
+ $x = array();
+ $x[] = 3;
+ $x[] = array(1, 5);
+ $x[] = new foo;
+ return $x;
+ }
+}
+
+$foo = new foo;
+
+var_dump($x = $foo->bar()[1]);
+var_dump($foo->bar()[1][1]);
+var_dump($x[0]);
+var_dump($x = $foo->bar()[2]);
+var_dump($x->bar());
+var_dump($x->bar()[0]);
+
+$x = array();
+$x[] = new foo;
+var_dump($x[0]->bar()[2]);
+var_dump($foo->bar()[2]->bar()[1]);
+var_dump($foo->bar()[2]->bar()[2]->bar()[1][0]);
+var_dump($foo->bar()[2]->bar()[2]->bar()[1][0][1]);
+var_dump($foo->bar()[2]->bar()[2]->bar()[4]);
+var_dump($foo->bar()[3]->bar());
+
+?>
+--EXPECTF--
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+}
+int(5)
+int(1)
+object(foo)#2 (0) {
+}
+array(3) {
+ [0]=>
+ int(3)
+ [1]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+ }
+ [2]=>
+ object(foo)#3 (0) {
+ }
+}
+int(3)
+object(foo)#3 (0) {
+}
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(5)
+}
+int(1)
+NULL
+
+Notice: Undefined offset: 4 in %s on line %d
+NULL
+
+Notice: Undefined offset: 3 in %s on line %d
+
+Fatal error: Call to a member function bar() on a non-object in %s on line %d
diff --git a/Zend/tests/dereference_003.phpt b/Zend/tests/dereference_003.phpt
new file mode 100644
index 000000000..3a5487596
--- /dev/null
+++ b/Zend/tests/dereference_003.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Testing array dereference on method calls
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+class foo {
+ public $x = 2;
+ public function a() {
+ $x = array();
+ $x[] = new foo;
+ return $x;
+ }
+ public function b() {
+ return array(1.2, array(new self));
+ }
+ public function c() {
+ $a = array();
+ $b = &$a;
+ $b[] = true;
+ return $a;
+ }
+ public function d() {
+ return $this->b();
+ }
+}
+
+$foo = new foo;
+
+var_dump($foo->a()[0]->x);
+var_dump($foo->a()[0]);
+var_dump($foo->b()[1][0]->a()[0]->x);
+var_dump($foo->c()[0]);
+var_dump($foo->d()[0]);
+
+?>
+--EXPECTF--
+int(2)
+object(foo)#%d (1) {
+ ["x"]=>
+ int(2)
+}
+int(2)
+bool(true)
+float(1.2)
diff --git a/Zend/tests/dereference_004.phpt b/Zend/tests/dereference_004.phpt
new file mode 100644
index 000000000..a77cf032e
--- /dev/null
+++ b/Zend/tests/dereference_004.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Testing array dereference on __invoke() result
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+class foo {
+ public $x = array();
+ public function __construct() {
+ $h = array();
+ $h[] = new stdclass;
+ $this->x = $h;
+ }
+ public function __invoke() {
+ return $this->x;
+ }
+}
+
+
+$fo = new foo;
+var_dump($fo()[0]);
+
+?>
+--EXPECTF--
+object(stdClass)#%d (0) {
+}
diff --git a/Zend/tests/dereference_005.phpt b/Zend/tests/dereference_005.phpt
new file mode 100644
index 000000000..cca87571c
--- /dev/null
+++ b/Zend/tests/dereference_005.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Testing array dereference on object that implements ArrayAccess
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+class obj implements arrayaccess {
+ private $container = array();
+ public function __construct() {
+ $this->container = array(
+ "one" => 1,
+ "two" => 2,
+ "three" => 3,
+ );
+ }
+ public function offsetSet($offset, $value) {
+ $this->container[$offset] = $value;
+ }
+ public function offsetExists($offset) {
+ return isset($this->container[$offset]);
+ }
+ public function offsetUnset($offset) {
+ unset($this->container[$offset]);
+ }
+ public function offsetGet($offset) {
+ return isset($this->container[$offset]) ? $this->container[$offset] : null;
+ }
+}
+
+function x() {
+ return new obj;
+}
+var_dump(x()['two']);
+
+?>
+--EXPECT--
+int(2)
diff --git a/Zend/tests/dereference_006.phpt b/Zend/tests/dereference_006.phpt
new file mode 100644
index 000000000..61a07353a
--- /dev/null
+++ b/Zend/tests/dereference_006.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Testing array dereference and references
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+function &foo(&$foo) {
+ return $foo;
+}
+
+$a = array(1);
+foo($a)[0] = 2;
+var_dump($a);
+
+foo($a)[] = 3;
+var_dump($a);
+
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ int(2)
+}
+array(2) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
diff --git a/Zend/tests/dereference_007.phpt b/Zend/tests/dereference_007.phpt
new file mode 100644
index 000000000..2f7d66fd2
--- /dev/null
+++ b/Zend/tests/dereference_007.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Trying to write on method return
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+class foo {
+ public $x = array();
+
+ public function b() {
+ return $this->x;
+ }
+
+ public function c() {
+ return $x;
+ }
+
+ static public function d() {
+
+ }
+}
+
+$foo = new foo;
+
+$foo->b()[0] = 1;
+
+$foo->c()[100] = 2;
+
+foo::d()[] = 3;
+
+print "ok\n";
+
+?>
+--EXPECTF--
+Notice: Undefined variable: x in %s on line %d
+ok
diff --git a/Zend/tests/dereference_008.phpt b/Zend/tests/dereference_008.phpt
new file mode 100644
index 000000000..01c828f0c
--- /dev/null
+++ b/Zend/tests/dereference_008.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Testing array dereference with dynamic method name and references
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+class foo {
+ public $x = array(1);
+
+ public function &b() {
+ return $this->x;
+ }
+}
+
+$foo = new foo;
+
+$a = 'b';
+var_dump($foo->$a()[0]);
+
+$h = &$foo->$a();
+$h[] = 2;
+var_dump($foo->$a());
+
+?>
+--EXPECT--
+int(1)
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
diff --git a/Zend/tests/dereference_009.phpt b/Zend/tests/dereference_009.phpt
new file mode 100644
index 000000000..e579c44ba
--- /dev/null
+++ b/Zend/tests/dereference_009.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Testing array dereference with references
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+$a = array();
+
+function &a() {
+ return $GLOBALS['a'];
+}
+
+var_dump($h =& a());
+$h[] = 1;
+var_dump(a()[0]);
+
+$h[] = array($h);
+var_dump(a()[1][0][0]);
+
+?>
+--EXPECT--
+array(0) {
+}
+int(1)
+int(1)
diff --git a/Zend/tests/dereference_010.phpt b/Zend/tests/dereference_010.phpt
new file mode 100644
index 000000000..6acda77ba
--- /dev/null
+++ b/Zend/tests/dereference_010.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Testing dereference in non-array values
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+function a() {
+ return 1;
+}
+
+$a = 1;
+var_dump($a[1]);
+var_dump(a()[1]);
+
+function b() {
+ return new stdClass;
+}
+
+var_dump(b()[1]);
+
+?>
+--EXPECTF--
+NULL
+NULL
+
+Fatal error: Cannot use object of type stdClass as array in %s on line %d
diff --git a/Zend/tests/dereference_011.phpt b/Zend/tests/dereference_011.phpt
new file mode 100644
index 000000000..17dc8b346
--- /dev/null
+++ b/Zend/tests/dereference_011.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Testing array dereference with chaining
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+class foo {
+ public $arr;
+
+ public function &a() {
+ return $this->arr;
+ }
+}
+
+$foo = new foo;
+
+$h = &$foo->a();
+$h[] = 1;
+$h[] = $foo;
+var_dump($foo->a()[1]->arr[1]->a()[1]->arr[1]->arr[0]);
+var_dump($foo->a()[1]);
+var_dump($foo->a()[1]->arr[1]);
+
+?>
+--EXPECTF--
+int(1)
+object(foo)#%d (1) {
+ ["arr"]=>
+ &array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ *RECURSION*
+ }
+}
+object(foo)#%d (1) {
+ ["arr"]=>
+ &array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ *RECURSION*
+ }
+}
diff --git a/Zend/tests/dereference_012.phpt b/Zend/tests/dereference_012.phpt
new file mode 100644
index 000000000..f3ba774f0
--- /dev/null
+++ b/Zend/tests/dereference_012.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Testing array dereferencing on return of a method with and without reference
+--FILE--
+<?php
+
+class foo {
+ static $x = array();
+
+ public function &a() {
+ self::$x = array(1, 2, 3);
+ return self::$x;
+ }
+
+ public function b() {
+ $x = array(1);
+ $x[] = 2;
+ return $x;
+ }
+}
+
+$foo = new foo;
+
+// Changing the static variable
+$foo->a()[0] = 2;
+var_dump($foo::$x);
+
+$foo->b()[] = new stdClass;
+
+$h = $foo->b();
+var_dump($h);
+
+$h[0] = 3;
+var_dump($h);
+
+?>
+--EXPECT--
+array(3) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+}
+array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+}
+array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(2)
+}
diff --git a/Zend/tests/dereference_013.phpt b/Zend/tests/dereference_013.phpt
new file mode 100644
index 000000000..cfd89e71b
--- /dev/null
+++ b/Zend/tests/dereference_013.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Testing array dereferencing on array returned from __call method
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+class foo {
+ public $x = array(2);
+
+ public function __call($x, $y) {
+ if (count($this->x) == 1) {
+ $this->x[] = $y[0];
+ }
+ return $this->x;
+ }
+}
+
+$foo = new foo;
+
+$x = array(1);
+
+$foo->b($x)[1] = 3;
+
+var_dump($foo->b()[0]);
+var_dump($foo->b()[1]);
+var_dump($foo->b()[2]);
+
+?>
+--EXPECTF--
+int(2)
+array(1) {
+ [0]=>
+ int(1)
+}
+
+Notice: Undefined offset: %d in %s on line %d
+NULL
diff --git a/Zend/tests/dereference_014.phpt b/Zend/tests/dereference_014.phpt
new file mode 100644
index 000000000..62dffd369
--- /dev/null
+++ b/Zend/tests/dereference_014.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Trying to create an object from dereferencing uninitialized variable
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+class foo {
+ public $x;
+ static public $y;
+
+ public function a() {
+ return $this->x;
+ }
+
+ static public function b() {
+ return self::$y;
+ }
+}
+
+$foo = new foo;
+$h = $foo->a()[0]->a;
+var_dump($h);
+
+$h = foo::b()[1]->b;
+var_dump($h);
+
+?>
+--EXPECTF--
+Notice: Trying to get property of non-object in %s on line %d
+NULL
+
+Notice: Trying to get property of non-object in %s on line %d
+NULL
diff --git a/Zend/tests/empty_str_offset.phpt b/Zend/tests/empty_str_offset.phpt
new file mode 100644
index 000000000..486c052dc
--- /dev/null
+++ b/Zend/tests/empty_str_offset.phpt
@@ -0,0 +1,89 @@
+--TEST--
+Testing empty() with string offsets
+--FILE--
+<?php
+
+print "- empty ---\n";
+
+$str = "test0123";
+
+var_dump(empty($str[-1]));
+var_dump(empty($str[0]));
+var_dump(empty($str[1]));
+var_dump(empty($str[4])); // 0
+var_dump(empty($str[5])); // 1
+var_dump(empty($str[8]));
+var_dump(empty($str[10000]));
+// non-numeric offsets
+print "- string ---\n";
+var_dump(empty($str['-1']));
+var_dump(empty($str['0']));
+var_dump(empty($str['1']));
+var_dump(empty($str['4'])); // 0
+var_dump(empty($str['1.5']));
+var_dump(empty($str['good']));
+var_dump(empty($str['3 and a half']));
+print "- bool ---\n";
+var_dump(empty($str[true]));
+var_dump(empty($str[false]));
+var_dump(empty($str[false][true]));
+print "- null ---\n";
+var_dump(empty($str[null]));
+print "- double ---\n";
+var_dump(empty($str[-1.1]));
+var_dump(empty($str[-0.8]));
+var_dump(empty($str[-0.1]));
+var_dump(empty($str[0.2]));
+var_dump(empty($str[0.9]));
+var_dump(empty($str[M_PI]));
+var_dump(empty($str[100.5001]));
+print "- array ---\n";
+var_dump(empty($str[array()]));
+var_dump(empty($str[array(1,2,3)]));
+print "- object ---\n";
+var_dump(empty($str[new stdClass()]));
+print "- resource ---\n";
+$f = fopen(__FILE__, 'r');
+var_dump(empty($str[$f]));
+print "done\n";
+
+?>
+--EXPECTF--
+- empty ---
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+bool(false)
+bool(true)
+bool(true)
+- string ---
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+- bool ---
+bool(false)
+bool(false)
+bool(true)
+- null ---
+bool(false)
+- double ---
+bool(true)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(true)
+- array ---
+bool(true)
+bool(true)
+- object ---
+bool(true)
+- resource ---
+bool(true)
+done
diff --git a/Zend/tests/error_reporting01.phpt b/Zend/tests/error_reporting01.phpt
index 096977065..5153d41ea 100644
--- a/Zend/tests/error_reporting01.phpt
+++ b/Zend/tests/error_reporting01.phpt
@@ -22,5 +22,5 @@ var_dump(error_reporting());
echo "Done\n";
?>
--EXPECT--
-int(30719)
+int(32767)
Done
diff --git a/Zend/tests/error_reporting05.phpt b/Zend/tests/error_reporting05.phpt
index 2bf392d7c..fe5374c4f 100644
--- a/Zend/tests/error_reporting05.phpt
+++ b/Zend/tests/error_reporting05.phpt
@@ -30,5 +30,5 @@ echo "Done\n";
Notice: Undefined variable: undef_value in %s on line %d
Notice: Undefined variable: undef_name in %s on line %d
-int(30719)
+int(32767)
Done
diff --git a/Zend/tests/error_reporting06.phpt b/Zend/tests/error_reporting06.phpt
index beb91bf09..285a623f2 100644
--- a/Zend/tests/error_reporting06.phpt
+++ b/Zend/tests/error_reporting06.phpt
@@ -26,5 +26,5 @@ var_dump(error_reporting());
echo "Done\n";
?>
--EXPECTF--
-int(30719)
+int(32767)
Done
diff --git a/Zend/tests/error_reporting07.phpt b/Zend/tests/error_reporting07.phpt
index 5da970c15..c63efae60 100644
--- a/Zend/tests/error_reporting07.phpt
+++ b/Zend/tests/error_reporting07.phpt
@@ -26,5 +26,5 @@ var_dump(error_reporting());
echo "Done\n";
?>
--EXPECTF--
-int(30719)
+int(32767)
Done
diff --git a/Zend/tests/error_reporting10.phpt b/Zend/tests/error_reporting10.phpt
index 7205acda3..12b1db57b 100644
--- a/Zend/tests/error_reporting10.phpt
+++ b/Zend/tests/error_reporting10.phpt
@@ -30,6 +30,6 @@ var_dump(error_reporting());
echo "Done\n";
?>
--EXPECTF--
-int(30719)
-int(30711)
+int(32767)
+int(32759)
Done
diff --git a/Zend/tests/fr47160.phpt b/Zend/tests/fr47160.phpt
new file mode 100644
index 000000000..809e1f160
--- /dev/null
+++ b/Zend/tests/fr47160.phpt
@@ -0,0 +1,150 @@
+--TEST--
+Calling method from array
+--FILE--
+<?php
+
+class Hello {
+ public function world($x) {
+ echo "Hello, $x\n"; return $this;
+ }
+}
+
+class Hello2 {
+ static public function world($x) {
+ echo "Hello, $x\n";
+ }
+}
+
+class Magic {
+ public function __call($f, $a) {
+ printf("%s called (%s)!\n", __METHOD__, $f);
+ }
+}
+
+class Magic2 {
+ public static function __callStatic($f, $a) {
+ printf("%s called (%s)!\n", __METHOD__, $f);
+ }
+}
+
+class Magic3 {
+ public static function __callStatic($f, $a) {
+ printf("%s called (%s)!\n", __METHOD__, $f);
+ }
+ public function __call($f, $a) {
+ printf("%s called (%s)!\n", __METHOD__, $f);
+ }
+}
+
+$f = array('Hello','world');
+var_dump($f('you'));
+var_dump(call_user_func($f, 'you'));
+
+printf("-----\n");
+
+$h= new Hello;
+$f = array($h,'world');
+var_dump($f('again'));
+var_dump(call_user_func($f, 'again'));
+
+printf("-----\n");
+
+function bar() {
+ return array(new Hello,'world');
+}
+$f = bar();
+var_dump($f('there'));
+var_dump(call_user_func($f, 'there'));
+
+printf("-----\n");
+
+$x = function ($c,$v) { return array($c, $v); };
+
+$c = new Hello;
+$m = 'world';
+$f = $x($c, $m);
+var_dump($f('devs'));
+var_dump(call_user_func($f, 'devs'));
+
+printf("-----\n");
+
+$f = array(new Magic, 'foo');
+$f();
+call_user_func($f);
+
+printf("-----\n");
+
+$f = array('Magic2', 'foo');
+$f();
+call_user_func($f);
+
+
+printf("-----\n");
+
+$f = array('Magic3', 'foo');
+$f();
+call_user_func($f);
+
+printf("-----\n");
+
+$f = array(new Magic3, 'foo');
+$f();
+call_user_func($f);
+
+printf("-----\n");
+
+$f = array(new Hello2, 'world');
+var_dump($f('you'));
+var_dump(call_user_func($f, 'you'));
+
+?>
+--EXPECTF--
+Strict Standards: Non-static method Hello::world() should not be called statically in %s on line %d
+Hello, you
+
+Notice: Undefined variable: this in %s on line %d
+NULL
+
+Strict Standards: call_user_func() expects parameter 1 to be a valid callback, non-static method Hello::world() should not be called statically in %s on line %d
+Hello, you
+
+Notice: Undefined variable: this in %s on line %d
+NULL
+-----
+Hello, again
+object(Hello)#1 (0) {
+}
+Hello, again
+object(Hello)#1 (0) {
+}
+-----
+Hello, there
+object(Hello)#2 (0) {
+}
+Hello, there
+object(Hello)#2 (0) {
+}
+-----
+Hello, devs
+object(Hello)#4 (0) {
+}
+Hello, devs
+object(Hello)#4 (0) {
+}
+-----
+Magic::__call called (foo)!
+Magic::__call called (foo)!
+-----
+Magic2::__callStatic called (foo)!
+Magic2::__callStatic called (foo)!
+-----
+Magic3::__callStatic called (foo)!
+Magic3::__callStatic called (foo)!
+-----
+Magic3::__call called (foo)!
+Magic3::__call called (foo)!
+-----
+Hello, you
+NULL
+Hello, you
+NULL
diff --git a/Zend/tests/function_arguments_001.phpt b/Zend/tests/function_arguments_001.phpt
index bf0cd4a20..8e3d34d31 100644
--- a/Zend/tests/function_arguments_001.phpt
+++ b/Zend/tests/function_arguments_001.phpt
@@ -5,5 +5,5 @@ Argument parsing error #001
function foo($arg1 string) {}
?>
--EXPECTF--
-Parse error: syntax error, unexpected T_STRING, expecting ')' in %sfunction_arguments_001.php on line %d
+Parse error: %s error, %s)%s in %sfunction_arguments_001.php on line %d
diff --git a/Zend/tests/function_arguments_002.phpt b/Zend/tests/function_arguments_002.phpt
index 79dd31f33..1b5b7bd90 100644
--- a/Zend/tests/function_arguments_002.phpt
+++ b/Zend/tests/function_arguments_002.phpt
@@ -5,5 +5,5 @@ Argument parsing error #002
function foo($arg1/) {}
?>
--EXPECTF--
-Parse error: syntax error, unexpected '/', expecting ')' in %sfunction_arguments_002.php on line %d
+Parse error: %s error, %s)%s in %sfunction_arguments_002.php on line %d
diff --git a/Zend/tests/gc_022.phpt b/Zend/tests/gc_022.phpt
index 5d7bb8494..cb9e50a43 100644
--- a/Zend/tests/gc_022.phpt
+++ b/Zend/tests/gc_022.phpt
@@ -7,7 +7,7 @@ zend.enable_gc=1
<?php
$a = array(array());
$a[0][0] =& $a[0];
-$s = array(1) + unserialize(serialize(&$a[0]));
+$s = array(1) + unserialize(serialize($a[0]));
var_dump(gc_collect_cycles());
echo "ok\n"
?>
diff --git a/Zend/tests/indexing_001.phpt b/Zend/tests/indexing_001.phpt
index 83c2c8d52..0e466ab8c 100644
--- a/Zend/tests/indexing_001.phpt
+++ b/Zend/tests/indexing_001.phpt
@@ -71,6 +71,8 @@ array(1) {
}
}
+Warning: Illegal string offset 'foo' in %s on line %d
+
Notice: Array to string conversion in %s on line %d
string(1) "A"
diff --git a/Zend/tests/indirect_call_array_001.phpt b/Zend/tests/indirect_call_array_001.phpt
new file mode 100644
index 000000000..56675b81a
--- /dev/null
+++ b/Zend/tests/indirect_call_array_001.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Indirect method call by array - Invalid class name
+--FILE--
+<?php
+
+$arr = array('a', 'b');
+$arr();
+
+?>
+--EXPECTF--
+Fatal error: Class 'a' not found in %s on line %d
diff --git a/Zend/tests/indirect_call_array_002.phpt b/Zend/tests/indirect_call_array_002.phpt
new file mode 100644
index 000000000..013fa559f
--- /dev/null
+++ b/Zend/tests/indirect_call_array_002.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Indirect method call by array - Invalid method name
+--FILE--
+<?php
+
+$arr = array('stdclass', 'b');
+$arr();
+
+?>
+--EXPECTF--
+Fatal error: Call to undefined method stdClass::b() in %s on line %d
diff --git a/Zend/tests/indirect_call_array_003.phpt b/Zend/tests/indirect_call_array_003.phpt
new file mode 100644
index 000000000..498c580c4
--- /dev/null
+++ b/Zend/tests/indirect_call_array_003.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Indirect method call by array - Calling __call() and __callStatic()
+--FILE--
+<?php
+
+class foo {
+ public function __call($a, $b) {
+ printf("From %s:\n", __METHOD__);
+ var_dump($a);
+ var_dump($this);
+ }
+ static public function __callStatic($a, $b) {
+ printf("From %s:\n", __METHOD__);
+ var_dump($a);
+ var_dump($this);
+ }
+}
+
+$arr = array('foo', 'abc');
+$arr();
+
+$foo = new foo;
+$arr = array($foo, 'abc');
+$arr();
+
+
+?>
+--EXPECTF--
+From foo::__callStatic:
+string(3) "abc"
+
+Notice: Undefined variable: this in %s on line %d
+NULL
+From foo::__call:
+string(3) "abc"
+object(foo)#%d (0) {
+}
+
diff --git a/Zend/tests/indirect_call_array_004.phpt b/Zend/tests/indirect_call_array_004.phpt
new file mode 100644
index 000000000..350f72064
--- /dev/null
+++ b/Zend/tests/indirect_call_array_004.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Indirect method call by array - Testing exception and method magics
+--FILE--
+<?php
+
+class foo {
+ static public function abc() {
+ throw new Exception('foo');
+ }
+ public function __call($a, $b) {
+ printf("From %s:\n", __METHOD__);
+ throw new Exception($a);
+ }
+ static public function __callStatic($a, $b) {
+ printf("From %s:\n", __METHOD__);
+ throw new Exception($a);
+ }
+}
+
+
+$arr = array('foo', 'abc');
+
+try {
+ $arr();
+}
+catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+$arr = array('foo', '123');
+
+try {
+ $arr();
+}
+catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+
+echo "------\n";
+
+$foo = new foo;
+$arr = array($foo, 'abc');
+
+try {
+ $arr();
+}
+catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+
+$foo = new foo;
+$arr = array($foo, '123');
+
+try {
+ $arr();
+}
+catch (Exception $e) {
+ echo $e->getMessage(), "\n";
+}
+
+?>
+--EXPECTF--
+foo
+From foo::__callStatic:
+123
+------
+foo
+From foo::__call:
+123
diff --git a/Zend/tests/indirect_method_call_001.phpt b/Zend/tests/indirect_method_call_001.phpt
new file mode 100644
index 000000000..7018eaa74
--- /dev/null
+++ b/Zend/tests/indirect_method_call_001.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Testing indirect method call and exceptions
+--FILE--
+<?php
+
+class foo {
+ public function __construct() {
+ throw new Exception('foobar');
+ }
+}
+
+try {
+ $X = (new foo)->Inexistent(3);
+} catch (Exception $e) {
+ var_dump($e->getMessage()); // foobar
+}
+
+?>
+--EXPECT--
+string(6) "foobar"
diff --git a/Zend/tests/indirect_method_call_002.phpt b/Zend/tests/indirect_method_call_002.phpt
new file mode 100644
index 000000000..1589533bd
--- /dev/null
+++ b/Zend/tests/indirect_method_call_002.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Indirect method call with chaining
+--FILE--
+<?php
+
+class foo {
+ public $x = 'testing';
+
+ public function bar() {
+ return "foo";
+ }
+ public function baz() {
+ return new self;
+ }
+ static function xyz() {
+ }
+}
+
+var_dump((new foo())->bar()); // string(3) "foo"
+var_dump((new foo())->baz()->x); // string(7) "testing"
+var_dump((new foo())->baz()->baz()->bar()); // string(3) "foo"
+var_dump((new foo())->xyz()); // NULL
+(new foo())->www();
+
+?>
+--EXPECTF--
+string(3) "foo"
+string(7) "testing"
+string(3) "foo"
+NULL
+
+Fatal error: Call to undefined method foo::www() in %s on line %d
diff --git a/Zend/tests/indirect_method_call_003.phpt b/Zend/tests/indirect_method_call_003.phpt
new file mode 100644
index 000000000..3df495422
--- /dev/null
+++ b/Zend/tests/indirect_method_call_003.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Testing indirect method call
+--FILE--
+<?php
+
+class foo {
+ public $x = 1;
+
+ public function getX() {
+ return $this->x;
+ }
+ public function setX($val) {
+ $this->x = $val;
+ return $this;
+ }
+}
+
+$X = (new foo)->setX(10)->getX();
+var_dump($X); // int(10)
+
+?>
+--EXPECT--
+int(10)
diff --git a/Zend/tests/indirect_method_call_004.phpt b/Zend/tests/indirect_method_call_004.phpt
new file mode 100644
index 000000000..689600d1f
--- /dev/null
+++ b/Zend/tests/indirect_method_call_004.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Indirect method call and cloning
+--FILE--
+<?php
+
+
+class bar {
+ public $z;
+
+ public function __construct() {
+ $this->z = new stdclass;
+ }
+ public function getZ() {
+ return $this->z;
+ }
+}
+
+var_dump(clone (new bar)->z);
+var_dump(clone (new bar)->getZ());
+
+?>
+--EXPECTF--
+object(stdClass)#%d (0) {
+}
+object(stdClass)#%d (0) {
+}
diff --git a/Zend/tests/indirect_method_call_005.phpt b/Zend/tests/indirect_method_call_005.phpt
new file mode 100644
index 000000000..4f4b3631c
--- /dev/null
+++ b/Zend/tests/indirect_method_call_005.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Testing array dereferencing from instance with ArrayObject
+--FILE--
+<?php
+
+class foo extends ArrayObject {
+ public function __construct($arr) {
+ parent::__construct($arr);
+ }
+}
+
+var_dump( (new foo( array(1, array(4, 5), 3) ))[1][0] ); // int(4)
+
+?>
+--EXPECT--
+int(4)
diff --git a/Zend/tests/indirect_property_access.phpt b/Zend/tests/indirect_property_access.phpt
new file mode 100644
index 000000000..3645687f4
--- /dev/null
+++ b/Zend/tests/indirect_property_access.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Testing indirect property access
+--FILE--
+<?php
+
+class foo {
+ public $x = 1;
+}
+
+class bar {
+ public $y = 'foo';
+}
+
+$x = 'bar';
+
+$bar = new bar;
+
+var_dump((new bar)->y); // foo
+var_dump((new $x)->y); // foo
+var_dump((new $bar->y)->x); // 1
+
+?>
+--EXPECT--
+string(3) "foo"
+string(3) "foo"
+int(1)
diff --git a/Zend/tests/indirect_reference_this.phpt b/Zend/tests/indirect_reference_this.phpt
index 05419d6c3..c344bd03f 100644
--- a/Zend/tests/indirect_reference_this.phpt
+++ b/Zend/tests/indirect_reference_this.phpt
@@ -10,4 +10,4 @@ $x->f("this");
?>
--EXPECTF--
object(X)#%d (0) {
-} \ No newline at end of file
+}
diff --git a/Zend/tests/isset_003.phpt b/Zend/tests/isset_003.phpt
index 68c26f80f..4db42a933 100644
--- a/Zend/tests/isset_003.phpt
+++ b/Zend/tests/isset_003.phpt
@@ -29,10 +29,10 @@ bool(true)
bool(false)
bool(false)
-Notice: Undefined variable: d in %s on line %d
-
Notice: Undefined variable: c in %s on line %d
+Notice: Undefined variable: d in %s on line %d
+
Notice: Trying to get property of non-object in %s on line %d
bool(false)
bool(true)
diff --git a/Zend/tests/isset_003_2_4.phpt b/Zend/tests/isset_003_2_4.phpt
new file mode 100644
index 000000000..c05f3e26f
--- /dev/null
+++ b/Zend/tests/isset_003_2_4.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Testing isset accessing undefined array itens and properties
+--SKIPIF--
+<?php if (version_compare(zend_version(), '2.4.0', '<')) die('skip ZendEngine 2.4 needed'); ?>
+--FILE--
+<?php
+
+$a = 'foo';
+$b =& $a;
+
+var_dump(isset($b));
+
+var_dump(isset($a[0], $b[1]));
+
+var_dump(isset($a[0]->a));
+
+var_dump(isset($c[0][1][2]->a->b->c->d));
+
+var_dump(isset(${$a}->{$b->$c[$d]}));
+
+var_dump(isset($GLOBALS));
+
+var_dump(isset($GLOBALS[1]));
+
+var_dump(isset($GLOBALS[1]->$GLOBALS));
+
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+
+Notice: Undefined variable: c in %s on line %d
+
+Notice: Undefined variable: d in %s on line %d
+
+Notice: Trying to get property of non-object in %s on line %d
+bool(false)
+bool(true)
+bool(false)
+bool(false)
diff --git a/Zend/tests/isset_str_offset.phpt b/Zend/tests/isset_str_offset.phpt
new file mode 100644
index 000000000..7a9164a38
--- /dev/null
+++ b/Zend/tests/isset_str_offset.phpt
@@ -0,0 +1,89 @@
+--TEST--
+Testing isset with string offsets
+--FILE--
+<?php
+
+print "- isset ---\n";
+
+$str = "test0123";
+
+var_dump(isset($str[-1]));
+var_dump(isset($str[0]));
+var_dump(isset($str[1]));
+var_dump(isset($str[4])); // 0
+var_dump(isset($str[5])); // 1
+var_dump(isset($str[8]));
+var_dump(isset($str[10000]));
+// non-numeric offsets
+print "- string ---\n";
+var_dump(isset($str['-1']));
+var_dump(isset($str['0']));
+var_dump(isset($str['1']));
+var_dump(isset($str['4'])); // 0
+var_dump(isset($str['1.5']));
+var_dump(isset($str['good']));
+var_dump(isset($str['3 and a half']));
+print "- bool ---\n";
+var_dump(isset($str[true]));
+var_dump(isset($str[false]));
+var_dump(isset($str[false][true]));
+print "- null ---\n";
+var_dump(isset($str[null]));
+print "- double ---\n";
+var_dump(isset($str[-1.1]));
+var_dump(isset($str[-0.8]));
+var_dump(isset($str[-0.1]));
+var_dump(isset($str[0.2]));
+var_dump(isset($str[0.9]));
+var_dump(isset($str[M_PI]));
+var_dump(isset($str[100.5001]));
+print "- array ---\n";
+var_dump(isset($str[array()]));
+var_dump(isset($str[array(1,2,3)]));
+print "- object ---\n";
+var_dump(isset($str[new stdClass()]));
+print "- resource ---\n";
+$f = fopen(__FILE__, 'r');
+var_dump(isset($str[$f]));
+print "done\n";
+
+?>
+--EXPECTF--
+- isset ---
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+- string ---
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+bool(false)
+- bool ---
+bool(true)
+bool(true)
+bool(false)
+- null ---
+bool(true)
+- double ---
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+- array ---
+bool(false)
+bool(false)
+- object ---
+bool(false)
+- resource ---
+bool(false)
+done
diff --git a/Zend/tests/magic_by_ref_010.phpt b/Zend/tests/magic_by_ref_010.phpt
deleted file mode 100644
index 0a45fb911..000000000
--- a/Zend/tests/magic_by_ref_010.phpt
+++ /dev/null
@@ -1,30 +0,0 @@
---TEST--
-passing arguments by ref to a method handled by __call()
---INI--
-allow_call_time_pass_reference=1
---FILE--
-<?php
-
-class Foo {
- function __call($method, $args)
- {
- print $args[0]."\n";
- $args[0] = 5;
- print $args[0]."\n";
- return true;
- }
-}
-
-$v = 'str';
-$o = new Foo();
-$o->test(&$v);
-
-var_dump($v);
-
-echo "Done\n";
-?>
---EXPECTF--
-str
-5
-int(5)
-Done
diff --git a/Zend/tests/method_static_var.phpt b/Zend/tests/method_static_var.phpt
new file mode 100644
index 000000000..c5e82fef7
--- /dev/null
+++ b/Zend/tests/method_static_var.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Initial value of static var in method depends on the include time of the class definition
+--XFAIL--
+Maybe not a bug
+--FILE--
+<?php
+class Foo {
+ public function __construct() {
+ eval("class Bar extends Foo {}");
+ }
+ public static function test() {
+ static $i = 0;
+ var_dump(++$i);
+ }
+}
+
+foo::test();
+new Foo;
+foo::test();
+
+/**
+ * function_add_ref() makes a clone of static variables for inherited functions, so $i in Bar::test gets initial value 1
+ */
+Bar::test();
+Bar::test();
+--EXPECT--
+int(1)
+int(2)
+int(1)
+int(2)
diff --git a/Zend/tests/multibyte/multibyte_encoding_001.phpt b/Zend/tests/multibyte/multibyte_encoding_001.phpt
index 19b6064cf..38aa80a40 100755
--- a/Zend/tests/multibyte/multibyte_encoding_001.phpt
+++ b/Zend/tests/multibyte/multibyte_encoding_001.phpt
@@ -2,7 +2,7 @@
Zend Multibyte and ShiftJIS
--SKIPIF--
<?php
-if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
+if (!in_array("zend.detect_unicode", array_keys(ini_get_all()))) {
die("skip Requires configure --enable-zend-multibyte option");
}
if (!extension_loaded("mbstring")) {
@@ -10,6 +10,7 @@ if (!extension_loaded("mbstring")) {
}
?>
--INI--
+zend.multibyte=1
mbstring.internal_encoding=SJIS
--FILE--
<?php
diff --git a/Zend/tests/multibyte/multibyte_encoding_002.phpt b/Zend/tests/multibyte/multibyte_encoding_002.phpt
index 813222d82..6e1ad80c9 100755
--- a/Zend/tests/multibyte/multibyte_encoding_002.phpt
+++ b/Zend/tests/multibyte/multibyte_encoding_002.phpt
@@ -2,7 +2,7 @@
Zend Multibyte and UTF-8 BOM
--SKIPIF--
<?php
-if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
+if (!in_array("zend.detect_unicode", array_keys(ini_get_all()))) {
die("skip Requires configure --enable-zend-multibyte option");
}
if (!extension_loaded("mbstring")) {
@@ -10,6 +10,7 @@ if (!extension_loaded("mbstring")) {
}
?>
--INI--
+zend.multibyte=1
mbstring.internal_encoding=iso-8859-1
--FILE--
<?php
diff --git a/Zend/tests/multibyte/multibyte_encoding_003.phpt b/Zend/tests/multibyte/multibyte_encoding_003.phpt
index 19b29f209..0f873dd07 100755
--- a/Zend/tests/multibyte/multibyte_encoding_003.phpt
+++ b/Zend/tests/multibyte/multibyte_encoding_003.phpt
Binary files differ
diff --git a/Zend/tests/multibyte/multibyte_encoding_004.phpt b/Zend/tests/multibyte/multibyte_encoding_004.phpt
index 5a26b7c21..6d121d668 100644
--- a/Zend/tests/multibyte/multibyte_encoding_004.phpt
+++ b/Zend/tests/multibyte/multibyte_encoding_004.phpt
@@ -2,7 +2,7 @@
test for mbstring script_encoding for flex unsafe encoding (Shift_JIS)
--SKIPIF--
<?php
-if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
+if (!in_array("zend.detect_unicode", array_keys(ini_get_all()))) {
die("skip Requires configure --enable-zend-multibyte option");
}
if (!extension_loaded("mbstring")) {
@@ -10,7 +10,8 @@ if (!extension_loaded("mbstring")) {
}
?>
--INI--
-mbstring.script_encoding=Shift_JIS
+zend.multibyte=1
+zend.script_encoding=Shift_JIS
mbstring.internal_encoding=Shift_JIS
--FILE--
<?php
diff --git a/Zend/tests/multibyte/multibyte_encoding_005.phpt b/Zend/tests/multibyte/multibyte_encoding_005.phpt
index 3946238e5..6fee68748 100644
--- a/Zend/tests/multibyte/multibyte_encoding_005.phpt
+++ b/Zend/tests/multibyte/multibyte_encoding_005.phpt
@@ -2,7 +2,7 @@
encoding conversion from script encoding into internal encoding
--SKIPIF--
<?php
-if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
+if (!in_array("zend.detect_unicode", array_keys(ini_get_all()))) {
die("skip Requires configure --enable-zend-multibyte option");
}
if (!extension_loaded("mbstring")) {
@@ -10,8 +10,9 @@ if (!extension_loaded("mbstring")) {
}
?>
--INI--
+zend.multibyte=1
mbstring.encoding_translation = On
-mbstring.script_encoding=Shift_JIS
+zend.script_encoding=Shift_JIS
mbstring.internal_encoding=UTF-8
--FILE--
<?php
diff --git a/Zend/tests/multibyte/multibyte_encoding_006.phpt b/Zend/tests/multibyte/multibyte_encoding_006.phpt
index da5b8a22b..b87b434fe 100644
--- a/Zend/tests/multibyte/multibyte_encoding_006.phpt
+++ b/Zend/tests/multibyte/multibyte_encoding_006.phpt
Binary files differ
diff --git a/Zend/tests/nowdoc_013.phpt b/Zend/tests/nowdoc_013.phpt
index f4ee25174..3e7d41fe0 100644
--- a/Zend/tests/nowdoc_013.phpt
+++ b/Zend/tests/nowdoc_013.phpt
@@ -4,7 +4,6 @@ Test whitespace following end of nowdoc
highlight.string = #DD0000
highlight.comment = #FF8000
highlight.keyword = #007700
-highlight.bg = #FFFFFF
highlight.default = #0000BB
highlight.html = #000000
--FILE--
diff --git a/Zend/tests/nowdoc_014.phpt b/Zend/tests/nowdoc_014.phpt
index b8948699f..694490b17 100644
--- a/Zend/tests/nowdoc_014.phpt
+++ b/Zend/tests/nowdoc_014.phpt
@@ -4,7 +4,6 @@ Highlighting empty nowdoc
highlight.string = #DD0000
highlight.comment = #FF8000
highlight.keyword = #007700
-highlight.bg = #FFFFFF
highlight.default = #0000BB
highlight.html = #000000
--FILE--
diff --git a/Zend/tests/ns_071.phpt b/Zend/tests/ns_071.phpt
index 1fdaec9db..604e64983 100644
--- a/Zend/tests/ns_071.phpt
+++ b/Zend/tests/ns_071.phpt
@@ -18,4 +18,4 @@ new bar(new \stdclass);
--EXPECTF--
NULL
-Catchable fatal error: Argument 1 passed to foo\bar::__construct() must be an array, object given, called in %s on line %d and defined in %s on line %d
+Catchable fatal error: Argument 1 passed to foo\bar::__construct() must be of the type array, object given, called in %s on line %d and defined in %s on line %d
diff --git a/Zend/tests/ns_086.phpt b/Zend/tests/ns_086.phpt
index ce3e2a647..00657f6bd 100644
--- a/Zend/tests/ns_086.phpt
+++ b/Zend/tests/ns_086.phpt
@@ -1,5 +1,13 @@
--TEST--
086: bracketed namespace with encoding
+--SKIPIF--
+<?php
+if (!extension_loaded("mbstring")) {
+ die("skip Requires mbstring extension");
+}
+?>
+--INI--
+zend.multibyte=1
--FILE--
<?php
declare(encoding='utf-8');
diff --git a/Zend/tests/objects_002.phpt b/Zend/tests/objects_002.phpt
index 87ba0fdc3..e2db140b1 100644
--- a/Zend/tests/objects_002.phpt
+++ b/Zend/tests/objects_002.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo() in %s on line %d
Done
diff --git a/Zend/tests/objects_003.phpt b/Zend/tests/objects_003.phpt
index 1c254290f..7e0f08326 100644
--- a/Zend/tests/objects_003.phpt
+++ b/Zend/tests/objects_003.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg) in %s on line %d
Done
diff --git a/Zend/tests/objects_004.phpt b/Zend/tests/objects_004.phpt
index 35ab4775b..eb0412447 100644
--- a/Zend/tests/objects_004.phpt
+++ b/Zend/tests/objects_004.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg) in %s on line %d
Done
diff --git a/Zend/tests/objects_005.phpt b/Zend/tests/objects_005.phpt
index d583c9be9..908e79724 100644
--- a/Zend/tests/objects_005.phpt
+++ b/Zend/tests/objects_005.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with & test::foo() in %s on line %d
Done
diff --git a/Zend/tests/objects_006.phpt b/Zend/tests/objects_006.phpt
index fb2e28b3a..f84a3053e 100644
--- a/Zend/tests/objects_006.phpt
+++ b/Zend/tests/objects_006.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg, $arg2 = NULL) in %s on line %d
Done
diff --git a/Zend/tests/objects_007.phpt b/Zend/tests/objects_007.phpt
index 2fce04a17..75e081758 100644
--- a/Zend/tests/objects_007.phpt
+++ b/Zend/tests/objects_007.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg, &$arg2 = NULL) in %s on line %d
Done
diff --git a/Zend/tests/objects_008.phpt b/Zend/tests/objects_008.phpt
index b61d16786..f6d5826eb 100644
--- a/Zend/tests/objects_008.phpt
+++ b/Zend/tests/objects_008.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo(Test $arg) in %s on line %d
Done
diff --git a/Zend/tests/objects_009.phpt b/Zend/tests/objects_009.phpt
index 5fad0046a..04b1118e0 100644
--- a/Zend/tests/objects_009.phpt
+++ b/Zend/tests/objects_009.phpt
@@ -20,5 +20,5 @@ class test3 extends test {
echo "Done\n";
?>
--EXPECTF--
-Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Strict Standards: Declaration of test3::foo() should be compatible with test::foo(Test $arg) in %s on line %d
Done
diff --git a/Zend/tests/offset_assign.phpt b/Zend/tests/offset_assign.phpt
index eebf63c4f..6a0059109 100644
--- a/Zend/tests/offset_assign.phpt
+++ b/Zend/tests/offset_assign.phpt
@@ -3,9 +3,11 @@ Crash on $x['x']['y'] += 1 when $x is string
--FILE--
<?php
$x = "a";
-$x['x']['y'] += 1;
+$x['x']['y'] += 1;
echo "Done\n";
?>
---EXPECTF--
-Fatal error: Cannot use string offset as an array in %s on line %d
+--EXPECTF--
+Warning: Illegal string offset 'x' in %soffset_assign.php on line %d
+
+Fatal error: Cannot use string offset as an array in %soffset_assign.php on line %d
diff --git a/Zend/tests/offset_string.phpt b/Zend/tests/offset_string.phpt
index 63d8abe8d..34604d634 100644
--- a/Zend/tests/offset_string.phpt
+++ b/Zend/tests/offset_string.phpt
@@ -9,6 +9,9 @@ var_dump($str[1]);
var_dump($str[0.0836]);
var_dump($str[NULL]);
var_dump($str["run away"]);
+var_dump($str["13"]);
+var_dump($str["14.5"]);
+var_dump($str["15 and then some"]);
var_dump($str[TRUE]);
var_dump($str[FALSE]);
@@ -24,12 +27,29 @@ var_dump($str[$arr]);
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
string(1) "i"
+
+Notice: String offset cast occured in %s on line %d
string(1) "S"
+
+Notice: String offset cast occured in %s on line %d
string(1) "S"
+
+Warning: Illegal string offset 'run away' in %s on line %d
string(1) "S"
+string(1) "c"
+
+Warning: Illegal string offset '14.5' in %s on line %d
+string(1) "o"
+
+Notice: A non well formed numeric value encountered in %s on line %d
+string(1) "r"
+
+Notice: String offset cast occured in %s on line %d
string(1) "i"
+
+Notice: String offset cast occured in %s on line %d
string(1) "S"
Warning: Illegal offset type in %s on line %d
@@ -42,4 +62,4 @@ string(1) "%s"
Warning: Illegal offset type in %s on line %d
string(1) "i"
-Done
+Done \ No newline at end of file
diff --git a/Zend/tests/result_unused.phpt b/Zend/tests/result_unused.phpt
new file mode 100644
index 000000000..0db744d08
--- /dev/null
+++ b/Zend/tests/result_unused.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Unused result of fetch operations
+--FILE--
+<?php
+$x = array(1);
+$a = "x";
+$$a;
+
+$x = array(array(2));
+$x[0];
+
+$x = "str";
+$x[0];
+$x[3];
+
+class Foo {
+ public $prop = array(3);
+ function __get($name) {
+ return array(4);
+ }
+}
+$x = new Foo();
+$x->prop;
+$x->y;
+echo "ok\n";
+--EXPECTF--
+Notice: Uninitialized string offset: 3 in %sresult_unused.php on line %d
+ok
+
diff --git a/Zend/tests/str_offset_001.phpt b/Zend/tests/str_offset_001.phpt
new file mode 100644
index 000000000..8a6b91b49
--- /dev/null
+++ b/Zend/tests/str_offset_001.phpt
@@ -0,0 +1,51 @@
+--TEST--
+string offset 001
+--FILE--
+<?php
+function foo($x) {
+ var_dump($x);
+}
+
+$str = "abc";
+var_dump($str[-1]);
+var_dump($str[0]);
+var_dump($str[1]);
+var_dump($str[2]);
+var_dump($str[3]);
+var_dump($str[1][0]);
+var_dump($str[2][1]);
+
+foo($str[-1]);
+foo($str[0]);
+foo($str[1]);
+foo($str[2]);
+foo($str[3]);
+foo($str[1][0]);
+foo($str[2][1]);
+?>
+--EXPECTF--
+Notice: Uninitialized string offset: -1 in %sstr_offset_001.php on line %d
+string(0) ""
+string(1) "a"
+string(1) "b"
+string(1) "c"
+
+Notice: Uninitialized string offset: 3 in %sstr_offset_001.php on line %d
+string(0) ""
+string(1) "b"
+
+Notice: Uninitialized string offset: 1 in %sstr_offset_001.php on line %d
+string(0) ""
+
+Notice: Uninitialized string offset: -1 in %sstr_offset_001.php on line %d
+string(0) ""
+string(1) "a"
+string(1) "b"
+string(1) "c"
+
+Notice: Uninitialized string offset: 3 in %sstr_offset_001.php on line %d
+string(0) ""
+string(1) "b"
+
+Notice: Uninitialized string offset: 1 in %sstr_offset_001.php on line %d
+string(0) ""
diff --git a/Zend/tests/str_offset_002.phpt b/Zend/tests/str_offset_002.phpt
new file mode 100644
index 000000000..1c465e5ba
--- /dev/null
+++ b/Zend/tests/str_offset_002.phpt
@@ -0,0 +1,9 @@
+--TEST--
+string offset 002
+--FILE--
+<?php
+$a = "aaa";
+$x = array(&$a[1]);
+?>
+--EXPECTF--
+Fatal error: Cannot create references to/from string offsets in %sstr_offset_002.php on line 3
diff --git a/Zend/tests/trait_exists_001.phpt b/Zend/tests/trait_exists_001.phpt
new file mode 100644
index 000000000..10ce3fa0c
--- /dev/null
+++ b/Zend/tests/trait_exists_001.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Testing trait_exists()
+--FILE--
+<?php
+
+trait foo {
+}
+
+var_dump(trait_exists('foo'));
+var_dump(trait_exists(1));
+var_dump(trait_exists(NULL));
+var_dump(trait_exists(new stdClass));
+
+?>
+--EXPECTF--
+bool(true)
+bool(false)
+bool(false)
+
+Warning: trait_exists() expects parameter 1 to be string, object given in %s on line %d
+NULL
diff --git a/Zend/tests/trait_exists_002.phpt b/Zend/tests/trait_exists_002.phpt
new file mode 100644
index 000000000..7b5c89980
--- /dev/null
+++ b/Zend/tests/trait_exists_002.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Testing trait_exists() inside a namespace
+--FILE--
+<?php
+
+namespace foo;
+
+trait IFoo { }
+
+trait ITest { }
+
+
+var_dump(trait_exists('IFoo'));
+var_dump(trait_exists('foo\\IFoo'));
+var_dump(trait_exists('FOO\\ITEST'));
+
+?>
+--EXPECT--
+bool(false)
+bool(true)
+bool(true)
diff --git a/Zend/tests/trait_exists_003.phpt b/Zend/tests/trait_exists_003.phpt
new file mode 100644
index 000000000..2d57d8648
--- /dev/null
+++ b/Zend/tests/trait_exists_003.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Checking trait_exists(): interface, trait, abstract and final class
+--FILE--
+<?php
+
+interface a { }
+
+abstract class b { }
+
+final class c { }
+
+trait d {}
+
+var_dump(trait_exists('a'));
+var_dump(trait_exists('b'));
+var_dump(trait_exists('c'));
+var_dump(trait_exists('d'));
+
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(false)
+bool(true)
diff --git a/Zend/tests/traits/bug54441.phpt b/Zend/tests/traits/bug54441.phpt
new file mode 100644
index 000000000..84139f326
--- /dev/null
+++ b/Zend/tests/traits/bug54441.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #54441 (Changing trait static method visibility)
+--FILE--
+<?php
+
+trait Foo {
+ public function bar() {}
+}
+
+class Boo {
+ use Foo {
+ bar as dontKnow;
+ dontKnow as protected;
+ }
+}
+
+?>
+--EXPECTF--
+Fatal error: The modifiers for the trait alias dontKnow() need to be changed in the same statment in which the alias is defined. Error in %s on line %d
diff --git a/Zend/tests/traits/bug55137.phpt b/Zend/tests/traits/bug55137.phpt
new file mode 100644
index 000000000..4a4e6e61a
--- /dev/null
+++ b/Zend/tests/traits/bug55137.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #55137 (Changing trait static method visibility)
+--FILE--
+<?php
+
+trait A {
+ protected static function foo() { echo "abc\n"; }
+ private static function bar() { echo "def\n"; }
+}
+
+
+class B {
+ use A {
+ A::foo as public;
+ A::bar as public baz;
+ }
+}
+
+B::foo();
+B::baz();
+
+
+?>
+--EXPECT--
+abc
+def
diff --git a/Zend/tests/traits/bug55214.phpt b/Zend/tests/traits/bug55214.phpt
new file mode 100644
index 000000000..890fc3792
--- /dev/null
+++ b/Zend/tests/traits/bug55214.phpt
@@ -0,0 +1,71 @@
+--TEST--
+Bug #55214 (Use of __CLASS__ within trait returns trait name not class name)
+--FILE--
+<?php
+
+trait ATrait {
+ public static $static_var = __CLASS__;
+ public $var = __CLASS__;
+
+ public static function get_class_name() {
+ return __CLASS__;
+ }
+
+ public function get_class_name_obj() {
+ return __CLASS__;
+ }
+
+ public static function get_class_name2() {
+ return self::$static_var;
+ }
+
+ public function get_class_name_obj2() {
+ return $this->var;
+ }
+}
+
+trait Indirect {
+ use ATrait;
+}
+
+class SomeClass {
+ use ATrait;
+}
+
+class UsingIndirect {
+ use Indirect;
+}
+
+$r = SomeClass::get_class_name();
+var_dump($r);
+$r = SomeClass::get_class_name2();
+var_dump($r);
+
+$o = new SomeClass();
+$r = $o->get_class_name_obj();
+var_dump($r);
+$r = $o->get_class_name_obj2();
+var_dump($r);
+
+$r = UsingIndirect::get_class_name();
+var_dump($r);
+$r = UsingIndirect::get_class_name2();
+var_dump($r);
+
+$o = new UsingIndirect();
+$r = $o->get_class_name_obj();
+var_dump($r);
+$r = $o->get_class_name_obj2();
+var_dump($r);
+
+
+?>
+--EXPECT--
+string(9) "SomeClass"
+string(9) "SomeClass"
+string(9) "SomeClass"
+string(9) "SomeClass"
+string(13) "UsingIndirect"
+string(13) "UsingIndirect"
+string(13) "UsingIndirect"
+string(13) "UsingIndirect"
diff --git a/Zend/tests/traits/bug55355.phpt b/Zend/tests/traits/bug55355.phpt
new file mode 100644
index 000000000..301ceeeb0
--- /dev/null
+++ b/Zend/tests/traits/bug55355.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Bug #55355 (Abstract functions required by a trait are not correctly found when implemented in an ancestor class)
+--FILE--
+<?php
+
+// A trait that has a abstract function
+trait ATrait {
+ function bar() {
+ $this->foo();
+ }
+ abstract function foo();
+}
+
+// A class on the second level in the
+// inheritance chain
+class Level2Impl {
+ function foo() {}
+}
+
+class Level1Indirect extends Level2Impl {}
+
+// A class on the first level in the
+// inheritance chain
+class Level1Direct {
+ function foo() {}
+}
+
+// Trait Uses
+
+class Direct {
+ use ATrait;
+ function foo() {}
+}
+
+class BaseL2 extends Level1Indirect {
+ use ATrait;
+}
+
+class BaseL1 extends Level1Direct {
+ use ATrait;
+}
+
+echo 'DONE';
+?>
+--EXPECT--
+DONE
diff --git a/Zend/tests/traits/bug55372.phpt b/Zend/tests/traits/bug55372.phpt
new file mode 100644
index 000000000..e215d968a
--- /dev/null
+++ b/Zend/tests/traits/bug55372.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #55372 (Literal handling in methods is inconsistent, causing memory corruption)
+--FILE--
+<?php
+
+trait testTrait {
+ public function testMethod() {
+ if (1) {
+ $letters1 = range('a', 'z', 1);
+ $letters2 = range('A', 'Z', 1);
+ $letters1 = 'foo';
+ $letters2 = 'baarr';
+ var_dump($letters1);
+ var_dump($letters2);
+ }
+ }
+}
+
+class foo {
+ use testTrait;
+}
+
+$x = new foo;
+$x->testMethod();
+?>
+--EXPECT--
+string(3) "foo"
+string(5) "baarr"
diff --git a/Zend/tests/traits/bug55424.phpt b/Zend/tests/traits/bug55424.phpt
new file mode 100644
index 000000000..b6c3b5451
--- /dev/null
+++ b/Zend/tests/traits/bug55424.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Bug #55424 (Method got missing from class when a trait defined an abstract method to express a requirement)
+--FILE--
+<?php
+
+ trait ATrait
+ {
+ function setRequired()
+ {
+ $this->setAttribute();
+ }
+
+ abstract function setAttribute();
+ }
+
+ class Base
+ {
+ function setAttribute() { }
+ }
+
+ class MyClass extends Base
+ {
+ use ATrait;
+ }
+
+ $i = new Base();
+ $i->setAttribute();
+
+ $t = new MyClass();
+ /* setAttribute used to disappear for no good reason. */
+ $t->setRequired();
+ echo 'DONE';
+?>
+--EXPECT--
+DONE
diff --git a/Zend/tests/traits/bug55524.phpt b/Zend/tests/traits/bug55524.phpt
new file mode 100644
index 000000000..1911cde13
--- /dev/null
+++ b/Zend/tests/traits/bug55524.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Bug #55524 Traits should not be able to extend a class
+--FILE--
+<?php
+
+class Base {}
+
+trait Foo extends Base {
+ function bar() {}
+}
+
+echo 'DONE';
+?>
+--EXPECTF--
+Fatal error: A trait (Foo) cannot extend a class in %s on line %d
diff --git a/Zend/tests/traits/bug55554a.phpt b/Zend/tests/traits/bug55554a.phpt
new file mode 100644
index 000000000..b92a81f54
--- /dev/null
+++ b/Zend/tests/traits/bug55554a.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Bug #55137 (Legacy constructor not registered for class)
+--FILE--
+<?php
+
+// All constructors should be registered as such
+
+trait TConstructor {
+ public function constructor() {
+ echo "ctor executed\n";
+ }
+}
+
+class NewConstructor {
+ use TConstructor {
+ constructor as __construct;
+ }
+}
+
+class LegacyConstructor {
+ use TConstructor {
+ constructor as LegacyConstructor;
+ }
+}
+
+echo "New constructor: ";
+$o = new NewConstructor;
+
+echo "Legacy constructor: ";
+$o = new LegacyConstructor;
+
+--EXPECT--
+New constructor: ctor executed
+Legacy constructor: ctor executed
diff --git a/Zend/tests/traits/bug55554b.phpt b/Zend/tests/traits/bug55554b.phpt
new file mode 100644
index 000000000..bf40e89a0
--- /dev/null
+++ b/Zend/tests/traits/bug55554b.phpt
@@ -0,0 +1,56 @@
+--TEST--
+Bug #55137 (Legacy constructor not registered for class)
+--FILE--
+<?php
+
+trait TConstructor {
+ public function foo() {
+ echo "foo executed\n";
+ }
+ public function bar() {
+ echo "bar executed\n";
+ }
+}
+
+class OverridingIsSilent1 {
+ use TConstructor {
+ foo as __construct;
+ }
+
+ public function __construct() {
+ echo "OverridingIsSilent1 __construct\n";
+ }
+}
+
+$o = new OverridingIsSilent1;
+
+class OverridingIsSilent2 {
+ use TConstructor {
+ foo as OverridingIsSilent2;
+ }
+
+ public function OverridingIsSilent2() {
+ echo "OverridingIsSilent2 OverridingIsSilent2\n";
+ }
+}
+
+$o = new OverridingIsSilent2;
+
+class ReportCollision {
+ use TConstructor {
+ bar as ReportCollision;
+ foo as __construct;
+ }
+}
+
+
+echo "ReportCollision: ";
+$o = new ReportCollision;
+
+
+--EXPECTF--
+OverridingIsSilent1 __construct
+OverridingIsSilent2 OverridingIsSilent2
+
+Fatal error: ReportCollision has colliding constructor definitions coming from traits in %s on line %d
+
diff --git a/Zend/tests/traits/bug55554c.phpt b/Zend/tests/traits/bug55554c.phpt
new file mode 100644
index 000000000..466b3f1c0
--- /dev/null
+++ b/Zend/tests/traits/bug55554c.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Bug #55137 (Legacy constructor not registered for class)
+--FILE--
+<?php
+
+// Test that the behavior is consistent with the existing handling of new
+// and legacy constructors.
+// Here, the traits conflicts are overridden by local definitions,
+// and the two constructor definitions do not directly collide in that case.
+
+trait TC1 {
+ public function __construct() {
+ echo "TC1 executed\n";
+ }
+ public function ReportCollision() {
+ echo "TC1 executed\n";
+ }
+}
+
+trait TC2 {
+ public function __construct() {
+ echo "TC2 executed\n";
+ }
+ public function ReportCollision() {
+ echo "TC1 executed\n";
+ }
+}
+
+class ReportCollision {
+ use TC1, TC2;
+
+ public function __construct() {
+ echo "New constructor executed\n";
+ }
+ public function ReportCollision() {
+ echo "Legacy constructor executed\n";
+ }
+}
+
+
+echo "ReportCollision: ";
+$o = new ReportCollision;
+
+
+--EXPECTF--
+ReportCollision: New constructor executed
diff --git a/Zend/tests/traits/bug55554d.phpt b/Zend/tests/traits/bug55554d.phpt
new file mode 100644
index 000000000..10f2e2952
--- /dev/null
+++ b/Zend/tests/traits/bug55554d.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #55137 (Legacy constructor not registered for class)
+--FILE--
+<?php
+
+// Test mixed constructors from different traits, we are more strict about
+// these cases, since that can lead to un-expected behavior.
+// It is not consistent with the normal constructor handling, but
+// here we have a chance to be more strict for the new traits.
+
+trait TNew {
+ public function __construct() {
+ echo "TNew executed\n";
+ }
+}
+
+trait TLegacy {
+ public function ReportCollision() {
+ echo "ReportCollision executed\n";
+ }
+}
+
+class ReportCollision {
+ use TNew, TLegacy;
+}
+
+$o = new ReportCollision;
+
+--EXPECTF--
+
+Fatal error: ReportCollision has colliding constructor definitions coming from traits in %s on line %d
+
diff --git a/Zend/tests/traits/bug55554e.phpt b/Zend/tests/traits/bug55554e.phpt
new file mode 100644
index 000000000..5db508fc8
--- /dev/null
+++ b/Zend/tests/traits/bug55554e.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Bug #55137 (Legacy constructor not registered for class)
+--FILE--
+<?php
+
+// Ensuring that the collision still occurs as expected.
+
+trait TC1 {
+ public function ReportCollision() {
+ echo "TC1 executed\n";
+ }
+}
+
+trait TC2 {
+ public function ReportCollision() {
+ echo "TC1 executed\n";
+ }
+}
+
+class ReportCollision {
+ use TC1, TC2;
+}
+
+
+echo "ReportCollision: ";
+$o = new ReportCollision;
+
+
+--EXPECTF--
+Fatal error: Trait method ReportCollision has not been applied, because there are collisions with other trait methods on ReportCollision in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/bug55554f.phpt b/Zend/tests/traits/bug55554f.phpt
new file mode 100644
index 000000000..34b327d30
--- /dev/null
+++ b/Zend/tests/traits/bug55554f.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #55137 (Legacy constructor not registered for class)
+--FILE--
+<?php
+
+// Ensuring that inconsistent constructor use results in an error to avoid
+// problems creeping in.
+
+trait TNew {
+ public function __construct() {
+ echo "TNew executed\n";
+ }
+}
+
+class ReportCollision {
+ use TNew;
+
+ public function ReportCollision() {
+ echo "ReportCollision executed\n";
+ }
+}
+
+
+echo "ReportCollision: ";
+$o = new ReportCollision;
+
+
+--EXPECTF--
+Fatal error: ReportCollision has colliding constructor definitions coming from traits in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/bug55554g.phpt b/Zend/tests/traits/bug55554g.phpt
new file mode 100644
index 000000000..22d269603
--- /dev/null
+++ b/Zend/tests/traits/bug55554g.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Bug #55137 (Legacy constructor not registered for class)
+--FILE--
+<?php
+
+// Ensuring that inconsistent constructor use results in an error to avoid
+// problems creeping in.
+
+trait TLegacy {
+ public function ReportCollision() {
+ echo "TLegacy executed\n";
+ }
+}
+
+class ReportCollision {
+ use TLegacy;
+
+ public function __construct() {
+ echo "ReportCollision executed\n";
+ }
+}
+
+
+echo "ReportCollision: ";
+$o = new ReportCollision;
+
+
+--EXPECTF--
+Fatal error: ReportCollision has colliding constructor definitions coming from traits in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/bug60145.phpt b/Zend/tests/traits/bug60145.phpt
new file mode 100644
index 000000000..fcd0cfa5f
--- /dev/null
+++ b/Zend/tests/traits/bug60145.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #60145 (Usage of trait's use statement inside interfaces not properly checked.)
+--FILE--
+<?php
+
+trait foo {
+
+}
+
+interface MyInterface {
+ use foo;
+
+ public function b();
+
+}
+--EXPECTF--
+Fatal error: Cannot use traits inside of interfaces. foo is used in MyInterface in %s on line %d
diff --git a/Zend/tests/traits/bug60153.phpt b/Zend/tests/traits/bug60153.phpt
new file mode 100644
index 000000000..8f01e72c2
--- /dev/null
+++ b/Zend/tests/traits/bug60153.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #60153 (Interface method prototypes not enforced when implementd via traits.)
+--FILE--
+<?php
+
+interface IFoo {
+ public function oneArgument($a);
+}
+
+trait TFoo {
+ public function oneArgument() {}
+}
+
+class C implements IFoo {
+ use TFoo;
+}
+
+--EXPECTF--
+Fatal error: Declaration of C::oneArgument() must be compatible with IFoo::oneArgument($a) in %s on line %d
diff --git a/Zend/tests/traits/bug60165a.phpt b/Zend/tests/traits/bug60165a.phpt
new file mode 100644
index 000000000..245bb94e9
--- /dev/null
+++ b/Zend/tests/traits/bug60165a.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)
+--FILE--
+<?php
+
+trait A {
+ public function bar() {}
+}
+
+class MyClass {
+ use A {
+ nonExistent as barA;
+ }
+}
+
+--EXPECTF--
+Fatal error: An alias (barA) was defined for method nonExistent(), but this method does not exist in %s on line %d
diff --git a/Zend/tests/traits/bug60165b.phpt b/Zend/tests/traits/bug60165b.phpt
new file mode 100644
index 000000000..7b4855a64
--- /dev/null
+++ b/Zend/tests/traits/bug60165b.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)
+--FILE--
+<?php
+
+trait A {
+ public function bar() {}
+}
+
+class MyClass {
+ use A {
+ A::nonExistent as barA;
+ }
+}
+
+--EXPECTF--
+Fatal error: An alias was defined for A::nonExistent but this method does not exist in %s on line %d
diff --git a/Zend/tests/traits/bug60165c.phpt b/Zend/tests/traits/bug60165c.phpt
new file mode 100644
index 000000000..d72491f03
--- /dev/null
+++ b/Zend/tests/traits/bug60165c.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)
+--FILE--
+<?php
+
+trait A {
+ public function bar() {}
+}
+
+trait B {
+ public function foo() {}
+}
+
+class MyClass {
+ use A, B {
+ foo as fooB;
+ baz as foobar;
+ }
+}
+
+--EXPECTF--
+Fatal error: An alias (foobar) was defined for method baz(), but this method does not exist in %s on line %d
diff --git a/Zend/tests/traits/bug60165d.phpt b/Zend/tests/traits/bug60165d.phpt
new file mode 100644
index 000000000..26ac927a8
--- /dev/null
+++ b/Zend/tests/traits/bug60165d.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #60165 (Aliasing unexisting trait should throw/trigger the exception/error)
+--FILE--
+<?php
+
+// The same is true for the insteadof operator to resolve conflicts
+
+trait A {}
+
+trait B {
+ public function bar() {}
+}
+
+class MyClass {
+ use A, B {
+ A::bar insteadof B;
+ }
+}
+
+--EXPECTF--
+Fatal error: A precedence rule was defined for A::bar but this method does not exist in %s on line %d
diff --git a/Zend/tests/traits/bug60173.phpt b/Zend/tests/traits/bug60173.phpt
new file mode 100644
index 000000000..a28a1033a
--- /dev/null
+++ b/Zend/tests/traits/bug60173.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #60173 (Wrong error message on reflective trait instantiation)
+--FILE--
+<?php
+
+trait foo { }
+
+$rc = new ReflectionClass('foo');
+$rc->newInstance();
+
+--EXPECTF--
+Fatal error: Cannot instantiate trait foo in %s on line %d
diff --git a/Zend/tests/traits/bug60217a.phpt b/Zend/tests/traits/bug60217a.phpt
new file mode 100644
index 000000000..62a351595
--- /dev/null
+++ b/Zend/tests/traits/bug60217a.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #60217 (Requiring the same method from different traits.)
+--FILE--
+<?php
+
+trait T1 {
+ public abstract function foo();
+}
+
+trait T2 {
+ public abstract function foo();
+}
+
+class C {
+ use T1, T2;
+
+ public function foo() {
+ echo "C::foo() works.\n";
+ }
+}
+
+$o = new C;
+$o->foo();
+
+--EXPECTF--
+C::foo() works.
diff --git a/Zend/tests/traits/bug60217b.phpt b/Zend/tests/traits/bug60217b.phpt
new file mode 100644
index 000000000..f03955020
--- /dev/null
+++ b/Zend/tests/traits/bug60217b.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #60217 (Requiring the same method from different traits and abstract methods have to be compatible)
+--FILE--
+<?php
+
+trait TBroken1 {
+ public abstract function foo($a);
+}
+
+trait TBroken2 {
+ public abstract function foo($a, $b = 0);
+}
+
+class CBroken {
+ use TBroken1, TBroken2;
+
+ public function foo($a) {
+ echo 'FOO';
+ }
+}
+
+$o = new CBroken;
+$o->foo(1);
+
+--EXPECTF--
+Fatal error: Declaration of TBroken1::foo($a) must be compatible with TBroken2::foo($a, $b = 0) in %s on line %d
diff --git a/Zend/tests/traits/bug60217c.phpt b/Zend/tests/traits/bug60217c.phpt
new file mode 100644
index 000000000..ce8980775
--- /dev/null
+++ b/Zend/tests/traits/bug60217c.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Bug #60217 (Requiring the same method from different traits and abstract methods have to be compatible, in both directions.)
+--FILE--
+<?php
+
+trait TBroken1 {
+ public abstract function foo($a, $b = 0);
+}
+
+trait TBroken2 {
+ public abstract function foo($a);
+}
+
+class CBroken {
+ use TBroken1, TBroken2;
+
+ public function foo($a) {
+ echo 'FOO';
+ }
+}
+
+$o = new CBroken;
+$o->foo(1);
+
+--EXPECTF--
+Fatal error: Declaration of TBroken1::foo($a, $b = 0) must be compatible with TBroken2::foo($a) in %s on line %d
diff --git a/Zend/tests/traits/bug60369.phpt b/Zend/tests/traits/bug60369.phpt
new file mode 100644
index 000000000..bfc1ee303
--- /dev/null
+++ b/Zend/tests/traits/bug60369.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #60369 (Crash with static property in trait)
+--FILE--
+<?php
+
+trait PropertiesTrait {
+ static $same = true;
+}
+
+class Properties {
+ use PropertiesTrait;
+ public $same = true;
+}
+
+?>
+--EXPECTF--
+Fatal error: Properties and PropertiesTrait define the same property ($same) in the composition of Properties. However, the definition differs and is considered incompatible. Class was composed in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/abstract-methods01.phpt b/Zend/tests/traits/bugs/abstract-methods01.phpt
new file mode 100644
index 000000000..6275caa19
--- /dev/null
+++ b/Zend/tests/traits/bugs/abstract-methods01.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Abstract Trait Methods should behave like common abstract methods.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello {
+ public abstract function hello();
+}
+
+class TraitsTest {
+ use THello;
+}
+
+$test = new TraitsTest();
+$test->hello();
+?>
+--EXPECTF--
+Fatal error: Class %s contains %d abstract method and must therefore be declared abstract or implement the remaining methods (%s) in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/abstract-methods02.phpt b/Zend/tests/traits/bugs/abstract-methods02.phpt
new file mode 100644
index 000000000..78abe7d1b
--- /dev/null
+++ b/Zend/tests/traits/bugs/abstract-methods02.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Abstract Trait Methods should behave like common abstract methods.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello {
+ public abstract function hello();
+}
+
+trait THelloImpl {
+ public function hello() {
+ echo 'Hello';
+ }
+}
+
+class TraitsTest {
+ use THello;
+ use THelloImpl;
+}
+
+$test = new TraitsTest();
+$test->hello();
+?>
+--EXPECTF--
+Hello \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/abstract-methods03.phpt b/Zend/tests/traits/bugs/abstract-methods03.phpt
new file mode 100644
index 000000000..605b1d8e9
--- /dev/null
+++ b/Zend/tests/traits/bugs/abstract-methods03.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Abstract Trait Methods should behave like common abstract methods.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello {
+ public abstract function hello();
+}
+
+class TraitsTest {
+ use THello;
+ public function hello() {
+ echo 'Hello';
+ }
+}
+
+$test = new TraitsTest();
+$test->hello();
+?>
+--EXPECTF--
+Hello \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/abstract-methods04.phpt b/Zend/tests/traits/bugs/abstract-methods04.phpt
new file mode 100644
index 000000000..56a346406
--- /dev/null
+++ b/Zend/tests/traits/bugs/abstract-methods04.phpt
@@ -0,0 +1,36 @@
+--TEST--
+Abstract Trait Methods should behave like common abstract methods and
+implementstion may be provided by other traits. Sorting order shouldn't influence result.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello {
+ public abstract function hello();
+}
+
+trait THelloImpl {
+ public function hello() {
+ echo 'Hello';
+ }
+}
+
+class TraitsTest1 {
+ use THello;
+ use THelloImpl;
+}
+
+$test = new TraitsTest1();
+$test->hello();
+
+class TraitsTest2 {
+ use THelloImpl;
+ use THello;
+}
+
+$test = new TraitsTest2();
+$test->hello();
+
+?>
+--EXPECTF--
+HelloHello \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/abstract-methods05.phpt b/Zend/tests/traits/bugs/abstract-methods05.phpt
new file mode 100644
index 000000000..e90ce39a3
--- /dev/null
+++ b/Zend/tests/traits/bugs/abstract-methods05.phpt
@@ -0,0 +1,25 @@
+--TEST--
+The compatibility with the signature of abstract methods should be checked.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THelloB {
+ public function hello() {
+ echo 'Hello';
+ }
+}
+
+trait THelloA {
+ public abstract function hello($a);
+}
+
+class TraitsTest1 {
+ use THelloB;
+ use THelloA;
+}
+
+
+?>
+--EXPECTF--
+Fatal error: Declaration of THelloB::hello() must be compatible with THelloA::hello($a) in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/abstract-methods06.phpt b/Zend/tests/traits/bugs/abstract-methods06.phpt
new file mode 100644
index 000000000..fdcd81696
--- /dev/null
+++ b/Zend/tests/traits/bugs/abstract-methods06.phpt
@@ -0,0 +1,26 @@
+--TEST--
+The compatibility with the signature of abstract methods should be checked. (also checking the second possible implementation branch)
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THelloB {
+ public function hello() {
+ echo 'Hello';
+ }
+}
+
+trait THelloA {
+ public abstract function hello($a);
+}
+
+class TraitsTest1 {
+ use THelloA;
+ use THelloB;
+}
+
+
+
+?>
+--EXPECTF--
+Fatal error: Declaration of THelloB::hello() must be compatible with THelloA::hello($a) in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/alias-semantics.phpt b/Zend/tests/traits/bugs/alias-semantics.phpt
new file mode 100644
index 000000000..ac8669288
--- /dev/null
+++ b/Zend/tests/traits/bugs/alias-semantics.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Semantic of alias operation is to provide an additional identifier for the method body of the original method.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello {
+ public function a() {
+ echo 'A';
+ }
+}
+
+class TraitsTest {
+ use THello { a as b; }
+}
+
+$test = new TraitsTest();
+$test->a();
+$test->b();
+
+?>
+--EXPECTF--
+AA \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/alias-semantics02.phpt b/Zend/tests/traits/bugs/alias-semantics02.phpt
new file mode 100644
index 000000000..e0b5286e4
--- /dev/null
+++ b/Zend/tests/traits/bugs/alias-semantics02.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Semantic of alias operation is to provide an additional identifier for the
+method body of the original method.
+It should also work incase the method is fully qualified.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello {
+ public function a() {
+ echo 'A';
+ }
+}
+
+class TraitsTest {
+ use THello { THello::a as b; }
+}
+
+$test = new TraitsTest();
+$test->a();
+$test->b();
+
+?>
+--EXPECTF--
+AA \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/alias01.phpt b/Zend/tests/traits/bugs/alias01.phpt
new file mode 100644
index 000000000..b60261efa
--- /dev/null
+++ b/Zend/tests/traits/bugs/alias01.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Aliases are applied to the correct methods, and only to them.
+--FILE--
+<?php
+trait T1 {
+ function m1() { echo "T:m1\n"; }
+ function m2() { echo "T:m2\n"; }
+}
+
+class C1 {
+ use T1 { m1 as a1; }
+}
+
+$o = new C1;
+$o->m1();
+$o->a1();
+$o->m2();
+$o->a2();
+
+?>
+--EXPECTF--
+T:m1
+T:m1
+T:m2
+
+Fatal error: Call to undefined method C1::a2() in %s on line %d
diff --git a/Zend/tests/traits/bugs/case-sensitive.phpt b/Zend/tests/traits/bugs/case-sensitive.phpt
new file mode 100644
index 000000000..13d4188f2
--- /dev/null
+++ b/Zend/tests/traits/bugs/case-sensitive.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Check for problems with case sensitivity in compositions
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait A {
+ public function M1() {}
+ public function M2() {}
+}
+
+trait B {
+ public function M1() {}
+ public function M2() {}
+}
+
+class MyClass {
+ use A;
+ use B;
+}
+?>
+--EXPECTF--
+Fatal error: Trait method M1 has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d
diff --git a/Zend/tests/traits/bugs/interfaces.phpt b/Zend/tests/traits/bugs/interfaces.phpt
new file mode 100644
index 000000000..486bda7ef
--- /dev/null
+++ b/Zend/tests/traits/bugs/interfaces.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Make sure trait does not implement an interface.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+interface MyInterface {
+ public function a();
+}
+
+trait THello implements MyInterface {
+ public function a() {
+ echo 'A';
+ }
+}
+
+?>
+--EXPECTF--
+Fatal error: Cannot use 'MyInterface' as interface on 'THello' since it is a Trait in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/missing-trait.phpt b/Zend/tests/traits/bugs/missing-trait.phpt
new file mode 100644
index 000000000..ce4fa5c69
--- /dev/null
+++ b/Zend/tests/traits/bugs/missing-trait.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Check error message for missing traits
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+class TraitsTest {
+ use THello;
+}
+
+$test = new TraitsTest();
+
+?>
+--EXPECTF--
+Fatal error: Trait 'THello' not found in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/overridding-conflicting-methods.phpt b/Zend/tests/traits/bugs/overridding-conflicting-methods.phpt
new file mode 100644
index 000000000..fc09a367b
--- /dev/null
+++ b/Zend/tests/traits/bugs/overridding-conflicting-methods.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Overridding Conflicting Methods should not result in a notice/warning about collisions
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello1 {
+ public function hello() {
+ echo 'Hello';
+ }
+}
+
+trait THello2 {
+ public function hello() {
+ echo 'Hello';
+ }
+}
+
+class TraitsTest {
+ use THello1;
+ use THello2;
+ public function hello() {
+ echo 'Hello';
+ }
+}
+
+$test = new TraitsTest();
+$test->hello();
+?>
+--EXPECTF--
+Hello \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/overridding-conflicting-property-initializer.phpt b/Zend/tests/traits/bugs/overridding-conflicting-property-initializer.phpt
new file mode 100644
index 000000000..1b9d98dac
--- /dev/null
+++ b/Zend/tests/traits/bugs/overridding-conflicting-property-initializer.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Properties are considered incompatible if they are different in any of their
+defined characteristics. Thus, initialization values have to be equal, too.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait foo
+{
+ public $zoo = 'foo::zoo';
+}
+
+class baz
+{
+ use foo;
+ public $zoo = 'baz::zoo';
+}
+
+$obj = new baz();
+echo $obj->zoo, "\n";
+?>
+--EXPECTF--
+Fatal error: baz and foo define the same property ($zoo) in the composition of baz. However, the definition differs and is considered incompatible. Class was composed in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/conflict001.phpt b/Zend/tests/traits/conflict001.phpt
new file mode 100644
index 000000000..32346b3d9
--- /dev/null
+++ b/Zend/tests/traits/conflict001.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Method conflict in traits
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello1 {
+ private function hello() {
+ echo 'Hello';
+ }
+}
+
+trait THello2 {
+ private function hello() {
+ echo 'Hello';
+ }
+}
+
+class TraitsTest {
+ use THello1;
+ use THello2;
+}
+?>
+--EXPECTF--
+Fatal error: Trait method hello has not been applied, because there are collisions with other trait methods on TraitsTest in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/conflict002.phpt b/Zend/tests/traits/conflict002.phpt
new file mode 100644
index 000000000..64712d40a
--- /dev/null
+++ b/Zend/tests/traits/conflict002.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Overwridden methods do not cause a conflict.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait HelloWorld {
+ public function sayHello() {
+ echo 'Hello World!';
+ }
+}
+
+trait HelloWorld2 {
+ public function sayHello() {
+ echo 'Hello World2!';
+ }
+}
+
+
+class TheWorldIsNotEnough {
+ use HelloWorld;
+ use HelloWorld2;
+ public function sayHello() {
+ echo 'Hello Universe!';
+ }
+}
+
+$o = new TheWorldIsNotEnough();
+$o->sayHello(); // echos Hello Universe!
+?>
+--EXPECTF--
+Hello Universe! \ No newline at end of file
diff --git a/Zend/tests/traits/conflict003.phpt b/Zend/tests/traits/conflict003.phpt
new file mode 100644
index 000000000..0e71063f1
--- /dev/null
+++ b/Zend/tests/traits/conflict003.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Two methods resulting in a conflict, should be reported both.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait A {
+ public function smallTalk() {
+ echo 'a';
+ }
+ public function bigTalk() {
+ echo 'A';
+ }
+}
+
+trait B {
+ public function smallTalk() {
+ echo 'b';
+ }
+ public function bigTalk() {
+ echo 'B';
+ }
+}
+
+class Talker {
+ use A, B;
+}
+
+?>
+--EXPECTF--
+Fatal error: Trait method smallTalk has not been applied, because there are collisions with other trait methods on Talker in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/error_001.phpt b/Zend/tests/traits/error_001.phpt
new file mode 100644
index 000000000..307e5c128
--- /dev/null
+++ b/Zend/tests/traits/error_001.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Trying to use instanceof for a method twice
+--FILE--
+<?php
+
+trait foo {
+ public function foo() {
+ return 1;
+ }
+}
+
+trait foo2 {
+ public function foo() {
+ return 2;
+ }
+}
+
+
+class A extends foo {
+ use foo {
+ foo2::foo insteadof foo;
+ foo2::foo insteadof foo;
+ }
+}
+
+?>
+--EXPECTF--
+Fatal error: Class A cannot extend from trait foo in %s on line %d
diff --git a/Zend/tests/traits/error_002.phpt b/Zend/tests/traits/error_002.phpt
new file mode 100644
index 000000000..ac98769f4
--- /dev/null
+++ b/Zend/tests/traits/error_002.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Trying to use an undefined trait
+--FILE--
+<?php
+
+class A {
+ use abc;
+}
+
+?>
+--EXPECTF--
+Fatal error: Trait 'abc' not found in %s on line %d
diff --git a/Zend/tests/traits/error_003.phpt b/Zend/tests/traits/error_003.phpt
new file mode 100644
index 000000000..5122155bb
--- /dev/null
+++ b/Zend/tests/traits/error_003.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Trying to use an interface as trait
+--FILE--
+<?php
+
+interface abc {
+}
+
+class A {
+ use abc;
+}
+
+?>
+--EXPECTF--
+Fatal error: A cannot use abc - it is not a trait in %s on line %d
diff --git a/Zend/tests/traits/error_004.phpt b/Zend/tests/traits/error_004.phpt
new file mode 100644
index 000000000..c7ac91611
--- /dev/null
+++ b/Zend/tests/traits/error_004.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Trying to use a class as trait
+--FILE--
+<?php
+
+class abc {
+}
+
+class A {
+ use abc;
+}
+
+?>
+--EXPECTF--
+Fatal error: A cannot use abc - it is not a trait in %s on line %d
diff --git a/Zend/tests/traits/error_005.phpt b/Zend/tests/traits/error_005.phpt
new file mode 100644
index 000000000..5aa5e10d9
--- /dev/null
+++ b/Zend/tests/traits/error_005.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Trying to use a final class as trait
+--FILE--
+<?php
+
+final class abc {
+}
+
+class A {
+ use abc;
+}
+
+?>
+--EXPECTF--
+Fatal error: A cannot use abc - it is not a trait in %s on line %d
diff --git a/Zend/tests/traits/error_006.phpt b/Zend/tests/traits/error_006.phpt
new file mode 100644
index 000000000..016932193
--- /dev/null
+++ b/Zend/tests/traits/error_006.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Trying to use an abstract class as trait
+--FILE--
+<?php
+
+abstract class abc {
+}
+
+class A {
+ use abc;
+}
+
+?>
+--EXPECTF--
+Fatal error: A cannot use abc - it is not a trait in %s on line %d
diff --git a/Zend/tests/traits/error_007.phpt b/Zend/tests/traits/error_007.phpt
new file mode 100644
index 000000000..82a6a2e94
--- /dev/null
+++ b/Zend/tests/traits/error_007.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Trying to instantiate a trait
+--FILE--
+<?php
+
+trait abc {
+}
+
+new abc;
+
+?>
+--EXPECTF--
+Fatal error: Cannot instantiate trait abc in %s on line %d
diff --git a/Zend/tests/traits/error_008.phpt b/Zend/tests/traits/error_008.phpt
new file mode 100644
index 000000000..ee97d756d
--- /dev/null
+++ b/Zend/tests/traits/error_008.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Trying to implement a trait
+--FILE--
+<?php
+
+trait abc { }
+
+class foo implements abc { }
+
+?>
+--EXPECTF--
+Fatal error: foo cannot implement abc - it is not an interface in %s on line %d
diff --git a/Zend/tests/traits/error_009.phpt b/Zend/tests/traits/error_009.phpt
new file mode 100644
index 000000000..a1eb6b413
--- /dev/null
+++ b/Zend/tests/traits/error_009.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Trying to extend a trait
+--FILE--
+<?php
+
+trait abc { }
+
+class foo extends abc { }
+
+?>
+--EXPECTF--
+Fatal error: Class foo cannot extend from trait abc in %s on line %d
diff --git a/Zend/tests/traits/error_010.phpt b/Zend/tests/traits/error_010.phpt
new file mode 100644
index 000000000..8f3f7dddf
--- /dev/null
+++ b/Zend/tests/traits/error_010.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Trying to exclude trait method multiple times
+--FILE--
+<?php
+
+trait foo {
+ public function test() { return 3; }
+}
+trait c {
+ public function test() { return 2; }
+}
+
+trait b {
+ public function test() { return 1; }
+}
+
+class bar {
+ use foo, c { c::test insteadof foo, b; }
+ use foo, c { c::test insteadof foo, b; }
+}
+
+$x = new bar;
+var_dump($x->test());
+
+?>
+--EXPECTF--
+Fatal error: Failed to evaluate a trait precedence (test). Method of trait foo was defined to be excluded multiple times in %s on line %d
diff --git a/Zend/tests/traits/error_011.phpt b/Zend/tests/traits/error_011.phpt
new file mode 100644
index 000000000..2d266dd1e
--- /dev/null
+++ b/Zend/tests/traits/error_011.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Testing trait collisions
+--FILE--
+<?php
+
+trait foo {
+ public function test() { return 3; }
+}
+trait c {
+ public function test() { return 2; }
+}
+
+trait b {
+ public function test() { return 1; }
+}
+
+class bar {
+ use foo, c, b;
+}
+
+$x = new bar;
+var_dump($x->test());
+
+?>
+--EXPECTF--
+Fatal error: Trait method test has not been applied, because there are collisions with other trait methods on bar in %s on line %d
diff --git a/Zend/tests/traits/error_012.phpt b/Zend/tests/traits/error_012.phpt
new file mode 100644
index 000000000..b90e32ac8
--- /dev/null
+++ b/Zend/tests/traits/error_012.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Trying to access a protected trait method
+--FILE--
+<?php
+
+trait foo {
+ public function test() { return 3; }
+}
+
+class bar {
+ use foo { test as protected; }
+}
+
+$x = new bar;
+var_dump($x->test());
+
+?>
+--EXPECTF--
+Fatal error: Call to protected method bar::test() from context '' in %s on line %d
diff --git a/Zend/tests/traits/error_013.phpt b/Zend/tests/traits/error_013.phpt
new file mode 100644
index 000000000..d9fda2d00
--- /dev/null
+++ b/Zend/tests/traits/error_013.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Trying to use static as method modifier
+--FILE--
+<?php
+
+trait foo {
+ public function test() { return 3; }
+}
+
+class bar {
+ use foo { test as static; }
+}
+
+$x = new bar;
+var_dump($x->test());
+
+?>
+--EXPECTF--
+Fatal error: Cannot use 'static' as method modifier in %s on line %d
diff --git a/Zend/tests/traits/error_014.phpt b/Zend/tests/traits/error_014.phpt
new file mode 100644
index 000000000..be1c91977
--- /dev/null
+++ b/Zend/tests/traits/error_014.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Trying to override final method
+--FILE--
+<?php
+
+trait foo {
+ public function test() { return 3; }
+}
+
+class baz {
+ final public function test() { return 4; }
+}
+
+class bar extends baz {
+ use foo { test as public; }
+}
+
+$x = new bar;
+var_dump($x->test());
+
+?>
+--EXPECTF--
+Fatal error: Cannot override final method baz::test() in %s on line %d
diff --git a/Zend/tests/traits/error_015.phpt b/Zend/tests/traits/error_015.phpt
new file mode 100644
index 000000000..efcffea5f
--- /dev/null
+++ b/Zend/tests/traits/error_015.phpt
@@ -0,0 +1,26 @@
+--TEST--
+Trying to add an alias to a trait method where there is another with same name.
+Should warn about the conflict.
+--FILE--
+<?php
+
+trait foo {
+ public function test() { return 3; }
+}
+
+trait baz {
+ public function test() { return 4; }
+}
+
+class bar {
+ use foo, baz {
+ baz::test as zzz;
+ }
+}
+
+$x = new bar;
+var_dump($x->test());
+
+?>
+--EXPECTF--
+Fatal error: Trait method test has not been applied, because there are collisions with other trait methods on bar in %s on line %d
diff --git a/Zend/tests/traits/error_016.phpt b/Zend/tests/traits/error_016.phpt
new file mode 100644
index 000000000..65a3a8348
--- /dev/null
+++ b/Zend/tests/traits/error_016.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Trying to create a constant on Trait
+--FILE--
+<?php
+
+trait foo {
+ const a = 1;
+}
+
+?>
+--EXPECTF--
+Fatal error: Traits cannot have constants in %s on line %d
diff --git a/Zend/tests/traits/flattening001.phpt b/Zend/tests/traits/flattening001.phpt
new file mode 100644
index 000000000..aa7f03dcb
--- /dev/null
+++ b/Zend/tests/traits/flattening001.phpt
@@ -0,0 +1,42 @@
+--TEST--
+Methods using object properties
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait T1 {
+ public function getText() {
+ return $this->text;
+ }
+}
+
+trait T2 {
+ public function setTextT2($val) {
+ $this->text = $val;
+ }
+}
+
+class TraitsTest {
+ use T1;
+ use T2;
+ private $text = 'test';
+ public function setText($val) {
+ $this->text = $val;
+ }
+}
+
+$o = new TraitsTest();
+var_dump($o->getText());
+
+$o->setText('foo');
+
+var_dump($o->getText());
+
+$o->setText('bar');
+
+var_dump($o->getText());
+?>
+--EXPECTF--
+string(4) "test"
+string(3) "foo"
+string(3) "bar" \ No newline at end of file
diff --git a/Zend/tests/traits/flattening002.phpt b/Zend/tests/traits/flattening002.phpt
new file mode 100644
index 000000000..251af2971
--- /dev/null
+++ b/Zend/tests/traits/flattening002.phpt
@@ -0,0 +1,28 @@
+--TEST--
+parent:: works like in a method defined without traits.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+class Base {
+ public function sayHello() {
+ echo 'Hello ';
+ }
+}
+
+trait SayWorld {
+ public function sayHello() {
+ parent::sayHello();
+ echo 'World!';
+ }
+}
+
+class MyHelloWorld extends Base {
+ use SayWorld;
+}
+
+$o = new MyHelloWorld();
+$o->sayHello();
+?>
+--EXPECTF--
+Hello World! \ No newline at end of file
diff --git a/Zend/tests/traits/flattening003.phpt b/Zend/tests/traits/flattening003.phpt
new file mode 100644
index 000000000..d189ca70c
--- /dev/null
+++ b/Zend/tests/traits/flattening003.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Traits are flattened recurivly.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait Hello {
+ public function sayHello() {
+ echo 'Hello ';
+ }
+}
+
+trait World {
+ public function sayWorld() {
+ echo 'World!';
+ }
+}
+
+trait HelloWorld {
+ use Hello, World;
+}
+
+class MyHelloWorld {
+ use HelloWorld;
+}
+
+$o = new MyHelloWorld();
+$o->sayHello();
+$o->sayWorld();
+?>
+--EXPECTF--
+Hello World! \ No newline at end of file
diff --git a/Zend/tests/traits/get_declared_traits_001.phpt b/Zend/tests/traits/get_declared_traits_001.phpt
new file mode 100644
index 000000000..91f6b3d20
--- /dev/null
+++ b/Zend/tests/traits/get_declared_traits_001.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Testing get_declared_traits()
+--FILE--
+<?php
+
+class a { }
+interface b { }
+trait c { }
+abstract class d { }
+final class e { }
+
+var_dump(get_declared_traits());
+
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ string(1) "c"
+}
diff --git a/Zend/tests/traits/get_declared_traits_002.phpt b/Zend/tests/traits/get_declared_traits_002.phpt
new file mode 100644
index 000000000..74fdcc408
--- /dev/null
+++ b/Zend/tests/traits/get_declared_traits_002.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Testing get_declared_traits() inside namespace
+--FILE--
+<?php
+
+namespace test {
+ class a { }
+ interface b { }
+ trait c { }
+ abstract class d { }
+ final class e { }
+ var_dump(get_declared_traits());
+}
+
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ string(6) "test\c"
+}
diff --git a/Zend/tests/traits/get_declared_traits_003.phpt b/Zend/tests/traits/get_declared_traits_003.phpt
new file mode 100644
index 000000000..4a687467f
--- /dev/null
+++ b/Zend/tests/traits/get_declared_traits_003.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Testing get_declared_classes() and get_declared_traits()
+--FILE--
+<?php
+
+class a { }
+interface b { }
+trait c { }
+abstract class d { }
+final class e { }
+var_dump(get_declared_classes());
+var_dump(get_declared_traits());
+
+?>
+--EXPECTF--
+%astring(1) "a"
+ [%d]=>
+ string(1) "d"
+ [%d]=>
+ string(1) "e"
+}
+array(1) {
+ [0]=>
+ string(1) "c"
+}
diff --git a/Zend/tests/traits/inheritance001.phpt b/Zend/tests/traits/inheritance001.phpt
new file mode 100644
index 000000000..e8195c474
--- /dev/null
+++ b/Zend/tests/traits/inheritance001.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Trait method overwridden by a method defined in the class.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait HelloWorld {
+ public function sayHello() {
+ echo 'Hello World!';
+ }
+}
+
+class TheWorldIsNotEnough {
+ use HelloWorld;
+ public function sayHello() {
+ echo 'Hello Universe!';
+ }
+}
+
+$o = new TheWorldIsNotEnough();
+$o->sayHello(); // echos Hello Universe!
+?>
+--EXPECTF--
+Hello Universe! \ No newline at end of file
diff --git a/Zend/tests/traits/inheritance002.phpt b/Zend/tests/traits/inheritance002.phpt
new file mode 100644
index 000000000..51badc5a4
--- /dev/null
+++ b/Zend/tests/traits/inheritance002.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Trait method overriddes base class method
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+class Base {
+ public function sayHello() {
+ echo 'Hello ';
+ }
+}
+
+trait SayWorld {
+ public function sayHello() {
+ echo 'World!';
+ }
+}
+
+class MyHelloWorld extends Base {
+ use SayWorld;
+}
+
+$o = new MyHelloWorld();
+$o->sayHello();
+?>
+--EXPECTF--
+World! \ No newline at end of file
diff --git a/Zend/tests/traits/inheritance003.phpt b/Zend/tests/traits/inheritance003.phpt
new file mode 100644
index 000000000..a41c4e484
--- /dev/null
+++ b/Zend/tests/traits/inheritance003.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Trait method overrides base class method and satisfies prototype
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+abstract class Base {
+ public abstract function sayHello(array $a);
+}
+
+class SubClass extends Base {
+ public function sayHello(array $a) {
+ echo "World!\n";
+ }
+}
+
+$s = new SubClass();
+$s->sayHello(array());
+
+
+trait SayWorld {
+ public function sayHello(Base $d) {
+ echo 'World!';
+ }
+}
+
+class MyHelloWorld extends Base {
+ use SayWorld;
+}
+
+$o = new MyHelloWorld();
+$o->sayHello(array());
+
+?>
+--EXPECTF--
+World!
+
+Fatal error: Declaration of MyHelloWorld::sayHello() must be compatible with Base::sayHello(array $a) in %s on line %d
diff --git a/Zend/tests/traits/interface_001.phpt b/Zend/tests/traits/interface_001.phpt
new file mode 100644
index 000000000..a14f78efc
--- /dev/null
+++ b/Zend/tests/traits/interface_001.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Using traits to implement interface
+--FILE--
+<?php
+
+trait foo {
+ public function abc() {
+ }
+}
+
+interface baz {
+ public function abc();
+}
+
+class bar implements baz {
+ use foo;
+
+}
+
+new bar;
+print "OK\n";
+
+?>
+--EXPECT--
+OK
diff --git a/Zend/tests/traits/interface_002.phpt b/Zend/tests/traits/interface_002.phpt
new file mode 100644
index 000000000..462d73fbd
--- /dev/null
+++ b/Zend/tests/traits/interface_002.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Checking error message when the trait doesn't implements the interface
+--FILE--
+<?php
+
+trait foo {
+ public function a() {
+ }
+}
+
+interface baz {
+ public function abc();
+}
+
+class bar implements baz {
+ use foo;
+
+}
+
+new bar;
+
+?>
+--EXPECTF--
+Fatal error: Class bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (baz::abc) in %s on line %d
diff --git a/Zend/tests/traits/interface_003.phpt b/Zend/tests/traits/interface_003.phpt
new file mode 100644
index 000000000..aa13bd8b5
--- /dev/null
+++ b/Zend/tests/traits/interface_003.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Testing to implement Serializable interface by traits
+--FILE--
+<?php
+
+trait foo {
+ public function serialize() {
+ return 'foobar';
+ }
+ public function unserialize($x) {
+ var_dump($x);
+ }
+}
+
+class bar implements Serializable {
+ use foo;
+}
+
+var_dump($o = serialize(new bar));
+var_dump(unserialize($o));
+
+?>
+--EXPECTF--
+string(20) "C:3:"bar":6:{foobar}"
+string(6) "foobar"
+object(bar)#%d (0) {
+}
diff --git a/Zend/tests/traits/language001.phpt b/Zend/tests/traits/language001.phpt
new file mode 100644
index 000000000..d89211241
--- /dev/null
+++ b/Zend/tests/traits/language001.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Single Trait with simple trait method
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello {
+ public function hello() {
+ echo 'Hello';
+ }
+}
+
+class TraitsTest {
+ use THello;
+}
+
+$test = new TraitsTest();
+$test->hello();
+?>
+--EXPECTF--
+Hello
diff --git a/Zend/tests/traits/language002.phpt b/Zend/tests/traits/language002.phpt
new file mode 100644
index 000000000..d093f2952
--- /dev/null
+++ b/Zend/tests/traits/language002.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Use multiple traits.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait Hello {
+ public function sayHello() {
+ echo 'Hello ';
+ }
+}
+
+trait World {
+ public function sayWorld() {
+ echo 'World';
+ }
+}
+
+class MyHelloWorld {
+ use Hello, World;
+ public function sayExclamationMark() {
+ echo '!';
+ }
+}
+
+$o = new MyHelloWorld();
+$o->sayHello();
+$o->sayWorld();
+$o->sayExclamationMark();
+?>
+--EXPECTF--
+Hello World! \ No newline at end of file
diff --git a/Zend/tests/traits/language003.phpt b/Zend/tests/traits/language003.phpt
new file mode 100644
index 000000000..77d4429f4
--- /dev/null
+++ b/Zend/tests/traits/language003.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Use instead to solve a conflict.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait Hello {
+ public function saySomething() {
+ echo 'Hello';
+ }
+}
+
+trait World {
+ public function saySomething() {
+ echo 'World';
+ }
+}
+
+class MyHelloWorld {
+ use Hello, World {
+ Hello::saySomething insteadof World;
+ }
+}
+
+$o = new MyHelloWorld();
+$o->saySomething();
+?>
+--EXPECTF--
+Hello \ No newline at end of file
diff --git a/Zend/tests/traits/language004.phpt b/Zend/tests/traits/language004.phpt
new file mode 100644
index 000000000..4df307ab8
--- /dev/null
+++ b/Zend/tests/traits/language004.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Use instead to solve a conflict and as to access the method.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait Hello {
+ public function saySomething() {
+ echo 'Hello';
+ }
+}
+
+trait World {
+ public function saySomething() {
+ echo ' World';
+ }
+}
+
+class MyHelloWorld {
+ use Hello, World {
+ Hello::saySomething insteadof World;
+ World::saySomething as sayWorld;
+ }
+}
+
+$o = new MyHelloWorld();
+$o->saySomething();
+$o->sayWorld();
+?>
+--EXPECTF--
+Hello World \ No newline at end of file
diff --git a/Zend/tests/traits/language005.phpt b/Zend/tests/traits/language005.phpt
new file mode 100644
index 000000000..20eaeb35c
--- /dev/null
+++ b/Zend/tests/traits/language005.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Use instead to solve a conflict and as to access the method.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait A {
+ public function smallTalk() {
+ echo 'a';
+ }
+ public function bigTalk() {
+ echo 'A';
+ }
+}
+
+trait B {
+ public function smallTalk() {
+ echo 'b';
+ }
+ public function bigTalk() {
+ echo 'B';
+ }
+}
+
+class Talker {
+ use A, B {
+ B::smallTalk insteadof A;
+ A::bigTalk insteadof B;
+ B::bigTalk as talk;
+ }
+}
+
+$t = new Talker;
+$t->smallTalk();
+$t->bigTalk();
+$t->talk();
+
+?>
+--EXPECTF--
+bAB \ No newline at end of file
diff --git a/Zend/tests/traits/language006.phpt b/Zend/tests/traits/language006.phpt
new file mode 100644
index 000000000..5a32359bb
--- /dev/null
+++ b/Zend/tests/traits/language006.phpt
@@ -0,0 +1,31 @@
+--TEST--
+Express requirements of a trait by abstract methods.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait Hello {
+ public function sayHelloWorld() {
+ echo 'Hello'.$this->getWorld();
+ }
+ abstract public function getWorld();
+ }
+
+class MyHelloWorld {
+ private $world;
+ use Hello;
+ public function getWorld() {
+ return $this->world;
+ }
+ public function setWorld($val) {
+ $this->world = $val;
+ }
+}
+
+$o = new MyHelloWorld();
+$o->setWorld(' World!');
+$o->sayHelloWorld();
+
+?>
+--EXPECTF--
+Hello World! \ No newline at end of file
diff --git a/Zend/tests/traits/language007.phpt b/Zend/tests/traits/language007.phpt
new file mode 100644
index 000000000..3b65d0123
--- /dev/null
+++ b/Zend/tests/traits/language007.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Traits can fulfill the requirements of abstract base classes.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+abstract class Base {
+ abstract function sayWorld();
+}
+
+trait Hello {
+ public function sayHello() {
+ echo 'Hello';
+ }
+ public function sayWorld() {
+ echo ' World!';
+ }
+ }
+
+class MyHelloWorld extends Base {
+ use Hello;
+}
+
+$o = new MyHelloWorld();
+$o->sayHello();
+$o->sayWorld();
+
+?>
+--EXPECTF--
+Hello World! \ No newline at end of file
diff --git a/Zend/tests/traits/language008a.phpt b/Zend/tests/traits/language008a.phpt
new file mode 100644
index 000000000..5a12a4e74
--- /dev/null
+++ b/Zend/tests/traits/language008a.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Visibility can be changed with the as aliasing construct as well.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait HelloWorld {
+ public function sayHello() {
+ echo 'Hello World!';
+ }
+}
+
+class MyClass {
+ use HelloWorld { sayHello as protected; }
+}
+
+
+$o = new MyClass;
+$o->sayHello();
+
+?>
+--EXPECTF--
+Fatal error: Call to protected method MyClass::sayHello() from context '' in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/language008b.phpt b/Zend/tests/traits/language008b.phpt
new file mode 100644
index 000000000..9abbdbeb0
--- /dev/null
+++ b/Zend/tests/traits/language008b.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Visibility can be changed with the as aliasing construct as well.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait HelloWorld {
+ public function sayHello() {
+ echo 'Hello World!';
+ }
+}
+
+class MyClass {
+ use HelloWorld { sayHello as private sayHelloWorld; }
+
+ public function callPrivateAlias() {
+ $this->sayHelloWorld();
+ }
+}
+
+$o = new MyClass();
+$o->sayHello();
+$o->callPrivateAlias();
+$o->sayHelloWorld();
+
+
+?>
+--EXPECTF--
+Hello World!Hello World!
+Fatal error: Call to private method MyClass::sayHelloWorld() from context '' in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/language009.phpt b/Zend/tests/traits/language009.phpt
new file mode 100644
index 000000000..e55c8d84a
--- /dev/null
+++ b/Zend/tests/traits/language009.phpt
@@ -0,0 +1,36 @@
+--TEST--
+In instead definitions all trait whose methods are meant to be hidden can be listed.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait A {
+ public function foo() {
+ echo 'a';
+ }
+}
+
+trait B {
+ public function foo() {
+ echo 'b';
+ }
+}
+
+trait C {
+ public function foo() {
+ echo 'c';
+ }
+}
+
+class MyClass {
+ use C, A, B {
+ B::foo insteadof A, C;
+ }
+}
+
+$t = new MyClass;
+$t->foo();
+
+?>
+--EXPECTF--
+b \ No newline at end of file
diff --git a/Zend/tests/traits/language010.phpt b/Zend/tests/traits/language010.phpt
new file mode 100644
index 000000000..e550abb7b
--- /dev/null
+++ b/Zend/tests/traits/language010.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Aliasing leading to conflict should result in error message
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait Hello {
+ public function hello() {
+ echo 'Hello';
+ }
+}
+
+trait World {
+ public function world() {
+ echo ' World!';
+ }
+}
+
+
+class MyClass {
+ use Hello, World { hello as world; }
+}
+
+$o = new MyClass();
+$o->hello();
+$o->world();
+
+?>
+--EXPECTF--
+Fatal error: Trait method world has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/language011.phpt b/Zend/tests/traits/language011.phpt
new file mode 100644
index 000000000..585699da5
--- /dev/null
+++ b/Zend/tests/traits/language011.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Aliasing on conflicting method should not cover up conflict.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait Hello {
+ public function sayHello() {
+ echo 'Hello';
+ }
+}
+
+trait World {
+ public function sayHello() {
+ echo ' World!';
+ }
+}
+
+
+class MyClass {
+ use Hello, World { sayHello as sayWorld; }
+}
+
+$o = new MyClass();
+$o->sayHello();
+$o->sayWorld();
+
+?>
+--EXPECTF--
+Fatal error: Trait method sayHello has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d
diff --git a/Zend/tests/traits/language012.phpt b/Zend/tests/traits/language012.phpt
new file mode 100644
index 000000000..481dd64ec
--- /dev/null
+++ b/Zend/tests/traits/language012.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Statics should work in traits, too.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait Counter {
+ public function inc() {
+ static $c = 0;
+ $c = $c + 1;
+ echo "$c\n";
+ }
+}
+
+
+class C1 {
+ use Counter;
+}
+
+$o = new C1();
+$o->inc();
+$o->inc();
+
+?>
+--EXPECTF--
+1
+2
diff --git a/Zend/tests/traits/language013.phpt b/Zend/tests/traits/language013.phpt
new file mode 100644
index 000000000..a55cbbed3
--- /dev/null
+++ b/Zend/tests/traits/language013.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Statics work like expected for language-based copy'n'paste. No link between methods from the same trait.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait Counter {
+ public function inc() {
+ static $c = 0;
+ $c = $c + 1;
+ echo "$c\n";
+ }
+}
+
+
+class C1 {
+ use Counter;
+}
+
+class C2 {
+ use Counter;
+}
+
+$o = new C1();
+$o->inc();
+$o->inc();
+
+$p = new C2();
+$p->inc();
+$p->inc();
+
+?>
+--EXPECTF--
+1
+2
+1
+2
diff --git a/Zend/tests/traits/methods_001.phpt b/Zend/tests/traits/methods_001.phpt
new file mode 100644
index 000000000..e1ee8152a
--- /dev/null
+++ b/Zend/tests/traits/methods_001.phpt
@@ -0,0 +1,39 @@
+--TEST--
+Testing magic method on trait
+--FILE--
+<?php
+
+trait foo {
+ public function __toString() {
+ return '123';
+ }
+
+ public function __get($x) {
+ var_dump($x);
+ }
+
+ public function __set($attr, $val) {
+ var_dump($attr .'==='. $val);
+ }
+
+ public function __clone() {
+ var_dump(__FUNCTION__);
+ }
+}
+
+class bar {
+ use foo;
+}
+
+$o = new bar;
+echo $o, PHP_EOL;
+$o->xyz;
+$o->xyz = 2;
+clone $o;
+
+?>
+--EXPECT--
+123
+string(3) "xyz"
+string(7) "xyz===2"
+string(7) "__clone"
diff --git a/Zend/tests/traits/methods_002.phpt b/Zend/tests/traits/methods_002.phpt
new file mode 100644
index 000000000..4ed64c1a5
--- /dev/null
+++ b/Zend/tests/traits/methods_002.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Testing collision with magic methods
+--FILE--
+<?php
+
+trait foo {
+ public function __clone() {
+ var_dump(__FUNCTION__);
+ }
+}
+
+trait baz {
+ public function __clone() {
+ var_dump(__FUNCTION__);
+ }
+}
+
+class bar {
+ use foo;
+ use baz;
+}
+
+$o = new bar;
+var_dump(clone $o);
+
+?>
+--EXPECTF--
+Fatal error: Trait method __clone has not been applied, because there are collisions with other trait methods on bar in %s on line %d
diff --git a/Zend/tests/traits/methods_003.phpt b/Zend/tests/traits/methods_003.phpt
new file mode 100644
index 000000000..1c1218ae3
--- /dev/null
+++ b/Zend/tests/traits/methods_003.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Testing __construct and __destruct with Trait
+--FILE--
+<?php
+
+trait foo {
+ public function __construct() {
+ var_dump(__FUNCTION__);
+ }
+ public function __destruct() {
+ var_dump(__FUNCTION__);
+ }
+}
+
+class bar {
+ use foo;
+}
+
+new bar;
+
+?>
+--EXPECT--
+string(11) "__construct"
+string(10) "__destruct"
diff --git a/Zend/tests/traits/noctor001.phpt b/Zend/tests/traits/noctor001.phpt
new file mode 100644
index 000000000..d15acff87
--- /dev/null
+++ b/Zend/tests/traits/noctor001.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Don't mark trait methods as constructor
+--FILE--
+<?php
+trait Foo {
+ public function Foo() {
+ }
+}
+
+class Bar {
+ use Foo;
+ public function Bar() {
+ }
+}
+
+$rfoofoo = new ReflectionMethod('Foo::Foo');
+var_dump($rfoofoo->isConstructor());
+
+$rbarfoo = new ReflectionMethod('Bar::Foo');
+var_dump($rbarfoo->isConstructor());
+
+$rbarbar = new ReflectionMethod('Bar::Bar');
+var_dump($rbarbar->isConstructor());
+?>
+--EXPECT--
+bool(false)
+bool(false)
+bool(true)
diff --git a/Zend/tests/traits/property001.phpt b/Zend/tests/traits/property001.phpt
new file mode 100644
index 000000000..d5e4ddc61
--- /dev/null
+++ b/Zend/tests/traits/property001.phpt
@@ -0,0 +1,41 @@
+--TEST--
+Potentially conflicting properties should result in a strict notice. Property use is discorage for traits that are supposed to enable maintainable code reuse. Accessor methods are the language supported idiom for this.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello1 {
+ private $foo;
+}
+
+trait THello2 {
+ private $foo;
+}
+
+echo "PRE-CLASS-GUARD-TraitsTest\n";
+error_reporting(E_ALL & ~E_STRICT); // ensuring that it is only for E_STRICT
+
+class TraitsTest {
+ use THello1;
+ use THello2;
+}
+
+error_reporting(E_ALL | E_STRICT);
+
+echo "PRE-CLASS-GUARD-TraitsTest2\n";
+
+class TraitsTest2 {
+ use THello1;
+ use THello2;
+}
+
+var_dump(property_exists('TraitsTest', 'foo'));
+var_dump(property_exists('TraitsTest2', 'foo'));
+?>
+--EXPECTF--
+PRE-CLASS-GUARD-TraitsTest
+PRE-CLASS-GUARD-TraitsTest2
+
+Strict Standards: THello1 and THello2 define the same property ($foo) in the composition of TraitsTest2. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
+bool(true)
+bool(true) \ No newline at end of file
diff --git a/Zend/tests/traits/property002.phpt b/Zend/tests/traits/property002.phpt
new file mode 100644
index 000000000..27361e04d
--- /dev/null
+++ b/Zend/tests/traits/property002.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Non-conflicting properties should work just fine.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello1 {
+ public $hello = "hello";
+}
+
+trait THello2 {
+ private $world = "World!";
+}
+
+class TraitsTest {
+ use THello1;
+ use THello2;
+ function test() {
+ echo $this->hello . ' ' . $this->world;
+ }
+}
+
+var_dump(property_exists('TraitsTest', 'hello'));
+var_dump(property_exists('TraitsTest', 'world'));
+
+$t = new TraitsTest;
+$t->test();
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+hello World! \ No newline at end of file
diff --git a/Zend/tests/traits/property003.phpt b/Zend/tests/traits/property003.phpt
new file mode 100644
index 000000000..b4f0105d2
--- /dev/null
+++ b/Zend/tests/traits/property003.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Conflicting properties with different visibility modifiers should result in a fatal error, since this indicates that the code is incompatible.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello1 {
+ public $hello;
+}
+
+trait THello2 {
+ private $hello;
+}
+
+echo "PRE-CLASS-GUARD\n";
+
+class TraitsTest {
+ use THello1;
+ use THello2;
+}
+
+echo "POST-CLASS-GUARD\n";
+
+$t = new TraitsTest;
+$t->hello = "foo";
+?>
+--EXPECTF--
+PRE-CLASS-GUARD
+
+Fatal error: THello1 and THello2 define the same property ($hello) in the composition of TraitsTest. However, the definition differs and is considered incompatible. Class was composed in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/property004.phpt b/Zend/tests/traits/property004.phpt
new file mode 100644
index 000000000..393b492b7
--- /dev/null
+++ b/Zend/tests/traits/property004.phpt
@@ -0,0 +1,30 @@
+--TEST--
+Conflicting properties with different initial values are considered incompatible.
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+trait THello1 {
+ public $hello = "foo";
+}
+
+trait THello2 {
+ private $hello = "bar";
+}
+
+echo "PRE-CLASS-GUARD\n";
+
+class TraitsTest {
+ use THello1;
+ use THello2;
+ public function getHello() {
+ return $this->hello;
+ }
+}
+
+$t = new TraitsTest;
+?>
+--EXPECTF--
+PRE-CLASS-GUARD
+
+Fatal error: THello1 and THello2 define the same property ($hello) in the composition of TraitsTest. However, the definition differs and is considered incompatible. Class was composed in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/property005.phpt b/Zend/tests/traits/property005.phpt
new file mode 100644
index 000000000..899a332ac
--- /dev/null
+++ b/Zend/tests/traits/property005.phpt
@@ -0,0 +1,40 @@
+--TEST--
+The same rules are applied for properties that are defined in the class hierarchy. Thus, if the properties are compatible, a notice is issued, if not a fatal error occures.
+--FILE--
+<?php
+error_reporting(E_ALL | E_STRICT);
+
+class Base {
+ private $hello;
+}
+
+trait THello1 {
+ private $hello;
+}
+
+echo "PRE-CLASS-GUARD\n";
+class Notice extends Base {
+ use THello1;
+ private $hello;
+}
+echo "POST-CLASS-GUARD\n";
+
+// now we do the test for a fatal error
+
+class TraitsTest {
+ use THello1;
+ public $hello;
+}
+
+echo "POST-CLASS-GUARD2\n";
+
+$t = new TraitsTest;
+$t->hello = "foo";
+?>
+--EXPECTF--
+PRE-CLASS-GUARD
+
+Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
+POST-CLASS-GUARD
+
+Fatal error: TraitsTest and THello1 define the same property ($hello) in the composition of TraitsTest. However, the definition differs and is considered incompatible. Class was composed in %s on line %d
diff --git a/Zend/tests/traits/property006.phpt b/Zend/tests/traits/property006.phpt
new file mode 100644
index 000000000..1a709199a
--- /dev/null
+++ b/Zend/tests/traits/property006.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Introducing new private variables of the same name in a subclass is ok, and does not lead to any output. That is consitent with normal inheritance handling.
+--FILE--
+<?php
+error_reporting(E_ALL | E_STRICT);
+
+class Base {
+ private $hello;
+}
+
+trait THello1 {
+ private $hello;
+}
+
+// Now we use the trait, which happens to introduce another private variable
+// but they are distinct, and not related to each other, so no warning.
+echo "PRE-CLASS-GUARD\n";
+class SameNameInSubClassNoNotice extends Base {
+ use THello1;
+}
+echo "POST-CLASS-GUARD\n";
+
+// now the same with a class that defines the property itself,
+// that should give the expected strict warning.
+
+class Notice extends Base {
+ use THello1;
+ private $hello;
+}
+echo "POST-CLASS-GUARD2\n";
+?>
+--EXPECTF--
+PRE-CLASS-GUARD
+POST-CLASS-GUARD
+
+Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
+POST-CLASS-GUARD2
diff --git a/Zend/tests/traits/property007.phpt b/Zend/tests/traits/property007.phpt
new file mode 100644
index 000000000..0f7c3b394
--- /dev/null
+++ b/Zend/tests/traits/property007.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Introducing new private variables of the same name in a subclass is ok, and does not lead to any output. That is consitent with normal inheritance handling.
+--FILE--
+<?php
+error_reporting(E_ALL | E_STRICT);
+
+class Base {
+ protected $hello;
+}
+
+trait THello1 {
+ protected $hello;
+}
+
+// Protected and public are handle more strict with a warning then what is
+// expected from normal inheritance since they can have easier coliding semantics
+echo "PRE-CLASS-GUARD\n";
+class SameNameInSubClassProducesNotice extends Base {
+ use THello1;
+}
+echo "POST-CLASS-GUARD\n";
+
+// now the same with a class that defines the property itself, too.
+
+class Notice extends Base {
+ use THello1;
+ protected $hello;
+}
+echo "POST-CLASS-GUARD2\n";
+?>
+--EXPECTF--
+PRE-CLASS-GUARD
+
+Strict Standards: Base and THello1 define the same property ($hello) in the composition of SameNameInSubClassProducesNotice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
+POST-CLASS-GUARD
+
+Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
+POST-CLASS-GUARD2
diff --git a/Zend/tests/traits/property008.phpt b/Zend/tests/traits/property008.phpt
new file mode 100644
index 000000000..e263692d6
--- /dev/null
+++ b/Zend/tests/traits/property008.phpt
@@ -0,0 +1,62 @@
+--TEST--
+Handling of private fields with traits needs to have same semantics as with normal inheritance.
+--FILE--
+<?php
+error_reporting(E_ALL | E_STRICT);
+
+class BaseWithPropA {
+ private $hello = 0;
+}
+
+// This is how privates are handled in normal inheritance
+class SubclassClassicInheritance extends BaseWithPropA {
+ private $hello = 0;
+}
+
+// And here, we need to make sure, that the traits behave the same
+
+trait AHelloProperty {
+ private $hello = 0;
+}
+
+class BaseWithTPropB {
+ use AHelloProperty;
+}
+
+class SubclassA extends BaseWithPropA {
+ use AHelloProperty;
+}
+
+class SubclassB extends BaseWithTPropB {
+ use AHelloProperty;
+}
+
+$classic = new SubclassClassicInheritance;
+var_dump($classic);
+
+$a = new SubclassA;
+var_dump($a);
+
+$b = new SubclassB;
+var_dump($b);
+
+?>
+--EXPECTF--
+object(SubclassClassicInheritance)#1 (2) {
+ ["hello":"SubclassClassicInheritance":private]=>
+ int(0)
+ ["hello":"BaseWithPropA":private]=>
+ int(0)
+}
+object(SubclassA)#2 (2) {
+ ["hello":"SubclassA":private]=>
+ int(0)
+ ["hello":"BaseWithPropA":private]=>
+ int(0)
+}
+object(SubclassB)#3 (2) {
+ ["hello":"SubclassB":private]=>
+ int(0)
+ ["hello":"BaseWithTPropB":private]=>
+ int(0)
+} \ No newline at end of file
diff --git a/Zend/tests/traits/property009.phpt b/Zend/tests/traits/property009.phpt
new file mode 100644
index 000000000..135129d31
--- /dev/null
+++ b/Zend/tests/traits/property009.phpt
@@ -0,0 +1,59 @@
+--TEST--
+Handling of public fields with traits needs to have same semantics as with normal inheritance, however, we do add strict warnings since it is easier to run into something unexpeted with changing traits.
+--FILE--
+<?php
+error_reporting(E_ALL | E_STRICT);
+
+class BaseWithPropA {
+ public $hello = 0;
+}
+
+// This is how publics are handled in normal inheritance
+class SubclassClassicInheritance extends BaseWithPropA {
+ public $hello = 0;
+}
+
+// And here, we need to make sure, that the traits behave the same
+
+trait AHelloProperty {
+ public $hello = 0;
+}
+
+class BaseWithTPropB {
+ use AHelloProperty;
+}
+
+class SubclassA extends BaseWithPropA {
+ use AHelloProperty;
+}
+
+class SubclassB extends BaseWithTPropB {
+ use AHelloProperty;
+}
+
+$classic = new SubclassClassicInheritance;
+var_dump($classic);
+
+$a = new SubclassA;
+var_dump($a);
+
+$b = new SubclassB;
+var_dump($b);
+
+?>
+--EXPECTF--
+Strict Standards: BaseWithPropA and AHelloProperty define the same property ($hello) in the composition of SubclassA. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
+
+Strict Standards: BaseWithTPropB and AHelloProperty define the same property ($hello) in the composition of SubclassB. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
+object(SubclassClassicInheritance)#1 (1) {
+ ["hello"]=>
+ int(0)
+}
+object(SubclassA)#2 (1) {
+ ["hello"]=>
+ int(0)
+}
+object(SubclassB)#3 (1) {
+ ["hello"]=>
+ int(0)
+} \ No newline at end of file
diff --git a/Zend/tests/traits/static_001.phpt b/Zend/tests/traits/static_001.phpt
new file mode 100644
index 000000000..d86cb851b
--- /dev/null
+++ b/Zend/tests/traits/static_001.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Traits with static methods.
+--CREDITS--
+Simas Toleikis simast@gmail.com
+--FILE--
+<?php
+
+ trait TestTrait {
+ public static function test() {
+ return 'Test';
+ }
+ }
+
+ class A {
+ use TestTrait;
+ }
+
+ echo A::test();
+
+?>
+--EXPECT--
+Test \ No newline at end of file
diff --git a/Zend/tests/traits/static_002.phpt b/Zend/tests/traits/static_002.phpt
new file mode 100644
index 000000000..c07608551
--- /dev/null
+++ b/Zend/tests/traits/static_002.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Traits with static methods referenced using variable.
+--CREDITS--
+Simas Toleikis simast@gmail.com
+--FILE--
+<?php
+
+ trait TestTrait {
+ public static function test() {
+ return 'Test';
+ }
+ }
+
+ class A {
+ use TestTrait;
+ }
+
+ $class = "A";
+ echo $class::test();
+
+?>
+--EXPECT--
+Test \ No newline at end of file
diff --git a/Zend/tests/traits/static_003.phpt b/Zend/tests/traits/static_003.phpt
new file mode 100644
index 000000000..fbe5421c7
--- /dev/null
+++ b/Zend/tests/traits/static_003.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Traits with late static bindings.
+--CREDITS--
+Simas Toleikis simast@gmail.com
+--FILE--
+<?php
+
+ trait TestTrait {
+ public static function test() {
+ return static::$test;
+ }
+ }
+
+ class A {
+ use TestTrait;
+ protected static $test = "Test A";
+ }
+
+ class B extends A {
+ protected static $test = "Test B";
+ }
+
+ echo B::test();
+
+?>
+--EXPECT--
+Test B \ No newline at end of file
diff --git a/Zend/tests/traits/static_004.phpt b/Zend/tests/traits/static_004.phpt
new file mode 100644
index 000000000..c360f457f
--- /dev/null
+++ b/Zend/tests/traits/static_004.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Traits with __callStatic magic method.
+--CREDITS--
+Simas Toleikis simast@gmail.com
+--FILE--
+<?php
+
+ trait TestTrait {
+ public static function __callStatic($name, $arguments) {
+ return $name;
+ }
+ }
+
+ class A {
+ use TestTrait;
+ }
+
+ echo A::Test();
+
+?>
+--EXPECT--
+Test \ No newline at end of file
diff --git a/Zend/tests/traits/static_forward_static_call.phpt b/Zend/tests/traits/static_forward_static_call.phpt
new file mode 100644
index 000000000..878cf1fcc
--- /dev/null
+++ b/Zend/tests/traits/static_forward_static_call.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Traits and forward_static_call().
+--CREDITS--
+Simas Toleikis simast@gmail.com
+--FILE--
+<?php
+
+ trait TestTrait {
+ public static function test() {
+ return 'Forwarded '.forward_static_call(array('A', 'test'));
+ }
+ }
+
+ class A {
+ public static function test() {
+ return "Test A";
+ }
+ }
+
+ class B extends A {
+ use TestTrait;
+ }
+
+ echo B::test();
+
+?>
+--EXPECT--
+Forwarded Test A \ No newline at end of file
diff --git a/Zend/tests/traits/static_get_called_class.phpt b/Zend/tests/traits/static_get_called_class.phpt
new file mode 100644
index 000000000..dc29ecefa
--- /dev/null
+++ b/Zend/tests/traits/static_get_called_class.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Traits and get_called_class().
+--CREDITS--
+Simas Toleikis simast@gmail.com
+--FILE--
+<?php
+
+ trait TestTrait {
+ public static function test() {
+ return get_called_class();
+ }
+ }
+
+ class A {
+ use TestTrait;
+ }
+
+ class B extends A { }
+
+ echo B::test();
+
+?>
+--EXPECT--
+B \ No newline at end of file
diff --git a/Zend/tests/traits/trait_constant_001.phpt b/Zend/tests/traits/trait_constant_001.phpt
new file mode 100644
index 000000000..0fd8ff921
--- /dev/null
+++ b/Zend/tests/traits/trait_constant_001.phpt
@@ -0,0 +1,36 @@
+--TEST--
+__TRAIT__: Basics, a constant denoiting the trait of definition.
+--FILE--
+<?php
+
+trait TestTrait {
+ public static function test() {
+ return __TRAIT__;
+ }
+}
+
+class Direct {
+ use TestTrait;
+}
+
+class IndirectInheritance extends Direct {
+
+}
+
+trait TestTraitIndirect {
+ use TestTrait;
+}
+
+class Indirect {
+ use TestTraitIndirect;
+}
+
+echo Direct::test()."\n";
+echo IndirectInheritance::test()."\n";
+echo Indirect::test()."\n";
+
+?>
+--EXPECT--
+TestTrait
+TestTrait
+TestTrait
diff --git a/Zend/tests/traits/trait_constant_002.phpt b/Zend/tests/traits/trait_constant_002.phpt
new file mode 100644
index 000000000..327dd44a6
--- /dev/null
+++ b/Zend/tests/traits/trait_constant_002.phpt
@@ -0,0 +1,27 @@
+--TEST--
+__TRAIT__: Use outside of traits.
+--FILE--
+<?php
+
+ class MyClass {
+ static function test() {
+ return __TRAIT__;
+ }
+ }
+
+ function someFun() {
+ return __TRAIT__;
+ }
+
+
+ $t = __TRAIT__;
+ var_dump($t);
+ $t = MyClass::test();
+ var_dump($t);
+ $t = someFun();
+ var_dump($t);
+?>
+--EXPECT--
+string(0) ""
+string(0) ""
+string(0) "" \ No newline at end of file
diff --git a/Zend/tests/unset_cv05.phpt b/Zend/tests/unset_cv05.phpt
index 90ebc6ba3..36fea3bc4 100644
--- a/Zend/tests/unset_cv05.phpt
+++ b/Zend/tests/unset_cv05.phpt
@@ -1,7 +1,6 @@
--TEST--
unset() CV 5 (indirect unset() of global variable in session_start())
--INI--
-register_long_arrays=1
session.auto_start=0
session.save_handler=files
--SKIPIF--
@@ -12,18 +11,19 @@ include(dirname(__FILE__).'/../../ext/session/tests/skipif.inc');
?>
--FILE--
<?php
-$HTTP_SESSION_VARS = "ok\n";
-echo $HTTP_SESSION_VARS;
+$_SESSION = "ok\n";
+echo $_SESSION;
session_start();
-echo $HTTP_SESSION_VARS;
+echo $_SESSION;
echo "\nok\n";
?>
--EXPECTF--
-Deprecated: Directive 'register_long_arrays' is deprecated in PHP %d.%d and greater in Unknown on line 0
ok
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at %sunset_cv05.php on line %d
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at %sunset_cv05.php:%d) in %sunset_cv05.php on line %d
+
+Notice: Array to string conversion in %sunset_cv05.php on line %d
Array
ok
diff --git a/Zend/tests/unset_cv06.phpt b/Zend/tests/unset_cv06.phpt
index ba21cf430..dd788158e 100644
--- a/Zend/tests/unset_cv06.phpt
+++ b/Zend/tests/unset_cv06.phpt
@@ -3,27 +3,20 @@ unset() CV 6 (indirect unset() of global variable in session_unset())
--SKIPIF--
<?php include(dirname(__FILE__).'/../../ext/session/tests/skipif.inc'); ?>
--INI--
-register_globals=1
session.auto_start=0
session.save_handler=files
--FILE--
<?php
-$x = "1\n";
session_start();
-echo $x;
-session_register('x');
-$_SESSION['x'] = "2\n";
-echo $x;
+$_SESSION['x'] = "1\n";
+echo $_SESSION['x'];
+
session_unset();
-echo $x;
+echo $_SESSION['x'];
echo "ok\n";
?>
--EXPECTF--
-Deprecated: Directive 'register_globals' is deprecated in PHP %d.%d and greater in Unknown on line 0
1
-Deprecated: Function session_register() is deprecated in %s on line %d
-2
-
-Notice: Undefined variable: x in %sunset_cv06.php on line %d
+Notice: Undefined index: x in %sunset_cv06.php on line %d
ok
diff --git a/Zend/tests/unset_cv07.phpt b/Zend/tests/unset_cv07.phpt
index b7bdb7db5..3f893ca23 100644
--- a/Zend/tests/unset_cv07.phpt
+++ b/Zend/tests/unset_cv07.phpt
@@ -1,5 +1,7 @@
--TEST--
unset() CV 7 (indirect unset() of global variable in import_request_variables())
+--SKIPIF--
+<?php if(PHP_VERSION_ID >= 50399){ die('skip not needed anymore without register_globals'); } ?>
--GET--
x=2
--FILE--
diff --git a/Zend/tests/unset_cv08.phpt b/Zend/tests/unset_cv08.phpt
index 1c4015ab3..9b8ab1520 100644
--- a/Zend/tests/unset_cv08.phpt
+++ b/Zend/tests/unset_cv08.phpt
@@ -4,7 +4,7 @@ unset() CV 8 (unset() of global variable in array_unique($GLOBALS))
<?php
$a = "ok\n";
$b = "ok\n";
-array_unique($GLOBALS);
+@array_unique($GLOBALS);
echo $a;
echo $b;
echo "ok\n";
diff --git a/Zend/zend.c b/Zend/zend.c
index 953424cb5..6484365bc 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -29,6 +29,7 @@
#include "zend_builtin_functions.h"
#include "zend_ini.h"
#include "zend_vm.h"
+#include "zend_dtrace.h"
#ifdef ZTS
# define GLOBAL_FUNCTION_TABLE global_function_table
@@ -62,7 +63,7 @@ ZEND_API char *(*zend_resolve_path)(const char *filename, int filename_len TSRML
void (*zend_on_timeout)(int seconds TSRMLS_DC);
-static void (*zend_message_dispatcher_p)(long message, void *data TSRMLS_DC);
+static void (*zend_message_dispatcher_p)(long message, const void *data TSRMLS_DC);
static int (*zend_get_configuration_directive_p)(const char *name, uint name_length, zval *contents);
static ZEND_INI_MH(OnUpdateErrorReporting) /* {{{ */
@@ -88,11 +89,27 @@ static ZEND_INI_MH(OnUpdateGCEnabled) /* {{{ */
}
/* }}} */
+static ZEND_INI_MH(OnUpdateScriptEncoding) /* {{{ */
+{
+ if (!CG(multibyte)) {
+ return FAILURE;
+ }
+ if (!zend_multibyte_get_functions(TSRMLS_C)) {
+ return SUCCESS;
+ }
+ return zend_multibyte_set_script_encoding_by_string(new_value, new_value_length TSRMLS_CC);
+}
+/* }}} */
+
+
ZEND_INI_BEGIN()
ZEND_INI_ENTRY("error_reporting", NULL, ZEND_INI_ALL, OnUpdateErrorReporting)
STD_ZEND_INI_BOOLEAN("zend.enable_gc", "1", ZEND_INI_ALL, OnUpdateGCEnabled, gc_enabled, zend_gc_globals, gc_globals)
-#ifdef ZEND_MULTIBYTE
- STD_ZEND_INI_BOOLEAN("detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
+ STD_ZEND_INI_BOOLEAN("zend.multibyte", "0", ZEND_INI_PERDIR, OnUpdateBool, multibyte, zend_compiler_globals, compiler_globals)
+ ZEND_INI_ENTRY("zend.script_encoding", NULL, ZEND_INI_ALL, OnUpdateScriptEncoding)
+ STD_ZEND_INI_BOOLEAN("zend.detect_unicode", "1", ZEND_INI_ALL, OnUpdateBool, detect_unicode, zend_compiler_globals, compiler_globals)
+#ifdef ZEND_SIGNALS
+ STD_ZEND_INI_BOOLEAN("zend.signal_check", "0", ZEND_INI_SYSTEM, OnUpdateBool, check, zend_signal_globals_t, zend_signal_globals)
#endif
ZEND_INI_END()
@@ -140,7 +157,7 @@ static void print_hash(zend_write_func_t write_func, HashTable *ht, int indent,
switch (zend_hash_get_current_key_ex(ht, &string_key, &str_len, &num_key, 0, &iterator)) {
case HASH_KEY_IS_STRING:
if (is_object) {
- char *prop_name, *class_name;
+ const char *prop_name, *class_name;
int mangled = zend_unmangle_property_name(string_key, str_len - 1, &class_name, &prop_name);
ZEND_PUTS_EX(prop_name);
@@ -230,9 +247,10 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
break;
case IS_RESOURCE:
Z_STRVAL_P(expr_copy) = (char *) emalloc(sizeof("Resource id #") - 1 + MAX_LENGTH_OF_LONG);
- Z_STRLEN_P(expr_copy) = sprintf(Z_STRVAL_P(expr_copy), "Resource id #%ld", Z_LVAL_P(expr));
+ Z_STRLEN_P(expr_copy) = snprintf(Z_STRVAL_P(expr_copy), sizeof("Resource id #") - 1 + MAX_LENGTH_OF_LONG, "Resource id #%ld", Z_LVAL_P(expr));
break;
case IS_ARRAY:
+ zend_error(E_NOTICE, "Array to string conversion");
Z_STRLEN_P(expr_copy) = sizeof("Array") - 1;
Z_STRVAL_P(expr_copy) = estrndup("Array", Z_STRLEN_P(expr_copy));
break;
@@ -240,8 +258,17 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
{
TSRMLS_FETCH();
- if (Z_OBJ_HANDLER_P(expr, cast_object) && Z_OBJ_HANDLER_P(expr, cast_object)(expr, expr_copy, IS_STRING TSRMLS_CC) == SUCCESS) {
- break;
+ if (Z_OBJ_HANDLER_P(expr, cast_object)) {
+ zval *val;
+
+ ALLOC_ZVAL(val);
+ INIT_PZVAL_COPY(val, expr);
+ zval_copy_ctor(val);
+ if (Z_OBJ_HANDLER_P(expr, cast_object)(val, expr_copy, IS_STRING TSRMLS_CC) == SUCCESS) {
+ zval_ptr_dtor(&val);
+ break;
+ }
+ zval_ptr_dtor(&val);
}
/* Standard PHP objects */
if (Z_OBJ_HT_P(expr) == &std_object_handlers || !Z_OBJ_HANDLER_P(expr, cast_object)) {
@@ -332,7 +359,7 @@ ZEND_API void zend_print_flat_zval_r(zval *expr TSRMLS_DC) /* {{{ */
case IS_OBJECT:
{
HashTable *properties = NULL;
- char *class_name = NULL;
+ const char *class_name = NULL;
zend_uint clen;
if (Z_OBJ_HANDLER_P(expr, get_class_name)) {
@@ -344,7 +371,7 @@ ZEND_API void zend_print_flat_zval_r(zval *expr TSRMLS_DC) /* {{{ */
zend_printf("%s Object (", "Unknown Class");
}
if (class_name) {
- efree(class_name);
+ efree((char*)class_name);
}
if (Z_OBJ_HANDLER_P(expr, get_properties)) {
properties = Z_OBJPROP_P(expr);
@@ -390,7 +417,7 @@ ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int
case IS_OBJECT:
{
HashTable *properties;
- char *class_name = NULL;
+ const char *class_name = NULL;
zend_uint clen;
int is_temp;
@@ -404,7 +431,7 @@ ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int
}
ZEND_PUTS_EX(" Object\n");
if (class_name) {
- efree(class_name);
+ efree((char*)class_name);
}
if ((properties = Z_OBJDEBUG_P(expr, is_temp)) == NULL) {
break;
@@ -441,12 +468,10 @@ static FILE *zend_fopen_wrapper(const char *filename, char **opened_path TSRMLS_
#ifdef ZTS
static zend_bool asp_tags_default = 0;
static zend_bool short_tags_default = 1;
-static zend_bool ct_pass_ref_default = 1;
static zend_uint compiler_options_default = ZEND_COMPILE_DEFAULT;
#else
# define asp_tags_default 0
# define short_tags_default 1
-# define ct_pass_ref_default 1
# define compiler_options_default ZEND_COMPILE_DEFAULT
#endif
@@ -455,7 +480,6 @@ static void zend_set_default_compile_time_values(TSRMLS_D) /* {{{ */
/* default compile-time values */
CG(asp_tags) = asp_tags_default;
CG(short_tags) = short_tags_default;
- CG(allow_call_time_pass_reference) = ct_pass_ref_default;
CG(compiler_options) = compiler_options_default;
}
/* }}} */
@@ -464,19 +488,19 @@ static void zend_init_exception_op(TSRMLS_D) /* {{{ */
{
memset(EG(exception_op), 0, sizeof(EG(exception_op)));
EG(exception_op)[0].opcode = ZEND_HANDLE_EXCEPTION;
- EG(exception_op)[0].op1.op_type = IS_UNUSED;
- EG(exception_op)[0].op2.op_type = IS_UNUSED;
- EG(exception_op)[0].result.op_type = IS_UNUSED;
+ EG(exception_op)[0].op1_type = IS_UNUSED;
+ EG(exception_op)[0].op2_type = IS_UNUSED;
+ EG(exception_op)[0].result_type = IS_UNUSED;
ZEND_VM_SET_OPCODE_HANDLER(EG(exception_op));
EG(exception_op)[1].opcode = ZEND_HANDLE_EXCEPTION;
- EG(exception_op)[1].op1.op_type = IS_UNUSED;
- EG(exception_op)[1].op2.op_type = IS_UNUSED;
- EG(exception_op)[1].result.op_type = IS_UNUSED;
+ EG(exception_op)[1].op1_type = IS_UNUSED;
+ EG(exception_op)[1].op2_type = IS_UNUSED;
+ EG(exception_op)[1].result_type = IS_UNUSED;
ZEND_VM_SET_OPCODE_HANDLER(EG(exception_op)+1);
EG(exception_op)[2].opcode = ZEND_HANDLE_EXCEPTION;
- EG(exception_op)[2].op1.op_type = IS_UNUSED;
- EG(exception_op)[2].op2.op_type = IS_UNUSED;
- EG(exception_op)[2].result.op_type = IS_UNUSED;
+ EG(exception_op)[2].op1_type = IS_UNUSED;
+ EG(exception_op)[2].op2_type = IS_UNUSED;
+ EG(exception_op)[2].result_type = IS_UNUSED;
ZEND_VM_SET_OPCODE_HANDLER(EG(exception_op)+2);
}
/* }}} */
@@ -507,10 +531,11 @@ static void compiler_globals_ctor(zend_compiler_globals *compiler_globals TSRMLS
compiler_globals->last_static_member = zend_hash_num_elements(compiler_globals->class_table);
if (compiler_globals->last_static_member) {
- compiler_globals->static_members = (HashTable**)calloc(compiler_globals->last_static_member, sizeof(HashTable*));
+ compiler_globals->static_members_table = calloc(compiler_globals->last_static_member, sizeof(zval**));
} else {
- compiler_globals->static_members = NULL;
+ compiler_globals->static_members_table = NULL;
}
+ compiler_globals->script_encoding_list = NULL;
}
/* }}} */
@@ -528,8 +553,11 @@ static void compiler_globals_dtor(zend_compiler_globals *compiler_globals TSRMLS
zend_hash_destroy(compiler_globals->auto_globals);
free(compiler_globals->auto_globals);
}
- if (compiler_globals->static_members) {
- free(compiler_globals->static_members);
+ if (compiler_globals->static_members_table) {
+ free(compiler_globals->static_members_table);
+ }
+ if (compiler_globals->script_encoding_list) {
+ pefree(compiler_globals->script_encoding_list, 1);
}
compiler_globals->last_static_member = 0;
}
@@ -549,7 +577,10 @@ static void executor_globals_ctor(zend_executor_globals *executor_globals TSRMLS
EG(current_execute_data) = NULL;
EG(current_module) = NULL;
EG(exit_status) = 0;
- EG(saved_fpu_cw) = NULL;
+#if XPFPA_HAVE_CW
+ EG(saved_fpu_cw) = 0;
+#endif
+ EG(saved_fpu_cw_ptr) = NULL;
EG(active) = 0;
}
/* }}} */
@@ -595,6 +626,20 @@ static void php_scanner_globals_ctor(zend_php_scanner_globals *scanner_globals_p
void zend_init_opcodes_handlers(void);
+static zend_bool php_auto_globals_create_globals(const char *name, uint name_len TSRMLS_DC) /* {{{ */
+{
+ zval *globals;
+
+ ALLOC_ZVAL(globals);
+ Z_SET_REFCOUNT_P(globals, 1);
+ Z_SET_ISREF_P(globals);
+ Z_TYPE_P(globals) = IS_ARRAY;
+ Z_ARRVAL_P(globals) = &EG(symbol_table);
+ zend_hash_update(&EG(symbol_table), name, name_len + 1, &globals, sizeof(zval *), NULL);
+ return 0;
+}
+/* }}} */
+
int zend_startup(zend_utility_functions *utility_functions, char **extensions TSRMLS_DC) /* {{{ */
{
#ifdef ZTS
@@ -627,8 +672,10 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions TS
}
zend_stream_open_function = utility_functions->stream_open_function;
zend_message_dispatcher_p = utility_functions->message_handler;
+#ifndef ZEND_SIGNALS
zend_block_interruptions = utility_functions->block_interruptions;
zend_unblock_interruptions = utility_functions->unblock_interruptions;
+#endif
zend_get_configuration_directive_p = utility_functions->get_configuration_directive;
zend_ticks_function = utility_functions->ticks_function;
zend_on_timeout = utility_functions->on_timeout;
@@ -636,10 +683,17 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions TS
zend_getenv = utility_functions->getenv_function;
zend_resolve_path = utility_functions->resolve_path_function;
+#if HAVE_DTRACE
+/* build with dtrace support */
+ zend_compile_file = dtrace_compile_file;
+ zend_execute = dtrace_execute;
+ zend_execute_internal = dtrace_execute_internal;
+#else
zend_compile_file = compile_file;
- zend_compile_string = compile_string;
zend_execute = execute;
zend_execute_internal = NULL;
+#endif /* HAVE_SYS_SDT_H */
+ zend_compile_string = compile_string;
zend_throw_exception_hook = NULL;
zend_init_opcodes_handlers();
@@ -655,7 +709,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions TS
zend_hash_init_ex(GLOBAL_FUNCTION_TABLE, 100, NULL, ZEND_FUNCTION_DTOR, 1, 0);
zend_hash_init_ex(GLOBAL_CLASS_TABLE, 10, NULL, ZEND_CLASS_DTOR, 1, 0);
- zend_hash_init_ex(GLOBAL_AUTO_GLOBALS_TABLE, 8, NULL, (dtor_func_t) zend_auto_global_dtor, 1, 0);
+ zend_hash_init_ex(GLOBAL_AUTO_GLOBALS_TABLE, 8, NULL, NULL, 1, 0);
zend_hash_init_ex(GLOBAL_CONSTANTS_TABLE, 20, NULL, ZEND_CONSTANT_DTOR, 1, 0);
zend_hash_init_ex(&module_registry, 50, NULL, ZEND_MODULE_DTOR, 1, 0);
@@ -693,9 +747,10 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions TS
EG(user_exception_handler) = NULL;
#endif
+ zend_interned_strings_init(TSRMLS_C);
zend_startup_builtin_functions(TSRMLS_C);
zend_register_standard_constants(TSRMLS_C);
- zend_register_auto_global("GLOBALS", sizeof("GLOBALS") - 1, NULL TSRMLS_CC);
+ zend_register_auto_global("GLOBALS", sizeof("GLOBALS") - 1, 1, php_auto_globals_create_globals TSRMLS_CC);
#ifndef ZTS
zend_init_rsrc_plist(TSRMLS_C);
@@ -735,7 +790,6 @@ void zend_post_startup(TSRMLS_D) /* {{{ */
asp_tags_default = CG(asp_tags);
short_tags_default = CG(short_tags);
- ct_pass_ref_default = CG(allow_call_time_pass_reference);
compiler_options_default = CG(compiler_options);
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
@@ -752,11 +806,14 @@ void zend_post_startup(TSRMLS_D) /* {{{ */
void zend_shutdown(TSRMLS_D) /* {{{ */
{
+#ifdef ZEND_SIGNALS
+ zend_signal_shutdown(TSRMLS_C);
+#endif
#ifdef ZEND_WIN32
zend_shutdown_timeout_thread();
#endif
zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
- zend_hash_graceful_reverse_destroy(&module_registry);
+ zend_destroy_modules();
zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
zend_hash_destroy(GLOBAL_CLASS_TABLE);
@@ -781,6 +838,8 @@ void zend_shutdown(TSRMLS_D) /* {{{ */
GLOBAL_CONSTANTS_TABLE = NULL;
#endif
zend_destroy_rsrc_list_dtors();
+
+ zend_interned_strings_dtor(TSRMLS_C);
}
/* }}} */
@@ -853,22 +912,6 @@ void zend_activate(TSRMLS_D) /* {{{ */
}
/* }}} */
-void zend_activate_modules(TSRMLS_D) /* {{{ */
-{
- zend_hash_apply(&module_registry, (apply_func_t) module_registry_request_startup TSRMLS_CC);
-}
-/* }}} */
-
-void zend_deactivate_modules(TSRMLS_D) /* {{{ */
-{
- EG(opline_ptr) = NULL; /* we're no longer executing anything */
-
- zend_try {
- zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
- } zend_end_try();
-}
-/* }}} */
-
void zend_call_destructors(TSRMLS_D) /* {{{ */
{
zend_try {
@@ -922,24 +965,8 @@ void zend_deactivate(TSRMLS_D) /* {{{ */
}
/* }}} */
-static int exec_done_cb(zend_module_entry *module TSRMLS_DC) /* {{{ */
-{
- if (module->post_deactivate_func) {
- module->post_deactivate_func();
- }
- return 0;
-}
-/* }}} */
-
-void zend_post_deactivate_modules(TSRMLS_D) /* {{{ */
-{
- zend_hash_apply(&module_registry, (apply_func_t) exec_done_cb TSRMLS_CC);
- zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_unload_temp TSRMLS_CC);
-}
-/* }}} */
-
BEGIN_EXTERN_C()
-ZEND_API void zend_message_dispatcher(long message, void *data TSRMLS_DC) /* {{{ */
+ZEND_API void zend_message_dispatcher(long message, const void *data TSRMLS_DC) /* {{{ */
{
if (zend_message_dispatcher_p) {
zend_message_dispatcher_p(message, data TSRMLS_CC);
@@ -982,7 +1009,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
zval ***params;
zval *retval;
zval *z_error_type, *z_error_message, *z_error_filename, *z_error_lineno, *z_context;
- char *error_filename;
+ const char *error_filename;
uint error_lineno;
zval *orig_user_error_handler;
zend_bool in_compilation;
@@ -994,7 +1021,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
zend_stack object_stack;
zend_stack declare_stack;
zend_stack list_stack;
- zend_stack labels_stack;
+ zend_stack context_stack;
TSRMLS_FETCH();
/* Obtain relevant filename and lineno */
@@ -1039,6 +1066,15 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
va_start(args, format);
+#ifdef HAVE_DTRACE
+ if(DTRACE_ERROR_ENABLED()) {
+ char *dtrace_error_buffer;
+ zend_vspprintf(&dtrace_error_buffer, 0, format, args);
+ DTRACE_ERROR(dtrace_error_buffer, error_filename, error_lineno);
+ efree(dtrace_error_buffer);
+ }
+#endif /* HAVE_DTRACE */
+
/* if we don't have a user defined error handler */
if (!EG(user_error_handler)
|| !(EG(user_error_handler_error_reporting) & type)
@@ -1129,7 +1165,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
SAVE_STACK(object_stack);
SAVE_STACK(declare_stack);
SAVE_STACK(list_stack);
- SAVE_STACK(labels_stack);
+ SAVE_STACK(context_stack);
}
if (call_user_function_ex(CG(function_table), NULL, orig_user_error_handler, &retval, 5, params, 1, NULL TSRMLS_CC) == SUCCESS) {
@@ -1153,7 +1189,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
RESTORE_STACK(object_stack);
RESTORE_STACK(declare_stack);
RESTORE_STACK(list_stack);
- RESTORE_STACK(labels_stack);
+ RESTORE_STACK(context_stack);
}
if (!EG(user_error_handler)) {
@@ -1281,7 +1317,7 @@ ZEND_API int zend_execute_scripts(int type TSRMLS_DC, zval **retval, int file_co
ZEND_API char *zend_make_compiled_string_description(const char *name TSRMLS_DC) /* {{{ */
{
- char *cur_filename;
+ const char *cur_filename;
int cur_lineno;
char *compiled_string_description;
diff --git a/Zend/zend.h b/Zend/zend.h
index 4c48f934b..fa2323e1e 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -17,12 +17,12 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h 321634 2012-01-01 13:15:04Z felipe $ */
+/* $Id: zend.h 321753 2012-01-04 08:25:06Z laruence $ */
#ifndef ZEND_H
#define ZEND_H
-#define ZEND_VERSION "2.3.0"
+#define ZEND_VERSION "2.4.0"
#define ZEND_ENGINE_2
@@ -200,9 +200,9 @@ char *alloca ();
#endif
#if ZEND_DEBUG
-#define ZEND_FILE_LINE_D char *__zend_filename, uint __zend_lineno
+#define ZEND_FILE_LINE_D const char *__zend_filename, const uint __zend_lineno
#define ZEND_FILE_LINE_DC , ZEND_FILE_LINE_D
-#define ZEND_FILE_LINE_ORIG_D char *__zend_orig_filename, uint __zend_orig_lineno
+#define ZEND_FILE_LINE_ORIG_D const char *__zend_orig_filename, const uint __zend_orig_lineno
#define ZEND_FILE_LINE_ORIG_DC , ZEND_FILE_LINE_ORIG_D
#define ZEND_FILE_LINE_RELAY_C __zend_filename, __zend_lineno
#define ZEND_FILE_LINE_RELAY_CC , ZEND_FILE_LINE_RELAY_C
@@ -237,6 +237,7 @@ char *alloca ();
#include "zend_alloc.h"
#include "zend_types.h"
+#include "zend_string.h"
#ifdef HAVE_LIMITS_H
# include <limits.h>
@@ -297,6 +298,7 @@ typedef struct _zend_guard {
typedef struct _zend_object {
zend_class_entry *ce;
HashTable *properties;
+ zval **properties_table;
HashTable *guards; /* protects from __get/__set ... recursion */
} zend_object;
@@ -351,17 +353,21 @@ struct _zval_struct {
#if defined(__GNUC__)
#if __GNUC__ >= 3
#define zend_always_inline inline __attribute__((always_inline))
+#define zend_never_inline __attribute__((noinline))
#else
#define zend_always_inline inline
+#define zend_never_inline
#endif
#elif defined(_MSC_VER)
#define zend_always_inline __forceinline
+#define zend_never_inline
#else
#define zend_always_inline inline
+#define zend_never_inline
#endif
-#if (defined (__GNUC__) && __GNUC__ > 2 ) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX)
+#if (defined (__GNUC__) && __GNUC__ > 2 ) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX)
# define EXPECTED(condition) __builtin_expect(condition, 1)
# define UNEXPECTED(condition) __builtin_expect(condition, 0)
#else
@@ -415,22 +421,60 @@ struct _zend_unserialize_data;
typedef struct _zend_serialize_data zend_serialize_data;
typedef struct _zend_unserialize_data zend_unserialize_data;
+struct _zend_trait_method_reference {
+ const char* method_name;
+ unsigned int mname_len;
+
+ zend_class_entry *ce;
+
+ const char* class_name;
+ unsigned int cname_len;
+};
+typedef struct _zend_trait_method_reference zend_trait_method_reference;
+
+struct _zend_trait_precedence {
+ zend_trait_method_reference *trait_method;
+
+ zend_class_entry** exclude_from_classes;
+
+ union _zend_function* function;
+};
+typedef struct _zend_trait_precedence zend_trait_precedence;
+
+struct _zend_trait_alias {
+ zend_trait_method_reference *trait_method;
+
+ /**
+ * name for method to be added
+ */
+ const char* alias;
+ unsigned int alias_len;
+
+ /**
+ * modifiers to be set on trait method
+ */
+ zend_uint modifiers;
+
+ union _zend_function* function;
+};
+typedef struct _zend_trait_alias zend_trait_alias;
+
struct _zend_class_entry {
char type;
- char *name;
+ const char *name;
zend_uint name_length;
struct _zend_class_entry *parent;
int refcount;
- zend_bool constants_updated;
zend_uint ce_flags;
HashTable function_table;
- HashTable default_properties;
HashTable properties_info;
- HashTable default_static_members;
- HashTable *static_members;
+ zval **default_properties_table;
+ zval **default_static_members_table;
+ zval **static_members_table;
HashTable constants_table;
- const struct _zend_function_entry *builtin_functions;
+ int default_properties_count;
+ int default_static_members_count;
union _zend_function *constructor;
union _zend_function *destructor;
@@ -459,14 +503,25 @@ struct _zend_class_entry {
zend_class_entry **interfaces;
zend_uint num_interfaces;
-
- char *filename;
- zend_uint line_start;
- zend_uint line_end;
- char *doc_comment;
- zend_uint doc_comment_len;
-
- struct _zend_module_entry *module;
+
+ zend_class_entry **traits;
+ zend_uint num_traits;
+ zend_trait_alias **trait_aliases;
+ zend_trait_precedence **trait_precedences;
+
+ union {
+ struct {
+ const char *filename;
+ zend_uint line_start;
+ zend_uint line_end;
+ const char *doc_comment;
+ zend_uint doc_comment_len;
+ } user;
+ struct {
+ const struct _zend_function_entry *builtin_functions;
+ struct _zend_module_entry *module;
+ } internal;
+ } info;
};
#include "zend_stream.h"
@@ -475,9 +530,11 @@ typedef struct _zend_utility_functions {
int (*printf_function)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
int (*write_function)(const char *str, uint str_length);
FILE *(*fopen_function)(const char *filename, char **opened_path TSRMLS_DC);
- void (*message_handler)(long message, void *data TSRMLS_DC);
+ void (*message_handler)(long message, const void *data TSRMLS_DC);
+#ifndef ZEND_SIGNALS
void (*block_interruptions)(void);
void (*unblock_interruptions)(void);
+#endif
int (*get_configuration_directive)(const char *name, uint name_length, zval *contents);
void (*ticks_function)(int ticks);
void (*on_timeout)(int seconds TSRMLS_DC);
@@ -518,13 +575,15 @@ typedef int (*zend_write_func_t)(const char *str, uint str_length);
#define IS_RESOURCE 7
#define IS_CONSTANT 8
#define IS_CONSTANT_ARRAY 9
+#define IS_CALLABLE 10
/* Ugly hack to support constants as static array indices */
-#define IS_CONSTANT_TYPE_MASK 0x0f
-#define IS_CONSTANT_UNQUALIFIED 0x10
-#define IS_CONSTANT_INDEX 0x80
-#define IS_LEXICAL_VAR 0x20
-#define IS_LEXICAL_REF 0x40
+#define IS_CONSTANT_TYPE_MASK 0x00f
+#define IS_CONSTANT_UNQUALIFIED 0x010
+#define IS_CONSTANT_INDEX 0x080
+#define IS_LEXICAL_VAR 0x020
+#define IS_LEXICAL_REF 0x040
+#define IS_CONSTANT_IN_NAMESPACE 0x100
/* overloaded elements data types */
#define OE_IS_ARRAY (1<<0)
@@ -599,8 +658,8 @@ END_EXTERN_C()
/* FIXME: Check if we can save if (ptr) too */
-#define STR_FREE(ptr) if (ptr) { efree(ptr); }
-#define STR_FREE_REL(ptr) if (ptr) { efree_rel(ptr); }
+#define STR_FREE(ptr) if (ptr && !IS_INTERNED(ptr)) { efree(ptr); }
+#define STR_FREE_REL(ptr) if (ptr && !IS_INTERNED(ptr)) { efree_rel(ptr); }
#define STR_EMPTY_ALLOC() estrndup("", sizeof("")-1)
@@ -618,11 +677,13 @@ BEGIN_EXTERN_C()
extern ZEND_API int (*zend_printf)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
extern ZEND_API zend_write_func_t zend_write;
extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path TSRMLS_DC);
+#ifndef ZEND_SIGNALS
extern ZEND_API void (*zend_block_interruptions)(void);
extern ZEND_API void (*zend_unblock_interruptions)(void);
+#endif
extern ZEND_API void (*zend_ticks_function)(int ticks);
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0);
-extern void (*zend_on_timeout)(int seconds TSRMLS_DC);
+extern ZEND_API void (*zend_on_timeout)(int seconds TSRMLS_DC);
extern ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC);
extern int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap);
extern ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC);
@@ -642,11 +703,18 @@ END_EXTERN_C()
#define ZEND_UV(name) (zend_uv.name)
+#ifndef ZEND_SIGNALS
#define HANDLE_BLOCK_INTERRUPTIONS() if (zend_block_interruptions) { zend_block_interruptions(); }
#define HANDLE_UNBLOCK_INTERRUPTIONS() if (zend_unblock_interruptions) { zend_unblock_interruptions(); }
+#else
+#include "zend_signal.h"
+
+#define HANDLE_BLOCK_INTERRUPTIONS() ZEND_SIGNAL_BLOCK_INTERRUPUTIONS()
+#define HANDLE_UNBLOCK_INTERRUPTIONS() ZEND_SIGNAL_UNBLOCK_INTERRUPTIONS()
+#endif
BEGIN_EXTERN_C()
-ZEND_API void zend_message_dispatcher(long message, void *data TSRMLS_DC);
+ZEND_API void zend_message_dispatcher(long message, const void *data TSRMLS_DC);
ZEND_API int zend_get_configuration_directive(const char *name, uint name_length, zval *contents);
END_EXTERN_C()
@@ -676,19 +744,30 @@ END_EXTERN_C()
#define PZVAL_IS_REF(z) Z_ISREF_P(z)
-#define SEPARATE_ZVAL(ppzv) \
- { \
- zval *orig_ptr = *(ppzv); \
- \
- if (Z_REFCOUNT_P(orig_ptr) > 1) { \
- Z_DELREF_P(orig_ptr); \
- ALLOC_ZVAL(*(ppzv)); \
- **(ppzv) = *orig_ptr; \
- zval_copy_ctor(*(ppzv)); \
- Z_SET_REFCOUNT_PP(ppzv, 1); \
- Z_UNSET_ISREF_PP((ppzv)); \
- } \
- }
+#define ZVAL_COPY_VALUE(z, v) \
+ do { \
+ (z)->value = (v)->value; \
+ Z_TYPE_P(z) = Z_TYPE_P(v); \
+ } while (0)
+
+#define INIT_PZVAL_COPY(z, v) \
+ do { \
+ ZVAL_COPY_VALUE(z, v); \
+ Z_SET_REFCOUNT_P(z, 1); \
+ Z_UNSET_ISREF_P(z); \
+ } while (0)
+
+#define SEPARATE_ZVAL(ppzv) \
+ do { \
+ if (Z_REFCOUNT_PP((ppzv)) > 1) { \
+ zval *new_zv; \
+ Z_DELREF_PP(ppzv); \
+ ALLOC_ZVAL(new_zv); \
+ INIT_PZVAL_COPY(new_zv, *(ppzv)); \
+ *(ppzv) = new_zv; \
+ zval_copy_ctor(new_zv); \
+ } \
+ } while (0)
#define SEPARATE_ZVAL_IF_NOT_REF(ppzv) \
if (!PZVAL_IS_REF(*ppzv)) { \
@@ -711,10 +790,9 @@ END_EXTERN_C()
} \
INIT_PZVAL(&(zv));
-#define MAKE_COPY_ZVAL(ppzv, pzv) \
- *(pzv) = **(ppzv); \
- zval_copy_ctor((pzv)); \
- INIT_PZVAL((pzv));
+#define MAKE_COPY_ZVAL(ppzv, pzv) \
+ INIT_PZVAL_COPY(pzv, *(ppzv)); \
+ zval_copy_ctor((pzv));
#define REPLACE_ZVAL_VALUE(ppzv_dest, pzv_src, copy) { \
int is_ref, refcount; \
@@ -723,7 +801,7 @@ END_EXTERN_C()
is_ref = Z_ISREF_PP(ppzv_dest); \
refcount = Z_REFCOUNT_PP(ppzv_dest); \
zval_dtor(*ppzv_dest); \
- **ppzv_dest = *pzv_src; \
+ ZVAL_COPY_VALUE(*ppzv_dest, pzv_src); \
if (copy) { \
zval_copy_ctor(*ppzv_dest); \
} \
@@ -735,10 +813,7 @@ END_EXTERN_C()
if (PZVAL_IS_REF(varptr)) { \
zval *original_var = varptr; \
ALLOC_ZVAL(varptr); \
- varptr->value = original_var->value; \
- Z_TYPE_P(varptr) = Z_TYPE_P(original_var); \
- Z_UNSET_ISREF_P(varptr); \
- Z_SET_REFCOUNT_P(varptr, 1); \
+ INIT_PZVAL_COPY(varptr, original_var); \
zval_copy_ctor(varptr); \
} else { \
Z_ADDREF_P(varptr); \
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 6bd4a71eb..2c3bbf3cc 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -36,6 +36,12 @@
static int module_count=0;
ZEND_API HashTable module_registry;
+static zend_module_entry **module_request_startup_handlers;
+static zend_module_entry **module_request_shutdown_handlers;
+static zend_module_entry **module_post_deactivate_handlers;
+
+static zend_class_entry **class_cleanup_handlers;
+
/* this function doesn't check for too many parameters */
ZEND_API int zend_get_parameters(int ht, int param_count, ...) /* {{{ */
{
@@ -186,8 +192,8 @@ ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array TS
ZEND_API void zend_wrong_param_count(TSRMLS_D) /* {{{ */
{
- char *space;
- char *class_name = get_active_class_name(&space TSRMLS_CC);
+ const char *space;
+ const char *class_name = get_active_class_name(&space TSRMLS_CC);
zend_error(E_WARNING, "Wrong parameter count for %s%s%s()", class_name, space, get_active_function_name(TSRMLS_C));
}
@@ -211,6 +217,8 @@ ZEND_API char *zend_get_type_by_const(int type) /* {{{ */
return "resource";
case IS_NULL:
return "null";
+ case IS_CALLABLE:
+ return "callable";
case IS_ARRAY:
return "array";
default:
@@ -237,7 +245,7 @@ ZEND_API zend_class_entry *zend_get_class_entry(const zval *zobject TSRMLS_DC) /
/* }}} */
/* returns 1 if you need to copy result, 0 if it's already a copy */
-ZEND_API int zend_get_object_classname(const zval *object, char **class_name, zend_uint *class_name_len TSRMLS_DC) /* {{{ */
+ZEND_API int zend_get_object_classname(const zval *object, const char **class_name, zend_uint *class_name_len TSRMLS_DC) /* {{{ */
{
if (Z_OBJ_HT_P(object)->get_class_name == NULL ||
Z_OBJ_HT_P(object)->get_class_name(object, class_name, class_name_len, 0 TSRMLS_CC) != SUCCESS) {
@@ -251,18 +259,22 @@ ZEND_API int zend_get_object_classname(const zval *object, char **class_name, ze
}
/* }}} */
-static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */
+static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TSRMLS_DC) /* {{{ */
{
if (Z_OBJ_HANDLER_PP(arg, cast_object)) {
SEPARATE_ZVAL_IF_NOT_REF(arg);
- if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) {
+ if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, type TSRMLS_CC) == SUCCESS) {
+ *pl = Z_STRLEN_PP(arg);
+ *p = Z_STRVAL_PP(arg);
return SUCCESS;
}
}
/* Standard PHP objects */
if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) {
SEPARATE_ZVAL_IF_NOT_REF(arg);
- if (zend_std_cast_object_tostring(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) {
+ if (zend_std_cast_object_tostring(*arg, *arg, type TSRMLS_CC) == SUCCESS) {
+ *pl = Z_STRLEN_PP(arg);
+ *p = Z_STRVAL_PP(arg);
return SUCCESS;
}
}
@@ -277,6 +289,8 @@ static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */
if (!use_copy) {
ZVAL_ZVAL(*arg, z, 1, 1);
}
+ *pl = Z_STRLEN_PP(arg);
+ *p = Z_STRVAL_PP(arg);
return SUCCESS;
}
zval_ptr_dtor(&z);
@@ -285,9 +299,9 @@ static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */
}
/* }}} */
-static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **spec, char **error, int *severity TSRMLS_DC) /* {{{ */
+static const char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, const char **spec, char **error, int *severity TSRMLS_DC) /* {{{ */
{
- char *spec_walk = *spec;
+ const char *spec_walk = *spec;
char c = *spec_walk++;
int return_null = 0;
@@ -394,6 +408,7 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp
}
break;
+ case 'p':
case 's':
{
char **p = va_arg(*va, char **);
@@ -420,13 +435,23 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp
}
*p = Z_STRVAL_PP(arg);
*pl = Z_STRLEN_PP(arg);
+ if (c == 'p' && CHECK_ZVAL_NULL_PATH(*arg)) {
+ return "a valid path";
+ }
break;
case IS_OBJECT:
+ if (parse_arg_object_to_string(arg, p, pl, IS_STRING TSRMLS_CC) == SUCCESS) {
+ if (c == 'p' && CHECK_ZVAL_NULL_PATH(*arg)) {
+ return "a valid path";
+ }
+ break;
+ }
+
case IS_ARRAY:
case IS_RESOURCE:
default:
- return "string";
+ return c == 's' ? "string" : "a valid path";
}
}
break;
@@ -638,16 +663,17 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp
}
/* }}} */
-static int zend_parse_arg(int arg_num, zval **arg, va_list *va, char **spec, int quiet TSRMLS_DC) /* {{{ */
+static int zend_parse_arg(int arg_num, zval **arg, va_list *va, const char **spec, int quiet TSRMLS_DC) /* {{{ */
{
- char *expected_type = NULL, *error = NULL;
+ const char *expected_type = NULL;
+ char *error = NULL;
int severity = E_WARNING;
expected_type = zend_parse_arg_impl(arg_num, arg, va, spec, &error, &severity TSRMLS_CC);
if (expected_type) {
if (!quiet && (*expected_type || error)) {
- char *space;
- char *class_name = get_active_class_name(&space TSRMLS_CC);
+ const char *space;
+ const char *class_name = get_active_class_name(&space TSRMLS_CC);
if (error) {
zend_error(severity, "%s%s%s() expects parameter %d %s",
@@ -668,15 +694,15 @@ static int zend_parse_arg(int arg_num, zval **arg, va_list *va, char **spec, int
}
/* }}} */
-static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int flags TSRMLS_DC) /* {{{ */
+static int zend_parse_va_args(int num_args, const char *type_spec, va_list *va, int flags TSRMLS_DC) /* {{{ */
{
- char *spec_walk;
+ const char *spec_walk;
int c, i;
int min_num_args = -1;
int max_num_args = 0;
int post_varargs = 0;
zval **arg;
- int arg_count = (int)(zend_uintptr_t) *(zend_vm_stack_top(TSRMLS_C) - 1);
+ int arg_count;
int quiet = flags & ZEND_PARSE_PARAMS_QUIET;
zend_bool have_varargs = 0;
zval ****varargs = NULL;
@@ -685,21 +711,14 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
for (spec_walk = type_spec; *spec_walk; spec_walk++) {
c = *spec_walk;
switch (c) {
- case 's':
- if (max_num_args < arg_count) {
- arg = (zval **) (zend_vm_stack_top(TSRMLS_C) - 1 - (arg_count - max_num_args));
- if (Z_TYPE_PP(arg) == IS_OBJECT) {
- parse_arg_object_to_string(arg TSRMLS_CC);
- }
- }
- /* break missing intentionally */
case 'l': case 'd':
- case 'H': case 'b':
+ case 's': case 'b':
case 'r': case 'a':
case 'o': case 'O':
case 'z': case 'Z':
case 'C': case 'h':
case 'f': case 'A':
+ case 'H': case 'p':
max_num_args++;
break;
@@ -717,7 +736,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
if (have_varargs) {
if (!quiet) {
zend_function *active_function = EG(current_execute_data)->function_state.function;
- char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
+ const char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
zend_error(E_WARNING, "%s%s%s(): only one varargs specifier (* or +) is permitted",
class_name,
class_name[0] ? "::" : "",
@@ -737,7 +756,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
default:
if (!quiet) {
zend_function *active_function = EG(current_execute_data)->function_state.function;
- char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
+ const char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
zend_error(E_WARNING, "%s%s%s(): bad type specifier while parsing parameters",
class_name,
class_name[0] ? "::" : "",
@@ -760,7 +779,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
if (num_args < min_num_args || (num_args > max_num_args && max_num_args > 0)) {
if (!quiet) {
zend_function *active_function = EG(current_execute_data)->function_state.function;
- char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
+ const char *class_name = active_function->common.scope ? active_function->common.scope->name : "";
zend_error(E_WARNING, "%s%s%s() expects %s %d parameter%s, %d given",
class_name,
class_name[0] ? "::" : "",
@@ -773,6 +792,8 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
return FAILURE;
}
+ arg_count = (int)(zend_uintptr_t) *(zend_vm_stack_top(TSRMLS_C) - 1);
+
if (num_args > arg_count) {
zend_error(E_WARNING, "%s(): could not obtain parameters for parsing",
get_active_function_name(TSRMLS_C));
@@ -836,8 +857,8 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
int __num_args = (num_args); \
\
if (0 == (type_spec)[0] && 0 != __num_args && !(quiet)) { \
- char *__space; \
- char * __class_name = get_active_class_name(&__space TSRMLS_CC); \
+ const char *__space; \
+ const char * __class_name = get_active_class_name(&__space TSRMLS_CC); \
zend_error(E_WARNING, "%s%s%s() expects exactly 0 parameters, %d given", \
__class_name, __space, \
get_active_function_name(TSRMLS_C), __num_args); \
@@ -845,7 +866,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
}\
}
-ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *type_spec, ...) /* {{{ */
+ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, const char *type_spec, ...) /* {{{ */
{
va_list va;
int retval;
@@ -860,7 +881,7 @@ ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *t
}
/* }}} */
-ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...) /* {{{ */
+ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, const char *type_spec, ...) /* {{{ */
{
va_list va;
int retval;
@@ -875,11 +896,11 @@ ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...)
}
/* }}} */
-ZEND_API int zend_parse_method_parameters(int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...) /* {{{ */
+ZEND_API int zend_parse_method_parameters(int num_args TSRMLS_DC, zval *this_ptr, const char *type_spec, ...) /* {{{ */
{
va_list va;
int retval;
- char *p = type_spec;
+ const char *p = type_spec;
zval **object;
zend_class_entry *ce;
@@ -911,11 +932,11 @@ ZEND_API int zend_parse_method_parameters(int num_args TSRMLS_DC, zval *this_ptr
}
/* }}} */
-ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...) /* {{{ */
+ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC, zval *this_ptr, const char *type_spec, ...) /* {{{ */
{
va_list va;
int retval;
- char *p = type_spec;
+ const char *p = type_spec;
zval **object;
zend_class_entry *ce;
int quiet = flags & ZEND_PARSE_PARAMS_QUIET;
@@ -973,7 +994,7 @@ static int zend_merge_property(zval **value TSRMLS_DC, int num_args, va_list arg
MAKE_STD_ZVAL(member);
ZVAL_STRINGL(member, hash_key->arKey, hash_key->nKeyLength-1, 1);
- obj_ht->write_property(obj, member, *value TSRMLS_CC);
+ obj_ht->write_property(obj, member, *value, 0 TSRMLS_CC);
zval_ptr_dtor(&member);
}
return ZEND_HASH_APPLY_KEEP;
@@ -984,7 +1005,7 @@ static int zend_merge_property(zval **value TSRMLS_DC, int num_args, va_list arg
* because it may call __set from the uninitialized object otherwise. */
ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int destroy_ht TSRMLS_DC) /* {{{ */
{
- zend_object_handlers *obj_ht = Z_OBJ_HT_P(obj);
+ const zend_object_handlers *obj_ht = Z_OBJ_HT_P(obj);
zend_class_entry *old_scope = EG(scope);
EG(scope) = Z_OBJCE_P(obj);
@@ -1000,45 +1021,44 @@ ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int destro
ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC) /* {{{ */
{
- if (!class_type->constants_updated || !CE_STATIC_MEMBERS(class_type)) {
+ if ((class_type->ce_flags & ZEND_ACC_CONSTANTS_UPDATED) == 0 || (!CE_STATIC_MEMBERS(class_type) && class_type->default_static_members_count)) {
zend_class_entry **scope = EG(in_execution)?&EG(scope):&CG(active_class_entry);
zend_class_entry *old_scope = *scope;
+ int i;
*scope = class_type;
zend_hash_apply_with_argument(&class_type->constants_table, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC);
- zend_hash_apply_with_argument(&class_type->default_properties, (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
- if (!CE_STATIC_MEMBERS(class_type)) {
- HashPosition pos;
+ for (i = 0; i < class_type->default_properties_count; i++) {
+ if (class_type->default_properties_table[i]) {
+ zval_update_constant(&class_type->default_properties_table[i], (void**)1 TSRMLS_CC);
+ }
+ }
+
+ if (!CE_STATIC_MEMBERS(class_type) && class_type->default_static_members_count) {
zval **p;
if (class_type->parent) {
zend_update_class_constants(class_type->parent TSRMLS_CC);
}
#if ZTS
- ALLOC_HASHTABLE(CG(static_members)[(zend_intptr_t)(class_type->static_members)]);
+ CG(static_members_table)[(zend_intptr_t)(class_type->static_members_table)] = emalloc(sizeof(zval*) * class_type->default_static_members_count);
#else
- ALLOC_HASHTABLE(class_type->static_members);
+ class_type->static_members_table = emalloc(sizeof(zval*) * class_type->default_static_members_count);
#endif
- zend_hash_init(CE_STATIC_MEMBERS(class_type), zend_hash_num_elements(&class_type->default_static_members), NULL, ZVAL_PTR_DTOR, 0);
-
- zend_hash_internal_pointer_reset_ex(&class_type->default_static_members, &pos);
- while (zend_hash_get_current_data_ex(&class_type->default_static_members, (void**)&p, &pos) == SUCCESS) {
- char *str_index;
- uint str_length;
- ulong num_index;
- zval **q;
-
- zend_hash_get_current_key_ex(&class_type->default_static_members, &str_index, &str_length, &num_index, 0, &pos);
+ for (i = 0; i < class_type->default_static_members_count; i++) {
+ p = &class_type->default_static_members_table[i];
if (Z_ISREF_PP(p) &&
class_type->parent &&
- zend_hash_find(&class_type->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS &&
- *p == *q &&
- zend_hash_find(CE_STATIC_MEMBERS(class_type->parent), str_index, str_length, (void**)&q) == SUCCESS
+ i < class_type->parent->default_static_members_count &&
+ *p == class_type->parent->default_static_members_table[i] &&
+ CE_STATIC_MEMBERS(class_type->parent)[i]
) {
- Z_ADDREF_PP(q);
- Z_SET_ISREF_PP(q);
- zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)q, sizeof(zval*), NULL);
+ zval *q = CE_STATIC_MEMBERS(class_type->parent)[i];
+
+ Z_ADDREF_P(q);
+ Z_SET_ISREF_P(q);
+ CE_STATIC_MEMBERS(class_type)[i] = q;
} else {
zval *r;
@@ -1046,15 +1066,34 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC
*r = **p;
INIT_PZVAL(r);
zval_copy_ctor(r);
- zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)&r, sizeof(zval*), NULL);
+ CE_STATIC_MEMBERS(class_type)[i] = r;
}
- zend_hash_move_forward_ex(&class_type->default_static_members, &pos);
}
}
- zend_hash_apply_with_argument(CE_STATIC_MEMBERS(class_type), (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
+
+ for (i = 0; i < class_type->default_static_members_count; i++) {
+ zval_update_constant(&CE_STATIC_MEMBERS(class_type)[i], (void**)1 TSRMLS_CC);
+ }
*scope = old_scope;
- class_type->constants_updated = 1;
+ class_type->ce_flags |= ZEND_ACC_CONSTANTS_UPDATED;
+ }
+}
+/* }}} */
+
+ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type) /* {{{ */
+{
+ int i;
+
+ if (class_type->default_properties_count) {
+ object->properties_table = emalloc(sizeof(zval*) * class_type->default_properties_count);
+ for (i = 0; i < class_type->default_properties_count; i++) {
+ object->properties_table[i] = class_type->default_properties_table[i];
+ if (class_type->default_properties_table[i]) {
+ Z_ADDREF_P(object->properties_table[i]);
+ }
+ }
+ object->properties = NULL;
}
}
/* }}} */
@@ -1065,11 +1104,12 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC
* calling zend_merge_properties(). */
ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type, HashTable *properties ZEND_FILE_LINE_DC TSRMLS_DC) /* {{{ */
{
- zval *tmp;
zend_object *object;
if (class_type->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
- char *what = class_type->ce_flags & ZEND_ACC_INTERFACE ? "interface" : "abstract class";
+ char *what = (class_type->ce_flags & ZEND_ACC_INTERFACE) ? "interface"
+ :((class_type->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) ? "trait"
+ : "abstract class";
zend_error(E_ERROR, "Cannot instantiate %s %s", what, class_type->name);
}
@@ -1080,10 +1120,9 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type
Z_OBJVAL_P(arg) = zend_objects_new(&object, class_type TSRMLS_CC);
if (properties) {
object->properties = properties;
+ object->properties_table = NULL;
} else {
- ALLOC_HASHTABLE_REL(object->properties);
- zend_hash_init(object->properties, zend_hash_num_elements(&class_type->default_properties), NULL, ZVAL_PTR_DTOR, 0);
- zend_hash_copy(object->properties, &class_type->default_properties, zval_copy_property_ctor(class_type), (void *) &tmp, sizeof(zval *));
+ object_properties_init(object, class_type);
}
} else {
Z_OBJVAL_P(arg) = class_type->create_object(class_type TSRMLS_CC);
@@ -1437,7 +1476,7 @@ ZEND_API int add_property_long_ex(zval *arg, const char *key, uint key_len, long
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
- Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
+ Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
@@ -1455,7 +1494,7 @@ ZEND_API int add_property_bool_ex(zval *arg, const char *key, uint key_len, int
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
- Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
+ Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
@@ -1473,7 +1512,7 @@ ZEND_API int add_property_null_ex(zval *arg, const char *key, uint key_len TSRML
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
- Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
+ Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
@@ -1491,7 +1530,7 @@ ZEND_API int add_property_resource_ex(zval *arg, const char *key, uint key_len,
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
- Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
+ Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
@@ -1509,14 +1548,14 @@ ZEND_API int add_property_double_ex(zval *arg, const char *key, uint key_len, do
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
- Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
+ Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
}
/* }}} */
-ZEND_API int add_property_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC) /* {{{ */
+ZEND_API int add_property_string_ex(zval *arg, const char *key, uint key_len, const char *str, int duplicate TSRMLS_DC) /* {{{ */
{
zval *tmp;
zval *z_key;
@@ -1527,14 +1566,14 @@ ZEND_API int add_property_string_ex(zval *arg, const char *key, uint key_len, ch
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
- Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
+ Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
}
/* }}} */
-ZEND_API int add_property_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC) /* {{{ */
+ZEND_API int add_property_stringl_ex(zval *arg, const char *key, uint key_len, const char *str, uint length, int duplicate TSRMLS_DC) /* {{{ */
{
zval *tmp;
zval *z_key;
@@ -1545,7 +1584,7 @@ ZEND_API int add_property_stringl_ex(zval *arg, const char *key, uint key_len, c
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
- Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp TSRMLS_CC);
+ Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, tmp, 0 TSRMLS_CC);
zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */
zval_ptr_dtor(&z_key);
return SUCCESS;
@@ -1559,7 +1598,7 @@ ZEND_API int add_property_zval_ex(zval *arg, const char *key, uint key_len, zval
MAKE_STD_ZVAL(z_key);
ZVAL_STRINGL(z_key, key, key_len-1, 1);
- Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, value TSRMLS_CC);
+ Z_OBJ_HANDLER_P(arg, write_property)(arg, z_key, value, 0 TSRMLS_CC);
zval_ptr_dtor(&z_key);
return SUCCESS;
}
@@ -1657,6 +1696,84 @@ try_again:
}
/* }}} */
+ZEND_API void zend_collect_module_handlers(TSRMLS_D) /* {{{ */
+{
+ HashPosition pos;
+ zend_module_entry *module;
+ int startup_count = 0;
+ int shutdown_count = 0;
+ int post_deactivate_count = 0;
+ zend_class_entry **pce;
+ int class_count = 0;
+
+ /* Collect extensions with request startup/shutdown handlers */
+ for (zend_hash_internal_pointer_reset_ex(&module_registry, &pos);
+ zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) == SUCCESS;
+ zend_hash_move_forward_ex(&module_registry, &pos)) {
+ if (module->request_startup_func) {
+ startup_count++;
+ }
+ if (module->request_shutdown_func) {
+ shutdown_count++;
+ }
+ if (module->post_deactivate_func) {
+ post_deactivate_count++;
+ }
+ }
+ module_request_startup_handlers = (zend_module_entry**)malloc(
+ sizeof(zend_module_entry*) *
+ (startup_count + 1 +
+ shutdown_count + 1 +
+ post_deactivate_count + 1));
+ module_request_startup_handlers[startup_count] = NULL;
+ module_request_shutdown_handlers = module_request_startup_handlers + startup_count + 1;
+ module_request_shutdown_handlers[shutdown_count] = NULL;
+ module_post_deactivate_handlers = module_request_shutdown_handlers + shutdown_count + 1;
+ module_post_deactivate_handlers[post_deactivate_count] = NULL;
+ startup_count = 0;
+
+ for (zend_hash_internal_pointer_reset_ex(&module_registry, &pos);
+ zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) == SUCCESS;
+ zend_hash_move_forward_ex(&module_registry, &pos)) {
+ if (module->request_startup_func) {
+ module_request_startup_handlers[startup_count++] = module;
+ }
+ if (module->request_shutdown_func) {
+ module_request_shutdown_handlers[--shutdown_count] = module;
+ }
+ if (module->post_deactivate_func) {
+ module_post_deactivate_handlers[--post_deactivate_count] = module;
+ }
+ }
+
+ /* Collect internal classes with static members */
+ for (zend_hash_internal_pointer_reset_ex(CG(class_table), &pos);
+ zend_hash_get_current_data_ex(CG(class_table), (void *) &pce, &pos) == SUCCESS;
+ zend_hash_move_forward_ex(CG(class_table), &pos)) {
+ if ((*pce)->type == ZEND_INTERNAL_CLASS &&
+ (*pce)->default_static_members_count > 0) {
+ class_count++;
+ }
+ }
+
+ class_cleanup_handlers = (zend_class_entry**)malloc(
+ sizeof(zend_class_entry*) *
+ (class_count + 1));
+ class_cleanup_handlers[class_count] = NULL;
+
+ if (class_count) {
+ for (zend_hash_internal_pointer_reset_ex(CG(class_table), &pos);
+ zend_hash_get_current_data_ex(CG(class_table), (void *) &pce, &pos) == SUCCESS;
+ zend_hash_move_forward_ex(CG(class_table), &pos)) {
+ if ((*pce)->type == ZEND_INTERNAL_CLASS &&
+ (*pce)->default_static_members_count > 0) {
+ class_cleanup_handlers[--class_count] = *pce;
+ }
+ }
+ }
+}
+/* }}} */
+
ZEND_API int zend_startup_modules(TSRMLS_D) /* {{{ */
{
zend_hash_sort(&module_registry, zend_sort_modules, NULL, 0 TSRMLS_CC);
@@ -1665,6 +1782,14 @@ ZEND_API int zend_startup_modules(TSRMLS_D) /* {{{ */
}
/* }}} */
+ZEND_API void zend_destroy_modules(void) /* {{{ */
+{
+ free(class_cleanup_handlers);
+ free(module_request_startup_handlers);
+ zend_hash_graceful_reverse_destroy(&module_registry);
+}
+/* }}} */
+
ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TSRMLS_DC) /* {{{ */
{
int name_len;
@@ -1798,13 +1923,13 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
const zend_function_entry *ptr = functions;
zend_function function, *reg_function;
zend_internal_function *internal_function = (zend_internal_function *)&function;
- int count=0, unload=0;
+ int count=0, unload=0, result=0;
HashTable *target_function_table = function_table;
int error_type;
zend_function *ctor = NULL, *dtor = NULL, *clone = NULL, *__get = NULL, *__set = NULL, *__unset = NULL, *__isset = NULL, *__call = NULL, *__callstatic = NULL, *__tostring = NULL;
- char *lowercase_name;
+ const char *lowercase_name;
int fname_len;
- char *lc_class_name = NULL;
+ const char *lc_class_name = NULL;
int class_name_len = 0;
if (type==MODULE_PERSISTENT) {
@@ -1835,24 +1960,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
internal_function->function_name = (char*)ptr->fname;
internal_function->scope = scope;
internal_function->prototype = NULL;
- if (ptr->arg_info) {
- internal_function->arg_info = (zend_arg_info*)ptr->arg_info+1;
- internal_function->num_args = ptr->num_args;
- /* Currently you cannot denote that the function can accept less arguments than num_args */
- if (ptr->arg_info[0].required_num_args == -1) {
- internal_function->required_num_args = ptr->num_args;
- } else {
- internal_function->required_num_args = ptr->arg_info[0].required_num_args;
- }
- internal_function->pass_rest_by_reference = ptr->arg_info[0].pass_by_reference;
- internal_function->return_reference = ptr->arg_info[0].return_reference;
- } else {
- internal_function->arg_info = NULL;
- internal_function->num_args = 0;
- internal_function->required_num_args = 0;
- internal_function->pass_rest_by_reference = 0;
- internal_function->return_reference = 0;
- }
if (ptr->flags) {
if (!(ptr->flags & ZEND_ACC_PPP_MASK)) {
if (ptr->flags != ZEND_ACC_DEPRECATED || scope) {
@@ -1865,6 +1972,32 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
} else {
internal_function->fn_flags = ZEND_ACC_PUBLIC;
}
+ if (ptr->arg_info) {
+ zend_internal_function_info *info = (zend_internal_function_info*)ptr->arg_info;
+
+ internal_function->arg_info = (zend_arg_info*)ptr->arg_info+1;
+ internal_function->num_args = ptr->num_args;
+ /* Currently you cannot denote that the function can accept less arguments than num_args */
+ if (info->required_num_args == -1) {
+ internal_function->required_num_args = ptr->num_args;
+ } else {
+ internal_function->required_num_args = info->required_num_args;
+ }
+ if (info->pass_rest_by_reference) {
+ if (info->pass_rest_by_reference == ZEND_SEND_PREFER_REF) {
+ internal_function->fn_flags |= ZEND_ACC_PASS_REST_PREFER_REF;
+ } else {
+ internal_function->fn_flags |= ZEND_ACC_PASS_REST_BY_REFERENCE;
+ }
+ }
+ if (info->return_reference) {
+ internal_function->fn_flags |= ZEND_ACC_RETURN_REFERENCE;
+ }
+ } else {
+ internal_function->arg_info = NULL;
+ internal_function->num_args = 0;
+ internal_function->required_num_args = 0;
+ }
if (ptr->flags & ZEND_ACC_ABSTRACT) {
if (scope) {
/* This is a class that must be abstract itself. Here we set the check info. */
@@ -1881,13 +2014,13 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
}
} else {
if (scope && (scope->ce_flags & ZEND_ACC_INTERFACE)) {
- efree(lc_class_name);
+ efree((char*)lc_class_name);
zend_error(error_type, "Interface %s cannot contain non abstract method %s()", scope->name, ptr->fname);
return FAILURE;
}
if (!internal_function->handler) {
if (scope) {
- efree(lc_class_name);
+ efree((char*)lc_class_name);
}
zend_error(error_type, "Method %s%s%s() cannot be a NULL function", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
zend_unregister_functions(functions, count, target_function_table TSRMLS_CC);
@@ -1895,10 +2028,15 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
}
}
fname_len = strlen(ptr->fname);
- lowercase_name = zend_str_tolower_dup(ptr->fname, fname_len);
- if (zend_hash_add(target_function_table, lowercase_name, fname_len+1, &function, sizeof(zend_function), (void**)&reg_function) == FAILURE) {
+ lowercase_name = zend_new_interned_string(zend_str_tolower_dup(ptr->fname, fname_len), fname_len + 1, 1 TSRMLS_CC);
+ if (IS_INTERNED(lowercase_name)) {
+ result = zend_hash_quick_add(target_function_table, lowercase_name, fname_len+1, INTERNED_HASH(lowercase_name), &function, sizeof(zend_function), (void**)&reg_function);
+ } else {
+ result = zend_hash_add(target_function_table, lowercase_name, fname_len+1, &function, sizeof(zend_function), (void**)&reg_function);
+ }
+ if (result == FAILURE) {
unload=1;
- efree(lowercase_name);
+ str_efree(lowercase_name);
break;
}
if (scope) {
@@ -1906,7 +2044,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
* If it's an old-style constructor, store it only if we don't have
* a constructor already.
*/
- if ((fname_len == class_name_len) && !memcmp(lowercase_name, lc_class_name, class_name_len+1) && !ctor) {
+ if ((fname_len == class_name_len) && !ctor && !memcmp(lowercase_name, lc_class_name, class_name_len+1)) {
ctor = reg_function;
} else if ((fname_len == sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME))) {
ctor = reg_function;
@@ -1940,11 +2078,11 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
}
ptr++;
count++;
- efree(lowercase_name);
+ str_efree(lowercase_name);
}
if (unload) { /* before unloading, display all remaining bad function in the module */
if (scope) {
- efree(lc_class_name);
+ efree((char*)lc_class_name);
}
while (ptr->fname) {
fname_len = strlen(ptr->fname);
@@ -1952,7 +2090,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
if (zend_hash_exists(target_function_table, lowercase_name, fname_len+1)) {
zend_error(error_type, "Function registration failed - duplicate name - %s%s%s", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
}
- efree(lowercase_name);
+ efree((char*)lowercase_name);
ptr++;
}
zend_unregister_functions(functions, count, target_function_table TSRMLS_CC);
@@ -2032,7 +2170,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
}
__isset->common.fn_flags &= ~ZEND_ACC_ALLOW_STATIC;
}
- efree(lc_class_name);
+ efree((char*)lc_class_name);
}
return SUCCESS;
}
@@ -2085,7 +2223,7 @@ ZEND_API int zend_get_module_started(const char *module_name) /* {{{ */
static int clean_module_class(const zend_class_entry **ce, int *module_number TSRMLS_DC) /* {{{ */
{
- if ((*ce)->type == ZEND_INTERNAL_CLASS && (*ce)->module->module_number == *module_number) {
+ if ((*ce)->type == ZEND_INTERNAL_CLASS && (*ce)->info.internal.module->module_number == *module_number) {
return ZEND_HASH_APPLY_REMOVE;
} else {
return ZEND_HASH_APPLY_KEEP;
@@ -2134,7 +2272,7 @@ void module_destructor(zend_module_entry *module) /* {{{ */
#if HAVE_LIBDL
#if !(defined(NETWARE) && defined(APACHE_1_BUILD))
- if (module->handle) {
+ if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) {
DL_UNLOAD(module->handle);
}
#endif
@@ -2142,19 +2280,19 @@ void module_destructor(zend_module_entry *module) /* {{{ */
}
/* }}} */
-/* call request startup for all modules */
-int module_registry_request_startup(zend_module_entry *module TSRMLS_DC) /* {{{ */
+void zend_activate_modules(TSRMLS_D) /* {{{ */
{
- if (module->request_startup_func) {
-#if 0
- zend_printf("%s: Request startup\n", module->name);
-#endif
+ zend_module_entry **p = module_request_startup_handlers;
+
+ while (*p) {
+ zend_module_entry *module = *p;
+
if (module->request_startup_func(module->type, module->module_number TSRMLS_CC)==FAILURE) {
zend_error(E_WARNING, "request_startup() for %s module failed", module->name);
exit(1);
}
+ p++;
}
- return 0;
}
/* }}} */
@@ -2171,12 +2309,71 @@ int module_registry_cleanup(zend_module_entry *module TSRMLS_DC) /* {{{ */
}
/* }}} */
+void zend_deactivate_modules(TSRMLS_D) /* {{{ */
+{
+ EG(opline_ptr) = NULL; /* we're no longer executing anything */
+
+ zend_try {
+ if (EG(full_tables_cleanup)) {
+ zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
+ } else {
+ zend_module_entry **p = module_request_shutdown_handlers;
+
+ while (*p) {
+ zend_module_entry *module = *p;
+
+ module->request_shutdown_func(module->type, module->module_number TSRMLS_CC);
+ p++;
+ }
+ }
+ } zend_end_try();
+}
+/* }}} */
+
+ZEND_API void zend_cleanup_internal_classes(TSRMLS_D) /* {{{ */
+{
+ zend_class_entry **p = class_cleanup_handlers;
+
+ while (*p) {
+ zend_cleanup_internal_class_data(*p TSRMLS_CC);
+ p++;
+ }
+}
+/* }}} */
+
int module_registry_unload_temp(const zend_module_entry *module TSRMLS_DC) /* {{{ */
{
return (module->type == MODULE_TEMPORARY) ? ZEND_HASH_APPLY_REMOVE : ZEND_HASH_APPLY_STOP;
}
/* }}} */
+static int exec_done_cb(zend_module_entry *module TSRMLS_DC) /* {{{ */
+{
+ if (module->post_deactivate_func) {
+ module->post_deactivate_func();
+ }
+ return 0;
+}
+/* }}} */
+
+void zend_post_deactivate_modules(TSRMLS_D) /* {{{ */
+{
+ if (EG(full_tables_cleanup)) {
+ zend_hash_apply(&module_registry, (apply_func_t) exec_done_cb TSRMLS_CC);
+ zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_unload_temp TSRMLS_CC);
+ } else {
+ zend_module_entry **p = module_post_deactivate_handlers;
+
+ while (*p) {
+ zend_module_entry *module = *p;
+
+ module->post_deactivate_func();
+ p++;
+ }
+ }
+}
+/* }}} */
+
/* return the next free module number */
int zend_next_free_module(void) /* {{{ */
{
@@ -2187,21 +2384,26 @@ int zend_next_free_module(void) /* {{{ */
static zend_class_entry *do_register_internal_class(zend_class_entry *orig_class_entry, zend_uint ce_flags TSRMLS_DC) /* {{{ */
{
zend_class_entry *class_entry = malloc(sizeof(zend_class_entry));
- char *lowercase_name = malloc(orig_class_entry->name_length + 1);
+ char *lowercase_name = emalloc(orig_class_entry->name_length + 1);
*class_entry = *orig_class_entry;
class_entry->type = ZEND_INTERNAL_CLASS;
zend_initialize_class_data(class_entry, 0 TSRMLS_CC);
class_entry->ce_flags = ce_flags;
- class_entry->module = EG(current_module);
+ class_entry->info.internal.module = EG(current_module);
- if (class_entry->builtin_functions) {
- zend_register_functions(class_entry, class_entry->builtin_functions, &class_entry->function_table, MODULE_PERSISTENT TSRMLS_CC);
+ if (class_entry->info.internal.builtin_functions) {
+ zend_register_functions(class_entry, class_entry->info.internal.builtin_functions, &class_entry->function_table, MODULE_PERSISTENT TSRMLS_CC);
}
zend_str_tolower_copy(lowercase_name, orig_class_entry->name, class_entry->name_length);
- zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, &class_entry, sizeof(zend_class_entry *), NULL);
- free(lowercase_name);
+ lowercase_name = (char*)zend_new_interned_string(lowercase_name, class_entry->name_length + 1, 1 TSRMLS_CC);
+ if (IS_INTERNED(lowercase_name)) {
+ zend_hash_quick_update(CG(class_table), lowercase_name, class_entry->name_length+1, INTERNED_HASH(lowercase_name), &class_entry, sizeof(zend_class_entry *), NULL);
+ } else {
+ zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, &class_entry, sizeof(zend_class_entry *), NULL);
+ }
+ str_efree(lowercase_name);
return class_entry;
}
/* }}} */
@@ -2326,8 +2528,6 @@ static zend_object_value display_disabled_class(zend_class_entry *class_type TSR
zend_object_value retval;
zend_object *intern;
retval = zend_objects_new(&intern, class_type TSRMLS_CC);
- ALLOC_HASHTABLE(intern->properties);
- zend_hash_init(intern->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_error(E_WARNING, "%s() has been disabled for security reasons", class_type->name);
return retval;
}
@@ -2400,7 +2600,7 @@ static int zend_is_callable_check_class(const char *name, int name_len, zend_fca
*strict_class = 1;
ret = 1;
}
- } else if (zend_lookup_class_ex(name, name_len, 1, &pce TSRMLS_CC) == SUCCESS) {
+ } else if (zend_lookup_class_ex(name, name_len, NULL, 1, &pce TSRMLS_CC) == SUCCESS) {
zend_class_entry *scope = EG(active_op_array) ? EG(active_op_array)->scope : NULL;
fcc->calling_scope = *pce;
@@ -2427,7 +2627,8 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
{
zend_class_entry *ce_org = fcc->calling_scope;
int retval = 0;
- char *mname, *lmname, *colon;
+ char *mname, *lmname;
+ const char *colon;
int clen, mlen;
zend_class_entry *last_scope;
HashTable *ftable;
@@ -2553,26 +2754,24 @@ get_function_via_handler:
if (strict_class && ce_org->__call) {
fcc->function_handler = emalloc(sizeof(zend_internal_function));
fcc->function_handler->internal_function.type = ZEND_INTERNAL_FUNCTION;
- fcc->function_handler->internal_function.module = ce_org->module;
+ fcc->function_handler->internal_function.module = (ce_org->type == ZEND_INTERNAL_CLASS) ? ce_org->info.internal.module : NULL;
fcc->function_handler->internal_function.handler = zend_std_call_user_call;
fcc->function_handler->internal_function.arg_info = NULL;
fcc->function_handler->internal_function.num_args = 0;
fcc->function_handler->internal_function.scope = ce_org;
fcc->function_handler->internal_function.fn_flags = ZEND_ACC_CALL_VIA_HANDLER;
fcc->function_handler->internal_function.function_name = estrndup(mname, mlen);
- fcc->function_handler->internal_function.pass_rest_by_reference = 0;
- fcc->function_handler->internal_function.return_reference = ZEND_RETURN_VALUE;
call_via_handler = 1;
retval = 1;
} else if (Z_OBJ_HT_P(fcc->object_ptr)->get_method) {
- fcc->function_handler = Z_OBJ_HT_P(fcc->object_ptr)->get_method(&fcc->object_ptr, mname, mlen TSRMLS_CC);
+ fcc->function_handler = Z_OBJ_HT_P(fcc->object_ptr)->get_method(&fcc->object_ptr, mname, mlen, NULL TSRMLS_CC);
if (fcc->function_handler) {
if (strict_class &&
(!fcc->function_handler->common.scope ||
!instanceof_function(ce_org, fcc->function_handler->common.scope TSRMLS_CC))) {
if ((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) != 0) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
- efree(fcc->function_handler->common.function_name);
+ efree((char*)fcc->function_handler->common.function_name);
}
efree(fcc->function_handler);
}
@@ -2586,7 +2785,7 @@ get_function_via_handler:
if (fcc->calling_scope->get_static_method) {
fcc->function_handler = fcc->calling_scope->get_static_method(fcc->calling_scope, mname, mlen TSRMLS_CC);
} else {
- fcc->function_handler = zend_std_get_static_method(fcc->calling_scope, mname, mlen TSRMLS_CC);
+ fcc->function_handler = zend_std_get_static_method(fcc->calling_scope, mname, mlen, NULL TSRMLS_CC);
}
if (fcc->function_handler) {
retval = 1;
@@ -2748,7 +2947,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zval *object_ptr, uint ch
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
- efree(fcc->function_handler->common.function_name);
+ efree((char*)fcc->function_handler->common.function_name);
}
efree(fcc->function_handler);
}
@@ -2826,7 +3025,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zval *object_ptr, uint ch
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION) {
- efree(fcc->function_handler->common.function_name);
+ efree((char*)fcc->function_handler->common.function_name);
}
efree(fcc->function_handler);
}
@@ -2904,7 +3103,7 @@ ZEND_API zend_bool zend_make_callable(zval *callable, char **callable_name TSRML
fcc.function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY ||
fcc.function_handler->type == ZEND_OVERLOADED_FUNCTION)) {
if (fcc.function_handler->type != ZEND_OVERLOADED_FUNCTION) {
- efree(fcc.function_handler->common.function_name);
+ efree((char*)fcc.function_handler->common.function_name);
}
efree(fcc.function_handler);
}
@@ -3090,18 +3289,40 @@ ZEND_API const char *zend_get_module_version(const char *module_name) /* {{{ */
}
/* }}} */
-ZEND_API int zend_declare_property_ex(zend_class_entry *ce, const char *name, int name_length, zval *property, int access_type, char *doc_comment, int doc_comment_len TSRMLS_DC) /* {{{ */
+ZEND_API int zend_declare_property_ex(zend_class_entry *ce, const char *name, int name_length, zval *property, int access_type, const char *doc_comment, int doc_comment_len TSRMLS_DC) /* {{{ */
{
- zend_property_info property_info;
- HashTable *target_symbol_table;
+ zend_property_info property_info, *property_info_ptr;
+ const char *interned_name;
+ ulong h = zend_get_hash_value(name, name_length+1);
if (!(access_type & ZEND_ACC_PPP_MASK)) {
access_type |= ZEND_ACC_PUBLIC;
}
if (access_type & ZEND_ACC_STATIC) {
- target_symbol_table = &ce->default_static_members;
+ if (zend_hash_quick_find(&ce->properties_info, name, name_length + 1, h, (void**)&property_info_ptr) == SUCCESS &&
+ (property_info_ptr->flags & ZEND_ACC_STATIC) != 0) {
+ property_info.offset = property_info_ptr->offset;
+ zval_ptr_dtor(&ce->default_static_members_table[property_info.offset]);
+ zend_hash_quick_del(&ce->properties_info, name, name_length + 1, h);
+ } else {
+ property_info.offset = ce->default_static_members_count++;
+ ce->default_static_members_table = perealloc(ce->default_static_members_table, sizeof(zval*) * ce->default_static_members_count, ce->type == ZEND_INTERNAL_CLASS);
+ }
+ ce->default_static_members_table[property_info.offset] = property;
+ if (ce->type == ZEND_USER_CLASS) {
+ ce->static_members_table = ce->default_static_members_table;
+ }
} else {
- target_symbol_table = &ce->default_properties;
+ if (zend_hash_quick_find(&ce->properties_info, name, name_length + 1, h, (void**)&property_info_ptr) == SUCCESS &&
+ (property_info_ptr->flags & ZEND_ACC_STATIC) == 0) {
+ property_info.offset = property_info_ptr->offset;
+ zval_ptr_dtor(&ce->default_properties_table[property_info.offset]);
+ zend_hash_quick_del(&ce->properties_info, name, name_length + 1, h);
+ } else {
+ property_info.offset = ce->default_properties_count++;
+ ce->default_properties_table = perealloc(ce->default_properties_table, sizeof(zval*) * ce->default_properties_count, ce->type == ZEND_INTERNAL_CLASS);
+ }
+ ce->default_properties_table[property_info.offset] = property;
}
if (ce->type & ZEND_INTERNAL_CLASS) {
switch(Z_TYPE_P(property)) {
@@ -3121,7 +3342,6 @@ ZEND_API int zend_declare_property_ex(zend_class_entry *ce, const char *name, in
int priv_name_length;
zend_mangle_property_name(&priv_name, &priv_name_length, ce->name, ce->name_length, name, name_length, ce->type & ZEND_INTERNAL_CLASS);
- zend_hash_update(target_symbol_table, priv_name, priv_name_length+1, &property, sizeof(zval *), NULL);
property_info.name = priv_name;
property_info.name_length = priv_name_length;
}
@@ -3131,46 +3351,51 @@ ZEND_API int zend_declare_property_ex(zend_class_entry *ce, const char *name, in
int prot_name_length;
zend_mangle_property_name(&prot_name, &prot_name_length, "*", 1, name, name_length, ce->type & ZEND_INTERNAL_CLASS);
- zend_hash_update(target_symbol_table, prot_name, prot_name_length+1, &property, sizeof(zval *), NULL);
property_info.name = prot_name;
property_info.name_length = prot_name_length;
}
break;
case ZEND_ACC_PUBLIC:
- if (ce->parent) {
- char *prot_name;
- int prot_name_length;
-
- zend_mangle_property_name(&prot_name, &prot_name_length, "*", 1, name, name_length, ce->type & ZEND_INTERNAL_CLASS);
- zend_hash_del(target_symbol_table, prot_name, prot_name_length+1);
- pefree(prot_name, ce->type & ZEND_INTERNAL_CLASS);
+ if (IS_INTERNED(name)) {
+ property_info.name = (char*)name;
+ } else {
+ property_info.name = ce->type & ZEND_INTERNAL_CLASS ? zend_strndup(name, name_length) : estrndup(name, name_length);
}
- zend_hash_update(target_symbol_table, name, name_length+1, &property, sizeof(zval *), NULL);
- property_info.name = ce->type & ZEND_INTERNAL_CLASS ? zend_strndup(name, name_length) : estrndup(name, name_length);
property_info.name_length = name_length;
break;
}
+
+ interned_name = zend_new_interned_string(property_info.name, property_info.name_length+1, 0 TSRMLS_CC);
+ if (interned_name != property_info.name) {
+ if (ce->type == ZEND_USER_CLASS) {
+ efree((char*)property_info.name);
+ } else {
+ free((char*)property_info.name);
+ }
+ property_info.name = interned_name;
+ }
+
property_info.flags = access_type;
- property_info.h = zend_get_hash_value(property_info.name, property_info.name_length+1);
+ property_info.h = (access_type & ZEND_ACC_PUBLIC) ? h : zend_get_hash_value(property_info.name, property_info.name_length+1);
property_info.doc_comment = doc_comment;
property_info.doc_comment_len = doc_comment_len;
property_info.ce = ce;
- zend_hash_update(&ce->properties_info, name, name_length + 1, &property_info, sizeof(zend_property_info), NULL);
+ zend_hash_quick_update(&ce->properties_info, name, name_length+1, h, &property_info, sizeof(zend_property_info), NULL);
return SUCCESS;
}
/* }}} */
-ZEND_API int zend_declare_property(zend_class_entry *ce, char *name, int name_length, zval *property, int access_type TSRMLS_DC) /* {{{ */
+ZEND_API int zend_declare_property(zend_class_entry *ce, const char *name, int name_length, zval *property, int access_type TSRMLS_DC) /* {{{ */
{
return zend_declare_property_ex(ce, name, name_length, property, access_type, NULL, 0 TSRMLS_CC);
}
/* }}} */
-ZEND_API int zend_declare_property_null(zend_class_entry *ce, char *name, int name_length, int access_type TSRMLS_DC) /* {{{ */
+ZEND_API int zend_declare_property_null(zend_class_entry *ce, const char *name, int name_length, int access_type TSRMLS_DC) /* {{{ */
{
zval *property;
@@ -3184,7 +3409,7 @@ ZEND_API int zend_declare_property_null(zend_class_entry *ce, char *name, int na
}
/* }}} */
-ZEND_API int zend_declare_property_bool(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC) /* {{{ */
+ZEND_API int zend_declare_property_bool(zend_class_entry *ce, const char *name, int name_length, long value, int access_type TSRMLS_DC) /* {{{ */
{
zval *property;
@@ -3199,7 +3424,7 @@ ZEND_API int zend_declare_property_bool(zend_class_entry *ce, char *name, int na
}
/* }}} */
-ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC) /* {{{ */
+ZEND_API int zend_declare_property_long(zend_class_entry *ce, const char *name, int name_length, long value, int access_type TSRMLS_DC) /* {{{ */
{
zval *property;
@@ -3214,7 +3439,7 @@ ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int na
}
/* }}} */
-ZEND_API int zend_declare_property_double(zend_class_entry *ce, char *name, int name_length, double value, int access_type TSRMLS_DC) /* {{{ */
+ZEND_API int zend_declare_property_double(zend_class_entry *ce, const char *name, int name_length, double value, int access_type TSRMLS_DC) /* {{{ */
{
zval *property;
@@ -3229,7 +3454,7 @@ ZEND_API int zend_declare_property_double(zend_class_entry *ce, char *name, int
}
/* }}} */
-ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int name_length, char *value, int access_type TSRMLS_DC) /* {{{ */
+ZEND_API int zend_declare_property_string(zend_class_entry *ce, const char *name, int name_length, const char *value, int access_type TSRMLS_DC) /* {{{ */
{
zval *property;
int len = strlen(value);
@@ -3246,7 +3471,7 @@ ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int
}
/* }}} */
-ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int name_length, char *value, int value_len, int access_type TSRMLS_DC) /* {{{ */
+ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, const char *name, int name_length, const char *value, int value_len, int access_type TSRMLS_DC) /* {{{ */
{
zval *property;
@@ -3350,7 +3575,7 @@ ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, const char
}
/* }}} */
-ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char *name, int name_length, zval *value TSRMLS_DC) /* {{{ */
+ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, const char *name, int name_length, zval *value TSRMLS_DC) /* {{{ */
{
zval *property;
zend_class_entry *old_scope = EG(scope);
@@ -3358,7 +3583,7 @@ ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char *
EG(scope) = scope;
if (!Z_OBJ_HT_P(object)->write_property) {
- char *class_name;
+ const char *class_name;
zend_uint class_name_len;
zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC);
@@ -3367,14 +3592,14 @@ ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char *
}
MAKE_STD_ZVAL(property);
ZVAL_STRINGL(property, name, name_length, 1);
- Z_OBJ_HT_P(object)->write_property(object, property, value TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, value, 0 TSRMLS_CC);
zval_ptr_dtor(&property);
EG(scope) = old_scope;
}
/* }}} */
-ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, char *name, int name_length TSRMLS_DC) /* {{{ */
+ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, const char *name, int name_length TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3386,7 +3611,7 @@ ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, c
}
/* }}} */
-ZEND_API void zend_update_property_bool(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC) /* {{{ */
+ZEND_API void zend_update_property_bool(zend_class_entry *scope, zval *object, const char *name, int name_length, long value TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3398,7 +3623,7 @@ ZEND_API void zend_update_property_bool(zend_class_entry *scope, zval *object, c
}
/* }}} */
-ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC) /* {{{ */
+ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, const char *name, int name_length, long value TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3410,7 +3635,7 @@ ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, c
}
/* }}} */
-ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object, char *name, int name_length, double value TSRMLS_DC) /* {{{ */
+ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object, const char *name, int name_length, double value TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3422,7 +3647,7 @@ ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object,
}
/* }}} */
-ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value TSRMLS_DC) /* {{{ */
+ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, const char *name, int name_length, const char *value TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3434,7 +3659,7 @@ ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object,
}
/* }}} */
-ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value, int value_len TSRMLS_DC) /* {{{ */
+ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, const char *name, int name_length, const char *value, int value_len TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3446,13 +3671,13 @@ ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object
}
/* }}} */
-ZEND_API int zend_update_static_property(zend_class_entry *scope, char *name, int name_length, zval *value TSRMLS_DC) /* {{{ */
+ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *name, int name_length, zval *value TSRMLS_DC) /* {{{ */
{
zval **property;
zend_class_entry *old_scope = EG(scope);
EG(scope) = scope;
- property = zend_std_get_static_property(scope, name, name_length, 0 TSRMLS_CC);
+ property = zend_std_get_static_property(scope, name, name_length, 0, NULL TSRMLS_CC);
EG(scope) = old_scope;
if (!property) {
return FAILURE;
@@ -3481,7 +3706,7 @@ ZEND_API int zend_update_static_property(zend_class_entry *scope, char *name, in
}
/* }}} */
-ZEND_API int zend_update_static_property_null(zend_class_entry *scope, char *name, int name_length TSRMLS_DC) /* {{{ */
+ZEND_API int zend_update_static_property_null(zend_class_entry *scope, const char *name, int name_length TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3493,7 +3718,7 @@ ZEND_API int zend_update_static_property_null(zend_class_entry *scope, char *nam
}
/* }}} */
-ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC) /* {{{ */
+ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, const char *name, int name_length, long value TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3505,7 +3730,7 @@ ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, char *nam
}
/* }}} */
-ZEND_API int zend_update_static_property_long(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC) /* {{{ */
+ZEND_API int zend_update_static_property_long(zend_class_entry *scope, const char *name, int name_length, long value TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3517,7 +3742,7 @@ ZEND_API int zend_update_static_property_long(zend_class_entry *scope, char *nam
}
/* }}} */
-ZEND_API int zend_update_static_property_double(zend_class_entry *scope, char *name, int name_length, double value TSRMLS_DC) /* {{{ */
+ZEND_API int zend_update_static_property_double(zend_class_entry *scope, const char *name, int name_length, double value TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3529,7 +3754,7 @@ ZEND_API int zend_update_static_property_double(zend_class_entry *scope, char *n
}
/* }}} */
-ZEND_API int zend_update_static_property_string(zend_class_entry *scope, char *name, int name_length, const char *value TSRMLS_DC) /* {{{ */
+ZEND_API int zend_update_static_property_string(zend_class_entry *scope, const char *name, int name_length, const char *value TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3541,7 +3766,7 @@ ZEND_API int zend_update_static_property_string(zend_class_entry *scope, char *n
}
/* }}} */
-ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char *name, int name_length, const char *value, int value_len TSRMLS_DC) /* {{{ */
+ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, const char *name, int name_length, const char *value, int value_len TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -3553,7 +3778,7 @@ ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char *
}
/* }}} */
-ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, char *name, int name_length, zend_bool silent TSRMLS_DC) /* {{{ */
+ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, const char *name, int name_length, zend_bool silent TSRMLS_DC) /* {{{ */
{
zval *property, *value;
zend_class_entry *old_scope = EG(scope);
@@ -3561,7 +3786,7 @@ ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, char *n
EG(scope) = scope;
if (!Z_OBJ_HT_P(object)->read_property) {
- char *class_name;
+ const char *class_name;
zend_uint class_name_len;
zend_get_object_classname(object, &class_name, &class_name_len TSRMLS_CC);
@@ -3570,7 +3795,7 @@ ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, char *n
MAKE_STD_ZVAL(property);
ZVAL_STRINGL(property, name, name_length, 1);
- value = Z_OBJ_HT_P(object)->read_property(object, property, silent?BP_VAR_IS:BP_VAR_R TSRMLS_CC);
+ value = Z_OBJ_HT_P(object)->read_property(object, property, silent?BP_VAR_IS:BP_VAR_R, 0 TSRMLS_CC);
zval_ptr_dtor(&property);
EG(scope) = old_scope;
@@ -3578,13 +3803,13 @@ ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, char *n
}
/* }}} */
-ZEND_API zval *zend_read_static_property(zend_class_entry *scope, char *name, int name_length, zend_bool silent TSRMLS_DC) /* {{{ */
+ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, int name_length, zend_bool silent TSRMLS_DC) /* {{{ */
{
zval **property;
zend_class_entry *old_scope = EG(scope);
EG(scope) = scope;
- property = zend_std_get_static_property(scope, name, name_length, silent TSRMLS_CC);
+ property = zend_std_get_static_property(scope, name, name_length, silent, NULL TSRMLS_CC);
EG(scope) = old_scope;
return property?*property:NULL;
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index a46580d0b..1296f2f90 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -98,13 +98,14 @@ typedef struct _zend_fcall_info_cache {
#define ZEND_FE_END { NULL, NULL, NULL, 0, 0 }
-#define ZEND_ARG_INFO(pass_by_ref, name) { #name, sizeof(#name)-1, NULL, 0, 0, 0, pass_by_ref, 0, 0 },
-#define ZEND_ARG_PASS_INFO(pass_by_ref) { NULL, 0, NULL, 0, 0, 0, pass_by_ref, 0, 0 },
-#define ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null) { #name, sizeof(#name)-1, #classname, sizeof(#classname)-1, 0, allow_null, pass_by_ref, 0, 0 },
-#define ZEND_ARG_ARRAY_INFO(pass_by_ref, name, allow_null) { #name, sizeof(#name)-1, NULL, 0, 1, allow_null, pass_by_ref, 0, 0 },
+#define ZEND_ARG_INFO(pass_by_ref, name) { #name, sizeof(#name)-1, NULL, 0, 0, 0, pass_by_ref},
+#define ZEND_ARG_PASS_INFO(pass_by_ref) { NULL, 0, NULL, 0, 0, 0, pass_by_ref},
+#define ZEND_ARG_OBJ_INFO(pass_by_ref, name, classname, allow_null) { #name, sizeof(#name)-1, #classname, sizeof(#classname)-1, IS_OBJECT, allow_null, pass_by_ref},
+#define ZEND_ARG_ARRAY_INFO(pass_by_ref, name, allow_null) { #name, sizeof(#name)-1, NULL, 0, IS_ARRAY, allow_null, pass_by_ref},
+#define ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null) { #name, sizeof(#name)-1, NULL, 0, type_hint, allow_null, pass_by_ref},
#define ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, return_reference, required_num_args) \
static const zend_arg_info name[] = { \
- { NULL, 0, NULL, 0, 0, 0, pass_rest_by_reference, return_reference, required_num_args },
+ { NULL, 0, NULL, required_num_args, 0, return_reference, pass_rest_by_reference},
#define ZEND_BEGIN_ARG_INFO(name, pass_rest_by_reference) \
ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, ZEND_RETURN_VALUE, -1)
#define ZEND_END_ARG_INFO() };
@@ -167,10 +168,13 @@ typedef struct _zend_fcall_info_cache {
#define INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, class_name_len, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
{ \
+ const char *cl_name = class_name; \
int _len = class_name_len; \
- class_container.name = zend_strndup(class_name, _len); \
+ class_container.name = zend_new_interned_string(cl_name, _len+1, 0 TSRMLS_CC); \
+ if (class_container.name == cl_name) { \
+ class_container.name = zend_strndup(cl_name, _len); \
+ } \
class_container.name_length = _len; \
- class_container.builtin_functions = functions; \
class_container.constructor = NULL; \
class_container.destructor = NULL; \
class_container.clone = NULL; \
@@ -192,10 +196,15 @@ typedef struct _zend_fcall_info_cache {
class_container.unserialize = NULL; \
class_container.parent = NULL; \
class_container.num_interfaces = 0; \
+ class_container.traits = NULL; \
+ class_container.num_traits = 0; \
+ class_container.trait_aliases = NULL; \
+ class_container.trait_precedences = NULL; \
class_container.interfaces = NULL; \
class_container.get_iterator = NULL; \
class_container.iterator_funcs.funcs = NULL; \
- class_container.module = NULL; \
+ class_container.info.internal.module = NULL; \
+ class_container.info.internal.builtin_functions = functions; \
}
#define INIT_OVERLOADED_CLASS_ENTRY(class_container, class_name, functions, handle_fcall, handle_propget, handle_propset) \
@@ -209,9 +218,9 @@ typedef struct _zend_fcall_info_cache {
INIT_OVERLOADED_CLASS_ENTRY(class_container, ZEND_NS_NAME(ns, class_name), functions, handle_fcall, handle_propget, handle_propset)
#ifdef ZTS
-# define CE_STATIC_MEMBERS(ce) (((ce)->type==ZEND_USER_CLASS)?(ce)->static_members:CG(static_members)[(zend_intptr_t)(ce)->static_members])
+# define CE_STATIC_MEMBERS(ce) (((ce)->type==ZEND_USER_CLASS)?(ce)->static_members_table:CG(static_members_table)[(zend_intptr_t)(ce)->static_members_table])
#else
-# define CE_STATIC_MEMBERS(ce) ((ce)->static_members)
+# define CE_STATIC_MEMBERS(ce) ((ce)->static_members_table)
#endif
#define ZEND_FCI_INITIALIZED(fci) ((fci).size != 0)
@@ -237,12 +246,12 @@ ZEND_API int zend_copy_parameters_array(int param_count, zval *argument_array TS
/* Parameter parsing API -- andrei */
#define ZEND_PARSE_PARAMS_QUIET 1<<1
-ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, char *type_spec, ...);
-ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, char *type_spec, ...);
+ZEND_API int zend_parse_parameters(int num_args TSRMLS_DC, const char *type_spec, ...);
+ZEND_API int zend_parse_parameters_ex(int flags, int num_args TSRMLS_DC, const char *type_spec, ...);
ZEND_API char *zend_zval_type_name(const zval *arg);
-ZEND_API int zend_parse_method_parameters(int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...);
-ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC, zval *this_ptr, char *type_spec, ...);
+ZEND_API int zend_parse_method_parameters(int num_args TSRMLS_DC, zval *this_ptr, const char *type_spec, ...);
+ZEND_API int zend_parse_method_parameters_ex(int flags, int num_args TSRMLS_DC, zval *this_ptr, const char *type_spec, ...);
/* End of parameter parsing API -- andrei */
@@ -253,6 +262,8 @@ ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *mod
ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TSRMLS_DC);
ZEND_API int zend_startup_module_ex(zend_module_entry *module TSRMLS_DC);
ZEND_API int zend_startup_modules(TSRMLS_D);
+ZEND_API void zend_collect_module_handlers(TSRMLS_D);
+ZEND_API void zend_destroy_modules(void);
ZEND_API void zend_check_magic_method_implementation(const zend_class_entry *ce, const zend_function *fptr, int error_type TSRMLS_DC);
ZEND_API zend_class_entry *zend_register_internal_class(zend_class_entry *class_entry TSRMLS_DC);
@@ -284,14 +295,14 @@ ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, char **cal
ZEND_API zend_bool zend_make_callable(zval *callable, char **callable_name TSRMLS_DC);
ZEND_API const char *zend_get_module_version(const char *module_name);
ZEND_API int zend_get_module_started(const char *module_name);
-ZEND_API int zend_declare_property(zend_class_entry *ce, char *name, int name_length, zval *property, int access_type TSRMLS_DC);
-ZEND_API int zend_declare_property_ex(zend_class_entry *ce, const char *name, int name_length, zval *property, int access_type, char *doc_comment, int doc_comment_len TSRMLS_DC);
-ZEND_API int zend_declare_property_null(zend_class_entry *ce, char *name, int name_length, int access_type TSRMLS_DC);
-ZEND_API int zend_declare_property_bool(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC);
-ZEND_API int zend_declare_property_long(zend_class_entry *ce, char *name, int name_length, long value, int access_type TSRMLS_DC);
-ZEND_API int zend_declare_property_double(zend_class_entry *ce, char *name, int name_length, double value, int access_type TSRMLS_DC);
-ZEND_API int zend_declare_property_string(zend_class_entry *ce, char *name, int name_length, char *value, int access_type TSRMLS_DC);
-ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, char *name, int name_length, char *value, int value_len, int access_type TSRMLS_DC);
+ZEND_API int zend_declare_property(zend_class_entry *ce, const char *name, int name_length, zval *property, int access_type TSRMLS_DC);
+ZEND_API int zend_declare_property_ex(zend_class_entry *ce, const char *name, int name_length, zval *property, int access_type, const char *doc_comment, int doc_comment_len TSRMLS_DC);
+ZEND_API int zend_declare_property_null(zend_class_entry *ce, const char *name, int name_length, int access_type TSRMLS_DC);
+ZEND_API int zend_declare_property_bool(zend_class_entry *ce, const char *name, int name_length, long value, int access_type TSRMLS_DC);
+ZEND_API int zend_declare_property_long(zend_class_entry *ce, const char *name, int name_length, long value, int access_type TSRMLS_DC);
+ZEND_API int zend_declare_property_double(zend_class_entry *ce, const char *name, int name_length, double value, int access_type TSRMLS_DC);
+ZEND_API int zend_declare_property_string(zend_class_entry *ce, const char *name, int name_length, const char *value, int access_type TSRMLS_DC);
+ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, const char *name, int name_length, const char *value, int value_len, int access_type TSRMLS_DC);
ZEND_API int zend_declare_class_constant(zend_class_entry *ce, const char *name, size_t name_length, zval *value TSRMLS_DC);
ZEND_API int zend_declare_class_constant_null(zend_class_entry *ce, const char *name, size_t name_length TSRMLS_DC);
@@ -302,28 +313,28 @@ ZEND_API int zend_declare_class_constant_stringl(zend_class_entry *ce, const cha
ZEND_API int zend_declare_class_constant_string(zend_class_entry *ce, const char *name, size_t name_length, const char *value TSRMLS_DC);
ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC);
-ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, char *name, int name_length, zval *value TSRMLS_DC);
-ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, char *name, int name_length TSRMLS_DC);
-ZEND_API void zend_update_property_bool(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC);
-ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, char *name, int name_length, long value TSRMLS_DC);
-ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object, char *name, int name_length, double value TSRMLS_DC);
-ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value TSRMLS_DC);
-ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, char *name, int name_length, const char *value, int value_length TSRMLS_DC);
-
-ZEND_API int zend_update_static_property(zend_class_entry *scope, char *name, int name_length, zval *value TSRMLS_DC);
-ZEND_API int zend_update_static_property_null(zend_class_entry *scope, char *name, int name_length TSRMLS_DC);
-ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC);
-ZEND_API int zend_update_static_property_long(zend_class_entry *scope, char *name, int name_length, long value TSRMLS_DC);
-ZEND_API int zend_update_static_property_double(zend_class_entry *scope, char *name, int name_length, double value TSRMLS_DC);
-ZEND_API int zend_update_static_property_string(zend_class_entry *scope, char *name, int name_length, const char *value TSRMLS_DC);
-ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, char *name, int name_length, const char *value, int value_length TSRMLS_DC);
-
-ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, char *name, int name_length, zend_bool silent TSRMLS_DC);
-
-ZEND_API zval *zend_read_static_property(zend_class_entry *scope, char *name, int name_length, zend_bool silent TSRMLS_DC);
+ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, const char *name, int name_length, zval *value TSRMLS_DC);
+ZEND_API void zend_update_property_null(zend_class_entry *scope, zval *object, const char *name, int name_length TSRMLS_DC);
+ZEND_API void zend_update_property_bool(zend_class_entry *scope, zval *object, const char *name, int name_length, long value TSRMLS_DC);
+ZEND_API void zend_update_property_long(zend_class_entry *scope, zval *object, const char *name, int name_length, long value TSRMLS_DC);
+ZEND_API void zend_update_property_double(zend_class_entry *scope, zval *object, const char *name, int name_length, double value TSRMLS_DC);
+ZEND_API void zend_update_property_string(zend_class_entry *scope, zval *object, const char *name, int name_length, const char *value TSRMLS_DC);
+ZEND_API void zend_update_property_stringl(zend_class_entry *scope, zval *object, const char *name, int name_length, const char *value, int value_length TSRMLS_DC);
+
+ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *name, int name_length, zval *value TSRMLS_DC);
+ZEND_API int zend_update_static_property_null(zend_class_entry *scope, const char *name, int name_length TSRMLS_DC);
+ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, const char *name, int name_length, long value TSRMLS_DC);
+ZEND_API int zend_update_static_property_long(zend_class_entry *scope, const char *name, int name_length, long value TSRMLS_DC);
+ZEND_API int zend_update_static_property_double(zend_class_entry *scope, const char *name, int name_length, double value TSRMLS_DC);
+ZEND_API int zend_update_static_property_string(zend_class_entry *scope, const char *name, int name_length, const char *value TSRMLS_DC);
+ZEND_API int zend_update_static_property_stringl(zend_class_entry *scope, const char *name, int name_length, const char *value, int value_length TSRMLS_DC);
+
+ZEND_API zval *zend_read_property(zend_class_entry *scope, zval *object, const char *name, int name_length, zend_bool silent TSRMLS_DC);
+
+ZEND_API zval *zend_read_static_property(zend_class_entry *scope, const char *name, int name_length, zend_bool silent TSRMLS_DC);
ZEND_API zend_class_entry *zend_get_class_entry(const zval *zobject TSRMLS_DC);
-ZEND_API int zend_get_object_classname(const zval *object, char **class_name, zend_uint *class_name_len TSRMLS_DC);
+ZEND_API int zend_get_object_classname(const zval *object, const char **class_name, zend_uint *class_name_len TSRMLS_DC);
ZEND_API char *zend_get_type_by_const(int type);
#define getThis() (this_ptr)
@@ -348,6 +359,7 @@ ZEND_API int _array_init(zval *arg, uint size ZEND_FILE_LINE_DC);
ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC TSRMLS_DC);
ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC TSRMLS_DC);
ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *ce, HashTable *properties ZEND_FILE_LINE_DC TSRMLS_DC);
+ZEND_API void object_properties_init(zend_object *object, zend_class_entry *class_type);
ZEND_API void zend_merge_properties(zval *obj, HashTable *properties, int destroy_ht TSRMLS_DC);
@@ -412,8 +424,8 @@ ZEND_API int add_property_null_ex(zval *arg, const char *key, uint key_len TSRML
ZEND_API int add_property_bool_ex(zval *arg, const char *key, uint key_len, int b TSRMLS_DC);
ZEND_API int add_property_resource_ex(zval *arg, const char *key, uint key_len, long r TSRMLS_DC);
ZEND_API int add_property_double_ex(zval *arg, const char *key, uint key_len, double d TSRMLS_DC);
-ZEND_API int add_property_string_ex(zval *arg, const char *key, uint key_len, char *str, int duplicate TSRMLS_DC);
-ZEND_API int add_property_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate TSRMLS_DC);
+ZEND_API int add_property_string_ex(zval *arg, const char *key, uint key_len, const char *str, int duplicate TSRMLS_DC);
+ZEND_API int add_property_stringl_ex(zval *arg, const char *key, uint key_len, const char *str, uint length, int duplicate TSRMLS_DC);
ZEND_API int add_property_zval_ex(zval *arg, const char *key, uint key_len, zval *value TSRMLS_DC);
#define add_property_long(__arg, __key, __n) add_property_long_ex(__arg, __key, strlen(__key)+1, __n TSRMLS_CC)
@@ -490,7 +502,11 @@ ZEND_API int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci
ZEND_API int zend_set_hash_symbol(zval *symbol, const char *name, int name_length, zend_bool is_ref, int num_symbol_tables, ...);
-ZEND_API int zend_delete_global_variable(char *name, int name_len TSRMLS_DC);
+ZEND_API void zend_delete_variable(zend_execute_data *ex, HashTable *ht, const char *name, int name_len, ulong hash_value TSRMLS_DC);
+
+ZEND_API int zend_delete_global_variable(const char *name, int name_len TSRMLS_DC);
+
+ZEND_API int zend_delete_global_variable_ex(const char *name, int name_len, ulong hash_value TSRMLS_DC);
ZEND_API void zend_reset_all_cv(HashTable *symbol_table TSRMLS_DC);
@@ -512,54 +528,64 @@ END_EXTERN_C()
#define CHECK_ZVAL_STRING_REL(z)
#endif
-#define ZVAL_RESOURCE(z, l) { \
- Z_TYPE_P(z) = IS_RESOURCE; \
- Z_LVAL_P(z) = l; \
- }
+#define CHECK_ZVAL_NULL_PATH(p) (Z_STRLEN_P(p) != strlen(Z_STRVAL_P(p)))
+#define CHECK_NULL_PATH(p, l) (strlen(p) != l)
-#define ZVAL_BOOL(z, b) { \
- Z_TYPE_P(z) = IS_BOOL; \
- Z_LVAL_P(z) = ((b) != 0); \
- }
+#define ZVAL_RESOURCE(z, l) do { \
+ zval *__z = (z); \
+ Z_LVAL_P(__z) = l; \
+ Z_TYPE_P(__z) = IS_RESOURCE;\
+ } while (0)
+
+#define ZVAL_BOOL(z, b) do { \
+ zval *__z = (z); \
+ Z_LVAL_P(__z) = ((b) != 0); \
+ Z_TYPE_P(__z) = IS_BOOL; \
+ } while (0)
#define ZVAL_NULL(z) { \
Z_TYPE_P(z) = IS_NULL; \
}
#define ZVAL_LONG(z, l) { \
- Z_TYPE_P(z) = IS_LONG; \
- Z_LVAL_P(z) = l; \
+ zval *__z = (z); \
+ Z_LVAL_P(__z) = l; \
+ Z_TYPE_P(__z) = IS_LONG; \
}
#define ZVAL_DOUBLE(z, d) { \
- Z_TYPE_P(z) = IS_DOUBLE; \
- Z_DVAL_P(z) = d; \
+ zval *__z = (z); \
+ Z_DVAL_P(__z) = d; \
+ Z_TYPE_P(__z) = IS_DOUBLE; \
}
-#define ZVAL_STRING(z, s, duplicate) { \
- const char *__s=(s); \
- Z_STRLEN_P(z) = strlen(__s); \
- Z_STRVAL_P(z) = (duplicate?estrndup(__s, Z_STRLEN_P(z)):(char*)__s);\
- Z_TYPE_P(z) = IS_STRING; \
- }
-
-#define ZVAL_STRINGL(z, s, l, duplicate) { \
- const char *__s=(s); int __l=l; \
- Z_STRLEN_P(z) = __l; \
- Z_STRVAL_P(z) = (duplicate?estrndup(__s, __l):(char*)__s);\
- Z_TYPE_P(z) = IS_STRING; \
- }
-
-#define ZVAL_EMPTY_STRING(z) { \
- Z_STRLEN_P(z) = 0; \
- Z_STRVAL_P(z) = STR_EMPTY_ALLOC();\
- Z_TYPE_P(z) = IS_STRING; \
- }
+#define ZVAL_STRING(z, s, duplicate) do { \
+ const char *__s=(s); \
+ zval *__z = (z); \
+ Z_STRLEN_P(__z) = strlen(__s); \
+ Z_STRVAL_P(__z) = (duplicate?estrndup(__s, Z_STRLEN_P(__z)):(char*)__s);\
+ Z_TYPE_P(__z) = IS_STRING; \
+ } while (0)
+
+#define ZVAL_STRINGL(z, s, l, duplicate) do { \
+ const char *__s=(s); int __l=l; \
+ zval *__z = (z); \
+ Z_STRLEN_P(__z) = __l; \
+ Z_STRVAL_P(__z) = (duplicate?estrndup(__s, __l):(char*)__s);\
+ Z_TYPE_P(__z) = IS_STRING; \
+ } while (0)
+
+#define ZVAL_EMPTY_STRING(z) do { \
+ zval *__z = (z); \
+ Z_STRLEN_P(__z) = 0; \
+ Z_STRVAL_P(__z) = STR_EMPTY_ALLOC();\
+ Z_TYPE_P(__z) = IS_STRING; \
+ } while (0)
#define ZVAL_ZVAL(z, zv, copy, dtor) { \
zend_uchar is_ref = Z_ISREF_P(z); \
zend_uint refcount = Z_REFCOUNT_P(z); \
- *(z) = *(zv); \
+ ZVAL_COPY_VALUE(z, zv); \
if (copy) { \
zval_copy_ctor(z); \
} \
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 32ebea70b..4bbf7bb54 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -344,9 +344,9 @@ typedef struct _zend_mm_block_info {
#if ZEND_DEBUG
typedef struct _zend_mm_debug_info {
- char *filename;
+ const char *filename;
uint lineno;
- char *orig_filename;
+ const char *orig_filename;
uint orig_lineno;
size_t size;
#if ZEND_MM_HEAP_PROTECTION
@@ -439,6 +439,7 @@ struct _zend_mm_heap {
zend_mm_free_block *free_buckets[ZEND_MM_NUM_BUCKETS*2];
zend_mm_free_block *large_free_buckets[ZEND_MM_NUM_BUCKETS];
zend_mm_free_block *rest_buckets[2];
+ int rest_count;
#if ZEND_MM_CACHE_STAT
struct {
int count;
@@ -459,6 +460,10 @@ struct _zend_mm_heap {
sizeof(zend_mm_free_block*) * 2 - \
sizeof(zend_mm_small_free_block))
+#define ZEND_MM_REST_BLOCK ((zend_mm_free_block**)(zend_uintptr_t)(1))
+
+#define ZEND_MM_MAX_REST_BLOCKS 16
+
#if ZEND_MM_COOKIES
static unsigned int _zend_mm_cookie = 0;
@@ -715,23 +720,6 @@ static inline unsigned int zend_mm_low_bit(size_t _size)
#endif
}
-static inline void zend_mm_add_to_rest_list(zend_mm_heap *heap, zend_mm_free_block *mm_block)
-{
- zend_mm_free_block *prev, *next;
-
- ZEND_MM_SET_MAGIC(mm_block, MEM_BLOCK_FREED);
-
- if (!ZEND_MM_SMALL_SIZE(ZEND_MM_FREE_BLOCK_SIZE(mm_block))) {
- mm_block->parent = NULL;
- }
-
- prev = heap->rest_buckets[0];
- next = prev->next_free_block;
- mm_block->prev_free_block = prev;
- mm_block->next_free_block = next;
- prev->next_free_block = next->prev_free_block = mm_block;
-}
-
static inline void zend_mm_add_to_free_list(zend_mm_heap *heap, zend_mm_free_block *mm_block)
{
size_t size;
@@ -858,12 +846,45 @@ subst_block:
heap->free_bitmap &= ~(ZEND_MM_LONG_CONST(1) << index);
}
}
+ } else if (UNEXPECTED(mm_block->parent == ZEND_MM_REST_BLOCK)) {
+ heap->rest_count--;
} else if (UNEXPECTED(mm_block->parent != NULL)) {
goto subst_block;
}
}
}
+static inline void zend_mm_add_to_rest_list(zend_mm_heap *heap, zend_mm_free_block *mm_block)
+{
+ zend_mm_free_block *prev, *next;
+
+ while (heap->rest_count >= ZEND_MM_MAX_REST_BLOCKS) {
+ zend_mm_free_block *p = heap->rest_buckets[1];
+
+ if (!ZEND_MM_SMALL_SIZE(ZEND_MM_FREE_BLOCK_SIZE(p))) {
+ heap->rest_count--;
+ }
+ prev = p->prev_free_block;
+ next = p->next_free_block;
+ prev->next_free_block = next;
+ next->prev_free_block = prev;
+ zend_mm_add_to_free_list(heap, p);
+ }
+
+ if (!ZEND_MM_SMALL_SIZE(ZEND_MM_FREE_BLOCK_SIZE(mm_block))) {
+ mm_block->parent = ZEND_MM_REST_BLOCK;
+ heap->rest_count++;
+ }
+
+ ZEND_MM_SET_MAGIC(mm_block, MEM_BLOCK_FREED);
+
+ prev = heap->rest_buckets[0];
+ next = prev->next_free_block;
+ mm_block->prev_free_block = prev;
+ mm_block->next_free_block = next;
+ prev->next_free_block = next->prev_free_block = mm_block;
+}
+
static inline void zend_mm_init(zend_mm_heap *heap)
{
zend_mm_free_block* p;
@@ -888,6 +909,7 @@ static inline void zend_mm_init(zend_mm_heap *heap)
heap->large_free_buckets[i] = NULL;
}
heap->rest_buckets[0] = heap->rest_buckets[1] = ZEND_MM_REST_BUCKET(heap);
+ heap->rest_count = 0;
}
static void zend_mm_del_segment(zend_mm_heap *heap, zend_mm_segment *segment)
@@ -1126,6 +1148,7 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_mem_handlers *handlers,
}
}
mm_heap->rest_buckets[0] = mm_heap->rest_buckets[1] = ZEND_MM_REST_BUCKET(mm_heap);
+ mm_heap->rest_count = 0;
free(heap);
heap = mm_heap;
@@ -1578,6 +1601,13 @@ ZEND_API void zend_mm_shutdown(zend_mm_heap *heap, int full_shutdown, int silent
zend_mm_segment *prev;
int internal;
+ if (!heap->use_zend_alloc) {
+ if (full_shutdown) {
+ free(heap);
+ }
+ return;
+ }
+
if (heap->reserve) {
#if ZEND_DEBUG
if (!silent) {
@@ -1642,27 +1672,63 @@ ZEND_API void zend_mm_shutdown(zend_mm_heap *heap, int full_shutdown, int silent
internal = heap->internal;
storage = heap->storage;
segment = heap->segments_list;
- while (segment) {
- prev = segment;
- segment = segment->next_segment;
- ZEND_MM_STORAGE_FREE(prev);
- }
if (full_shutdown) {
+ while (segment) {
+ prev = segment;
+ segment = segment->next_segment;
+ ZEND_MM_STORAGE_FREE(prev);
+ }
+ heap->segments_list = NULL;
storage->handlers->dtor(storage);
if (!internal) {
free(heap);
}
} else {
+ if (segment) {
+#ifndef ZEND_WIN32
+ if (heap->reserve_size) {
+ while (segment->next_segment) {
+ prev = segment;
+ segment = segment->next_segment;
+ ZEND_MM_STORAGE_FREE(prev);
+ }
+ heap->segments_list = segment;
+ } else {
+#endif
+ do {
+ prev = segment;
+ segment = segment->next_segment;
+ ZEND_MM_STORAGE_FREE(prev);
+ } while (segment);
+ heap->segments_list = NULL;
+#ifndef ZEND_WIN32
+ }
+#endif
+ }
if (heap->compact_size &&
heap->real_peak > heap->compact_size) {
storage->handlers->compact(storage);
}
- heap->segments_list = NULL;
zend_mm_init(heap);
- heap->real_size = 0;
- heap->real_peak = 0;
+ if (heap->segments_list) {
+ heap->real_size = heap->segments_list->size;
+ heap->real_peak = heap->segments_list->size;
+ } else {
+ heap->real_size = 0;
+ heap->real_peak = 0;
+ }
heap->size = 0;
heap->peak = 0;
+ if (heap->segments_list) {
+ /* mark segment as a free block */
+ zend_mm_free_block *b = (zend_mm_free_block*)((char*)heap->segments_list + ZEND_MM_ALIGNED_SEGMENT_SIZE);
+ size_t block_size = heap->segments_list->size - ZEND_MM_ALIGNED_SEGMENT_SIZE - ZEND_MM_ALIGNED_HEADER_SIZE;
+
+ ZEND_MM_MARK_FIRST_BLOCK(b);
+ ZEND_MM_LAST_BLOCK(ZEND_MM_BLOCK_AT(b, block_size));
+ ZEND_MM_BLOCK(b, ZEND_MM_FREE_BLOCK, block_size);
+ zend_mm_add_to_free_list(heap, b);
+ }
if (heap->reserve_size) {
heap->reserve = _zend_mm_alloc_int(heap, heap->reserve_size ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC);
}
@@ -1684,7 +1750,7 @@ static void zend_mm_safe_error(zend_mm_heap *heap,
heap->reserve = NULL;
}
if (heap->overflow == 0) {
- char *error_filename;
+ const char *error_filename;
uint error_lineno;
TSRMLS_FETCH();
if (zend_is_compiling(TSRMLS_C)) {
@@ -1816,6 +1882,11 @@ static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
size_t segment_size;
zend_mm_segment *segment;
int keep_rest = 0;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
+
+ HANDLE_BLOCK_INTERRUPTIONS();
if (EXPECTED(ZEND_MM_SMALL_SIZE(true_size))) {
size_t index = ZEND_MM_BUCKET_INDEX(true_size);
@@ -1836,6 +1907,7 @@ static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
heap->cached -= true_size;
ZEND_MM_CHECK_MAGIC(best_fit, MEM_BLOCK_CACHED);
ZEND_MM_SET_DEBUG_INFO(best_fit, size, 1, 0);
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return ZEND_MM_DATA_OF(best_fit);
}
#if ZEND_MM_CACHE_STAT
@@ -1889,8 +1961,6 @@ static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
segment_size = heap->block_size;
}
- HANDLE_BLOCK_INTERRUPTIONS();
-
if (segment_size < true_size ||
heap->real_size + segment_size > heap->limit) {
/* Memory limit overflow */
@@ -1912,8 +1982,8 @@ static void *_zend_mm_alloc_int(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
#if ZEND_MM_CACHE
zend_mm_free_cache(heap);
#endif
- HANDLE_UNBLOCK_INTERRUPTIONS();
out_of_memory:
+ HANDLE_UNBLOCK_INTERRUPTIONS();
#if ZEND_DEBUG
zend_mm_safe_error(heap, "Out of memory (allocated %ld) at %s:%d (tried to allocate %lu bytes)", heap->real_size, __zend_filename, __zend_lineno, size);
#else
@@ -1941,7 +2011,6 @@ out_of_memory:
} else {
zend_mm_finished_searching_for_block:
/* remove from free list */
- HANDLE_BLOCK_INTERRUPTIONS();
ZEND_MM_CHECK_MAGIC(best_fit, MEM_BLOCK_FREED);
ZEND_MM_CHECK_COOKIE(best_fit);
ZEND_MM_CHECK_BLOCK_LINKAGE(best_fit);
@@ -1989,11 +2058,15 @@ static void _zend_mm_free_int(zend_mm_heap *heap, void *p ZEND_FILE_LINE_DC ZEND
zend_mm_block *mm_block;
zend_mm_block *next_block;
size_t size;
-
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
if (!ZEND_MM_VALID_PTR(p)) {
return;
}
+ HANDLE_BLOCK_INTERRUPTIONS();
+
mm_block = ZEND_MM_HEADER_OF(p);
size = ZEND_MM_BLOCK_SIZE(mm_block);
ZEND_MM_CHECK_PROTECTION(mm_block);
@@ -2016,12 +2089,11 @@ static void _zend_mm_free_int(zend_mm_heap *heap, void *p ZEND_FILE_LINE_DC ZEND
heap->cache_stat[index].max_count = heap->cache_stat[index].count;
}
#endif
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return;
}
#endif
- HANDLE_BLOCK_INTERRUPTIONS();
-
heap->size -= size;
next_block = ZEND_MM_BLOCK_AT(mm_block, size);
@@ -2051,10 +2123,15 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_
size_t true_size;
size_t orig_size;
void *ptr;
-
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
if (UNEXPECTED(!p) || !ZEND_MM_VALID_PTR(p)) {
return _zend_mm_alloc_int(heap, size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
}
+
+ HANDLE_BLOCK_INTERRUPTIONS();
+
mm_block = ZEND_MM_HEADER_OF(p);
true_size = ZEND_MM_TRUE_SIZE(size);
orig_size = ZEND_MM_BLOCK_SIZE(mm_block);
@@ -2070,7 +2147,6 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_
if (remaining_size >= ZEND_MM_ALIGNED_MIN_HEADER_SIZE) {
zend_mm_free_block *new_free_block;
- HANDLE_BLOCK_INTERRUPTIONS();
next_block = ZEND_MM_BLOCK_AT(mm_block, orig_size);
if (ZEND_MM_IS_FREE_BLOCK(next_block)) {
remaining_size += ZEND_MM_FREE_BLOCK_SIZE(next_block);
@@ -2086,9 +2162,9 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_
/* add the new free block to the free list */
zend_mm_add_to_free_list(heap, new_free_block);
heap->size += (true_size - orig_size);
- HANDLE_UNBLOCK_INTERRUPTIONS();
}
ZEND_MM_SET_DEBUG_INFO(mm_block, size, 0, 0);
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
@@ -2131,6 +2207,7 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_
}
#endif
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return ptr;
}
}
@@ -2145,7 +2222,6 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_
size_t block_size = orig_size + ZEND_MM_FREE_BLOCK_SIZE(next_block);
size_t remaining_size = block_size - true_size;
- HANDLE_BLOCK_INTERRUPTIONS();
zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block);
if (remaining_size < ZEND_MM_ALIGNED_MIN_HEADER_SIZE) {
@@ -2176,7 +2252,6 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_
return p;
} else if (ZEND_MM_IS_FIRST_BLOCK(mm_block) &&
ZEND_MM_IS_GUARD_BLOCK(ZEND_MM_BLOCK_AT(next_block, ZEND_MM_FREE_BLOCK_SIZE(next_block)))) {
- HANDLE_BLOCK_INTERRUPTIONS();
zend_mm_remove_from_free_list(heap, (zend_mm_free_block *) next_block);
goto realloc_segment;
}
@@ -2187,7 +2262,6 @@ static void *_zend_mm_realloc_int(zend_mm_heap *heap, void *p, size_t size ZEND_
size_t block_size;
size_t remaining_size;
- HANDLE_BLOCK_INTERRUPTIONS();
realloc_segment:
/* segment size, size of block and size of guard block */
if (true_size > heap->block_size - (ZEND_MM_ALIGNED_SEGMENT_SIZE + ZEND_MM_ALIGNED_HEADER_SIZE)) {
@@ -2220,8 +2294,8 @@ realloc_segment:
#if ZEND_MM_CACHE
zend_mm_free_cache(heap);
#endif
- HANDLE_UNBLOCK_INTERRUPTIONS();
out_of_memory:
+ HANDLE_UNBLOCK_INTERRUPTIONS();
#if ZEND_DEBUG
zend_mm_safe_error(heap, "Out of memory (allocated %ld) at %s:%d (tried to allocate %ld bytes)", heap->real_size, __zend_filename, __zend_lineno, size);
#else
@@ -2285,6 +2359,7 @@ out_of_memory:
memcpy(ptr, p, orig_size - ZEND_MM_ALIGNED_HEADER_SIZE);
#endif
_zend_mm_free_int(heap, p ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return ptr;
}
@@ -2473,12 +2548,18 @@ ZEND_API void *_safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset
ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
void *p;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
+ HANDLE_BLOCK_INTERRUPTIONS();
p = _safe_emalloc(nmemb, size, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (UNEXPECTED(p == NULL)) {
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
memset(p, 0, size * nmemb);
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
@@ -2486,26 +2567,40 @@ ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
int length;
char *p;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
+
+ HANDLE_BLOCK_INTERRUPTIONS();
length = strlen(s)+1;
p = (char *) _emalloc(length ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (UNEXPECTED(p == NULL)) {
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
memcpy(p, s, length);
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
ZEND_API char *_estrndup(const char *s, uint length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
char *p;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
+
+ HANDLE_BLOCK_INTERRUPTIONS();
p = (char *) _emalloc(length+1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
if (UNEXPECTED(p == NULL)) {
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
memcpy(p, s, length);
p[length] = 0;
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
@@ -2513,15 +2608,22 @@ ZEND_API char *_estrndup(const char *s, uint length ZEND_FILE_LINE_DC ZEND_FILE_
ZEND_API char *zend_strndup(const char *s, uint length)
{
char *p;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
+
+ HANDLE_BLOCK_INTERRUPTIONS();
p = (char *) malloc(length+1);
if (UNEXPECTED(p == NULL)) {
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
if (length) {
memcpy(p, s, length);
}
p[length] = 0;
+ HANDLE_UNBLOCK_INTERRUPTIONS();
return p;
}
@@ -2564,17 +2666,17 @@ ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC)
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals TSRMLS_DC)
{
- char *tmp;
- alloc_globals->mm_heap = zend_mm_startup();
+ char *tmp = getenv("USE_ZEND_ALLOC");
- tmp = getenv("USE_ZEND_ALLOC");
- if (tmp) {
- alloc_globals->mm_heap->use_zend_alloc = zend_atoi(tmp, 0);
- if (!alloc_globals->mm_heap->use_zend_alloc) {
- alloc_globals->mm_heap->_malloc = malloc;
- alloc_globals->mm_heap->_free = free;
- alloc_globals->mm_heap->_realloc = realloc;
- }
+ if (tmp && !zend_atoi(tmp, 0)) {
+ alloc_globals->mm_heap = malloc(sizeof(struct _zend_mm_heap));
+ memset(alloc_globals->mm_heap, 0, sizeof(struct _zend_mm_heap));
+ alloc_globals->mm_heap->use_zend_alloc = 0;
+ alloc_globals->mm_heap->_malloc = malloc;
+ alloc_globals->mm_heap->_free = free;
+ alloc_globals->mm_heap->_realloc = realloc;
+ } else {
+ alloc_globals->mm_heap = zend_mm_startup();
}
}
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h
index c64a3e4d0..31c838864 100644
--- a/Zend/zend_alloc.h
+++ b/Zend/zend_alloc.h
@@ -44,9 +44,9 @@
typedef struct _zend_leak_info {
void *addr;
size_t size;
- char *filename;
+ const char *filename;
uint lineno;
- char *orig_filename;
+ const char *orig_filename;
uint orig_lineno;
} zend_leak_info;
@@ -161,45 +161,31 @@ ZEND_API size_t zend_memory_peak_usage(int real_usage TSRMLS_DC);
END_EXTERN_C()
-/* Macroses for zend_fast_cache.h compatibility */
-
-#define ZEND_FAST_ALLOC(p, type, fc_type) \
- (p) = (type *) emalloc(sizeof(type))
-
-#define ZEND_FAST_FREE(p, fc_type) \
- efree(p)
-
-#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
- (p) = (type *) emalloc_rel(sizeof(type))
-
-#define ZEND_FAST_FREE_REL(p, fc_type) \
- efree_rel(p)
-
/* fast cache for zval's */
#define ALLOC_ZVAL(z) \
- ZEND_FAST_ALLOC(z, zval, ZVAL_CACHE_LIST)
+ (z) = (zval *) emalloc(sizeof(zval))
#define FREE_ZVAL(z) \
- ZEND_FAST_FREE(z, ZVAL_CACHE_LIST)
+ efree_rel(z)
#define ALLOC_ZVAL_REL(z) \
- ZEND_FAST_ALLOC_REL(z, zval, ZVAL_CACHE_LIST)
+ (z) = (zval *) emalloc_rel(sizeof(zval))
#define FREE_ZVAL_REL(z) \
- ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST)
+ efree_rel(z)
/* fast cache for HashTables */
#define ALLOC_HASHTABLE(ht) \
- ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST)
+ (ht) = (HashTable *) emalloc(sizeof(HashTable))
#define FREE_HASHTABLE(ht) \
- ZEND_FAST_FREE(ht, HASHTABLE_CACHE_LIST)
+ efree(ht)
#define ALLOC_HASHTABLE_REL(ht) \
- ZEND_FAST_ALLOC_REL(ht, HashTable, HASHTABLE_CACHE_LIST)
+ (ht) = (HashTable *) emalloc_rel(sizeof(HashTable))
#define FREE_HASHTABLE_REL(ht) \
- ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST)
+ efree_rel(ht)
/* Heap functions */
typedef struct _zend_mm_heap zend_mm_heap;
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index ce2d7f0d9..f63f25a25 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -50,10 +50,12 @@ static ZEND_FUNCTION(method_exists);
static ZEND_FUNCTION(property_exists);
static ZEND_FUNCTION(class_exists);
static ZEND_FUNCTION(interface_exists);
+static ZEND_FUNCTION(trait_exists);
static ZEND_FUNCTION(function_exists);
static ZEND_FUNCTION(class_alias);
#if ZEND_DEBUG
static ZEND_FUNCTION(leak);
+static ZEND_FUNCTION(leak_variable);
#ifdef ZEND_TEST_EXCEPTIONS
static ZEND_FUNCTION(crash);
#endif
@@ -70,6 +72,7 @@ static ZEND_FUNCTION(restore_error_handler);
static ZEND_FUNCTION(set_exception_handler);
static ZEND_FUNCTION(restore_exception_handler);
static ZEND_FUNCTION(get_declared_classes);
+static ZEND_FUNCTION(get_declared_traits);
static ZEND_FUNCTION(get_declared_interfaces);
static ZEND_FUNCTION(get_defined_functions);
static ZEND_FUNCTION(get_defined_vars);
@@ -140,6 +143,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_is_subclass_of, 0, 0, 2)
ZEND_ARG_INFO(0, object)
ZEND_ARG_INFO(0, class_name)
+ ZEND_ARG_INFO(0, allow_string)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_get_class_vars, 0, 0, 1)
@@ -169,6 +173,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_exists, 0, 0, 1)
ZEND_ARG_INFO(0, autoload)
ZEND_END_ARG_INFO()
+ZEND_BEGIN_ARG_INFO_EX(arginfo_trait_exists, 0, 0, 1)
+ ZEND_ARG_INFO(0, traitname)
+ ZEND_ARG_INFO(0, autoload)
+ZEND_END_ARG_INFO()
+
ZEND_BEGIN_ARG_INFO_EX(arginfo_function_exists, 0, 0, 1)
ZEND_ARG_INFO(0, function_name)
ZEND_END_ARG_INFO()
@@ -179,6 +188,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_alias, 0, 0, 2)
ZEND_ARG_INFO(0, autoload)
ZEND_END_ARG_INFO()
+#if ZEND_DEBUG
+ZEND_BEGIN_ARG_INFO_EX(arginfo_leak_variable, 0, 0, 1)
+ ZEND_ARG_INFO(0, variable)
+ ZEND_ARG_INFO(0, leak_data)
+ZEND_END_ARG_INFO()
+#endif
+
ZEND_BEGIN_ARG_INFO_EX(arginfo_trigger_error, 0, 0, 1)
ZEND_ARG_INFO(0, message)
ZEND_ARG_INFO(0, error_type)
@@ -212,6 +228,11 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_debug_backtrace, 0, 0, 0)
ZEND_ARG_INFO(0, options)
+ ZEND_ARG_INFO(0, limit)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_debug_print_backtrace, 0, 0, 0)
+ ZEND_ARG_INFO(0, options)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_extension_loaded, 0, 0, 1)
@@ -240,10 +261,12 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(property_exists, arginfo_property_exists)
ZEND_FE(class_exists, arginfo_class_exists)
ZEND_FE(interface_exists, arginfo_class_exists)
+ ZEND_FE(trait_exists, arginfo_trait_exists)
ZEND_FE(function_exists, arginfo_function_exists)
ZEND_FE(class_alias, arginfo_class_alias)
#if ZEND_DEBUG
ZEND_FE(leak, NULL)
+ ZEND_FE(leak_variable, arginfo_leak_variable)
#ifdef ZEND_TEST_EXCEPTIONS
ZEND_FE(crash, NULL)
#endif
@@ -262,6 +285,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(set_exception_handler, arginfo_set_exception_handler)
ZEND_FE(restore_exception_handler, arginfo_zend__void)
ZEND_FE(get_declared_classes, arginfo_zend__void)
+ ZEND_FE(get_declared_traits, arginfo_zend__void)
ZEND_FE(get_declared_interfaces, arginfo_zend__void)
ZEND_FE(get_defined_functions, arginfo_zend__void)
ZEND_FE(get_defined_vars, arginfo_zend__void)
@@ -272,7 +296,7 @@ static const zend_function_entry builtin_functions[] = { /* {{{ */
ZEND_FE(get_extension_funcs, arginfo_extension_loaded)
ZEND_FE(get_defined_constants, arginfo_get_defined_constants)
ZEND_FE(debug_backtrace, arginfo_debug_backtrace)
- ZEND_FE(debug_print_backtrace, arginfo_debug_backtrace)
+ ZEND_FE(debug_print_backtrace, arginfo_debug_print_backtrace)
#if ZEND_DEBUG
ZEND_FE(zend_test_func, NULL)
#ifdef ZTS
@@ -682,7 +706,10 @@ repeat:
zval_ptr_dtor(&val_free);
}
c.flags = case_sensitive; /* non persistent */
- c.name = zend_strndup(name, name_len);
+ c.name = IS_INTERNED(name) ? name : zend_strndup(name, name_len);
+ if(c.name == NULL) {
+ RETURN_FALSE;
+ }
c.name_len = name_len+1;
c.module_number = PHP_USER_CONSTANT;
if (zend_register_constant(&c TSRMLS_CC) == SUCCESS) {
@@ -721,7 +748,7 @@ ZEND_FUNCTION(defined)
ZEND_FUNCTION(get_class)
{
zval *obj = NULL;
- char *name = "";
+ const char *name = "";
zend_uint name_len = 0;
int dup;
@@ -769,7 +796,7 @@ ZEND_FUNCTION(get_parent_class)
{
zval *arg;
zend_class_entry *ce = NULL;
- char *name;
+ const char *name;
zend_uint name_length;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z", &arg) == FAILURE) {
@@ -823,10 +850,11 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass)
return;
}
/*
- allow_string - is_a default is no, is_subclass_of is yes.
- if it's allowed, then the autoloader will be called if the class does not exist.
- default behaviour is different, as 'is_a' usage is normally to test mixed return values
- */
+ * allow_string - is_a default is no, is_subclass_of is yes.
+ * if it's allowed, then the autoloader will be called if the class does not exist.
+ * default behaviour is different, as 'is_a' used to be used to test mixed return values
+ * and there is no easy way to deprecate this.
+ */
if (allow_string && Z_TYPE_P(obj) == IS_STRING) {
zend_class_entry **the_ce;
@@ -840,12 +868,12 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass)
RETURN_FALSE;
}
- if (zend_lookup_class_ex(class_name, class_name_len, 0, &ce TSRMLS_CC) == FAILURE) {
+ if (zend_lookup_class_ex(class_name, class_name_len, NULL, 0, &ce TSRMLS_CC) == FAILURE) {
retval = 0;
} else {
if (only_subclass && instance_ce == *ce) {
retval = 0;
- } else {
+ } else {
retval = instanceof_function(instance_ce, *ce TSRMLS_CC);
}
}
@@ -873,49 +901,53 @@ ZEND_FUNCTION(is_a)
/* {{{ add_class_vars */
-static void add_class_vars(zend_class_entry *ce, HashTable *properties, zval *return_value TSRMLS_DC)
+static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value TSRMLS_DC)
{
- if (zend_hash_num_elements(properties) > 0) {
- HashPosition pos;
- zval **prop;
-
- zend_hash_internal_pointer_reset_ex(properties, &pos);
- while (zend_hash_get_current_data_ex(properties, (void **) &prop, &pos) == SUCCESS) {
- char *key, *class_name, *prop_name;
- uint key_len;
- ulong num_index;
- int prop_name_len = 0;
- zval *prop_copy;
- zend_property_info *property_info;
- zval zprop_name;
-
- zend_hash_get_current_key_ex(properties, &key, &key_len, &num_index, 0, &pos);
- zend_hash_move_forward_ex(properties, &pos);
-
- zend_unmangle_property_name(key, key_len-1, &class_name, &prop_name);
- prop_name_len = strlen(prop_name);
-
- ZVAL_STRINGL(&zprop_name, prop_name, prop_name_len, 0);
- property_info = zend_get_property_info(ce, &zprop_name, 1 TSRMLS_CC);
-
- if (!property_info || property_info == &EG(std_property_info)) {
- continue;
- }
+ HashPosition pos;
+ zend_property_info *prop_info;
+ zval *prop, *prop_copy;
+ char *key;
+ uint key_len;
+ ulong num_index;
- /* copy: enforce read only access */
- ALLOC_ZVAL(prop_copy);
- *prop_copy = **prop;
- zval_copy_ctor(prop_copy);
- INIT_PZVAL(prop_copy);
+ zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos);
+ while (zend_hash_get_current_data_ex(&ce->properties_info, (void **) &prop_info, &pos) == SUCCESS) {
+ zend_hash_get_current_key_ex(&ce->properties_info, &key, &key_len, &num_index, 0, &pos);
+ zend_hash_move_forward_ex(&ce->properties_info, &pos);
+ if (((prop_info->flags & ZEND_ACC_SHADOW) &&
+ prop_info->ce != EG(scope)) ||
+ ((prop_info->flags & ZEND_ACC_PROTECTED) &&
+ !zend_check_protected(prop_info->ce, EG(scope))) ||
+ ((prop_info->flags & ZEND_ACC_PRIVATE) &&
+ ce != EG(scope) &&
+ prop_info->ce != EG(scope))) {
+ continue;
+ }
+ prop = NULL;
+ if (prop_info->offset >= 0) {
+ if (statics && (prop_info->flags & ZEND_ACC_STATIC) != 0) {
+ prop = ce->default_static_members_table[prop_info->offset];
+ } else if (!statics && (prop_info->flags & ZEND_ACC_STATIC) == 0) {
+ prop = ce->default_properties_table[prop_info->offset];
+ }
+ }
+ if (!prop) {
+ continue;
+ }
- /* this is necessary to make it able to work with default array
- * properties, returned to user */
- if (Z_TYPE_P(prop_copy) == IS_CONSTANT_ARRAY || (Z_TYPE_P(prop_copy) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
- zval_update_constant(&prop_copy, 0 TSRMLS_CC);
- }
+ /* copy: enforce read only access */
+ ALLOC_ZVAL(prop_copy);
+ *prop_copy = *prop;
+ zval_copy_ctor(prop_copy);
+ INIT_PZVAL(prop_copy);
- add_assoc_zval(return_value, prop_name, prop_copy);
+ /* this is necessary to make it able to work with default array
+ * properties, returned to user */
+ if (Z_TYPE_P(prop_copy) == IS_CONSTANT_ARRAY || (Z_TYPE_P(prop_copy) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
+ zval_update_constant(&prop_copy, 0 TSRMLS_CC);
}
+
+ add_assoc_zval(return_value, key, prop_copy);
}
}
/* }}} */
@@ -938,8 +970,8 @@ ZEND_FUNCTION(get_class_vars)
} else {
array_init(return_value);
zend_update_class_constants(*pce TSRMLS_CC);
- add_class_vars(*pce, &(*pce)->default_properties, return_value TSRMLS_CC);
- add_class_vars(*pce, CE_STATIC_MEMBERS(*pce), return_value TSRMLS_CC);
+ add_class_vars(*pce, 0, return_value TSRMLS_CC);
+ add_class_vars(*pce, 1, return_value TSRMLS_CC);
}
}
/* }}} */
@@ -953,7 +985,8 @@ ZEND_FUNCTION(get_object_vars)
zval **value;
HashTable *properties;
HashPosition pos;
- char *key, *prop_name, *class_name;
+ char *key;
+ const char *prop_name, *class_name;
uint key_len;
ulong num_index;
zend_object *zobj;
@@ -1088,7 +1121,7 @@ ZEND_FUNCTION(method_exists)
if (Z_TYPE_P(klass) == IS_OBJECT
&& Z_OBJ_HT_P(klass)->get_method != NULL
- && (func = Z_OBJ_HT_P(klass)->get_method(&klass, method_name, method_len TSRMLS_CC)) != NULL
+ && (func = Z_OBJ_HT_P(klass)->get_method(&klass, method_name, method_len, NULL TSRMLS_CC)) != NULL
) {
if (func->type == ZEND_INTERNAL_FUNCTION
&& (func->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) != 0
@@ -1097,9 +1130,9 @@ ZEND_FUNCTION(method_exists)
RETVAL_BOOL((func->common.scope == zend_ce_closure
&& (method_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1)
&& memcmp(lcname, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) == 0) ? 1 : 0);
-
+
efree(lcname);
- efree(((zend_internal_function*)func)->function_name);
+ efree((char*)((zend_internal_function*)func)->function_name);
efree(func);
return;
}
@@ -1154,7 +1187,7 @@ ZEND_FUNCTION(property_exists)
if (Z_TYPE_P(object) == IS_OBJECT &&
Z_OBJ_HANDLER_P(object, has_property) &&
- Z_OBJ_HANDLER_P(object, has_property)(object, &property_z, 2 TSRMLS_CC)) {
+ Z_OBJ_HANDLER_P(object, has_property)(object, &property_z, 2, 0 TSRMLS_CC)) {
RETURN_TRUE;
}
RETURN_FALSE;
@@ -1194,11 +1227,11 @@ ZEND_FUNCTION(class_exists)
found = zend_hash_find(EG(class_table), name, len+1, (void **) &ce);
free_alloca(lc_name, use_heap);
- RETURN_BOOL(found == SUCCESS && !((*ce)->ce_flags & ZEND_ACC_INTERFACE));
+ RETURN_BOOL(found == SUCCESS && !(((*ce)->ce_flags & (ZEND_ACC_INTERFACE | ZEND_ACC_TRAIT)) > ZEND_ACC_EXPLICIT_ABSTRACT_CLASS));
}
if (zend_lookup_class(class_name, class_name_len, &ce TSRMLS_CC) == SUCCESS) {
- RETURN_BOOL(((*ce)->ce_flags & ZEND_ACC_INTERFACE) == 0);
+ RETURN_BOOL(((*ce)->ce_flags & (ZEND_ACC_INTERFACE | (ZEND_ACC_TRAIT - ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))) == 0);
} else {
RETURN_FALSE;
}
@@ -1248,6 +1281,49 @@ ZEND_FUNCTION(interface_exists)
}
/* }}} */
+/* {{{ proto bool trait_exists(string traitname [, bool autoload])
+ Checks if the trait exists */
+ZEND_FUNCTION(trait_exists)
+{
+ char *trait_name, *lc_name;
+ zend_class_entry **ce;
+ int trait_name_len;
+ int found;
+ zend_bool autoload = 1;
+ ALLOCA_FLAG(use_heap)
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &trait_name, &trait_name_len, &autoload) == FAILURE) {
+ return;
+ }
+
+ if (!autoload) {
+ char *name;
+ int len;
+
+ lc_name = do_alloca(trait_name_len + 1, use_heap);
+ zend_str_tolower_copy(lc_name, trait_name, trait_name_len);
+
+ /* Ignore leading "\" */
+ name = lc_name;
+ len = trait_name_len;
+ if (lc_name[0] == '\\') {
+ name = &lc_name[1];
+ len--;
+ }
+
+ found = zend_hash_find(EG(class_table), name, len+1, (void **) &ce);
+ free_alloca(lc_name, use_heap);
+ RETURN_BOOL(found == SUCCESS && (((*ce)->ce_flags & ZEND_ACC_TRAIT) > ZEND_ACC_EXPLICIT_ABSTRACT_CLASS));
+ }
+
+ if (zend_lookup_class(trait_name, trait_name_len, &ce TSRMLS_CC) == SUCCESS) {
+ RETURN_BOOL(((*ce)->ce_flags & ZEND_ACC_TRAIT) > ZEND_ACC_EXPLICIT_ABSTRACT_CLASS);
+ } else {
+ RETURN_FALSE;
+ }
+}
+/* }}} */
+
/* {{{ proto bool function_exists(string function_name)
Checks if the function exists */
@@ -1347,6 +1423,28 @@ ZEND_FUNCTION(leak)
}
/* }}} */
+/* {{{ proto leak_variable(mixed variable [, bool leak_data]) */
+ZEND_FUNCTION(leak_variable)
+{
+ zval *zv;
+ zend_bool leak_data = 0;
+
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &zv, &leak_data) == FAILURE) {
+ return;
+ }
+
+ if (!leak_data) {
+ zval_add_ref(&zv);
+ } else if (Z_TYPE_P(zv) == IS_RESOURCE) {
+ zend_list_addref(Z_RESVAL_P(zv));
+ } else if (Z_TYPE_P(zv) == IS_OBJECT) {
+ Z_OBJ_HANDLER_P(zv, add_ref)(zv TSRMLS_CC);
+ } else {
+ zend_error(E_WARNING, "Leaking non-zval data is only applicable to resources and objects");
+ }
+}
+/* }}} */
+
#ifdef ZEND_TEST_EXCEPTIONS
ZEND_FUNCTION(crash)
@@ -1364,6 +1462,7 @@ ZEND_FUNCTION(crash)
ZEND_FUNCTION(get_included_files)
{
char *entry;
+
if (zend_parse_parameters_none() == FAILURE) {
return;
}
@@ -1415,7 +1514,7 @@ ZEND_FUNCTION(set_error_handler)
zval *error_handler;
zend_bool had_orig_error_handler=0;
char *error_handler_name = NULL;
- long error_type = E_ALL | E_STRICT;
+ long error_type = E_ALL;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|l", &error_handler, &error_type) == FAILURE) {
return;
@@ -1558,12 +1657,28 @@ static int copy_class_or_interface_name(zend_class_entry **pce TSRMLS_DC, int nu
return ZEND_HASH_APPLY_KEEP;
}
+/* {{{ proto array get_declared_traits()
+ Returns an array of all declared traits. */
+ZEND_FUNCTION(get_declared_traits)
+{
+ zend_uint mask = ZEND_ACC_TRAIT;
+ zend_uint comply = 1;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ array_init(return_value);
+ zend_hash_apply_with_arguments(EG(class_table) TSRMLS_CC, (apply_func_args_t) copy_class_or_interface_name, 3, return_value, mask, comply);
+}
+/* }}} */
+
/* {{{ proto array get_declared_classes()
Returns an array of all declared classes. */
ZEND_FUNCTION(get_declared_classes)
{
- zend_uint mask = ZEND_ACC_INTERFACE;
+ zend_uint mask = ZEND_ACC_INTERFACE | (ZEND_ACC_TRAIT & ~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS);
zend_uint comply = 0;
if (zend_parse_parameters_none() == FAILURE) {
@@ -1752,7 +1867,7 @@ ZEND_FUNCTION(zend_thread_id)
Get the resource type name for a given resource */
ZEND_FUNCTION(get_resource_type)
{
- char *resource_type;
+ const char *resource_type;
zval *z_resource_type;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &z_resource_type) == FAILURE) {
@@ -1930,21 +2045,22 @@ void debug_print_backtrace_args(zval *arg_array TSRMLS_DC)
}
}
-/* {{{ proto void debug_print_backtrace([int options]) */
+/* {{{ proto void debug_print_backtrace([int options[, int limit]]) */
ZEND_FUNCTION(debug_print_backtrace)
{
zend_execute_data *ptr, *skip;
- int lineno;
- char *function_name;
- char *filename;
- char *class_name = NULL;
+ int lineno, frameno = 0;
+ const char *function_name;
+ const char *filename;
+ const char *class_name = NULL;
char *call_type;
- char *include_filename = NULL;
+ const char *include_filename = NULL;
zval *arg_array = NULL;
int indent = 0;
long options = 0;
+ long limit = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &options) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ll", &options, &limit) == FAILURE) {
return;
}
@@ -1953,9 +2069,10 @@ ZEND_FUNCTION(debug_print_backtrace)
/* skip debug_backtrace() */
ptr = ptr->prev_execute_data;
- while (ptr) {
- char *free_class_name = NULL;
+ while (ptr && (limit == 0 || frameno < limit)) {
+ const char *free_class_name = NULL;
+ frameno++;
class_name = call_type = NULL;
arg_array = NULL;
@@ -2016,7 +2133,7 @@ ZEND_FUNCTION(debug_print_backtrace)
function_name = "unknown";
build_filename_arg = 0;
} else
- switch (Z_LVAL(ptr->opline->op2.u.constant)) {
+ switch (ptr->opline->extended_value) {
case ZEND_EVAL:
function_name = "eval";
build_filename_arg = 0;
@@ -2044,7 +2161,7 @@ ZEND_FUNCTION(debug_print_backtrace)
if (build_filename_arg && include_filename) {
MAKE_STD_ZVAL(arg_array);
array_init(arg_array);
- add_next_index_string(arg_array, include_filename, 1);
+ add_next_index_string(arg_array, (char*)include_filename, 1);
}
call_type = NULL;
}
@@ -2083,21 +2200,21 @@ ZEND_FUNCTION(debug_print_backtrace)
ptr = skip->prev_execute_data;
++indent;
if (free_class_name) {
- efree(free_class_name);
+ efree((char*)free_class_name);
}
}
}
/* }}} */
-ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options TSRMLS_DC)
+ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options, int limit TSRMLS_DC)
{
zend_execute_data *ptr, *skip;
- int lineno;
- char *function_name;
- char *filename;
- char *class_name;
- char *include_filename = NULL;
+ int lineno, frameno = 0;
+ const char *function_name;
+ const char *filename;
+ const char *class_name;
+ const char *include_filename = NULL;
zval *stack_frame;
ptr = EG(current_execute_data);
@@ -2114,7 +2231,8 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
array_init(return_value);
- while (ptr) {
+ while (ptr && (limit == 0 || frameno < limit)) {
+ frameno++;
MAKE_STD_ZVAL(stack_frame);
array_init(stack_frame);
@@ -2132,7 +2250,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
if (skip->op_array) {
filename = skip->op_array->filename;
lineno = skip->opline->lineno;
- add_assoc_string_ex(stack_frame, "file", sizeof("file"), filename, 1);
+ add_assoc_string_ex(stack_frame, "file", sizeof("file"), (char*)filename, 1);
add_assoc_long_ex(stack_frame, "line", sizeof("line"), lineno);
/* try to fetch args only if an FCALL was just made - elsewise we're in the middle of a function
@@ -2149,7 +2267,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
break;
}
if (prev->op_array) {
- add_assoc_string_ex(stack_frame, "file", sizeof("file"), prev->op_array->filename, 1);
+ add_assoc_string_ex(stack_frame, "file", sizeof("file"), (char*)prev->op_array->filename, 1);
add_assoc_long_ex(stack_frame, "line", sizeof("line"), prev->opline->lineno);
break;
}
@@ -2161,17 +2279,17 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
function_name = ptr->function_state.function->common.function_name;
if (function_name) {
- add_assoc_string_ex(stack_frame, "function", sizeof("function"), function_name, 1);
+ add_assoc_string_ex(stack_frame, "function", sizeof("function"), (char*)function_name, 1);
if (ptr->object && Z_TYPE_P(ptr->object) == IS_OBJECT) {
if (ptr->function_state.function->common.scope) {
- add_assoc_string_ex(stack_frame, "class", sizeof("class"), ptr->function_state.function->common.scope->name, 1);
+ add_assoc_string_ex(stack_frame, "class", sizeof("class"), (char*)ptr->function_state.function->common.scope->name, 1);
} else {
zend_uint class_name_len;
int dup;
dup = zend_get_object_classname(ptr->object, &class_name, &class_name_len TSRMLS_CC);
- add_assoc_string_ex(stack_frame, "class", sizeof("class"), class_name, dup);
+ add_assoc_string_ex(stack_frame, "class", sizeof("class"), (char*)class_name, dup);
}
if ((options & DEBUG_BACKTRACE_PROVIDE_OBJECT) != 0) {
@@ -2181,7 +2299,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
add_assoc_string_ex(stack_frame, "type", sizeof("type"), "->", 1);
} else if (ptr->function_state.function->common.scope) {
- add_assoc_string_ex(stack_frame, "class", sizeof("class"), ptr->function_state.function->common.scope->name, 1);
+ add_assoc_string_ex(stack_frame, "class", sizeof("class"), (char*)ptr->function_state.function->common.scope->name, 1);
add_assoc_string_ex(stack_frame, "type", sizeof("type"), "::", 1);
}
@@ -2200,7 +2318,7 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
function_name = "unknown";
build_filename_arg = 0;
} else
- switch (ptr->opline->op2.u.constant.value.lval) {
+ switch (ptr->opline->extended_value) {
case ZEND_EVAL:
function_name = "eval";
build_filename_arg = 0;
@@ -2235,11 +2353,11 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
if we have called include in the frame above - this is the file we have included.
*/
- add_next_index_string(arg_array, include_filename, 1);
+ add_next_index_string(arg_array, (char*)include_filename, 1);
add_assoc_zval_ex(stack_frame, "args", sizeof("args"), arg_array);
}
- add_assoc_string_ex(stack_frame, "function", sizeof("function"), function_name, 1);
+ add_assoc_string_ex(stack_frame, "function", sizeof("function"), (char*)function_name, 1);
}
add_next_index_zval(return_value, stack_frame);
@@ -2252,17 +2370,18 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
/* }}} */
-/* {{{ proto array debug_backtrace([int options])
+/* {{{ proto array debug_backtrace([int options[, int limit]])
Return backtrace as array */
ZEND_FUNCTION(debug_backtrace)
{
long options = DEBUG_BACKTRACE_PROVIDE_OBJECT;
+ long limit = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &options) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ll", &options, &limit) == FAILURE) {
return;
}
- zend_fetch_debug_backtrace(return_value, 1, options TSRMLS_CC);
+ zend_fetch_debug_backtrace(return_value, 1, options, limit TSRMLS_CC);
}
/* }}} */
diff --git a/Zend/zend_builtin_functions.h b/Zend/zend_builtin_functions.h
index 0c4df68a6..2fd8d8cd0 100644
--- a/Zend/zend_builtin_functions.h
+++ b/Zend/zend_builtin_functions.h
@@ -25,7 +25,7 @@
int zend_startup_builtin_functions(TSRMLS_D);
BEGIN_EXTERN_C()
-ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options TSRMLS_DC);
+ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int options, int limit TSRMLS_DC);
END_EXTERN_C()
#endif /* ZEND_BUILTIN_FUNCTIONS_H */
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index 01878ea3f..8f2f372c4 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -37,6 +37,7 @@
typedef struct _zend_closure {
zend_object std;
zend_function func;
+ zval *this_ptr;
HashTable *debug_info;
} zend_closure;
@@ -70,11 +71,72 @@ ZEND_METHOD(Closure, __invoke) /* {{{ */
efree(arguments);
/* destruct the function also, then - we have allocated it in get_method */
- efree(func->internal_function.function_name);
+ efree((char*)func->internal_function.function_name);
efree(func);
}
/* }}} */
+/* {{{ proto Closure Closure::bind(Closure $old, object $to [, mixed $scope = "static" ] )
+ Create a closure from another one and bind to another object and scope */
+ZEND_METHOD(Closure, bind) /* {{{ */
+{
+ zval *newthis, *zclosure, *scope_arg = NULL;
+ zend_closure *closure;
+ zend_class_entry *ce, **ce_p;
+
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo!|z", &zclosure, zend_ce_closure, &newthis, &scope_arg) == FAILURE) {
+ RETURN_NULL();
+ }
+
+ closure = (zend_closure *)zend_object_store_get_object(zclosure TSRMLS_CC);
+
+ if ((newthis != NULL) && (closure->func.common.fn_flags & ZEND_ACC_STATIC)) {
+ zend_error(E_WARNING, "Cannot bind an instance to a static closure");
+ }
+
+ if (scope_arg != NULL) { /* scope argument was given */
+ if (IS_ZEND_STD_OBJECT(*scope_arg)) {
+ ce = Z_OBJCE_P(scope_arg);
+ } else if (Z_TYPE_P(scope_arg) == IS_NULL) {
+ ce = NULL;
+ } else {
+ char *class_name;
+ int class_name_len;
+ zval tmp_zval;
+ INIT_ZVAL(tmp_zval);
+
+ if (Z_TYPE_P(scope_arg) == IS_STRING) {
+ class_name = Z_STRVAL_P(scope_arg);
+ class_name_len = Z_STRLEN_P(scope_arg);
+ } else {
+ tmp_zval = *scope_arg;
+ zval_copy_ctor(&tmp_zval);
+ convert_to_string(&tmp_zval);
+ class_name = Z_STRVAL(tmp_zval);
+ class_name_len = Z_STRLEN(tmp_zval);
+ }
+
+ if ((class_name_len == sizeof("static") - 1) &&
+ (memcmp("static", class_name, sizeof("static") - 1) == 0)) {
+ ce = closure->func.common.scope;
+ }
+ else if (zend_lookup_class_ex(class_name, class_name_len, NULL, 1, &ce_p TSRMLS_CC) == FAILURE) {
+ zend_error(E_WARNING, "Class '%s' not found", class_name);
+ zval_dtor(&tmp_zval);
+ RETURN_NULL();
+ } else {
+ ce = *ce_p;
+ }
+ zval_dtor(&tmp_zval);
+ }
+ } else { /* scope argument not given; do not change the scope by default */
+ ce = closure->func.common.scope;
+ }
+
+ zend_create_closure(return_value, &closure->func, ce, newthis TSRMLS_CC);
+}
+/* }}} */
+
static zend_function *zend_closure_get_constructor(zval *object TSRMLS_DC) /* {{{ */
{
zend_error(E_RECOVERABLE_ERROR, "Instantiation of 'Closure' is not allowed");
@@ -95,7 +157,7 @@ ZEND_API zend_function *zend_get_closure_invoke_method(zval *obj TSRMLS_DC) /* {
invoke->common = closure->func.common;
invoke->type = ZEND_INTERNAL_FUNCTION;
- invoke->internal_function.fn_flags = ZEND_ACC_PUBLIC | ZEND_ACC_CALL_VIA_HANDLER;
+ invoke->internal_function.fn_flags = ZEND_ACC_PUBLIC | ZEND_ACC_CALL_VIA_HANDLER | (closure->func.common.fn_flags & ZEND_ACC_RETURN_REFERENCE);
invoke->internal_function.handler = ZEND_MN(Closure___invoke);
invoke->internal_function.module = 0;
invoke->internal_function.scope = zend_ce_closure;
@@ -111,7 +173,14 @@ ZEND_API const zend_function *zend_get_closure_method_def(zval *obj TSRMLS_DC) /
}
/* }}} */
-static zend_function *zend_closure_get_method(zval **object_ptr, char *method_name, int method_len TSRMLS_DC) /* {{{ */
+ZEND_API zval* zend_get_closure_this_ptr(zval *obj TSRMLS_DC) /* {{{ */
+{
+ zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
+ return closure->this_ptr;
+}
+/* }}} */
+
+static zend_function *zend_closure_get_method(zval **object_ptr, char *method_name, int method_len, const zend_literal *key TSRMLS_DC) /* {{{ */
{
char *lc_name;
ALLOCA_FLAG(use_heap)
@@ -125,11 +194,11 @@ static zend_function *zend_closure_get_method(zval **object_ptr, char *method_na
return zend_get_closure_invoke_method(*object_ptr TSRMLS_CC);
}
free_alloca(lc_name, use_heap);
- return NULL;
+ return std_object_handlers.get_method(object_ptr, method_name, method_len, key TSRMLS_CC);
}
/* }}} */
-static zval *zend_closure_read_property(zval *object, zval *member, int type TSRMLS_DC) /* {{{ */
+static zval *zend_closure_read_property(zval *object, zval *member, int type, const zend_literal *key TSRMLS_DC) /* {{{ */
{
ZEND_CLOSURE_PROPERTY_ERROR();
Z_ADDREF(EG(uninitialized_zval));
@@ -137,20 +206,20 @@ static zval *zend_closure_read_property(zval *object, zval *member, int type TSR
}
/* }}} */
-static void zend_closure_write_property(zval *object, zval *member, zval *value TSRMLS_DC) /* {{{ */
+static void zend_closure_write_property(zval *object, zval *member, zval *value, const zend_literal *key TSRMLS_DC) /* {{{ */
{
ZEND_CLOSURE_PROPERTY_ERROR();
}
/* }}} */
-static zval **zend_closure_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC) /* {{{ */
+static zval **zend_closure_get_property_ptr_ptr(zval *object, zval *member, const zend_literal *key TSRMLS_DC) /* {{{ */
{
ZEND_CLOSURE_PROPERTY_ERROR();
return NULL;
}
/* }}} */
-static int zend_closure_has_property(zval *object, zval *member, int has_set_exists TSRMLS_DC) /* {{{ */
+static int zend_closure_has_property(zval *object, zval *member, int has_set_exists, const zend_literal *key TSRMLS_DC) /* {{{ */
{
if (has_set_exists != 2) {
ZEND_CLOSURE_PROPERTY_ERROR();
@@ -159,7 +228,7 @@ static int zend_closure_has_property(zval *object, zval *member, int has_set_exi
}
/* }}} */
-static void zend_closure_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{ */
+static void zend_closure_unset_property(zval *object, zval *member, const zend_literal *key TSRMLS_DC) /* {{{ */
{
ZEND_CLOSURE_PROPERTY_ERROR();
}
@@ -187,6 +256,10 @@ static void zend_closure_free_storage(void *object TSRMLS_DC) /* {{{ */
efree(closure->debug_info);
}
+ if (closure->this_ptr) {
+ zval_ptr_dtor(&closure->this_ptr);
+ }
+
efree(closure);
}
/* }}} */
@@ -208,6 +281,17 @@ static zend_object_value zend_closure_new(zend_class_entry *class_type TSRMLS_DC
}
/* }}} */
+static zend_object_value zend_closure_clone(zval *zobject TSRMLS_DC) /* {{{ */
+{
+ zend_closure *closure = (zend_closure *)zend_object_store_get_object(zobject TSRMLS_CC);
+ zval result;
+
+ zend_create_closure(&result, &closure->func, closure->func.common.scope, closure->this_ptr TSRMLS_CC);
+ return Z_OBJVAL(result);
+}
+/* }}} */
+
+
int zend_closure_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zval **zobj_ptr TSRMLS_DC) /* {{{ */
{
zend_closure *closure;
@@ -219,10 +303,17 @@ int zend_closure_get_closure(zval *obj, zend_class_entry **ce_ptr, zend_function
closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
*fptr_ptr = &closure->func;
- if (zobj_ptr) {
- *zobj_ptr = NULL;
+ if (closure->this_ptr) {
+ if (zobj_ptr) {
+ *zobj_ptr = closure->this_ptr;
+ }
+ *ce_ptr = Z_OBJCE_P(closure->this_ptr);
+ } else {
+ if (zobj_ptr) {
+ *zobj_ptr = NULL;
+ }
+ *ce_ptr = closure->func.common.scope;
}
- *ce_ptr = NULL;
return SUCCESS;
}
/* }}} */
@@ -245,7 +336,12 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp TSRMLS_
MAKE_STD_ZVAL(val);
array_init(val);
zend_hash_copy(Z_ARRVAL_P(val), static_variables, (copy_ctor_func_t)zval_add_ref, NULL, sizeof(zval*));
- zend_symtable_update(closure->debug_info, "static", sizeof("static"), (void *) &val, sizeof(zval *), NULL);
+ zend_hash_update(closure->debug_info, "static", sizeof("static"), (void *) &val, sizeof(zval *), NULL);
+ }
+
+ if (closure->this_ptr) {
+ Z_ADDREF_P(closure->this_ptr);
+ zend_symtable_update(closure->debug_info, "this", sizeof("this"), (void *) &closure->this_ptr, sizeof(zval *), NULL);
}
if (arg_info) {
@@ -272,7 +368,7 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp TSRMLS_
efree(name);
arg_info++;
}
- zend_symtable_update(closure->debug_info, "parameter", sizeof("parameter"), (void *) &val, sizeof(zval *), NULL);
+ zend_hash_update(closure->debug_info, "parameter", sizeof("parameter"), (void *) &val, sizeof(zval *), NULL);
}
}
@@ -280,15 +376,14 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp TSRMLS_
}
/* }}} */
-static HashTable *zend_closure_get_properties(zval *obj TSRMLS_DC) /* {{{ */
+static HashTable *zend_closure_get_gc(zval *obj, zval ***table, int *n TSRMLS_DC) /* {{{ */
{
zend_closure *closure = (zend_closure *)zend_object_store_get_object(obj TSRMLS_CC);
- if (GC_G(gc_active)) {
- return (closure->func.type == ZEND_USER_FUNCTION) ? closure->func.op_array.static_variables : NULL;
- }
-
- return closure->std.properties;
+ *table = closure->this_ptr ? &closure->this_ptr : NULL;
+ *n = closure->this_ptr ? 1 : 0;
+ return (closure->func.type == ZEND_USER_FUNCTION) ?
+ closure->func.op_array.static_variables : NULL;
}
/* }}} */
@@ -300,8 +395,21 @@ ZEND_METHOD(Closure, __construct)
}
/* }}} */
+ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_bindto, 0, 0, 1)
+ ZEND_ARG_INFO(0, newthis)
+ ZEND_ARG_INFO(0, newscope)
+ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_bind, 0, 0, 2)
+ ZEND_ARG_INFO(0, closure)
+ ZEND_ARG_INFO(0, newthis)
+ ZEND_ARG_INFO(0, newscope)
+ZEND_END_ARG_INFO()
+
static const zend_function_entry closure_functions[] = {
ZEND_ME(Closure, __construct, NULL, ZEND_ACC_PRIVATE)
+ ZEND_ME(Closure, bind, arginfo_closure_bind, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+ ZEND_MALIAS(Closure, bindTo, bind, arginfo_closure_bindto, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
@@ -325,59 +433,14 @@ void zend_register_closure_ce(TSRMLS_D) /* {{{ */
closure_handlers.has_property = zend_closure_has_property;
closure_handlers.unset_property = zend_closure_unset_property;
closure_handlers.compare_objects = zend_closure_compare_objects;
- closure_handlers.clone_obj = NULL;
+ closure_handlers.clone_obj = zend_closure_clone;
closure_handlers.get_debug_info = zend_closure_get_debug_info;
closure_handlers.get_closure = zend_closure_get_closure;
- closure_handlers.get_properties = zend_closure_get_properties;
+ closure_handlers.get_gc = zend_closure_get_gc;
}
/* }}} */
-static int zval_copy_static_var(zval **p TSRMLS_DC, int num_args, va_list args, zend_hash_key *key) /* {{{ */
-{
- HashTable *target = va_arg(args, HashTable*);
- zend_bool is_ref;
- zval *tmp;
-
- if (Z_TYPE_PP(p) & (IS_LEXICAL_VAR|IS_LEXICAL_REF)) {
- is_ref = Z_TYPE_PP(p) & IS_LEXICAL_REF;
-
- if (!EG(active_symbol_table)) {
- zend_rebuild_symbol_table(TSRMLS_C);
- }
- if (zend_hash_quick_find(EG(active_symbol_table), key->arKey, key->nKeyLength, key->h, (void **) &p) == FAILURE) {
- if (is_ref) {
- ALLOC_INIT_ZVAL(tmp);
- Z_SET_ISREF_P(tmp);
- zend_hash_quick_add(EG(active_symbol_table), key->arKey, key->nKeyLength, key->h, &tmp, sizeof(zval*), (void**)&p);
- } else {
- tmp = EG(uninitialized_zval_ptr);
- zend_error(E_NOTICE,"Undefined variable: %s", key->arKey);
- }
- } else {
- if (is_ref) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(p);
- tmp = *p;
- } else if (Z_ISREF_PP(p)) {
- ALLOC_INIT_ZVAL(tmp);
- *tmp = **p;
- zval_copy_ctor(tmp);
- Z_SET_REFCOUNT_P(tmp, 0);
- Z_UNSET_ISREF_P(tmp);
- } else {
- tmp = *p;
- }
- }
- } else {
- tmp = *p;
- }
- if (zend_hash_quick_add(target, key->arKey, key->nKeyLength, key->h, &tmp, sizeof(zval*), NULL) == SUCCESS) {
- Z_ADDREF_P(tmp);
- }
- return ZEND_HASH_APPLY_KEEP;
-}
-/* }}} */
-
-ZEND_API void zend_create_closure(zval *res, zend_function *func TSRMLS_DC) /* {{{ */
+ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_entry *scope, zval *this_ptr TSRMLS_DC) /* {{{ */
{
zend_closure *closure;
@@ -388,6 +451,12 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func TSRMLS_DC) /* {
closure->func = *func;
closure->func.common.prototype = NULL;
+ if ((scope == NULL) && (this_ptr != NULL)) {
+ /* use dummy scope if we're binding an object without specifying a scope */
+ /* maybe it would be better to create one for this purpose */
+ scope = zend_ce_closure;
+ }
+
if (closure->func.type == ZEND_USER_FUNCTION) {
if (closure->func.op_array.static_variables) {
HashTable *static_variables = closure->func.op_array.static_variables;
@@ -396,10 +465,44 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func TSRMLS_DC) /* {
zend_hash_init(closure->func.op_array.static_variables, zend_hash_num_elements(static_variables), NULL, ZVAL_PTR_DTOR, 0);
zend_hash_apply_with_arguments(static_variables TSRMLS_CC, (apply_func_args_t)zval_copy_static_var, 1, closure->func.op_array.static_variables);
}
+ closure->func.op_array.run_time_cache = NULL;
(*closure->func.op_array.refcount)++;
+ } else {
+ /* verify that we aren't binding internal function to a wrong scope */
+ if(func->common.scope != NULL) {
+ if(scope && !instanceof_function(scope, func->common.scope TSRMLS_CC)) {
+ zend_error(E_WARNING, "Cannot bind function %s::%s to scope class %s", func->common.scope->name, func->common.function_name, scope->name);
+ scope = NULL;
+ }
+ if(scope && this_ptr && (func->common.fn_flags & ZEND_ACC_STATIC) == 0 &&
+ !instanceof_function(Z_OBJCE_P(this_ptr), closure->func.common.scope TSRMLS_CC)) {
+ zend_error(E_WARNING, "Cannot bind function %s::%s to object of class %s", func->common.scope->name, func->common.function_name, Z_OBJCE_P(this_ptr)->name);
+ scope = NULL;
+ this_ptr = NULL;
+ }
+ } else {
+ /* if it's a free function, we won't set scope & this since they're meaningless */
+ this_ptr = NULL;
+ scope = NULL;
+ }
}
- closure->func.common.scope = NULL;
+ /* Invariants:
+ * If the closure is unscoped, it has no bound object.
+ * The the closure is scoped, it's either static or it's bound */
+ closure->func.common.scope = scope;
+ if (scope) {
+ closure->func.common.fn_flags |= ZEND_ACC_PUBLIC;
+ if (this_ptr && (closure->func.common.fn_flags & ZEND_ACC_STATIC) == 0) {
+ closure->this_ptr = this_ptr;
+ Z_ADDREF_P(this_ptr);
+ } else {
+ closure->func.common.fn_flags |= ZEND_ACC_STATIC;
+ closure->this_ptr = NULL;
+ }
+ } else {
+ closure->this_ptr = NULL;
+ }
}
/* }}} */
diff --git a/Zend/zend_closures.h b/Zend/zend_closures.h
index 4c7bf8492..376b3bb0b 100644
--- a/Zend/zend_closures.h
+++ b/Zend/zend_closures.h
@@ -30,9 +30,10 @@ void zend_register_closure_ce(TSRMLS_D);
extern ZEND_API zend_class_entry *zend_ce_closure;
-ZEND_API void zend_create_closure(zval *res, zend_function *op_array TSRMLS_DC);
+ZEND_API void zend_create_closure(zval *res, zend_function *op_array, zend_class_entry *scope, zval *this_ptr TSRMLS_DC);
ZEND_API zend_function *zend_get_closure_invoke_method(zval *obj TSRMLS_DC);
ZEND_API const zend_function *zend_get_closure_method_def(zval *obj TSRMLS_DC);
+ZEND_API zval* zend_get_closure_this_ptr(zval *obj TSRMLS_DC);
END_EXTERN_C()
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index ecca22476..3307db581 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c 321634 2012-01-01 13:15:04Z felipe $ */
+/* $Id: zend_compile.c 322378 2012-01-17 08:09:13Z dmitry $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -27,10 +27,75 @@
#include "zend_API.h"
#include "zend_exceptions.h"
#include "tsrm_virtual_cwd.h"
-
-#ifdef ZEND_MULTIBYTE
#include "zend_multibyte.h"
-#endif /* ZEND_MULTIBYTE */
+#include "zend_language_scanner.h"
+
+#define CONSTANT_EX(op_array, op) \
+ (op_array)->literals[op].constant
+
+#define CONSTANT(op) \
+ CONSTANT_EX(CG(active_op_array), op)
+
+#define SET_NODE(target, src) do { \
+ target ## _type = (src)->op_type; \
+ if ((src)->op_type == IS_CONST) { \
+ target.constant = zend_add_literal(CG(active_op_array), &(src)->u.constant TSRMLS_CC); \
+ } else { \
+ target = (src)->u.op; \
+ } \
+ } while (0)
+
+#define GET_NODE(target, src) do { \
+ (target)->op_type = src ## _type; \
+ if ((target)->op_type == IS_CONST) { \
+ (target)->u.constant = CONSTANT(src.constant); \
+ } else { \
+ (target)->u.op = src; \
+ (target)->EA = 0; \
+ } \
+ } while (0)
+
+#define COPY_NODE(target, src) do { \
+ target ## _type = src ## _type; \
+ target = src; \
+ } while (0)
+
+#define CALCULATE_LITERAL_HASH(num) do { \
+ if (IS_INTERNED(Z_STRVAL(CONSTANT(num)))) { \
+ Z_HASH_P(&CONSTANT(num)) = INTERNED_HASH(Z_STRVAL(CONSTANT(num))); \
+ } else { \
+ Z_HASH_P(&CONSTANT(num)) = zend_hash_func(Z_STRVAL(CONSTANT(num)), Z_STRLEN(CONSTANT(num))+1); \
+ } \
+ } while (0)
+
+#define GET_CACHE_SLOT(literal) do { \
+ CG(active_op_array)->literals[literal].cache_slot = CG(active_op_array)->last_cache_slot++; \
+ if ((CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) && CG(active_op_array)->run_time_cache) { \
+ CG(active_op_array)->run_time_cache = erealloc(CG(active_op_array)->run_time_cache, CG(active_op_array)->last_cache_slot * sizeof(void*)); \
+ CG(active_op_array)->run_time_cache[CG(active_op_array)->last_cache_slot - 1] = NULL; \
+ } \
+ } while (0)
+
+#define POLYMORPHIC_CACHE_SLOT_SIZE 2
+
+#define GET_POLYMORPHIC_CACHE_SLOT(literal) do { \
+ CG(active_op_array)->literals[literal].cache_slot = CG(active_op_array)->last_cache_slot; \
+ CG(active_op_array)->last_cache_slot += POLYMORPHIC_CACHE_SLOT_SIZE; \
+ if ((CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) && CG(active_op_array)->run_time_cache) { \
+ CG(active_op_array)->run_time_cache = erealloc(CG(active_op_array)->run_time_cache, CG(active_op_array)->last_cache_slot * sizeof(void*)); \
+ CG(active_op_array)->run_time_cache[CG(active_op_array)->last_cache_slot - 1] = NULL; \
+ CG(active_op_array)->run_time_cache[CG(active_op_array)->last_cache_slot - 2] = NULL; \
+ } \
+ } while (0)
+
+#define FREE_POLYMORPHIC_CACHE_SLOT(literal) do { \
+ if (CG(active_op_array)->literals[literal].cache_slot != -1 && \
+ CG(active_op_array)->literals[literal].cache_slot == \
+ CG(active_op_array)->last_cache_slot - POLYMORPHIC_CACHE_SLOT_SIZE) { \
+ CG(active_op_array)->literals[literal].cache_slot = -1; \
+ CG(active_op_array)->last_cache_slot -= POLYMORPHIC_CACHE_SLOT_SIZE; \
+ } \
+ } while (0)
ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC);
ZEND_API zend_op_array *(*zend_compile_string)(zval *source_string, char *filename TSRMLS_DC);
@@ -42,34 +107,35 @@ ZEND_API zend_executor_globals executor_globals;
static void zend_duplicate_property_info(zend_property_info *property_info) /* {{{ */
{
- property_info->name = estrndup(property_info->name, property_info->name_length);
+ if (!IS_INTERNED(property_info->name)) {
+ property_info->name = estrndup(property_info->name, property_info->name_length);
+ }
if (property_info->doc_comment) {
property_info->doc_comment = estrndup(property_info->doc_comment, property_info->doc_comment_len);
}
}
/* }}} */
-
static void zend_duplicate_property_info_internal(zend_property_info *property_info) /* {{{ */
{
- property_info->name = zend_strndup(property_info->name, property_info->name_length);
+ if (!IS_INTERNED(property_info->name)) {
+ property_info->name = zend_strndup(property_info->name, property_info->name_length);
+ }
}
/* }}} */
-
static void zend_destroy_property_info(zend_property_info *property_info) /* {{{ */
{
- efree(property_info->name);
+ str_efree(property_info->name);
if (property_info->doc_comment) {
- efree(property_info->doc_comment);
+ efree((char*)property_info->doc_comment);
}
}
/* }}} */
-
static void zend_destroy_property_info_internal(zend_property_info *property_info) /* {{{ */
{
- free(property_info->name);
+ str_free((char*)property_info->name);
}
/* }}} */
@@ -77,7 +143,7 @@ static void build_runtime_defined_function_key(zval *result, const char *name, i
{
char char_pos_buf[32];
uint char_pos_len;
- char *filename;
+ const char *filename;
char_pos_len = zend_sprintf(char_pos_buf, "%p", LANG_SCNG(yy_text));
if (CG(active_op_array)->filename) {
@@ -88,41 +154,17 @@ static void build_runtime_defined_function_key(zval *result, const char *name, i
/* NULL, name length, filename length, last accepting char position length */
result->value.str.len = 1+name_length+strlen(filename)+char_pos_len;
-#ifdef ZEND_MULTIBYTE
+
/* must be binary safe */
result->value.str.val = (char *) safe_emalloc(result->value.str.len, 1, 1);
result->value.str.val[0] = '\0';
sprintf(result->value.str.val+1, "%s%s%s", name, filename, char_pos_buf);
-#else
- zend_spprintf(&result->value.str.val, 0, "%c%s%s%s", '\0', name, filename, char_pos_buf);
-#endif /* ZEND_MULTIBYTE */
+
result->type = IS_STRING;
Z_SET_REFCOUNT_P(result, 1);
}
/* }}} */
-
-int zend_auto_global_arm(zend_auto_global *auto_global TSRMLS_DC) /* {{{ */
-{
- auto_global->armed = (auto_global->auto_global_callback ? 1 : 0);
- return 0;
-}
-/* }}} */
-
-
-ZEND_API int zend_auto_global_disable_jit(const char *varname, zend_uint varname_length TSRMLS_DC) /* {{{ */
-{
- zend_auto_global *auto_global;
-
- if (zend_hash_find(CG(auto_globals), varname, varname_length+1, (void **) &auto_global)==FAILURE) {
- return FAILURE;
- }
- auto_global->armed = 0;
- return SUCCESS;
-}
-/* }}} */
-
-
static void init_compiler_declarables(TSRMLS_D) /* {{{ */
{
Z_TYPE(CG(declarables).ticks) = IS_LONG;
@@ -130,6 +172,16 @@ static void init_compiler_declarables(TSRMLS_D) /* {{{ */
}
/* }}} */
+void zend_init_compiler_context(TSRMLS_D) /* {{{ */
+{
+ CG(context).opcodes_size = (CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) ? INITIAL_INTERACTIVE_OP_ARRAY_SIZE : INITIAL_OP_ARRAY_SIZE;
+ CG(context).vars_size = 0;
+ CG(context).literals_size = 0;
+ CG(context).current_brk_cont = -1;
+ CG(context).backpatch_count = 0;
+ CG(context).labels = NULL;
+}
+/* }}} */
void zend_init_compiler_data_structures(TSRMLS_D) /* {{{ */
{
@@ -150,23 +202,12 @@ void zend_init_compiler_data_structures(TSRMLS_D) /* {{{ */
CG(has_bracketed_namespaces) = 0;
CG(current_import) = NULL;
init_compiler_declarables(TSRMLS_C);
- zend_hash_apply(CG(auto_globals), (apply_func_t) zend_auto_global_arm TSRMLS_CC);
- zend_stack_init(&CG(labels_stack));
- CG(labels) = NULL;
-
-#ifdef ZEND_MULTIBYTE
- CG(script_encoding_list) = NULL;
- CG(script_encoding_list_size) = 0;
- CG(internal_encoding) = NULL;
- CG(encoding_detector) = NULL;
- CG(encoding_converter) = NULL;
- CG(encoding_oddlen) = NULL;
+ zend_stack_init(&CG(context_stack));
+
CG(encoding_declared) = 0;
-#endif /* ZEND_MULTIBYTE */
}
/* }}} */
-
ZEND_API void file_handle_dtor(zend_file_handle *fh) /* {{{ */
{
TSRMLS_FETCH();
@@ -175,7 +216,6 @@ ZEND_API void file_handle_dtor(zend_file_handle *fh) /* {{{ */
}
/* }}} */
-
void init_compiler(TSRMLS_D) /* {{{ */
{
CG(active_op_array) = NULL;
@@ -187,7 +227,6 @@ void init_compiler(TSRMLS_D) /* {{{ */
}
/* }}} */
-
void shutdown_compiler(TSRMLS_D) /* {{{ */
{
zend_stack_destroy(&CG(bp_stack));
@@ -199,17 +238,10 @@ void shutdown_compiler(TSRMLS_D) /* {{{ */
zend_stack_destroy(&CG(list_stack));
zend_hash_destroy(&CG(filenames_table));
zend_llist_destroy(&CG(open_files));
- zend_stack_destroy(&CG(labels_stack));
-
-#ifdef ZEND_MULTIBYTE
- if (CG(script_encoding_list)) {
- efree(CG(script_encoding_list));
- }
-#endif /* ZEND_MULTIBYTE */
+ zend_stack_destroy(&CG(context_stack));
}
/* }}} */
-
ZEND_API char *zend_set_compiled_filename(const char *new_compiled_filename TSRMLS_DC) /* {{{ */
{
char **pp, *p;
@@ -226,79 +258,327 @@ ZEND_API char *zend_set_compiled_filename(const char *new_compiled_filename TSRM
}
/* }}} */
-
ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename TSRMLS_DC) /* {{{ */
{
CG(compiled_filename) = original_compiled_filename;
}
/* }}} */
-
ZEND_API char *zend_get_compiled_filename(TSRMLS_D) /* {{{ */
{
return CG(compiled_filename);
}
/* }}} */
-
ZEND_API int zend_get_compiled_lineno(TSRMLS_D) /* {{{ */
{
return CG(zend_lineno);
}
/* }}} */
-
ZEND_API zend_bool zend_is_compiling(TSRMLS_D) /* {{{ */
{
return CG(in_compilation);
}
/* }}} */
-
static zend_uint get_temporary_variable(zend_op_array *op_array) /* {{{ */
{
return (op_array->T)++ * ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable));
}
/* }}} */
-static int lookup_cv(zend_op_array *op_array, char* name, int name_len) /* {{{ */
+static int lookup_cv(zend_op_array *op_array, char* name, int name_len, ulong hash TSRMLS_DC) /* {{{ */
{
int i = 0;
- ulong hash_value = zend_inline_hash_func(name, name_len+1);
+ ulong hash_value = hash ? hash : zend_inline_hash_func(name, name_len+1);
while (i < op_array->last_var) {
- if (op_array->vars[i].hash_value == hash_value &&
- op_array->vars[i].name_len == name_len &&
- strcmp(op_array->vars[i].name, name) == 0) {
- efree(name);
- return i;
+ if (op_array->vars[i].name == name ||
+ (op_array->vars[i].hash_value == hash_value &&
+ op_array->vars[i].name_len == name_len &&
+ memcmp(op_array->vars[i].name, name, name_len) == 0)) {
+ str_efree(name);
+ return i;
}
i++;
}
i = op_array->last_var;
op_array->last_var++;
- if (op_array->last_var > op_array->size_var) {
- op_array->size_var += 16; /* FIXME */
- op_array->vars = erealloc(op_array->vars, op_array->size_var*sizeof(zend_compiled_variable));
+ if (op_array->last_var > CG(context).vars_size) {
+ CG(context).vars_size += 16; /* FIXME */
+ op_array->vars = erealloc(op_array->vars, CG(context).vars_size * sizeof(zend_compiled_variable));
}
- op_array->vars[i].name = name; /* estrndup(name, name_len); */
+ op_array->vars[i].name = zend_new_interned_string(name, name_len + 1, 1 TSRMLS_CC);
op_array->vars[i].name_len = name_len;
op_array->vars[i].hash_value = hash_value;
return i;
}
/* }}} */
+void zend_del_literal(zend_op_array *op_array, int n) /* {{{ */
+{
+ zval_dtor(&CONSTANT_EX(op_array, n));
+ if (n + 1 == op_array->last_literal) {
+ op_array->last_literal--;
+ } else {
+ Z_TYPE(CONSTANT_EX(op_array, n)) = IS_NULL;
+ }
+}
+/* }}} */
+
+/* Common part of zend_add_literal and zend_append_individual_literal */
+static inline void zend_insert_literal(zend_op_array *op_array, const zval *zv, int literal_position TSRMLS_DC) /* {{{ */
+{
+ if (Z_TYPE_P(zv) == IS_STRING || Z_TYPE_P(zv) == IS_CONSTANT) {
+ zval *z = (zval*)zv;
+ Z_STRVAL_P(z) = (char*)zend_new_interned_string(Z_STRVAL_P(zv), Z_STRLEN_P(zv) + 1, 1 TSRMLS_CC);
+ }
+ CONSTANT_EX(op_array, literal_position) = *zv;
+ Z_SET_REFCOUNT(CONSTANT_EX(op_array, literal_position), 2);
+ Z_SET_ISREF(CONSTANT_EX(op_array, literal_position));
+ op_array->literals[literal_position].hash_value = 0;
+ op_array->literals[literal_position].cache_slot = -1;
+}
+/* }}} */
+
+/* Is used while compiling a function, using the context to keep track
+ of an approximate size to avoid to relocate to often.
+ Literals are truncated to actual size in the second compiler pass (pass_two()). */
+int zend_add_literal(zend_op_array *op_array, const zval *zv TSRMLS_DC) /* {{{ */
+{
+ int i = op_array->last_literal;
+ op_array->last_literal++;
+ if (i >= CG(context).literals_size) {
+ while (i >= CG(context).literals_size) {
+ CG(context).literals_size += 16; /* FIXME */
+ }
+ op_array->literals = (zend_literal*)erealloc(op_array->literals, CG(context).literals_size * sizeof(zend_literal));
+ }
+ zend_insert_literal(op_array, zv, i TSRMLS_CC);
+ return i;
+}
+/* }}} */
+
+/* Is used after normal compilation to append an additional literal.
+ Allocation is done precisely here. */
+int zend_append_individual_literal(zend_op_array *op_array, const zval *zv TSRMLS_DC) /* {{{ */
+{
+ int i = op_array->last_literal;
+ op_array->last_literal++;
+ op_array->literals = (zend_literal*)erealloc(op_array->literals, (i + 1) * sizeof(zend_literal));
+ zend_insert_literal(op_array, zv, i TSRMLS_CC);
+ return i;
+}
+/* }}} */
+
+int zend_add_func_name_literal(zend_op_array *op_array, const zval *zv TSRMLS_DC) /* {{{ */
+{
+ int ret;
+ char *lc_name;
+ zval c;
+ int lc_literal;
+
+ if (op_array->last_literal > 0 &&
+ &op_array->literals[op_array->last_literal - 1].constant == zv &&
+ op_array->literals[op_array->last_literal - 1].cache_slot == -1) {
+ /* we already have function name as last literal (do nothing) */
+ ret = op_array->last_literal - 1;
+ } else {
+ ret = zend_add_literal(op_array, zv TSRMLS_CC);
+ }
+
+ lc_name = zend_str_tolower_dup(Z_STRVAL_P(zv), Z_STRLEN_P(zv));
+ ZVAL_STRINGL(&c, lc_name, Z_STRLEN_P(zv), 0);
+ lc_literal = zend_add_literal(CG(active_op_array), &c TSRMLS_CC);
+ CALCULATE_LITERAL_HASH(lc_literal);
+
+ return ret;
+}
+/* }}} */
+
+int zend_add_ns_func_name_literal(zend_op_array *op_array, const zval *zv TSRMLS_DC) /* {{{ */
+{
+ int ret;
+ char *lc_name;
+ const char *ns_separator;
+ int lc_len;
+ zval c;
+ int lc_literal;
+
+ if (op_array->last_literal > 0 &&
+ &op_array->literals[op_array->last_literal - 1].constant == zv &&
+ op_array->literals[op_array->last_literal - 1].cache_slot == -1) {
+ /* we already have function name as last literal (do nothing) */
+ ret = op_array->last_literal - 1;
+ } else {
+ ret = zend_add_literal(op_array, zv TSRMLS_CC);
+ }
+
+ lc_name = zend_str_tolower_dup(Z_STRVAL_P(zv), Z_STRLEN_P(zv));
+ ZVAL_STRINGL(&c, lc_name, Z_STRLEN_P(zv), 0);
+ lc_literal = zend_add_literal(CG(active_op_array), &c TSRMLS_CC);
+ CALCULATE_LITERAL_HASH(lc_literal);
+
+ ns_separator = (const char*)zend_memrchr(Z_STRVAL_P(zv), '\\', Z_STRLEN_P(zv)) + 1;
+ lc_len = Z_STRLEN_P(zv) - (ns_separator - Z_STRVAL_P(zv));
+ lc_name = zend_str_tolower_dup(ns_separator, lc_len);
+ ZVAL_STRINGL(&c, lc_name, lc_len, 0);
+ lc_literal = zend_add_literal(CG(active_op_array), &c TSRMLS_CC);
+ CALCULATE_LITERAL_HASH(lc_literal);
+
+ return ret;
+}
+/* }}} */
+
+int zend_add_class_name_literal(zend_op_array *op_array, const zval *zv TSRMLS_DC) /* {{{ */
+{
+ int ret;
+ char *lc_name;
+ int lc_len;
+ zval c;
+ int lc_literal;
+
+ if (op_array->last_literal > 0 &&
+ &op_array->literals[op_array->last_literal - 1].constant == zv &&
+ op_array->literals[op_array->last_literal - 1].cache_slot == -1) {
+ /* we already have function name as last literal (do nothing) */
+ ret = op_array->last_literal - 1;
+ } else {
+ ret = zend_add_literal(op_array, zv TSRMLS_CC);
+ }
+
+ if (Z_STRVAL_P(zv)[0] == '\\') {
+ lc_len = Z_STRLEN_P(zv) - 1;
+ lc_name = zend_str_tolower_dup(Z_STRVAL_P(zv) + 1, lc_len);
+ } else {
+ lc_len = Z_STRLEN_P(zv);
+ lc_name = zend_str_tolower_dup(Z_STRVAL_P(zv), lc_len);
+ }
+ ZVAL_STRINGL(&c, lc_name, lc_len, 0);
+ lc_literal = zend_add_literal(CG(active_op_array), &c TSRMLS_CC);
+ CALCULATE_LITERAL_HASH(lc_literal);
+
+ GET_CACHE_SLOT(ret);
+
+ return ret;
+}
+/* }}} */
+
+int zend_add_const_name_literal(zend_op_array *op_array, const zval *zv, int unqualified TSRMLS_DC) /* {{{ */
+{
+ int ret, tmp_literal;
+ char *name, *tmp_name;
+ const char *ns_separator;
+ int name_len, ns_len;
+ zval c;
+
+ if (op_array->last_literal > 0 &&
+ &op_array->literals[op_array->last_literal - 1].constant == zv &&
+ op_array->literals[op_array->last_literal - 1].cache_slot == -1) {
+ /* we already have function name as last literal (do nothing) */
+ ret = op_array->last_literal - 1;
+ } else {
+ ret = zend_add_literal(op_array, zv TSRMLS_CC);
+ }
+
+ /* skip leading '\\' */
+ if (Z_STRVAL_P(zv)[0] == '\\') {
+ name_len = Z_STRLEN_P(zv) - 1;
+ name = Z_STRVAL_P(zv) + 1;
+ } else {
+ name_len = Z_STRLEN_P(zv);
+ name = Z_STRVAL_P(zv);
+ }
+ ns_separator = zend_memrchr(name, '\\', name_len);
+ if (ns_separator) {
+ ns_len = ns_separator - name;
+ } else {
+ ns_len = 0;
+ }
+
+ if (ns_len) {
+ /* lowercased namespace name & original constant name */
+ tmp_name = estrndup(name, name_len);
+ zend_str_tolower(tmp_name, ns_len);
+ ZVAL_STRINGL(&c, tmp_name, name_len, 0);
+ tmp_literal = zend_add_literal(CG(active_op_array), &c TSRMLS_CC);
+ CALCULATE_LITERAL_HASH(tmp_literal);
+
+ /* lowercased namespace name & lowercased constant name */
+ tmp_name = zend_str_tolower_dup(name, name_len);
+ ZVAL_STRINGL(&c, tmp_name, name_len, 0);
+ tmp_literal = zend_add_literal(CG(active_op_array), &c TSRMLS_CC);
+ CALCULATE_LITERAL_HASH(tmp_literal);
+ }
+
+ if (ns_len) {
+ if (!unqualified) {
+ return ret;
+ }
+ ns_len++;
+ name += ns_len;
+ name_len -= ns_len;
+ }
+
+ /* original constant name */
+ tmp_name = estrndup(name, name_len);
+ ZVAL_STRINGL(&c, tmp_name, name_len, 0);
+ tmp_literal = zend_add_literal(CG(active_op_array), &c TSRMLS_CC);
+ CALCULATE_LITERAL_HASH(tmp_literal);
+
+ /* lowercased constant name */
+ tmp_name = zend_str_tolower_dup(name, name_len);
+ ZVAL_STRINGL(&c, tmp_name, name_len, 0);
+ tmp_literal = zend_add_literal(CG(active_op_array), &c TSRMLS_CC);
+ CALCULATE_LITERAL_HASH(tmp_literal);
+
+ return ret;
+}
+/* }}} */
+
+#define LITERAL_STRINGL(op, str, len, copy) do { \
+ zval _c; \
+ ZVAL_STRINGL(&_c, str, len, copy); \
+ op.constant = zend_add_literal(CG(active_op_array), &_c TSRMLS_CC); \
+ } while (0)
+
+#define LITERAL_LONG(op, val) do { \
+ zval _c; \
+ ZVAL_LONG(&_c, val); \
+ op.constant = zend_add_literal(CG(active_op_array), &_c TSRMLS_CC); \
+ } while (0)
+
+#define LITERAL_LONG_EX(op_array, op, val) do { \
+ zval _c; \
+ ZVAL_LONG(&_c, val); \
+ op.constant = zend_add_literal(op_array, &_c TSRMLS_CC); \
+ } while (0)
+
+#define LITERAL_NULL(op) do { \
+ zval _c; \
+ INIT_ZVAL( _c); \
+ op.constant = zend_add_literal(CG(active_op_array), &_c TSRMLS_CC); \
+ } while (0)
+
+static inline zend_bool zend_is_function_or_method_call(const znode *variable) /* {{{ */
+{
+ zend_uint type = variable->EA;
+
+ return ((type & ZEND_PARSED_METHOD_CALL) || (type == ZEND_PARSED_FUNCTION_CALL));
+}
+/* }}} */
void zend_do_binary_op(zend_uchar op, znode *result, const znode *op1, const znode *op2 TSRMLS_DC) /* {{{ */
{
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = op;
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *op1;
- opline->op2 = *op2;
- *result = opline->result;
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, op1);
+ SET_NODE(opline->op2, op2);
+ GET_NODE(result, opline->result);
}
/* }}} */
@@ -307,21 +587,20 @@ void zend_do_unary_op(zend_uchar op, znode *result, const znode *op1 TSRMLS_DC)
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = op;
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *op1;
- *result = opline->result;
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, op1);
+ GET_NODE(result, opline->result);
SET_UNUSED(opline->op2);
}
/* }}} */
-#define MAKE_NOP(opline) { opline->opcode = ZEND_NOP; memset(&opline->result,0,sizeof(znode)); memset(&opline->op1,0,sizeof(znode)); memset(&opline->op2,0,sizeof(znode)); opline->result.op_type=opline->op1.op_type=opline->op2.op_type=IS_UNUSED; }
-
+#define MAKE_NOP(opline) { opline->opcode = ZEND_NOP; memset(&opline->result,0,sizeof(opline->result)); memset(&opline->op1,0,sizeof(opline->op1)); memset(&opline->op2,0,sizeof(opline->op2)); opline->result_type=opline->op1_type=opline->op2_type=IS_UNUSED; }
static void zend_do_op_data(zend_op *data_op, const znode *value TSRMLS_DC) /* {{{ */
{
data_op->opcode = ZEND_OP_DATA;
- data_op->op1 = *value;
+ SET_NODE(data_op->op1, value);
SET_UNUSED(data_op->op2);
}
/* }}} */
@@ -341,18 +620,17 @@ void zend_do_binary_assign_op(zend_uchar op, znode *result, const znode *op1, co
zend_do_op_data(opline, op2 TSRMLS_CC);
SET_UNUSED(opline->result);
- *result = last_op->result;
+ GET_NODE(result, last_op->result);
return;
case ZEND_FETCH_DIM_RW:
last_op->opcode = op;
last_op->extended_value = ZEND_ASSIGN_DIM;
zend_do_op_data(opline, op2 TSRMLS_CC);
- opline->op2.u.var = get_temporary_variable(CG(active_op_array));
- opline->op2.u.EA.type = 0;
- opline->op2.op_type = IS_VAR;
+ opline->op2.var = get_temporary_variable(CG(active_op_array));
+ opline->op2_type = IS_VAR;
SET_UNUSED(opline->result);
- *result = last_op->result;
+ GET_NODE(result,last_op->result);
return;
default:
break;
@@ -360,12 +638,11 @@ void zend_do_binary_assign_op(zend_uchar op, znode *result, const znode *op1, co
}
opline->opcode = op;
- opline->op1 = *op1;
- opline->op2 = *op2;
- opline->result.op_type = IS_VAR;
- opline->result.u.EA.type = 0;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- *result = opline->result;
+ SET_NODE(opline->op1, op1);
+ SET_NODE(opline->op2, op2);
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ GET_NODE(result, opline->result);
}
/* }}} */
@@ -376,18 +653,22 @@ void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar
zend_llist *fetch_list_ptr;
if (varname->op_type == IS_CONST) {
+ ulong hash = 0;
+
if (Z_TYPE(varname->u.constant) != IS_STRING) {
convert_to_string(&varname->u.constant);
+ } else if (IS_INTERNED(Z_STRVAL(varname->u.constant))) {
+ hash = INTERNED_HASH(Z_STRVAL(varname->u.constant));
}
- if (!zend_is_auto_global(varname->u.constant.value.str.val, varname->u.constant.value.str.len TSRMLS_CC) &&
+ if (!zend_is_auto_global_quick(varname->u.constant.value.str.val, varname->u.constant.value.str.len, hash TSRMLS_CC) &&
!(varname->u.constant.value.str.len == (sizeof("this")-1) &&
!memcmp(varname->u.constant.value.str.val, "this", sizeof("this"))) &&
(CG(active_op_array)->last == 0 ||
CG(active_op_array)->opcodes[CG(active_op_array)->last-1].opcode != ZEND_BEGIN_SILENCE)) {
result->op_type = IS_CV;
- result->u.var = lookup_cv(CG(active_op_array), varname->u.constant.value.str.val, varname->u.constant.value.str.len);
- result->u.EA.type = 0;
- varname->u.constant.value.str.val = CG(active_op_array)->vars[result->u.var].name;
+ result->u.op.var = lookup_cv(CG(active_op_array), varname->u.constant.value.str.val, varname->u.constant.value.str.len, hash TSRMLS_CC);
+ varname->u.constant.value.str.val = (char*)CG(active_op_array)->vars[result->u.op.var].name;
+ result->EA = 0;
return;
}
}
@@ -400,17 +681,17 @@ void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar
}
opline_ptr->opcode = op;
- opline_ptr->result.op_type = IS_VAR;
- opline_ptr->result.u.EA.type = 0;
- opline_ptr->result.u.var = get_temporary_variable(CG(active_op_array));
- opline_ptr->op1 = *varname;
- *result = opline_ptr->result;
+ opline_ptr->result_type = IS_VAR;
+ opline_ptr->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline_ptr->op1, varname);
+ GET_NODE(result, opline_ptr->result);
SET_UNUSED(opline_ptr->op2);
+ opline_ptr->extended_value = ZEND_FETCH_LOCAL;
- opline_ptr->op2.u.EA.type = ZEND_FETCH_LOCAL;
- if (varname->op_type == IS_CONST && varname->u.constant.type == IS_STRING) {
- if (zend_is_auto_global(varname->u.constant.value.str.val, varname->u.constant.value.str.len TSRMLS_CC)) {
- opline_ptr->op2.u.EA.type = ZEND_FETCH_GLOBAL;
+ if (varname->op_type == IS_CONST) {
+ CALCULATE_LITERAL_HASH(opline_ptr->op1.constant);
+ if (zend_is_auto_global_quick(varname->u.constant.value.str.val, varname->u.constant.value.str.len, Z_HASH_P(&CONSTANT(opline_ptr->op1.constant)) TSRMLS_CC)) {
+ opline_ptr->extended_value = ZEND_FETCH_GLOBAL;
}
}
@@ -436,48 +717,72 @@ void zend_do_fetch_static_member(znode *result, znode *class_name TSRMLS_DC) /*
zend_op *opline_ptr;
zend_op opline;
- zend_do_fetch_class(&class_node, class_name TSRMLS_CC);
+ if (class_name->op_type == IS_CONST &&
+ ZEND_FETCH_CLASS_DEFAULT == zend_get_class_fetch_type(Z_STRVAL(class_name->u.constant), Z_STRLEN(class_name->u.constant))) {
+ zend_resolve_class_name(class_name, ZEND_FETCH_CLASS_GLOBAL, 1 TSRMLS_CC);
+ class_node = *class_name;
+ } else {
+ zend_do_fetch_class(&class_node, class_name TSRMLS_CC);
+ }
zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr);
if (result->op_type == IS_CV) {
init_op(&opline TSRMLS_CC);
opline.opcode = ZEND_FETCH_W;
- opline.result.op_type = IS_VAR;
- opline.result.u.EA.type = 0;
- opline.result.u.var = get_temporary_variable(CG(active_op_array));
- opline.op1.op_type = IS_CONST;
- opline.op1.u.constant.type = IS_STRING;
- opline.op1.u.constant.value.str.val = estrdup(CG(active_op_array)->vars[result->u.var].name);
- opline.op1.u.constant.value.str.len = CG(active_op_array)->vars[result->u.var].name_len;
- SET_UNUSED(opline.op2);
- opline.op2 = class_node;
- opline.op2.u.EA.type = ZEND_FETCH_STATIC_MEMBER;
- *result = opline.result;
+ opline.result_type = IS_VAR;
+ opline.result.var = get_temporary_variable(CG(active_op_array));
+ opline.op1_type = IS_CONST;
+ LITERAL_STRINGL(opline.op1, estrdup(CG(active_op_array)->vars[result->u.op.var].name), CG(active_op_array)->vars[result->u.op.var].name_len, 0);
+ CALCULATE_LITERAL_HASH(opline.op1.constant);
+ GET_POLYMORPHIC_CACHE_SLOT(opline.op1.constant);
+ if (class_node.op_type == IS_CONST) {
+ opline.op2_type = IS_CONST;
+ opline.op2.constant =
+ zend_add_class_name_literal(CG(active_op_array), &class_node.u.constant TSRMLS_CC);
+ } else {
+ SET_NODE(opline.op2, &class_node);
+ }
+ GET_NODE(result,opline.result);
+ opline.extended_value |= ZEND_FETCH_STATIC_MEMBER;
+ opline_ptr = &opline;
zend_llist_add_element(fetch_list_ptr, &opline);
} else {
le = fetch_list_ptr->head;
opline_ptr = (zend_op *)le->data;
- if (opline_ptr->opcode != ZEND_FETCH_W && opline_ptr->op1.op_type == IS_CV) {
+ if (opline_ptr->opcode != ZEND_FETCH_W && opline_ptr->op1_type == IS_CV) {
init_op(&opline TSRMLS_CC);
opline.opcode = ZEND_FETCH_W;
- opline.result.op_type = IS_VAR;
- opline.result.u.EA.type = 0;
- opline.result.u.var = get_temporary_variable(CG(active_op_array));
- opline.op1.op_type = IS_CONST;
- opline.op1.u.constant.type = IS_STRING;
- opline.op1.u.constant.value.str.val = estrdup(CG(active_op_array)->vars[opline_ptr->op1.u.var].name);
- opline.op1.u.constant.value.str.len = CG(active_op_array)->vars[opline_ptr->op1.u.var].name_len;
- SET_UNUSED(opline.op2);
- opline.op2 = class_node;
- opline.op2.u.EA.type = ZEND_FETCH_STATIC_MEMBER;
- opline_ptr->op1 = opline.result;
+ opline.result_type = IS_VAR;
+ opline.result.var = get_temporary_variable(CG(active_op_array));
+ opline.op1_type = IS_CONST;
+ LITERAL_STRINGL(opline.op1, estrdup(CG(active_op_array)->vars[opline_ptr->op1.var].name), CG(active_op_array)->vars[opline_ptr->op1.var].name_len, 0);
+ CALCULATE_LITERAL_HASH(opline.op1.constant);
+ GET_POLYMORPHIC_CACHE_SLOT(opline.op1.constant);
+ if (class_node.op_type == IS_CONST) {
+ opline.op2_type = IS_CONST;
+ opline.op2.constant =
+ zend_add_class_name_literal(CG(active_op_array), &class_node.u.constant TSRMLS_CC);
+ } else {
+ SET_NODE(opline.op2, &class_node);
+ }
+ opline.extended_value |= ZEND_FETCH_STATIC_MEMBER;
+ COPY_NODE(opline_ptr->op1, opline.result);
zend_llist_prepend_element(fetch_list_ptr, &opline);
} else {
- opline_ptr->op2 = class_node;
- opline_ptr->op2.u.EA.type = ZEND_FETCH_STATIC_MEMBER;
+ if (opline_ptr->op1_type == IS_CONST) {
+ GET_POLYMORPHIC_CACHE_SLOT(opline_ptr->op1.constant);
+ }
+ if (class_node.op_type == IS_CONST) {
+ opline_ptr->op2_type = IS_CONST;
+ opline_ptr->op2.constant =
+ zend_add_class_name_literal(CG(active_op_array), &class_node.u.constant TSRMLS_CC);
+ } else {
+ SET_NODE(opline_ptr->op2, &class_node);
+ }
+ opline_ptr->extended_value |= ZEND_FETCH_STATIC_MEMBER;
}
}
}
@@ -496,17 +801,39 @@ void fetch_array_dim(znode *result, const znode *parent, const znode *dim TSRMLS
zend_op opline;
zend_llist *fetch_list_ptr;
+ zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr);
+
+ if (zend_is_function_or_method_call(parent)) {
+ init_op(&opline TSRMLS_CC);
+ opline.opcode = ZEND_SEPARATE;
+ SET_NODE(opline.op1, parent);
+ SET_UNUSED(opline.op2);
+ opline.result_type = IS_VAR;
+ opline.result.var = opline.op1.var;
+ zend_llist_add_element(fetch_list_ptr, &opline);
+ }
+
init_op(&opline TSRMLS_CC);
opline.opcode = ZEND_FETCH_DIM_W; /* the backpatching routine assumes W */
- opline.result.op_type = IS_VAR;
- opline.result.u.EA.type = 0;
- opline.result.u.var = get_temporary_variable(CG(active_op_array));
- opline.op1 = *parent;
- opline.op2 = *dim;
- opline.extended_value = ZEND_FETCH_STANDARD;
- *result = opline.result;
+ opline.result_type = IS_VAR;
+ opline.result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline.op1, parent);
+ SET_NODE(opline.op2, dim);
+ if (opline.op2_type == IS_CONST && Z_TYPE(CONSTANT(opline.op2.constant)) == IS_STRING) {
+ ulong index;
+ int numeric = 0;
+
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL(CONSTANT(opline.op2.constant)), Z_STRLEN(CONSTANT(opline.op2.constant))+1, index, numeric = 1);
+ if (numeric) {
+ zval_dtor(&CONSTANT(opline.op2.constant));
+ ZVAL_LONG(&CONSTANT(opline.op2.constant), index);
+ } else {
+ CALCULATE_LITERAL_HASH(opline.op2.constant);
+ }
+ }
+
+ GET_NODE(result, opline.result);
- zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr);
zend_llist_add_element(fetch_list_ptr, &opline);
}
/* }}} */
@@ -521,12 +848,12 @@ void zend_do_print(znode *result, const znode *arg TSRMLS_DC) /* {{{ */
{
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
opline->opcode = ZEND_PRINT;
- opline->op1 = *arg;
+ SET_NODE(opline->op1, arg);
SET_UNUSED(opline->op2);
- *result = opline->result;
+ GET_NODE(result, opline->result);
}
/* }}} */
@@ -535,7 +862,7 @@ void zend_do_echo(const znode *arg TSRMLS_DC) /* {{{ */
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_ECHO;
- opline->op1 = *arg;
+ SET_NODE(opline->op1, arg);
SET_UNUSED(opline->op2);
}
/* }}} */
@@ -575,10 +902,11 @@ void zend_do_abstract_method(const znode *function_name, znode *modifiers, const
static zend_bool opline_is_fetch_this(const zend_op *opline TSRMLS_DC) /* {{{ */
{
- if ((opline->opcode == ZEND_FETCH_W) && (opline->op1.op_type == IS_CONST)
- && (opline->op1.u.constant.type == IS_STRING)
- && (opline->op1.u.constant.value.str.len == (sizeof("this")-1))
- && !memcmp(opline->op1.u.constant.value.str.val, "this", sizeof("this"))) {
+ if ((opline->opcode == ZEND_FETCH_W) && (opline->op1_type == IS_CONST)
+ && (Z_TYPE(CONSTANT(opline->op1.constant)) == IS_STRING)
+ && (Z_HASH_P(&CONSTANT(opline->op1.constant)) == THIS_HASHVAL)
+ && (Z_STRLEN(CONSTANT(opline->op1.constant)) == (sizeof("this")-1))
+ && !memcmp(Z_STRVAL(CONSTANT(opline->op1.constant)), "this", sizeof("this"))) {
return 1;
} else {
return 0;
@@ -586,7 +914,7 @@ static zend_bool opline_is_fetch_this(const zend_op *opline TSRMLS_DC) /* {{{ */
}
/* }}} */
-void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC) /* {{{ */
+void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC) /* {{{ */
{
int last_op_number;
zend_op *opline;
@@ -599,21 +927,21 @@ void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC
opline = (zend_op *)fetch_list_ptr->head->data;
if (opline->opcode == ZEND_FETCH_DIM_W &&
- opline->op1.op_type == IS_CV &&
- opline->op1.u.var == value->u.var) {
+ opline->op1_type == IS_CV &&
+ opline->op1.var == value->u.op.var) {
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_FETCH_R;
- opline->result.op_type = IS_VAR;
- opline->result.u.EA.type = 0;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1.op_type = IS_CONST;
- ZVAL_STRINGL(&opline->op1.u.constant,
- CG(active_op_array)->vars[value->u.var].name,
- CG(active_op_array)->vars[value->u.var].name_len, 1);
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ opline->op1_type = IS_CONST;
+ LITERAL_STRINGL(opline->op1,
+ CG(active_op_array)->vars[value->u.op.var].name,
+ CG(active_op_array)->vars[value->u.op.var].name_len, 1);
+ CALCULATE_LITERAL_HASH(opline->op1.constant);
SET_UNUSED(opline->op2);
- opline->op2.u.EA.type = ZEND_FETCH_LOCAL;
- value = &opline->result;
+ opline->extended_value = ZEND_FETCH_LOCAL;
+ GET_NODE(value, opline->result);
}
}
}
@@ -624,7 +952,7 @@ void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
if (variable->op_type == IS_CV) {
- if (variable->u.var == CG(active_op_array)->this_var) {
+ if (variable->u.op.var == CG(active_op_array)->this_var) {
zend_error(E_COMPILE_ERROR, "Cannot re-assign $this");
}
} else if (variable->op_type == IS_VAR) {
@@ -635,8 +963,8 @@ void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC
last_op = &CG(active_op_array)->opcodes[last_op_number-n-1];
- if (last_op->result.op_type == IS_VAR &&
- last_op->result.u.var == variable->u.var) {
+ if (last_op->result_type == IS_VAR &&
+ last_op->result.var == variable->u.op.var) {
if (last_op->opcode == ZEND_FETCH_OBJ_W) {
if (n > 0) {
int opline_no = (opline-CG(active_op_array)->opcodes)/sizeof(*opline);
@@ -650,7 +978,7 @@ void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC
last_op->opcode = ZEND_ASSIGN_OBJ;
zend_do_op_data(opline, value TSRMLS_CC);
SET_UNUSED(opline->result);
- *result = last_op->result;
+ GET_NODE(result, last_op->result);
return;
} else if (last_op->opcode == ZEND_FETCH_DIM_W) {
if (n > 0) {
@@ -665,11 +993,10 @@ void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC
}
last_op->opcode = ZEND_ASSIGN_DIM;
zend_do_op_data(opline, value TSRMLS_CC);
- opline->op2.u.var = get_temporary_variable(CG(active_op_array));
- opline->op2.u.EA.type = 0;
- opline->op2.op_type = IS_VAR;
+ opline->op2.var = get_temporary_variable(CG(active_op_array));
+ opline->op2_type = IS_VAR;
SET_UNUSED(opline->result);
- *result = last_op->result;
+ GET_NODE(result, last_op->result);
return;
} else if (opline_is_fetch_this(last_op TSRMLS_CC)) {
zend_error(E_COMPILE_ERROR, "Cannot re-assign $this");
@@ -682,20 +1009,11 @@ void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC
}
opline->opcode = ZEND_ASSIGN;
- opline->op1 = *variable;
- opline->op2 = *value;
- opline->result.op_type = IS_VAR;
- opline->result.u.EA.type = 0;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- *result = opline->result;
-}
-/* }}} */
-
-static inline zend_bool zend_is_function_or_method_call(const znode *variable) /* {{{ */
-{
- zend_uint type = variable->u.EA.type;
-
- return ((type & ZEND_PARSED_METHOD_CALL) || (type == ZEND_PARSED_FUNCTION_CALL));
+ SET_NODE(opline->op1, variable);
+ SET_NODE(opline->op2, value);
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ GET_NODE(result, opline->result);
}
/* }}} */
@@ -704,7 +1022,7 @@ void zend_do_assign_ref(znode *result, const znode *lvar, const znode *rvar TSRM
zend_op *opline;
if (lvar->op_type == IS_CV) {
- if (lvar->u.var == CG(active_op_array)->this_var) {
+ if (lvar->u.op.var == CG(active_op_array)->this_var) {
zend_error(E_COMPILE_ERROR, "Cannot re-assign $this");
}
} else if (lvar->op_type == IS_VAR) {
@@ -722,22 +1040,20 @@ void zend_do_assign_ref(znode *result, const znode *lvar, const znode *rvar TSRM
opline->opcode = ZEND_ASSIGN_REF;
if (zend_is_function_or_method_call(rvar)) {
opline->extended_value = ZEND_RETURNS_FUNCTION;
- } else if (rvar->u.EA.type & ZEND_PARSED_NEW) {
+ } else if (rvar->EA & ZEND_PARSED_NEW) {
opline->extended_value = ZEND_RETURNS_NEW;
} else {
opline->extended_value = 0;
}
if (result) {
- opline->result.op_type = IS_VAR;
- opline->result.u.EA.type = 0;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- *result = opline->result;
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ GET_NODE(result, opline->result);
} else {
- /* SET_UNUSED(opline->result); */
- opline->result.u.EA.type |= EXT_TYPE_UNUSED;
+ opline->result_type = IS_UNUSED | EXT_TYPE_UNUSED;
}
- opline->op1 = *lvar;
- opline->op2 = *rvar;
+ SET_NODE(opline->op1, lvar);
+ SET_NODE(opline->op2, rvar);
}
/* }}} */
@@ -746,8 +1062,8 @@ static inline void do_begin_loop(TSRMLS_D) /* {{{ */
zend_brk_cont_element *brk_cont_element;
int parent;
- parent = CG(active_op_array)->current_brk_cont;
- CG(active_op_array)->current_brk_cont = CG(active_op_array)->last_brk_cont;
+ parent = CG(context).current_brk_cont;
+ CG(context).current_brk_cont = CG(active_op_array)->last_brk_cont;
brk_cont_element = get_next_brk_cont_element(CG(active_op_array));
brk_cont_element->start = get_next_op_number(CG(active_op_array));
brk_cont_element->parent = parent;
@@ -760,11 +1076,11 @@ static inline void do_end_loop(int cont_addr, int has_loop_var TSRMLS_DC) /* {{{
/* The start fileld is used to free temporary variables in case of exceptions.
* We won't try to free something of we don't have loop variable.
*/
- CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].start = -1;
+ CG(active_op_array)->brk_cont_array[CG(context).current_brk_cont].start = -1;
}
- CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].cont = cont_addr;
- CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].brk = get_next_op_number(CG(active_op_array));
- CG(active_op_array)->current_brk_cont = CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].parent;
+ CG(active_op_array)->brk_cont_array[CG(context).current_brk_cont].cont = cont_addr;
+ CG(active_op_array)->brk_cont_array[CG(context).current_brk_cont].brk = get_next_op_number(CG(active_op_array));
+ CG(context).current_brk_cont = CG(active_op_array)->brk_cont_array[CG(context).current_brk_cont].parent;
}
/* }}} */
@@ -774,8 +1090,8 @@ void zend_do_while_cond(const znode *expr, znode *close_bracket_token TSRMLS_DC)
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_JMPZ;
- opline->op1 = *expr;
- close_bracket_token->u.opline_num = while_cond_op_number;
+ SET_NODE(opline->op1, expr);
+ close_bracket_token->u.op.opline_num = while_cond_op_number;
SET_UNUSED(opline->op2);
do_begin_loop(TSRMLS_C);
@@ -789,14 +1105,14 @@ void zend_do_while_end(const znode *while_token, const znode *close_bracket_toke
/* add unconditional jump */
opline->opcode = ZEND_JMP;
- opline->op1.u.opline_num = while_token->u.opline_num;
+ opline->op1.opline_num = while_token->u.op.opline_num;
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
/* update while's conditional jmp */
- CG(active_op_array)->opcodes[close_bracket_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[close_bracket_token->u.op.opline_num].op2.opline_num = get_next_op_number(CG(active_op_array));
- do_end_loop(while_token->u.opline_num, 0 TSRMLS_CC);
+ do_end_loop(while_token->u.op.opline_num, 0 TSRMLS_CC);
DEC_BPC(CG(active_op_array));
}
@@ -808,8 +1124,8 @@ void zend_do_for_cond(const znode *expr, znode *second_semicolon_token TSRMLS_DC
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_JMPZNZ;
- opline->op1 = *expr; /* the conditional expression */
- second_semicolon_token->u.opline_num = for_cond_op_number;
+ SET_NODE(opline->op1, expr); /* the conditional expression */
+ second_semicolon_token->u.op.opline_num = for_cond_op_number;
SET_UNUSED(opline->op2);
}
/* }}} */
@@ -819,8 +1135,8 @@ void zend_do_for_before_statement(const znode *cond_start, const znode *second_s
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_JMP;
- opline->op1.u.opline_num = cond_start->u.opline_num;
- CG(active_op_array)->opcodes[second_semicolon_token->u.opline_num].extended_value = get_next_op_number(CG(active_op_array));
+ opline->op1.opline_num = cond_start->u.op.opline_num;
+ CG(active_op_array)->opcodes[second_semicolon_token->u.op.opline_num].extended_value = get_next_op_number(CG(active_op_array));
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
@@ -835,12 +1151,12 @@ void zend_do_for_end(const znode *second_semicolon_token TSRMLS_DC) /* {{{ */
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_JMP;
- opline->op1.u.opline_num = second_semicolon_token->u.opline_num+1;
- CG(active_op_array)->opcodes[second_semicolon_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
+ opline->op1.opline_num = second_semicolon_token->u.op.opline_num+1;
+ CG(active_op_array)->opcodes[second_semicolon_token->u.op.opline_num].op2.opline_num = get_next_op_number(CG(active_op_array));
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
- do_end_loop(second_semicolon_token->u.opline_num+1, 0 TSRMLS_CC);
+ do_end_loop(second_semicolon_token->u.op.opline_num+1, 0 TSRMLS_CC);
DEC_BPC(CG(active_op_array));
}
@@ -856,22 +1172,20 @@ void zend_do_pre_incdec(znode *result, const znode *op1, zend_uchar op TSRMLS_DC
if (last_op->opcode == ZEND_FETCH_OBJ_RW) {
last_op->opcode = (op==ZEND_PRE_INC)?ZEND_PRE_INC_OBJ:ZEND_PRE_DEC_OBJ;
- last_op->result.op_type = IS_VAR;
- last_op->result.u.EA.type = 0;
- last_op->result.u.var = get_temporary_variable(CG(active_op_array));
- *result = last_op->result;
+ last_op->result_type = IS_VAR;
+ last_op->result.var = get_temporary_variable(CG(active_op_array));
+ GET_NODE(result, last_op->result);
return;
}
}
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = op;
- opline->op1 = *op1;
+ SET_NODE(opline->op1, op1);
SET_UNUSED(opline->op2);
- opline->result.op_type = IS_VAR;
- opline->result.u.EA.type = 0;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- *result = opline->result;
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ GET_NODE(result, opline->result);
}
/* }}} */
@@ -885,20 +1199,20 @@ void zend_do_post_incdec(znode *result, const znode *op1, zend_uchar op TSRMLS_D
if (last_op->opcode == ZEND_FETCH_OBJ_RW) {
last_op->opcode = (op==ZEND_POST_INC)?ZEND_POST_INC_OBJ:ZEND_POST_DEC_OBJ;
- last_op->result.op_type = IS_TMP_VAR;
- last_op->result.u.var = get_temporary_variable(CG(active_op_array));
- *result = last_op->result;
+ last_op->result_type = IS_TMP_VAR;
+ last_op->result.var = get_temporary_variable(CG(active_op_array));
+ GET_NODE(result, last_op->result);
return;
}
}
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = op;
- opline->op1 = *op1;
+ SET_NODE(opline->op1, op1);
SET_UNUSED(opline->op2);
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- *result = opline->result;
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ GET_NODE(result, opline->result);
}
/* }}} */
@@ -908,8 +1222,8 @@ void zend_do_if_cond(const znode *cond, znode *closing_bracket_token TSRMLS_DC)
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_JMPZ;
- opline->op1 = *cond;
- closing_bracket_token->u.opline_num = if_cond_op_number;
+ SET_NODE(opline->op1, cond);
+ closing_bracket_token->u.op.opline_num = if_cond_op_number;
SET_UNUSED(opline->op2);
INC_BPC(CG(active_op_array));
}
@@ -932,7 +1246,7 @@ void zend_do_if_after_statement(const znode *closing_bracket_token, unsigned cha
zend_stack_top(&CG(bp_stack), (void **) &jmp_list_ptr);
zend_llist_add_element(jmp_list_ptr, &if_end_op_number);
- CG(active_op_array)->opcodes[closing_bracket_token->u.opline_num].op2.u.opline_num = if_end_op_number+1;
+ CG(active_op_array)->opcodes[closing_bracket_token->u.op.opline_num].op2.opline_num = if_end_op_number+1;
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
}
@@ -946,7 +1260,7 @@ void zend_do_if_end(TSRMLS_D) /* {{{ */
zend_stack_top(&CG(bp_stack), (void **) &jmp_list_ptr);
for (le=jmp_list_ptr->head; le; le = le->next) {
- CG(active_op_array)->opcodes[*((int *) le->data)].op1.u.opline_num = next_op_number;
+ CG(active_op_array)->opcodes[*((int *) le->data)].op1.opline_num = next_op_number;
}
zend_llist_destroy(jmp_list_ptr);
zend_stack_del_top(&CG(bp_stack));
@@ -956,7 +1270,7 @@ void zend_do_if_end(TSRMLS_D) /* {{{ */
void zend_check_writable_variable(const znode *variable) /* {{{ */
{
- zend_uint type = variable->u.EA.type;
+ zend_uint type = variable->EA;
if (type & ZEND_PARSED_METHOD_CALL) {
zend_error(E_COMPILE_ERROR, "Can't use method return value in write context");
@@ -997,35 +1311,44 @@ void zend_do_end_variable_parse(znode *variable, int type, int arg_offset TSRMLS
if (CG(active_op_array)->last == 0 ||
CG(active_op_array)->opcodes[CG(active_op_array)->last-1].opcode != ZEND_BEGIN_SILENCE) {
- this_var = opline_ptr->result.u.var;
+ this_var = opline_ptr->result.var;
if (CG(active_op_array)->this_var == -1) {
- CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), Z_STRVAL(opline_ptr->op1.u.constant), Z_STRLEN(opline_ptr->op1.u.constant));
+ CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), Z_STRVAL(CONSTANT(opline_ptr->op1.constant)), Z_STRLEN(CONSTANT(opline_ptr->op1.constant)), Z_HASH_P(&CONSTANT(opline_ptr->op1.constant)) TSRMLS_CC);
+ Z_TYPE(CONSTANT(opline_ptr->op1.constant)) = IS_NULL;
} else {
- efree(Z_STRVAL(opline_ptr->op1.u.constant));
+ zend_del_literal(CG(active_op_array), opline_ptr->op1.constant);
}
le = le->next;
if (variable->op_type == IS_VAR &&
- variable->u.var == this_var) {
+ variable->u.op.var == this_var) {
variable->op_type = IS_CV;
- variable->u.var = CG(active_op_array)->this_var;
+ variable->u.op.var = CG(active_op_array)->this_var;
}
} else if (CG(active_op_array)->this_var == -1) {
- CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), estrndup("this", sizeof("this")-1), sizeof("this")-1);
+ CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), estrndup("this", sizeof("this")-1), sizeof("this")-1, THIS_HASHVAL TSRMLS_CC);
}
}
while (le) {
opline_ptr = (zend_op *)le->data;
+ if (opline_ptr->opcode == ZEND_SEPARATE) {
+ if (type != BP_VAR_R && type != BP_VAR_IS) {
+ opline = get_next_op(CG(active_op_array) TSRMLS_CC);
+ memcpy(opline, opline_ptr, sizeof(zend_op));
+ }
+ le = le->next;
+ continue;
+ }
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
memcpy(opline, opline_ptr, sizeof(zend_op));
- if (opline->op1.op_type == IS_VAR &&
- opline->op1.u.var == this_var) {
- opline->op1.op_type = IS_CV;
- opline->op1.u.var = CG(active_op_array)->this_var;
+ if (opline->op1_type == IS_VAR &&
+ opline->op1.var == this_var) {
+ opline->op1_type = IS_CV;
+ opline->op1.var = CG(active_op_array)->this_var;
}
switch (type) {
case BP_VAR_R:
- if (opline->opcode == ZEND_FETCH_DIM_W && opline->op2.op_type == IS_UNUSED) {
+ if (opline->opcode == ZEND_FETCH_DIM_W && opline->op2_type == IS_UNUSED) {
zend_error(E_COMPILE_ERROR, "Cannot use [] for reading");
}
opline->opcode -= 3;
@@ -1036,17 +1359,17 @@ void zend_do_end_variable_parse(znode *variable, int type, int arg_offset TSRMLS
opline->opcode += 3;
break;
case BP_VAR_IS:
- if (opline->opcode == ZEND_FETCH_DIM_W && opline->op2.op_type == IS_UNUSED) {
+ if (opline->opcode == ZEND_FETCH_DIM_W && opline->op2_type == IS_UNUSED) {
zend_error(E_COMPILE_ERROR, "Cannot use [] for reading");
}
opline->opcode += 6; /* 3+3 */
break;
case BP_VAR_FUNC_ARG:
opline->opcode += 9; /* 3+3+3 */
- opline->extended_value = arg_offset;
+ opline->extended_value |= arg_offset;
break;
case BP_VAR_UNSET:
- if (opline->opcode == ZEND_FETCH_DIM_W && opline->op2.op_type == IS_UNUSED) {
+ if (opline->opcode == ZEND_FETCH_DIM_W && opline->op2_type == IS_UNUSED) {
zend_error(E_COMPILE_ERROR, "Cannot use [] for unsetting");
}
opline->opcode += 12; /* 3+3+3+3 */
@@ -1055,7 +1378,7 @@ void zend_do_end_variable_parse(znode *variable, int type, int arg_offset TSRMLS
le = le->next;
}
if (opline && type == BP_VAR_W && arg_offset) {
- opline->extended_value = ZEND_FETCH_MAKE_REF;
+ opline->extended_value |= ZEND_FETCH_MAKE_REF;
}
}
zend_llist_destroy(fetch_list_ptr);
@@ -1084,15 +1407,15 @@ void zend_do_add_string(znode *result, const znode *op1, znode *op2 TSRMLS_DC) /
}
if (op1) {
- opline->op1 = *op1;
- opline->result = *op1;
+ SET_NODE(opline->op1, op1);
+ SET_NODE(opline->result, op1);
} else {
SET_UNUSED(opline->op1);
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
}
- opline->op2 = *op2;
- *result = opline->result;
+ SET_NODE(opline->op2, op2);
+ GET_NODE(result, opline->result);
}
/* }}} */
@@ -1103,15 +1426,15 @@ void zend_do_add_variable(znode *result, const znode *op1, const znode *op2 TSRM
opline->opcode = ZEND_ADD_VAR;
if (op1) {
- opline->op1 = *op1;
- opline->result = *op1;
+ SET_NODE(opline->op1, op1);
+ SET_NODE(opline->result, op1);
} else {
SET_UNUSED(opline->op1);
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
}
- opline->op2 = *op2;
- *result = opline->result;
+ SET_NODE(opline->op2, op2);
+ GET_NODE(result, opline->result);
}
/* }}} */
@@ -1121,7 +1444,7 @@ void zend_do_free(znode *op1 TSRMLS_DC) /* {{{ */
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_FREE;
- opline->op1 = *op1;
+ SET_NODE(opline->op1, op1);
SET_UNUSED(opline->op2);
} else if (op1->op_type==IS_VAR) {
zend_op *opline = &CG(active_op_array)->opcodes[CG(active_op_array)->last-1];
@@ -1129,23 +1452,36 @@ void zend_do_free(znode *op1 TSRMLS_DC) /* {{{ */
while (opline->opcode == ZEND_END_SILENCE || opline->opcode == ZEND_EXT_FCALL_END || opline->opcode == ZEND_OP_DATA) {
opline--;
}
- if (opline->result.op_type == IS_VAR
- && opline->result.u.var == op1->u.var) {
- opline->result.u.EA.type |= EXT_TYPE_UNUSED;
+ if (opline->result_type == IS_VAR
+ && opline->result.var == op1->u.op.var) {
+ if (opline->opcode == ZEND_FETCH_R ||
+ opline->opcode == ZEND_FETCH_DIM_R ||
+ opline->opcode == ZEND_FETCH_OBJ_R ||
+ opline->opcode == ZEND_QM_ASSIGN_VAR) {
+ /* It's very rare and useless case. It's better to use
+ additional FREE opcode and simplify the FETCH handlers
+ their selves */
+ opline = get_next_op(CG(active_op_array) TSRMLS_CC);
+ opline->opcode = ZEND_FREE;
+ SET_NODE(opline->op1, op1);
+ SET_UNUSED(opline->op2);
+ } else {
+ opline->result_type |= EXT_TYPE_UNUSED;
+ }
} else {
while (opline>CG(active_op_array)->opcodes) {
if (opline->opcode == ZEND_FETCH_DIM_R
- && opline->op1.op_type == IS_VAR
- && opline->op1.u.var == op1->u.var) {
+ && opline->op1_type == IS_VAR
+ && opline->op1.var == op1->u.op.var) {
/* This should the end of a list() construct
* Mark its result as unused
*/
opline->extended_value = ZEND_FETCH_STANDARD;
break;
- } else if (opline->result.op_type==IS_VAR
- && opline->result.u.var == op1->u.var) {
+ } else if (opline->result_type==IS_VAR
+ && opline->result.var == op1->u.op.var) {
if (opline->opcode == ZEND_NEW) {
- opline->result.u.EA.type |= EXT_TYPE_UNUSED;
+ opline->result_type |= EXT_TYPE_UNUSED;
}
break;
}
@@ -1188,9 +1524,9 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
zend_op_array op_array;
char *name = function_name->u.constant.value.str.val;
int name_len = function_name->u.constant.value.str.len;
- int function_begin_line = function_token->u.opline_num;
+ int function_begin_line = function_token->u.op.opline_num;
zend_uint fn_flags;
- char *lcname;
+ const char *lcname;
zend_bool orig_interactive;
ALLOCA_FLAG(use_heap)
@@ -1210,7 +1546,6 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
}
function_token->u.op_array = CG(active_op_array);
- lcname = zend_str_tolower_dup(name, name_len);
orig_interactive = CG(interactive);
CG(interactive) = 0;
@@ -1218,9 +1553,10 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
CG(interactive) = orig_interactive;
op_array.function_name = name;
- op_array.return_reference = return_reference;
+ if (return_reference) {
+ op_array.fn_flags |= ZEND_ACC_RETURN_REFERENCE;
+ }
op_array.fn_flags |= fn_flags;
- op_array.pass_rest_by_reference = 0;
op_array.scope = is_method?CG(active_class_entry):NULL;
op_array.prototype = NULL;
@@ -1228,10 +1564,22 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
op_array.line_start = zend_get_compiled_lineno(TSRMLS_C);
if (is_method) {
- if (zend_hash_add(&CG(active_class_entry)->function_table, lcname, name_len+1, &op_array, sizeof(zend_op_array), (void **) &CG(active_op_array)) == FAILURE) {
+ int result;
+
+ lcname = zend_new_interned_string(zend_str_tolower_dup(name, name_len), name_len + 1, 1 TSRMLS_CC);
+
+ if (IS_INTERNED(lcname)) {
+ result = zend_hash_quick_add(&CG(active_class_entry)->function_table, lcname, name_len+1, INTERNED_HASH(lcname), &op_array, sizeof(zend_op_array), (void **) &CG(active_op_array));
+ } else {
+ result = zend_hash_add(&CG(active_class_entry)->function_table, lcname, name_len+1, &op_array, sizeof(zend_op_array), (void **) &CG(active_op_array));
+ }
+ if (result == FAILURE) {
zend_error(E_COMPILE_ERROR, "Cannot redeclare %s::%s()", CG(active_class_entry)->name, name);
}
+ zend_stack_push(&CG(context_stack), (void *) &CG(context), sizeof(CG(context)));
+ zend_init_compiler_context(TSRMLS_C);
+
if (fn_flags & ZEND_ACC_ABSTRACT) {
CG(active_class_entry)->ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
}
@@ -1277,7 +1625,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
zend_str_tolower_copy(class_lcname, CG(active_class_entry)->name, CG(active_class_entry)->name_length);
/* Improve after RC: cache the lowercase class name */
- if ((CG(active_class_entry)->name_length == name_len) && (!memcmp(class_lcname, lcname, name_len))) {
+ if ((CG(active_class_entry)->name_length == name_len) && ((CG(active_class_entry)->ce_flags & ZEND_ACC_TRAIT) != ZEND_ACC_TRAIT) && (!memcmp(class_lcname, lcname, name_len))) {
if (!CG(active_class_entry)->constructor) {
CG(active_class_entry)->constructor = (zend_function *) CG(active_op_array);
}
@@ -1331,9 +1679,10 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
free_alloca(class_lcname, use_heap);
}
- efree(lcname);
+ str_efree(lcname);
} else {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
+ zval key;
if (CG(current_namespace)) {
/* Prefix function name with current namespcae name */
@@ -1343,21 +1692,24 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
zval_copy_ctor(&tmp.u.constant);
zend_do_build_namespace_name(&tmp, &tmp, function_name TSRMLS_CC);
op_array.function_name = Z_STRVAL(tmp.u.constant);
- efree(lcname);
name_len = Z_STRLEN(tmp.u.constant);
lcname = zend_str_tolower_dup(Z_STRVAL(tmp.u.constant), name_len);
+ } else {
+ lcname = zend_str_tolower_dup(name, name_len);
}
opline->opcode = ZEND_DECLARE_FUNCTION;
- opline->op1.op_type = IS_CONST;
- build_runtime_defined_function_key(&opline->op1.u.constant, lcname, name_len TSRMLS_CC);
- opline->op2.op_type = IS_CONST;
- opline->op2.u.constant.type = IS_STRING;
- opline->op2.u.constant.value.str.val = lcname;
- opline->op2.u.constant.value.str.len = name_len;
- Z_SET_REFCOUNT(opline->op2.u.constant, 1);
+ opline->op1_type = IS_CONST;
+ build_runtime_defined_function_key(&key, lcname, name_len TSRMLS_CC);
+ opline->op1.constant = zend_add_literal(CG(active_op_array), &key TSRMLS_CC);
+ Z_HASH_P(&CONSTANT(opline->op1.constant)) = zend_hash_func(Z_STRVAL(CONSTANT(opline->op1.constant)), Z_STRLEN(CONSTANT(opline->op1.constant)));
+ opline->op2_type = IS_CONST;
+ LITERAL_STRINGL(opline->op2, lcname, name_len, 0);
+ CALCULATE_LITERAL_HASH(opline->op2.constant);
opline->extended_value = ZEND_DECLARE_FUNCTION;
- zend_hash_update(CG(function_table), opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, &op_array, sizeof(zend_op_array), (void **) &CG(active_op_array));
+ zend_hash_quick_update(CG(function_table), Z_STRVAL(key), Z_STRLEN(key), Z_HASH_P(&CONSTANT(opline->op1.constant)), &op_array, sizeof(zend_op_array), (void **) &CG(active_op_array));
+ zend_stack_push(&CG(context_stack), (void *) &CG(context), sizeof(CG(context)));
+ zend_init_compiler_context(TSRMLS_C);
}
if (CG(compiler_options) & ZEND_COMPILE_EXTENDED_INFO) {
@@ -1383,8 +1735,8 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
/* Foreach stack separator */
zend_op dummy_opline;
- dummy_opline.result.op_type = IS_UNUSED;
- dummy_opline.op1.op_type = IS_UNUSED;
+ dummy_opline.result_type = IS_UNUSED;
+ dummy_opline.op1_type = IS_UNUSED;
zend_stack_push(&CG(foreach_copy_stack), (void *) &dummy_opline, sizeof(zend_op));
}
@@ -1396,13 +1748,10 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
CG(doc_comment) = NULL;
CG(doc_comment_len) = 0;
}
-
- zend_stack_push(&CG(labels_stack), (void *) &CG(labels), sizeof(HashTable*));
- CG(labels) = NULL;
}
/* }}} */
-void zend_do_begin_lambda_function_declaration(znode *result, znode *function_token, int return_reference TSRMLS_DC) /* {{{ */
+void zend_do_begin_lambda_function_declaration(znode *result, znode *function_token, int return_reference, int is_static TSRMLS_DC) /* {{{ */
{
znode function_name;
zend_op_array *current_op_array = CG(active_op_array);
@@ -1415,13 +1764,16 @@ void zend_do_begin_lambda_function_declaration(znode *result, znode *function_to
zend_do_begin_function_declaration(function_token, &function_name, 0, return_reference, NULL TSRMLS_CC);
result->op_type = IS_TMP_VAR;
- result->u.var = get_temporary_variable(current_op_array);
+ result->u.op.var = get_temporary_variable(current_op_array);
current_op = &current_op_array->opcodes[current_op_number];
current_op->opcode = ZEND_DECLARE_LAMBDA_FUNCTION;
- zval_dtor(&current_op->op2.u.constant);
- ZVAL_LONG(&current_op->op2.u.constant, zend_hash_func(Z_STRVAL(current_op->op1.u.constant), Z_STRLEN(current_op->op1.u.constant)));
- current_op->result = *result;
+ zend_del_literal(current_op_array, current_op->op2.constant);
+ SET_UNUSED(current_op->op2);
+ SET_NODE(current_op->result, result);
+ if (is_static) {
+ CG(active_op_array)->fn_flags |= ZEND_ACC_STATIC;
+ }
CG(active_op_array)->fn_flags |= ZEND_ACC_CLOSURE;
}
/* }}} */
@@ -1470,10 +1822,11 @@ void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC) /*
}
/* }}} */
-void zend_do_receive_arg(zend_uchar op, const znode *var, const znode *offset, const znode *initialization, znode *class_type, const znode *varname, zend_uchar pass_by_reference TSRMLS_DC) /* {{{ */
+void zend_do_receive_arg(zend_uchar op, znode *varname, const znode *offset, const znode *initialization, znode *class_type, zend_uchar pass_by_reference TSRMLS_DC) /* {{{ */
{
zend_op *opline;
zend_arg_info *cur_arg_info;
+ znode var;
if (class_type->op_type == IS_CONST &&
Z_TYPE(class_type->u.constant) == IS_STRING &&
@@ -1484,35 +1837,40 @@ void zend_do_receive_arg(zend_uchar op, const znode *var, const znode *offset, c
return;
}
- if (var->op_type == IS_CV &&
- var->u.var == CG(active_op_array)->this_var &&
- (CG(active_op_array)->fn_flags & ZEND_ACC_STATIC) == 0) {
- zend_error(E_COMPILE_ERROR, "Cannot re-assign $this");
- } else if (var->op_type == IS_VAR &&
- CG(active_op_array)->scope &&
- ((CG(active_op_array)->fn_flags & ZEND_ACC_STATIC) == 0) &&
- (Z_TYPE(varname->u.constant) == IS_STRING) &&
- (Z_STRLEN(varname->u.constant) == sizeof("this")-1) &&
- (memcmp(Z_STRVAL(varname->u.constant), "this", sizeof("this")) == 0)) {
- zend_error(E_COMPILE_ERROR, "Cannot re-assign $this");
+ if (zend_is_auto_global_quick(Z_STRVAL(varname->u.constant), Z_STRLEN(varname->u.constant), 0 TSRMLS_CC)) {
+ zend_error(E_COMPILE_ERROR, "Cannot re-assign auto-global variable %s", Z_STRVAL(varname->u.constant));
+ } else {
+ var.op_type = IS_CV;
+ var.u.op.var = lookup_cv(CG(active_op_array), varname->u.constant.value.str.val, varname->u.constant.value.str.len, 0 TSRMLS_CC);
+ Z_STRVAL(varname->u.constant) = (char*)CG(active_op_array)->vars[var.u.op.var].name;
+ var.EA = 0;
+ if (CG(active_op_array)->vars[var.u.op.var].hash_value == THIS_HASHVAL &&
+ Z_STRLEN(varname->u.constant) == sizeof("this")-1 &&
+ !memcmp(Z_STRVAL(varname->u.constant), "this", sizeof("this")-1)) {
+ if (CG(active_op_array)->scope &&
+ (CG(active_op_array)->fn_flags & ZEND_ACC_STATIC) == 0) {
+ zend_error(E_COMPILE_ERROR, "Cannot re-assign $this");
+ }
+ CG(active_op_array)->this_var = var.u.op.var;
+ }
}
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
CG(active_op_array)->num_args++;
opline->opcode = op;
- opline->result = *var;
- opline->op1 = *offset;
+ SET_NODE(opline->result, &var);
+ SET_NODE(opline->op1, offset);
if (op == ZEND_RECV_INIT) {
- opline->op2 = *initialization;
+ SET_NODE(opline->op2, initialization);
} else {
CG(active_op_array)->required_num_args = CG(active_op_array)->num_args;
SET_UNUSED(opline->op2);
}
CG(active_op_array)->arg_info = erealloc(CG(active_op_array)->arg_info, sizeof(zend_arg_info)*(CG(active_op_array)->num_args));
cur_arg_info = &CG(active_op_array)->arg_info[CG(active_op_array)->num_args-1];
- cur_arg_info->name = estrndup(varname->u.constant.value.str.val, varname->u.constant.value.str.len);
+ cur_arg_info->name = zend_new_interned_string(estrndup(varname->u.constant.value.str.val, varname->u.constant.value.str.len), varname->u.constant.value.str.len + 1, 1 TSRMLS_CC);
cur_arg_info->name_len = varname->u.constant.value.str.len;
- cur_arg_info->array_type_hint = 0;
+ cur_arg_info->type_hint = 0;
cur_arg_info->allow_null = 1;
cur_arg_info->pass_by_reference = pass_by_reference;
cur_arg_info->class_name = NULL;
@@ -1520,33 +1878,44 @@ void zend_do_receive_arg(zend_uchar op, const znode *var, const znode *offset, c
if (class_type->op_type != IS_UNUSED) {
cur_arg_info->allow_null = 0;
- if (class_type->u.constant.type == IS_STRING) {
- if (ZEND_FETCH_CLASS_DEFAULT == zend_get_class_fetch_type(Z_STRVAL(class_type->u.constant), Z_STRLEN(class_type->u.constant))) {
- zend_resolve_class_name(class_type, &opline->extended_value, 1 TSRMLS_CC);
- }
- cur_arg_info->class_name = class_type->u.constant.value.str.val;
- cur_arg_info->class_name_len = class_type->u.constant.value.str.len;
- if (op == ZEND_RECV_INIT) {
- if (Z_TYPE(initialization->u.constant) == IS_NULL || (Z_TYPE(initialization->u.constant) == IS_CONSTANT && !strcasecmp(Z_STRVAL(initialization->u.constant), "NULL"))) {
- cur_arg_info->allow_null = 1;
- } else {
- zend_error(E_COMPILE_ERROR, "Default value for parameters with a class type hint can only be NULL");
+
+ if (class_type->u.constant.type != IS_NULL) {
+ if (class_type->u.constant.type == IS_ARRAY) {
+ cur_arg_info->type_hint = IS_ARRAY;
+ if (op == ZEND_RECV_INIT) {
+ if (Z_TYPE(initialization->u.constant) == IS_NULL || (Z_TYPE(initialization->u.constant) == IS_CONSTANT && !strcasecmp(Z_STRVAL(initialization->u.constant), "NULL"))) {
+ cur_arg_info->allow_null = 1;
+ } else if (Z_TYPE(initialization->u.constant) != IS_ARRAY && Z_TYPE(initialization->u.constant) != IS_CONSTANT_ARRAY) {
+ zend_error(E_COMPILE_ERROR, "Default value for parameters with array type hint can only be an array or NULL");
+ }
}
- }
- } else {
- cur_arg_info->array_type_hint = 1;
- cur_arg_info->class_name = NULL;
- cur_arg_info->class_name_len = 0;
- if (op == ZEND_RECV_INIT) {
- if (Z_TYPE(initialization->u.constant) == IS_NULL || (Z_TYPE(initialization->u.constant) == IS_CONSTANT && !strcasecmp(Z_STRVAL(initialization->u.constant), "NULL"))) {
- cur_arg_info->allow_null = 1;
- } else if (Z_TYPE(initialization->u.constant) != IS_ARRAY && Z_TYPE(initialization->u.constant) != IS_CONSTANT_ARRAY) {
- zend_error(E_COMPILE_ERROR, "Default value for parameters with array type hint can only be an array or NULL");
+ } else if (class_type->u.constant.type == IS_CALLABLE) {
+ cur_arg_info->type_hint = IS_CALLABLE;
+ if (op == ZEND_RECV_INIT) {
+ if (Z_TYPE(initialization->u.constant) == IS_NULL || (Z_TYPE(initialization->u.constant) == IS_CONSTANT && !strcasecmp(Z_STRVAL(initialization->u.constant), "NULL"))) {
+ cur_arg_info->allow_null = 1;
+ } else {
+ zend_error(E_COMPILE_ERROR, "Default value for parameters with callable type hint can only be NULL");
+ }
+ }
+ } else {
+ cur_arg_info->type_hint = IS_OBJECT;
+ if (ZEND_FETCH_CLASS_DEFAULT == zend_get_class_fetch_type(Z_STRVAL(class_type->u.constant), Z_STRLEN(class_type->u.constant))) {
+ zend_resolve_class_name(class_type, opline->extended_value, 1 TSRMLS_CC);
+ }
+ Z_STRVAL(class_type->u.constant) = (char*)zend_new_interned_string(class_type->u.constant.value.str.val, class_type->u.constant.value.str.len + 1, 1 TSRMLS_CC);
+ cur_arg_info->class_name = class_type->u.constant.value.str.val;
+ cur_arg_info->class_name_len = class_type->u.constant.value.str.len;
+ if (op == ZEND_RECV_INIT) {
+ if (Z_TYPE(initialization->u.constant) == IS_NULL || (Z_TYPE(initialization->u.constant) == IS_CONSTANT && !strcasecmp(Z_STRVAL(initialization->u.constant), "NULL"))) {
+ cur_arg_info->allow_null = 1;
+ } else {
+ zend_error(E_COMPILE_ERROR, "Default value for parameters with a class type hint can only be NULL");
+ }
}
}
}
}
- opline->result.u.EA.type |= EXT_TYPE_UNUSED;
}
/* }}} */
@@ -1597,28 +1966,39 @@ void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC) /* {{{ */
last_op_number = get_next_op_number(CG(active_op_array))-1;
last_op = &CG(active_op_array)->opcodes[last_op_number];
- if ((last_op->op2.op_type == IS_CONST) && (last_op->op2.u.constant.type == IS_STRING) && (last_op->op2.u.constant.value.str.len == sizeof(ZEND_CLONE_FUNC_NAME)-1)
- && !zend_binary_strcasecmp(last_op->op2.u.constant.value.str.val, last_op->op2.u.constant.value.str.len, ZEND_CLONE_FUNC_NAME, sizeof(ZEND_CLONE_FUNC_NAME)-1)) {
+ if ((last_op->op2_type == IS_CONST) && (Z_TYPE(CONSTANT(last_op->op2.constant)) == IS_STRING) && (Z_STRLEN(CONSTANT(last_op->op2.constant)) == sizeof(ZEND_CLONE_FUNC_NAME)-1)
+ && !zend_binary_strcasecmp(Z_STRVAL(CONSTANT(last_op->op2.constant)), Z_STRLEN(CONSTANT(last_op->op2.constant)), ZEND_CLONE_FUNC_NAME, sizeof(ZEND_CLONE_FUNC_NAME)-1)) {
zend_error(E_COMPILE_ERROR, "Cannot call __clone() method on objects - use 'clone $obj' instead");
}
if (last_op->opcode == ZEND_FETCH_OBJ_R) {
+ if (last_op->op2_type == IS_CONST) {
+ zval name;
+ name = CONSTANT(last_op->op2.constant);
+ if (Z_TYPE(name) != IS_STRING) {
+ zend_error(E_COMPILE_ERROR, "Method name must be a string");
+ }
+ if (!IS_INTERNED(Z_STRVAL(name))) {
+ Z_STRVAL(name) = estrndup(Z_STRVAL(name), Z_STRLEN(name));
+ }
+ FREE_POLYMORPHIC_CACHE_SLOT(last_op->op2.constant);
+ last_op->op2.constant =
+ zend_add_func_name_literal(CG(active_op_array), &name TSRMLS_CC);
+ GET_POLYMORPHIC_CACHE_SLOT(last_op->op2.constant);
+ }
last_op->opcode = ZEND_INIT_METHOD_CALL;
SET_UNUSED(last_op->result);
Z_LVAL(left_bracket->u.constant) = ZEND_INIT_FCALL_BY_NAME;
} else {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_INIT_FCALL_BY_NAME;
- opline->op2 = *left_bracket;
- if (opline->op2.op_type == IS_CONST) {
- opline->op1.op_type = IS_CONST;
- Z_TYPE(opline->op1.u.constant) = IS_STRING;
- Z_STRVAL(opline->op1.u.constant) = zend_str_tolower_dup(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant));
- Z_STRLEN(opline->op1.u.constant) = Z_STRLEN(opline->op2.u.constant);
- opline->extended_value = zend_hash_func(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant) + 1);
+ SET_UNUSED(opline->op1);
+ if (left_bracket->op_type == IS_CONST) {
+ opline->op2_type = IS_CONST;
+ opline->op2.constant = zend_add_func_name_literal(CG(active_op_array), &left_bracket->u.constant TSRMLS_CC);
+ GET_CACHE_SLOT(opline->op2.constant);
} else {
- opline->extended_value = 0;
- SET_UNUSED(opline->op1);
+ SET_NODE(opline->op2, left_bracket);
}
}
@@ -1632,60 +2012,37 @@ void zend_do_clone(znode *result, const znode *expr TSRMLS_DC) /* {{{ */
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_CLONE;
- opline->op1 = *expr;
+ SET_NODE(opline->op1, expr);
SET_UNUSED(opline->op2);
- opline->result.op_type = IS_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- *result = opline->result;
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ GET_NODE(result, opline->result);
}
/* }}} */
void zend_do_begin_dynamic_function_call(znode *function_name, int ns_call TSRMLS_DC) /* {{{ */
{
unsigned char *ptr = NULL;
- zend_op *opline, *opline2;
+ zend_op *opline;
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
if (ns_call) {
- char *slash;
- int prefix_len, name_len;
/* In run-time PHP will check for function with full name and
internal function with short name */
opline->opcode = ZEND_INIT_NS_FCALL_BY_NAME;
- opline->op2 = *function_name;
- opline->extended_value = 0;
- opline->op1.op_type = IS_CONST;
- Z_TYPE(opline->op1.u.constant) = IS_STRING;
- Z_STRVAL(opline->op1.u.constant) = zend_str_tolower_dup(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant));
- Z_STRLEN(opline->op1.u.constant) = Z_STRLEN(opline->op2.u.constant);
- opline->extended_value = zend_hash_func(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant) + 1);
- slash = zend_memrchr(Z_STRVAL(opline->op1.u.constant), '\\', Z_STRLEN(opline->op1.u.constant));
- prefix_len = slash-Z_STRVAL(opline->op1.u.constant)+1;
- name_len = Z_STRLEN(opline->op1.u.constant)-prefix_len;
- opline2 = get_next_op(CG(active_op_array) TSRMLS_CC);
- opline2->opcode = ZEND_OP_DATA;
- opline2->op1.op_type = IS_CONST;
- Z_TYPE(opline2->op1.u.constant) = IS_LONG;
- if(!slash) {
- zend_error(E_CORE_ERROR, "Namespaced name %s should contain slash", Z_STRVAL(opline->op1.u.constant));
- }
- /* this is the length of namespace prefix */
- Z_LVAL(opline2->op1.u.constant) = prefix_len;
- /* this is the hash of the non-prefixed part, lowercased */
- opline2->extended_value = zend_hash_func(slash+1, name_len+1);
- SET_UNUSED(opline2->op2);
+ SET_UNUSED(opline->op1);
+ opline->op2_type = IS_CONST;
+ opline->op2.constant = zend_add_ns_func_name_literal(CG(active_op_array), &function_name->u.constant TSRMLS_CC);
+ GET_CACHE_SLOT(opline->op2.constant);
} else {
opline->opcode = ZEND_INIT_FCALL_BY_NAME;
- opline->op2 = *function_name;
- if (opline->op2.op_type == IS_CONST) {
- opline->op1.op_type = IS_CONST;
- Z_TYPE(opline->op1.u.constant) = IS_STRING;
- Z_STRVAL(opline->op1.u.constant) = zend_str_tolower_dup(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant));
- Z_STRLEN(opline->op1.u.constant) = Z_STRLEN(opline->op2.u.constant);
- opline->extended_value = zend_hash_func(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant) + 1);
+ SET_UNUSED(opline->op1);
+ if (function_name->op_type == IS_CONST) {
+ opline->op2_type = IS_CONST;
+ opline->op2.constant = zend_add_func_name_literal(CG(active_op_array), &function_name->u.constant TSRMLS_CC);
+ GET_CACHE_SLOT(opline->op2.constant);
} else {
- opline->extended_value = 0;
- SET_UNUSED(opline->op1);
+ SET_NODE(opline->op2, function_name);
}
}
@@ -1745,7 +2102,7 @@ void zend_resolve_non_class_name(znode *element_name, zend_bool check_namespace
}
/* }}} */
-void zend_resolve_class_name(znode *class_name, ulong *fetch_type, int check_ns_name TSRMLS_DC) /* {{{ */
+void zend_resolve_class_name(znode *class_name, ulong fetch_type, int check_ns_name TSRMLS_DC) /* {{{ */
{
char *compound;
char *lcname;
@@ -1757,12 +2114,12 @@ void zend_resolve_class_name(znode *class_name, ulong *fetch_type, int check_ns_
if (compound) {
/* This is a compound class name that contains namespace prefix */
if (Z_STRVAL(class_name->u.constant)[0] == '\\') {
- /* The STRING name has "\" prefix */
- Z_STRLEN(class_name->u.constant) -= 1;
- memmove(Z_STRVAL(class_name->u.constant), Z_STRVAL(class_name->u.constant)+1, Z_STRLEN(class_name->u.constant)+1);
+ /* The STRING name has "\" prefix */
+ Z_STRLEN(class_name->u.constant) -= 1;
+ memmove(Z_STRVAL(class_name->u.constant), Z_STRVAL(class_name->u.constant)+1, Z_STRLEN(class_name->u.constant)+1);
Z_STRVAL(class_name->u.constant) = erealloc(
- Z_STRVAL(class_name->u.constant),
- Z_STRLEN(class_name->u.constant) + 1);
+ Z_STRVAL(class_name->u.constant),
+ Z_STRLEN(class_name->u.constant) + 1);
if (ZEND_FETCH_CLASS_DEFAULT != zend_get_class_fetch_type(Z_STRVAL(class_name->u.constant), Z_STRLEN(class_name->u.constant))) {
zend_error(E_COMPILE_ERROR, "'\\%s' is an invalid class name", Z_STRVAL(class_name->u.constant));
@@ -1853,34 +2210,35 @@ void zend_do_fetch_class(znode *result, znode *class_name TSRMLS_DC) /* {{{ */
zval_dtor(&class_name->u.constant);
break;
default:
- zend_resolve_class_name(class_name, &opline->extended_value, 0 TSRMLS_CC);
- opline->op2 = *class_name;
+ zend_resolve_class_name(class_name, opline->extended_value, 0 TSRMLS_CC);
+ opline->op2_type = IS_CONST;
+ opline->op2.constant =
+ zend_add_class_name_literal(CG(active_op_array), &class_name->u.constant TSRMLS_CC);
break;
}
} else {
- opline->op2 = *class_name;
+ SET_NODE(opline->op2, class_name);
}
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->result.u.EA.type = opline->extended_value;
- opline->result.op_type = IS_VAR; /* FIXME: Hack so that INIT_FCALL_BY_NAME still knows this is a class */
- *result = opline->result;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ opline->result_type = IS_VAR; /* FIXME: Hack so that INIT_FCALL_BY_NAME still knows this is a class */
+ GET_NODE(result, opline->result);
+ result->EA = opline->extended_value;
}
/* }}} */
void zend_do_label(znode *label TSRMLS_DC) /* {{{ */
{
- zend_op_array *oparray = CG(active_op_array);
zend_label dest;
- if (!CG(labels)) {
- ALLOC_HASHTABLE(CG(labels));
- zend_hash_init(CG(labels), 4, NULL, NULL, 0);
+ if (!CG(context).labels) {
+ ALLOC_HASHTABLE(CG(context).labels);
+ zend_hash_init(CG(context).labels, 4, NULL, NULL, 0);
}
- dest.brk_cont = oparray->current_brk_cont;
- dest.opline_num = get_next_op_number(oparray);
+ dest.brk_cont = CG(context).current_brk_cont;
+ dest.opline_num = get_next_op_number(CG(active_op_array));
- if (zend_hash_add(CG(labels), Z_STRVAL(label->u.constant), Z_STRLEN(label->u.constant) + 1, (void**)&dest, sizeof(zend_label), NULL) == FAILURE) {
+ if (zend_hash_add(CG(context).labels, Z_STRVAL(label->u.constant), Z_STRLEN(label->u.constant) + 1, (void**)&dest, sizeof(zend_label), NULL) == FAILURE) {
zend_error(E_COMPILE_ERROR, "Label '%s' already defined", Z_STRVAL(label->u.constant));
}
@@ -1893,15 +2251,21 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2
{
zend_label *dest;
long current, distance;
+ zval *label;
- if (CG(labels) == NULL ||
- zend_hash_find(CG(labels), Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void**)&dest) == FAILURE) {
+ if (pass2) {
+ label = opline->op2.zv;
+ } else {
+ label = &CONSTANT_EX(op_array, opline->op2.constant);
+ }
+ if (CG(context).labels == NULL ||
+ zend_hash_find(CG(context).labels, Z_STRVAL_P(label), Z_STRLEN_P(label)+1, (void**)&dest) == FAILURE) {
if (pass2) {
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
CG(zend_lineno) = opline->lineno;
- zend_error(E_COMPILE_ERROR, "'goto' to undefined label '%s'", Z_STRVAL(opline->op2.u.constant));
+ zend_error(E_COMPILE_ERROR, "'goto' to undefined label '%s'", Z_STRVAL_P(label));
} else {
/* Label is not defined. Delay to pass 2. */
INC_BPC(op_array);
@@ -1909,8 +2273,9 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2
}
}
- opline->op1.u.opline_num = dest->opline_num;
- zval_dtor(&opline->op2.u.constant);
+ opline->op1.opline_num = dest->opline_num;
+ zval_dtor(label);
+ Z_TYPE_P(label) = IS_NULL;
/* Check that we are not moving into loop or switch */
current = opline->extended_value;
@@ -1933,7 +2298,7 @@ void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2
SET_UNUSED(opline->op2);
} else {
/* Set real break distance */
- ZVAL_LONG(&opline->op2.u.constant, distance);
+ ZVAL_LONG(label, distance);
}
if (pass2) {
@@ -1947,27 +2312,25 @@ void zend_do_goto(const znode *label TSRMLS_DC) /* {{{ */
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_GOTO;
- opline->extended_value = CG(active_op_array)->current_brk_cont;
+ opline->extended_value = CG(context).current_brk_cont;
SET_UNUSED(opline->op1);
- opline->op2 = *label;
+ SET_NODE(opline->op2, label);
zend_resolve_goto_label(CG(active_op_array), opline, 0 TSRMLS_CC);
}
/* }}} */
void zend_release_labels(TSRMLS_D) /* {{{ */
{
- if (CG(labels)) {
- zend_hash_destroy(CG(labels));
- FREE_HASHTABLE(CG(labels));
+ if (CG(context).labels) {
+ zend_hash_destroy(CG(context).labels);
+ FREE_HASHTABLE(CG(context).labels);
}
- if (!zend_stack_is_empty(&CG(labels_stack))) {
- HashTable **pht;
+ if (!zend_stack_is_empty(&CG(context_stack))) {
+ zend_compiler_context *ctx;
- zend_stack_top(&CG(labels_stack), (void**)&pht);
- CG(labels) = *pht;
- zend_stack_del_top(&CG(labels_stack));
- } else {
- CG(labels) = NULL;
+ zend_stack_top(&CG(context_stack), (void**)&ctx);
+ CG(context) = *ctx;
+ zend_stack_del_top(&CG(context_stack));
}
}
/* }}} */
@@ -2005,30 +2368,51 @@ int zend_do_begin_class_member_function_call(znode *class_name, znode *method_na
znode class_node;
unsigned char *ptr = NULL;
zend_op *opline;
- ulong fetch_type = 0;
if (method_name->op_type == IS_CONST) {
- char *lcname = zend_str_tolower_dup(Z_STRVAL(method_name->u.constant), Z_STRLEN(method_name->u.constant));
+ char *lcname;
+ if (Z_TYPE(method_name->u.constant) != IS_STRING) {
+ zend_error(E_COMPILE_ERROR, "Method name must be a string");
+ }
+ lcname = zend_str_tolower_dup(Z_STRVAL(method_name->u.constant), Z_STRLEN(method_name->u.constant));
if ((sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) == Z_STRLEN(method_name->u.constant) &&
- memcmp(lcname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) == 0) {
+ memcmp(lcname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) == 0) {
zval_dtor(&method_name->u.constant);
- SET_UNUSED(*method_name);
+ method_name->op_type = IS_UNUSED;
}
efree(lcname);
}
if (class_name->op_type == IS_CONST &&
- ZEND_FETCH_CLASS_DEFAULT == zend_get_class_fetch_type(Z_STRVAL(class_name->u.constant), Z_STRLEN(class_name->u.constant))) {
- fetch_type = ZEND_FETCH_CLASS_GLOBAL;
- zend_resolve_class_name(class_name, &fetch_type, 1 TSRMLS_CC);
+ ZEND_FETCH_CLASS_DEFAULT == zend_get_class_fetch_type(Z_STRVAL(class_name->u.constant), Z_STRLEN(class_name->u.constant))) {
+ zend_resolve_class_name(class_name, ZEND_FETCH_CLASS_GLOBAL, 1 TSRMLS_CC);
class_node = *class_name;
+ opline = get_next_op(CG(active_op_array) TSRMLS_CC);
} else {
zend_do_fetch_class(&class_node, class_name TSRMLS_CC);
+ opline = get_next_op(CG(active_op_array) TSRMLS_CC);
+ opline->extended_value = class_node.EA ;
}
- opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_INIT_STATIC_METHOD_CALL;
- opline->op1 = class_node;
- opline->op2 = *method_name;
+ if (class_node.op_type == IS_CONST) {
+ opline->op1_type = IS_CONST;
+ opline->op1.constant =
+ zend_add_class_name_literal(CG(active_op_array), &class_node.u.constant TSRMLS_CC);
+ } else {
+ SET_NODE(opline->op1, &class_node);
+ }
+ if (method_name->op_type == IS_CONST) {
+ opline->op2_type = IS_CONST;
+ opline->op2.constant =
+ zend_add_func_name_literal(CG(active_op_array), &method_name->u.constant TSRMLS_CC);
+ if (opline->op1_type == IS_CONST) {
+ GET_CACHE_SLOT(opline->op2.constant);
+ } else {
+ GET_POLYMORPHIC_CACHE_SLOT(opline->op2.constant);
+ }
+ } else {
+ SET_NODE(opline->op2, method_name);
+ }
zend_stack_push(&CG(function_call_stack), (void *) &ptr, sizeof(zend_function *));
zend_do_extended_fcall_begin(TSRMLS_C);
@@ -2050,17 +2434,18 @@ void zend_do_end_function_call(znode *function_name, znode *result, const znode
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
if (!is_method && !is_dynamic_fcall && function_name->op_type==IS_CONST) {
opline->opcode = ZEND_DO_FCALL;
- opline->op1 = *function_name;
- ZVAL_LONG(&opline->op2.u.constant, zend_hash_func(Z_STRVAL(function_name->u.constant), Z_STRLEN(function_name->u.constant) + 1));
+ SET_NODE(opline->op1, function_name);
+ CALCULATE_LITERAL_HASH(opline->op1.constant);
+ GET_CACHE_SLOT(opline->op1.constant);
} else {
opline->opcode = ZEND_DO_FCALL_BY_NAME;
SET_UNUSED(opline->op1);
}
}
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->result.op_type = IS_VAR;
- *result = opline->result;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ opline->result_type = IS_VAR;
+ GET_NODE(result, opline->result) ;
SET_UNUSED(opline->op2);
zend_stack_del_top(&CG(function_call_stack));
@@ -2079,24 +2464,24 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC) /* {{
zend_stack_top(&CG(function_call_stack), (void **) &function_ptr_ptr);
function_ptr = *function_ptr_ptr;
- if (original_op == ZEND_SEND_REF && !CG(allow_call_time_pass_reference)) {
+ if (original_op == ZEND_SEND_REF) {
if (function_ptr &&
- function_ptr->common.function_name &&
- function_ptr->common.type == ZEND_USER_FUNCTION &&
- !ARG_SHOULD_BE_SENT_BY_REF(function_ptr, (zend_uint) offset)) {
- zend_error(E_DEPRECATED,
- "Call-time pass-by-reference has been deprecated; "
- "If you would like to pass it by reference, modify the declaration of %s(). "
- "If you would like to enable call-time pass-by-reference, you can set "
- "allow_call_time_pass_reference to true in your INI file", function_ptr->common.function_name);
+ function_ptr->common.function_name &&
+ function_ptr->common.type == ZEND_USER_FUNCTION &&
+ !ARG_SHOULD_BE_SENT_BY_REF(function_ptr, (zend_uint) offset)) {
+ zend_error(E_COMPILE_ERROR,
+ "Call-time pass-by-reference has been removed; "
+ "If you would like to pass argument by reference, modify the declaration of %s().",
+ function_ptr->common.function_name);
} else {
- zend_error(E_DEPRECATED, "Call-time pass-by-reference has been deprecated");
+ zend_error(E_COMPILE_ERROR, "Call-time pass-by-reference has been removed");
}
- }
-
+ return;
+ }
+
if (function_ptr) {
if (ARG_MAY_BE_SENT_BY_REF(function_ptr, (zend_uint) offset)) {
- if (param->op_type & (IS_VAR|IS_CV)) {
+ if (param->op_type & (IS_VAR|IS_CV) && original_op != ZEND_SEND_VAL) {
send_by_reference = 1;
if (op == ZEND_SEND_VAR && zend_is_function_or_method_call(param)) {
/* Method call */
@@ -2169,8 +2554,8 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC) /* {{
}
}
opline->opcode = op;
- opline->op1 = *param;
- opline->op2.u.opline_num = offset;
+ SET_NODE(opline->op1, param);
+ opline->op2.opline_num = offset;
SET_UNUSED(opline->op2);
}
/* }}} */
@@ -2186,7 +2571,7 @@ static int generate_free_switch_expr(const zend_switch_entry *switch_entry TSRML
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = (switch_entry->cond.op_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE;
- opline->op1 = switch_entry->cond;
+ SET_NODE(opline->op1, &switch_entry->cond);
SET_UNUSED(opline->op2);
opline->extended_value = 0;
return 0;
@@ -2198,22 +2583,22 @@ static int generate_free_foreach_copy(const zend_op *foreach_copy TSRMLS_DC) /*
zend_op *opline;
/* If we reach the seperator then stop applying the stack */
- if (foreach_copy->result.op_type == IS_UNUSED && foreach_copy->op1.op_type == IS_UNUSED) {
+ if (foreach_copy->result_type == IS_UNUSED && foreach_copy->op1_type == IS_UNUSED) {
return 1;
}
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
- opline->opcode = (foreach_copy->result.op_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE;
- opline->op1 = foreach_copy->result;
+ opline->opcode = (foreach_copy->result_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE;
+ COPY_NODE(opline->op1, foreach_copy->result);
SET_UNUSED(opline->op2);
opline->extended_value = 1;
- if (foreach_copy->op1.op_type != IS_UNUSED) {
+ if (foreach_copy->op1_type != IS_UNUSED) {
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
- opline->opcode = (foreach_copy->op1.op_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE;
- opline->op1 = foreach_copy->op1;
+ opline->opcode = (foreach_copy->op1_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE;
+ COPY_NODE(opline->op1, foreach_copy->op1);
SET_UNUSED(opline->op2);
opline->extended_value = 0;
}
@@ -2228,7 +2613,7 @@ void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC) /* {{{ */
int start_op_number, end_op_number;
if (do_end_vparse) {
- if (CG(active_op_array)->return_reference && !zend_is_function_or_method_call(expr)) {
+ if ((CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) && !zend_is_function_or_method_call(expr)) {
zend_do_end_variable_parse(expr, BP_VAR_W, 0 TSRMLS_CC);
} else {
zend_do_end_variable_parse(expr, BP_VAR_R, 0 TSRMLS_CC);
@@ -2247,23 +2632,23 @@ void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC) /* {{{ */
end_op_number = get_next_op_number(CG(active_op_array));
while (start_op_number < end_op_number) {
- CG(active_op_array)->opcodes[start_op_number].op1.u.EA.type = EXT_TYPE_FREE_ON_RETURN;
+ CG(active_op_array)->opcodes[start_op_number].extended_value |= EXT_TYPE_FREE_ON_RETURN;
start_op_number++;
}
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
- opline->opcode = ZEND_RETURN;
+ opline->opcode = (CG(active_op_array)->fn_flags & ZEND_ACC_RETURN_REFERENCE) ? ZEND_RETURN_BY_REF : ZEND_RETURN;
if (expr) {
- opline->op1 = *expr;
+ SET_NODE(opline->op1, expr);
if (do_end_vparse && zend_is_function_or_method_call(expr)) {
opline->extended_value = ZEND_RETURNS_FUNCTION;
}
} else {
- opline->op1.op_type = IS_CONST;
- INIT_ZVAL(opline->op1.u.constant);
+ opline->op1_type = IS_CONST;
+ LITERAL_NULL(opline->op1);
}
SET_UNUSED(opline->op2);
@@ -2288,7 +2673,7 @@ static void zend_add_catch_element(int offset, zend_uint catch_op TSRMLS_DC) /*
void zend_do_first_catch(znode *open_parentheses TSRMLS_DC) /* {{{ */
{
- open_parentheses->u.opline_num = get_next_op_number(CG(active_op_array));
+ open_parentheses->u.op.opline_num = get_next_op_number(CG(active_op_array));
}
/* }}} */
@@ -2309,7 +2694,7 @@ void zend_initialize_try_catch_element(const znode *try_token TSRMLS_DC) /* {{{
zend_stack_top(&CG(bp_stack), (void **) &jmp_list_ptr);
zend_llist_add_element(jmp_list_ptr, &jmp_op_number);
- zend_add_catch_element(try_token->u.opline_num, get_next_op_number(CG(active_op_array)) TSRMLS_CC);
+ zend_add_catch_element(try_token->u.op.opline_num, get_next_op_number(CG(active_op_array)) TSRMLS_CC);
}
/* }}} */
@@ -2317,12 +2702,12 @@ void zend_do_mark_last_catch(const znode *first_catch, const znode *last_additio
{
CG(active_op_array)->last--;
zend_do_if_end(TSRMLS_C);
- if (last_additional_catch->u.opline_num == -1) {
- CG(active_op_array)->opcodes[first_catch->u.opline_num].op1.u.EA.type = 1;
- CG(active_op_array)->opcodes[first_catch->u.opline_num].extended_value = get_next_op_number(CG(active_op_array));
+ if (last_additional_catch->u.op.opline_num == -1) {
+ CG(active_op_array)->opcodes[first_catch->u.op.opline_num].result.num = 1;
+ CG(active_op_array)->opcodes[first_catch->u.op.opline_num].extended_value = get_next_op_number(CG(active_op_array));
} else {
- CG(active_op_array)->opcodes[last_additional_catch->u.opline_num].op1.u.EA.type = 1;
- CG(active_op_array)->opcodes[last_additional_catch->u.opline_num].extended_value = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[last_additional_catch->u.op.opline_num].result.num = 1;
+ CG(active_op_array)->opcodes[last_additional_catch->u.op.opline_num].extended_value = get_next_op_number(CG(active_op_array));
}
DEC_BPC(CG(active_op_array));
}
@@ -2330,41 +2715,40 @@ void zend_do_mark_last_catch(const znode *first_catch, const znode *last_additio
void zend_do_try(znode *try_token TSRMLS_DC) /* {{{ */
{
- try_token->u.opline_num = zend_add_try_element(get_next_op_number(CG(active_op_array)) TSRMLS_CC);
+ try_token->u.op.opline_num = zend_add_try_element(get_next_op_number(CG(active_op_array)) TSRMLS_CC);
INC_BPC(CG(active_op_array));
}
/* }}} */
-void zend_do_begin_catch(znode *try_token, znode *class_name, const znode *catch_var, znode *first_catch TSRMLS_DC) /* {{{ */
+void zend_do_begin_catch(znode *try_token, znode *class_name, znode *catch_var, znode *first_catch TSRMLS_DC) /* {{{ */
{
long catch_op_number;
zend_op *opline;
znode catch_class;
- zend_do_fetch_class(&catch_class, class_name TSRMLS_CC);
-
- catch_op_number = get_next_op_number(CG(active_op_array));
- if (catch_op_number > 0) {
- opline = &CG(active_op_array)->opcodes[catch_op_number-1];
- if (opline->opcode == ZEND_FETCH_CLASS) {
- opline->extended_value |= ZEND_FETCH_CLASS_NO_AUTOLOAD;
- }
+ if (class_name->op_type == IS_CONST &&
+ ZEND_FETCH_CLASS_DEFAULT == zend_get_class_fetch_type(Z_STRVAL(class_name->u.constant), Z_STRLEN(class_name->u.constant))) {
+ zend_resolve_class_name(class_name, ZEND_FETCH_CLASS_GLOBAL, 1 TSRMLS_CC);
+ catch_class = *class_name;
+ } else {
+ zend_error(E_COMPILE_ERROR, "Bad class name in the catch statement");
}
+ catch_op_number = get_next_op_number(CG(active_op_array));
if (first_catch) {
- first_catch->u.opline_num = catch_op_number;
+ first_catch->u.op.opline_num = catch_op_number;
}
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_CATCH;
- opline->op1 = catch_class;
-/* SET_UNUSED(opline->op1); */ /* FIXME: Define IS_CLASS or something like that */
- opline->op2.op_type = IS_CV;
- opline->op2.u.var = lookup_cv(CG(active_op_array), catch_var->u.constant.value.str.val, catch_var->u.constant.value.str.len);
- opline->op2.u.EA.type = 0;
- opline->op1.u.EA.type = 0; /* 1 means it's the last catch in the block */
+ opline->op1_type = IS_CONST;
+ opline->op1.constant = zend_add_class_name_literal(CG(active_op_array), &catch_class.u.constant TSRMLS_CC);
+ opline->op2_type = IS_CV;
+ opline->op2.var = lookup_cv(CG(active_op_array), catch_var->u.constant.value.str.val, catch_var->u.constant.value.str.len, 0 TSRMLS_CC);
+ Z_STRVAL(catch_var->u.constant) = (char*)CG(active_op_array)->vars[opline->op2.var].name;
+ opline->result.num = 0; /* 1 means it's the last catch in the block */
- try_token->u.opline_num = catch_op_number;
+ try_token->u.op.opline_num = catch_op_number;
}
/* }}} */
@@ -2382,7 +2766,7 @@ void zend_do_end_catch(const znode *try_token TSRMLS_DC) /* {{{ */
zend_stack_top(&CG(bp_stack), (void **) &jmp_list_ptr);
zend_llist_add_element(jmp_list_ptr, &jmp_op_number);
- CG(active_op_array)->opcodes[try_token->u.opline_num].extended_value = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[try_token->u.op.opline_num].extended_value = get_next_op_number(CG(active_op_array));
}
/* }}} */
@@ -2392,7 +2776,7 @@ void zend_do_throw(const znode *expr TSRMLS_DC) /* {{{ */
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_THROW;
- opline->op1 = *expr;
+ SET_NODE(opline->op1, expr);
SET_UNUSED(opline->op2);
}
/* }}} */
@@ -2411,13 +2795,14 @@ ZEND_API void function_add_ref(zend_function *function) /* {{{ */
zend_hash_init(op_array->static_variables, zend_hash_num_elements(static_variables), NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(op_array->static_variables, static_variables, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_zval, sizeof(zval *));
}
+ op_array->run_time_cache = NULL;
}
}
/* }}} */
static void do_inherit_parent_constructor(zend_class_entry *ce) /* {{{ */
{
- zend_function *function;
+ zend_function *function, *new_function;
if (!ce->parent) {
return;
@@ -2478,8 +2863,8 @@ static void do_inherit_parent_constructor(zend_class_entry *ce) /* {{{ */
if (zend_hash_find(&ce->parent->function_table, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME), (void **)&function)==SUCCESS) {
/* inherit parent's constructor */
- zend_hash_update(&ce->function_table, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME), function, sizeof(zend_function), NULL);
- function_add_ref(function);
+ zend_hash_update(&ce->function_table, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME), function, sizeof(zend_function), (void**)&new_function);
+ function_add_ref(new_function);
} else {
/* Don't inherit the old style constructor if we already have the new style constructor */
char *lc_class_name;
@@ -2492,8 +2877,8 @@ static void do_inherit_parent_constructor(zend_class_entry *ce) /* {{{ */
zend_hash_find(&ce->parent->function_table, lc_parent_class_name, ce->parent->name_length+1, (void **)&function)==SUCCESS) {
if (function->common.fn_flags & ZEND_ACC_CTOR) {
/* inherit parent's constructor */
- zend_hash_update(&ce->function_table, lc_parent_class_name, ce->parent->name_length+1, function, sizeof(zend_function), NULL);
- function_add_ref(function);
+ zend_hash_update(&ce->function_table, lc_parent_class_name, ce->parent->name_length+1, function, sizeof(zend_function), (void**)&new_function);
+ function_add_ref(new_function);
}
}
efree(lc_parent_class_name);
@@ -2541,8 +2926,12 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
return 1;
}
- /* Checks for constructors only if they are declared in an interface */
- if ((fe->common.fn_flags & ZEND_ACC_CTOR) && (proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0) {
+ /* Checks for constructors only if they are declared in an interface,
+ * or explicitly marked as abstract
+ */
+ if ((fe->common.fn_flags & ZEND_ACC_CTOR)
+ && ((proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0
+ && (proto->common.fn_flags & ZEND_ACC_ABSTRACT) == 0)) {
return 1;
}
@@ -2553,13 +2942,14 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
}
if (fe->common.type != ZEND_USER_FUNCTION
- && proto->common.pass_rest_by_reference
- && !fe->common.pass_rest_by_reference) {
+ && (proto->common.fn_flags & ZEND_ACC_PASS_REST_BY_REFERENCE) != 0
+ && (fe->common.fn_flags & ZEND_ACC_PASS_REST_BY_REFERENCE) == 0) {
return 0;
}
/* by-ref constraints on return values are covariant */
- if (proto->common.return_reference && !fe->common.return_reference) {
+ if ((proto->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)
+ && !(fe->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)) {
return 0;
}
@@ -2570,7 +2960,7 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
}
if (fe->common.arg_info[i].class_name
&& strcasecmp(fe->common.arg_info[i].class_name, proto->common.arg_info[i].class_name)!=0) {
- char *colon;
+ const char *colon;
if (fe->common.type != ZEND_USER_FUNCTION) {
return 0;
@@ -2592,8 +2982,8 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
}
}
}
- if (fe->common.arg_info[i].array_type_hint != proto->common.arg_info[i].array_type_hint) {
- /* Only one has an array type hint and the other one doesn't */
+ if (fe->common.arg_info[i].type_hint != proto->common.arg_info[i].type_hint) {
+ /* Incompatible type hint */
return 0;
}
@@ -2603,7 +2993,7 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
}
}
- if (proto->common.pass_rest_by_reference) {
+ if (proto->common.fn_flags & ZEND_ACC_PASS_REST_BY_REFERENCE) {
for (i=proto->common.num_args; i < fe->common.num_args; i++) {
if (!fe->common.arg_info[i].pass_by_reference) {
return 0;
@@ -2614,19 +3004,167 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
}
/* }}} */
-static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_function *parent, const zend_hash_key *hash_key, zend_class_entry *child_ce) /* {{{ */
+#define REALLOC_BUF_IF_EXCEED(buf, offset, length, size) \
+ if (UNEXPECTED(offset - buf + size >= length)) { \
+ length += size + 1; \
+ buf = erealloc(buf, length); \
+ }
+
+static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{{ */
{
- zend_uint child_flags;
- zend_uint parent_flags = parent->common.fn_flags;
- zend_function *child;
- TSRMLS_FETCH();
+ char *offset, *buf;
+ zend_uint length = 1024;
- if (zend_hash_quick_find(child_function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void **) &child)==FAILURE) {
- if (parent_flags & (ZEND_ACC_ABSTRACT)) {
- child_ce->ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
+ offset = buf = (char *)emalloc(length * sizeof(char));
+ if (fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) {
+ *(offset++) = '&';
+ *(offset++) = ' ';
+ }
+
+ if (fptr->common.scope) {
+ memcpy(offset, fptr->common.scope->name, fptr->common.scope->name_length);
+ offset += fptr->common.scope->name_length;
+ *(offset++) = ':';
+ *(offset++) = ':';
+ }
+
+ {
+ size_t name_len = strlen(fptr->common.function_name);
+ REALLOC_BUF_IF_EXCEED(buf, offset, length, name_len);
+ memcpy(offset, fptr->common.function_name, name_len);
+ offset += name_len;
+ }
+
+ *(offset++) = '(';
+ if (fptr->common.arg_info) {
+ zend_uint i, required;
+ zend_arg_info *arg_info = fptr->common.arg_info;
+
+ required = fptr->common.required_num_args;
+ for (i = 0; i < fptr->common.num_args;) {
+ if (arg_info->class_name) {
+ REALLOC_BUF_IF_EXCEED(buf, offset, length, arg_info->class_name_len);
+ memcpy(offset, arg_info->class_name, arg_info->class_name_len);
+ offset += arg_info->class_name_len;
+ *(offset++) = ' ';
+ } else if (arg_info->type_hint) {
+ zend_uint type_name_len;
+ char *type_name = zend_get_type_by_const(arg_info->type_hint);
+ type_name_len = strlen(type_name);
+ REALLOC_BUF_IF_EXCEED(buf, offset, length, type_name_len);
+ memcpy(offset, type_name, type_name_len);
+ offset += type_name_len;
+ *(offset++) = ' ';
+ }
+
+ if (arg_info->pass_by_reference) {
+ *(offset++) = '&';
+ }
+ *(offset++) = '$';
+
+ if (arg_info->name) {
+ REALLOC_BUF_IF_EXCEED(buf, offset, length, arg_info->name_len);
+ memcpy(offset, arg_info->name, arg_info->name_len);
+ offset += arg_info->name_len;
+ } else {
+ zend_uint idx = i;
+ memcpy(offset, "param", 5);
+ offset += 5;
+ do {
+ *(offset++) = (char) (idx % 10) + '0';
+ idx /= 10;
+ } while (idx > 0);
+ }
+ if (i >= required) {
+ *(offset++) = ' ';
+ *(offset++) = '=';
+ *(offset++) = ' ';
+ if (fptr->type == ZEND_USER_FUNCTION) {
+ zend_op *precv = NULL;
+ {
+ zend_uint idx = i;
+ zend_op *op = ((zend_op_array *)fptr)->opcodes;
+ zend_op *end = op + ((zend_op_array *)fptr)->last;
+
+ ++idx;
+ while (op < end) {
+ if ((op->opcode == ZEND_RECV || op->opcode == ZEND_RECV_INIT)
+ && op->op1.num == (long)idx)
+ {
+ precv = op;
+ }
+ ++op;
+ }
+ }
+ if (precv && precv->opcode == ZEND_RECV_INIT && precv->op2_type != IS_UNUSED) {
+ zval *zv, zv_copy;
+ int use_copy;
+ ALLOC_ZVAL(zv);
+ *zv = *precv->op2.zv;
+ zval_copy_ctor(zv);
+ INIT_PZVAL(zv);
+ zval_update_constant_ex(&zv, (void*)1, fptr->common.scope TSRMLS_CC);
+ if (Z_TYPE_P(zv) == IS_BOOL) {
+ if (Z_LVAL_P(zv)) {
+ memcpy(offset, "true", 4);
+ offset += 4;
+ } else {
+ memcpy(offset, "false", 5);
+ offset += 5;
+ }
+ } else if (Z_TYPE_P(zv) == IS_NULL) {
+ memcpy(offset, "NULL", 4);
+ offset += 4;
+ } else if (Z_TYPE_P(zv) == IS_STRING) {
+ *(offset++) = '\'';
+ REALLOC_BUF_IF_EXCEED(buf, offset, length, MIN(Z_STRLEN_P(zv), 10));
+ memcpy(offset, Z_STRVAL_P(zv), MIN(Z_STRLEN_P(zv), 10));
+ offset += MIN(Z_STRLEN_P(zv), 10);
+ if (Z_STRLEN_P(zv) > 10) {
+ *(offset++) = '.';
+ *(offset++) = '.';
+ *(offset++) = '.';
+ }
+ *(offset++) = '\'';
+ } else if (Z_TYPE_P(zv) == IS_ARRAY) {
+ memcpy(offset, "Array", 5);
+ offset += 5;
+ } else {
+ zend_make_printable_zval(zv, &zv_copy, &use_copy);
+ REALLOC_BUF_IF_EXCEED(buf, offset, length, Z_STRLEN(zv_copy));
+ memcpy(offset, Z_STRVAL(zv_copy), Z_STRLEN(zv_copy));
+ offset += Z_STRLEN(zv_copy);
+ if (use_copy) {
+ zval_dtor(&zv_copy);
+ }
+ }
+ zval_ptr_dtor(&zv);
+ }
+ } else {
+ memcpy(offset, "NULL", 4);
+ offset += 4;
+ }
+ }
+
+ if (++i < fptr->common.num_args) {
+ *(offset++) = ',';
+ *(offset++) = ' ';
+ }
+ arg_info++;
+ REALLOC_BUF_IF_EXCEED(buf, offset, length, 32);
}
- return 1; /* method doesn't exist in child, copy from parent */
}
+ *(offset++) = ')';
+ *offset = '\0';
+
+ return buf;
+}
+/* }}} */
+
+static void do_inheritance_check_on_method(zend_function *child, zend_function *parent TSRMLS_DC) /* {{{ */
+{
+ zend_uint child_flags;
+ zend_uint parent_flags = parent->common.fn_flags;
if ((parent->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0
&& parent->common.fn_flags & ZEND_ACC_ABSTRACT
@@ -2683,14 +3221,33 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f
if (child->common.prototype && (child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT)) {
if (!zend_do_perform_implementation_check(child, child->common.prototype TSRMLS_CC)) {
- zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name);
+ zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype TSRMLS_CC));
}
} else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
if (!zend_do_perform_implementation_check(child, parent TSRMLS_CC)) {
- zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(parent), parent->common.function_name);
+ char *method_prototype = zend_get_function_declaration(child->common.prototype TSRMLS_CC);
+ zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, method_prototype);
+ efree(method_prototype);
}
}
+}
+/* }}} */
+static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_function *parent, const zend_hash_key *hash_key, zend_class_entry *child_ce) /* {{{ */
+{
+ zend_uint parent_flags = parent->common.fn_flags;
+ zend_function *child;
+ TSRMLS_FETCH();
+
+ if (zend_hash_quick_find(child_function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void **) &child)==FAILURE) {
+ if (parent_flags & (ZEND_ACC_ABSTRACT)) {
+ child_ce->ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
+ }
+ return 1; /* method doesn't exist in child, copy from parent */
+ }
+
+ do_inheritance_check_on_method(child, parent TSRMLS_CC);
+
return 0;
}
/* }}} */
@@ -2730,42 +3287,11 @@ static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_pro
if ((child_info->flags & ZEND_ACC_PPP_MASK) > (parent_info->flags & ZEND_ACC_PPP_MASK)) {
zend_error(E_COMPILE_ERROR, "Access level to %s::$%s must be %s (as in class %s)%s", ce->name, hash_key->arKey, zend_visibility_string(parent_info->flags), parent_ce->name, (parent_info->flags&ZEND_ACC_PUBLIC) ? "" : " or weaker");
- } else if (child_info->flags & ZEND_ACC_IMPLICIT_PUBLIC) {
- if (!(parent_info->flags & ZEND_ACC_IMPLICIT_PUBLIC)) {
- /* Explicitly copy the default value from the parent (if it has one) */
- zval **pvalue;
-
- if (zend_hash_quick_find(&parent_ce->default_properties, parent_info->name, parent_info->name_length+1, parent_info->h, (void **) &pvalue) == SUCCESS) {
- Z_ADDREF_PP(pvalue);
- zend_hash_quick_del(&ce->default_properties, child_info->name, child_info->name_length+1, parent_info->h);
- zend_hash_quick_update(&ce->default_properties, parent_info->name, parent_info->name_length+1, parent_info->h, pvalue, sizeof(zval *), NULL);
- }
- }
- return 1; /* Inherit from the parent */
- } else if ((child_info->flags & ZEND_ACC_PUBLIC) && (parent_info->flags & ZEND_ACC_PROTECTED)) {
- char *prot_name;
- int prot_name_length;
-
- zend_mangle_property_name(&prot_name, &prot_name_length, "*", 1, child_info->name, child_info->name_length, ce->type & ZEND_INTERNAL_CLASS);
- if (child_info->flags & ZEND_ACC_STATIC) {
- zval **prop;
- HashTable *ht;
-
- if (parent_ce->type != ce->type) {
- /* User class extends internal class */
- TSRMLS_FETCH();
-
- ht = CE_STATIC_MEMBERS(parent_ce);
- } else {
- ht = &parent_ce->default_static_members;
- }
- if (zend_hash_find(ht, prot_name, prot_name_length+1, (void**)&prop) == SUCCESS) {
- zend_hash_del(&ce->default_static_members, prot_name, prot_name_length+1);
- }
- } else {
- zend_hash_del(&ce->default_properties, prot_name, prot_name_length+1);
- }
- pefree(prot_name, ce->type & ZEND_INTERNAL_CLASS);
+ } else if ((child_info->flags & ZEND_ACC_STATIC) == 0) {
+ Z_DELREF_P(ce->default_properties_table[parent_info->offset]);
+ ce->default_properties_table[parent_info->offset] = ce->default_properties_table[child_info->offset];
+ ce->default_properties_table[child_info->offset] = NULL;
+ child_info->offset = parent_info->offset;
}
return 0; /* Don't copy from parent */
} else {
@@ -2822,25 +3348,27 @@ ZEND_API void zend_do_inherit_interfaces(zend_class_entry *ce, const zend_class_
}
/* }}} */
-static int inherit_static_prop(zval **p TSRMLS_DC, int num_args, va_list args, const zend_hash_key *key) /* {{{ */
+#ifdef ZTS
+static void zval_internal_ctor(zval **p) /* {{{ */
{
- HashTable *target = va_arg(args, HashTable*);
+ zval *orig_ptr = *p;
- if (!zend_hash_quick_exists(target, key->arKey, key->nKeyLength, key->h)) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(p);
- if (zend_hash_quick_add(target, key->arKey, key->nKeyLength, key->h, p, sizeof(zval*), NULL) == SUCCESS) {
- Z_ADDREF_PP(p);
- }
- }
- return ZEND_HASH_APPLY_KEEP;
+ ALLOC_ZVAL(*p);
+ MAKE_COPY_ZVAL(&orig_ptr, *p);
}
/* }}} */
-#define zval_property_ctor(parent_ce, ce) \
- ((copy_ctor_func_t) (((parent_ce)->type != (ce)->type) ? zval_shared_property_ctor : zval_add_ref))
+# define zval_property_ctor(parent_ce, ce) \
+ ((void (*)(void *)) (((parent_ce)->type != (ce)->type) ? zval_internal_ctor : zval_add_ref))
+#else
+# define zval_property_ctor(parent_ce, ce) \
+ ((void (*)(void *)) zval_add_ref)
+#endif
ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC) /* {{{ */
{
+ zend_property_info *property_info;
+
if ((ce->ce_flags & ZEND_ACC_INTERFACE)
&& !(parent_ce->ce_flags & ZEND_ACC_INTERFACE)) {
zend_error(E_COMPILE_ERROR, "Interface %s may not inherit from class (%s)", ce->name, parent_ce->name);
@@ -2862,14 +3390,90 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
zend_do_inherit_interfaces(ce, parent_ce TSRMLS_CC);
/* Inherit properties */
- zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, zval_property_ctor(parent_ce, ce), NULL, sizeof(zval *), 0);
+ if (parent_ce->default_properties_count) {
+ int i = ce->default_properties_count + parent_ce->default_properties_count;
+
+ ce->default_properties_table = perealloc(ce->default_properties_table, sizeof(void*) * i, ce->type == ZEND_INTERNAL_CLASS);
+ if (ce->default_properties_count) {
+ while (i-- > parent_ce->default_properties_count) {
+ ce->default_properties_table[i] = ce->default_properties_table[i - parent_ce->default_properties_count];
+ }
+ }
+ for (i = 0; i < parent_ce->default_properties_count; i++) {
+ ce->default_properties_table[i] = parent_ce->default_properties_table[i];
+ if (ce->default_properties_table[i]) {
+#ifdef ZTS
+ if (parent_ce->type != ce->type) {
+ zval *p;
+
+ ALLOC_ZVAL(p);
+ MAKE_COPY_ZVAL(&ce->default_properties_table[i], p);
+ ce->default_properties_table[i] = p;
+ } else {
+ Z_ADDREF_P(ce->default_properties_table[i]);
+ }
+#else
+ Z_ADDREF_P(ce->default_properties_table[i]);
+#endif
+ }
+ }
+ ce->default_properties_count += parent_ce->default_properties_count;
+ }
+
if (parent_ce->type != ce->type) {
/* User class extends internal class */
zend_update_class_constants(parent_ce TSRMLS_CC);
- zend_hash_apply_with_arguments(CE_STATIC_MEMBERS(parent_ce) TSRMLS_CC, (apply_func_args_t)inherit_static_prop, 1, &ce->default_static_members);
+ if (parent_ce->default_static_members_count) {
+ int i = ce->default_static_members_count + parent_ce->default_static_members_count;
+
+ ce->default_static_members_table = erealloc(ce->default_static_members_table, sizeof(void*) * i);
+ if (ce->default_static_members_count) {
+ while (i-- > parent_ce->default_static_members_count) {
+ ce->default_static_members_table[i] = ce->default_static_members_table[i - parent_ce->default_static_members_count];
+ }
+ }
+ for (i = 0; i < parent_ce->default_static_members_count; i++) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(&CE_STATIC_MEMBERS(parent_ce)[i]);
+ ce->default_static_members_table[i] = CE_STATIC_MEMBERS(parent_ce)[i];
+ Z_ADDREF_P(ce->default_static_members_table[i]);
+ }
+ ce->default_static_members_count += parent_ce->default_static_members_count;
+ ce->static_members_table = ce->default_static_members_table;
+ }
} else {
- zend_hash_apply_with_arguments(&parent_ce->default_static_members TSRMLS_CC, (apply_func_args_t)inherit_static_prop, 1, &ce->default_static_members);
+ if (parent_ce->default_static_members_count) {
+ int i = ce->default_static_members_count + parent_ce->default_static_members_count;
+
+ ce->default_static_members_table = perealloc(ce->default_static_members_table, sizeof(void*) * i, ce->type == ZEND_INTERNAL_CLASS);
+ if (ce->default_static_members_count) {
+ while (i-- > parent_ce->default_static_members_count) {
+ ce->default_static_members_table[i] = ce->default_static_members_table[i - parent_ce->default_static_members_count];
+ }
+ }
+ for (i = 0; i < parent_ce->default_static_members_count; i++) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(&parent_ce->default_static_members_table[i]);
+ ce->default_static_members_table[i] = parent_ce->default_static_members_table[i];
+ Z_ADDREF_P(ce->default_static_members_table[i]);
+ }
+ ce->default_static_members_count += parent_ce->default_static_members_count;
+ if (ce->type == ZEND_USER_CLASS) {
+ ce->static_members_table = ce->default_static_members_table;
+ }
+ }
}
+
+ for (zend_hash_internal_pointer_reset(&ce->properties_info);
+ zend_hash_get_current_data(&ce->properties_info, (void *) &property_info) == SUCCESS;
+ zend_hash_move_forward(&ce->properties_info)) {
+ if (property_info->ce == ce) {
+ if (property_info->flags & ZEND_ACC_STATIC) {
+ property_info->offset += parent_ce->default_static_members_count;
+ } else {
+ property_info->offset += parent_ce->default_properties_count;
+ }
+ }
+ }
+
zend_hash_merge_ex(&ce->properties_info, &parent_ce->properties_info, (copy_ctor_func_t) (ce->type & ZEND_INTERNAL_CLASS ? zend_duplicate_property_info_internal : zend_duplicate_property_info), sizeof(zend_property_info), (merge_checker_func_t) do_inherit_property_access_check, ce);
zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, zval_property_ctor(parent_ce, ce), NULL, sizeof(zval *), 0);
@@ -2878,10 +3482,12 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
if (ce->ce_flags & ZEND_ACC_IMPLICIT_ABSTRACT_CLASS && ce->type == ZEND_INTERNAL_CLASS) {
ce->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS;
- } else if (!(ce->ce_flags & ZEND_ACC_IMPLEMENT_INTERFACES)) {
+ } else if (!(ce->ce_flags & ZEND_ACC_IMPLEMENT_INTERFACES)
+ && !(ce->ce_flags & ZEND_ACC_IMPLEMENT_TRAITS)) {
/* The verification will be done in runtime by ZEND_VERIFY_ABSTRACT_CLASS */
zend_verify_abstract_class(ce TSRMLS_CC);
}
+ ce->ce_flags |= parent_ce->ce_flags & ZEND_HAS_STATIC_IN_METHODS;
}
/* }}} */
@@ -2949,16 +3555,794 @@ ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry
}
/* }}} */
-ZEND_API int do_bind_function(zend_op *opline, HashTable *function_table, zend_bool compile_time) /* {{{ */
+ZEND_API void zend_do_implement_trait(zend_class_entry *ce, zend_class_entry *trait TSRMLS_DC) /* {{{ */
+{
+ zend_uint i, ignore = 0;
+ zend_uint current_trait_num = ce->num_traits;
+ zend_uint parent_trait_num = ce->parent ? ce->parent->num_traits : 0;
+
+ for (i = 0; i < ce->num_traits; i++) {
+ if (ce->traits[i] == NULL) {
+ memmove(ce->traits + i, ce->traits + i + 1, sizeof(zend_class_entry*) * (--ce->num_traits - i));
+ i--;
+ } else if (ce->traits[i] == trait) {
+ if (i < parent_trait_num) {
+ ignore = 1;
+ }
+ }
+ }
+ if (!ignore) {
+ if (ce->num_traits >= current_trait_num) {
+ if (ce->type == ZEND_INTERNAL_CLASS) {
+ ce->traits = (zend_class_entry **) realloc(ce->traits, sizeof(zend_class_entry *) * (++current_trait_num));
+ } else {
+ ce->traits = (zend_class_entry **) erealloc(ce->traits, sizeof(zend_class_entry *) * (++current_trait_num));
+ }
+ }
+ ce->traits[ce->num_traits++] = trait;
+ }
+}
+/* }}} */
+
+static int zend_traits_merge_functions(zend_function *fn TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
+{
+ size_t current;
+ size_t i;
+ size_t count;
+ HashTable* resulting_table;
+ HashTable** function_tables;
+ zend_class_entry *ce;
+ size_t collision = 0;
+ size_t abstract_solved = 0;
+ zend_function* other_trait_fn;
+
+ current = va_arg(args, size_t); /* index of current trait */
+ count = va_arg(args, size_t);
+ resulting_table = va_arg(args, HashTable*);
+ function_tables = va_arg(args, HashTable**);
+ ce = va_arg(args, zend_class_entry*);
+
+ for (i = 0; i < count; i++) {
+ if (i == current) {
+ continue; /* just skip this, cause its the table this function is applied on */
+ }
+
+ if (zend_hash_quick_find(function_tables[i], hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void **)&other_trait_fn) == SUCCESS) {
+ /* if it is an abstract method, there is no collision */
+ if (other_trait_fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
+ /* Make sure they are compatible */
+ if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
+ /* In case both are abstract, just check prototype, but need to do that in both directions */
+ if ( !zend_do_perform_implementation_check(fn, other_trait_fn TSRMLS_CC)
+ || !zend_do_perform_implementation_check(other_trait_fn, fn TSRMLS_CC)) {
+ zend_error(E_COMPILE_ERROR, "Declaration of %s must be compatible with %s", //ZEND_FN_SCOPE_NAME(fn), fn->common.function_name, //::%s()
+ zend_get_function_declaration(fn TSRMLS_CC),
+ zend_get_function_declaration(other_trait_fn TSRMLS_CC));
+ }
+ } else {
+ /* otherwise, do the full check */
+ do_inheritance_check_on_method(fn, other_trait_fn TSRMLS_CC);
+ }
+
+ /* we can savely free and remove it from other table */
+ zend_function_dtor(other_trait_fn);
+ zend_hash_quick_del(function_tables[i], hash_key->arKey, hash_key->nKeyLength, hash_key->h);
+ } else {
+ /* if it is not an abstract method, there is still no collision */
+ /* if fn is an abstract method */
+ if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
+ /* Make sure they are compatible.
+ Here, we already know other_trait_fn cannot be abstract, full check ok. */
+ do_inheritance_check_on_method(other_trait_fn, fn TSRMLS_CC);
+
+ /* just mark as solved, will be added if its own trait is processed */
+ abstract_solved = 1;
+ } else {
+ /* but else, we have a collision of non-abstract methods */
+ collision++;
+ zend_function_dtor(other_trait_fn);
+ zend_hash_quick_del(function_tables[i], hash_key->arKey, hash_key->nKeyLength, hash_key->h);
+ }
+ }
+ }
+ }
+
+ if (collision) {
+ zend_function* class_fn;
+
+ /* make sure method is not already overridden in class */
+ if (zend_hash_quick_find(&ce->function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void **)&class_fn) == FAILURE
+ || class_fn->common.scope != ce) {
+ zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because there are collisions with other trait methods on %s", fn->common.function_name, ce->name);
+ }
+
+ zend_function_dtor(fn);
+ } else if (abstract_solved) {
+ zend_function_dtor(fn);
+ } else {
+ /* Add it to result function table */
+ if (zend_hash_quick_add(resulting_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, fn, sizeof(zend_function), NULL)==FAILURE) {
+ zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occured during updating resulting trait method table", fn->common.function_name);
+ }
+ }
+
+ return ZEND_HASH_APPLY_REMOVE;
+}
+/* }}} */
+
+static void zend_add_magic_methods(zend_class_entry* ce, const char* mname, uint mname_len, zend_function* fe TSRMLS_DC) /* {{{ */
+{
+ if (!strncmp(mname, ZEND_CLONE_FUNC_NAME, mname_len)) {
+ ce->clone = fe; fe->common.fn_flags |= ZEND_ACC_CLONE;
+ } else if (!strncmp(mname, ZEND_CONSTRUCTOR_FUNC_NAME, mname_len)) {
+ if (ce->constructor) {
+ zend_error(E_COMPILE_ERROR, "%s has colliding constructor definitions coming from traits", ce->name);
+ }
+ ce->constructor = fe; fe->common.fn_flags |= ZEND_ACC_CTOR;
+ } else if (!strncmp(mname, ZEND_DESTRUCTOR_FUNC_NAME, mname_len)) {
+ ce->destructor = fe; fe->common.fn_flags |= ZEND_ACC_DTOR;
+ } else if (!strncmp(mname, ZEND_GET_FUNC_NAME, mname_len)) {
+ ce->__get = fe;
+ } else if (!strncmp(mname, ZEND_SET_FUNC_NAME, mname_len)) {
+ ce->__set = fe;
+ } else if (!strncmp(mname, ZEND_CALL_FUNC_NAME, mname_len)) {
+ ce->__call = fe;
+ } else if (!strncmp(mname, ZEND_UNSET_FUNC_NAME, mname_len)) {
+ ce->__unset = fe;
+ } else if (!strncmp(mname, ZEND_ISSET_FUNC_NAME, mname_len)) {
+ ce->__isset = fe;
+ } else if (!strncmp(mname, ZEND_CALLSTATIC_FUNC_NAME, mname_len)) {
+ ce->__callstatic = fe;
+ } else if (!strncmp(mname, ZEND_TOSTRING_FUNC_NAME, mname_len)) {
+ ce->__tostring = fe;
+ } else if (ce->name_length + 1 == mname_len) {
+ char *lowercase_name = emalloc(ce->name_length + 1);
+ zend_str_tolower_copy(lowercase_name, ce->name, ce->name_length);
+ lowercase_name = (char*)zend_new_interned_string(lowercase_name, ce->name_length + 1, 1 TSRMLS_CC);
+ if (!memcmp(mname, lowercase_name, mname_len)) {
+ if (ce->constructor) {
+ zend_error(E_COMPILE_ERROR, "%s has colliding constructor definitions coming from traits", ce->name);
+ }
+ ce->constructor = fe;
+ fe->common.fn_flags |= ZEND_ACC_CTOR;
+ }
+ str_efree(lowercase_name);
+ }
+}
+/* }}} */
+
+static int zend_traits_merge_functions_to_class(zend_function *fn TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
+{
+ zend_class_entry *ce = va_arg(args, zend_class_entry*);
+ int add = 0;
+ zend_function* existing_fn = NULL;
+ zend_function fn_copy, *fn_copy_p;
+ zend_function* prototype = NULL; /* is used to determine the prototype according to the inheritance chain */
+
+ if (zend_hash_quick_find(&ce->function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void**) &existing_fn) == FAILURE) {
+ add = 1; /* not found */
+ } else if (existing_fn->common.scope != ce) {
+ add = 1; /* or inherited from other class or interface */
+ }
+
+ if (add) {
+ zend_function* parent_function;
+ if (ce->parent && zend_hash_quick_find(&ce->parent->function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void**) &parent_function) != FAILURE) {
+ prototype = parent_function; /* ->common.fn_flags |= ZEND_ACC_ABSTRACT; */
+
+ /* we got that method in the parent class, and are going to override it,
+ except, if the trait is just asking to have an abstract method implemented. */
+ if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
+ /* then we clean up an skip this method */
+ zend_function_dtor(fn);
+ return ZEND_HASH_APPLY_REMOVE;
+ }
+ }
+
+ fn->common.scope = ce;
+ fn->common.prototype = prototype;
+
+ if (prototype
+ && (prototype->common.fn_flags & ZEND_ACC_IMPLEMENTED_ABSTRACT
+ || prototype->common.fn_flags & ZEND_ACC_ABSTRACT)) {
+ fn->common.fn_flags |= ZEND_ACC_IMPLEMENTED_ABSTRACT;
+ } else if (fn->common.fn_flags & ZEND_ACC_IMPLEMENTED_ABSTRACT) {
+ /* remove ZEND_ACC_IMPLEMENTED_ABSTRACT flag, think it shouldn't be copied to class */
+ fn->common.fn_flags = fn->common.fn_flags - ZEND_ACC_IMPLEMENTED_ABSTRACT;
+ }
+
+ /* check whether the trait method fullfills the inheritance requirements */
+ if (prototype) {
+ do_inheritance_check_on_method(fn, prototype TSRMLS_CC);
+ }
+ /* one more thing: make sure we properly implement an abstract method */
+ if (existing_fn && existing_fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
+ do_inheritance_check_on_method(fn, existing_fn TSRMLS_CC);
+ }
+
+ /* delete inherited fn if the function to be added is not abstract */
+ if (existing_fn
+ && existing_fn->common.scope != ce
+ && (fn->common.fn_flags & ZEND_ACC_ABSTRACT) == 0) {
+ /* it is just a reference which was added to the subclass while doing
+ the inheritance, so we can deleted now, and will add the overriding
+ method afterwards.
+ Except, if we try to add an abstract function, then we should not
+ delete the inherited one */
+ zend_hash_quick_del(&ce->function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h);
+ }
+
+
+ if (fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
+ ce->ce_flags |= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
+ }
+ if (fn->op_array.static_variables) {
+ ce->ce_flags |= ZEND_HAS_STATIC_IN_METHODS;
+ }
+ fn_copy = *fn;
+ function_add_ref(&fn_copy);
+
+ if (zend_hash_quick_update(&ce->function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, &fn_copy, sizeof(zend_function), (void**)&fn_copy_p)==FAILURE) {
+ zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occured during updating class method table", hash_key->arKey);
+ }
+
+ zend_add_magic_methods(ce, hash_key->arKey, hash_key->nKeyLength, fn_copy_p TSRMLS_CC);
+
+ zend_function_dtor(fn);
+ } else {
+ zend_function_dtor(fn);
+ }
+
+ return ZEND_HASH_APPLY_REMOVE;
+}
+/* }}} */
+
+static int zend_traits_copy_functions(zend_function *fn TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */
+{
+ HashTable* target;
+ zend_class_entry *target_ce;
+ zend_trait_alias** aliases;
+ HashTable* exclude_table;
+ char* lcname;
+ unsigned int fnname_len;
+ zend_function fn_copy;
+ void* dummy;
+ size_t i = 0;
+
+ target = va_arg(args, HashTable*);
+ target_ce = va_arg(args, zend_class_entry*);
+ aliases = va_arg(args, zend_trait_alias**);
+ exclude_table = va_arg(args, HashTable*);
+
+ fnname_len = strlen(fn->common.function_name);
+
+ /* apply aliases which are qualified with a class name, there should not be any ambiguity */
+ if (aliases) {
+ while (aliases[i]) {
+ /* Scope unset or equal to the function we compare to, and the alias applies to fn */
+ if (aliases[i]->alias != NULL
+ && (!aliases[i]->trait_method->ce || fn->common.scope == aliases[i]->trait_method->ce)
+ && aliases[i]->trait_method->mname_len == fnname_len
+ && (zend_binary_strcasecmp(aliases[i]->trait_method->method_name, aliases[i]->trait_method->mname_len, fn->common.function_name, fnname_len) == 0)) {
+ fn_copy = *fn;
+ function_add_ref(&fn_copy);
+ /* this function_name is never destroyed, because its refcount
+ greater than 1, classes are always destoyed in reverse order
+ and trait is declared early than this class */
+ fn_copy.common.function_name = aliases[i]->alias;
+
+ /* if it is 0, no modifieres has been changed */
+ if (aliases[i]->modifiers) {
+ fn_copy.common.fn_flags = aliases[i]->modifiers;
+ if (!(aliases[i]->modifiers & ZEND_ACC_PPP_MASK)) {
+ fn_copy.common.fn_flags |= ZEND_ACC_PUBLIC;
+ }
+ fn_copy.common.fn_flags |= fn->common.fn_flags ^ (fn->common.fn_flags & ZEND_ACC_PPP_MASK);
+ }
+
+ lcname = zend_str_tolower_dup(aliases[i]->alias, aliases[i]->alias_len);
+
+ if (zend_hash_add(target, lcname, aliases[i]->alias_len+1, &fn_copy, sizeof(zend_function), NULL)==FAILURE) {
+ zend_error(E_COMPILE_ERROR, "Failed to add aliased trait method (%s) to the trait table. There is probably already a trait method with the same name", fn_copy.common.function_name);
+ }
+ efree(lcname);
+
+ /** Record the trait from which this alias was resolved. */
+ if (!aliases[i]->trait_method->ce) {
+ aliases[i]->trait_method->ce = fn->common.scope;
+ }
+ }
+ i++;
+ }
+ }
+
+ lcname = zend_str_tolower_dup(fn->common.function_name, fnname_len);
+
+ if (exclude_table == NULL || zend_hash_find(exclude_table, lcname, fnname_len, &dummy) == FAILURE) {
+ /* is not in hashtable, thus, function is not to be excluded */
+ fn_copy = *fn;
+ function_add_ref(&fn_copy);
+
+ /* apply aliases which are not qualified by a class name, or which have not
+ * alias name, just setting visibility */
+ if (aliases) {
+ i = 0;
+ while (aliases[i]) {
+ /* Scope unset or equal to the function we compare to, and the alias applies to fn */
+ if (aliases[i]->alias == NULL && aliases[i]->modifiers != 0
+ && (!aliases[i]->trait_method->ce || fn->common.scope == aliases[i]->trait_method->ce)
+ && (aliases[i]->trait_method->mname_len == fnname_len)
+ && (zend_binary_strcasecmp(aliases[i]->trait_method->method_name, aliases[i]->trait_method->mname_len, fn->common.function_name, fnname_len) == 0)) {
+ fn_copy.common.fn_flags = aliases[i]->modifiers;
+
+ if (!(aliases[i]->modifiers & ZEND_ACC_PPP_MASK)) {
+ fn_copy.common.fn_flags |= ZEND_ACC_PUBLIC;
+ }
+ fn_copy.common.fn_flags |= fn->common.fn_flags ^ (fn->common.fn_flags & ZEND_ACC_PPP_MASK);
+
+ /** Record the trait from which this alias was resolved. */
+ if (!aliases[i]->trait_method->ce) {
+ aliases[i]->trait_method->ce = fn->common.scope;
+ }
+ }
+ i++;
+ }
+ }
+
+ if (zend_hash_add(target, lcname, fnname_len+1, &fn_copy, sizeof(zend_function), NULL)==FAILURE) {
+ zend_error(E_COMPILE_ERROR, "Failed to add trait method (%s) to the trait table. There is probably already a trait method with the same name", fn_copy.common.function_name);
+ }
+ }
+
+ efree(lcname);
+
+ return ZEND_HASH_APPLY_KEEP;
+}
+/* }}} */
+
+/* Copies function table entries to target function table with applied aliasing */
+static void zend_traits_copy_trait_function_table(HashTable *target, zend_class_entry *target_ce, HashTable *source, zend_trait_alias** aliases, HashTable* exclude_table TSRMLS_DC) /* {{{ */
+{
+ zend_hash_apply_with_arguments(source TSRMLS_CC, (apply_func_args_t)zend_traits_copy_functions, 4, target, target_ce, aliases, exclude_table);
+}
+/* }}} */
+
+static void zend_traits_init_trait_structures(zend_class_entry *ce TSRMLS_DC) /* {{{ */
+{
+ size_t i, j = 0;
+ zend_trait_precedence *cur_precedence;
+ zend_trait_method_reference *cur_method_ref;
+ char *lcname;
+ zend_bool method_exists;
+
+ /* resolve class references */
+ if (ce->trait_precedences) {
+ i = 0;
+ while ((cur_precedence = ce->trait_precedences[i])) {
+ /** Resolve classes for all precedence operations. */
+ if (cur_precedence->exclude_from_classes) {
+ cur_method_ref = cur_precedence->trait_method;
+ cur_precedence->trait_method->ce = zend_fetch_class(cur_method_ref->class_name,
+ cur_method_ref->cname_len, ZEND_FETCH_CLASS_TRAIT TSRMLS_CC);
+
+ /** Ensure that the prefered method is actually available. */
+ lcname = zend_str_tolower_dup(cur_method_ref->method_name,
+ cur_method_ref->mname_len);
+ method_exists = zend_hash_exists(&cur_method_ref->ce->function_table,
+ lcname,
+ cur_method_ref->mname_len + 1);
+ efree(lcname);
+ if (!method_exists) {
+ zend_error(E_COMPILE_ERROR,
+ "A precedence rule was defined for %s::%s but this method does not exist",
+ cur_method_ref->ce->name,
+ cur_method_ref->method_name);
+ }
+
+ /** With the other traits, we are more permissive.
+ We do not give errors for those. This allows to be more
+ defensive in such definitions. */
+ j = 0;
+ while (cur_precedence->exclude_from_classes[j]) {
+ char* class_name = (char*)cur_precedence->exclude_from_classes[j];
+ zend_uint name_length = strlen(class_name);
+
+ cur_precedence->exclude_from_classes[j] = zend_fetch_class(class_name, name_length, ZEND_FETCH_CLASS_TRAIT TSRMLS_CC);
+ efree(class_name);
+ j++;
+ }
+ }
+ i++;
+ }
+ }
+
+ if (ce->trait_aliases) {
+ i = 0;
+ while (ce->trait_aliases[i]) {
+ /** For all aliases with an explicit class name, resolve the class now. */
+ if (ce->trait_aliases[i]->trait_method->class_name) {
+ cur_method_ref = ce->trait_aliases[i]->trait_method;
+ cur_method_ref->ce = zend_fetch_class(cur_method_ref->class_name, cur_method_ref->cname_len, ZEND_FETCH_CLASS_TRAIT TSRMLS_CC);
+
+ /** And, ensure that the referenced method is resolvable, too. */
+ lcname = zend_str_tolower_dup(cur_method_ref->method_name,
+ cur_method_ref->mname_len);
+ method_exists = zend_hash_exists(&cur_method_ref->ce->function_table,
+ lcname, cur_method_ref->mname_len + 1);
+ efree(lcname);
+
+ if (!method_exists) {
+ zend_error(E_COMPILE_ERROR, "An alias was defined for %s::%s but this method does not exist", cur_method_ref->ce->name, cur_method_ref->method_name);
+ }
+ }
+ i++;
+ }
+ }
+}
+/* }}} */
+
+static void zend_traits_compile_exclude_table(HashTable* exclude_table, zend_trait_precedence **precedences, zend_class_entry *trait) /* {{{ */
+{
+ size_t i = 0, j;
+
+ if (!precedences) {
+ return;
+ }
+ while (precedences[i]) {
+ if (precedences[i]->exclude_from_classes) {
+ j = 0;
+ while (precedences[i]->exclude_from_classes[j]) {
+ if (precedences[i]->exclude_from_classes[j] == trait) {
+ zend_uint lcname_len = precedences[i]->trait_method->mname_len;
+ char *lcname = zend_str_tolower_dup(precedences[i]->trait_method->method_name, lcname_len);
+
+ if (zend_hash_add(exclude_table, lcname, lcname_len, NULL, 0, NULL) == FAILURE) {
+ efree(lcname);
+ zend_error(E_COMPILE_ERROR, "Failed to evaluate a trait precedence (%s). Method of trait %s was defined to be excluded multiple times", precedences[i]->trait_method->method_name, trait->name);
+ }
+ efree(lcname);
+ }
+ ++j;
+ }
+ }
+ ++i;
+ }
+}
+/* }}} */
+
+static void zend_do_traits_method_binding(zend_class_entry *ce TSRMLS_DC) /* {{{ */
+{
+ HashTable** function_tables;
+ HashTable* resulting_table;
+ HashTable exclude_table;
+ size_t i;
+
+ /* prepare copies of trait function tables for combination */
+ function_tables = malloc(sizeof(HashTable*) * ce->num_traits);
+ resulting_table = (HashTable *) malloc(sizeof(HashTable));
+
+ /* TODO: revisit this start size, may be its not optimal */
+ zend_hash_init_ex(resulting_table, 10, NULL, NULL, 1, 0);
+
+ for (i = 0; i < ce->num_traits; i++) {
+ function_tables[i] = (HashTable *) malloc(sizeof(HashTable));
+ zend_hash_init_ex(function_tables[i], ce->traits[i]->function_table.nNumOfElements, NULL, NULL, 1, 0);
+
+ if (ce->trait_precedences) {
+ /* TODO: revisit this start size, may be its not optimal */
+ zend_hash_init_ex(&exclude_table, 2, NULL, NULL, 0, 0);
+
+ zend_traits_compile_exclude_table(&exclude_table, ce->trait_precedences, ce->traits[i]);
+
+ /* copies functions, applies defined aliasing, and excludes unused trait methods */
+ zend_traits_copy_trait_function_table(function_tables[i], ce, &ce->traits[i]->function_table, ce->trait_aliases, &exclude_table TSRMLS_CC);
+ zend_hash_graceful_destroy(&exclude_table);
+ } else {
+ zend_traits_copy_trait_function_table(function_tables[i], ce, &ce->traits[i]->function_table, ce->trait_aliases, NULL TSRMLS_CC);
+ }
+ }
+
+ /* now merge trait methods */
+ for (i = 0; i < ce->num_traits; i++) {
+ zend_hash_apply_with_arguments(function_tables[i] TSRMLS_CC, (apply_func_args_t)zend_traits_merge_functions, 5, i, ce->num_traits, resulting_table, function_tables, ce);
+ }
+
+ /* Now the resulting_table contains all trait methods we would have to
+ * add to the class in the following step the methods are inserted into the method table
+ * if there is already a method with the same name it is replaced iff ce != fn.scope
+ * --> all inherited methods are overridden, methods defined in the class are left untouched
+ */
+ zend_hash_apply_with_arguments(resulting_table TSRMLS_CC, (apply_func_args_t)zend_traits_merge_functions_to_class, 1, ce);
+
+ /* free temporary function tables */
+ for (i = 0; i < ce->num_traits; i++) {
+ /* zend_hash_destroy(function_tables[i]); */
+ zend_hash_graceful_destroy(function_tables[i]);
+ free(function_tables[i]);
+ }
+ free(function_tables);
+
+ /* free temporary resulting table */
+ /* zend_hash_destroy(resulting_table); */
+ zend_hash_graceful_destroy(resulting_table);
+ free(resulting_table);
+}
+/* }}} */
+
+static zend_class_entry* find_first_definition(zend_class_entry *ce, size_t current_trait, const char* prop_name, int prop_name_length, ulong prop_hash, zend_class_entry *coliding_ce) /* {{{ */
+{
+ size_t i;
+ zend_property_info *coliding_prop;
+ for (i = 0; (i < current_trait) && (i < ce->num_traits); i++) {
+ if (zend_hash_quick_find(&ce->traits[i]->properties_info, prop_name, prop_name_length+1, prop_hash, (void **) &coliding_prop) == SUCCESS) {
+ return ce->traits[i];
+ }
+ }
+
+ return coliding_ce;
+}
+/* }}} */
+
+static void zend_traits_register_private_property(zend_class_entry *ce, const char *name, int name_len, zend_property_info *old_info, zval *property TSRMLS_DC) /* {{{ */
+{
+ char *priv_name;
+ int priv_name_length;
+ const char *interned_name;
+ zend_property_info property_info;
+ ulong h = zend_get_hash_value(name, name_len+1);
+ property_info = *old_info;
+
+ if (old_info->flags & ZEND_ACC_STATIC) {
+ property_info.offset = ce->default_static_members_count++;
+ ce->default_static_members_table = perealloc(ce->default_static_members_table, sizeof(zval*) * ce->default_static_members_count, ce->type == ZEND_INTERNAL_CLASS);
+ ce->default_static_members_table[property_info.offset] = property;
+ if (ce->type == ZEND_USER_CLASS) {
+ ce->static_members_table = ce->default_static_members_table;
+ }
+ } else {
+ property_info.offset = ce->default_properties_count++;
+ ce->default_properties_table = perealloc(ce->default_properties_table, sizeof(zval*) * ce->default_properties_count, ce->type == ZEND_INTERNAL_CLASS);
+ ce->default_properties_table[property_info.offset] = property;
+ }
+
+ zend_mangle_property_name(&priv_name, &priv_name_length, ce->name, ce->name_length, name, name_len, ce->type & ZEND_INTERNAL_CLASS);
+ property_info.name = priv_name;
+ property_info.name_length = priv_name_length;
+
+ interned_name = zend_new_interned_string(property_info.name, property_info.name_length+1, 0 TSRMLS_CC);
+ if (interned_name != property_info.name) {
+ if (ce->type == ZEND_USER_CLASS) {
+ efree((char*)property_info.name);
+ } else {
+ free((char*)property_info.name);
+ }
+ property_info.name = interned_name;
+ }
+
+ property_info.h = zend_get_hash_value(property_info.name, property_info.name_length+1);
+
+ property_info.ce = ce;
+
+ zend_hash_quick_update(&ce->properties_info, name, name_len+1, h, &property_info, sizeof(zend_property_info), NULL);
+}
+/* }}} */
+
+static void zend_do_traits_property_binding(zend_class_entry *ce TSRMLS_DC) /* {{{ */
+{
+ size_t i;
+ zend_property_info *property_info;
+ zend_property_info *coliding_prop;
+ zval compare_result;
+ const char* prop_name;
+ int prop_name_length;
+ ulong prop_hash;
+ const char* class_name_unused;
+ zend_bool prop_found;
+ zend_bool parent_prop_is_private = 0;
+ zend_bool not_compatible;
+ zval* prop_value;
+
+
+ /* In the following steps the properties are inserted into the property table
+ * for that, a very strict approach is applied:
+ * - check for compatibility, if not compatible with any property in class -> fatal
+ * - if compatible, then strict notice
+ */
+ for (i = 0; i < ce->num_traits; i++) {
+ for (zend_hash_internal_pointer_reset(&ce->traits[i]->properties_info);
+ zend_hash_get_current_data(&ce->traits[i]->properties_info, (void *) &property_info) == SUCCESS;
+ zend_hash_move_forward(&ce->traits[i]->properties_info)) {
+ /* first get the unmangeld name if necessary,
+ * then check whether the property is already there
+ */
+ if ((property_info->flags & ZEND_ACC_PPP_MASK) == ZEND_ACC_PUBLIC) {
+ prop_hash = property_info->h;
+ prop_name = property_info->name;
+ prop_name_length = property_info->name_length;
+ prop_found = zend_hash_quick_find(&ce->properties_info,
+ property_info->name, property_info->name_length+1,
+ property_info->h, (void **) &coliding_prop) == SUCCESS;
+ } else {
+ /* for private and protected we need to unmangle the names */
+ zend_unmangle_property_name(property_info->name, property_info->name_length,
+ &class_name_unused, &prop_name);
+ prop_name_length = strlen(prop_name);
+ prop_hash = zend_get_hash_value(prop_name, prop_name_length + 1);
+ prop_found = zend_hash_quick_find(&ce->properties_info, prop_name, prop_name_length+1, prop_hash, (void **) &coliding_prop) == SUCCESS;
+ }
+
+ /* next: check for conflicts with current class */
+ if (prop_found) {
+ if (coliding_prop->flags & ZEND_ACC_SHADOW) {
+ /* this one is inherited, lets look it up in its own class */
+ zend_hash_quick_find(&coliding_prop->ce->properties_info, prop_name, prop_name_length+1, prop_hash, (void **) &coliding_prop);
+ parent_prop_is_private = (coliding_prop->flags & ZEND_ACC_PRIVATE) == ZEND_ACC_PRIVATE;
+ }
+
+ if (!parent_prop_is_private) {
+ if ((coliding_prop->flags & (ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC))
+ == (property_info->flags & (ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC))) {
+ /* flags are identical, now the value needs to be checked */
+ if (property_info->flags & ZEND_ACC_STATIC) {
+ not_compatible = (FAILURE == compare_function(&compare_result,
+ ce->default_static_members_table[coliding_prop->offset],
+ ce->traits[i]->default_static_members_table[property_info->offset] TSRMLS_CC))
+ || (Z_LVAL(compare_result) != 0);
+ } else {
+ not_compatible = (FAILURE == compare_function(&compare_result,
+ ce->default_properties_table[coliding_prop->offset],
+ ce->traits[i]->default_properties_table[property_info->offset] TSRMLS_CC))
+ || (Z_LVAL(compare_result) != 0);
+ }
+ } else {
+ /* the flags are not identical, thus, we assume properties are not compatible */
+ not_compatible = 1;
+ }
+
+ if (not_compatible) {
+ zend_error(E_COMPILE_ERROR,
+ "%s and %s define the same property ($%s) in the composition of %s. However, the definition differs and is considered incompatible. Class was composed",
+ find_first_definition(ce, i, prop_name, prop_name_length, prop_hash, coliding_prop->ce)->name,
+ property_info->ce->name,
+ prop_name,
+ ce->name);
+ } else {
+ zend_error(E_STRICT,
+ "%s and %s define the same property ($%s) in the composition of %s. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed",
+ find_first_definition(ce, i, prop_name, prop_name_length, prop_hash, coliding_prop->ce)->name,
+ property_info->ce->name,
+ prop_name,
+ ce->name);
+ }
+ } else {
+ /* private property, make the property_info.offset indenpended */
+ if (property_info->flags & ZEND_ACC_STATIC) {
+ prop_value = ce->traits[i]->default_static_members_table[property_info->offset];
+ } else {
+ prop_value = ce->traits[i]->default_properties_table[property_info->offset];
+ }
+ Z_ADDREF_P(prop_value);
+
+ zend_traits_register_private_property(ce, prop_name, prop_name_length, property_info, prop_value TSRMLS_CC);
+ return;
+ }
+ }
+
+ /* property not found, so lets add it */
+ if (property_info->flags & ZEND_ACC_STATIC) {
+ prop_value = ce->traits[i]->default_static_members_table[property_info->offset];
+ } else {
+ prop_value = ce->traits[i]->default_properties_table[property_info->offset];
+ }
+ Z_ADDREF_P(prop_value);
+
+ zend_declare_property_ex(ce, prop_name, prop_name_length,
+ prop_value, property_info->flags,
+ property_info->doc_comment, property_info->doc_comment_len TSRMLS_CC);
+ }
+ }
+}
+/* }}} */
+
+static void zend_do_check_for_inconsistent_traits_aliasing(zend_class_entry *ce TSRMLS_DC) /* {{{ */
+{
+ int i = 0;
+ zend_trait_alias* cur_alias;
+ char* lc_method_name;
+
+ if (ce->trait_aliases) {
+ while (ce->trait_aliases[i]) {
+ cur_alias = ce->trait_aliases[i];
+ /** The trait for this alias has not been resolved, this means, this
+ alias was not applied. Abort with an error. */
+ if (!cur_alias->trait_method->ce) {
+ if (cur_alias->alias) {
+ /** Plain old inconsistency/typo/bug */
+ zend_error(E_COMPILE_ERROR,
+ "An alias (%s) was defined for method %s(), but this method does not exist",
+ cur_alias->alias,
+ cur_alias->trait_method->method_name);
+ } else {
+ /** Here are two possible cases:
+ 1) this is an attempt to modifiy the visibility
+ of a method introduce as part of another alias.
+ Since that seems to violate the DRY principle,
+ we check against it and abort.
+ 2) it is just a plain old inconsitency/typo/bug
+ as in the case where alias is set. */
+
+ lc_method_name = zend_str_tolower_dup(cur_alias->trait_method->method_name,
+ cur_alias->trait_method->mname_len);
+ if (zend_hash_exists(&ce->function_table,
+ lc_method_name,
+ cur_alias->trait_method->mname_len+1)) {
+ efree(lc_method_name);
+ zend_error(E_COMPILE_ERROR,
+ "The modifiers for the trait alias %s() need to be changed in the same statment in which the alias is defined. Error",
+ cur_alias->trait_method->method_name);
+ } else {
+ efree(lc_method_name);
+ zend_error(E_COMPILE_ERROR,
+ "The modifiers of the trait method %s() are changed, but this method does not exist. Error",
+ cur_alias->trait_method->method_name);
+
+ }
+ }
+ }
+ i++;
+ }
+ }
+}
+/* }}} */
+
+ZEND_API void zend_do_bind_traits(zend_class_entry *ce TSRMLS_DC) /* {{{ */
+{
+
+ if (ce->num_traits <= 0) {
+ return;
+ }
+
+ /* complete initialization of trait strutures in ce */
+ zend_traits_init_trait_structures(ce TSRMLS_CC);
+
+ /* first care about all methods to be flattened into the class */
+ zend_do_traits_method_binding(ce TSRMLS_CC);
+
+ /* Aliases which have not been applied indicate typos/bugs. */
+ zend_do_check_for_inconsistent_traits_aliasing(ce TSRMLS_CC);
+
+ /* then flatten the properties into it, to, mostly to notfiy developer about problems */
+ zend_do_traits_property_binding(ce TSRMLS_CC);
+
+ /* verify that all abstract methods from traits have been implemented */
+ zend_verify_abstract_class(ce TSRMLS_CC);
+
+ /* now everything should be fine and an added ZEND_ACC_IMPLICIT_ABSTRACT_CLASS should be removed */
+ if (ce->ce_flags & ZEND_ACC_IMPLICIT_ABSTRACT_CLASS) {
+ ce->ce_flags -= ZEND_ACC_IMPLICIT_ABSTRACT_CLASS;
+ }
+}
+/* }}} */
+
+ZEND_API int do_bind_function(const zend_op_array *op_array, zend_op *opline, HashTable *function_table, zend_bool compile_time) /* {{{ */
{
zend_function *function;
+ zval *op1, *op2;
- zend_hash_find(function_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void *) &function);
- if (zend_hash_add(function_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, function, sizeof(zend_function), NULL)==FAILURE) {
+ if (compile_time) {
+ op1 = &CONSTANT_EX(op_array, opline->op1.constant);
+ op2 = &CONSTANT_EX(op_array, opline->op2.constant);
+ } else {
+ op1 = opline->op1.zv;
+ op2 = opline->op2.zv;
+ }
+
+ zend_hash_quick_find(function_table, Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_HASH_P(op1), (void *) &function);
+ if (zend_hash_quick_add(function_table, Z_STRVAL_P(op2), Z_STRLEN_P(op2)+1, Z_HASH_P(op2), function, sizeof(zend_function), NULL)==FAILURE) {
int error_level = compile_time ? E_COMPILE_ERROR : E_ERROR;
zend_function *old_function;
- if (zend_hash_find(function_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, (void *) &old_function)==SUCCESS
+ if (zend_hash_quick_find(function_table, Z_STRVAL_P(op2), Z_STRLEN_P(op2)+1, Z_HASH_P(op2), (void *) &old_function)==SUCCESS
&& old_function->type == ZEND_USER_FUNCTION
&& old_function->op_array.last > 0) {
zend_error(error_level, "Cannot redeclare %s() (previously declared in %s:%d)",
@@ -2977,18 +4361,101 @@ ZEND_API int do_bind_function(zend_op *opline, HashTable *function_table, zend_b
}
/* }}} */
-ZEND_API zend_class_entry *do_bind_class(const zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC) /* {{{ */
+void zend_add_trait_precedence(znode *precedence_znode TSRMLS_DC) /* {{{ */
+{
+ zend_class_entry *ce = CG(active_class_entry);
+ zend_add_to_list(&ce->trait_precedences, precedence_znode->u.op.ptr TSRMLS_CC);
+}
+/* }}} */
+
+void zend_add_trait_alias(znode *alias_znode TSRMLS_DC) /* {{{ */
+{
+ zend_class_entry *ce = CG(active_class_entry);
+ zend_add_to_list(&ce->trait_aliases, alias_znode->u.op.ptr TSRMLS_CC);
+}
+/* }}} */
+
+void zend_prepare_reference(znode *result, znode *class_name, znode *method_name TSRMLS_DC) /* {{{ */
+{
+ zend_trait_method_reference *method_ref = emalloc(sizeof(zend_trait_method_reference));
+ method_ref->ce = NULL;
+
+ /* REM: There should not be a need for copying,
+ zend_do_begin_class_declaration is also just using that string */
+ if (class_name) {
+ zend_resolve_class_name(class_name, ZEND_FETCH_CLASS_GLOBAL, 1 TSRMLS_CC);
+ method_ref->class_name = Z_STRVAL(class_name->u.constant);
+ method_ref->cname_len = Z_STRLEN(class_name->u.constant);
+ } else {
+ method_ref->class_name = NULL;
+ method_ref->cname_len = 0;
+ }
+
+ method_ref->method_name = Z_STRVAL(method_name->u.constant);
+ method_ref->mname_len = Z_STRLEN(method_name->u.constant);
+
+ result->u.op.ptr = method_ref;
+ result->op_type = IS_TMP_VAR;
+}
+/* }}} */
+
+void zend_prepare_trait_alias(znode *result, znode *method_reference, znode *modifiers, znode *alias TSRMLS_DC) /* {{{ */
+{
+ zend_trait_alias *trait_alias = emalloc(sizeof(zend_trait_alias));
+
+ trait_alias->trait_method = (zend_trait_method_reference*)method_reference->u.op.ptr;
+ trait_alias->modifiers = Z_LVAL(modifiers->u.constant);
+
+ if (Z_LVAL(modifiers->u.constant) == ZEND_ACC_STATIC) {
+ zend_error(E_COMPILE_ERROR, "Cannot use 'static' as method modifier");
+ return;
+ }
+
+ if (alias) {
+ trait_alias->alias = Z_STRVAL(alias->u.constant);
+ trait_alias->alias_len = Z_STRLEN(alias->u.constant);
+ } else {
+ trait_alias->alias = NULL;
+ }
+ trait_alias->function = NULL;
+
+ result->u.op.ptr = trait_alias;
+}
+/* }}} */
+
+void zend_prepare_trait_precedence(znode *result, znode *method_reference, znode *trait_list TSRMLS_DC) /* {{{ */
+{
+ zend_trait_precedence *trait_precedence = emalloc(sizeof(zend_trait_precedence));
+
+ trait_precedence->trait_method = (zend_trait_method_reference*)method_reference->u.op.ptr;
+ trait_precedence->exclude_from_classes = (zend_class_entry**) trait_list->u.op.ptr;
+
+ trait_precedence->function = NULL;
+
+ result->u.op.ptr = trait_precedence;
+}
+/* }}} */
+
+ZEND_API zend_class_entry *do_bind_class(const zend_op_array* op_array, const zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC) /* {{{ */
{
zend_class_entry *ce, **pce;
+ zval *op1, *op2;
- if (zend_hash_find(class_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void **) &pce)==FAILURE) {
- zend_error(E_COMPILE_ERROR, "Internal Zend error - Missing class information for %s", opline->op1.u.constant.value.str.val);
+ if (compile_time) {
+ op1 = &CONSTANT_EX(op_array, opline->op1.constant);
+ op2 = &CONSTANT_EX(op_array, opline->op2.constant);
+ } else {
+ op1 = opline->op1.zv;
+ op2 = opline->op2.zv;
+ }
+ if (zend_hash_quick_find(class_table, Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_HASH_P(op1), (void **) &pce)==FAILURE) {
+ zend_error(E_COMPILE_ERROR, "Internal Zend error - Missing class information for %s", Z_STRVAL_P(op1));
return NULL;
} else {
ce = *pce;
}
ce->refcount++;
- if (zend_hash_add(class_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, &ce, sizeof(zend_class_entry *), NULL)==FAILURE) {
+ if (zend_hash_quick_add(class_table, Z_STRVAL_P(op2), Z_STRLEN_P(op2)+1, Z_HASH_P(op2), &ce, sizeof(zend_class_entry *), NULL)==FAILURE) {
ce->refcount--;
if (!compile_time) {
/* If we're in compile time, in practice, it's quite possible
@@ -3008,12 +4475,21 @@ ZEND_API zend_class_entry *do_bind_class(const zend_op *opline, HashTable *class
}
/* }}} */
-ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time TSRMLS_DC) /* {{{ */
+ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array *op_array, const zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time TSRMLS_DC) /* {{{ */
{
zend_class_entry *ce, **pce;
int found_ce;
+ zval *op1, *op2;
+
+ if (compile_time) {
+ op1 = &CONSTANT_EX(op_array, opline->op1.constant);
+ op2 = &CONSTANT_EX(op_array, opline->op2.constant);
+ } else {
+ op1 = opline->op1.zv;
+ op2 = opline->op2.zv;
+ }
- found_ce = zend_hash_find(class_table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, (void **) &pce);
+ found_ce = zend_hash_quick_find(class_table, Z_STRVAL_P(op1), Z_STRLEN_P(op1), Z_HASH_P(op1), (void **) &pce);
if (found_ce == FAILURE) {
if (!compile_time) {
@@ -3022,7 +4498,7 @@ ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op *opline, HashTa
* so we shut up about it. This allows the if (!defined('FOO')) { return; }
* approach to work.
*/
- zend_error(E_COMPILE_ERROR, "Cannot redeclare class %s", opline->op2.u.constant.value.str.val);
+ zend_error(E_COMPILE_ERROR, "Cannot redeclare class %s", Z_STRVAL_P(op2));
}
return NULL;
} else {
@@ -3031,6 +4507,8 @@ ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op *opline, HashTa
if (parent_ce->ce_flags & ZEND_ACC_INTERFACE) {
zend_error(E_COMPILE_ERROR, "Class %s cannot extend from interface %s", ce->name, parent_ce->name);
+ } else if ((parent_ce->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
+ zend_error(E_COMPILE_ERROR, "Class %s cannot extend from trait %s", ce->name, parent_ce->name);
}
zend_do_inheritance(ce, parent_ce TSRMLS_CC);
@@ -3038,7 +4516,7 @@ ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op *opline, HashTa
ce->refcount++;
/* Register the derived class */
- if (zend_hash_add(class_table, opline->op2.u.constant.value.str.val, opline->op2.u.constant.value.str.len+1, pce, sizeof(zend_class_entry *), NULL)==FAILURE) {
+ if (zend_hash_quick_add(class_table, Z_STRVAL_P(op2), Z_STRLEN_P(op2)+1, Z_HASH_P(op2), pce, sizeof(zend_class_entry *), NULL)==FAILURE) {
zend_error(E_COMPILE_ERROR, "Cannot redeclare class %s", ce->name);
}
return ce;
@@ -3056,13 +4534,13 @@ void zend_do_early_binding(TSRMLS_D) /* {{{ */
switch (opline->opcode) {
case ZEND_DECLARE_FUNCTION:
- if (do_bind_function(opline, CG(function_table), 1) == FAILURE) {
+ if (do_bind_function(CG(active_op_array), opline, CG(function_table), 1) == FAILURE) {
return;
}
table = CG(function_table);
break;
case ZEND_DECLARE_CLASS:
- if (do_bind_class(opline, CG(class_table), 1 TSRMLS_CC) == NULL) {
+ if (do_bind_class(CG(active_op_array), opline, CG(class_table), 1 TSRMLS_CC) == NULL) {
return;
}
table = CG(class_table);
@@ -3070,30 +4548,31 @@ void zend_do_early_binding(TSRMLS_D) /* {{{ */
case ZEND_DECLARE_INHERITED_CLASS:
{
zend_op *fetch_class_opline = opline-1;
- zval *parent_name = &fetch_class_opline->op2.u.constant;
+ zval *parent_name;
zend_class_entry **pce;
+ parent_name = &CONSTANT(fetch_class_opline->op2.constant);
if ((zend_lookup_class(Z_STRVAL_P(parent_name), Z_STRLEN_P(parent_name), &pce TSRMLS_CC) == FAILURE) ||
- ((CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_CLASSES) &&
- ((*pce)->type == ZEND_INTERNAL_CLASS))) {
- if (CG(compiler_options) & ZEND_COMPILE_DELAYED_BINDING) {
+ ((CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_CLASSES) &&
+ ((*pce)->type == ZEND_INTERNAL_CLASS))) {
+ if (CG(compiler_options) & ZEND_COMPILE_DELAYED_BINDING) {
zend_uint *opline_num = &CG(active_op_array)->early_binding;
while (*opline_num != -1) {
- opline_num = &CG(active_op_array)->opcodes[*opline_num].result.u.opline_num;
+ opline_num = &CG(active_op_array)->opcodes[*opline_num].result.opline_num;
}
*opline_num = opline - CG(active_op_array)->opcodes;
opline->opcode = ZEND_DECLARE_INHERITED_CLASS_DELAYED;
- opline->result.op_type = IS_UNUSED;
- opline->result.u.opline_num = -1;
+ opline->result_type = IS_UNUSED;
+ opline->result.opline_num = -1;
}
return;
}
- if (do_bind_inherited_class(opline, CG(class_table), *pce, 1 TSRMLS_CC) == NULL) {
+ if (do_bind_inherited_class(CG(active_op_array), opline, CG(class_table), *pce, 1 TSRMLS_CC) == NULL) {
return;
}
/* clear unnecessary ZEND_FETCH_CLASS opcode */
- zval_dtor(&fetch_class_opline->op2.u.constant);
+ zend_del_literal(CG(active_op_array), fetch_class_opline->op2.constant);
MAKE_NOP(fetch_class_opline);
table = CG(class_table);
@@ -3101,16 +4580,19 @@ void zend_do_early_binding(TSRMLS_D) /* {{{ */
}
case ZEND_VERIFY_ABSTRACT_CLASS:
case ZEND_ADD_INTERFACE:
+ case ZEND_ADD_TRAIT:
+ case ZEND_BIND_TRAITS:
/* We currently don't early-bind classes that implement interfaces */
+ /* Classes with traits are handled exactly the same, no early-bind here */
return;
default:
zend_error(E_COMPILE_ERROR, "Invalid binding type");
return;
}
- zend_hash_del(table, opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len);
- zval_dtor(&opline->op1.u.constant);
- zval_dtor(&opline->op2.u.constant);
+ zend_hash_quick_del(table, Z_STRVAL(CONSTANT(opline->op1.constant)), Z_STRLEN(CONSTANT(opline->op1.constant)), Z_HASH_P(&CONSTANT(opline->op1.constant)));
+ zend_del_literal(CG(active_op_array), opline->op1.constant);
+ zend_del_literal(CG(active_op_array), opline->op2.constant);
MAKE_NOP(opline);
}
/* }}} */
@@ -3124,10 +4606,10 @@ ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS
CG(in_compilation) = 1;
while (opline_num != -1) {
- if (zend_lookup_class(Z_STRVAL(op_array->opcodes[opline_num-1].op2.u.constant), Z_STRLEN(op_array->opcodes[opline_num-1].op2.u.constant), &pce TSRMLS_CC) == SUCCESS) {
- do_bind_inherited_class(&op_array->opcodes[opline_num], EG(class_table), *pce, 1 TSRMLS_CC);
+ if (zend_lookup_class(Z_STRVAL_P(op_array->opcodes[opline_num-1].op2.zv), Z_STRLEN_P(op_array->opcodes[opline_num-1].op2.zv), &pce TSRMLS_CC) == SUCCESS) {
+ do_bind_inherited_class(op_array, &op_array->opcodes[opline_num], EG(class_table), *pce, 0 TSRMLS_CC);
}
- opline_num = op_array->opcodes[opline_num].result.u.opline_num;
+ opline_num = op_array->opcodes[opline_num].result.opline_num;
}
CG(in_compilation) = orig_in_compilation;
}
@@ -3141,17 +4623,17 @@ void zend_do_boolean_or_begin(znode *expr1, znode *op_token TSRMLS_DC) /* {{{ */
opline->opcode = ZEND_JMPNZ_EX;
if (expr1->op_type == IS_TMP_VAR) {
- opline->result = *expr1;
+ SET_NODE(opline->result, expr1);
} else {
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->result.op_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ opline->result_type = IS_TMP_VAR;
}
- opline->op1 = *expr1;
+ SET_NODE(opline->op1, expr1);
SET_UNUSED(opline->op2);
- op_token->u.opline_num = next_op_number;
+ op_token->u.op.opline_num = next_op_number;
- *expr1 = opline->result;
+ GET_NODE(expr1, opline->result);
}
/* }}} */
@@ -3161,11 +4643,11 @@ void zend_do_boolean_or_end(znode *result, const znode *expr1, const znode *expr
*result = *expr1; /* we saved the original result in expr1 */
opline->opcode = ZEND_BOOL;
- opline->result = *result;
- opline->op1 = *expr2;
+ SET_NODE(opline->result, result);
+ SET_NODE(opline->op1, expr2);
SET_UNUSED(opline->op2);
- CG(active_op_array)->opcodes[op_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[op_token->u.op.opline_num].op2.opline_num = get_next_op_number(CG(active_op_array));
}
/* }}} */
@@ -3176,17 +4658,17 @@ void zend_do_boolean_and_begin(znode *expr1, znode *op_token TSRMLS_DC) /* {{{ *
opline->opcode = ZEND_JMPZ_EX;
if (expr1->op_type == IS_TMP_VAR) {
- opline->result = *expr1;
+ SET_NODE(opline->result, expr1);
} else {
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->result.op_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ opline->result_type = IS_TMP_VAR;
}
- opline->op1 = *expr1;
+ SET_NODE(opline->op1, expr1);
SET_UNUSED(opline->op2);
- op_token->u.opline_num = next_op_number;
+ op_token->u.op.opline_num = next_op_number;
- *expr1 = opline->result;
+ GET_NODE(expr1, opline->result);
}
/* }}} */
@@ -3196,11 +4678,11 @@ void zend_do_boolean_and_end(znode *result, const znode *expr1, const znode *exp
*result = *expr1; /* we saved the original result in expr1 */
opline->opcode = ZEND_BOOL;
- opline->result = *result;
- opline->op1 = *expr2;
+ SET_NODE(opline->result, result);
+ SET_NODE(opline->op1, expr2);
SET_UNUSED(opline->op2);
- CG(active_op_array)->opcodes[op_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[op_token->u.op.opline_num].op2.opline_num = get_next_op_number(CG(active_op_array));
}
/* }}} */
@@ -3216,11 +4698,11 @@ void zend_do_do_while_end(const znode *do_token, const znode *expr_open_bracket,
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_JMPNZ;
- opline->op1 = *expr;
- opline->op2.u.opline_num = do_token->u.opline_num;
+ SET_NODE(opline->op1, expr);
+ opline->op2.opline_num = do_token->u.op.opline_num;
SET_UNUSED(opline->op2);
- do_end_loop(expr_open_bracket->u.opline_num, 0 TSRMLS_CC);
+ do_end_loop(expr_open_bracket->u.op.opline_num, 0 TSRMLS_CC);
DEC_BPC(CG(active_op_array));
}
@@ -3231,15 +4713,18 @@ void zend_do_brk_cont(zend_uchar op, const znode *expr TSRMLS_DC) /* {{{ */
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = op;
- opline->op1.u.opline_num = CG(active_op_array)->current_brk_cont;
+ opline->op1.opline_num = CG(context).current_brk_cont;
SET_UNUSED(opline->op1);
if (expr) {
- opline->op2 = *expr;
+ if (expr->op_type != IS_CONST) {
+ zend_error(E_COMPILE_ERROR, "'%s' operator with non-constant operand is no longer supported", op == ZEND_BRK ? "break" : "continue");
+ } else if (Z_TYPE(expr->u.constant) != IS_LONG || Z_LVAL(expr->u.constant) < 1) {
+ zend_error(E_COMPILE_ERROR, "'%s' operator accepts only positive numbers", op == ZEND_BRK ? "break" : "continue");
+ }
+ SET_NODE(opline->op2, expr);
} else {
- Z_TYPE(opline->op2.u.constant) = IS_LONG;
- Z_LVAL(opline->op2.u.constant) = 1;
- INIT_PZVAL(&opline->op2.u.constant);
- opline->op2.op_type = IS_CONST;
+ LITERAL_LONG(opline->op2, 1);
+ opline->op2_type = IS_CONST;
}
}
/* }}} */
@@ -3272,24 +4757,24 @@ void zend_do_switch_end(const znode *case_list TSRMLS_DC) /* {{{ */
opline->opcode = ZEND_JMP;
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
- opline->op1.u.opline_num = switch_entry_ptr->default_case;
+ opline->op1.opline_num = switch_entry_ptr->default_case;
}
if (case_list->op_type != IS_UNUSED) { /* non-empty switch */
int next_op_number = get_next_op_number(CG(active_op_array));
- CG(active_op_array)->opcodes[case_list->u.opline_num].op1.u.opline_num = next_op_number;
+ CG(active_op_array)->opcodes[case_list->u.op.opline_num].op1.opline_num = next_op_number;
}
/* remember break/continue loop information */
- CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].cont = CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].brk = get_next_op_number(CG(active_op_array));
- CG(active_op_array)->current_brk_cont = CG(active_op_array)->brk_cont_array[CG(active_op_array)->current_brk_cont].parent;
+ CG(active_op_array)->brk_cont_array[CG(context).current_brk_cont].cont = CG(active_op_array)->brk_cont_array[CG(context).current_brk_cont].brk = get_next_op_number(CG(active_op_array));
+ CG(context).current_brk_cont = CG(active_op_array)->brk_cont_array[CG(context).current_brk_cont].parent;
if (switch_entry_ptr->cond.op_type==IS_VAR || switch_entry_ptr->cond.op_type==IS_TMP_VAR) {
/* emit free for the switch condition*/
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = (switch_entry_ptr->cond.op_type == IS_TMP_VAR) ? ZEND_FREE : ZEND_SWITCH_FREE;
- opline->op1 = switch_entry_ptr->cond;
+ SET_NODE(opline->op1, &switch_entry_ptr->cond);
SET_UNUSED(opline->op2);
}
if (switch_entry_ptr->cond.op_type == IS_CONST) {
@@ -3315,27 +4800,27 @@ void zend_do_case_before_statement(const znode *case_list, znode *case_token, co
switch_entry_ptr->control_var = get_temporary_variable(CG(active_op_array));
}
opline->opcode = ZEND_CASE;
- opline->result.u.var = switch_entry_ptr->control_var;
- opline->result.op_type = IS_TMP_VAR;
- opline->op1 = switch_entry_ptr->cond;
- opline->op2 = *case_expr;
- if (opline->op1.op_type == IS_CONST) {
- zval_copy_ctor(&opline->op1.u.constant);
+ opline->result.var = switch_entry_ptr->control_var;
+ opline->result_type = IS_TMP_VAR;
+ SET_NODE(opline->op1, &switch_entry_ptr->cond);
+ SET_NODE(opline->op2, case_expr);
+ if (opline->op1_type == IS_CONST) {
+ zval_copy_ctor(&CONSTANT(opline->op1.constant));
}
- result = opline->result;
+ GET_NODE(&result, opline->result);
next_op_number = get_next_op_number(CG(active_op_array));
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_JMPZ;
- opline->op1 = result;
+ SET_NODE(opline->op1, &result);
SET_UNUSED(opline->op2);
- case_token->u.opline_num = next_op_number;
+ case_token->u.op.opline_num = next_op_number;
if (case_list->op_type==IS_UNUSED) {
return;
}
next_op_number = get_next_op_number(CG(active_op_array));
- CG(active_op_array)->opcodes[case_list->u.opline_num].op1.u.opline_num = next_op_number;
+ CG(active_op_array)->opcodes[case_list->u.op.opline_num].op1.opline_num = next_op_number;
}
/* }}} */
@@ -3347,14 +4832,14 @@ void zend_do_case_after_statement(znode *result, const znode *case_token TSRMLS_
opline->opcode = ZEND_JMP;
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
- result->u.opline_num = next_op_number;
+ result->u.op.opline_num = next_op_number;
- switch (CG(active_op_array)->opcodes[case_token->u.opline_num].opcode) {
+ switch (CG(active_op_array)->opcodes[case_token->u.op.opline_num].opcode) {
case ZEND_JMP:
- CG(active_op_array)->opcodes[case_token->u.opline_num].op1.u.opline_num = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[case_token->u.op.opline_num].op1.opline_num = get_next_op_number(CG(active_op_array));
break;
case ZEND_JMPZ:
- CG(active_op_array)->opcodes[case_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[case_token->u.op.opline_num].op2.opline_num = get_next_op_number(CG(active_op_array));
break;
}
}
@@ -3371,7 +4856,7 @@ void zend_do_default_before_statement(const znode *case_list, znode *default_tok
opline->opcode = ZEND_JMP;
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
- default_token->u.opline_num = next_op_number;
+ default_token->u.op.opline_num = next_op_number;
next_op_number = get_next_op_number(CG(active_op_array));
switch_entry_ptr->default_case = next_op_number;
@@ -3379,7 +4864,7 @@ void zend_do_default_before_statement(const znode *case_list, znode *default_tok
if (case_list->op_type==IS_UNUSED) {
return;
}
- CG(active_op_array)->opcodes[case_list->u.opline_num].op1.u.opline_num = next_op_number;
+ CG(active_op_array)->opcodes[case_list->u.op.opline_num].op1.opline_num = next_op_number;
}
/* }}} */
@@ -3390,7 +4875,7 @@ void zend_do_begin_class_declaration(const znode *class_token, znode *class_name
zend_class_entry *new_class_entry;
char *lcname;
int error = 0;
- zval **ns_name;
+ zval **ns_name, key;
if (CG(active_class_entry)) {
zend_error(E_COMPILE_ERROR, "Class declarations may not be nested");
@@ -3401,12 +4886,12 @@ void zend_do_begin_class_declaration(const znode *class_token, znode *class_name
if (!(strcmp(lcname, "self") && strcmp(lcname, "parent"))) {
efree(lcname);
- zend_error(E_COMPILE_ERROR, "Cannot use '%s' as class name as it is reserved", class_name->u.constant.value.str.val);
+ zend_error(E_COMPILE_ERROR, "Cannot use '%s' as class name as it is reserved", Z_STRVAL(class_name->u.constant));
}
/* Class name must not conflict with import names */
if (CG(current_import) &&
- zend_hash_find(CG(current_import), lcname, Z_STRLEN(class_name->u.constant)+1, (void**)&ns_name) == SUCCESS) {
+ zend_hash_find(CG(current_import), lcname, Z_STRLEN(class_name->u.constant)+1, (void**)&ns_name) == SUCCESS) {
error = 1;
}
@@ -3434,16 +4919,16 @@ void zend_do_begin_class_declaration(const znode *class_token, znode *class_name
new_class_entry = emalloc(sizeof(zend_class_entry));
new_class_entry->type = ZEND_USER_CLASS;
- new_class_entry->name = class_name->u.constant.value.str.val;
- new_class_entry->name_length = class_name->u.constant.value.str.len;
+ new_class_entry->name = zend_new_interned_string(Z_STRVAL(class_name->u.constant), Z_STRLEN(class_name->u.constant) + 1, 1 TSRMLS_CC);
+ new_class_entry->name_length = Z_STRLEN(class_name->u.constant);
zend_initialize_class_data(new_class_entry, 1 TSRMLS_CC);
- new_class_entry->filename = zend_get_compiled_filename(TSRMLS_C);
- new_class_entry->line_start = class_token->u.opline_num;
- new_class_entry->ce_flags |= class_token->u.EA.type;
+ new_class_entry->info.user.filename = zend_get_compiled_filename(TSRMLS_C);
+ new_class_entry->info.user.line_start = class_token->u.op.opline_num;
+ new_class_entry->ce_flags |= class_token->EA;
if (parent_class_name && parent_class_name->op_type != IS_UNUSED) {
- switch (parent_class_name->u.EA.type) {
+ switch (parent_class_name->EA) {
case ZEND_FETCH_CLASS_SELF:
zend_error(E_COMPILE_ERROR, "Cannot use 'self' as class name as it is reserved");
break;
@@ -3460,33 +4945,38 @@ void zend_do_begin_class_declaration(const znode *class_token, znode *class_name
}
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
- opline->op1.op_type = IS_CONST;
- build_runtime_defined_function_key(&opline->op1.u.constant, lcname, new_class_entry->name_length TSRMLS_CC);
+ opline->op1_type = IS_CONST;
+ build_runtime_defined_function_key(&key, lcname, new_class_entry->name_length TSRMLS_CC);
+ opline->op1.constant = zend_add_literal(CG(active_op_array), &key TSRMLS_CC);
+ Z_HASH_P(&CONSTANT(opline->op1.constant)) = zend_hash_func(Z_STRVAL(CONSTANT(opline->op1.constant)), Z_STRLEN(CONSTANT(opline->op1.constant)));
- opline->op2.op_type = IS_CONST;
- opline->op2.u.constant.type = IS_STRING;
- Z_SET_REFCOUNT(opline->op2.u.constant, 1);
+ opline->op2_type = IS_CONST;
if (doing_inheritance) {
- opline->extended_value = parent_class_name->u.var;
+ /* Make sure a trait does not try to extend a class */
+ if ((new_class_entry->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
+ zend_error(E_COMPILE_ERROR, "A trait (%s) cannot extend a class", new_class_entry->name);
+ }
+
+ opline->extended_value = parent_class_name->u.op.var;
opline->opcode = ZEND_DECLARE_INHERITED_CLASS;
} else {
opline->opcode = ZEND_DECLARE_CLASS;
}
- opline->op2.u.constant.value.str.val = lcname;
- opline->op2.u.constant.value.str.len = new_class_entry->name_length;
+ LITERAL_STRINGL(opline->op2, lcname, new_class_entry->name_length, 0);
+ CALCULATE_LITERAL_HASH(opline->op2.constant);
- zend_hash_update(CG(class_table), opline->op1.u.constant.value.str.val, opline->op1.u.constant.value.str.len, &new_class_entry, sizeof(zend_class_entry *), NULL);
+ zend_hash_quick_update(CG(class_table), Z_STRVAL(key), Z_STRLEN(key), Z_HASH_P(&CONSTANT(opline->op1.constant)), &new_class_entry, sizeof(zend_class_entry *), NULL);
CG(active_class_entry) = new_class_entry;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->result.op_type = IS_VAR;
- CG(implementing_class) = opline->result;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ opline->result_type = IS_VAR;
+ GET_NODE(&CG(implementing_class), opline->result);
if (CG(doc_comment)) {
- CG(active_class_entry)->doc_comment = CG(doc_comment);
- CG(active_class_entry)->doc_comment_len = CG(doc_comment_len);
+ CG(active_class_entry)->info.user.doc_comment = CG(doc_comment);
+ CG(active_class_entry)->info.user.doc_comment_len = CG(doc_comment_len);
CG(doc_comment) = NULL;
CG(doc_comment_len) = 0;
}
@@ -3498,7 +4988,7 @@ static void do_verify_abstract_class(TSRMLS_D) /* {{{ */
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_VERIFY_ABSTRACT_CLASS;
- opline->op1 = CG(implementing_class);
+ SET_NODE(opline->op1, &CG(implementing_class));
SET_UNUSED(opline->op2);
}
/* }}} */
@@ -3526,7 +5016,23 @@ void zend_do_end_class_declaration(const znode *class_token, const znode *parent
}
}
- ce->line_end = zend_get_compiled_lineno(TSRMLS_C);
+ ce->info.user.line_end = zend_get_compiled_lineno(TSRMLS_C);
+
+ /* Check for traits and proceed like with interfaces.
+ * The only difference will be a combined handling of them in the end.
+ * Thus, we need another opcode here. */
+ if (ce->num_traits > 0) {
+ zend_op *opline;
+
+ ce->traits = NULL;
+ ce->num_traits = 0;
+ ce->ce_flags |= ZEND_ACC_IMPLEMENT_TRAITS;
+
+ /* opcode generation: */
+ opline = get_next_op(CG(active_op_array) TSRMLS_CC);
+ opline->opcode = ZEND_BIND_TRAITS;
+ SET_NODE(opline->op1, &CG(implementing_class));
+ }
if (!(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))
&& ((parent_token->op_type != IS_UNUSED) || (ce->num_interfaces > 0))) {
@@ -3544,6 +5050,7 @@ void zend_do_end_class_declaration(const znode *class_token, const znode *parent
ce->num_interfaces = 0;
ce->ce_flags |= ZEND_ACC_IMPLEMENT_INTERFACES;
}
+
CG(active_class_entry) = NULL;
}
/* }}} */
@@ -3552,6 +5059,13 @@ void zend_do_implements_interface(znode *interface_name TSRMLS_DC) /* {{{ */
{
zend_op *opline;
+ /* Traits can not implement interfaces */
+ if ((CG(active_class_entry)->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
+ zend_error(E_COMPILE_ERROR, "Cannot use '%s' as interface on '%s' since it is a Trait",
+ Z_STRVAL(interface_name->u.constant),
+ CG(active_class_entry)->name);
+ }
+
switch (zend_get_class_fetch_type(Z_STRVAL(interface_name->u.constant), Z_STRLEN(interface_name->u.constant))) {
case ZEND_FETCH_CLASS_SELF:
case ZEND_FETCH_CLASS_PARENT:
@@ -3564,14 +5078,46 @@ void zend_do_implements_interface(znode *interface_name TSRMLS_DC) /* {{{ */
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_ADD_INTERFACE;
- opline->op1 = CG(implementing_class);
- zend_resolve_class_name(interface_name, &opline->extended_value, 0 TSRMLS_CC);
+ SET_NODE(opline->op1, &CG(implementing_class));
+ zend_resolve_class_name(interface_name, opline->extended_value, 0 TSRMLS_CC);
opline->extended_value = (opline->extended_value & ~ZEND_FETCH_CLASS_MASK) | ZEND_FETCH_CLASS_INTERFACE;
- opline->op2 = *interface_name;
+ opline->op2_type = IS_CONST;
+ opline->op2.constant = zend_add_class_name_literal(CG(active_op_array), &interface_name->u.constant TSRMLS_CC);
CG(active_class_entry)->num_interfaces++;
}
/* }}} */
+void zend_do_implements_trait(znode *trait_name TSRMLS_DC) /* {{{ */
+{
+ zend_op *opline;
+ if ((CG(active_class_entry)->ce_flags & ZEND_ACC_INTERFACE)) {
+ zend_error(E_COMPILE_ERROR,
+ "Cannot use traits inside of interfaces. %s is used in %s",
+ Z_STRVAL(trait_name->u.constant), CG(active_class_entry)->name);
+ }
+
+
+ switch (zend_get_class_fetch_type(Z_STRVAL(trait_name->u.constant), Z_STRLEN(trait_name->u.constant))) {
+ case ZEND_FETCH_CLASS_SELF:
+ case ZEND_FETCH_CLASS_PARENT:
+ case ZEND_FETCH_CLASS_STATIC:
+ zend_error(E_COMPILE_ERROR, "Cannot use '%s' as trait name as it is reserved", Z_STRVAL(trait_name->u.constant));
+ break;
+ default:
+ break;
+ }
+
+ opline = get_next_op(CG(active_op_array) TSRMLS_CC);
+ opline->opcode = ZEND_ADD_TRAIT;
+ SET_NODE(opline->op1, &CG(implementing_class));
+ zend_resolve_class_name(trait_name, opline->extended_value, 0 TSRMLS_CC);
+ opline->extended_value = ZEND_FETCH_CLASS_TRAIT;
+ opline->op2_type = IS_CONST;
+ opline->op2.constant = zend_add_class_name_literal(CG(active_op_array), &trait_name->u.constant TSRMLS_CC);
+ CG(active_class_entry)->num_traits++;
+}
+/* }}} */
+
ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, const char *src1, int src1_length, const char *src2, int src2_length, int internal) /* {{{ */
{
char *prop_name;
@@ -3596,7 +5142,7 @@ static int zend_strnlen(const char* s, int maxlen) /* {{{ */
}
/* }}} */
-ZEND_API int zend_unmangle_property_name(char *mangled_property, int len, char **class_name, char **prop_name) /* {{{ */
+ZEND_API int zend_unmangle_property_name(const char *mangled_property, int len, const char **class_name, const char **prop_name) /* {{{ */
{
int class_name_len;
@@ -3641,13 +5187,11 @@ void zend_do_declare_property(const znode *var_name, const znode *value, zend_ui
if (access_type & ZEND_ACC_FINAL) {
zend_error(E_COMPILE_ERROR, "Cannot declare property %s::$%s final, the final modifier is allowed only for methods and classes",
- CG(active_class_entry)->name, var_name->u.constant.value.str.val);
+ CG(active_class_entry)->name, var_name->u.constant.value.str.val);
}
if (zend_hash_find(&CG(active_class_entry)->properties_info, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, (void **) &existing_property_info)==SUCCESS) {
- if (!(existing_property_info->flags & ZEND_ACC_IMPLICIT_PUBLIC)) {
- zend_error(E_COMPILE_ERROR, "Cannot redeclare %s::$%s", CG(active_class_entry)->name, var_name->u.constant.value.str.val);
- }
+ zend_error(E_COMPILE_ERROR, "Cannot redeclare %s::$%s", CG(active_class_entry)->name, var_name->u.constant.value.str.val);
}
ALLOC_ZVAL(property);
@@ -3665,7 +5209,7 @@ void zend_do_declare_property(const znode *var_name, const znode *value, zend_ui
CG(doc_comment_len) = 0;
}
- zend_declare_property_ex(CG(active_class_entry), var_name->u.constant.value.str.val, var_name->u.constant.value.str.len, property, access_type, comment, comment_len TSRMLS_CC);
+ zend_declare_property_ex(CG(active_class_entry), zend_new_interned_string(var_name->u.constant.value.str.val, var_name->u.constant.value.str.len + 1, 0 TSRMLS_CC), var_name->u.constant.value.str.len, property, access_type, comment, comment_len TSRMLS_CC);
efree(var_name->u.constant.value.str.val);
}
/* }}} */
@@ -3673,15 +5217,29 @@ void zend_do_declare_property(const znode *var_name, const znode *value, zend_ui
void zend_do_declare_class_constant(znode *var_name, const znode *value TSRMLS_DC) /* {{{ */
{
zval *property;
+ const char *cname = NULL;
+ int result;
if(Z_TYPE(value->u.constant) == IS_CONSTANT_ARRAY) {
zend_error(E_COMPILE_ERROR, "Arrays are not allowed in class constants");
+ return;
+ }
+ if ((CG(active_class_entry)->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
+ zend_error(E_COMPILE_ERROR, "Traits cannot have constants");
+ return;
}
ALLOC_ZVAL(property);
*property = value->u.constant;
+
+ cname = zend_new_interned_string(var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, 0 TSRMLS_CC);
- if (zend_hash_add(&CG(active_class_entry)->constants_table, var_name->u.constant.value.str.val, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL)==FAILURE) {
+ if (IS_INTERNED(cname)) {
+ result = zend_hash_quick_add(&CG(active_class_entry)->constants_table, cname, var_name->u.constant.value.str.len+1, INTERNED_HASH(cname), &property, sizeof(zval *), NULL);
+ } else {
+ result = zend_hash_add(&CG(active_class_entry)->constants_table, cname, var_name->u.constant.value.str.len+1, &property, sizeof(zval *), NULL);
+ }
+ if (result == FAILURE) {
FREE_ZVAL(property);
zend_error(E_COMPILE_ERROR, "Cannot redefine class constant %s::%s", CG(active_class_entry)->name, var_name->u.constant.value.str.val);
}
@@ -3703,17 +5261,17 @@ void zend_do_fetch_property(znode *result, znode *object, const znode *property
zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr);
if (object->op_type == IS_CV) {
- if (object->u.var == CG(active_op_array)->this_var) {
- SET_UNUSED(*object); /* this means $this for objects */
+ if (object->u.op.var == CG(active_op_array)->this_var) {
+ object->op_type = IS_UNUSED; /* this means $this for objects */
}
} else if (fetch_list_ptr->count == 1) {
zend_llist_element *le = fetch_list_ptr->head;
zend_op *opline_ptr = (zend_op *) le->data;
if (opline_is_fetch_this(opline_ptr TSRMLS_CC)) {
- efree(Z_STRVAL(opline_ptr->op1.u.constant));
+ zend_del_literal(CG(active_op_array), opline_ptr->op1.constant);
SET_UNUSED(opline_ptr->op1); /* this means $this for objects */
- opline_ptr->op2 = *property;
+ SET_NODE(opline_ptr->op2, property);
/* if it was usual fetch, we change it to object fetch */
switch (opline_ptr->opcode) {
case ZEND_FETCH_W:
@@ -3735,19 +5293,36 @@ void zend_do_fetch_property(znode *result, znode *object, const znode *property
opline_ptr->opcode = ZEND_FETCH_OBJ_FUNC_ARG;
break;
}
- *result = opline_ptr->result;
+ if (opline_ptr->op2_type == IS_CONST && Z_TYPE(CONSTANT(opline_ptr->op2.constant)) == IS_STRING) {
+ CALCULATE_LITERAL_HASH(opline_ptr->op2.constant);
+ GET_POLYMORPHIC_CACHE_SLOT(opline_ptr->op2.constant);
+ }
+ GET_NODE(result, opline_ptr->result);
return;
}
}
+ if (zend_is_function_or_method_call(object)) {
+ init_op(&opline TSRMLS_CC);
+ opline.opcode = ZEND_SEPARATE;
+ SET_NODE(opline.op1, object);
+ SET_UNUSED(opline.op2);
+ opline.result_type = IS_VAR;
+ opline.result.var = opline.op1.var;
+ zend_llist_add_element(fetch_list_ptr, &opline);
+ }
+
init_op(&opline TSRMLS_CC);
opline.opcode = ZEND_FETCH_OBJ_W; /* the backpatching routine assumes W */
- opline.result.op_type = IS_VAR;
- opline.result.u.EA.type = 0;
- opline.result.u.var = get_temporary_variable(CG(active_op_array));
- opline.op1 = *object;
- opline.op2 = *property;
- *result = opline.result;
+ opline.result_type = IS_VAR;
+ opline.result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline.op1, object);
+ SET_NODE(opline.op2, property);
+ if (opline.op2_type == IS_CONST && Z_TYPE(CONSTANT(opline.op2.constant)) == IS_STRING) {
+ CALCULATE_LITERAL_HASH(opline.op2.constant);
+ GET_POLYMORPHIC_CACHE_SLOT(opline.op2.constant);
+ }
+ GET_NODE(result, opline.result);
zend_llist_add_element(fetch_list_ptr, &opline);
}
@@ -3775,40 +5350,6 @@ void zend_do_halt_compiler_register(TSRMLS_D) /* {{{ */
}
/* }}} */
-void zend_do_declare_implicit_property(TSRMLS_D) /* {{{ */
-{
-/* Fixes bug #26182. Not sure why we needed to do this in the first place.
- Has to be checked with Zeev.
-*/
-#if ANDI_0
- zend_op *opline_ptr;
- zend_llist_element *le;
- zend_llist *fetch_list_ptr;
-
-
- zend_stack_top(&CG(bp_stack), (void **) &fetch_list_ptr);
-
- if (fetch_list_ptr->count != 1) {
- return;
- }
-
- le = fetch_list_ptr->head;
- opline_ptr = (zend_op *) le->data;
-
- if (opline_ptr->op1.op_type == IS_UNUSED
- && CG(active_class_entry)
- && opline_ptr->op2.op_type == IS_CONST
- && !zend_hash_exists(&CG(active_class_entry)->properties_info, opline_ptr->op2.u.constant.value.str.val, opline_ptr->op2.u.constant.value.str.len+1)) {
- znode property;
-
- property = opline_ptr->op2;
- property.u.constant.value.str.val = estrndup(opline_ptr->op2.u.constant.value.str.val, opline_ptr->op2.u.constant.value.str.len);
- zend_do_declare_property(&property, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_IMPLICIT_PUBLIC TSRMLS_CC);
- }
-#endif
-}
-/* }}} */
-
void zend_do_push_object(const znode *object TSRMLS_DC) /* {{{ */
{
zend_stack_push(&CG(object_stack), object, sizeof(znode));
@@ -3832,12 +5373,12 @@ void zend_do_begin_new_object(znode *new_token, znode *class_type TSRMLS_DC) /*
zend_op *opline;
unsigned char *ptr = NULL;
- new_token->u.opline_num = get_next_op_number(CG(active_op_array));
+ new_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_NEW;
- opline->result.op_type = IS_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *class_type;
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, class_type);
SET_UNUSED(opline->op2);
zend_stack_push(&CG(function_call_stack), (void *) &ptr, sizeof(unsigned char *));
@@ -3851,8 +5392,8 @@ void zend_do_end_new_object(znode *result, const znode *new_token, const znode *
zend_do_end_function_call(NULL, &ctor_result, argument_list, 1, 0 TSRMLS_CC);
zend_do_free(&ctor_result TSRMLS_CC);
- CG(active_op_array)->opcodes[new_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
- *result = CG(active_op_array)->opcodes[new_token->u.opline_num].result;
+ CG(active_op_array)->opcodes[new_token->u.op.opline_num].op2.opline_num = get_next_op_number(CG(active_op_array));
+ GET_NODE(result, CG(active_op_array)->opcodes[new_token->u.op.opline_num].result);
}
/* }}} */
@@ -3889,10 +5430,10 @@ static zend_constant* zend_get_ct_const(const zval *const_name, int all_internal
return c;
}
if (all_internal_constants_substitution &&
- (c->flags & CONST_PERSISTENT) &&
- !(CG(compiler_options) & ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION) &&
- Z_TYPE(c->value) != IS_CONSTANT &&
- Z_TYPE(c->value) != IS_CONSTANT_ARRAY) {
+ (c->flags & CONST_PERSISTENT) &&
+ !(CG(compiler_options) & ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION) &&
+ Z_TYPE(c->value) != IS_CONSTANT &&
+ Z_TYPE(c->value) != IS_CONSTANT_ARRAY) {
return c;
}
return NULL;
@@ -3932,7 +5473,7 @@ void zend_do_fetch_constant(znode *result, znode *constant_container, znode *con
if (ZEND_FETCH_CLASS_STATIC == type) {
zend_error(E_ERROR, "\"static::\" is not allowed in compile-time constants");
} else if (ZEND_FETCH_CLASS_DEFAULT == type) {
- zend_resolve_class_name(constant_container, &fetch_type, 1 TSRMLS_CC);
+ zend_resolve_class_name(constant_container, fetch_type, 1 TSRMLS_CC);
}
zend_do_build_full_name(NULL, constant_container, constant_name, 1 TSRMLS_CC);
*result = *constant_container;
@@ -3941,18 +5482,29 @@ void zend_do_fetch_constant(znode *result, znode *constant_container, znode *con
case ZEND_RT:
if (constant_container->op_type == IS_CONST &&
ZEND_FETCH_CLASS_DEFAULT == zend_get_class_fetch_type(Z_STRVAL(constant_container->u.constant), Z_STRLEN(constant_container->u.constant))) {
- zend_resolve_class_name(constant_container, &fetch_type, 1 TSRMLS_CC);
+ zend_resolve_class_name(constant_container, fetch_type, 1 TSRMLS_CC);
} else {
zend_do_fetch_class(&tmp, constant_container TSRMLS_CC);
constant_container = &tmp;
}
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_FETCH_CONSTANT;
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *constant_container;
- opline->op2 = *constant_name;
- *result = opline->result;
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ if (constant_container->op_type == IS_CONST) {
+ opline->op1_type = IS_CONST;
+ opline->op1.constant = zend_add_class_name_literal(CG(active_op_array), &constant_container->u.constant TSRMLS_CC);
+ } else {
+ SET_NODE(opline->op1, constant_container);
+ }
+ SET_NODE(opline->op2, constant_name);
+ CALCULATE_LITERAL_HASH(opline->op2.constant);
+ if (opline->op1_type == IS_CONST) {
+ GET_CACHE_SLOT(opline->op2.constant);
+ } else {
+ GET_POLYMORPHIC_CACHE_SLOT(opline->op2.constant);
+ }
+ GET_NODE(result, opline->result);
break;
}
return;
@@ -3988,17 +5540,25 @@ void zend_do_fetch_constant(znode *result, znode *constant_container, znode *con
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_FETCH_CONSTANT;
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- *result = opline->result;
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ GET_NODE(result, opline->result);
SET_UNUSED(opline->op1);
- if(compound) {
+ opline->op2_type = IS_CONST;
+ if (compound) {
/* the name is unambiguous */
opline->extended_value = 0;
- } else {
+ opline->op2.constant = zend_add_const_name_literal(CG(active_op_array), &constant_name->u.constant, 0 TSRMLS_CC);
+ } else {
opline->extended_value = IS_CONSTANT_UNQUALIFIED;
+ if (CG(current_namespace)) {
+ opline->extended_value |= IS_CONSTANT_IN_NAMESPACE;
+ opline->op2.constant = zend_add_const_name_literal(CG(active_op_array), &constant_name->u.constant, 1 TSRMLS_CC);
+ } else {
+ opline->op2.constant = zend_add_const_name_literal(CG(active_op_array), &constant_name->u.constant, 0 TSRMLS_CC);
+ }
}
- opline->op2 = *constant_name;
+ GET_CACHE_SLOT(opline->op2.constant);
break;
}
}
@@ -4017,25 +5577,23 @@ void zend_do_shell_exec(znode *result, const znode *cmd TSRMLS_DC) /* {{{ */
opline->opcode = ZEND_SEND_VAR;
break;
}
- opline->op1 = *cmd;
- opline->op2.u.opline_num = 0;
+ SET_NODE(opline->op1, cmd);
+ opline->op2.opline_num = 0;
opline->extended_value = ZEND_DO_FCALL;
SET_UNUSED(opline->op2);
/* FIXME: exception support not added to this op2 */
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_DO_FCALL;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->result.op_type = IS_VAR;
- Z_STRVAL(opline->op1.u.constant) = estrndup("shell_exec", sizeof("shell_exec")-1);
- Z_STRLEN(opline->op1.u.constant) = sizeof("shell_exec")-1;
- INIT_PZVAL(&opline->op1.u.constant);
- Z_TYPE(opline->op1.u.constant) = IS_STRING;
- opline->op1.op_type = IS_CONST;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ opline->result_type = IS_VAR;
+ LITERAL_STRINGL(opline->op1, estrndup("shell_exec", sizeof("shell_exec")-1), sizeof("shell_exec")-1, 0);
+ CALCULATE_LITERAL_HASH(opline->op1.constant);
+ opline->op1_type = IS_CONST;
+ GET_CACHE_SLOT(opline->op1.constant);
opline->extended_value = 1;
SET_UNUSED(opline->op2);
- ZVAL_LONG(&opline->op2.u.constant, zend_hash_func("shell_exec", sizeof("shell_exec")));
- *result = opline->result;
+ GET_NODE(result, opline->result);
}
/* }}} */
@@ -4044,13 +5602,25 @@ void zend_do_init_array(znode *result, const znode *expr, const znode *offset, z
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_INIT_ARRAY;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->result.op_type = IS_TMP_VAR;
- *result = opline->result;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ opline->result_type = IS_TMP_VAR;
+ GET_NODE(result, opline->result);
if (expr) {
- opline->op1 = *expr;
+ SET_NODE(opline->op1, expr);
if (offset) {
- opline->op2 = *offset;
+ SET_NODE(opline->op2, offset);
+ if (opline->op2_type == IS_CONST && Z_TYPE(CONSTANT(opline->op2.constant)) == IS_STRING) {
+ ulong index;
+ int numeric = 0;
+
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL(CONSTANT(opline->op2.constant)), Z_STRLEN(CONSTANT(opline->op2.constant))+1, index, numeric = 1);
+ if (numeric) {
+ zval_dtor(&CONSTANT(opline->op2.constant));
+ ZVAL_LONG(&CONSTANT(opline->op2.constant), index);
+ } else {
+ CALCULATE_LITERAL_HASH(opline->op2.constant);
+ }
+ }
} else {
SET_UNUSED(opline->op2);
}
@@ -4067,10 +5637,22 @@ void zend_do_add_array_element(znode *result, const znode *expr, const znode *of
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_ADD_ARRAY_ELEMENT;
- opline->result = *result;
- opline->op1 = *expr;
+ SET_NODE(opline->result, result);
+ SET_NODE(opline->op1, expr);
if (offset) {
- opline->op2 = *offset;
+ SET_NODE(opline->op2, offset);
+ if (opline->op2_type == IS_CONST && Z_TYPE(CONSTANT(opline->op2.constant)) == IS_STRING) {
+ ulong index;
+ int numeric = 0;
+
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL(CONSTANT(opline->op2.constant)), Z_STRLEN(CONSTANT(opline->op2.constant))+1, index, numeric = 1);
+ if (numeric) {
+ zval_dtor(&CONSTANT(opline->op2.constant));
+ ZVAL_LONG(&CONSTANT(opline->op2.constant), index);
+ } else {
+ CALCULATE_LITERAL_HASH(opline->op2.constant);
+ }
+ }
} else {
SET_UNUSED(opline->op2);
}
@@ -4186,19 +5768,16 @@ void zend_do_list_end(znode *result, znode *expr TSRMLS_DC) /* {{{ */
opline->opcode = ZEND_FETCH_DIM_TMP_VAR;
break;
}
- opline->extended_value = ZEND_FETCH_ADD_LOCK;
+ opline->extended_value |= ZEND_FETCH_ADD_LOCK;
} else {
opline->opcode = ZEND_FETCH_DIM_R;
}
- opline->result.op_type = IS_VAR;
- opline->result.u.EA.type = 0;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = last_container;
- opline->op2.op_type = IS_CONST;
- Z_TYPE(opline->op2.u.constant) = IS_LONG;
- Z_LVAL(opline->op2.u.constant) = *((int *) dimension->data);
- INIT_PZVAL(&opline->op2.u.constant);
- last_container = opline->result;
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, &last_container);
+ opline->op2_type = IS_CONST;
+ LITERAL_LONG(opline->op2, *((int *) dimension->data));
+ GET_NODE(&last_container, opline->result);
dimension = dimension->next;
}
((list_llist_element *) le->data)->value = last_container;
@@ -4224,6 +5803,33 @@ void zend_do_list_end(znode *result, znode *expr TSRMLS_DC) /* {{{ */
}
/* }}} */
+void zend_init_list(void *result, void *item TSRMLS_DC) /* {{{ */
+{
+ void** list = emalloc(sizeof(void*) * 2);
+
+ list[0] = item;
+ list[1] = NULL;
+
+ *(void**)result = list;
+}
+/* }}} */
+
+void zend_add_to_list(void *result, void *item TSRMLS_DC) /* {{{ */
+{
+ void** list = *(void**)result;
+ size_t n = 0;
+
+ while (list && list[n]) { n++; }
+
+ list = erealloc(list, sizeof(void*) * (n+2));
+
+ list[n] = item;
+ list[n+1] = NULL;
+
+ *(void**)result = list;
+}
+/* }}} */
+
void zend_do_fetch_static_variable(znode *varname, const znode *static_assignment, int fetch_type TSRMLS_DC) /* {{{ */
{
zval *tmp;
@@ -4239,6 +5845,9 @@ void zend_do_fetch_static_variable(znode *varname, const znode *static_assignmen
INIT_ZVAL(*tmp);
}
if (!CG(active_op_array)->static_variables) {
+ if (CG(active_op_array)->scope) {
+ CG(active_op_array)->scope->ce_flags |= ZEND_HAS_STATIC_IN_METHODS;
+ }
ALLOC_HASHTABLE(CG(active_op_array)->static_variables);
zend_hash_init(CG(active_op_array)->static_variables, 2, NULL, ZVAL_PTR_DTOR, 0);
}
@@ -4252,13 +5861,15 @@ void zend_do_fetch_static_variable(znode *varname, const znode *static_assignmen
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = (fetch_type == ZEND_FETCH_LEXICAL) ? ZEND_FETCH_R : ZEND_FETCH_W; /* the default mode must be Write, since fetch_simple_variable() is used to define function arguments */
- opline->result.op_type = IS_VAR;
- opline->result.u.EA.type = 0;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *varname;
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, varname);
+ if (opline->op1_type == IS_CONST) {
+ CALCULATE_LITERAL_HASH(opline->op1.constant);
+ }
SET_UNUSED(opline->op2);
- opline->op2.u.EA.type = ZEND_FETCH_STATIC;
- result = opline->result;
+ opline->extended_value = ZEND_FETCH_STATIC;
+ GET_NODE(&result, opline->result);
if (varname->op_type == IS_CONST) {
zval_copy_ctor(&varname->u.constant);
@@ -4274,9 +5885,7 @@ void zend_do_fetch_static_variable(znode *varname, const znode *static_assignmen
} else {
zend_do_assign_ref(NULL, &lval, &result TSRMLS_CC);
}
- CG(active_op_array)->opcodes[CG(active_op_array)->last-1].result.u.EA.type |= EXT_TYPE_UNUSED;
-
-/* zval_dtor(&varname->u.constant); */
+ CG(active_op_array)->opcodes[CG(active_op_array)->last-1].result_type |= EXT_TYPE_UNUSED;
}
/* }}} */
@@ -4285,7 +5894,7 @@ void zend_do_fetch_lexical_variable(znode *varname, zend_bool is_ref TSRMLS_DC)
znode value;
if (Z_STRLEN(varname->u.constant) == sizeof("this") - 1 &&
- memcmp(Z_STRVAL(varname->u.constant), "this", sizeof("this") - 1) == 0) {
+ memcmp(Z_STRVAL(varname->u.constant), "this", sizeof("this") - 1) == 0) {
zend_error(E_COMPILE_ERROR, "Cannot use $this as lexical variable");
return;
}
@@ -4314,13 +5923,15 @@ void zend_do_fetch_global_variable(znode *varname, const znode *static_assignmen
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_FETCH_W; /* the default mode must be Write, since fetch_simple_variable() is used to define function arguments */
- opline->result.op_type = IS_VAR;
- opline->result.u.EA.type = 0;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *varname;
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, varname);
+ if (opline->op1_type == IS_CONST) {
+ CALCULATE_LITERAL_HASH(opline->op1.constant);
+ }
SET_UNUSED(opline->op2);
- opline->op2.u.EA.type = fetch_type;
- result = opline->result;
+ opline->extended_value = fetch_type;
+ GET_NODE(&result, opline->result);
if (varname->op_type == IS_CONST) {
zval_copy_ctor(&varname->u.constant);
@@ -4328,7 +5939,7 @@ void zend_do_fetch_global_variable(znode *varname, const znode *static_assignmen
fetch_simple_variable(&lval, varname, 0 TSRMLS_CC); /* Relies on the fact that the default fetch is BP_VAR_W */
zend_do_assign_ref(NULL, &lval, &result TSRMLS_CC);
- CG(active_op_array)->opcodes[CG(active_op_array)->last-1].result.u.EA.type |= EXT_TYPE_UNUSED;
+ CG(active_op_array)->opcodes[CG(active_op_array)->last-1].result_type |= EXT_TYPE_UNUSED;
}
/* }}} */
@@ -4337,12 +5948,12 @@ void zend_do_cast(znode *result, const znode *expr, int type TSRMLS_DC) /* {{{ *
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_CAST;
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *expr;
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, expr);
SET_UNUSED(opline->op2);
opline->extended_value = type;
- *result = opline->result;
+ GET_NODE(result, opline->result);
}
/* }}} */
@@ -4353,12 +5964,12 @@ void zend_do_include_or_eval(int type, znode *result, const znode *op1 TSRMLS_DC
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_INCLUDE_OR_EVAL;
- opline->result.op_type = IS_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *op1;
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, op1);
SET_UNUSED(opline->op2);
- Z_LVAL(opline->op2.u.constant) = type;
- *result = opline->result;
+ opline->extended_value = type;
+ GET_NODE(result, opline->result);
}
zend_do_extended_fcall_end(TSRMLS_C);
}
@@ -4377,7 +5988,7 @@ void zend_do_indirect_references(znode *result, const znode *num_references, zno
fetch_simple_variable(result, variable, 1 TSRMLS_CC);
/* there is a chance someone is accessing $this */
if (CG(active_op_array)->scope && CG(active_op_array)->this_var == -1) {
- CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), estrndup("this", sizeof("this")-1), sizeof("this")-1);
+ CG(active_op_array)->this_var = lookup_cv(CG(active_op_array), estrndup("this", sizeof("this")-1), sizeof("this")-1, THIS_HASHVAL TSRMLS_CC);
}
}
/* }}} */
@@ -4391,23 +6002,25 @@ void zend_do_unset(const znode *variable TSRMLS_DC) /* {{{ */
if (variable->op_type == IS_CV) {
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_UNSET_VAR;
- opline->op1 = *variable;
+ SET_NODE(opline->op1, variable);
SET_UNUSED(opline->op2);
- opline->op2.u.EA.type = ZEND_FETCH_LOCAL;
SET_UNUSED(opline->result);
- opline->extended_value = ZEND_QUICK_SET;
+ opline->extended_value = ZEND_FETCH_LOCAL | ZEND_QUICK_SET;
} else {
last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1];
switch (last_op->opcode) {
case ZEND_FETCH_UNSET:
last_op->opcode = ZEND_UNSET_VAR;
+ SET_UNUSED(last_op->result);
break;
case ZEND_FETCH_DIM_UNSET:
last_op->opcode = ZEND_UNSET_DIM;
+ SET_UNUSED(last_op->result);
break;
case ZEND_FETCH_OBJ_UNSET:
last_op->opcode = ZEND_UNSET_OBJ;
+ SET_UNUSED(last_op->result);
break;
}
@@ -4426,11 +6039,10 @@ void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC
if (variable->op_type == IS_CV) {
last_op = get_next_op(CG(active_op_array) TSRMLS_CC);
last_op->opcode = ZEND_ISSET_ISEMPTY_VAR;
- last_op->op1 = *variable;
+ SET_NODE(last_op->op1, variable);
SET_UNUSED(last_op->op2);
- last_op->op2.u.EA.type = ZEND_FETCH_LOCAL;
- last_op->result.u.var = get_temporary_variable(CG(active_op_array));
- last_op->extended_value = ZEND_QUICK_SET;
+ last_op->result.var = get_temporary_variable(CG(active_op_array));
+ last_op->extended_value = ZEND_FETCH_LOCAL | ZEND_QUICK_SET;
} else {
last_op = &CG(active_op_array)->opcodes[get_next_op_number(CG(active_op_array))-1];
@@ -4445,12 +6057,11 @@ void zend_do_isset_or_isempty(int type, znode *result, znode *variable TSRMLS_DC
last_op->opcode = ZEND_ISSET_ISEMPTY_PROP_OBJ;
break;
}
- last_op->extended_value = 0;
}
- last_op->result.op_type = IS_TMP_VAR;
+ last_op->result_type = IS_TMP_VAR;
last_op->extended_value |= type;
- *result = last_op->result;
+ GET_NODE(result, last_op->result);
}
/* }}} */
@@ -4472,13 +6083,13 @@ void zend_do_instanceof(znode *result, const znode *expr, const znode *class_zno
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_INSTANCEOF;
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *expr;
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, expr);
- opline->op2 = *class_znode;
+ SET_NODE(opline->op2, class_znode);
- *result = opline->result;
+ GET_NODE(result, opline->result);
}
/* }}} */
@@ -4496,53 +6107,50 @@ void zend_do_foreach_begin(znode *foreach_token, znode *open_brackets_token, zno
is_variable = 1;
}
/* save the location of FETCH_W instruction(s) */
- open_brackets_token->u.opline_num = get_next_op_number(CG(active_op_array));
+ open_brackets_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
zend_do_end_variable_parse(array, BP_VAR_W, 0 TSRMLS_CC);
if (CG(active_op_array)->last > 0 &&
- CG(active_op_array)->opcodes[CG(active_op_array)->last-1].opcode == ZEND_FETCH_OBJ_W) {
+ CG(active_op_array)->opcodes[CG(active_op_array)->last-1].opcode == ZEND_FETCH_OBJ_W) {
/* Only lock the container if we are fetching from a real container and not $this */
- if (CG(active_op_array)->opcodes[CG(active_op_array)->last-1].op1.op_type == IS_VAR) {
+ if (CG(active_op_array)->opcodes[CG(active_op_array)->last-1].op1_type == IS_VAR) {
CG(active_op_array)->opcodes[CG(active_op_array)->last-1].extended_value |= ZEND_FETCH_ADD_LOCK;
push_container = 1;
}
}
} else {
is_variable = 0;
- open_brackets_token->u.opline_num = get_next_op_number(CG(active_op_array));
+ open_brackets_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
}
/* save the location of FE_RESET */
- foreach_token->u.opline_num = get_next_op_number(CG(active_op_array));
+ foreach_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
/* Preform array reset */
opline->opcode = ZEND_FE_RESET;
- opline->result.op_type = IS_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *array;
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, array);
SET_UNUSED(opline->op2);
opline->extended_value = is_variable ? ZEND_FE_RESET_VARIABLE : 0;
- dummy_opline.result = opline->result;
+ COPY_NODE(dummy_opline.result, opline->result);
if (push_container) {
- dummy_opline.op1 = CG(active_op_array)->opcodes[CG(active_op_array)->last-2].op1;
+ COPY_NODE(dummy_opline.op1, CG(active_op_array)->opcodes[CG(active_op_array)->last-2].op1);
} else {
- znode tmp;
-
- tmp.op_type = IS_UNUSED;
- dummy_opline.op1 = tmp;
+ dummy_opline.op1_type = IS_UNUSED;
}
zend_stack_push(&CG(foreach_copy_stack), (void *) &dummy_opline, sizeof(zend_op));
/* save the location of FE_FETCH */
- as_token->u.opline_num = get_next_op_number(CG(active_op_array));
+ as_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_FE_FETCH;
- opline->result.op_type = IS_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = dummy_opline.result;
+ opline->result_type = IS_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ COPY_NODE(opline->op1, dummy_opline.result);
opline->extended_value = 0;
SET_UNUSED(opline->op2);
@@ -4560,7 +6168,7 @@ void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token
znode dummy, value_node;
zend_bool assign_by_ref=0;
- opline = &CG(active_op_array)->opcodes[as_token->u.opline_num];
+ opline = &CG(active_op_array)->opcodes[as_token->u.op.opline_num];
if (key->op_type != IS_UNUSED) {
znode *tmp;
@@ -4573,38 +6181,42 @@ void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token
opline->extended_value |= ZEND_FE_FETCH_WITH_KEY;
}
- if ((key->op_type != IS_UNUSED) && (key->u.EA.type & ZEND_PARSED_REFERENCE_VARIABLE)) {
+ if ((key->op_type != IS_UNUSED) && (key->EA & ZEND_PARSED_REFERENCE_VARIABLE)) {
zend_error(E_COMPILE_ERROR, "Key element cannot be a reference");
}
- if (value->u.EA.type & ZEND_PARSED_REFERENCE_VARIABLE) {
+ if (value->EA & ZEND_PARSED_REFERENCE_VARIABLE) {
assign_by_ref = 1;
if (!(opline-1)->extended_value) {
zend_error(E_COMPILE_ERROR, "Cannot create references to elements of a temporary array expression");
}
/* Mark extended_value for assign-by-reference */
opline->extended_value |= ZEND_FE_FETCH_BYREF;
- CG(active_op_array)->opcodes[foreach_token->u.opline_num].extended_value |= ZEND_FE_RESET_REFERENCE;
+ CG(active_op_array)->opcodes[foreach_token->u.op.opline_num].extended_value |= ZEND_FE_RESET_REFERENCE;
} else {
zend_op *foreach_copy;
- zend_op *fetch = &CG(active_op_array)->opcodes[foreach_token->u.opline_num];
- zend_op *end = &CG(active_op_array)->opcodes[open_brackets_token->u.opline_num];
+ zend_op *fetch = &CG(active_op_array)->opcodes[foreach_token->u.op.opline_num];
+ zend_op *end = &CG(active_op_array)->opcodes[open_brackets_token->u.op.opline_num];
/* Change "write context" into "read context" */
fetch->extended_value = 0; /* reset ZEND_FE_RESET_VARIABLE */
while (fetch != end) {
--fetch;
- if (fetch->opcode == ZEND_FETCH_DIM_W && fetch->op2.op_type == IS_UNUSED) {
+ if (fetch->opcode == ZEND_FETCH_DIM_W && fetch->op2_type == IS_UNUSED) {
zend_error(E_COMPILE_ERROR, "Cannot use [] for reading");
}
- fetch->opcode -= 3; /* FETCH_W -> FETCH_R */
+ if (fetch->opcode == ZEND_SEPARATE) {
+ MAKE_NOP(fetch);
+ } else {
+ fetch->opcode -= 3; /* FETCH_W -> FETCH_R */
+ }
}
/* prevent double SWITCH_FREE */
zend_stack_top(&CG(foreach_copy_stack), (void **) &foreach_copy);
- foreach_copy->op1.op_type = IS_UNUSED;
+ foreach_copy->op1_type = IS_UNUSED;
}
- value_node = opline->result;
+ GET_NODE(&value_node, opline->result);
if (assign_by_ref) {
zend_do_end_variable_parse(value, BP_VAR_W, 0 TSRMLS_CC);
@@ -4618,11 +6230,10 @@ void zend_do_foreach_cont(znode *foreach_token, const znode *open_brackets_token
if (key->op_type != IS_UNUSED) {
znode key_node;
- opline = &CG(active_op_array)->opcodes[as_token->u.opline_num+1];
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.EA.type = 0;
- opline->result.u.opline_num = get_temporary_variable(CG(active_op_array));
- key_node = opline->result;
+ opline = &CG(active_op_array)->opcodes[as_token->u.op.opline_num+1];
+ opline->result_type = IS_TMP_VAR;
+ opline->result.opline_num = get_temporary_variable(CG(active_op_array));
+ GET_NODE(&key_node, opline->result);
zend_do_assign(&dummy, key, &key_node TSRMLS_CC);
zend_do_free(&dummy TSRMLS_CC);
@@ -4639,14 +6250,14 @@ void zend_do_foreach_end(const znode *foreach_token, const znode *as_token TSRML
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_JMP;
- opline->op1.u.opline_num = as_token->u.opline_num;
+ opline->op1.opline_num = as_token->u.op.opline_num;
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
- CG(active_op_array)->opcodes[foreach_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array)); /* FE_RESET */
- CG(active_op_array)->opcodes[as_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array)); /* FE_FETCH */
+ CG(active_op_array)->opcodes[foreach_token->u.op.opline_num].op2.opline_num = get_next_op_number(CG(active_op_array)); /* FE_RESET */
+ CG(active_op_array)->opcodes[as_token->u.op.opline_num].op2.opline_num = get_next_op_number(CG(active_op_array)); /* FE_FETCH */
- do_end_loop(as_token->u.opline_num, 1 TSRMLS_CC);
+ do_end_loop(as_token->u.op.opline_num, 1 TSRMLS_CC);
zend_stack_top(&CG(foreach_copy_stack), (void **) &container_ptr);
generate_free_foreach_copy(container_ptr TSRMLS_CC);
@@ -4667,11 +6278,7 @@ void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC) /* {{{ */
if (!zend_binary_strcasecmp(var->u.constant.value.str.val, var->u.constant.value.str.len, "ticks", sizeof("ticks")-1)) {
convert_to_long(&val->u.constant);
CG(declarables).ticks = val->u.constant;
-#ifdef ZEND_MULTIBYTE
} else if (!zend_binary_strcasecmp(var->u.constant.value.str.val, var->u.constant.value.str.len, "encoding", sizeof("encoding")-1)) {
- zend_encoding *new_encoding, *old_encoding;
- zend_encoding_filter old_input_filter;
-
if ((Z_TYPE(val->u.constant) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
zend_error(E_COMPILE_ERROR, "Cannot use constants as encoding");
}
@@ -4686,8 +6293,8 @@ void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC) /* {{{ */
int num = CG(active_op_array)->last;
/* ignore ZEND_EXT_STMT and ZEND_TICKS */
while (num > 0 &&
- (CG(active_op_array)->opcodes[num-1].opcode == ZEND_EXT_STMT ||
- CG(active_op_array)->opcodes[num-1].opcode == ZEND_TICKS)) {
+ (CG(active_op_array)->opcodes[num-1].opcode == ZEND_EXT_STMT ||
+ CG(active_op_array)->opcodes[num-1].opcode == ZEND_TICKS)) {
--num;
}
@@ -4695,31 +6302,32 @@ void zend_do_declare_stmt(znode *var, znode *val TSRMLS_DC) /* {{{ */
zend_error(E_COMPILE_ERROR, "Encoding declaration pragma must be the very first statement in the script");
}
}
- CG(encoding_declared) = 1;
- convert_to_string(&val->u.constant);
- new_encoding = zend_multibyte_fetch_encoding(val->u.constant.value.str.val);
- if (!new_encoding) {
- zend_error(E_COMPILE_WARNING, "Unsupported encoding [%s]", val->u.constant.value.str.val);
- } else {
- old_input_filter = LANG_SCNG(input_filter);
- old_encoding = LANG_SCNG(script_encoding);
- zend_multibyte_set_filter(new_encoding TSRMLS_CC);
-
- /* need to re-scan if input filter changed */
- if (old_input_filter != LANG_SCNG(input_filter) ||
- ((old_input_filter == zend_multibyte_script_encoding_filter) &&
- (new_encoding != old_encoding))) {
- zend_multibyte_yyinput_again(old_input_filter, old_encoding TSRMLS_CC);
+ if (CG(multibyte)) {
+ const zend_encoding *new_encoding, *old_encoding;
+ zend_encoding_filter old_input_filter;
+
+ CG(encoding_declared) = 1;
+
+ convert_to_string(&val->u.constant);
+ new_encoding = zend_multibyte_fetch_encoding(val->u.constant.value.str.val TSRMLS_CC);
+ if (!new_encoding) {
+ zend_error(E_COMPILE_WARNING, "Unsupported encoding [%s]", val->u.constant.value.str.val);
+ } else {
+ old_input_filter = LANG_SCNG(input_filter);
+ old_encoding = LANG_SCNG(script_encoding);
+ zend_multibyte_set_filter(new_encoding TSRMLS_CC);
+
+ /* need to re-scan if input filter changed */
+ if (old_input_filter != LANG_SCNG(input_filter) ||
+ (old_input_filter && new_encoding != old_encoding)) {
+ zend_multibyte_yyinput_again(old_input_filter, old_encoding TSRMLS_CC);
+ }
}
+ } else {
+ zend_error(E_COMPILE_WARNING, "declare(encoding=...) ignored because Zend multibyte feature is turned off by settings");
}
- efree(val->u.constant.value.str.val);
-#else /* !ZEND_MULTIBYTE */
- } else if (!zend_binary_strcasecmp(var->u.constant.value.str.val, var->u.constant.value.str.len, "encoding", sizeof("encoding")-1)) {
- /* Do not generate any kind of warning for encoding declares */
- /* zend_error(E_COMPILE_WARNING, "Declare encoding [%s] not supported", val->u.constant.value.str.val); */
zval_dtor(&val->u.constant);
-#endif /* ZEND_MULTIBYTE */
} else {
zend_error(E_COMPILE_WARNING, "Unsupported declare '%s'", var->u.constant.value.str.val);
zval_dtor(&val->u.constant);
@@ -4734,7 +6342,7 @@ void zend_do_declare_end(const znode *declare_token TSRMLS_DC) /* {{{ */
zend_stack_top(&CG(declare_stack), (void **) &declarables);
/* We should restore if there was more than (current - start) - (ticks?1:0) opcodes */
- if ((get_next_op_number(CG(active_op_array)) - declare_token->u.opline_num) - ((Z_LVAL(CG(declarables).ticks))?1:0)) {
+ if ((get_next_op_number(CG(active_op_array)) - declare_token->u.op.opline_num) - ((Z_LVAL(CG(declarables).ticks))?1:0)) {
CG(declarables) = *declarables;
}
}
@@ -4745,7 +6353,7 @@ void zend_do_exit(znode *result, const znode *message TSRMLS_DC) /* {{{ */
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_EXIT;
- opline->op1 = *message;
+ SET_NODE(opline->op1, message);
SET_UNUSED(opline->op2);
result->op_type = IS_CONST;
@@ -4759,11 +6367,11 @@ void zend_do_begin_silence(znode *strudel_token TSRMLS_DC) /* {{{ */
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_BEGIN_SILENCE;
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
+ opline->result_type = IS_TMP_VAR;
+ opline->result.var = get_temporary_variable(CG(active_op_array));
SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
- *strudel_token = opline->result;
+ GET_NODE(strudel_token, opline->result);
}
/* }}} */
@@ -4772,7 +6380,7 @@ void zend_do_end_silence(const znode *strudel_token TSRMLS_DC) /* {{{ */
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_END_SILENCE;
- opline->op1 = *strudel_token;
+ SET_NODE(opline->op1, strudel_token);
SET_UNUSED(opline->op2);
}
/* }}} */
@@ -4782,15 +6390,20 @@ void zend_do_jmp_set(const znode *value, znode *jmp_token, znode *colon_token TS
int op_number = get_next_op_number(CG(active_op_array));
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
- opline->opcode = ZEND_JMP_SET;
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *value;
+ if (value->op_type == IS_VAR || value->op_type == IS_CV) {
+ opline->opcode = ZEND_JMP_SET_VAR;
+ opline->result_type = IS_VAR;
+ } else {
+ opline->opcode = ZEND_JMP_SET;
+ opline->result_type = IS_TMP_VAR;
+ }
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, value);
SET_UNUSED(opline->op2);
- *colon_token = opline->result;
+ GET_NODE(colon_token, opline->result);
- jmp_token->u.opline_num = op_number;
+ jmp_token->u.op.opline_num = op_number;
INC_BPC(CG(active_op_array));
}
@@ -4800,15 +6413,26 @@ void zend_do_jmp_set_else(znode *result, const znode *false_value, const znode *
{
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
- opline->opcode = ZEND_QM_ASSIGN;
+ SET_NODE(opline->result, colon_token);
+ if (colon_token->op_type == IS_TMP_VAR) {
+ if (false_value->op_type == IS_VAR || false_value->op_type == IS_CV) {
+ CG(active_op_array)->opcodes[jmp_token->u.op.opline_num].opcode = ZEND_JMP_SET_VAR;
+ CG(active_op_array)->opcodes[jmp_token->u.op.opline_num].result_type = IS_VAR;
+ opline->opcode = ZEND_QM_ASSIGN_VAR;
+ opline->result_type = IS_VAR;
+ } else {
+ opline->opcode = ZEND_QM_ASSIGN;
+ }
+ } else {
+ opline->opcode = ZEND_QM_ASSIGN_VAR;
+ }
opline->extended_value = 0;
- opline->result = *colon_token;
- opline->op1 = *false_value;
+ SET_NODE(opline->op1, false_value);
SET_UNUSED(opline->op2);
- *result = opline->result;
+ GET_NODE(result, opline->result);
- CG(active_op_array)->opcodes[jmp_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[jmp_token->u.op.opline_num].op2.opline_num = get_next_op_number(CG(active_op_array));
DEC_BPC(CG(active_op_array));
}
@@ -4822,10 +6446,10 @@ void zend_do_begin_qm_op(const znode *cond, znode *qm_token TSRMLS_DC) /* {{{ */
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_JMPZ;
- opline->op1 = *cond;
+ SET_NODE(opline->op1, cond);
SET_UNUSED(opline->op2);
- opline->op2.u.opline_num = jmpz_op_number;
- *qm_token = opline->op2;
+ opline->op2.opline_num = jmpz_op_number;
+ GET_NODE(qm_token, opline->op2);
INC_BPC(CG(active_op_array));
}
@@ -4835,16 +6459,21 @@ void zend_do_qm_true(const znode *true_value, znode *qm_token, znode *colon_toke
{
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
- CG(active_op_array)->opcodes[qm_token->u.opline_num].op2.u.opline_num = get_next_op_number(CG(active_op_array))+1; /* jmp over the ZEND_JMP */
+ CG(active_op_array)->opcodes[qm_token->u.op.opline_num].op2.opline_num = get_next_op_number(CG(active_op_array))+1; /* jmp over the ZEND_JMP */
- opline->opcode = ZEND_QM_ASSIGN;
- opline->result.op_type = IS_TMP_VAR;
- opline->result.u.var = get_temporary_variable(CG(active_op_array));
- opline->op1 = *true_value;
+ if (true_value->op_type == IS_VAR || true_value->op_type == IS_CV) {
+ opline->opcode = ZEND_QM_ASSIGN_VAR;
+ opline->result_type = IS_VAR;
+ } else {
+ opline->opcode = ZEND_QM_ASSIGN;
+ opline->result_type = IS_TMP_VAR;
+ }
+ opline->result.var = get_temporary_variable(CG(active_op_array));
+ SET_NODE(opline->op1, true_value);
SET_UNUSED(opline->op2);
- *qm_token = opline->result;
- colon_token->u.opline_num = get_next_op_number(CG(active_op_array));
+ GET_NODE(qm_token, opline->result);
+ colon_token->u.op.opline_num = get_next_op_number(CG(active_op_array));
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_JMP;
@@ -4857,14 +6486,25 @@ void zend_do_qm_false(znode *result, const znode *false_value, const znode *qm_t
{
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
- opline->opcode = ZEND_QM_ASSIGN;
- opline->result = *qm_token;
- opline->op1 = *false_value;
+ SET_NODE(opline->result, qm_token);
+ if (qm_token->op_type == IS_TMP_VAR) {
+ if (false_value->op_type == IS_VAR || false_value->op_type == IS_CV) {
+ CG(active_op_array)->opcodes[colon_token->u.op.opline_num - 1].opcode = ZEND_QM_ASSIGN_VAR;
+ CG(active_op_array)->opcodes[colon_token->u.op.opline_num - 1].result_type = IS_VAR;
+ opline->opcode = ZEND_QM_ASSIGN_VAR;
+ opline->result_type = IS_VAR;
+ } else {
+ opline->opcode = ZEND_QM_ASSIGN;
+ }
+ } else {
+ opline->opcode = ZEND_QM_ASSIGN_VAR;
+ }
+ SET_NODE(opline->op1, false_value);
SET_UNUSED(opline->op2);
- CG(active_op_array)->opcodes[colon_token->u.opline_num].op1.u.opline_num = get_next_op_number(CG(active_op_array));
+ CG(active_op_array)->opcodes[colon_token->u.op.opline_num].op1.opline_num = get_next_op_number(CG(active_op_array));
- *result = opline->result;
+ GET_NODE(result, opline->result);
DEC_BPC(CG(active_op_array));
}
@@ -4923,23 +6563,18 @@ void zend_do_ticks(TSRMLS_D) /* {{{ */
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_TICKS;
- opline->op1.u.constant = CG(declarables).ticks;
- opline->op1.op_type = IS_CONST;
+ SET_UNUSED(opline->op1);
SET_UNUSED(opline->op2);
+ opline->extended_value = Z_LVAL(CG(declarables).ticks);
}
/* }}} */
-void zend_auto_global_dtor(zend_auto_global *auto_global) /* {{{ */
-{
- free(auto_global->name);
-}
-/* }}} */
-
-zend_bool zend_is_auto_global(const char *name, uint name_len TSRMLS_DC) /* {{{ */
+zend_bool zend_is_auto_global_quick(const char *name, uint name_len, ulong hashval TSRMLS_DC) /* {{{ */
{
zend_auto_global *auto_global;
+ ulong hash = hashval ? hashval : zend_hash_func(name, name_len+1);
- if (zend_hash_find(CG(auto_globals), name, name_len+1, (void **) &auto_global)==SUCCESS) {
+ if (zend_hash_quick_find(CG(auto_globals), name, name_len+1, hash, (void **) &auto_global)==SUCCESS) {
if (auto_global->armed) {
auto_global->armed = auto_global->auto_global_callback(auto_global->name, auto_global->name_len TSRMLS_CC);
}
@@ -4949,18 +6584,44 @@ zend_bool zend_is_auto_global(const char *name, uint name_len TSRMLS_DC) /* {{{
}
/* }}} */
-int zend_register_auto_global(const char *name, uint name_len, zend_auto_global_callback auto_global_callback TSRMLS_DC) /* {{{ */
+zend_bool zend_is_auto_global(const char *name, uint name_len TSRMLS_DC) /* {{{ */
+{
+ return zend_is_auto_global_quick(name, name_len, 0 TSRMLS_CC);
+}
+/* }}} */
+
+int zend_register_auto_global(const char *name, uint name_len, zend_bool jit, zend_auto_global_callback auto_global_callback TSRMLS_DC) /* {{{ */
{
zend_auto_global auto_global;
- auto_global.name = zend_strndup(name, name_len);
+ auto_global.name = zend_new_interned_string((char*)name, name_len + 1, 0 TSRMLS_CC);
auto_global.name_len = name_len;
auto_global.auto_global_callback = auto_global_callback;
+ auto_global.jit = jit;
return zend_hash_add(CG(auto_globals), name, name_len+1, &auto_global, sizeof(zend_auto_global), NULL);
}
/* }}} */
+static int zend_auto_global_init(zend_auto_global *auto_global TSRMLS_DC) /* {{{ */
+{
+ if (auto_global->jit) {
+ auto_global->armed = 1;
+ } else if (auto_global->auto_global_callback) {
+ auto_global->armed = auto_global->auto_global_callback(auto_global->name, auto_global->name_len TSRMLS_CC);
+ } else {
+ auto_global->armed = 0;
+ }
+ return 0;
+}
+/* }}} */
+
+ZEND_API void zend_activate_auto_globals(TSRMLS_D) /* {{{ */
+{
+ zend_hash_apply(CG(auto_globals), (apply_func_t) zend_auto_global_init TSRMLS_CC);
+}
+/* }}} */
+
int zendlex(znode *zendlval TSRMLS_DC) /* {{{ */
{
int retval;
@@ -5009,15 +6670,11 @@ ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify
dtor_func_t zval_ptr_dtor_func = ((persistent_hashes) ? ZVAL_INTERNAL_PTR_DTOR : ZVAL_PTR_DTOR);
ce->refcount = 1;
- ce->constants_updated = 0;
ce->ce_flags = 0;
- ce->doc_comment = NULL;
- ce->doc_comment_len = 0;
-
- zend_hash_init_ex(&ce->default_properties, 0, NULL, zval_ptr_dtor_func, persistent_hashes, 0);
+ ce->default_properties_table = NULL;
+ ce->default_static_members_table = NULL;
zend_hash_init_ex(&ce->properties_info, 0, NULL, (dtor_func_t) (persistent_hashes ? zend_destroy_property_info_internal : zend_destroy_property_info), persistent_hashes, 0);
- zend_hash_init_ex(&ce->default_static_members, 0, NULL, zval_ptr_dtor_func, persistent_hashes, 0);
zend_hash_init_ex(&ce->constants_table, 0, NULL, zval_ptr_dtor_func, persistent_hashes, 0);
zend_hash_init_ex(&ce->function_table, 0, NULL, ZEND_FUNCTION_DTOR, persistent_hashes, 0);
@@ -5025,20 +6682,25 @@ ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify
#ifdef ZTS
int n = zend_hash_num_elements(CG(class_table));
- if (CG(static_members) && n >= CG(last_static_member)) {
+ if (CG(static_members_table) && n >= CG(last_static_member)) {
/* Support for run-time declaration: dl() */
CG(last_static_member) = n+1;
- CG(static_members) = realloc(CG(static_members), (n+1)*sizeof(HashTable*));
- CG(static_members)[n] = NULL;
+ CG(static_members_table) = realloc(CG(static_members_table), (n+1)*sizeof(zval**));
+ CG(static_members_table)[n] = NULL;
}
- ce->static_members = (HashTable*)(zend_intptr_t)n;
+ ce->static_members_table = (zval**)(zend_intptr_t)n;
#else
- ce->static_members = NULL;
+ ce->static_members_table = NULL;
#endif
} else {
- ce->static_members = &ce->default_static_members;
+ ce->static_members_table = ce->default_static_members_table;
+ ce->info.user.doc_comment = NULL;
+ ce->info.user.doc_comment_len = 0;
}
+ ce->default_properties_count = 0;
+ ce->default_static_members_count = 0;
+
if (nullify_handlers) {
ce->constructor = NULL;
ce->destructor = NULL;
@@ -5058,12 +6720,18 @@ ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify
ce->parent = NULL;
ce->num_interfaces = 0;
ce->interfaces = NULL;
- ce->module = NULL;
+ ce->num_traits = 0;
+ ce->traits = NULL;
+ ce->trait_aliases = NULL;
+ ce->trait_precedences = NULL;
ce->serialize = NULL;
ce->unserialize = NULL;
ce->serialize_func = NULL;
ce->unserialize_func = NULL;
- ce->builtin_functions = NULL;
+ if (ce->type == ZEND_INTERNAL_CLASS) {
+ ce->info.internal.module = NULL;
+ ce->info.internal.builtin_functions = NULL;
+ }
}
}
/* }}} */
@@ -5085,7 +6753,7 @@ int zend_get_class_fetch_type(const char *class_name, uint class_name_len) /* {{
}
/* }}} */
-ZEND_API char* zend_get_compiled_variable_name(const zend_op_array *op_array, zend_uint var, int* name_len) /* {{{ */
+ZEND_API const char* zend_get_compiled_variable_name(const zend_op_array *op_array, zend_uint var, int* name_len) /* {{{ */
{
if (name_len) {
*name_len = op_array->vars[var].name_len;
@@ -5099,7 +6767,7 @@ void zend_do_build_namespace_name(znode *result, znode *prefix, znode *name TSRM
if (prefix) {
*result = *prefix;
if (Z_TYPE(result->u.constant) == IS_STRING &&
- Z_STRLEN(result->u.constant) == 0) {
+ Z_STRLEN(result->u.constant) == 0) {
/* namespace\ */
if (CG(current_namespace)) {
znode tmp;
@@ -5147,8 +6815,8 @@ void zend_do_begin_namespace(const znode *name, zend_bool with_bracket TSRMLS_DC
/* ignore ZEND_EXT_STMT and ZEND_TICKS */
int num = CG(active_op_array)->last;
while (num > 0 &&
- (CG(active_op_array)->opcodes[num-1].opcode == ZEND_EXT_STMT ||
- CG(active_op_array)->opcodes[num-1].opcode == ZEND_TICKS)) {
+ (CG(active_op_array)->opcodes[num-1].opcode == ZEND_EXT_STMT ||
+ CG(active_op_array)->opcodes[num-1].opcode == ZEND_TICKS)) {
--num;
}
if (num > 0) {
@@ -5164,9 +6832,9 @@ void zend_do_begin_namespace(const znode *name, zend_bool with_bracket TSRMLS_DC
if (name) {
lcname = zend_str_tolower_dup(Z_STRVAL(name->u.constant), Z_STRLEN(name->u.constant));
if (((Z_STRLEN(name->u.constant) == sizeof("self")-1) &&
- !memcmp(lcname, "self", sizeof("self")-1)) ||
- ((Z_STRLEN(name->u.constant) == sizeof("parent")-1) &&
- !memcmp(lcname, "parent", sizeof("parent")-1))) {
+ !memcmp(lcname, "self", sizeof("self")-1)) ||
+ ((Z_STRLEN(name->u.constant) == sizeof("parent")-1) &&
+ !memcmp(lcname, "parent", sizeof("parent")-1))) {
zend_error(E_COMPILE_ERROR, "Cannot use '%s' as namespace name", Z_STRVAL(name->u.constant));
}
efree(lcname);
@@ -5190,7 +6858,7 @@ void zend_do_begin_namespace(const znode *name, zend_bool with_bracket TSRMLS_DC
efree(CG(current_import));
CG(current_import) = NULL;
}
-
+
if (CG(doc_comment)) {
efree(CG(doc_comment));
CG(doc_comment) = NULL;
@@ -5216,7 +6884,7 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{
if (new_name) {
name = &new_name->u.constant;
} else {
- char *p;
+ const char *p;
/* The form "use A\B" is eqivalent to "use A\B as B".
So we extract the last part of compound name to use as a new_name */
@@ -5234,9 +6902,9 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{
lcname = zend_str_tolower_dup(Z_STRVAL_P(name), Z_STRLEN_P(name));
if (((Z_STRLEN_P(name) == sizeof("self")-1) &&
- !memcmp(lcname, "self", sizeof("self")-1)) ||
- ((Z_STRLEN_P(name) == sizeof("parent")-1) &&
- !memcmp(lcname, "parent", sizeof("parent")-1))) {
+ !memcmp(lcname, "self", sizeof("self")-1)) ||
+ ((Z_STRLEN_P(name) == sizeof("parent")-1) &&
+ !memcmp(lcname, "parent", sizeof("parent")-1))) {
zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because '%s' is a special class name", Z_STRVAL_P(ns), Z_STRVAL_P(name), Z_STRVAL_P(name));
}
@@ -5259,7 +6927,7 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{
efree(c_ns_name);
} else if (zend_hash_find(CG(class_table), lcname, Z_STRLEN_P(name)+1, (void**)&pce) == SUCCESS &&
(*pce)->type == ZEND_USER_CLASS &&
- (*pce)->filename == CG(compiled_filename)) {
+ (*pce)->info.user.filename == CG(compiled_filename)) {
char *c_tmp = zend_str_tolower_dup(Z_STRVAL_P(ns), Z_STRLEN_P(ns));
if (Z_STRLEN_P(ns) != Z_STRLEN_P(name) ||
@@ -5273,6 +6941,9 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{
zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because the name is already in use", Z_STRVAL_P(ns), Z_STRVAL_P(name));
}
if (warn) {
+ if (!strcmp(Z_STRVAL_P(name), "strict")) {
+ zend_error(E_COMPILE_ERROR, "You seem to be trying to use a different language...");
+ }
zend_error(E_WARNING, "The use statement with non-compound name '%s' has no effect", Z_STRVAL_P(name));
}
efree(lcname);
@@ -5306,8 +6977,8 @@ void zend_do_declare_constant(znode *name, znode *value TSRMLS_DC) /* {{{ */
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
opline->opcode = ZEND_DECLARE_CONST;
SET_UNUSED(opline->result);
- opline->op1 = *name;
- opline->op2 = *value;
+ SET_NODE(opline->op1, name);
+ SET_NODE(opline->op2, value);
}
/* }}} */
@@ -5332,12 +7003,6 @@ void zend_do_end_namespace(TSRMLS_D) /* {{{ */
efree(CG(current_import));
CG(current_import) = NULL;
}
-
- if (CG(doc_comment)) {
- efree(CG(doc_comment));
- CG(doc_comment) = NULL;
- CG(doc_comment_len) = 0;
- }
}
/* }}} */
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index df607f1d4..bcd06d118 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -34,10 +34,10 @@
#define FREE_PNODE(znode) zval_dtor(&znode->u.constant);
-#define SET_UNUSED(op) (op).op_type = IS_UNUSED
+#define SET_UNUSED(op) op ## _type = IS_UNUSED
-#define INC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { ((op_array)->backpatch_count++); }
-#define DEC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { ((op_array)->backpatch_count--); }
+#define INC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { (CG(context).backpatch_count++); }
+#define DEC_BPC(op_array) if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) { (CG(context).backpatch_count--); }
#define HANDLE_INTERACTIVE() if (CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE) { execute_new_code(TSRMLS_C); }
#define DO_TICKS() if (Z_LVAL(CG(declarables).ticks)) { zend_do_ticks(TSRMLS_C); }
@@ -53,20 +53,44 @@
typedef struct _zend_op_array zend_op_array;
typedef struct _zend_op zend_op;
-typedef struct _znode {
+typedef struct _zend_compiler_context {
+ zend_uint opcodes_size;
+ int vars_size;
+ int literals_size;
+ int current_brk_cont;
+ int backpatch_count;
+ HashTable *labels;
+} zend_compiler_context;
+
+typedef struct _zend_literal {
+ zval constant;
+ zend_ulong hash_value;
+ zend_uint cache_slot;
+} zend_literal;
+
+#define Z_HASH_P(zv) \
+ (((zend_literal*)(zv))->hash_value)
+
+typedef union _znode_op {
+ zend_uint constant;
+ zend_uint var;
+ zend_uint num;
+ zend_ulong hash;
+ zend_uint opline_num; /* Needs to be signed */
+ zend_op *jmp_addr;
+ zval *zv;
+ zend_literal *literal;
+ void *ptr; /* Used for passing pointers from the compile to execution phase, currently used for traits */
+} znode_op;
+
+typedef struct _znode { /* used only during compilation */
int op_type;
union {
- zval constant;
-
- zend_uint var;
- zend_uint opline_num; /* Needs to be signed */
+ znode_op op;
+ zval constant; /* replaced by literal/zv */
zend_op_array *op_array;
- zend_op *jmp_addr;
- struct {
- zend_uint var; /* dummy */
- zend_uint type;
- } EA;
} u;
+ zend_uint EA; /* extended attributes */
} znode;
typedef struct _zend_execute_data zend_execute_data;
@@ -81,12 +105,15 @@ extern ZEND_API opcode_handler_t *zend_opcode_handlers;
struct _zend_op {
opcode_handler_t handler;
- znode result;
- znode op1;
- znode op2;
+ znode_op op1;
+ znode_op op2;
+ znode_op result;
ulong extended_value;
uint lineno;
zend_uchar opcode;
+ zend_uchar op1_type;
+ zend_uchar op2_type;
+ zend_uchar result_type;
};
@@ -107,6 +134,11 @@ typedef struct _zend_try_catch_element {
zend_uint catch_op; /* ketchup! */
} zend_try_catch_element;
+#if SIZEOF_LONG == 8
+#define THIS_HASHVAL 210728972157UL
+#else
+#define THIS_HASHVAL 275574653UL
+#endif
/* method flags (types) */
#define ZEND_ACC_STATIC 0x01
@@ -121,6 +153,7 @@ typedef struct _zend_try_catch_element {
#define ZEND_ACC_EXPLICIT_ABSTRACT_CLASS 0x20
#define ZEND_ACC_FINAL_CLASS 0x40
#define ZEND_ACC_INTERFACE 0x80
+#define ZEND_ACC_TRAIT 0x120
/* op_array flags */
#define ZEND_ACC_INTERACTIVE 0x10
@@ -151,21 +184,39 @@ typedef struct _zend_try_catch_element {
/* class implement interface(s) flag */
#define ZEND_ACC_IMPLEMENT_INTERFACES 0x80000
+#define ZEND_ACC_IMPLEMENT_TRAITS 0x400000
+
+/* class constants updated */
+#define ZEND_ACC_CONSTANTS_UPDATED 0x100000
+
+/* user class has methods with static variables */
+#define ZEND_HAS_STATIC_IN_METHODS 0x800000
+
#define ZEND_ACC_CLOSURE 0x100000
/* function flag for internal user call handlers __call, __callstatic */
#define ZEND_ACC_CALL_VIA_HANDLER 0x200000
+/* disable inline caching */
+#define ZEND_ACC_NEVER_CACHE 0x400000
+
+#define ZEND_ACC_PASS_REST_BY_REFERENCE 0x1000000
+#define ZEND_ACC_PASS_REST_PREFER_REF 0x2000000
+
+#define ZEND_ACC_RETURN_REFERENCE 0x4000000
+#define ZEND_ACC_DONE_PASS_TWO 0x8000000
+
char *zend_visibility_string(zend_uint fn_flags);
typedef struct _zend_property_info {
zend_uint flags;
- char *name;
+ const char *name;
int name_length;
ulong h;
- char *doc_comment;
+ int offset;
+ const char *doc_comment;
int doc_comment_len;
zend_class_entry *ce;
} zend_property_info;
@@ -176,15 +227,27 @@ typedef struct _zend_arg_info {
zend_uint name_len;
const char *class_name;
zend_uint class_name_len;
- zend_bool array_type_hint;
+ zend_uchar type_hint;
zend_bool allow_null;
zend_bool pass_by_reference;
- zend_bool return_reference;
- int required_num_args;
} zend_arg_info;
+/* the following structure repeats the layout of zend_arg_info,
+ * but its fields have different meaning. It's used as the first element of
+ * arg_info array to define properties of internal functions.
+ */
+typedef struct _zend_internal_function_info {
+ const char *_name;
+ zend_uint _name_len;
+ const char *_class_name;
+ zend_uint required_num_args;
+ zend_uchar _type_hint;
+ zend_bool return_reference;
+ zend_bool pass_rest_by_reference;
+} zend_internal_function_info;
+
typedef struct _zend_compiled_variable {
- char *name;
+ const char *name;
int name_len;
ulong hash_value;
} zend_compiled_variable;
@@ -192,32 +255,27 @@ typedef struct _zend_compiled_variable {
struct _zend_op_array {
/* Common elements */
zend_uchar type;
- char *function_name;
+ const char *function_name;
zend_class_entry *scope;
zend_uint fn_flags;
union _zend_function *prototype;
zend_uint num_args;
zend_uint required_num_args;
zend_arg_info *arg_info;
- zend_bool pass_rest_by_reference;
- unsigned char return_reference;
/* END of common elements */
- zend_bool done_pass_two;
-
zend_uint *refcount;
zend_op *opcodes;
- zend_uint last, size;
+ zend_uint last;
zend_compiled_variable *vars;
- int last_var, size_var;
+ int last_var;
zend_uint T;
zend_brk_cont_element *brk_cont_array;
int last_brk_cont;
- int current_brk_cont;
zend_try_catch_element *try_catch_array;
int last_try_catch;
@@ -225,18 +283,21 @@ struct _zend_op_array {
/* static variables support */
HashTable *static_variables;
- zend_op *start_op;
- int backpatch_count;
-
zend_uint this_var;
- char *filename;
+ const char *filename;
zend_uint line_start;
zend_uint line_end;
- char *doc_comment;
+ const char *doc_comment;
zend_uint doc_comment_len;
zend_uint early_binding; /* the linked list of delayed declarations */
+ zend_literal *literals;
+ int last_literal;
+
+ void **run_time_cache;
+ int last_cache_slot;
+
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
@@ -247,15 +308,13 @@ struct _zend_op_array {
typedef struct _zend_internal_function {
/* Common elements */
zend_uchar type;
- char * function_name;
+ const char * function_name;
zend_class_entry *scope;
zend_uint fn_flags;
union _zend_function *prototype;
zend_uint num_args;
zend_uint required_num_args;
zend_arg_info *arg_info;
- zend_bool pass_rest_by_reference;
- unsigned char return_reference;
/* END of common elements */
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
@@ -269,15 +328,13 @@ typedef union _zend_function {
struct {
zend_uchar type; /* never used */
- char *function_name;
+ const char *function_name;
zend_class_entry *scope;
zend_uint fn_flags;
union _zend_function *prototype;
zend_uint num_args;
zend_uint required_num_args;
zend_arg_info *arg_info;
- zend_bool pass_rest_by_reference;
- unsigned char return_reference;
} common;
zend_op_array op_array;
@@ -324,7 +381,6 @@ struct _zend_execute_data {
zend_class_entry *current_called_scope;
zval *current_this;
zval *current_object;
- struct _zend_op *call_opline;
};
#define EX(element) execute_data.element
@@ -336,8 +392,7 @@ struct _zend_execute_data {
#define IS_UNUSED (1<<3) /* Unused variable */
#define IS_CV (1<<4) /* Compiled variable */
-#define EXT_TYPE_UNUSED (1<<0)
-#define EXT_TYPE_FREE_ON_RETURN (2<<0)
+#define EXT_TYPE_UNUSED (1<<5)
#include "zend_globals.h"
@@ -346,6 +401,7 @@ BEGIN_EXTERN_C()
void init_compiler(TSRMLS_D);
void shutdown_compiler(TSRMLS_D);
void zend_init_compiler_data_structures(TSRMLS_D);
+void zend_init_compiler_context(TSRMLS_D);
extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC);
extern ZEND_API zend_op_array *(*zend_compile_string)(zval *source_string, char *filename TSRMLS_DC);
@@ -361,8 +417,8 @@ ZEND_API int zend_get_compiled_lineno(TSRMLS_D);
ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D);
void zend_resolve_non_class_name(znode *element_name, zend_bool check_namespace TSRMLS_DC);
-void zend_resolve_class_name(znode *class_name, ulong *fetch_type, int check_ns_name TSRMLS_DC);
-ZEND_API char* zend_get_compiled_variable_name(const zend_op_array *op_array, zend_uint var, int* name_len);
+void zend_resolve_class_name(znode *class_name, ulong fetch_type, int check_ns_name TSRMLS_DC);
+ZEND_API const char* zend_get_compiled_variable_name(const zend_op_array *op_array, zend_uint var, int* name_len);
#ifdef ZTS
const char *zend_get_zendtext(TSRMLS_D);
@@ -374,7 +430,7 @@ int zend_get_zendleng(TSRMLS_D);
void zend_do_binary_op(zend_uchar op, znode *result, const znode *op1, const znode *op2 TSRMLS_DC);
void zend_do_unary_op(zend_uchar op, znode *result, const znode *op1 TSRMLS_DC);
void zend_do_binary_assign_op(zend_uchar op, znode *result, const znode *op1, const znode *op2 TSRMLS_DC);
-void zend_do_assign(znode *result, znode *variable, const znode *value TSRMLS_DC);
+void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC);
void zend_do_assign_ref(znode *result, const znode *lvar, const znode *rvar TSRMLS_DC);
void fetch_simple_variable(znode *result, znode *varname, int bp TSRMLS_DC);
void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar op TSRMLS_DC);
@@ -423,7 +479,7 @@ void zend_do_add_variable(znode *result, const znode *op1, const znode *op2 TSRM
int zend_do_verify_access_types(const znode *current_access_type, const znode *new_modifier);
void zend_do_begin_function_declaration(znode *function_token, znode *function_name, int is_method, int return_reference, znode *fn_flags_znode TSRMLS_DC);
void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC);
-void zend_do_receive_arg(zend_uchar op, const znode *var, const znode *offset, const znode *initialization, znode *class_type, const znode *varname, zend_bool pass_by_reference TSRMLS_DC);
+void zend_do_receive_arg(zend_uchar op, znode *varname, const znode *offset, const znode *initialization, znode *class_type, zend_bool pass_by_reference TSRMLS_DC);
int zend_do_begin_function_call(znode *function_name, zend_bool check_namespace TSRMLS_DC);
void zend_do_begin_method_call(znode *left_bracket TSRMLS_DC);
void zend_do_clone(znode *result, const znode *expr TSRMLS_DC);
@@ -435,21 +491,37 @@ void zend_do_end_function_call(znode *function_name, znode *result, const znode
void zend_do_return(znode *expr, int do_end_vparse TSRMLS_DC);
void zend_do_handle_exception(TSRMLS_D);
-void zend_do_begin_lambda_function_declaration(znode *result, znode *function_token, int return_reference TSRMLS_DC);
+void zend_do_begin_lambda_function_declaration(znode *result, znode *function_token, int return_reference, int is_static TSRMLS_DC);
void zend_do_fetch_lexical_variable(znode *varname, zend_bool is_ref TSRMLS_DC);
void zend_do_try(znode *try_token TSRMLS_DC);
-void zend_do_begin_catch(znode *try_token, znode *catch_class, const znode *catch_var, znode *first_catch TSRMLS_DC);
+void zend_do_begin_catch(znode *try_token, znode *catch_class, znode *catch_var, znode *first_catch TSRMLS_DC);
void zend_do_end_catch(const znode *try_token TSRMLS_DC);
void zend_do_throw(const znode *expr TSRMLS_DC);
-ZEND_API int do_bind_function(zend_op *opline, HashTable *function_table, zend_bool compile_time);
-ZEND_API zend_class_entry *do_bind_class(const zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC);
-ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time TSRMLS_DC);
+ZEND_API int do_bind_function(const zend_op_array *op_array, zend_op *opline, HashTable *function_table, zend_bool compile_time);
+ZEND_API zend_class_entry *do_bind_class(const zend_op_array *op_array, const zend_op *opline, HashTable *class_table, zend_bool compile_time TSRMLS_DC);
+ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array *op_array, const zend_op *opline, HashTable *class_table, zend_class_entry *parent_ce, zend_bool compile_time TSRMLS_DC);
ZEND_API void zend_do_inherit_interfaces(zend_class_entry *ce, const zend_class_entry *iface TSRMLS_DC);
ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface TSRMLS_DC);
void zend_do_implements_interface(znode *interface_znode TSRMLS_DC);
+/* Trait related functions */
+void zend_add_trait_precedence(znode *precedence_znode TSRMLS_DC);
+void zend_add_trait_alias(znode *alias_znode TSRMLS_DC);
+
+
+void zend_do_implements_trait(znode *interface_znode /*, znode* aliases */ TSRMLS_DC);
+ZEND_API void zend_do_implement_trait(zend_class_entry *ce, zend_class_entry *trait TSRMLS_DC);
+ZEND_API void zend_do_bind_traits(zend_class_entry *ce TSRMLS_DC);
+void zend_prepare_trait_precedence(znode *result, znode *method_reference, znode *trait_list TSRMLS_DC);
+void zend_prepare_reference(znode *result, znode *class_name, znode *method_name TSRMLS_DC);
+void zend_prepare_trait_alias(znode *result, znode *method_reference, znode *modifiers, znode *alias TSRMLS_DC);
+
+void init_trait_alias_list(znode* result, const znode* trait_alias TSRMLS_DC);
+void add_trait_alias(znode* result, const znode* trait_alias TSRMLS_DC);
+void init_trait_alias(znode* result, const znode* method_name, const znode* alias, const znode* modifiers TSRMLS_DC);
+
ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC);
void zend_do_early_binding(TSRMLS_D);
ZEND_API void zend_do_delayed_early_binding(const zend_op_array *op_array TSRMLS_DC);
@@ -473,7 +545,6 @@ void zend_do_default_before_statement(const znode *case_list, znode *default_tok
void zend_do_begin_class_declaration(const znode *class_token, znode *class_name, const znode *parent_class_name TSRMLS_DC);
void zend_do_end_class_declaration(const znode *class_token, const znode *parent_token TSRMLS_DC);
void zend_do_declare_property(const znode *var_name, const znode *value, zend_uint access_type TSRMLS_DC);
-void zend_do_declare_implicit_property(TSRMLS_D);
void zend_do_declare_class_constant(znode *var_name, const znode *value TSRMLS_DC);
void zend_do_fetch_property(znode *result, znode *object, const znode *property TSRMLS_DC);
@@ -500,6 +571,11 @@ void zend_do_add_list_element(const znode *element TSRMLS_DC);
void zend_do_new_list_begin(TSRMLS_D);
void zend_do_new_list_end(TSRMLS_D);
+/* Functions for a null terminated pointer list, used for traits parsing and compilation */
+void zend_init_list(void *result, void *item TSRMLS_DC);
+void zend_add_to_list(void *result, void *item TSRMLS_DC);
+
+
void zend_do_cast(znode *result, const znode *expr, int type TSRMLS_DC);
void zend_do_include_or_eval(int type, znode *result, const znode *op1 TSRMLS_DC);
@@ -552,6 +628,7 @@ void zend_release_labels(TSRMLS_D);
ZEND_API void function_add_ref(zend_function *function);
#define INITIAL_OP_ARRAY_SIZE 64
+#define INITIAL_INTERACTIVE_OP_ARRAY_SIZE 8192
/* helper functions in zend_language_scanner.l */
@@ -564,6 +641,9 @@ ZEND_API void init_op_array(zend_op_array *op_array, zend_uchar type, int initia
ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC);
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC);
ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC);
+ZEND_API int zend_cleanup_user_class_data(zend_class_entry **pce TSRMLS_DC);
+ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce TSRMLS_DC);
+ZEND_API void zend_cleanup_internal_classes(TSRMLS_D);
ZEND_API int zend_cleanup_function_data(zend_function *function TSRMLS_DC);
ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC);
@@ -573,7 +653,7 @@ ZEND_API void destroy_zend_class(zend_class_entry **pce);
void zend_class_add_ref(zend_class_entry **ce);
ZEND_API void zend_mangle_property_name(char **dest, int *dest_length, const char *src1, int src1_length, const char *src2, int src2_length, int internal);
-ZEND_API int zend_unmangle_property_name(char *mangled_property, int mangled_property_len, char **prop_name, char **class_name);
+ZEND_API int zend_unmangle_property_name(const char *mangled_property, int mangled_property_len, const char **class_name, const char **prop_name);
#define ZEND_FUNCTION_DTOR (void (*)(void *)) zend_function_dtor
#define ZEND_CLASS_DTOR (void (*)(void *)) destroy_zend_class
@@ -593,22 +673,25 @@ ZEND_API char *zend_make_compiled_string_description(const char *name TSRMLS_DC)
ZEND_API void zend_initialize_class_data(zend_class_entry *ce, zend_bool nullify_handlers TSRMLS_DC);
int zend_get_class_fetch_type(const char *class_name, uint class_name_len);
-typedef zend_bool (*zend_auto_global_callback)(char *name, uint name_len TSRMLS_DC);
+typedef zend_bool (*zend_auto_global_callback)(const char *name, uint name_len TSRMLS_DC);
typedef struct _zend_auto_global {
- char *name;
+ const char *name;
uint name_len;
zend_auto_global_callback auto_global_callback;
+ zend_bool jit;
zend_bool armed;
} zend_auto_global;
-void zend_auto_global_dtor(zend_auto_global *auto_global);
-ZEND_API int zend_register_auto_global(const char *name, uint name_len, zend_auto_global_callback auto_global_callback TSRMLS_DC);
+ZEND_API int zend_register_auto_global(const char *name, uint name_len, zend_bool jit, zend_auto_global_callback auto_global_callback TSRMLS_DC);
+ZEND_API void zend_activate_auto_globals(TSRMLS_D);
ZEND_API zend_bool zend_is_auto_global(const char *name, uint name_len TSRMLS_DC);
-ZEND_API int zend_auto_global_disable_jit(const char *varname, zend_uint varname_length TSRMLS_DC);
+ZEND_API zend_bool zend_is_auto_global_quick(const char *name, uint name_len, ulong hashval TSRMLS_DC);
ZEND_API size_t zend_dirname(char *path, size_t len);
int zendlex(znode *zendlval TSRMLS_DC);
+int zend_add_literal(zend_op_array *op_array, const zval *zv TSRMLS_DC);
+
/* BEGIN: OPCODES */
#include "zend_vm_opcodes.h"
@@ -617,18 +700,6 @@ int zendlex(znode *zendlval TSRMLS_DC);
/* END: OPCODES */
-
-
-
-/* global/local fetches */
-#define ZEND_FETCH_GLOBAL 0
-#define ZEND_FETCH_LOCAL 1
-#define ZEND_FETCH_STATIC 2
-#define ZEND_FETCH_STATIC_MEMBER 3
-#define ZEND_FETCH_GLOBAL_LOCK 4
-#define ZEND_FETCH_LEXICAL 5
-
-
/* class fetches */
#define ZEND_FETCH_CLASS_DEFAULT 0
#define ZEND_FETCH_CLASS_SELF 1
@@ -638,6 +709,7 @@ int zendlex(znode *zendlval TSRMLS_DC);
#define ZEND_FETCH_CLASS_AUTO 5
#define ZEND_FETCH_CLASS_INTERFACE 6
#define ZEND_FETCH_CLASS_STATIC 7
+#define ZEND_FETCH_CLASS_TRAIT 14
#define ZEND_FETCH_CLASS_MASK 0x0f
#define ZEND_FETCH_CLASS_NO_AUTOLOAD 0x80
#define ZEND_FETCH_CLASS_SILENT 0x0100
@@ -680,23 +752,36 @@ int zendlex(znode *zendlval TSRMLS_DC);
#define ZEND_REQUIRE (1<<3)
#define ZEND_REQUIRE_ONCE (1<<4)
-#define ZEND_ISSET (1<<0)
-#define ZEND_ISEMPTY (1<<1)
-#define ZEND_ISSET_ISEMPTY_MASK (ZEND_ISSET | ZEND_ISEMPTY)
-#define ZEND_QUICK_SET (1<<2)
-
#define ZEND_CT (1<<0)
#define ZEND_RT (1<<1)
-#define ZEND_FETCH_STANDARD 0x00000000
-#define ZEND_FETCH_ADD_LOCK 0x08000000
-#define ZEND_FETCH_MAKE_REF 0x04000000
+/* global/local fetches */
+#define ZEND_FETCH_GLOBAL 0x00000000
+#define ZEND_FETCH_LOCAL 0x10000000
+#define ZEND_FETCH_STATIC 0x20000000
+#define ZEND_FETCH_STATIC_MEMBER 0x30000000
+#define ZEND_FETCH_GLOBAL_LOCK 0x40000000
+#define ZEND_FETCH_LEXICAL 0x50000000
+
+#define ZEND_FETCH_TYPE_MASK 0x70000000
+
+#define ZEND_FETCH_STANDARD 0x00000000
+#define ZEND_FETCH_ADD_LOCK 0x08000000
+#define ZEND_FETCH_MAKE_REF 0x04000000
+
+#define ZEND_ISSET 0x02000000
+#define ZEND_ISEMPTY 0x01000000
+#define ZEND_ISSET_ISEMPTY_MASK (ZEND_ISSET | ZEND_ISEMPTY)
+#define ZEND_QUICK_SET 0x00800000
+
+#define ZEND_FETCH_ARG_MASK 0x000fffff
#define ZEND_FE_FETCH_BYREF 1
#define ZEND_FE_FETCH_WITH_KEY 2
-#define ZEND_FE_RESET_VARIABLE 1
-#define ZEND_FE_RESET_REFERENCE 2
+#define ZEND_FE_RESET_VARIABLE (1<<0)
+#define ZEND_FE_RESET_REFERENCE (1<<1)
+#define EXT_TYPE_FREE_ON_RETURN (1<<2)
#define ZEND_MEMBER_FUNC_CALL 1<<0
@@ -709,22 +794,21 @@ int zendlex(znode *zendlval TSRMLS_DC);
#define ZEND_SEND_BY_REF 1
#define ZEND_SEND_PREFER_REF 2
-#define ARG_SEND_TYPE(zf, arg_num) \
- ((zf) ? \
- ((((zend_function*)(zf))->common.arg_info && \
- arg_num<=((zend_function*)(zf))->common.num_args) ? \
- ((zend_function *)(zf))->common.arg_info[arg_num-1].pass_by_reference : \
- ((zend_function *)(zf))->common.pass_rest_by_reference) : \
- ZEND_SEND_BY_VAL)
+#define CHECK_ARG_SEND_TYPE(zf, arg_num, m1, m2) \
+ ((zf) && \
+ ((((zend_function*)(zf))->common.arg_info && \
+ arg_num <= ((zend_function*)(zf))->common.num_args) ? \
+ (((zend_function *)(zf))->common.arg_info[arg_num-1].pass_by_reference & (m1)) : \
+ (((zend_function *)(zf))->common.fn_flags & (m2))))
#define ARG_MUST_BE_SENT_BY_REF(zf, arg_num) \
- (ARG_SEND_TYPE(zf, arg_num) == ZEND_SEND_BY_REF)
+ CHECK_ARG_SEND_TYPE(zf, arg_num, ZEND_SEND_BY_REF, ZEND_ACC_PASS_REST_BY_REFERENCE)
#define ARG_SHOULD_BE_SENT_BY_REF(zf, arg_num) \
- (ARG_SEND_TYPE(zf, arg_num) & (ZEND_SEND_BY_REF|ZEND_SEND_PREFER_REF))
+ CHECK_ARG_SEND_TYPE(zf, arg_num, ZEND_SEND_BY_REF|ZEND_SEND_PREFER_REF, ZEND_ACC_PASS_REST_BY_REFERENCE|ZEND_ACC_PASS_REST_PREFER_REF)
#define ARG_MAY_BE_SENT_BY_REF(zf, arg_num) \
- (ARG_SEND_TYPE(zf, arg_num) == ZEND_SEND_PREFER_REF)
+ CHECK_ARG_SEND_TYPE(zf, arg_num, ZEND_SEND_PREFER_REF, ZEND_ACC_PASS_REST_PREFER_REF)
#define ZEND_RETURN_VAL 0
#define ZEND_RETURN_REF 1
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index 7e2e73495..6c86c1466 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_constants.c 321634 2012-01-01 13:15:04Z felipe $ */
+/* $Id: zend_constants.c 322378 2012-01-17 08:09:13Z dmitry $ */
#include "zend.h"
#include "zend_constants.h"
@@ -32,13 +32,15 @@ void free_zend_constant(zend_constant *c)
if (!(c->flags & CONST_PERSISTENT)) {
zval_dtor(&c->value);
}
- free(c->name);
+ str_free(c->name);
}
void copy_zend_constant(zend_constant *c)
{
- c->name = zend_strndup(c->name, c->name_len - 1);
+ if (!IS_INTERNED(c->name)) {
+ c->name = zend_strndup(c->name, c->name_len - 1);
+ }
if (!(c->flags & CONST_PERSISTENT)) {
zval_copy_ctor(&c->value);
}
@@ -139,7 +141,7 @@ void zend_register_standard_constants(TSRMLS_D)
c.value.type = IS_NULL;
zend_register_constant(&c TSRMLS_CC);
- c.flags = CONST_PERSISTENT;
+ c.flags = CONST_PERSISTENT | CONST_CS;
c.name = zend_strndup(ZEND_STRL("ZEND_THREAD_SAFE"));
c.name_len = sizeof("ZEND_THREAD_SAFE");
@@ -222,6 +224,64 @@ ZEND_API void zend_register_string_constant(const char *name, uint name_len, cha
zend_register_stringl_constant(name, name_len, strval, strlen(strval), flags, module_number TSRMLS_CC);
}
+static int zend_get_special_constant(const char *name, uint name_len, zend_constant **c TSRMLS_DC)
+{
+ int ret;
+ static char haltoff[] = "__COMPILER_HALT_OFFSET__";
+
+ if (!EG(in_execution)) {
+ return 0;
+ } else if (name_len == sizeof("__CLASS__")-1 &&
+ !memcmp(name, "__CLASS__", sizeof("__CLASS__")-1)) {
+ zend_constant tmp;
+
+ /* Returned constants may be cached, so they have to be stored */
+ if (EG(scope) && EG(scope)->name) {
+ int const_name_len;
+ char *const_name;
+ ALLOCA_FLAG(use_heap)
+
+ const_name_len = sizeof("\0__CLASS__") + EG(scope)->name_length;
+ const_name = do_alloca(const_name_len, use_heap);
+ memcpy(const_name, "\0__CLASS__", sizeof("\0__CLASS__")-1);
+ zend_str_tolower_copy(const_name + sizeof("\0__CLASS__")-1, EG(scope)->name, EG(scope)->name_length);
+ if (zend_hash_find(EG(zend_constants), const_name, const_name_len, (void**)c) == FAILURE) {
+ zend_hash_add(EG(zend_constants), const_name, const_name_len, (void*)&tmp, sizeof(zend_constant), (void**)c);
+ memset(*c, 0, sizeof(zend_constant));
+ Z_STRVAL((**c).value) = estrndup(EG(scope)->name, EG(scope)->name_length);
+ Z_STRLEN((**c).value) = EG(scope)->name_length;
+ Z_TYPE((**c).value) = IS_STRING;
+ }
+ free_alloca(const_name, use_heap);
+ } else {
+ if (zend_hash_find(EG(zend_constants), "\0__CLASS__", sizeof("\0__CLASS__"), (void**)c) == FAILURE) {
+ zend_hash_add(EG(zend_constants), "\0__CLASS__", sizeof("\0__CLASS__"), (void*)&tmp, sizeof(zend_constant), (void**)c);
+ memset(*c, 0, sizeof(zend_constant));
+ Z_STRVAL((**c).value) = estrndup("", 0);
+ Z_STRLEN((**c).value) = 0;
+ Z_TYPE((**c).value) = IS_STRING;
+ }
+ }
+ return 1;
+ } else if (name_len == sizeof("__COMPILER_HALT_OFFSET__")-1 &&
+ !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1)) {
+ const char *cfilename;
+ char *haltname;
+ int len, clen;
+
+ cfilename = zend_get_executed_filename(TSRMLS_C);
+ clen = strlen(cfilename);
+ /* check for __COMPILER_HALT_OFFSET__ */
+ zend_mangle_property_name(&haltname, &len, haltoff,
+ sizeof("__COMPILER_HALT_OFFSET__") - 1, cfilename, clen, 0);
+ ret = zend_hash_find(EG(zend_constants), haltname, len+1, (void **) c);
+ efree(haltname);
+ return (ret == SUCCESS);
+ } else {
+ return 0;
+ }
+}
+
ZEND_API int zend_get_constant(const char *name, uint name_len, zval *result TSRMLS_DC)
{
@@ -237,29 +297,7 @@ ZEND_API int zend_get_constant(const char *name, uint name_len, zval *result TSR
retval=0;
}
} else {
- static char haltoff[] = "__COMPILER_HALT_OFFSET__";
-
- if (!EG(in_execution)) {
- retval = 0;
- } else if (name_len == sizeof("__COMPILER_HALT_OFFSET__")-1 &&
- !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1)) {
- char *cfilename, *haltname;
- int len, clen;
-
- cfilename = zend_get_executed_filename(TSRMLS_C);
- clen = strlen(cfilename);
- /* check for __COMPILER_HALT_OFFSET__ */
- zend_mangle_property_name(&haltname, &len, haltoff,
- sizeof("__COMPILER_HALT_OFFSET__") - 1, cfilename, clen, 0);
- if (zend_hash_find(EG(zend_constants), haltname, len+1, (void **) &c) == SUCCESS) {
- retval = 1;
- } else {
- retval=0;
- }
- pefree(haltname, 0);
- } else {
- retval=0;
- }
+ retval = zend_get_special_constant(name, name_len, &c TSRMLS_CC);
}
efree(lookup_name);
}
@@ -278,7 +316,7 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result,
{
zend_constant *c;
int retval = 1;
- char *colon;
+ const char *colon;
zend_class_entry *ce = NULL;
char *class_name;
zval **ret_constant;
@@ -294,7 +332,7 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result,
colon > name && (*(colon - 1) == ':')) {
int class_name_len = colon - name - 1;
int const_name_len = name_len - class_name_len - 2;
- char *constant_name = colon + 1;
+ const char *constant_name = colon + 1;
char *lcname;
class_name = estrndup(name, class_name_len);
@@ -357,7 +395,7 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result,
/* compound constant name */
int prefix_len = colon - name;
int const_name_len = name_len - prefix_len - 1;
- char *constant_name = colon + 1;
+ const char *constant_name = colon + 1;
char *lcname;
int found_const = 0;
@@ -410,11 +448,44 @@ finish:
return zend_get_constant(name, name_len, result TSRMLS_CC);
}
+zend_constant *zend_quick_get_constant(const zend_literal *key, ulong flags TSRMLS_DC)
+{
+ zend_constant *c;
+
+ if (zend_hash_quick_find(EG(zend_constants), Z_STRVAL(key->constant), Z_STRLEN(key->constant) + 1, key->hash_value, (void **) &c) == FAILURE) {
+ key++;
+ if (zend_hash_quick_find(EG(zend_constants), Z_STRVAL(key->constant), Z_STRLEN(key->constant) + 1, key->hash_value, (void **) &c) == FAILURE ||
+ (c->flags & CONST_CS) != 0) {
+ if ((flags & (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) == (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) {
+ key++;
+ if (zend_hash_quick_find(EG(zend_constants), Z_STRVAL(key->constant), Z_STRLEN(key->constant) + 1, key->hash_value, (void **) &c) == FAILURE) {
+ key++;
+ if (zend_hash_quick_find(EG(zend_constants), Z_STRVAL(key->constant), Z_STRLEN(key->constant) + 1, key->hash_value, (void **) &c) == FAILURE ||
+ (c->flags & CONST_CS) != 0) {
+
+ key--;
+ if (!zend_get_special_constant(Z_STRVAL(key->constant), Z_STRLEN(key->constant), &c TSRMLS_CC)) {
+ return NULL;
+ }
+ }
+ }
+ } else {
+ key--;
+ if (!zend_get_special_constant(Z_STRVAL(key->constant), Z_STRLEN(key->constant), &c TSRMLS_CC)) {
+ return NULL;
+ }
+ }
+ }
+ }
+ return c;
+}
+
ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
{
char *lowercase_name = NULL;
char *name;
int ret = SUCCESS;
+ ulong chash = 0;
#if 0
printf("Registering constant for module %d\n", c->module_number);
@@ -424,22 +495,30 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
/* keep in mind that c->name_len already contains the '\0' */
lowercase_name = estrndup(c->name, c->name_len-1);
zend_str_tolower(lowercase_name, c->name_len-1);
+ lowercase_name = (char*)zend_new_interned_string(lowercase_name, c->name_len, 1 TSRMLS_CC);
name = lowercase_name;
+ chash = IS_INTERNED(lowercase_name) ? INTERNED_HASH(lowercase_name) : 0;
} else {
char *slash = strrchr(c->name, '\\');
if(slash) {
lowercase_name = estrndup(c->name, c->name_len-1);
zend_str_tolower(lowercase_name, slash-c->name);
+ lowercase_name = (char*)zend_new_interned_string(lowercase_name, c->name_len, 1 TSRMLS_CC);
name = lowercase_name;
+
+ chash = IS_INTERNED(lowercase_name) ? INTERNED_HASH(lowercase_name) : 0;
} else {
name = c->name;
}
}
+ if (chash == 0) {
+ chash = zend_hash_func(name, c->name_len);
+ }
/* Check if the user is trying to define the internal pseudo constant name __COMPILER_HALT_OFFSET__ */
if ((c->name_len == sizeof("__COMPILER_HALT_OFFSET__")
&& !memcmp(name, "__COMPILER_HALT_OFFSET__", sizeof("__COMPILER_HALT_OFFSET__")-1))
- || zend_hash_add(EG(zend_constants), name, c->name_len, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
+ || zend_hash_quick_add(EG(zend_constants), name, c->name_len, chash, (void *) c, sizeof(zend_constant), NULL)==FAILURE) {
/* The internal __COMPILER_HALT_OFFSET__ is prefixed by NULL byte */
if (c->name[0] == '\0' && c->name_len > sizeof("\0__COMPILER_HALT_OFFSET__")
@@ -447,13 +526,13 @@ ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC)
name++;
}
zend_error(E_NOTICE,"Constant %s already defined", name);
- free(c->name);
+ str_free(c->name);
if (!(c->flags & CONST_PERSISTENT)) {
zval_dtor(&c->value);
}
ret = FAILURE;
}
- if (lowercase_name) {
+ if (lowercase_name && !IS_INTERNED(lowercase_name)) {
efree(lowercase_name);
}
return ret;
diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h
index e62b292a8..041d996af 100644
--- a/Zend/zend_constants.h
+++ b/Zend/zend_constants.h
@@ -69,6 +69,7 @@ ZEND_API void zend_register_stringl_constant(const char *name, uint name_len, ch
ZEND_API int zend_register_constant(zend_constant *c TSRMLS_DC);
void zend_copy_constants(HashTable *target, HashTable *sourc);
void copy_zend_constant(zend_constant *c);
+zend_constant *zend_quick_get_constant(const zend_literal *key, ulong flags TSRMLS_DC);
END_EXTERN_C()
#define ZEND_CONSTANT_DTOR (void (*)(void *)) free_zend_constant
diff --git a/Zend/zend_dtrace.c b/Zend/zend_dtrace.c
new file mode 100644
index 000000000..5b2d0d2df
--- /dev/null
+++ b/Zend/zend_dtrace.c
@@ -0,0 +1,108 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: David Soria Parra <david.soriaparra@sun.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id: $ */
+
+#include "zend.h"
+#include "zend_API.h"
+#include "zend_dtrace.h"
+
+#ifdef HAVE_DTRACE
+/* PHP DTrace probes {{{ */
+static inline char *dtrace_get_executed_filename(TSRMLS_D)
+{
+ if (EG(current_execute_data) && EG(current_execute_data)->op_array) {
+ return EG(current_execute_data)->op_array->filename;
+ } else {
+ return zend_get_executed_filename(TSRMLS_C);
+ }
+}
+
+ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC)
+{
+ zend_op_array *res;
+ DTRACE_COMPILE_FILE_ENTRY(file_handle->opened_path, file_handle->filename);
+ res = compile_file(file_handle, type TSRMLS_CC);
+ DTRACE_COMPILE_FILE_RETURN(file_handle->opened_path, file_handle->filename);
+
+ return res;
+}
+
+/* We wrap the execute function to have fire the execute-entry/return and function-entry/return probes */
+ZEND_API void dtrace_execute(zend_op_array *op_array TSRMLS_DC)
+{
+ int lineno;
+ char *scope, *filename, *funcname, *classname;
+ scope = filename = funcname = classname = NULL;
+
+ /* we need filename and lineno for both execute and function probes */
+ if (DTRACE_EXECUTE_ENTRY_ENABLED() || DTRACE_EXECUTE_RETURN_ENABLED()
+ || DTRACE_FUNCTION_ENTRY_ENABLED() || DTRACE_FUNCTION_RETURN_ENABLED()) {
+ filename = dtrace_get_executed_filename(TSRMLS_C);
+ lineno = zend_get_executed_lineno(TSRMLS_C);
+ }
+
+ if (DTRACE_FUNCTION_ENTRY_ENABLED() || DTRACE_FUNCTION_RETURN_ENABLED()) {
+ filename = dtrace_get_executed_filename(TSRMLS_C);
+ classname = get_active_class_name(&scope TSRMLS_CC);
+ funcname = get_active_function_name(TSRMLS_C);
+ lineno = zend_get_executed_lineno(TSRMLS_C);
+ }
+
+ if (DTRACE_EXECUTE_ENTRY_ENABLED()) {
+ DTRACE_EXECUTE_ENTRY(filename, lineno);
+ }
+
+ if (DTRACE_FUNCTION_ENTRY_ENABLED() && funcname != NULL) {
+ DTRACE_FUNCTION_ENTRY(funcname, filename, lineno, classname, scope);
+ }
+
+ execute(op_array TSRMLS_CC);
+
+ if (DTRACE_FUNCTION_RETURN_ENABLED() && funcname != NULL) {
+ DTRACE_FUNCTION_RETURN(funcname, filename, lineno, classname, scope);
+ }
+
+ if (DTRACE_EXECUTE_RETURN_ENABLED()) {
+ DTRACE_EXECUTE_RETURN(filename, lineno);
+ }
+}
+
+ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC)
+{
+ int lineno;
+ char *filename;
+ if (DTRACE_EXECUTE_ENTRY_ENABLED() || DTRACE_EXECUTE_RETURN_ENABLED()) {
+ filename = dtrace_get_executed_filename(TSRMLS_C);
+ lineno = zend_get_executed_lineno(TSRMLS_C);
+ }
+
+ if (DTRACE_EXECUTE_ENTRY_ENABLED()) {
+ DTRACE_EXECUTE_ENTRY(filename, lineno);
+ }
+
+ execute_internal(execute_data_ptr, return_value_used TSRMLS_CC);
+
+ if (DTRACE_EXECUTE_RETURN_ENABLED()) {
+ DTRACE_EXECUTE_RETURN(filename, lineno);
+ }
+}
+
+/* }}} */
+#endif /* HAVE_DTRACE */
+
diff --git a/Zend/zend_dtrace.d b/Zend/zend_dtrace.d
new file mode 100644
index 000000000..609663f4b
--- /dev/null
+++ b/Zend/zend_dtrace.d
@@ -0,0 +1,37 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: David Soria Parra <david.soriaparra@sun.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id: $ */
+
+provider php {
+ probe exception__caught(char *classname);
+ probe exception__thrown(char* classname);
+ probe request__startup(char* request_file, char* request_uri, char* request_method);
+ probe request__shutdown(char* request_file, char* request_uri, char* request_method);
+ probe compile__file__entry(char * compile_file, char *compile_file_translated);
+ probe compile__file__return(char *compile_file, char *compile_file_translated);
+ probe error(char *errormsg, char *request_file, int lineno);
+ probe execute__entry(char* request_file, int lineno);
+ probe execute__return(char* request_file, int lineno);
+ probe function__entry(char* function_name, char* request_file, int lineno, char* classname, char* scope);
+ probe function__return(char* function_name, char* request_file, int lineno, char* classname, char* scope);
+};
+
+/*#pragma D attributes Private/Private/Unknown provider php module
+#pragma D attributes Private/Private/Unknown provider php function
+#pragma D attributes Evolving/Evolving/Common provider php provider */
diff --git a/Zend/zend_dtrace.h b/Zend/zend_dtrace.h
new file mode 100644
index 000000000..65d19ef34
--- /dev/null
+++ b/Zend/zend_dtrace.h
@@ -0,0 +1,48 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: David Soria Parra <david.soriaparra@sun.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id: $ */
+
+#ifndef _ZEND_DTRACE_H
+#define _ZEND_DTRACE_H
+
+#ifndef ZEND_WIN32
+# include <unistd.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef HAVE_DTRACE
+ZEND_API zend_op_array *(*zend_dtrace_compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC);
+ZEND_API void (*zend_dtrace_execute)(zend_op_array *op_array TSRMLS_DC);
+ZEND_API void (*zend_dtrace_execute_internal)(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
+
+ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC);
+ZEND_API void dtrace_execute(zend_op_array *op_array TSRMLS_DC);
+ZEND_API void dtrace_execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
+#include <zend_dtrace_gen.h>
+
+#endif /* HAVE_DTRACE */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ZEND_DTRACE_H */
diff --git a/Zend/zend_errors.h b/Zend/zend_errors.h
index 84629d498..9c6a81a7c 100644
--- a/Zend/zend_errors.h
+++ b/Zend/zend_errors.h
@@ -38,7 +38,7 @@
#define E_DEPRECATED (1<<13L)
#define E_USER_DEPRECATED (1<<14L)
-#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED)
+#define E_ALL (E_ERROR | E_WARNING | E_PARSE | E_NOTICE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_RECOVERABLE_ERROR | E_DEPRECATED | E_USER_DEPRECATED | E_STRICT)
#define E_CORE (E_CORE_ERROR | E_CORE_WARNING)
#endif /* ZEND_ERRORS_H */
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index f599cf9b9..be1d1ca9d 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -27,6 +27,7 @@
#include "zend_interfaces.h"
#include "zend_exceptions.h"
#include "zend_vm.h"
+#include "zend_dtrace.h"
zend_class_entry *default_exception_ce;
zend_class_entry *error_exception_ce;
@@ -82,6 +83,20 @@ void zend_exception_restore(TSRMLS_D) /* {{{ */
void zend_throw_exception_internal(zval *exception TSRMLS_DC) /* {{{ */
{
+#ifdef HAVE_DTRACE
+ if (DTRACE_EXCEPTION_THROWN_ENABLED()) {
+ char *classname;
+ int name_len;
+
+ if (exception != NULL) {
+ zend_get_object_classname(exception, &classname, &name_len TSRMLS_CC);
+ DTRACE_EXCEPTION_THROWN(classname);
+ } else {
+ DTRACE_EXCEPTION_THROWN(NULL);
+ }
+ }
+#endif /* HAVE_DTRACE */
+
if (exception != NULL) {
zval *previous = EG(exception);
zend_exception_set_previous(exception, EG(exception) TSRMLS_CC);
@@ -131,21 +146,19 @@ ZEND_API void zend_clear_exception(TSRMLS_D) /* {{{ */
static zend_object_value zend_default_exception_new_ex(zend_class_entry *class_type, int skip_top_traces TSRMLS_DC) /* {{{ */
{
- zval tmp, obj;
+ zval obj;
zend_object *object;
zval *trace;
Z_OBJVAL(obj) = zend_objects_new(&object, class_type TSRMLS_CC);
Z_OBJ_HT(obj) = &default_exception_handlers;
- ALLOC_HASHTABLE(object->properties);
- zend_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
- zend_hash_copy(object->properties, &class_type->default_properties, zval_copy_property_ctor(class_type), (void *) &tmp, sizeof(zval *));
+ object_properties_init(object, class_type);
ALLOC_ZVAL(trace);
Z_UNSET_ISREF_P(trace);
Z_SET_REFCOUNT_P(trace, 0);
- zend_fetch_debug_backtrace(trace, skip_top_traces, 0 TSRMLS_CC);
+ zend_fetch_debug_backtrace(trace, skip_top_traces, 0, 0 TSRMLS_CC);
zend_update_property_string(default_exception_ce, &obj, "file", sizeof("file")-1, zend_get_executed_filename(TSRMLS_C) TSRMLS_CC);
zend_update_property_long(default_exception_ce, &obj, "line", sizeof("line")-1, zend_get_executed_lineno(TSRMLS_C) TSRMLS_CC);
@@ -417,7 +430,7 @@ static int _build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, z
TRACE_APPEND_STR("Array, ");
break;
case IS_OBJECT: {
- char *class_name;
+ const char *class_name;
zend_uint class_name_len;
int dup;
@@ -427,7 +440,7 @@ static int _build_trace_args(zval **arg TSRMLS_DC, int num_args, va_list args, z
TRACE_APPEND_STRL(class_name, class_name_len);
if(!dup) {
- efree(class_name);
+ efree((char*)class_name);
}
TRACE_APPEND_STR("), ");
@@ -600,6 +613,7 @@ ZEND_METHOD(exception, __toString)
if (trace) {
zval_ptr_dtor(&trace);
}
+
}
zval_dtor(&fname);
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index fe5f3e0e2..acfac9c17 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -36,6 +36,7 @@
#include "zend_interfaces.h"
#include "zend_closures.h"
#include "zend_vm.h"
+#include "zend_dtrace.h"
/* Virtual current working directory support */
#include "tsrm_virtual_cwd.h"
@@ -48,20 +49,20 @@
typedef int (*incdec_t)(zval *);
-#define get_zval_ptr(node, Ts, should_free, type) _get_zval_ptr(node, Ts, should_free, type TSRMLS_CC)
-#define get_zval_ptr_ptr(node, Ts, should_free, type) _get_zval_ptr_ptr(node, Ts, should_free, type TSRMLS_CC)
-#define get_obj_zval_ptr(node, Ts, should_free, type) _get_obj_zval_ptr(node, Ts, should_free, type TSRMLS_CC)
-#define get_obj_zval_ptr_ptr(node, Ts, should_free, type) _get_obj_zval_ptr_ptr(node, Ts, should_free, type TSRMLS_CC)
+#define get_zval_ptr(op_type, node, Ts, should_free, type) _get_zval_ptr(op_type, node, Ts, should_free, type TSRMLS_CC)
+#define get_zval_ptr_ptr(op_type, node, Ts, should_free, type) _get_zval_ptr_ptr(op_type, node, Ts, should_free, type TSRMLS_CC)
+#define get_obj_zval_ptr(op_type, node, Ts, should_free, type) _get_obj_zval_ptr(op_type, node, Ts, should_free, type TSRMLS_CC)
+#define get_obj_zval_ptr_ptr(op_type, node, Ts, should_free, type) _get_obj_zval_ptr_ptr(op_type, node, Ts, should_free, type TSRMLS_CC)
/* Prototypes */
static void zend_extension_statement_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC);
static void zend_extension_fcall_begin_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC);
static void zend_extension_fcall_end_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC);
-#define RETURN_VALUE_USED(opline) (!((opline)->result.u.EA.type & EXT_TYPE_UNUSED))
+#define RETURN_VALUE_USED(opline) (!((opline)->result_type & EXT_TYPE_UNUSED))
-#define EX_T(offset) (*(temp_variable *)((char *) EX(Ts) + offset))
#define T(offset) (*(temp_variable *)((char *) Ts + offset))
+#define CV(var) CVs[var]
#define TEMP_VAR_STACK_LIMIT 2000
@@ -92,24 +93,32 @@ static zend_always_inline void zend_pzval_unlock_free_func(zval *z TSRMLS_DC)
}
}
+#undef zval_ptr_dtor
+#define zval_ptr_dtor(pzv) i_zval_ptr_dtor(*(pzv) ZEND_FILE_LINE_CC)
+
#define PZVAL_UNLOCK(z, f) zend_pzval_unlock_func(z, f, 1 TSRMLS_CC)
#define PZVAL_UNLOCK_EX(z, f, u) zend_pzval_unlock_func(z, f, u TSRMLS_CC)
#define PZVAL_UNLOCK_FREE(z) zend_pzval_unlock_free_func(z TSRMLS_CC)
#define PZVAL_LOCK(z) Z_ADDREF_P((z))
-#define RETURN_VALUE_UNUSED(pzn) (((pzn)->u.EA.type & EXT_TYPE_UNUSED))
-#define SELECTIVE_PZVAL_LOCK(pzv, pzn) if (!RETURN_VALUE_UNUSED(pzn)) { PZVAL_LOCK(pzv); }
-
-#define AI_USE_PTR(ai) \
- if ((ai).ptr_ptr) { \
- (ai).ptr = *((ai).ptr_ptr); \
- (ai).ptr_ptr = &((ai).ptr); \
- } else { \
- (ai).ptr = NULL; \
- }
+#define SELECTIVE_PZVAL_LOCK(pzv, opline) if (RETURN_VALUE_USED(opline)) { PZVAL_LOCK(pzv); }
+
+#define EXTRACT_ZVAL_PTR(t) do { \
+ temp_variable *__t = (t); \
+ if (__t->var.ptr_ptr) { \
+ __t->var.ptr = *__t->var.ptr_ptr; \
+ __t->var.ptr_ptr = &__t->var.ptr; \
+ if (!PZVAL_IS_REF(__t->var.ptr) && \
+ Z_REFCOUNT_P(__t->var.ptr) > 2) { \
+ SEPARATE_ZVAL(__t->var.ptr_ptr); \
+ } \
+ } \
+ } while (0)
-#define AI_SET_PTR(ai, val) \
- (ai).ptr = (val); \
- (ai).ptr_ptr = &((ai).ptr);
+#define AI_SET_PTR(t, val) do { \
+ temp_variable *__t = (t); \
+ __t->var.ptr = (val); \
+ __t->var.ptr_ptr = &__t->var.ptr; \
+ } while (0)
#define FREE_OP(should_free) \
if (should_free.var) { \
@@ -134,21 +143,12 @@ static zend_always_inline void zend_pzval_unlock_free_func(zval *z TSRMLS_DC)
#define IS_TMP_FREE(should_free) ((zend_uintptr_t)should_free.var & 1L)
-#define INIT_PZVAL_COPY(z,v) \
- (z)->value = (v)->value; \
- Z_TYPE_P(z) = Z_TYPE_P(v); \
- Z_SET_REFCOUNT_P(z, 1); \
- Z_UNSET_ISREF_P(z);
-
#define MAKE_REAL_ZVAL_PTR(val) \
do { \
zval *_tmp; \
ALLOC_ZVAL(_tmp); \
- _tmp->value = (val)->value; \
- Z_TYPE_P(_tmp) = Z_TYPE_P(val); \
- Z_SET_REFCOUNT_P(_tmp, 1); \
- Z_UNSET_ISREF_P(_tmp); \
- val = _tmp; \
+ INIT_PZVAL_COPY(_tmp, (val)); \
+ (val) = _tmp; \
} while (0)
/* End of zend_execute_locks.h */
@@ -172,50 +172,20 @@ ZEND_API zval** zend_get_compiled_variable_value(const zend_execute_data *execut
return execute_data_ptr->CVs[var];
}
-static zend_always_inline zval *_get_zval_ptr_tmp(const znode *node, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
+static zend_always_inline zval *_get_zval_ptr_tmp(zend_uint var, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
{
- return should_free->var = &T(node->u.var).tmp_var;
+ return should_free->var = &T(var).tmp_var;
}
-static zval *_get_zval_ptr_var_string_offset(const znode *node, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
+static zend_always_inline zval *_get_zval_ptr_var(zend_uint var, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
{
- temp_variable *T = &T(node->u.var);
- zval *str = T->str_offset.str;
- zval *ptr;
-
- /* string offset */
- ALLOC_ZVAL(ptr);
- T->str_offset.ptr = ptr;
- should_free->var = ptr;
-
- if (T->str_offset.str->type != IS_STRING
- || ((int)T->str_offset.offset < 0)
- || (T->str_offset.str->value.str.len <= (int)T->str_offset.offset)) {
- ptr->value.str.val = STR_EMPTY_ALLOC();
- ptr->value.str.len = 0;
- } else {
- ptr->value.str.val = estrndup(str->value.str.val + T->str_offset.offset, 1);
- ptr->value.str.len = 1;
- }
- PZVAL_UNLOCK_FREE(str);
- Z_SET_REFCOUNT_P(ptr, 1);
- Z_SET_ISREF_P(ptr);
- ptr->type = IS_STRING;
- return ptr;
-}
+ zval *ptr = T(var).var.ptr;
-static zend_always_inline zval *_get_zval_ptr_var(const znode *node, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
-{
- zval *ptr = T(node->u.var).var.ptr;
- if (EXPECTED(ptr != NULL)) {
- PZVAL_UNLOCK(ptr, should_free);
- return ptr;
- } else {
- return _get_zval_ptr_var_string_offset(node, Ts, should_free TSRMLS_CC);
- }
+ PZVAL_UNLOCK(ptr, should_free);
+ return ptr;
}
-static zval **_get_zval_cv_lookup(zval ***ptr, zend_uint var, int type TSRMLS_DC)
+static zend_never_inline zval **_get_zval_cv_lookup(zval ***ptr, zend_uint var, int type TSRMLS_DC)
{
zend_compiled_variable *cv = &CV_DEF_OF(var);
@@ -246,30 +216,147 @@ static zval **_get_zval_cv_lookup(zval ***ptr, zend_uint var, int type TSRMLS_DC
return *ptr;
}
-static zend_always_inline zval *_get_zval_ptr_cv(const znode *node, const temp_variable *Ts, int type TSRMLS_DC)
+static zend_never_inline zval **_get_zval_cv_lookup_BP_VAR_R(zval ***ptr, zend_uint var TSRMLS_DC)
+{
+ zend_compiled_variable *cv = &CV_DEF_OF(var);
+
+ if (!EG(active_symbol_table) ||
+ zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **)ptr)==FAILURE) {
+ zend_error(E_NOTICE, "Undefined variable: %s", cv->name);
+ return &EG(uninitialized_zval_ptr);
+ }
+ return *ptr;
+}
+
+static zend_never_inline zval **_get_zval_cv_lookup_BP_VAR_UNSET(zval ***ptr, zend_uint var TSRMLS_DC)
+{
+ zend_compiled_variable *cv = &CV_DEF_OF(var);
+
+ if (!EG(active_symbol_table) ||
+ zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **)ptr)==FAILURE) {
+ zend_error(E_NOTICE, "Undefined variable: %s", cv->name);
+ return &EG(uninitialized_zval_ptr);
+ }
+ return *ptr;
+}
+
+static zend_never_inline zval **_get_zval_cv_lookup_BP_VAR_IS(zval ***ptr, zend_uint var TSRMLS_DC)
+{
+ zend_compiled_variable *cv = &CV_DEF_OF(var);
+
+ if (!EG(active_symbol_table) ||
+ zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **)ptr)==FAILURE) {
+ return &EG(uninitialized_zval_ptr);
+ }
+ return *ptr;
+}
+
+static zend_never_inline zval **_get_zval_cv_lookup_BP_VAR_RW(zval ***ptr, zend_uint var TSRMLS_DC)
+{
+ zend_compiled_variable *cv = &CV_DEF_OF(var);
+
+ if (!EG(active_symbol_table)) {
+ Z_ADDREF(EG(uninitialized_zval));
+ *ptr = (zval**)EG(current_execute_data)->CVs + (EG(active_op_array)->last_var + var);
+ **ptr = &EG(uninitialized_zval);
+ zend_error(E_NOTICE, "Undefined variable: %s", cv->name);
+ } else if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **)ptr)==FAILURE) {
+ Z_ADDREF(EG(uninitialized_zval));
+ zend_hash_quick_update(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **)ptr);
+ zend_error(E_NOTICE, "Undefined variable: %s", cv->name);
+ }
+ return *ptr;
+}
+
+static zend_never_inline zval **_get_zval_cv_lookup_BP_VAR_W(zval ***ptr, zend_uint var TSRMLS_DC)
+{
+ zend_compiled_variable *cv = &CV_DEF_OF(var);
+
+ if (!EG(active_symbol_table)) {
+ Z_ADDREF(EG(uninitialized_zval));
+ *ptr = (zval**)EG(current_execute_data)->CVs + (EG(active_op_array)->last_var + var);
+ **ptr = &EG(uninitialized_zval);
+ } else if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **)ptr)==FAILURE) {
+ Z_ADDREF(EG(uninitialized_zval));
+ zend_hash_quick_update(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **)ptr);
+ }
+ return *ptr;
+}
+
+static zend_always_inline zval *_get_zval_ptr_cv(zend_uint var, int type TSRMLS_DC)
+{
+ zval ***ptr = &CV_OF(var);
+
+ if (UNEXPECTED(*ptr == NULL)) {
+ return *_get_zval_cv_lookup(ptr, var, type TSRMLS_CC);
+ }
+ return **ptr;
+}
+
+static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_R(zval ***CVs, zend_uint var TSRMLS_DC)
+{
+ zval ***ptr = &CV(var);
+
+ if (UNEXPECTED(*ptr == NULL)) {
+ return *_get_zval_cv_lookup_BP_VAR_R(ptr, var TSRMLS_CC);
+ }
+ return **ptr;
+}
+
+static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_UNSET(zval ***CVs, zend_uint var TSRMLS_DC)
+{
+ zval ***ptr = &CV(var);
+
+ if (UNEXPECTED(*ptr == NULL)) {
+ return *_get_zval_cv_lookup_BP_VAR_UNSET(ptr, var TSRMLS_CC);
+ }
+ return **ptr;
+}
+
+static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_IS(zval ***CVs, zend_uint var TSRMLS_DC)
+{
+ zval ***ptr = &CV(var);
+
+ if (UNEXPECTED(*ptr == NULL)) {
+ return *_get_zval_cv_lookup_BP_VAR_IS(ptr, var TSRMLS_CC);
+ }
+ return **ptr;
+}
+
+static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_RW(zval ***CVs, zend_uint var TSRMLS_DC)
+{
+ zval ***ptr = &CV(var);
+
+ if (UNEXPECTED(*ptr == NULL)) {
+ return *_get_zval_cv_lookup_BP_VAR_RW(ptr, var TSRMLS_CC);
+ }
+ return **ptr;
+}
+
+static zend_always_inline zval *_get_zval_ptr_cv_BP_VAR_W(zval ***CVs, zend_uint var TSRMLS_DC)
{
- zval ***ptr = &CV_OF(node->u.var);
+ zval ***ptr = &CV(var);
if (UNEXPECTED(*ptr == NULL)) {
- return *_get_zval_cv_lookup(ptr, node->u.var, type TSRMLS_CC);
+ return *_get_zval_cv_lookup_BP_VAR_W(ptr, var TSRMLS_CC);
}
return **ptr;
}
-static inline zval *_get_zval_ptr(znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static inline zval *_get_zval_ptr(int op_type, const znode_op *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
{
/* should_free->is_var = 0; */
- switch (node->op_type) {
+ switch (op_type) {
case IS_CONST:
should_free->var = 0;
- return &node->u.constant;
+ return node->zv;
break;
case IS_TMP_VAR:
- should_free->var = TMP_FREE(&T(node->u.var).tmp_var);
- return &T(node->u.var).tmp_var;
+ should_free->var = TMP_FREE(&T(node->var).tmp_var);
+ return &T(node->var).tmp_var;
break;
case IS_VAR:
- return _get_zval_ptr_var(node, Ts, should_free TSRMLS_CC);
+ return _get_zval_ptr_var(node->var, Ts, should_free TSRMLS_CC);
break;
case IS_UNUSED:
should_free->var = 0;
@@ -277,43 +364,93 @@ static inline zval *_get_zval_ptr(znode *node, const temp_variable *Ts, zend_fre
break;
case IS_CV:
should_free->var = 0;
- return _get_zval_ptr_cv(node, Ts, type TSRMLS_CC);
+ return _get_zval_ptr_cv(node->var, type TSRMLS_CC);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
return NULL;
}
-static zend_always_inline zval **_get_zval_ptr_ptr_var(const znode *node, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
+static zend_always_inline zval **_get_zval_ptr_ptr_var(zend_uint var, const temp_variable *Ts, zend_free_op *should_free TSRMLS_DC)
{
- zval** ptr_ptr = T(node->u.var).var.ptr_ptr;
+ zval** ptr_ptr = T(var).var.ptr_ptr;
if (EXPECTED(ptr_ptr != NULL)) {
PZVAL_UNLOCK(*ptr_ptr, should_free);
} else {
/* string offset */
- PZVAL_UNLOCK(T(node->u.var).str_offset.str, should_free);
+ PZVAL_UNLOCK(T(var).str_offset.str, should_free);
}
return ptr_ptr;
}
-static zend_always_inline zval **_get_zval_ptr_ptr_cv(const znode *node, const temp_variable *Ts, int type TSRMLS_DC)
+static zend_always_inline zval **_get_zval_ptr_ptr_cv(zend_uint var, int type TSRMLS_DC)
{
- zval ***ptr = &CV_OF(node->u.var);
+ zval ***ptr = &CV_OF(var);
if (UNEXPECTED(*ptr == NULL)) {
- return _get_zval_cv_lookup(ptr, node->u.var, type TSRMLS_CC);
+ return _get_zval_cv_lookup(ptr, var, type TSRMLS_CC);
}
return *ptr;
}
-static inline zval **_get_zval_ptr_ptr(const znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_R(zval ***CVs, zend_uint var TSRMLS_DC)
{
- if (node->op_type == IS_CV) {
+ zval ***ptr = &CV(var);
+
+ if (UNEXPECTED(*ptr == NULL)) {
+ return _get_zval_cv_lookup_BP_VAR_R(ptr, var TSRMLS_CC);
+ }
+ return *ptr;
+}
+
+static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_UNSET(zval ***CVs, zend_uint var TSRMLS_DC)
+{
+ zval ***ptr = &CV(var);
+
+ if (UNEXPECTED(*ptr == NULL)) {
+ return _get_zval_cv_lookup_BP_VAR_UNSET(ptr, var TSRMLS_CC);
+ }
+ return *ptr;
+}
+
+static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_IS(zval ***CVs, zend_uint var TSRMLS_DC)
+{
+ zval ***ptr = &CV(var);
+
+ if (UNEXPECTED(*ptr == NULL)) {
+ return _get_zval_cv_lookup_BP_VAR_IS(ptr, var TSRMLS_CC);
+ }
+ return *ptr;
+}
+
+static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_RW(zval ***CVs, zend_uint var TSRMLS_DC)
+{
+ zval ***ptr = &CV(var);
+
+ if (UNEXPECTED(*ptr == NULL)) {
+ return _get_zval_cv_lookup_BP_VAR_RW(ptr, var TSRMLS_CC);
+ }
+ return *ptr;
+}
+
+static zend_always_inline zval **_get_zval_ptr_ptr_cv_BP_VAR_W(zval ***CVs, zend_uint var TSRMLS_DC)
+{
+ zval ***ptr = &CV(var);
+
+ if (UNEXPECTED(*ptr == NULL)) {
+ return _get_zval_cv_lookup_BP_VAR_W(ptr, var TSRMLS_CC);
+ }
+ return *ptr;
+}
+
+static inline zval **_get_zval_ptr_ptr(int op_type, const znode_op *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+{
+ if (op_type == IS_CV) {
should_free->var = 0;
- return _get_zval_ptr_ptr_cv(node, Ts, type TSRMLS_CC);
- } else if (node->op_type == IS_VAR) {
- return _get_zval_ptr_ptr_var(node, Ts, should_free TSRMLS_CC);
+ return _get_zval_ptr_ptr_cv(node->var, type TSRMLS_CC);
+ } else if (op_type == IS_VAR) {
+ return _get_zval_ptr_ptr_var(node->var, Ts, should_free TSRMLS_CC);
} else {
should_free->var = 0;
return NULL;
@@ -330,9 +467,9 @@ static zend_always_inline zval *_get_obj_zval_ptr_unused(TSRMLS_D)
}
}
-static inline zval **_get_obj_zval_ptr_ptr(const znode *op, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static inline zval **_get_obj_zval_ptr_ptr(int op_type, const znode_op *op, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
{
- if (op->op_type == IS_UNUSED) {
+ if (op_type == IS_UNUSED) {
if (EXPECTED(EG(This) != NULL)) {
/* this should actually never be modified, _ptr_ptr is modified only when
the object is empty */
@@ -342,7 +479,7 @@ static inline zval **_get_obj_zval_ptr_ptr(const znode *op, const temp_variable
zend_error_noreturn(E_ERROR, "Using $this when not in object context");
}
}
- return get_zval_ptr_ptr(op, Ts, should_free, type);
+ return get_zval_ptr_ptr(op_type, op, Ts, should_free, type);
}
static zend_always_inline zval **_get_obj_zval_ptr_ptr_unused(TSRMLS_D)
@@ -355,9 +492,9 @@ static zend_always_inline zval **_get_obj_zval_ptr_ptr_unused(TSRMLS_D)
}
}
-static inline zval *_get_obj_zval_ptr(znode *op, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
+static inline zval *_get_obj_zval_ptr(int op_type, znode_op *op, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC)
{
- if (op->op_type == IS_UNUSED) {
+ if (op_type == IS_UNUSED) {
if (EXPECTED(EG(This) != NULL)) {
should_free->var = 0;
return EG(This);
@@ -365,22 +502,7 @@ static inline zval *_get_obj_zval_ptr(znode *op, const temp_variable *Ts, zend_f
zend_error_noreturn(E_ERROR, "Using $this when not in object context");
}
}
- return get_zval_ptr(op, Ts, should_free, type);
-}
-
-static inline void zend_switch_free(temp_variable *T, int extended_value TSRMLS_DC)
-{
- if (T->var.ptr) {
- if (extended_value & ZEND_FE_RESET_VARIABLE) { /* foreach() free */
- Z_DELREF_P(T->var.ptr);
- }
- zval_ptr_dtor(&T->var.ptr);
- } else if (!T->var.ptr_ptr) {
- /* perform the equivalent of equivalent of a
- * quick & silent get_zval_ptr, and FREE_OP
- */
- PZVAL_UNLOCK_FREE(T->str_offset.str);
- }
+ return get_zval_ptr(op_type, op, Ts, should_free, type);
}
static void zend_assign_to_variable_reference(zval **variable_ptr_ptr, zval **value_ptr_ptr TSRMLS_DC)
@@ -388,7 +510,7 @@ static void zend_assign_to_variable_reference(zval **variable_ptr_ptr, zval **va
zval *variable_ptr = *variable_ptr_ptr;
zval *value_ptr = *value_ptr_ptr;
- if (variable_ptr == EG(error_zval_ptr) || value_ptr==EG(error_zval_ptr)) {
+ if (variable_ptr == &EG(error_zval) || value_ptr == &EG(error_zval)) {
variable_ptr_ptr = &EG(uninitialized_zval_ptr);
} else if (variable_ptr != value_ptr) {
if (!PZVAL_IS_REF(value_ptr)) {
@@ -396,7 +518,7 @@ static void zend_assign_to_variable_reference(zval **variable_ptr_ptr, zval **va
Z_DELREF_P(value_ptr);
if (Z_REFCOUNT_P(value_ptr)>0) {
ALLOC_ZVAL(*value_ptr_ptr);
- **value_ptr_ptr = *value_ptr;
+ ZVAL_COPY_VALUE(*value_ptr_ptr, value_ptr);
value_ptr = *value_ptr_ptr;
zendi_zval_copy_ctor(*value_ptr);
}
@@ -411,12 +533,12 @@ static void zend_assign_to_variable_reference(zval **variable_ptr_ptr, zval **va
} else if (!Z_ISREF_P(variable_ptr)) {
if (variable_ptr_ptr == value_ptr_ptr) {
SEPARATE_ZVAL(variable_ptr_ptr);
- } else if (variable_ptr==EG(uninitialized_zval_ptr)
+ } else if (variable_ptr==&EG(uninitialized_zval)
|| Z_REFCOUNT_P(variable_ptr)>2) {
/* we need to separate */
Z_SET_REFCOUNT_P(variable_ptr, Z_REFCOUNT_P(variable_ptr) - 2);
ALLOC_ZVAL(*variable_ptr_ptr);
- **variable_ptr_ptr = *variable_ptr;
+ ZVAL_COPY_VALUE(*variable_ptr_ptr, variable_ptr);
zval_copy_ctor(*variable_ptr_ptr);
*value_ptr_ptr = *variable_ptr_ptr;
Z_SET_REFCOUNT_PP(variable_ptr_ptr, 2);
@@ -432,7 +554,7 @@ static inline void make_real_object(zval **object_ptr TSRMLS_DC)
|| (Z_TYPE_PP(object_ptr) == IS_BOOL && Z_LVAL_PP(object_ptr) == 0)
|| (Z_TYPE_PP(object_ptr) == IS_STRING && Z_STRLEN_PP(object_ptr) == 0)
) {
- zend_error(E_STRICT, "Creating default object from empty value");
+ zend_error(E_WARNING, "Creating default object from empty value");
SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
zval_dtor(*object_ptr);
@@ -440,7 +562,7 @@ static inline void make_real_object(zval **object_ptr TSRMLS_DC)
}
}
-static inline char * zend_verify_arg_class_kind(const zend_arg_info *cur_arg_info, ulong fetch_type, const char **class_name, zend_class_entry **pce TSRMLS_DC)
+ZEND_API char * zend_verify_arg_class_kind(const zend_arg_info *cur_arg_info, ulong fetch_type, const char **class_name, zend_class_entry **pce TSRMLS_DC)
{
*pce = zend_fetch_class(cur_arg_info->class_name, cur_arg_info->class_name_len, (fetch_type | ZEND_FETCH_CLASS_AUTO | ZEND_FETCH_CLASS_NO_AUTOLOAD) TSRMLS_CC);
@@ -452,12 +574,12 @@ static inline char * zend_verify_arg_class_kind(const zend_arg_info *cur_arg_inf
}
}
-static inline int zend_verify_arg_error(const zend_function *zf, zend_uint arg_num, const zend_arg_info *cur_arg_info, const char *need_msg, const char *need_kind, const char *given_msg, char *given_kind TSRMLS_DC)
+ZEND_API int zend_verify_arg_error(int error_type, const zend_function *zf, zend_uint arg_num, const char *need_msg, const char *need_kind, const char *given_msg, const char *given_kind TSRMLS_DC)
{
zend_execute_data *ptr = EG(current_execute_data)->prev_execute_data;
- char *fname = zf->common.function_name;
+ const char *fname = zf->common.function_name;
char *fsep;
- char *fclass;
+ const char *fclass;
if (zf->common.scope) {
fsep = "::";
@@ -468,9 +590,9 @@ static inline int zend_verify_arg_error(const zend_function *zf, zend_uint arg_n
}
if (ptr && ptr->op_array) {
- zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %s%s%s() must %s%s, %s%s given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, need_msg, need_kind, given_msg, given_kind, ptr->op_array->filename, ptr->opline->lineno);
+ zend_error(error_type, "Argument %d passed to %s%s%s() must %s%s, %s%s given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, need_msg, need_kind, given_msg, given_kind, ptr->op_array->filename, ptr->opline->lineno);
} else {
- zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %s%s%s() must %s%s, %s%s given", arg_num, fclass, fsep, fname, need_msg, need_kind, given_msg, given_kind);
+ zend_error(error_type, "Argument %d passed to %s%s%s() must %s%s, %s%s given", arg_num, fclass, fsep, fname, need_msg, need_kind, given_msg, given_kind);
}
return 0;
}
@@ -493,40 +615,55 @@ static inline int zend_verify_arg_type(zend_function *zf, zend_uint arg_num, zva
if (!arg) {
need_msg = zend_verify_arg_class_kind(cur_arg_info, fetch_type, &class_name, &ce TSRMLS_CC);
- return zend_verify_arg_error(zf, arg_num, cur_arg_info, need_msg, class_name, "none", "" TSRMLS_CC);
+ return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, need_msg, class_name, "none", "" TSRMLS_CC);
}
if (Z_TYPE_P(arg) == IS_OBJECT) {
need_msg = zend_verify_arg_class_kind(cur_arg_info, fetch_type, &class_name, &ce TSRMLS_CC);
if (!ce || !instanceof_function(Z_OBJCE_P(arg), ce TSRMLS_CC)) {
- return zend_verify_arg_error(zf, arg_num, cur_arg_info, need_msg, class_name, "instance of ", Z_OBJCE_P(arg)->name TSRMLS_CC);
+ return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, need_msg, class_name, "instance of ", Z_OBJCE_P(arg)->name TSRMLS_CC);
}
} else if (Z_TYPE_P(arg) != IS_NULL || !cur_arg_info->allow_null) {
need_msg = zend_verify_arg_class_kind(cur_arg_info, fetch_type, &class_name, &ce TSRMLS_CC);
- return zend_verify_arg_error(zf, arg_num, cur_arg_info, need_msg, class_name, zend_zval_type_name(arg), "" TSRMLS_CC);
+ return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, need_msg, class_name, zend_zval_type_name(arg), "" TSRMLS_CC);
}
- } else if (cur_arg_info->array_type_hint) {
- if (!arg) {
- return zend_verify_arg_error(zf, arg_num, cur_arg_info, "be an array", "", "none", "" TSRMLS_CC);
- }
- if (Z_TYPE_P(arg) != IS_ARRAY && (Z_TYPE_P(arg) != IS_NULL || !cur_arg_info->allow_null)) {
- return zend_verify_arg_error(zf, arg_num, cur_arg_info, "be an array", "", zend_zval_type_name(arg), "" TSRMLS_CC);
+ } else if (cur_arg_info->type_hint) {
+ switch(cur_arg_info->type_hint) {
+ case IS_ARRAY:
+ if (!arg) {
+ return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be of the type array", "", "none", "" TSRMLS_CC);
+ }
+
+ if (Z_TYPE_P(arg) != IS_ARRAY && (Z_TYPE_P(arg) != IS_NULL || !cur_arg_info->allow_null)) {
+ return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be of the type array", "", zend_zval_type_name(arg), "" TSRMLS_CC);
+ }
+ break;
+
+ case IS_CALLABLE:
+ if (!arg) {
+ return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be callable", "", "none", "" TSRMLS_CC);
+ }
+ if (!zend_is_callable(arg, IS_CALLABLE_CHECK_SILENT, NULL TSRMLS_CC) && (Z_TYPE_P(arg) != IS_NULL || !cur_arg_info->allow_null)) {
+ return zend_verify_arg_error(E_RECOVERABLE_ERROR, zf, arg_num, "be callable", "", zend_zval_type_name(arg), "" TSRMLS_CC);
+ }
+ break;
+
+ default:
+ zend_error(E_ERROR, "Unknown typehint");
}
}
return 1;
}
-static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval *property_name, znode *value_op, const temp_variable *Ts, int opcode TSRMLS_DC)
-
+static inline void zend_assign_to_object(zval **retval, zval **object_ptr, zval *property_name, int value_type, znode_op *value_op, const temp_variable *Ts, int opcode, const zend_literal *key TSRMLS_DC)
{
zval *object = *object_ptr;
zend_free_op free_value;
- zval *value = get_zval_ptr(value_op, Ts, &free_value, BP_VAR_R);
- zval **retval = &T(result->u.var).var.ptr;
+ zval *value = get_zval_ptr(value_type, value_op, Ts, &free_value, BP_VAR_R);
if (Z_TYPE_P(object) != IS_OBJECT) {
- if (object == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(result)) {
- *retval = EG(uninitialized_zval_ptr);
+ if (object == &EG(error_zval)) {
+ if (retval) {
+ *retval = &EG(uninitialized_zval);
PZVAL_LOCK(*retval);
}
FREE_OP(free_value);
@@ -538,7 +675,7 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval
SEPARATE_ZVAL_IF_NOT_REF(object_ptr);
object = *object_ptr;
Z_ADDREF_P(object);
- zend_error(E_STRICT, "Creating default object from empty value");
+ zend_error(E_WARNING, "Creating default object from empty value");
if (Z_REFCOUNT_P(object) == 1) {
/* object was removed by error handler, nothing to assign to */
zval_ptr_dtor(&object);
@@ -554,28 +691,28 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval
object_init(object);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- *retval = EG(uninitialized_zval_ptr);
+ if (retval) {
+ *retval = &EG(uninitialized_zval);
PZVAL_LOCK(*retval);
}
FREE_OP(free_value);
return;
}
}
-
+
/* separate our value if necessary */
- if (value_op->op_type == IS_TMP_VAR) {
+ if (value_type == IS_TMP_VAR) {
zval *orig_value = value;
ALLOC_ZVAL(value);
- *value = *orig_value;
+ ZVAL_COPY_VALUE(value, orig_value);
Z_UNSET_ISREF_P(value);
Z_SET_REFCOUNT_P(value, 0);
- } else if (value_op->op_type == IS_CONST) {
+ } else if (value_type == IS_CONST) {
zval *orig_value = value;
ALLOC_ZVAL(value);
- *value = *orig_value;
+ ZVAL_COPY_VALUE(value, orig_value);
Z_UNSET_ISREF_P(value);
Z_SET_REFCOUNT_P(value, 0);
zval_copy_ctor(value);
@@ -586,19 +723,19 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval
if (opcode == ZEND_ASSIGN_OBJ) {
if (!Z_OBJ_HT_P(object)->write_property) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (retval) {
+ *retval = &EG(uninitialized_zval);
+ PZVAL_LOCK(&EG(uninitialized_zval));
}
- if (value_op->op_type == IS_TMP_VAR) {
+ if (value_type == IS_TMP_VAR) {
FREE_ZVAL(value);
- } else if (value_op->op_type == IS_CONST) {
+ } else if (value_type == IS_CONST) {
zval_ptr_dtor(&value);
}
FREE_OP(free_value);
return;
}
- Z_OBJ_HT_P(object)->write_property(object, property_name, value TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property_name, value, key TSRMLS_CC);
} else {
/* Note: property_name in this case is really the array index! */
if (!Z_OBJ_HT_P(object)->write_dimension) {
@@ -607,8 +744,8 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, zval
Z_OBJ_HT_P(object)->write_dimension(object, property_name, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result) && !EG(exception)) {
- AI_SET_PTR(T(result->u.var).var, value);
+ if (retval && !EG(exception)) {
+ *retval = value;
PZVAL_LOCK(value);
}
zval_ptr_dtor(&value);
@@ -625,17 +762,30 @@ static inline int zend_assign_to_string_offset(const temp_variable *T, const zva
}
if (T->str_offset.offset >= Z_STRLEN_P(T->str_offset.str)) {
- Z_STRVAL_P(T->str_offset.str) = (char *) erealloc(Z_STRVAL_P(T->str_offset.str), T->str_offset.offset+1+1);
+ if (IS_INTERNED(Z_STRVAL_P(T->str_offset.str))) {
+ char *tmp = (char *) emalloc(T->str_offset.offset+1+1);
+
+ memcpy(tmp, Z_STRVAL_P(T->str_offset.str), Z_STRLEN_P(T->str_offset.str)+1);
+ Z_STRVAL_P(T->str_offset.str) = tmp;
+ } else {
+ Z_STRVAL_P(T->str_offset.str) = (char *) erealloc(Z_STRVAL_P(T->str_offset.str), T->str_offset.offset+1+1);
+ }
memset(Z_STRVAL_P(T->str_offset.str) + Z_STRLEN_P(T->str_offset.str),
' ',
T->str_offset.offset - Z_STRLEN_P(T->str_offset.str));
Z_STRVAL_P(T->str_offset.str)[T->str_offset.offset+1] = 0;
Z_STRLEN_P(T->str_offset.str) = T->str_offset.offset+1;
+ } else if (IS_INTERNED(Z_STRVAL_P(T->str_offset.str))) {
+ char *tmp = (char *) emalloc(Z_STRLEN_P(T->str_offset.str) + 1);
+
+ memcpy(tmp, Z_STRVAL_P(T->str_offset.str), Z_STRLEN_P(T->str_offset.str) + 1);
+ Z_STRVAL_P(T->str_offset.str) = tmp;
}
if (Z_TYPE_P(value) != IS_STRING) {
- zval tmp = *value;
+ zval tmp;
+ ZVAL_COPY_VALUE(&tmp, value);
if (value_type != IS_TMP_VAR) {
zval_copy_ctor(&tmp);
}
@@ -659,92 +809,139 @@ static inline int zend_assign_to_string_offset(const temp_variable *T, const zva
return 1;
}
-static inline zval* zend_assign_to_variable(zval **variable_ptr_ptr, zval *value, int is_tmp_var TSRMLS_DC)
+
+static inline zval* zend_assign_tmp_to_variable(zval **variable_ptr_ptr, zval *value TSRMLS_DC)
{
zval *variable_ptr = *variable_ptr_ptr;
zval garbage;
- if (variable_ptr == EG(error_zval_ptr)) {
- if (is_tmp_var) {
- zval_dtor(value);
+ if (Z_TYPE_P(variable_ptr) == IS_OBJECT &&
+ UNEXPECTED(Z_OBJ_HANDLER_P(variable_ptr, set) != NULL)) {
+ Z_OBJ_HANDLER_P(variable_ptr, set)(variable_ptr_ptr, value TSRMLS_CC);
+ return variable_ptr;
+ }
+
+ if (UNEXPECTED(Z_REFCOUNT_P(variable_ptr) > 1) &&
+ EXPECTED(!PZVAL_IS_REF(variable_ptr))) {
+ /* we need to split */
+ Z_DELREF_P(variable_ptr);
+ GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr);
+ ALLOC_ZVAL(variable_ptr);
+ INIT_PZVAL_COPY(variable_ptr, value);
+ *variable_ptr_ptr = variable_ptr;
+ return variable_ptr;
+ } else {
+ if (EXPECTED(Z_TYPE_P(variable_ptr) <= IS_BOOL)) {
+ /* nothing to destroy */
+ ZVAL_COPY_VALUE(variable_ptr, value);
+ } else {
+ ZVAL_COPY_VALUE(&garbage, variable_ptr);
+ ZVAL_COPY_VALUE(variable_ptr, value);
+ _zval_dtor_func(&garbage ZEND_FILE_LINE_CC);
}
- return EG(uninitialized_zval_ptr);
+ return variable_ptr;
}
+}
- if (Z_TYPE_P(variable_ptr) == IS_OBJECT && Z_OBJ_HANDLER_P(variable_ptr, set)) {
+static inline zval* zend_assign_const_to_variable(zval **variable_ptr_ptr, zval *value TSRMLS_DC)
+{
+ zval *variable_ptr = *variable_ptr_ptr;
+ zval garbage;
+
+ if (Z_TYPE_P(variable_ptr) == IS_OBJECT &&
+ UNEXPECTED(Z_OBJ_HANDLER_P(variable_ptr, set) != NULL)) {
Z_OBJ_HANDLER_P(variable_ptr, set)(variable_ptr_ptr, value TSRMLS_CC);
return variable_ptr;
}
- if (PZVAL_IS_REF(variable_ptr)) {
- if (variable_ptr!=value) {
- zend_uint refcount = Z_REFCOUNT_P(variable_ptr);
-
- garbage = *variable_ptr;
- *variable_ptr = *value;
- Z_SET_REFCOUNT_P(variable_ptr, refcount);
- Z_SET_ISREF_P(variable_ptr);
- if (!is_tmp_var) {
- zendi_zval_copy_ctor(*variable_ptr);
- }
- zendi_zval_dtor(garbage);
- return variable_ptr;
+ if (UNEXPECTED(Z_REFCOUNT_P(variable_ptr) > 1) &&
+ EXPECTED(!PZVAL_IS_REF(variable_ptr))) {
+ /* we need to split */
+ Z_DELREF_P(variable_ptr);
+ GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr);
+ ALLOC_ZVAL(variable_ptr);
+ INIT_PZVAL_COPY(variable_ptr, value);
+ zval_copy_ctor(variable_ptr);
+ *variable_ptr_ptr = variable_ptr;
+ return variable_ptr;
+ } else {
+ if (EXPECTED(Z_TYPE_P(variable_ptr) <= IS_BOOL)) {
+ /* nothing to destroy */
+ ZVAL_COPY_VALUE(variable_ptr, value);
+ zendi_zval_copy_ctor(*variable_ptr);
+ } else {
+ ZVAL_COPY_VALUE(&garbage, variable_ptr);
+ ZVAL_COPY_VALUE(variable_ptr, value);
+ zendi_zval_copy_ctor(*variable_ptr);
+ _zval_dtor_func(&garbage ZEND_FILE_LINE_CC);
}
- } else {
- if (Z_DELREF_P(variable_ptr)==0) {
- if (!is_tmp_var) {
- if (variable_ptr==value) {
- Z_ADDREF_P(variable_ptr);
- } else if (PZVAL_IS_REF(value)) {
- garbage = *variable_ptr;
- *variable_ptr = *value;
- INIT_PZVAL(variable_ptr);
- zval_copy_ctor(variable_ptr);
- zendi_zval_dtor(garbage);
- return variable_ptr;
+ return variable_ptr;
+ }
+}
+
+static inline zval* zend_assign_to_variable(zval **variable_ptr_ptr, zval *value TSRMLS_DC)
+{
+ zval *variable_ptr = *variable_ptr_ptr;
+ zval garbage;
+
+ if (Z_TYPE_P(variable_ptr) == IS_OBJECT &&
+ UNEXPECTED(Z_OBJ_HANDLER_P(variable_ptr, set) != NULL)) {
+ Z_OBJ_HANDLER_P(variable_ptr, set)(variable_ptr_ptr, value TSRMLS_CC);
+ return variable_ptr;
+ }
+
+ if (EXPECTED(!PZVAL_IS_REF(variable_ptr))) {
+ if (Z_REFCOUNT_P(variable_ptr)==1) {
+ if (UNEXPECTED(variable_ptr == value)) {
+ return variable_ptr;
+ } else if (EXPECTED(!PZVAL_IS_REF(value))) {
+ Z_ADDREF_P(value);
+ *variable_ptr_ptr = value;
+ if (EXPECTED(variable_ptr != &EG(uninitialized_zval))) {
+ GC_REMOVE_ZVAL_FROM_BUFFER(variable_ptr);
+ zval_dtor(variable_ptr);
+ efree(variable_ptr);
} else {
- Z_ADDREF_P(value);
- *variable_ptr_ptr = value;
- if (variable_ptr != &EG(uninitialized_zval)) {
- GC_REMOVE_ZVAL_FROM_BUFFER(variable_ptr);
- zval_dtor(variable_ptr);
- efree(variable_ptr);
- }
- return value;
+ Z_DELREF_P(variable_ptr);
}
+ return value;
} else {
- garbage = *variable_ptr;
- *variable_ptr = *value;
- INIT_PZVAL(variable_ptr);
- zendi_zval_dtor(garbage);
- return variable_ptr;
+ goto copy_value;
}
} else { /* we need to split */
- GC_ZVAL_CHECK_POSSIBLE_ROOT(*variable_ptr_ptr);
- if (!is_tmp_var) {
- if (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0) {
- ALLOC_ZVAL(variable_ptr);
- *variable_ptr_ptr = variable_ptr;
- *variable_ptr = *value;
- Z_SET_REFCOUNT_P(variable_ptr, 1);
- zval_copy_ctor(variable_ptr);
- } else {
- *variable_ptr_ptr = value;
- Z_ADDREF_P(value);
- }
+ Z_DELREF_P(variable_ptr);
+ GC_ZVAL_CHECK_POSSIBLE_ROOT(variable_ptr);
+ if (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0) {
+ ALLOC_ZVAL(variable_ptr);
+ *variable_ptr_ptr = variable_ptr;
+ INIT_PZVAL_COPY(variable_ptr, value);
+ zval_copy_ctor(variable_ptr);
+ return variable_ptr;
} else {
- ALLOC_ZVAL(*variable_ptr_ptr);
- Z_SET_REFCOUNT_P(value, 1);
- **variable_ptr_ptr = *value;
+ *variable_ptr_ptr = value;
+ Z_ADDREF_P(value);
+ Z_UNSET_ISREF_P(value);
+ return value;
}
}
- Z_UNSET_ISREF_PP(variable_ptr_ptr);
+ } else {
+ if (EXPECTED(variable_ptr != value)) {
+copy_value:
+ if (EXPECTED(Z_TYPE_P(variable_ptr) <= IS_BOOL)) {
+ /* nothing to destroy */
+ ZVAL_COPY_VALUE(variable_ptr, value);
+ zendi_zval_copy_ctor(*variable_ptr);
+ } else {
+ ZVAL_COPY_VALUE(&garbage, variable_ptr);
+ ZVAL_COPY_VALUE(variable_ptr, value);
+ zendi_zval_copy_ctor(*variable_ptr);
+ _zval_dtor_func(&garbage ZEND_FILE_LINE_CC);
+ }
+ }
+ return variable_ptr;
}
-
- return *variable_ptr_ptr;
}
-
/* Utility Functions for Extensions */
static void zend_extension_statement_handler(const zend_extension *extension, zend_op_array *op_array TSRMLS_DC)
{
@@ -770,9 +967,9 @@ static void zend_extension_fcall_end_handler(const zend_extension *extension, ze
}
-static inline HashTable *zend_get_target_symbol_table(const zend_op *opline, const temp_variable *Ts, int type, const zval *variable TSRMLS_DC)
+static inline HashTable *zend_get_target_symbol_table(int fetch_type TSRMLS_DC)
{
- switch (opline->op2.u.EA.type) {
+ switch (fetch_type) {
case ZEND_FETCH_LOCAL:
if (!EG(active_symbol_table)) {
zend_rebuild_symbol_table(TSRMLS_C);
@@ -795,26 +992,37 @@ static inline HashTable *zend_get_target_symbol_table(const zend_op *opline, con
return NULL;
}
-static inline zval **zend_fetch_dimension_address_inner(HashTable *ht, const zval *dim, int type TSRMLS_DC)
+static inline zval **zend_fetch_dimension_address_inner(HashTable *ht, const zval *dim, int dim_type, int type TSRMLS_DC)
{
zval **retval;
char *offset_key;
int offset_key_length;
- long index;
+ ulong hval;
switch (dim->type) {
case IS_NULL:
offset_key = "";
offset_key_length = 0;
+ hval = zend_inline_hash_func("", 1);
goto fetch_string_dim;
case IS_STRING:
-
+
offset_key = dim->value.str.val;
offset_key_length = dim->value.str.len;
-
+
+ if (dim_type == IS_CONST) {
+ hval = Z_HASH_P(dim);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(offset_key, offset_key_length+1, hval, goto num_index);
+ if (IS_INTERNED(offset_key)) {
+ hval = INTERNED_HASH(offset_key);
+ } else {
+ hval = zend_hash_func(offset_key, offset_key_length+1);
+ }
+ }
fetch_string_dim:
- if (zend_symtable_find(ht, offset_key, offset_key_length+1, (void **) &retval) == FAILURE) {
+ if (zend_hash_quick_find(ht, offset_key, offset_key_length+1, hval, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
zend_error(E_NOTICE, "Undefined index: %s", offset_key);
@@ -830,39 +1038,39 @@ fetch_string_dim:
zval *new_zval = &EG(uninitialized_zval);
Z_ADDREF_P(new_zval);
- zend_symtable_update(ht, offset_key, offset_key_length+1, &new_zval, sizeof(zval *), (void **) &retval);
+ zend_hash_quick_update(ht, offset_key, offset_key_length+1, hval, &new_zval, sizeof(zval *), (void **) &retval);
}
break;
}
}
break;
case IS_DOUBLE:
- index = zend_dval_to_lval(Z_DVAL_P(dim));
+ hval = zend_dval_to_lval(Z_DVAL_P(dim));
goto num_index;
case IS_RESOURCE:
zend_error(E_STRICT, "Resource ID#%ld used as offset, casting to integer (%ld)", Z_LVAL_P(dim), Z_LVAL_P(dim));
/* Fall Through */
case IS_BOOL:
case IS_LONG:
- index = Z_LVAL_P(dim);
+ hval = Z_LVAL_P(dim);
num_index:
- if (zend_hash_index_find(ht, index, (void **) &retval) == FAILURE) {
+ if (zend_hash_index_find(ht, hval, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
- zend_error(E_NOTICE,"Undefined offset: %ld", index);
+ zend_error(E_NOTICE,"Undefined offset: %ld", hval);
/* break missing intentionally */
case BP_VAR_UNSET:
case BP_VAR_IS:
retval = &EG(uninitialized_zval_ptr);
break;
case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined offset: %ld", index);
+ zend_error(E_NOTICE,"Undefined offset: %ld", hval);
/* break missing intentionally */
case BP_VAR_W: {
zval *new_zval = &EG(uninitialized_zval);
Z_ADDREF_P(new_zval);
- zend_hash_index_update(ht, index, &new_zval, sizeof(zval *), (void **) &retval);
+ zend_hash_index_update(ht, hval, &new_zval, sizeof(zval *), (void **) &retval);
}
break;
}
@@ -877,7 +1085,7 @@ num_index:
return retval;
}
-static void zend_fetch_dimension_address(temp_variable *result, zval **container_ptr, zval *dim, int dim_is_tmp_var, int type TSRMLS_DC)
+static void zend_fetch_dimension_address(temp_variable *result, zval **container_ptr, zval *dim, int dim_type, int type TSRMLS_DC)
{
zval *container = *container_ptr;
zval **retval;
@@ -900,7 +1108,7 @@ fetch_from_array:
Z_DELREF_P(new_zval);
}
} else {
- retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, type TSRMLS_CC);
+ retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, dim_type, type TSRMLS_CC);
}
result->var.ptr_ptr = retval;
PZVAL_LOCK(*retval);
@@ -908,7 +1116,7 @@ fetch_from_array:
break;
case IS_NULL:
- if (container == EG(error_zval_ptr)) {
+ if (container == &EG(error_zval)) {
result->var.ptr_ptr = &EG(error_zval_ptr);
PZVAL_LOCK(EG(error_zval_ptr));
} else if (type != BP_VAR_UNSET) {
@@ -939,13 +1147,22 @@ convert_to_array:
}
if (Z_TYPE_P(dim) != IS_LONG) {
+
switch(Z_TYPE_P(dim)) {
/* case IS_LONG: */
case IS_STRING:
+ if (IS_LONG == is_numeric_string(Z_STRVAL_P(dim), Z_STRLEN_P(dim), NULL, NULL, -1)) {
+ break;
+ }
+ if (type != BP_VAR_UNSET) {
+ zend_error(E_WARNING, "Illegal string offset '%s'", dim->value.str.val);
+ }
+
+ break;
case IS_DOUBLE:
case IS_NULL:
case IS_BOOL:
- /* do nothing */
+ zend_error(E_NOTICE, "String offset cast occured");
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -964,8 +1181,7 @@ convert_to_array:
result->str_offset.str = container;
PZVAL_LOCK(container);
result->str_offset.offset = Z_LVAL_P(dim);
- result->var.ptr_ptr = NULL;
- result->var.ptr = NULL;
+ result->str_offset.ptr_ptr = NULL;
return;
}
break;
@@ -976,7 +1192,7 @@ convert_to_array:
} else {
zval *overloaded_result;
- if (dim_is_tmp_var) {
+ if (dim_type == IS_TMP_VAR) {
zval *orig = dim;
MAKE_REAL_ZVAL_PTR(dim);
ZVAL_NULL(orig);
@@ -989,7 +1205,7 @@ convert_to_array:
zval *tmp = overloaded_result;
ALLOC_ZVAL(overloaded_result);
- *overloaded_result = *tmp;
+ ZVAL_COPY_VALUE(overloaded_result, tmp);
zval_copy_ctor(overloaded_result);
Z_UNSET_ISREF_P(overloaded_result);
Z_SET_REFCOUNT_P(overloaded_result, 0);
@@ -1003,9 +1219,9 @@ convert_to_array:
} else {
retval = &EG(error_zval_ptr);
}
- AI_SET_PTR(result->var, *retval);
+ AI_SET_PTR(result, *retval);
PZVAL_LOCK(*retval);
- if (dim_is_tmp_var) {
+ if (dim_type == IS_TMP_VAR) {
zval_ptr_dtor(&dim);
}
}
@@ -1021,8 +1237,8 @@ convert_to_array:
default:
if (type == BP_VAR_UNSET) {
zend_error(E_WARNING, "Cannot unset offset in a non-array variable");
- AI_SET_PTR(result->var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ AI_SET_PTR(result, &EG(uninitialized_zval));
+ PZVAL_LOCK(&EG(uninitialized_zval));
} else {
zend_error(E_WARNING, "Cannot use a scalar value as an array");
result->var.ptr_ptr = &EG(error_zval_ptr);
@@ -1032,7 +1248,7 @@ convert_to_array:
}
}
-static void zend_fetch_dimension_address_read(temp_variable *result, zval **container_ptr, zval *dim, int dim_is_tmp_var, int type TSRMLS_DC)
+static void zend_fetch_dimension_address_read(temp_variable *result, zval **container_ptr, zval *dim, int dim_type, int type TSRMLS_DC)
{
zval *container = *container_ptr;
zval **retval;
@@ -1040,54 +1256,66 @@ static void zend_fetch_dimension_address_read(temp_variable *result, zval **cont
switch (Z_TYPE_P(container)) {
case IS_ARRAY:
- retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, type TSRMLS_CC);
- if (result) {
- AI_SET_PTR(result->var, *retval);
- PZVAL_LOCK(*retval);
- }
+ retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, dim_type, type TSRMLS_CC);
+ AI_SET_PTR(result, *retval);
+ PZVAL_LOCK(*retval);
return;
- break;
case IS_NULL:
- if (result) {
- AI_SET_PTR(result->var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ AI_SET_PTR(result, &EG(uninitialized_zval));
+ PZVAL_LOCK(&EG(uninitialized_zval));
return;
- break;
case IS_STRING: {
zval tmp;
+ zval *ptr;
if (Z_TYPE_P(dim) != IS_LONG) {
switch(Z_TYPE_P(dim)) {
/* case IS_LONG: */
case IS_STRING:
+ if (IS_LONG == is_numeric_string(Z_STRVAL_P(dim), Z_STRLEN_P(dim), NULL, NULL, -1)) {
+ break;
+ }
+ if (type != BP_VAR_IS) {
+ zend_error(E_WARNING, "Illegal string offset '%s'", dim->value.str.val);
+ }
+ break;
case IS_DOUBLE:
case IS_NULL:
case IS_BOOL:
- /* do nothing */
+ if (type != BP_VAR_IS) {
+ zend_error(E_NOTICE, "String offset cast occured");
+ }
break;
default:
zend_error(E_WARNING, "Illegal offset type");
break;
}
- tmp = *dim;
+ ZVAL_COPY_VALUE(&tmp, dim);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
dim = &tmp;
}
- if (result) {
- if ((Z_LVAL_P(dim) < 0 || Z_STRLEN_P(container) <= Z_LVAL_P(dim)) && type != BP_VAR_IS) {
+
+ ALLOC_ZVAL(ptr);
+ INIT_PZVAL(ptr);
+ Z_TYPE_P(ptr) = IS_STRING;
+
+ if (Z_LVAL_P(dim) < 0 || Z_STRLEN_P(container) <= Z_LVAL_P(dim)) {
+ if (type != BP_VAR_IS) {
zend_error(E_NOTICE, "Uninitialized string offset: %ld", Z_LVAL_P(dim));
}
- result->str_offset.str = container;
- PZVAL_LOCK(container);
- result->str_offset.offset = Z_LVAL_P(dim);
- result->var.ptr_ptr = NULL;
- result->var.ptr = NULL;
+ Z_STRVAL_P(ptr) = STR_EMPTY_ALLOC();
+ Z_STRLEN_P(ptr) = 0;
+ } else {
+ Z_STRVAL_P(ptr) = (char*)emalloc(2);
+ Z_STRVAL_P(ptr)[0] = Z_STRVAL_P(container)[Z_LVAL_P(dim)];
+ Z_STRVAL_P(ptr)[1] = 0;
+ Z_STRLEN_P(ptr) = 1;
}
+ AI_SET_PTR(result, ptr);
return;
}
break;
@@ -1098,7 +1326,7 @@ static void zend_fetch_dimension_address_read(temp_variable *result, zval **cont
} else {
zval *overloaded_result;
- if (dim_is_tmp_var) {
+ if (dim_type == IS_TMP_VAR) {
zval *orig = dim;
MAKE_REAL_ZVAL_PTR(dim);
ZVAL_NULL(orig);
@@ -1106,43 +1334,33 @@ static void zend_fetch_dimension_address_read(temp_variable *result, zval **cont
overloaded_result = Z_OBJ_HT_P(container)->read_dimension(container, dim, type TSRMLS_CC);
if (overloaded_result) {
- if (result) {
- AI_SET_PTR(result->var, overloaded_result);
- PZVAL_LOCK(overloaded_result);
- } else if (Z_REFCOUNT_P(overloaded_result) == 0) {
- /* Destroy unused result from offsetGet() magic method */
- Z_SET_REFCOUNT_P(overloaded_result, 1);
- zval_ptr_dtor(&overloaded_result);
- }
+ AI_SET_PTR(result, overloaded_result);
+ PZVAL_LOCK(overloaded_result);
} else if (result) {
- AI_SET_PTR(result->var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ AI_SET_PTR(result, &EG(uninitialized_zval));
+ PZVAL_LOCK(&EG(uninitialized_zval));
}
- if (dim_is_tmp_var) {
+ if (dim_type == IS_TMP_VAR) {
zval_ptr_dtor(&dim);
}
}
return;
- break;
default:
- if (result) {
- AI_SET_PTR(result->var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ AI_SET_PTR(result, &EG(uninitialized_zval));
+ PZVAL_LOCK(&EG(uninitialized_zval));
return;
- break;
}
}
-static void zend_fetch_property_address(temp_variable *result, zval **container_ptr, zval *prop_ptr, int type TSRMLS_DC)
+static void zend_fetch_property_address(temp_variable *result, zval **container_ptr, zval *prop_ptr, const zend_literal *key, int type TSRMLS_DC)
{
zval *container = *container_ptr;;
if (Z_TYPE_P(container) != IS_OBJECT) {
- if (container == EG(error_zval_ptr)) {
+ if (container == &EG(error_zval)) {
result->var.ptr_ptr = &EG(error_zval_ptr);
- PZVAL_LOCK(*result->var.ptr_ptr);
+ PZVAL_LOCK(EG(error_zval_ptr));
return;
}
@@ -1165,13 +1383,13 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_
}
if (Z_OBJ_HT_P(container)->get_property_ptr_ptr) {
- zval **ptr_ptr = Z_OBJ_HT_P(container)->get_property_ptr_ptr(container, prop_ptr TSRMLS_CC);
+ zval **ptr_ptr = Z_OBJ_HT_P(container)->get_property_ptr_ptr(container, prop_ptr, key TSRMLS_CC);
if (NULL == ptr_ptr) {
zval *ptr;
if (Z_OBJ_HT_P(container)->read_property &&
- (ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type TSRMLS_CC)) != NULL) {
- AI_SET_PTR(result->var, ptr);
+ (ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, key TSRMLS_CC)) != NULL) {
+ AI_SET_PTR(result, ptr);
PZVAL_LOCK(ptr);
} else {
zend_error_noreturn(E_ERROR, "Cannot access undefined property for object with overloaded property access");
@@ -1181,9 +1399,9 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_
PZVAL_LOCK(*ptr_ptr);
}
} else if (Z_OBJ_HT_P(container)->read_property) {
- zval *ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type TSRMLS_CC);
+ zval *ptr = Z_OBJ_HT_P(container)->read_property(container, prop_ptr, type, key TSRMLS_CC);
- AI_SET_PTR(result->var, ptr);
+ AI_SET_PTR(result, ptr);
PZVAL_LOCK(ptr);
} else {
zend_error(E_WARNING, "This object doesn't support property references");
@@ -1192,21 +1410,11 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_
}
}
-static inline zend_brk_cont_element* zend_brk_cont(const zval *nest_levels_zval, int array_offset, const zend_op_array *op_array, const temp_variable *Ts TSRMLS_DC)
+static inline zend_brk_cont_element* zend_brk_cont(int nest_levels, int array_offset, const zend_op_array *op_array, const temp_variable *Ts TSRMLS_DC)
{
- zval tmp;
- int nest_levels, original_nest_levels;
+ int original_nest_levels = nest_levels;
zend_brk_cont_element *jmp_to;
- if (nest_levels_zval->type != IS_LONG) {
- tmp = *nest_levels_zval;
- zval_copy_ctor(&tmp);
- convert_to_long(&tmp);
- nest_levels = tmp.value.lval;
- } else {
- nest_levels = nest_levels_zval->value.lval;
- }
- original_nest_levels = nest_levels;
do {
if (array_offset==-1) {
zend_error_noreturn(E_ERROR, "Cannot break/continue %d level%s", original_nest_levels, (original_nest_levels == 1) ? "" : "s");
@@ -1217,13 +1425,13 @@ static inline zend_brk_cont_element* zend_brk_cont(const zval *nest_levels_zval,
switch (brk_opline->opcode) {
case ZEND_SWITCH_FREE:
- if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
- zend_switch_free(&T(brk_opline->op1.u.var), brk_opline->extended_value TSRMLS_CC);
+ if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
+ zval_ptr_dtor(&T(brk_opline->op1.var).var.ptr);
}
break;
case ZEND_FREE:
- if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
- zendi_zval_dtor(T(brk_opline->op1.u.var).tmp_var);
+ if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
+ zendi_zval_dtor(T(brk_opline->op1.var).tmp_var);
}
break;
}
@@ -1269,28 +1477,35 @@ ZEND_API opcode_handler_t *zend_opcode_handlers;
ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC)
{
- zval **return_value_ptr = &(*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.u.var)).var.ptr;
- ((zend_internal_function *) execute_data_ptr->function_state.function)->handler(execute_data_ptr->opline->extended_value, *return_value_ptr, execute_data_ptr->function_state.function->common.return_reference?return_value_ptr:NULL, execute_data_ptr->object, return_value_used TSRMLS_CC);
+ zval **return_value_ptr = &(*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.var)).var.ptr;
+ ((zend_internal_function *) execute_data_ptr->function_state.function)->handler(execute_data_ptr->opline->extended_value, *return_value_ptr, (execute_data_ptr->function_state.function->common.fn_flags & ZEND_ACC_RETURN_REFERENCE)?return_value_ptr:NULL, execute_data_ptr->object, return_value_used TSRMLS_CC);
}
#define ZEND_VM_NEXT_OPCODE() \
CHECK_SYMBOL_TABLES() \
- EX(opline)++; \
+ ZEND_VM_INC_OPCODE(); \
ZEND_VM_CONTINUE()
#define ZEND_VM_SET_OPCODE(new_op) \
CHECK_SYMBOL_TABLES() \
- EX(opline) = new_op
+ OPLINE = new_op
#define ZEND_VM_JMP(new_op) \
- CHECK_SYMBOL_TABLES() \
if (EXPECTED(!EG(exception))) { \
- EX(opline) = new_op; \
+ ZEND_VM_SET_OPCODE(new_op); \
+ } else { \
+ LOAD_OPLINE(); \
} \
ZEND_VM_CONTINUE()
#define ZEND_VM_INC_OPCODE() \
- EX(opline)++
+ OPLINE++
+
+#ifdef __GNUC__
+# define ZEND_VM_GUARD(name) __asm__("#" #name)
+#else
+# define ZEND_VM_GUARD(name)
+#endif
#include "zend_vm_execute.h"
@@ -1309,12 +1524,12 @@ ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(zend_uchar opcode)
return zend_user_opcode_handlers[opcode];
}
-ZEND_API zval *zend_get_zval_ptr(znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) {
- return get_zval_ptr(node, Ts, should_free, type);
+ZEND_API zval *zend_get_zval_ptr(int op_type, const znode_op *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) {
+ return get_zval_ptr(op_type, node, Ts, should_free, type);
}
-ZEND_API zval **zend_get_zval_ptr_ptr(const znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) {
- return get_zval_ptr_ptr(node, Ts, should_free, type);
+ZEND_API zval **zend_get_zval_ptr_ptr(int op_type, const znode_op *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC) {
+ return get_zval_ptr_ptr(op_type, node, Ts, should_free, type);
}
/*
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index fc9a83d05..4f83bdad6 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -35,16 +35,13 @@ typedef union _temp_variable {
zend_bool fcall_returned_reference;
} var;
struct {
- zval **ptr_ptr;
- zval *ptr;
- zend_bool fcall_returned_reference;
+ zval **ptr_ptr; /* shared with var.ptr_ptr */
zval *str;
zend_uint offset;
} str_offset;
struct {
- zval **ptr_ptr;
- zval *ptr;
- zend_bool fcall_returned_reference;
+ zval **ptr_ptr; /* shared with var.ptr_ptr */
+ zval *ptr; /* shared with var.ptr */
HashPointer fe_pos;
} fe;
zend_class_entry *class_entry;
@@ -62,7 +59,7 @@ ZEND_API void execute(zend_op_array *op_array TSRMLS_DC);
ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, int return_value_used TSRMLS_DC);
ZEND_API int zend_is_true(zval *op);
#define safe_free_zval_ptr(p) safe_free_zval_ptr_rel(p ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC)
-static inline void safe_free_zval_ptr_rel(zval *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
+static zend_always_inline void safe_free_zval_ptr_rel(zval *p ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
{
TSRMLS_FETCH();
@@ -71,13 +68,37 @@ static inline void safe_free_zval_ptr_rel(zval *p ZEND_FILE_LINE_DC ZEND_FILE_LI
}
}
ZEND_API int zend_lookup_class(const char *name, int name_length, zend_class_entry ***ce TSRMLS_DC);
-ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_autoload, zend_class_entry ***ce TSRMLS_DC);
+ZEND_API int zend_lookup_class_ex(const char *name, int name_length, const zend_literal *key, int use_autoload, zend_class_entry ***ce TSRMLS_DC);
ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC);
ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *string_name TSRMLS_DC);
ZEND_API int zend_eval_string_ex(char *str, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC);
ZEND_API int zend_eval_stringl_ex(char *str, int str_len, zval *retval_ptr, char *string_name, int handle_exceptions TSRMLS_DC);
-static inline int i_zend_is_true(zval *op)
+ZEND_API char * zend_verify_arg_class_kind(const zend_arg_info *cur_arg_info, ulong fetch_type, const char **class_name, zend_class_entry **pce TSRMLS_DC);
+ZEND_API int zend_verify_arg_error(int error_type, const zend_function *zf, zend_uint arg_num, const char *need_msg, const char *need_kind, const char *given_msg, const char *given_kind TSRMLS_DC);
+
+static zend_always_inline void i_zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC)
+{
+ if (!Z_DELREF_P(zval_ptr)) {
+ TSRMLS_FETCH();
+
+ if (zval_ptr != &EG(uninitialized_zval)) {
+ GC_REMOVE_ZVAL_FROM_BUFFER(zval_ptr);
+ zval_dtor(zval_ptr);
+ efree_rel(zval_ptr);
+ }
+ } else {
+ TSRMLS_FETCH();
+
+ if (Z_REFCOUNT_P(zval_ptr) == 1) {
+ Z_UNSET_ISREF_P(zval_ptr);
+ }
+
+ GC_ZVAL_CHECK_POSSIBLE_ROOT(zval_ptr);
+ }
+}
+
+static zend_always_inline int i_zend_is_true(zval *op)
{
int result;
@@ -140,7 +161,7 @@ ZEND_API int zval_update_constant_no_inline_change(zval **pp, void *arg TSRMLS_D
ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC);
/* dedicated Zend executor functions - do not use! */
-#define ZEND_VM_STACK_PAGE_SIZE ((64 * 1024) - 64)
+#define ZEND_VM_STACK_PAGE_SIZE ((16 * 1024) - 16)
struct _zend_vm_stack {
void **top;
@@ -159,7 +180,7 @@ struct _zend_vm_stack {
} \
} while (0)
-static inline zend_vm_stack zend_vm_stack_new_page(int count) {
+static zend_always_inline zend_vm_stack zend_vm_stack_new_page(int count) {
zend_vm_stack page = (zend_vm_stack)emalloc(ZEND_MM_ALIGNED_SIZE(sizeof(*page)) + sizeof(void*) * count);
page->top = ZEND_VM_STACK_ELEMETS(page);
@@ -168,12 +189,12 @@ static inline zend_vm_stack zend_vm_stack_new_page(int count) {
return page;
}
-static inline void zend_vm_stack_init(TSRMLS_D)
+static zend_always_inline void zend_vm_stack_init(TSRMLS_D)
{
EG(argument_stack) = zend_vm_stack_new_page(ZEND_VM_STACK_PAGE_SIZE);
}
-static inline void zend_vm_stack_destroy(TSRMLS_D)
+static zend_always_inline void zend_vm_stack_destroy(TSRMLS_D)
{
zend_vm_stack stack = EG(argument_stack);
@@ -184,30 +205,30 @@ static inline void zend_vm_stack_destroy(TSRMLS_D)
}
}
-static inline void zend_vm_stack_extend(int count TSRMLS_DC)
+static zend_always_inline void zend_vm_stack_extend(int count TSRMLS_DC)
{
zend_vm_stack p = zend_vm_stack_new_page(count >= ZEND_VM_STACK_PAGE_SIZE ? count : ZEND_VM_STACK_PAGE_SIZE);
p->prev = EG(argument_stack);
EG(argument_stack) = p;
}
-static inline void **zend_vm_stack_top(TSRMLS_D)
+static zend_always_inline void **zend_vm_stack_top(TSRMLS_D)
{
return EG(argument_stack)->top;
}
-static inline void zend_vm_stack_push(void *ptr TSRMLS_DC)
+static zend_always_inline void zend_vm_stack_push(void *ptr TSRMLS_DC)
{
ZEND_VM_STACK_GROW_IF_NEEDED(1);
*(EG(argument_stack)->top++) = ptr;
}
-static inline void zend_vm_stack_push_nocheck(void *ptr TSRMLS_DC)
+static zend_always_inline void zend_vm_stack_push_nocheck(void *ptr TSRMLS_DC)
{
*(EG(argument_stack)->top++) = ptr;
}
-static inline void *zend_vm_stack_pop(TSRMLS_D)
+static zend_always_inline void *zend_vm_stack_pop(TSRMLS_D)
{
void *el = *(--EG(argument_stack)->top);
@@ -219,7 +240,7 @@ static inline void *zend_vm_stack_pop(TSRMLS_D)
return el;
}
-static inline void *zend_vm_stack_alloc(size_t size TSRMLS_DC)
+static zend_always_inline void *zend_vm_stack_alloc(size_t size TSRMLS_DC)
{
void *ret;
@@ -248,7 +269,7 @@ static inline void *zend_vm_stack_alloc(size_t size TSRMLS_DC)
return ret;
}
-static inline void zend_vm_stack_free_int(void *ptr TSRMLS_DC)
+static zend_always_inline void zend_vm_stack_free_int(void *ptr TSRMLS_DC)
{
if (UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == (void**)ptr)) {
zend_vm_stack p = EG(argument_stack);
@@ -260,7 +281,7 @@ static inline void zend_vm_stack_free_int(void *ptr TSRMLS_DC)
}
}
-static inline void zend_vm_stack_free(void *ptr TSRMLS_DC)
+static zend_always_inline void zend_vm_stack_free(void *ptr TSRMLS_DC)
{
if (UNEXPECTED(ZEND_VM_STACK_ELEMETS(EG(argument_stack)) == (void**)ptr)) {
zend_vm_stack p = EG(argument_stack);
@@ -278,7 +299,7 @@ static inline void zend_vm_stack_free(void *ptr TSRMLS_DC)
}
}
-static inline void** zend_vm_stack_push_args(int count TSRMLS_DC)
+static zend_always_inline void** zend_vm_stack_push_args(int count TSRMLS_DC)
{
if (UNEXPECTED(EG(argument_stack)->top - ZEND_VM_STACK_ELEMETS(EG(argument_stack)) < count) ||
@@ -307,7 +328,7 @@ static inline void** zend_vm_stack_push_args(int count TSRMLS_DC)
return EG(argument_stack)->top++;
}
-static inline void zend_vm_stack_clear_multiple(TSRMLS_D)
+static zend_always_inline void zend_vm_stack_clear_multiple(TSRMLS_D)
{
void **p = EG(argument_stack)->top - 1;
int delete_count = (int)(zend_uintptr_t) *p;
@@ -315,12 +336,12 @@ static inline void zend_vm_stack_clear_multiple(TSRMLS_D)
while (--delete_count>=0) {
zval *q = *(zval **)(--p);
*p = NULL;
- zval_ptr_dtor(&q);
+ i_zval_ptr_dtor(q ZEND_FILE_LINE_CC);
}
zend_vm_stack_free_int(p TSRMLS_CC);
}
-static inline zval** zend_vm_stack_get_arg(int requested_arg TSRMLS_DC)
+static zend_always_inline zval** zend_vm_stack_get_arg(int requested_arg TSRMLS_DC)
{
void **p = EG(current_execute_data)->prev_execute_data->function_state.arguments;
int arg_count = (int)(zend_uintptr_t) *p;
@@ -331,7 +352,7 @@ static inline zval** zend_vm_stack_get_arg(int requested_arg TSRMLS_DC)
return (zval**)p - arg_count + requested_arg - 1;
}
-static inline void zend_arg_types_stack_2_pop(zend_ptr_stack *stack, zval **object, zend_function **fbc)
+static zend_always_inline void zend_arg_types_stack_2_pop(zend_ptr_stack *stack, zval **object, zend_function **fbc)
{
void *a, *b;
@@ -341,7 +362,7 @@ static inline void zend_arg_types_stack_2_pop(zend_ptr_stack *stack, zval **obje
*fbc = (zend_function *) b;
}
-static inline void zend_arg_types_stack_3_pop(zend_ptr_stack *stack, zend_class_entry **called_scope, zval **object, zend_function **fbc)
+static zend_always_inline void zend_arg_types_stack_3_pop(zend_ptr_stack *stack, zend_class_entry **called_scope, zval **object, zend_function **fbc)
{
void *a, *b, *c;
@@ -356,9 +377,9 @@ void execute_new_code(TSRMLS_D);
/* services */
-ZEND_API char *get_active_class_name(char **space TSRMLS_DC);
-ZEND_API char *get_active_function_name(TSRMLS_D);
-ZEND_API char *zend_get_executed_filename(TSRMLS_D);
+ZEND_API const char *get_active_class_name(const char **space TSRMLS_DC);
+ZEND_API const char *get_active_function_name(TSRMLS_D);
+ZEND_API const char *zend_get_executed_filename(TSRMLS_D);
ZEND_API uint zend_get_executed_lineno(TSRMLS_D);
ZEND_API zend_bool zend_is_executing(TSRMLS_D);
@@ -366,6 +387,7 @@ ZEND_API void zend_set_timeout(long seconds, int reset_signals);
ZEND_API void zend_unset_timeout(TSRMLS_D);
ZEND_API void zend_timeout(int dummy);
ZEND_API zend_class_entry *zend_fetch_class(const char *class_name, uint class_name_len, int fetch_type TSRMLS_DC);
+ZEND_API zend_class_entry *zend_fetch_class_by_name(const char *class_name, uint class_name_len, const zend_literal *key, int fetch_type TSRMLS_DC);
void zend_verify_abstract_class(zend_class_entry *ce TSRMLS_DC);
#ifdef ZEND_WIN32
@@ -404,11 +426,28 @@ typedef struct _zend_free_op {
/* int is_var; */
} zend_free_op;
-ZEND_API zval *zend_get_zval_ptr(znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC);
-ZEND_API zval **zend_get_zval_ptr_ptr(const znode *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC);
+ZEND_API zval *zend_get_zval_ptr(int op_type, const znode_op *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC);
+ZEND_API zval **zend_get_zval_ptr_ptr(int op_type, const znode_op *node, const temp_variable *Ts, zend_free_op *should_free, int type TSRMLS_DC);
ZEND_API int zend_do_fcall(ZEND_OPCODE_HANDLER_ARGS);
+#define CACHED_PTR(num) \
+ EG(active_op_array)->run_time_cache[(num)]
+
+#define CACHE_PTR(num, ptr) do { \
+ EG(active_op_array)->run_time_cache[(num)] = (ptr); \
+ } while (0)
+
+#define CACHED_POLYMORPHIC_PTR(num, ce) \
+ ((EG(active_op_array)->run_time_cache[(num)] == (ce)) ? \
+ EG(active_op_array)->run_time_cache[(num) + 1] : \
+ NULL)
+
+#define CACHE_POLYMORPHIC_PTR(num, ce, ptr) do { \
+ EG(active_op_array)->run_time_cache[(num)] = (ce); \
+ EG(active_op_array)->run_time_cache[(num) + 1] = (ptr); \
+ } while (0)
+
END_EXTERN_C()
#endif /* ZEND_EXECUTE_H */
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index d404998ff..ecb2b0c87 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute_API.c 321634 2012-01-01 13:15:04Z felipe $ */
+/* $Id: zend_execute_API.c 322378 2012-01-17 08:09:13Z dmitry $ */
#include <stdio.h>
#include <signal.h>
@@ -110,7 +110,7 @@ static int clean_non_persistent_function(zend_function *function TSRMLS_DC) /* {
static int clean_non_persistent_function_full(zend_function *function TSRMLS_DC) /* {{{ */
{
- return (function->type != ZEND_INTERNAL_FUNCTION);
+ return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
}
/* }}} */
@@ -122,7 +122,7 @@ static int clean_non_persistent_class(zend_class_entry **ce TSRMLS_DC) /* {{{ */
static int clean_non_persistent_class_full(zend_class_entry **ce TSRMLS_DC) /* {{{ */
{
- return ((*ce)->type != ZEND_INTERNAL_CLASS);
+ return ((*ce)->type == ZEND_INTERNAL_CLASS) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_REMOVE;
}
/* }}} */
@@ -159,16 +159,6 @@ void init_executor(TSRMLS_D) /* {{{ */
zend_vm_stack_push((void *) NULL TSRMLS_CC);
zend_hash_init(&EG(symbol_table), 50, NULL, ZVAL_PTR_DTOR, 0);
- {
- zval *globals;
-
- ALLOC_ZVAL(globals);
- Z_SET_REFCOUNT_P(globals, 1);
- Z_SET_ISREF_P(globals);
- Z_TYPE_P(globals) = IS_ARRAY;
- Z_ARRVAL_P(globals) = &EG(symbol_table);
- zend_hash_update(&EG(symbol_table), "GLOBALS", sizeof("GLOBALS"), &globals, sizeof(zval *), NULL);
- }
EG(active_symbol_table) = &EG(symbol_table);
zend_llist_apply(&zend_extensions, (llist_apply_func_t) zend_extension_activator TSRMLS_CC);
@@ -204,6 +194,7 @@ void init_executor(TSRMLS_D) /* {{{ */
EG(active_op_array) = NULL;
EG(active) = 1;
+ EG(start_op) = NULL;
}
/* }}} */
@@ -292,10 +283,12 @@ void shutdown_executor(TSRMLS_D) /* {{{ */
* not contain objects and thus are not probelmatic */
if (EG(full_tables_cleanup)) {
zend_hash_apply(EG(function_table), (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
+ zend_hash_apply(EG(class_table), (apply_func_t) zend_cleanup_class_data TSRMLS_CC);
} else {
zend_hash_reverse_apply(EG(function_table), (apply_func_t) zend_cleanup_function_data TSRMLS_CC);
+ zend_hash_reverse_apply(EG(class_table), (apply_func_t) zend_cleanup_user_class_data TSRMLS_CC);
+ zend_cleanup_internal_classes(TSRMLS_C);
}
- zend_hash_apply(EG(class_table), (apply_func_t) zend_cleanup_class_data TSRMLS_CC);
} zend_end_try();
zend_try {
@@ -305,8 +298,8 @@ void shutdown_executor(TSRMLS_D) /* {{{ */
/* Destroy all op arrays */
if (EG(full_tables_cleanup)) {
- zend_hash_apply(EG(function_table), (apply_func_t) clean_non_persistent_function_full TSRMLS_CC);
- zend_hash_apply(EG(class_table), (apply_func_t) clean_non_persistent_class_full TSRMLS_CC);
+ zend_hash_reverse_apply(EG(function_table), (apply_func_t) clean_non_persistent_function_full TSRMLS_CC);
+ zend_hash_reverse_apply(EG(class_table), (apply_func_t) clean_non_persistent_class_full TSRMLS_CC);
} else {
zend_hash_reverse_apply(EG(function_table), (apply_func_t) clean_non_persistent_function TSRMLS_CC);
zend_hash_reverse_apply(EG(class_table), (apply_func_t) clean_non_persistent_class TSRMLS_CC);
@@ -348,7 +341,7 @@ void shutdown_executor(TSRMLS_D) /* {{{ */
/* }}} */
/* return class name and "::" or "". */
-ZEND_API char *get_active_class_name(char **space TSRMLS_DC) /* {{{ */
+ZEND_API const char *get_active_class_name(const char **space TSRMLS_DC) /* {{{ */
{
if (!zend_is_executing(TSRMLS_C)) {
if (space) {
@@ -376,14 +369,14 @@ ZEND_API char *get_active_class_name(char **space TSRMLS_DC) /* {{{ */
}
/* }}} */
-ZEND_API char *get_active_function_name(TSRMLS_D) /* {{{ */
+ZEND_API const char *get_active_function_name(TSRMLS_D) /* {{{ */
{
if (!zend_is_executing(TSRMLS_C)) {
return NULL;
}
switch (EG(current_execute_data)->function_state.function->type) {
case ZEND_USER_FUNCTION: {
- char *function_name = ((zend_op_array *) EG(current_execute_data)->function_state.function)->function_name;
+ const char *function_name = ((zend_op_array *) EG(current_execute_data)->function_state.function)->function_name;
if (function_name) {
return function_name;
@@ -401,7 +394,7 @@ ZEND_API char *get_active_function_name(TSRMLS_D) /* {{{ */
}
/* }}} */
-ZEND_API char *zend_get_executed_filename(TSRMLS_D) /* {{{ */
+ZEND_API const char *zend_get_executed_filename(TSRMLS_D) /* {{{ */
{
if (EG(active_op_array)) {
return EG(active_op_array)->filename;
@@ -433,28 +426,26 @@ ZEND_API zend_bool zend_is_executing(TSRMLS_D) /* {{{ */
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC) /* {{{ */
{
- zval *zv = *zval_ptr;
-
#if DEBUG_ZEND>=2
printf("Reducing refcount for %x (%x): %d->%d\n", *zval_ptr, zval_ptr, Z_REFCOUNT_PP(zval_ptr), Z_REFCOUNT_PP(zval_ptr) - 1);
#endif
- Z_DELREF_P(zv);
- if (Z_REFCOUNT_P(zv) == 0) {
+ Z_DELREF_PP(zval_ptr);
+ if (Z_REFCOUNT_PP(zval_ptr) == 0) {
TSRMLS_FETCH();
- if (zv != &EG(uninitialized_zval)) {
- GC_REMOVE_ZVAL_FROM_BUFFER(zv);
- zval_dtor(zv);
- efree_rel(zv);
+ if (*zval_ptr != &EG(uninitialized_zval)) {
+ GC_REMOVE_ZVAL_FROM_BUFFER(*zval_ptr);
+ zval_dtor(*zval_ptr);
+ efree_rel(*zval_ptr);
}
} else {
TSRMLS_FETCH();
- if (Z_REFCOUNT_P(zv) == 1) {
- Z_UNSET_ISREF_P(zv);
+ if (Z_REFCOUNT_PP(zval_ptr) == 1) {
+ Z_UNSET_ISREF_PP(zval_ptr);
}
- GC_ZVAL_CHECK_POSSIBLE_ROOT(zv);
+ GC_ZVAL_CHECK_POSSIBLE_ROOT(*zval_ptr);
}
}
/* }}} */
@@ -524,12 +515,12 @@ ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *sco
if (!zend_get_constant_ex(p->value.str.val, p->value.str.len, &const_value, scope, Z_REAL_TYPE_P(p) TSRMLS_CC)) {
char *actual = Z_STRVAL_P(p);
- if ((colon = zend_memrchr(Z_STRVAL_P(p), ':', Z_STRLEN_P(p)))) {
+ if ((colon = (char*)zend_memrchr(Z_STRVAL_P(p), ':', Z_STRLEN_P(p)))) {
zend_error(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(p));
Z_STRLEN_P(p) -= ((colon - Z_STRVAL_P(p)) + 1);
if (inline_change) {
colon = estrndup(colon, Z_STRLEN_P(p));
- efree(Z_STRVAL_P(p));
+ str_efree(Z_STRVAL_P(p));
Z_STRVAL_P(p) = colon;
} else {
Z_STRVAL_P(p) = colon + 1;
@@ -565,12 +556,12 @@ ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *sco
if (fix_save) {
save--;
}
- if (inline_change) {
+ if (inline_change && !IS_INTERNED(save)) {
efree(save);
}
save = NULL;
}
- if (inline_change && save && save != actual) {
+ if (inline_change && save && save != actual && !IS_INTERNED(save)) {
efree(save);
}
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", actual, actual);
@@ -624,8 +615,9 @@ ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *sco
continue;
}
if (!zend_get_constant_ex(str_index, str_index_len - 3, &const_value, scope, str_index[str_index_len - 2] TSRMLS_CC)) {
- char *actual, *save = str_index;
- if ((colon = zend_memrchr(str_index, ':', str_index_len - 3))) {
+ char *actual;
+ const char *save = str_index;
+ if ((colon = (char*)zend_memrchr(str_index, ':', str_index_len - 3))) {
zend_error(E_ERROR, "Undefined class constant '%s'", str_index);
str_index_len -= ((colon - str_index) + 1);
str_index = colon;
@@ -772,6 +764,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
zend_class_entry *called_scope = NULL;
zval *current_this;
zend_execute_data execute_data;
+ zend_fcall_info_cache fci_cache_local;
*fci->retval_ptr_ptr = NULL;
@@ -806,7 +799,6 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
}
if (!fci_cache || !fci_cache->initialized) {
- zend_fcall_info_cache fci_cache_local;
char *callable_name;
char *error = NULL;
@@ -861,18 +853,8 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
for (i=0; i<fci->param_count; i++) {
zval *param;
- if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION
- && (EX(function_state).function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) == 0
- && !ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)
- && PZVAL_IS_REF(*fci->params[i])) {
- ALLOC_ZVAL(param);
- *param = **(fci->params[i]);
- INIT_PZVAL(param);
- zval_copy_ctor(param);
- } else if (ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)
- && !PZVAL_IS_REF(*fci->params[i])) {
-
- if (Z_REFCOUNT_PP(fci->params[i]) > 1) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)) {
+ if (!PZVAL_IS_REF(*fci->params[i]) && Z_REFCOUNT_PP(fci->params[i]) > 1) {
zval *new_zval;
if (fci->no_separation &&
@@ -901,6 +883,13 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
Z_ADDREF_PP(fci->params[i]);
Z_SET_ISREF_PP(fci->params[i]);
param = *fci->params[i];
+ } else if (PZVAL_IS_REF(*fci->params[i]) &&
+ /* don't separate references for __call */
+ (EX(function_state).function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) == 0 ) {
+ ALLOC_ZVAL(param);
+ *param = **(fci->params[i]);
+ INIT_PZVAL(param);
+ zval_copy_ctor(param);
} else if (*fci->params[i] != &EG(uninitialized_zval)) {
Z_ADDREF_PP(fci->params[i]);
param = *fci->params[i];
@@ -1015,7 +1004,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
}
if (EX(function_state).function->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
- efree(EX(function_state).function->common.function_name);
+ efree((char*)EX(function_state).function->common.function_name);
}
efree(EX(function_state).function);
@@ -1041,7 +1030,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
}
/* }}} */
-ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_autoload, zend_class_entry ***ce TSRMLS_DC) /* {{{ */
+ZEND_API int zend_lookup_class_ex(const char *name, int name_length, const zend_literal *key, int use_autoload, zend_class_entry ***ce TSRMLS_DC) /* {{{ */
{
zval **args[1];
zval autoload_function;
@@ -1056,23 +1045,31 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut
ulong hash;
ALLOCA_FLAG(use_heap)
- if (name == NULL || !name_length) {
- return FAILURE;
- }
+ if (key) {
+ lc_name = Z_STRVAL(key->constant);
+ lc_length = Z_STRLEN(key->constant) + 1;
+ hash = key->hash_value;
+ } else {
+ if (name == NULL || !name_length) {
+ return FAILURE;
+ }
- lc_free = lc_name = do_alloca(name_length + 1, use_heap);
- zend_str_tolower_copy(lc_name, name, name_length);
- lc_length = name_length + 1;
+ lc_free = lc_name = do_alloca(name_length + 1, use_heap);
+ zend_str_tolower_copy(lc_name, name, name_length);
+ lc_length = name_length + 1;
- if (lc_name[0] == '\\') {
- lc_name += 1;
- lc_length -= 1;
- }
+ if (lc_name[0] == '\\') {
+ lc_name += 1;
+ lc_length -= 1;
+ }
- hash = zend_inline_hash_func(lc_name, lc_length);
+ hash = zend_inline_hash_func(lc_name, lc_length);
+ }
if (zend_hash_quick_find(EG(class_table), lc_name, lc_length, hash, (void **) ce) == SUCCESS) {
- free_alloca(lc_free, use_heap);
+ if (!key) {
+ free_alloca(lc_free, use_heap);
+ }
return SUCCESS;
}
@@ -1080,7 +1077,9 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut
* (doesn't impact fuctionality of __autoload()
*/
if (!use_autoload || zend_is_compiling(TSRMLS_C)) {
- free_alloca(lc_free, use_heap);
+ if (!key) {
+ free_alloca(lc_free, use_heap);
+ }
return FAILURE;
}
@@ -1090,7 +1089,9 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut
}
if (zend_hash_quick_add(EG(in_autoload), lc_name, lc_length, hash, (void**)&dummy, sizeof(char), NULL) == FAILURE) {
- free_alloca(lc_free, use_heap);
+ if (!key) {
+ free_alloca(lc_free, use_heap);
+ }
return FAILURE;
}
@@ -1136,20 +1137,19 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut
zval_ptr_dtor(&retval_ptr);
}
- if (retval == FAILURE) {
+ if (retval == SUCCESS) {
+ retval = zend_hash_quick_find(EG(class_table), lc_name, lc_length, hash, (void **) ce);
+ }
+ if (!key) {
free_alloca(lc_free, use_heap);
- return FAILURE;
}
-
- retval = zend_hash_quick_find(EG(class_table), lc_name, lc_length, hash, (void **) ce);
- free_alloca(lc_free, use_heap);
return retval;
}
/* }}} */
ZEND_API int zend_lookup_class(const char *name, int name_length, zend_class_entry ***ce TSRMLS_DC) /* {{{ */
{
- return zend_lookup_class_ex(name, name_length, 1, ce TSRMLS_CC);
+ return zend_lookup_class_ex(name, name_length, NULL, 1, ce TSRMLS_CC);
}
/* }}} */
@@ -1195,7 +1195,9 @@ ZEND_API int zend_eval_stringl(char *str, int str_len, zval *retval_ptr, char *s
}
CG(interactive) = 0;
- zend_execute(new_op_array TSRMLS_CC);
+ zend_try {
+ zend_execute(new_op_array TSRMLS_CC);
+ } zend_end_try();
CG(interactive) = orig_interactive;
if (local_retval_ptr) {
@@ -1259,7 +1261,7 @@ void execute_new_code(TSRMLS_D) /* {{{ */
int orig_interactive;
if (!(CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE)
- || CG(active_op_array)->backpatch_count>0
+ || CG(context).backpatch_count>0
|| CG(active_op_array)->function_name
|| CG(active_op_array)->type!=ZEND_USER_FUNCTION) {
return;
@@ -1267,41 +1269,40 @@ void execute_new_code(TSRMLS_D) /* {{{ */
ret_opline = get_next_op(CG(active_op_array) TSRMLS_CC);
ret_opline->opcode = ZEND_RETURN;
- ret_opline->op1.op_type = IS_CONST;
- INIT_ZVAL(ret_opline->op1.u.constant);
+ ret_opline->op1_type = IS_CONST;
+ ret_opline->op1.constant = zend_add_literal(CG(active_op_array), &EG(uninitialized_zval) TSRMLS_CC);
SET_UNUSED(ret_opline->op2);
- if (!CG(active_op_array)->start_op) {
- CG(active_op_array)->start_op = CG(active_op_array)->opcodes;
+ if (!EG(start_op)) {
+ EG(start_op) = CG(active_op_array)->opcodes;
}
- opline=CG(active_op_array)->start_op;
+ opline=EG(start_op);
end=CG(active_op_array)->opcodes+CG(active_op_array)->last;
while (opline<end) {
- if (opline->op1.op_type == IS_CONST) {
- Z_SET_ISREF(opline->op1.u.constant);
- Z_SET_REFCOUNT(opline->op1.u.constant, 2); /* Make sure is_ref won't be reset */
+ if (opline->op1_type == IS_CONST) {
+ opline->op1.zv = &CG(active_op_array)->literals[opline->op1.constant].constant;
}
- if (opline->op2.op_type == IS_CONST) {
- Z_SET_ISREF(opline->op2.u.constant);
- Z_SET_REFCOUNT(opline->op2.u.constant, 2);
+ if (opline->op2_type == IS_CONST) {
+ opline->op2.zv = &CG(active_op_array)->literals[opline->op2.constant].constant;
}
switch (opline->opcode) {
case ZEND_GOTO:
- if (Z_TYPE(opline->op2.u.constant) != IS_LONG) {
+ if (Z_TYPE_P(opline->op2.zv) != IS_LONG) {
zend_resolve_goto_label(CG(active_op_array), opline, 1 TSRMLS_CC);
}
/* break omitted intentionally */
case ZEND_JMP:
- opline->op1.u.jmp_addr = &CG(active_op_array)->opcodes[opline->op1.u.opline_num];
+ opline->op1.jmp_addr = &CG(active_op_array)->opcodes[opline->op1.opline_num];
break;
case ZEND_JMPZ:
case ZEND_JMPNZ:
case ZEND_JMPZ_EX:
case ZEND_JMPNZ_EX:
case ZEND_JMP_SET:
- opline->op2.u.jmp_addr = &CG(active_op_array)->opcodes[opline->op2.u.opline_num];
+ case ZEND_JMP_SET_VAR:
+ opline->op2.jmp_addr = &CG(active_op_array)->opcodes[opline->op2.opline_num];
break;
}
ZEND_VM_SET_OPCODE_HANDLER(opline);
@@ -1322,7 +1323,7 @@ void execute_new_code(TSRMLS_D) /* {{{ */
}
CG(active_op_array)->last -= 1; /* get rid of that ZEND_RETURN */
- CG(active_op_array)->start_op = CG(active_op_array)->opcodes+CG(active_op_array)->last;
+ EG(start_op) = CG(active_op_array)->opcodes+CG(active_op_array)->last;
}
/* }}} */
@@ -1331,6 +1332,15 @@ ZEND_API void zend_timeout(int dummy) /* {{{ */
TSRMLS_FETCH();
if (zend_on_timeout) {
+#ifdef ZEND_SIGNALS
+ /*
+ We got here because we got a timeout signal, so we are in a signal handler
+ at this point. However, we want to be able to timeout any user-supplied
+ shutdown functions, so pretend we are not in a signal handler while we are
+ calling these
+ */
+ SIGG(running) = 0;
+#endif
zend_on_timeout(EG(timeout_seconds) TSRMLS_CC);
}
@@ -1472,7 +1482,7 @@ void zend_set_timeout(long seconds, int reset_signals) /* {{{ */
# ifdef HAVE_SETITIMER
{
struct itimerval t_r; /* timeout requested */
- sigset_t sigset;
+ int signo;
if(seconds) {
t_r.it_value.tv_sec = seconds;
@@ -1481,25 +1491,27 @@ void zend_set_timeout(long seconds, int reset_signals) /* {{{ */
# ifdef __CYGWIN__
setitimer(ITIMER_REAL, &t_r, NULL);
}
- if(reset_signals) {
- signal(SIGALRM, zend_timeout);
- sigemptyset(&sigset);
- sigaddset(&sigset, SIGALRM);
- }
+ signo = SIGALRM;
# else
setitimer(ITIMER_PROF, &t_r, NULL);
}
- if(reset_signals) {
- signal(SIGPROF, zend_timeout);
- sigemptyset(&sigset);
- sigaddset(&sigset, SIGPROF);
- }
+ signo = SIGPROF;
# endif
- if(reset_signals) {
+
+ if (reset_signals) {
+# ifdef ZEND_SIGNALS
+ zend_signal(signo, zend_timeout TSRMLS_CC);
+# else
+ sigset_t sigset;
+
+ signal(signo, zend_timeout);
+ sigemptyset(&sigset);
+ sigaddset(&sigset, signo);
sigprocmask(SIG_UNBLOCK, &sigset, NULL);
+# endif
}
}
-# endif
+# endif /* HAVE_SETITIMER */
#endif
}
/* }}} */
@@ -1565,11 +1577,36 @@ check_fetch_type:
break;
}
- if (zend_lookup_class_ex(class_name, class_name_len, use_autoload, &pce TSRMLS_CC) == FAILURE) {
+ if (zend_lookup_class_ex(class_name, class_name_len, NULL, use_autoload, &pce TSRMLS_CC) == FAILURE) {
if (use_autoload) {
if (!silent && !EG(exception)) {
if (fetch_type == ZEND_FETCH_CLASS_INTERFACE) {
zend_error(E_ERROR, "Interface '%s' not found", class_name);
+ } else if (fetch_type == ZEND_FETCH_CLASS_TRAIT) {
+ zend_error(E_ERROR, "Trait '%s' not found", class_name);
+ } else {
+ zend_error(E_ERROR, "Class '%s' not found", class_name);
+ }
+ }
+ }
+ return NULL;
+ }
+ return *pce;
+}
+/* }}} */
+
+zend_class_entry *zend_fetch_class_by_name(const char *class_name, uint class_name_len, const zend_literal *key, int fetch_type TSRMLS_DC) /* {{{ */
+{
+ zend_class_entry **pce;
+ int use_autoload = (fetch_type & ZEND_FETCH_CLASS_NO_AUTOLOAD) == 0;
+
+ if (zend_lookup_class_ex(class_name, class_name_len, key, use_autoload, &pce TSRMLS_CC) == FAILURE) {
+ if (use_autoload) {
+ if ((fetch_type & ZEND_FETCH_CLASS_SILENT) == 0 && !EG(exception)) {
+ if ((fetch_type & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_INTERFACE) {
+ zend_error(E_ERROR, "Interface '%s' not found", class_name);
+ } else if ((fetch_type & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_TRAIT) {
+ zend_error(E_ERROR, "Trait '%s' not found", class_name);
} else {
zend_error(E_ERROR, "Class '%s' not found", class_name);
}
@@ -1653,10 +1690,32 @@ ZEND_API void zend_reset_all_cv(HashTable *symbol_table TSRMLS_DC) /* {{{ */
}
/* }}} */
-ZEND_API int zend_delete_global_variable(char *name, int name_len TSRMLS_DC) /* {{{ */
+ZEND_API void zend_delete_variable(zend_execute_data *ex, HashTable *ht, const char *name, int name_len, ulong hash_value TSRMLS_DC) /* {{{ */
+{
+ if (zend_hash_quick_del(ht, name, name_len, hash_value) == SUCCESS) {
+ name_len--;
+ while (ex && ex->symbol_table == ht) {
+ int i;
+
+ if (ex->op_array) {
+ for (i = 0; i < ex->op_array->last_var; i++) {
+ if (ex->op_array->vars[i].hash_value == hash_value &&
+ ex->op_array->vars[i].name_len == name_len &&
+ !memcmp(ex->op_array->vars[i].name, name, name_len)) {
+ ex->CVs[i] = NULL;
+ break;
+ }
+ }
+ }
+ ex = ex->prev_execute_data;
+ }
+ }
+}
+/* }}} */
+
+ZEND_API int zend_delete_global_variable_ex(const char *name, int name_len, ulong hash_value TSRMLS_DC) /* {{{ */
{
zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(name, name_len + 1);
if (zend_hash_quick_exists(&EG(symbol_table), name, name_len + 1, hash_value)) {
for (ex = EG(current_execute_data); ex; ex = ex->prev_execute_data) {
@@ -1679,6 +1738,12 @@ ZEND_API int zend_delete_global_variable(char *name, int name_len TSRMLS_DC) /*
}
/* }}} */
+ZEND_API int zend_delete_global_variable(const char *name, int name_len TSRMLS_DC) /* {{{ */
+{
+ return zend_delete_global_variable_ex(name, name_len, zend_inline_hash_func(name, name_len + 1) TSRMLS_CC);
+}
+/* }}} */
+
ZEND_API void zend_rebuild_symbol_table(TSRMLS_D) /* {{{ */
{
zend_uint i;
@@ -1702,7 +1767,7 @@ ZEND_API void zend_rebuild_symbol_table(TSRMLS_D) /* {{{ */
EG(active_symbol_table) = *(EG(symtable_cache_ptr)--);
} else {
ALLOC_HASHTABLE(EG(active_symbol_table));
- zend_hash_init(EG(active_symbol_table), 0, NULL, ZVAL_PTR_DTOR, 0);
+ zend_hash_init(EG(active_symbol_table), ex->op_array->last_var, NULL, ZVAL_PTR_DTOR, 0);
/*printf("Cache miss! Initialized %x\n", EG(active_symbol_table));*/
}
ex->symbol_table = EG(active_symbol_table);
diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h
index 435ae66e2..18d4b1d2b 100644
--- a/Zend/zend_extensions.h
+++ b/Zend/zend_extensions.h
@@ -28,7 +28,7 @@
/* The first number is the engine version and the rest is the date.
* This way engine 2/3 API no. is always greater than engine 1 API no..
*/
-#define ZEND_EXTENSION_API_NO 220090626
+#define ZEND_EXTENSION_API_NO 220100525
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
diff --git a/Zend/zend_fast_cache.h b/Zend/zend_fast_cache.h
deleted file mode 100644
index 8b7d5e35f..000000000
--- a/Zend/zend_fast_cache.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- +----------------------------------------------------------------------+
- | Zend Engine |
- +----------------------------------------------------------------------+
- | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
- +----------------------------------------------------------------------+
- | This source file is subject to version 2.00 of the Zend license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.zend.com/license/2_00.txt. |
- | If you did not receive a copy of the Zend license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@zend.com so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Andi Gutmans <andi@zend.com> |
- | Zeev Suraski <zeev@zend.com> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id: zend_fast_cache.h 321634 2012-01-01 13:15:04Z felipe $ */
-#if 0
-#ifndef ZEND_FAST_CACHE_H
-#define ZEND_FAST_CACHE_H
-
-#ifndef ZEND_ENABLE_FAST_CACHE
-# if ZEND_DEBUG
-# define ZEND_ENABLE_FAST_CACHE 0
-# else
-# define ZEND_ENABLE_FAST_CACHE 0
-# endif
-#endif
-
-typedef struct _zend_fast_cache_list_entry {
- struct _zend_fast_cache_list_entry *next;
-} zend_fast_cache_list_entry;
-
-#define MAX_FAST_CACHE_TYPES 4
-
-
-#define ZVAL_CACHE_LIST 0
-#define HASHTABLE_CACHE_LIST 1
-
-#if ZEND_ENABLE_FAST_CACHE
-
-
-#include "zend_globals.h"
-#include "zend_globals_macros.h"
-#include "zend_alloc.h"
-
-
-#if ZEND_DEBUG
-# define RECORD_ZVAL_CACHE_HIT(fc_type) AG(fast_cache_stats)[fc_type][1]++;
-# define RECORD_ZVAL_CACHE_MISS(fc_type) AG(fast_cache_stats)[fc_type][0]++;
-#else
-# define RECORD_ZVAL_CACHE_HIT(fc_type)
-# define RECORD_ZVAL_CACHE_MISS(fc_type)
-#endif
-
-
-#define ZEND_FAST_ALLOC(p, type, fc_type) \
- { \
- TSRMLS_FETCH(); \
- \
- if (((p) = (type *) AG(fast_cache_list_head)[fc_type])) { \
- AG(fast_cache_list_head)[fc_type] = ((zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type])->next; \
- RECORD_ZVAL_CACHE_HIT(fc_type); \
- } else { \
- (p) = (type *) emalloc(sizeof(type)); \
- RECORD_ZVAL_CACHE_MISS(fc_type); \
- } \
- }
-
-
-#define ZEND_FAST_FREE(p, fc_type) \
- { \
- TSRMLS_FETCH(); \
- \
- ((zend_fast_cache_list_entry *) (p))->next = (zend_fast_cache_list_entry *) AG(fast_cache_list_head)[fc_type]; \
- AG(fast_cache_list_head)[fc_type] = (zend_fast_cache_list_entry *) (p); \
- }
-
-#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
- ZEND_FAST_ALLOC(p, type, fc_type)
-
-#define ZEND_FAST_FREE_REL(p, fc_type) \
- ZEND_FAST_FREE(p, fc_type)
-
-
-#else /* !ZEND_ENABLE_FAST_CACHE */
-
-#define ZEND_FAST_ALLOC(p, type, fc_type) \
- (p) = (type *) emalloc(sizeof(type))
-
-#define ZEND_FAST_FREE(p, fc_type) \
- efree(p)
-
-#define ZEND_FAST_ALLOC_REL(p, type, fc_type) \
- (p) = (type *) emalloc_rel(sizeof(type))
-
-#define ZEND_FAST_FREE_REL(p, fc_type) \
- efree_rel(p)
-
-#endif /* ZEND_ENABLE_FAST_CACHE */
-
-
-
-/* fast cache for zval's */
-#define ALLOC_ZVAL(z) \
- ZEND_FAST_ALLOC(z, zval, ZVAL_CACHE_LIST)
-
-#define FREE_ZVAL(z) \
- ZEND_FAST_FREE(z, ZVAL_CACHE_LIST)
-
-#define ALLOC_ZVAL_REL(z) \
- ZEND_FAST_ALLOC_REL(z, zval, ZVAL_CACHE_LIST)
-
-#define FREE_ZVAL_REL(z) \
- ZEND_FAST_FREE_REL(z, ZVAL_CACHE_LIST)
-
-/* fast cache for HashTables */
-#define ALLOC_HASHTABLE(ht) \
- ZEND_FAST_ALLOC(ht, HashTable, HASHTABLE_CACHE_LIST)
-
-#define FREE_HASHTABLE(ht) \
- ZEND_FAST_FREE(ht, HASHTABLE_CACHE_LIST)
-
-#define ALLOC_HASHTABLE_REL(ht) \
- ZEND_FAST_ALLOC_REL(ht, HashTable, HASHTABLE_CACHE_LIST)
-
-#define FREE_HASHTABLE_REL(ht) \
- ZEND_FAST_FREE_REL(ht, HASHTABLE_CACHE_LIST)
-
-#endif /* ZEND_FAST_CACHE_H */
-#endif
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * indent-tabs-mode: t
- * End:
- */
diff --git a/Zend/zend_float.c b/Zend/zend_float.c
index a9d316713..cd8768b60 100644
--- a/Zend/zend_float.c
+++ b/Zend/zend_float.c
@@ -27,16 +27,13 @@ ZEND_API void zend_init_fpu(TSRMLS_D) /* {{{ */
#if XPFPA_HAVE_CW
XPFPA_DECLARE
- if (!EG(saved_fpu_cw)) {
- EG(saved_fpu_cw) = emalloc(sizeof(XPFPA_CW_DATATYPE));
+ if (!EG(saved_fpu_cw_ptr)) {
+ EG(saved_fpu_cw_ptr) = (void*)&EG(saved_fpu_cw);
}
- XPFPA_STORE_CW(EG(saved_fpu_cw));
+ XPFPA_STORE_CW(EG(saved_fpu_cw_ptr));
XPFPA_SWITCH_DOUBLE();
#else
- if (EG(saved_fpu_cw)) {
- efree(EG(saved_fpu_cw));
- }
- EG(saved_fpu_cw) = NULL;
+ EG(saved_fpu_cw_ptr) = NULL;
#endif
}
/* }}} */
@@ -44,14 +41,11 @@ ZEND_API void zend_init_fpu(TSRMLS_D) /* {{{ */
ZEND_API void zend_shutdown_fpu(TSRMLS_D) /* {{{ */
{
#if XPFPA_HAVE_CW
- if (EG(saved_fpu_cw)) {
- XPFPA_RESTORE_CW(EG(saved_fpu_cw));
+ if (EG(saved_fpu_cw_ptr)) {
+ XPFPA_RESTORE_CW(EG(saved_fpu_cw_ptr));
}
#endif
- if (EG(saved_fpu_cw)) {
- efree(EG(saved_fpu_cw));
- EG(saved_fpu_cw) = NULL;
- }
+ EG(saved_fpu_cw_ptr) = NULL;
}
/* }}} */
diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c
index 9667d7590..37a08854b 100644
--- a/Zend/zend_gc.c
+++ b/Zend/zend_gc.c
@@ -194,7 +194,7 @@ ZEND_API void gc_zobj_possible_root(zval *zv TSRMLS_DC)
{
struct _store_object *obj;
- if (UNEXPECTED(Z_OBJ_HT_P(zv)->get_properties == NULL ||
+ if (UNEXPECTED(Z_OBJ_HT_P(zv)->get_gc == NULL ||
EG(objects_store).object_buckets == NULL)) {
return;
}
@@ -275,15 +275,35 @@ tail_call:
GC_ZVAL_SET_BLACK(pz);
if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) {
+ zend_object_get_gc_t get_gc;
struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj;
obj->refcount++;
if (GC_GET_COLOR(obj->buffered) != GC_BLACK) {
GC_SET_BLACK(obj->buffered);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
- Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- HashTable *props = Z_OBJPROP_P(pz);
- if(!props) {
+ (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) {
+ int i, n;
+ zval **table;
+ HashTable *props = get_gc(pz, &table, &n TSRMLS_CC);
+
+ while (n > 0 && !table[n-1]) n--;
+ for (i = 0; i < n; i++) {
+ if (table[i]) {
+ pz = table[i];
+ if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) {
+ pz->refcount__gc++;
+ }
+ if (GC_ZVAL_GET_COLOR(pz) != GC_BLACK) {
+ if (!props && i == n - 1) {
+ goto tail_call;
+ } else {
+ zval_scan_black(pz TSRMLS_CC);
+ }
+ }
+ }
+ }
+ if (!props) {
return;
}
p = props->pListHead;
@@ -313,12 +333,27 @@ tail_call:
static void zobj_scan_black(struct _store_object *obj, zval *pz TSRMLS_DC)
{
Bucket *p;
+ zend_object_get_gc_t get_gc;
GC_SET_BLACK(obj->buffered);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
- Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- HashTable *props = Z_OBJPROP_P(pz);
- if(!props) {
+ (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) {
+ int i, n;
+ zval **table;
+ HashTable *props = get_gc(pz, &table, &n TSRMLS_CC);
+
+ for (i = 0; i < n; i++) {
+ if (table[i]) {
+ pz = table[i];
+ if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) {
+ pz->refcount__gc++;
+ }
+ if (GC_ZVAL_GET_COLOR(pz) != GC_BLACK) {
+ zval_scan_black(pz TSRMLS_CC);
+ }
+ }
+ }
+ if (!props) {
return;
}
p = props->pListHead;
@@ -346,6 +381,7 @@ tail_call:
GC_ZVAL_SET_COLOR(pz, GC_GREY);
if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) {
+ zend_object_get_gc_t get_gc;
struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj;
obj->refcount--;
@@ -353,9 +389,26 @@ tail_call:
GC_BENCH_INC(zobj_marked_grey);
GC_SET_COLOR(obj->buffered, GC_GREY);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
- Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- HashTable *props = Z_OBJPROP_P(pz);
- if(!props) {
+ (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) {
+ int i, n;
+ zval **table;
+ HashTable *props = get_gc(pz, &table, &n TSRMLS_CC);
+
+ while (n > 0 && !table[n-1]) n--;
+ for (i = 0; i < n; i++) {
+ if (table[i]) {
+ pz = table[i];
+ if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) {
+ pz->refcount__gc--;
+ }
+ if (!props && i == n - 1) {
+ goto tail_call;
+ } else {
+ zval_mark_grey(pz TSRMLS_CC);
+ }
+ }
+ }
+ if (!props) {
return;
}
p = props->pListHead;
@@ -386,14 +439,27 @@ tail_call:
static void zobj_mark_grey(struct _store_object *obj, zval *pz TSRMLS_DC)
{
Bucket *p;
+ zend_object_get_gc_t get_gc;
if (GC_GET_COLOR(obj->buffered) != GC_GREY) {
GC_BENCH_INC(zobj_marked_grey);
GC_SET_COLOR(obj->buffered, GC_GREY);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
- Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- HashTable *props = Z_OBJPROP_P(pz);
- if(!props) {
+ (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) {
+ int i, n;
+ zval **table;
+ HashTable *props = get_gc(pz, &table, &n TSRMLS_CC);
+
+ for (i = 0; i < n; i++) {
+ if (table[i]) {
+ pz = table[i];
+ if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) {
+ pz->refcount__gc--;
+ }
+ zval_mark_grey(pz TSRMLS_CC);
+ }
+ }
+ if (!props) {
return;
}
p = props->pListHead;
@@ -442,7 +508,7 @@ static void gc_mark_roots(TSRMLS_D)
}
}
-static int zval_scan(zval *pz TSRMLS_DC)
+static void zval_scan(zval *pz TSRMLS_DC)
{
Bucket *p;
@@ -454,6 +520,7 @@ tail_call:
} else {
GC_ZVAL_SET_COLOR(pz, GC_WHITE);
if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) {
+ zend_object_get_gc_t get_gc;
struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj;
if (GC_GET_COLOR(obj->buffered) == GC_GREY) {
@@ -462,10 +529,24 @@ tail_call:
} else {
GC_SET_COLOR(obj->buffered, GC_WHITE);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
- Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- HashTable *props = Z_OBJPROP_P(pz);
- if(!props) {
- return 0;
+ (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) {
+ int i, n;
+ zval **table;
+ HashTable *props = get_gc(pz, &table, &n TSRMLS_CC);
+
+ while (n > 0 && !table[n-1]) n--;
+ for (i = 0; i < n; i++) {
+ if (table[i]) {
+ pz = table[i];
+ if (!props && i == n - 1) {
+ goto tail_call;
+ } else {
+ zval_scan(pz TSRMLS_CC);
+ }
+ }
+ }
+ if (!props) {
+ return;
}
p = props->pListHead;
}
@@ -489,12 +570,12 @@ tail_call:
p = p->pListNext;
}
}
- return 0;
}
static void zobj_scan(zval *pz TSRMLS_DC)
{
Bucket *p;
+ zend_object_get_gc_t get_gc;
if (EG(objects_store).object_buckets) {
struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj;
@@ -505,9 +586,18 @@ static void zobj_scan(zval *pz TSRMLS_DC)
} else {
GC_SET_COLOR(obj->buffered, GC_WHITE);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
- Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- HashTable *props = Z_OBJPROP_P(pz);
- if(!props) {
+ (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) {
+ int i, n;
+ zval **table;
+ HashTable *props = get_gc(pz, &table, &n TSRMLS_CC);
+
+ for (i = 0; i < n; i++) {
+ if (table[i]) {
+ pz = table[i];
+ zval_scan(pz TSRMLS_CC);
+ }
+ }
+ if (!props) {
return;
}
p = props->pListHead;
@@ -550,15 +640,41 @@ tail_call:
GC_ZVAL_SET_BLACK(pz);
if (Z_TYPE_P(pz) == IS_OBJECT && EG(objects_store).object_buckets) {
+ zend_object_get_gc_t get_gc;
struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj;
if (obj->buffered == (gc_root_buffer*)GC_WHITE) {
GC_SET_BLACK(obj->buffered);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
- Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- HashTable *props = Z_OBJPROP_P(pz);
- if(!props) {
+ (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) {
+ int i, n;
+ zval **table, *zv;
+ HashTable *props = get_gc(pz, &table, &n TSRMLS_CC);
+
+ if (!props) {
+ /* restore refcount and put into list to free */
+ pz->refcount__gc++;
+ ((zval_gc_info*)pz)->u.next = GC_G(zval_to_free);
+ GC_G(zval_to_free) = (zval_gc_info*)pz;
+ }
+
+ while (n > 0 && !table[n-1]) n--;
+ for (i = 0; i < n; i++) {
+ if (table[i]) {
+ zv = table[i];
+ if (Z_TYPE_P(zv) != IS_ARRAY || Z_ARRVAL_P(zv) != &EG(symbol_table)) {
+ zv->refcount__gc++;
+ }
+ if (!props && i == n - 1) {
+ pz = zv;
+ goto tail_call;
+ } else {
+ zval_collect_white(zv TSRMLS_CC);
+ }
+ }
+ }
+ if (!props) {
return;
}
p = props->pListHead;
@@ -595,15 +711,28 @@ static void zobj_collect_white(zval *pz TSRMLS_DC)
Bucket *p;
if (EG(objects_store).object_buckets) {
+ zend_object_get_gc_t get_gc;
struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj;
if (obj->buffered == (gc_root_buffer*)GC_WHITE) {
GC_SET_BLACK(obj->buffered);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
- Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- HashTable *props = Z_OBJPROP_P(pz);
- if(!props) {
+ (get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) {
+ int i, n;
+ zval **table;
+ HashTable *props = get_gc(pz, &table, &n TSRMLS_CC);
+
+ for (i = 0; i < n; i++) {
+ if (table[i]) {
+ pz = table[i];
+ if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) {
+ pz->refcount__gc++;
+ }
+ zval_collect_white(pz TSRMLS_CC);
+ }
+ }
+ if (!props) {
return;
}
p = props->pListHead;
diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h
index 0c7ae70a7..6312fc20c 100644
--- a/Zend/zend_gc.h
+++ b/Zend/zend_gc.h
@@ -84,7 +84,7 @@ typedef struct _gc_root_buffer {
zend_object_handle handle; /* must be 0 for zval */
union {
zval *pz;
- zend_object_handlers *handlers;
+ const zend_object_handlers *handlers;
} u;
} gc_root_buffer;
diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h
index 8261e9076..da3b78fd3 100644
--- a/Zend/zend_globals.h
+++ b/Zend/zend_globals.h
@@ -34,10 +34,8 @@
#include "zend_objects.h"
#include "zend_objects_API.h"
#include "zend_modules.h"
-
-#ifdef ZEND_MULTIBYTE
+#include "zend_float.h"
#include "zend_multibyte.h"
-#endif /* ZEND_MULTIBYTE */
/* Define ZTS if you want a thread-safe Zend */
/*#undef ZTS*/
@@ -68,6 +66,8 @@ typedef struct _zend_declarables {
} zend_declarables;
typedef struct _zend_vm_stack *zend_vm_stack;
+typedef struct _zend_ini_entry zend_ini_entry;
+
struct _zend_compiler_globals {
zend_stack bp_stack;
@@ -101,10 +101,10 @@ struct _zend_compiler_globals {
HashTable *auto_globals;
+ zend_bool parse_error;
zend_bool in_compilation;
zend_bool short_tags;
zend_bool asp_tags;
- zend_bool allow_call_time_pass_reference;
zend_declarables declarables;
@@ -137,25 +137,25 @@ struct _zend_compiler_globals {
zend_bool in_namespace;
zend_bool has_bracketed_namespaces;
- HashTable *labels;
- zend_stack labels_stack;
+ zend_compiler_context context;
+ zend_stack context_stack;
+
+ /* interned strings */
+ char *interned_strings_start;
+ char *interned_strings_end;
+ char *interned_strings_top;
+ char *interned_strings_snapshot_top;
+
+ HashTable interned_strings;
-#ifdef ZEND_MULTIBYTE
- zend_encoding **script_encoding_list;
+ const zend_encoding **script_encoding_list;
size_t script_encoding_list_size;
+ zend_bool multibyte;
zend_bool detect_unicode;
zend_bool encoding_declared;
- zend_encoding *internal_encoding;
-
- /* multibyte utility functions */
- zend_encoding_detector encoding_detector;
- zend_encoding_converter encoding_converter;
- zend_encoding_oddlen encoding_oddlen;
-#endif /* ZEND_MULTIBYTE */
-
#ifdef ZTS
- HashTable **static_members;
+ zval ***static_members_table;
int last_static_member;
#endif
};
@@ -240,6 +240,7 @@ struct _zend_executor_globals {
HashTable *ini_directives;
HashTable *modified_ini_directives;
+ zend_ini_entry *error_reporting_ini_entry;
zend_objects_store objects_store;
zval *exception, *prev_exception;
@@ -254,7 +255,12 @@ struct _zend_executor_globals {
zend_bool active;
- void *saved_fpu_cw;
+ zend_op *start_op;
+
+ void *saved_fpu_cw_ptr;
+#if XPFPA_HAVE_CW
+ XPFPA_CW_DATATYPE saved_fpu_cw;
+#endif
void *reserved[ZEND_MAX_RESERVED_RESOURCES];
};
@@ -292,7 +298,6 @@ struct _zend_php_scanner_globals {
int yy_state;
zend_stack state_stack;
-#ifdef ZEND_MULTIBYTE
/* original (unfiltered) script */
unsigned char *script_org;
size_t script_org_size;
@@ -304,9 +309,7 @@ struct _zend_php_scanner_globals {
/* input/ouput filters */
zend_encoding_filter input_filter;
zend_encoding_filter output_filter;
- zend_encoding *script_encoding;
- zend_encoding *internal_encoding;
-#endif /* ZEND_MULTIBYTE */
+ const zend_encoding *script_encoding;
};
#endif /* ZEND_GLOBALS_H */
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index 40267b812..7c7e42917 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -20,6 +20,7 @@
/* $Id: zend_hash.c 321634 2012-01-01 13:15:04Z felipe $ */
#include "zend.h"
+#include "zend_globals.h"
#define CONNECT_TO_BUCKET_DLLIST(element, list_head) \
(element)->pNext = (list_head); \
@@ -135,12 +136,18 @@ ZEND_API ulong zend_hash_func(const char *arKey, uint nKeyLength)
(p)->pDataPtr=NULL; \
}
-
+#define CHECK_INIT(ht) do { \
+ if (UNEXPECTED((ht)->nTableMask == 0)) { \
+ (ht)->arBuckets = (Bucket **) pecalloc((ht)->nTableSize, sizeof(Bucket *), (ht)->persistent); \
+ (ht)->nTableMask = (ht)->nTableSize - 1; \
+ } \
+} while (0)
+
+static const Bucket *uninitialized_bucket = NULL;
ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
{
uint i = 3;
- Bucket **tmp;
SET_INCONSISTENT(HT_OK);
@@ -154,9 +161,9 @@ ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunctio
ht->nTableSize = 1 << i;
}
- ht->nTableMask = ht->nTableSize - 1;
+ ht->nTableMask = 0; /* 0 means that ht->arBuckets is uninitialized */
ht->pDestructor = pDestructor;
- ht->arBuckets = NULL;
+ ht->arBuckets = (Bucket**)&uninitialized_bucket;
ht->pListHead = NULL;
ht->pListTail = NULL;
ht->nNumOfElements = 0;
@@ -165,21 +172,6 @@ ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunctio
ht->persistent = persistent;
ht->nApplyCount = 0;
ht->bApplyProtection = 1;
-
- /* Uses ecalloc() so that Bucket* == NULL */
- if (persistent) {
- tmp = (Bucket **) calloc(ht->nTableSize, sizeof(Bucket *));
- if (!tmp) {
- return FAILURE;
- }
- ht->arBuckets = tmp;
- } else {
- tmp = (Bucket **) ecalloc_rel(ht->nTableSize, sizeof(Bucket *));
- if (tmp) {
- ht->arBuckets = tmp;
- }
- }
-
return SUCCESS;
}
@@ -205,6 +197,9 @@ ZEND_API int _zend_hash_add_or_update(HashTable *ht, const char *arKey, uint nKe
ulong h;
uint nIndex;
Bucket *p;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
IS_CONSISTENT(ht);
@@ -215,13 +210,15 @@ ZEND_API int _zend_hash_add_or_update(HashTable *ht, const char *arKey, uint nKe
return FAILURE;
}
+ CHECK_INIT(ht);
+
h = zend_inline_hash_func(arKey, nKeyLength);
nIndex = h & ht->nTableMask;
p = ht->arBuckets[nIndex];
while (p != NULL) {
- if ((p->h == h) && (p->nKeyLength == nKeyLength)) {
- if (!memcmp(p->arKey, arKey, nKeyLength)) {
+ if (p->arKey == arKey ||
+ ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) {
if (flag & HASH_ADD) {
return FAILURE;
}
@@ -242,16 +239,24 @@ ZEND_API int _zend_hash_add_or_update(HashTable *ht, const char *arKey, uint nKe
}
HANDLE_UNBLOCK_INTERRUPTIONS();
return SUCCESS;
- }
}
p = p->pNext;
}
- p = (Bucket *) pemalloc(sizeof(Bucket) - 1 + nKeyLength, ht->persistent);
- if (!p) {
- return FAILURE;
+ if (IS_INTERNED(arKey)) {
+ p = (Bucket *) pemalloc(sizeof(Bucket), ht->persistent);
+ if (!p) {
+ return FAILURE;
+ }
+ p->arKey = arKey;
+ } else {
+ p = (Bucket *) pemalloc(sizeof(Bucket) + nKeyLength, ht->persistent);
+ if (!p) {
+ return FAILURE;
+ }
+ p->arKey = (const char*)(p + 1);
+ memcpy((char*)p->arKey, arKey, nKeyLength);
}
- memcpy(p->arKey, arKey, nKeyLength);
p->nKeyLength = nKeyLength;
INIT_DATA(ht, p, pData, nDataSize);
p->h = h;
@@ -274,6 +279,9 @@ ZEND_API int _zend_hash_quick_add_or_update(HashTable *ht, const char *arKey, ui
{
uint nIndex;
Bucket *p;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
IS_CONSISTENT(ht);
@@ -281,12 +289,13 @@ ZEND_API int _zend_hash_quick_add_or_update(HashTable *ht, const char *arKey, ui
return zend_hash_index_update(ht, h, pData, nDataSize, pDest);
}
+ CHECK_INIT(ht);
nIndex = h & ht->nTableMask;
p = ht->arBuckets[nIndex];
while (p != NULL) {
- if ((p->h == h) && (p->nKeyLength == nKeyLength)) {
- if (!memcmp(p->arKey, arKey, nKeyLength)) {
+ if (p->arKey == arKey ||
+ ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) {
if (flag & HASH_ADD) {
return FAILURE;
}
@@ -307,17 +316,25 @@ ZEND_API int _zend_hash_quick_add_or_update(HashTable *ht, const char *arKey, ui
}
HANDLE_UNBLOCK_INTERRUPTIONS();
return SUCCESS;
- }
}
p = p->pNext;
}
- p = (Bucket *) pemalloc(sizeof(Bucket) - 1 + nKeyLength, ht->persistent);
- if (!p) {
- return FAILURE;
+ if (IS_INTERNED(arKey)) {
+ p = (Bucket *) pemalloc(sizeof(Bucket), ht->persistent);
+ if (!p) {
+ return FAILURE;
+ }
+ p->arKey = arKey;
+ } else {
+ p = (Bucket *) pemalloc(sizeof(Bucket) + nKeyLength, ht->persistent);
+ if (!p) {
+ return FAILURE;
+ }
+ p->arKey = (const char*)(p + 1);
+ memcpy((char*)p->arKey, arKey, nKeyLength);
}
- memcpy(p->arKey, arKey, nKeyLength);
p->nKeyLength = nKeyLength;
INIT_DATA(ht, p, pData, nDataSize);
p->h = h;
@@ -351,8 +368,12 @@ ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
{
uint nIndex;
Bucket *p;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
IS_CONSISTENT(ht);
+ CHECK_INIT(ht);
if (flag & HASH_NEXT_INSERT) {
h = ht->nNextFreeElement;
@@ -388,10 +409,11 @@ ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
}
p = p->pNext;
}
- p = (Bucket *) pemalloc_rel(sizeof(Bucket) - 1, ht->persistent);
+ p = (Bucket *) pemalloc_rel(sizeof(Bucket), ht->persistent);
if (!p) {
return FAILURE;
}
+ p->arKey = NULL;
p->nKeyLength = 0; /* Numeric indices are marked by making the nKeyLength == 0 */
p->h = h;
INIT_DATA(ht, p, pData, nDataSize);
@@ -418,6 +440,9 @@ ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
static int zend_hash_do_resize(HashTable *ht)
{
Bucket **t;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
IS_CONSISTENT(ht);
@@ -443,6 +468,9 @@ ZEND_API int zend_hash_rehash(HashTable *ht)
uint nIndex;
IS_CONSISTENT(ht);
+ if (UNEXPECTED(ht->nNumOfElements == 0)) {
+ return SUCCESS;
+ }
memset(ht->arBuckets, 0, ht->nTableSize * sizeof(Bucket *));
p = ht->pListHead;
@@ -459,6 +487,9 @@ ZEND_API int zend_hash_del_key_or_index(HashTable *ht, const char *arKey, uint n
{
uint nIndex;
Bucket *p;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
IS_CONSISTENT(ht);
@@ -533,7 +564,9 @@ ZEND_API void zend_hash_destroy(HashTable *ht)
}
pefree(q, ht->persistent);
}
- pefree(ht->arBuckets, ht->persistent);
+ if (ht->nTableMask) {
+ pefree(ht->arBuckets, ht->persistent);
+ }
SET_INCONSISTENT(HT_DESTROYED);
}
@@ -547,7 +580,9 @@ ZEND_API void zend_hash_clean(HashTable *ht)
p = ht->pListHead;
- memset(ht->arBuckets, 0, ht->nTableSize*sizeof(Bucket *));
+ if (ht->nTableMask) {
+ memset(ht->arBuckets, 0, ht->nTableSize*sizeof(Bucket *));
+ }
ht->pListHead = NULL;
ht->pListTail = NULL;
ht->nNumOfElements = 0;
@@ -575,6 +610,9 @@ ZEND_API void zend_hash_clean(HashTable *ht)
static Bucket *zend_hash_apply_deleter(HashTable *ht, Bucket *p)
{
Bucket *retval;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
HANDLE_BLOCK_INTERRUPTIONS();
if (p->pLast) {
@@ -631,7 +669,9 @@ ZEND_API void zend_hash_graceful_destroy(HashTable *ht)
while (p != NULL) {
p = zend_hash_apply_deleter(ht, p);
}
- pefree(ht->arBuckets, ht->persistent);
+ if (ht->nTableMask) {
+ pefree(ht->arBuckets, ht->persistent);
+ }
SET_INCONSISTENT(HT_DESTROYED);
}
@@ -648,7 +688,9 @@ ZEND_API void zend_hash_graceful_reverse_destroy(HashTable *ht)
p = ht->pListTail;
}
- pefree(ht->arBuckets, ht->persistent);
+ if (ht->nTableMask) {
+ pefree(ht->arBuckets, ht->persistent);
+ }
SET_INCONSISTENT(HT_DESTROYED);
}
@@ -881,11 +923,10 @@ ZEND_API int zend_hash_find(const HashTable *ht, const char *arKey, uint nKeyLen
p = ht->arBuckets[nIndex];
while (p != NULL) {
- if ((p->h == h) && (p->nKeyLength == nKeyLength)) {
- if (!memcmp(p->arKey, arKey, nKeyLength)) {
+ if (p->arKey == arKey ||
+ ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) {
*pData = p->pData;
return SUCCESS;
- }
}
p = p->pNext;
}
@@ -908,11 +949,10 @@ ZEND_API int zend_hash_quick_find(const HashTable *ht, const char *arKey, uint n
p = ht->arBuckets[nIndex];
while (p != NULL) {
- if ((p->h == h) && (p->nKeyLength == nKeyLength)) {
- if (!memcmp(p->arKey, arKey, nKeyLength)) {
+ if (p->arKey == arKey ||
+ ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) {
*pData = p->pData;
return SUCCESS;
- }
}
p = p->pNext;
}
@@ -933,10 +973,9 @@ ZEND_API int zend_hash_exists(const HashTable *ht, const char *arKey, uint nKeyL
p = ht->arBuckets[nIndex];
while (p != NULL) {
- if ((p->h == h) && (p->nKeyLength == nKeyLength)) {
- if (!memcmp(p->arKey, arKey, nKeyLength)) {
+ if (p->arKey == arKey ||
+ ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) {
return 1;
- }
}
p = p->pNext;
}
@@ -959,10 +998,9 @@ ZEND_API int zend_hash_quick_exists(const HashTable *ht, const char *arKey, uint
p = ht->arBuckets[nIndex];
while (p != NULL) {
- if ((p->h == h) && (p->nKeyLength == nKeyLength)) {
- if (!memcmp(p->arKey, arKey, nKeyLength)) {
+ if (p->arKey == arKey ||
+ ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) {
return 1;
- }
}
p = p->pNext;
}
@@ -1119,7 +1157,7 @@ ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, char **str_index,
if (duplicate) {
*str_index = estrndup(p->arKey, p->nKeyLength - 1);
} else {
- *str_index = p->arKey;
+ *str_index = (char*)p->arKey;
}
if (str_length) {
*str_length = p->nKeyLength;
@@ -1175,6 +1213,10 @@ ZEND_API int zend_hash_get_current_data_ex(HashTable *ht, void **pData, HashPosi
ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, const char *str_index, uint str_length, ulong num_index, int mode, HashPosition *pos)
{
Bucket *p, *q;
+ ulong h;
+#ifdef ZEND_SIGNALS
+ TSRMLS_FETCH();
+#endif
p = pos ? (*pos) : ht->pInternalPointer;
@@ -1195,19 +1237,25 @@ ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, const
q = q->pNext;
}
} else if (key_type == HASH_KEY_IS_STRING) {
- ulong h;
+ if (IS_INTERNED(str_index)) {
+ h = INTERNED_HASH(str_index);
+ } else {
+ h = zend_inline_hash_func(str_index, str_length);
+ }
- if (p->nKeyLength == str_length &&
- memcmp(p->arKey, str_index, str_length) == 0) {
+ if (p->arKey == str_index ||
+ (p->nKeyLength == str_length &&
+ p->h == h &&
+ memcmp(p->arKey, str_index, str_length) == 0)) {
return SUCCESS;
}
- h = zend_inline_hash_func(str_index, str_length);
q = ht->arBuckets[h & ht->nTableMask];
while (q != NULL) {
- if (q->h == h && q->nKeyLength == str_length &&
- memcmp(q->arKey, str_index, str_length) == 0) {
+ if (q->arKey == str_index ||
+ (q->h == h && q->nKeyLength == str_length &&
+ memcmp(q->arKey, str_index, str_length) == 0)) {
break;
}
q = q->pNext;
@@ -1222,7 +1270,7 @@ ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, const
if (mode != HASH_UPDATE_KEY_ANYWAY) {
Bucket *r = p->pListLast;
int found = HASH_UPDATE_KEY_IF_BEFORE;
-
+
while (r) {
if (r == q) {
found = HASH_UPDATE_KEY_IF_AFTER;
@@ -1242,7 +1290,7 @@ ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, const
}
if (p->pListLast != NULL) {
p->pListLast->pListNext = p->pListNext;
- } else {
+ } else {
/* Deleting the head of the list */
ht->pListHead = p->pListNext;
}
@@ -1277,7 +1325,7 @@ ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, const
}
if (q->pListLast != NULL) {
q->pListLast->pListNext = q->pListNext;
- } else {
+ } else {
/* Deleting the head of the list */
ht->pListHead = q->pListNext;
}
@@ -1308,8 +1356,15 @@ ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, const
ht->arBuckets[p->h & ht->nTableMask] = p->pNext;
}
- if (p->nKeyLength != str_length) {
- Bucket *q = (Bucket *) pemalloc(sizeof(Bucket) - 1 + str_length, ht->persistent);
+ if ((IS_INTERNED(p->arKey) != IS_INTERNED(str_index)) ||
+ (!IS_INTERNED(p->arKey) && p->nKeyLength != str_length)) {
+ Bucket *q;
+
+ if (IS_INTERNED(str_index)) {
+ q = (Bucket *) pemalloc(sizeof(Bucket), ht->persistent);
+ } else {
+ q = (Bucket *) pemalloc(sizeof(Bucket) + str_length, ht->persistent);
+ }
q->nKeyLength = str_length;
if (p->pData == &p->pDataPtr) {
@@ -1343,8 +1398,14 @@ ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, const
if (key_type == HASH_KEY_IS_LONG) {
p->h = num_index;
} else {
- memcpy(p->arKey, str_index, str_length);
- p->h = zend_inline_hash_func(str_index, str_length);
+ p->h = h;
+ p->nKeyLength = str_length;
+ if (IS_INTERNED(str_index)) {
+ p->arKey = str_index;
+ } else {
+ p->arKey = (const char*)(p+1);
+ memcpy((char*)p->arKey, str_index, str_length);
+ }
}
CONNECT_TO_BUCKET_DLLIST(p, ht->arBuckets[p->h & ht->nTableMask]);
@@ -1559,6 +1620,10 @@ void zend_hash_display(const HashTable *ht)
Bucket *p;
uint i;
+ if (UNEXPECTED(ht->nNumOfElements == 0)) {
+ zend_output_debug_string(0, "The hash is empty");
+ return;
+ }
for (i = 0; i < ht->nTableSize; i++) {
p = ht->arBuckets[i];
while (p != NULL) {
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index f6d807d98..bce43d8cd 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -60,7 +60,7 @@ typedef struct bucket {
struct bucket *pListLast;
struct bucket *pNext;
struct bucket *pLast;
- char arKey[1]; /* Must be last element */
+ const char *arKey;
} Bucket;
typedef struct _hashtable {
@@ -83,7 +83,7 @@ typedef struct _hashtable {
typedef struct _zend_hash_key {
- char *arKey;
+ const char *arKey;
uint nKeyLength;
ulong h;
} zend_hash_key;
@@ -304,7 +304,7 @@ END_EXTERN_C()
#define ZEND_INIT_SYMTABLE_EX(ht, n, persistent) \
zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
-#define ZEND_HANDLE_NUMERIC(key, length, func) do { \
+#define ZEND_HANDLE_NUMERIC_EX(key, length, idx, func) do { \
register const char *tmp = key; \
\
if (*tmp == '-') { \
@@ -312,7 +312,6 @@ END_EXTERN_C()
} \
if (*tmp >= '0' && *tmp <= '9') { /* possibly a numeric index */ \
const char *end = key + length - 1; \
- ulong idx; \
\
if ((*end != '\0') /* not a null terminated string */ \
|| (*tmp == '0' && length > 2) /* numbers with leading zeros */ \
@@ -335,11 +334,17 @@ END_EXTERN_C()
} else if (idx > LONG_MAX) { /* overflow */ \
break; \
} \
- return func; \
+ func; \
} \
} \
} while (0)
+#define ZEND_HANDLE_NUMERIC(key, length, func) do { \
+ ulong idx; \
+ \
+ ZEND_HANDLE_NUMERIC_EX(key, length, idx, return func); \
+} while (0)
+
static inline int zend_symtable_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) \
{
ZEND_HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_update(ht, idx, pData, nDataSize, pDest));
diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c
index 52c9243f0..dd8392b52 100644
--- a/Zend/zend_highlight.c
+++ b/Zend/zend_highlight.c
@@ -56,18 +56,15 @@ ZEND_API void zend_html_putc(char c)
ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC)
{
- const char *ptr=s, *end=s+len;
-
-#ifdef ZEND_MULTIBYTE
- char *filtered;
- int filtered_len;
+ const unsigned char *ptr = (const unsigned char*)s, *end = ptr + len;
+ unsigned char *filtered;
+ size_t filtered_len;
if (LANG_SCNG(output_filter)) {
- LANG_SCNG(output_filter)(&filtered, &filtered_len, s, len TSRMLS_CC);
+ LANG_SCNG(output_filter)(&filtered, &filtered_len, ptr, len TSRMLS_CC);
ptr = filtered;
end = filtered + filtered_len;
}
-#endif /* ZEND_MULTIBYTE */
while (ptr<end) {
if (*ptr==' ') {
@@ -79,11 +76,9 @@ ZEND_API void zend_html_puts(const char *s, uint len TSRMLS_DC)
}
}
-#ifdef ZEND_MULTIBYTE
if (LANG_SCNG(output_filter)) {
efree(filtered);
}
-#endif /* ZEND_MULTIBYTE */
}
@@ -120,7 +115,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
next_color = syntax_highlighter_ini->highlight_string;
break;
case T_WHITESPACE:
- zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC); /* no color needed */
+ zend_html_puts((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC); /* no color needed */
token.type = 0;
continue;
break;
@@ -143,7 +138,7 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
}
}
- zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);
+ zend_html_puts((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);
if (token.type == IS_STRING) {
switch (token_type) {
@@ -192,11 +187,11 @@ ZEND_API void zend_strip(TSRMLS_D)
continue;
case T_END_HEREDOC:
- zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
+ zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
efree(token.value.str.val);
/* read the following character, either newline or ; */
if (lex_scan(&token TSRMLS_CC) != T_WHITESPACE) {
- zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
+ zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
}
zend_write("\n", sizeof("\n") - 1);
prev_space = 1;
@@ -204,7 +199,7 @@ ZEND_API void zend_strip(TSRMLS_D)
continue;
default:
- zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
+ zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
break;
}
diff --git a/Zend/zend_highlight.h b/Zend/zend_highlight.h
index 3de7cd85c..1d2e2475c 100644
--- a/Zend/zend_highlight.h
+++ b/Zend/zend_highlight.h
@@ -26,7 +26,6 @@
#define HL_DEFAULT_COLOR "#0000BB" /* blue */
#define HL_HTML_COLOR "#000000" /* black */
#define HL_STRING_COLOR "#DD0000" /* red */
-#define HL_BG_COLOR "#FFFFFF" /* white */
#define HL_KEYWORD_COLOR "#007700" /* green */
diff --git a/Zend/zend_indent.c b/Zend/zend_indent.c
index f77064c82..0b45cadea 100644
--- a/Zend/zend_indent.c
+++ b/Zend/zend_indent.c
@@ -64,7 +64,7 @@ ZEND_API void zend_indent()
while ((token_type=lex_scan(&token TSRMLS_CC))) {
switch (token_type) {
case T_INLINE_HTML:
- zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
+ zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
break;
case T_WHITESPACE: {
token.type = 0;
@@ -118,16 +118,16 @@ dflt_printout:
} else {
handle_whitespace(emit_whitespace);
}
- zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
+ zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
break;
}
} else {
handle_whitespace(emit_whitespace);
if (in_string) {
- zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
+ zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
/* a part of a string */
} else {
- zend_write(LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
+ zend_write((char*)LANG_SCNG(yy_text), LANG_SCNG(yy_leng));
}
}
break;
diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c
index f6bea6f7e..b4f45d412 100644
--- a/Zend/zend_ini.c
+++ b/Zend/zend_ini.c
@@ -92,6 +92,7 @@ ZEND_API int zend_ini_startup(TSRMLS_D) /* {{{ */
EG(ini_directives) = registered_zend_ini_directives;
EG(modified_ini_directives) = NULL;
+ EG(error_reporting_ini_entry) = NULL;
if (zend_hash_init_ex(registered_zend_ini_directives, 100, NULL, NULL, 1, 0) == FAILURE) {
return FAILURE;
}
@@ -133,6 +134,7 @@ ZEND_API int zend_copy_ini_directives(TSRMLS_D) /* {{{ */
zend_ini_entry ini_entry;
EG(modified_ini_directives) = NULL;
+ EG(error_reporting_ini_entry) = NULL;
EG(ini_directives) = (HashTable *) malloc(sizeof(HashTable));
if (zend_hash_init_ex(EG(ini_directives), registered_zend_ini_directives->nNumOfElements, NULL, NULL, 1, 0) == FAILURE) {
return FAILURE;
@@ -145,11 +147,11 @@ ZEND_API int zend_copy_ini_directives(TSRMLS_D) /* {{{ */
static int ini_key_compare(const void *a, const void *b TSRMLS_DC) /* {{{ */
{
- Bucket *f;
- Bucket *s;
+ const Bucket *f;
+ const Bucket *s;
- f = *((Bucket **) a);
- s = *((Bucket **) b);
+ f = *((const Bucket **) a);
+ s = *((const Bucket **) b);
if (f->nKeyLength == 0 && s->nKeyLength == 0) { /* both numeric */
return ZEND_NORMALIZE_BOOL(f->nKeyLength - s->nKeyLength);
diff --git a/Zend/zend_ini.h b/Zend/zend_ini.h
index 8b74d3b7d..1ccad8bf8 100644
--- a/Zend/zend_ini.h
+++ b/Zend/zend_ini.h
@@ -57,8 +57,6 @@
#endif
-typedef struct _zend_ini_entry zend_ini_entry;
-
#define ZEND_INI_MH(name) int name(zend_ini_entry *entry, char *new_value, uint new_value_length, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage TSRMLS_DC)
#define ZEND_INI_DISP(name) void name(zend_ini_entry *ini_entry, int type)
diff --git a/Zend/zend_ini_parser.c b/Zend/zend_ini_parser.c
index 57a11ec15..64b3c3e2e 100644
--- a/Zend/zend_ini_parser.c
+++ b/Zend/zend_ini_parser.c
@@ -1,23 +1,24 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
+
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -28,7 +29,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -46,7 +47,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -54,23 +55,58 @@
/* Pure parsers. */
#define YYPURE 1
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
/* Using locations. */
#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
-#define yyparse ini_parse
-#define yylex ini_lex
-#define yyerror ini_error
-#define yylval ini_lval
-#define yychar ini_char
-#define yydebug ini_debug
-#define yynerrs ini_nerrs
+#define yyparse ini_parse
+#define yylex ini_lex
+#define yyerror ini_error
+#define yylval ini_lval
+#define yychar ini_char
+#define yydebug ini_debug
+#define yynerrs ini_nerrs
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ TC_SECTION = 258,
+ TC_RAW = 259,
+ TC_CONSTANT = 260,
+ TC_NUMBER = 261,
+ TC_STRING = 262,
+ TC_WHITESPACE = 263,
+ TC_LABEL = 264,
+ TC_OFFSET = 265,
+ TC_DOLLAR_CURLY = 266,
+ TC_VARNAME = 267,
+ TC_QUOTED_STRING = 268,
+ BOOL_TRUE = 269,
+ BOOL_FALSE = 270,
+ END_OF_LINE = 271
+ };
+#endif
+/* Tokens. */
+#define TC_SECTION 258
+#define TC_RAW 259
+#define TC_CONSTANT 260
+#define TC_NUMBER 261
+#define TC_STRING 262
+#define TC_WHITESPACE 263
+#define TC_LABEL 264
+#define TC_OFFSET 265
+#define TC_DOLLAR_CURLY 266
+#define TC_VARNAME 267
+#define TC_QUOTED_STRING 268
+#define BOOL_TRUE 269
+#define BOOL_FALSE 270
+#define END_OF_LINE 271
+
+
/* Copy the first part of user declarations. */
@@ -323,7 +359,6 @@ ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int s
-
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@@ -342,59 +377,20 @@ ZEND_API int zend_parse_ini_string(char *str, zend_bool unbuffered_errors, int s
# define YYTOKEN_TABLE 0
#endif
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- TC_SECTION = 258,
- TC_RAW = 259,
- TC_CONSTANT = 260,
- TC_NUMBER = 261,
- TC_STRING = 262,
- TC_WHITESPACE = 263,
- TC_LABEL = 264,
- TC_OFFSET = 265,
- TC_DOLLAR_CURLY = 266,
- TC_VARNAME = 267,
- TC_QUOTED_STRING = 268,
- BOOL_TRUE = 269,
- BOOL_FALSE = 270,
- END_OF_LINE = 271
- };
-#endif
-/* Tokens. */
-#define TC_SECTION 258
-#define TC_RAW 259
-#define TC_CONSTANT 260
-#define TC_NUMBER 261
-#define TC_STRING 262
-#define TC_WHITESPACE 263
-#define TC_LABEL 264
-#define TC_OFFSET 265
-#define TC_DOLLAR_CURLY 266
-#define TC_VARNAME 267
-#define TC_QUOTED_STRING 268
-#define BOOL_TRUE 269
-#define BOOL_FALSE 270
-#define END_OF_LINE 271
-
-
-
-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
+
/* Copy the second part of user declarations. */
+/* Line 216 of yacc.c. */
+
#ifdef short
# undef short
@@ -444,7 +440,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -469,14 +465,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int yyi)
+YYID (int i)
#else
static int
-YYID (yyi)
- int yyi;
+YYID (i)
+ int i;
#endif
{
- return yyi;
+ return i;
}
#endif
@@ -557,9 +553,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
+ yytype_int16 yyss;
+ YYSTYPE yyvs;
+ };
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -593,12 +589,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -709,7 +705,7 @@ static const char *const yytname[] =
"$end", "error", "$undefined", "TC_SECTION", "TC_RAW", "TC_CONSTANT",
"TC_NUMBER", "TC_STRING", "TC_WHITESPACE", "TC_LABEL", "TC_OFFSET",
"TC_DOLLAR_CURLY", "TC_VARNAME", "TC_QUOTED_STRING", "BOOL_TRUE",
- "BOOL_FALSE", "END_OF_LINE", "'='", "':'", "','", "'.'", "'\"'", "'\\''",
+ "BOOL_FALSE", "END_OF_LINE", "'='", "':'", "','", "'.'", "'\"'", "'''",
"'^'", "'+'", "'-'", "'/'", "'*'", "'%'", "'$'", "'~'", "'<'", "'>'",
"'?'", "'@'", "'{'", "'}'", "'|'", "'&'", "'!'", "']'", "'('", "')'",
"$accept", "statement_list", "statement", "section_string_or_value",
@@ -913,7 +909,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -1024,20 +1020,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
+yy_stack_print (bottom, top)
+ yytype_int16 *bottom;
+ yytype_int16 *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
+ for (; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
@@ -1071,11 +1064,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ fprintf (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
);
- YYFPRINTF (stderr, "\n");
+ fprintf (stderr, "\n");
}
}
@@ -1355,8 +1348,10 @@ yydestruct (yymsg, yytype, yyvaluep)
break;
}
}
+
/* Prevent warnings from -Wmissing-prototypes. */
+
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -1375,9 +1370,10 @@ int yyparse ();
-/*-------------------------.
-| yyparse or yypush_parse. |
-`-------------------------*/
+
+/*----------.
+| yyparse. |
+`----------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1401,46 +1397,22 @@ yyparse ()
#endif
#endif
{
-/* The lookahead symbol. */
+ /* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
- /* Number of syntax errors so far. */
- int yynerrs;
-
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
-
- YYSIZE_T yystacksize;
+/* Number of syntax errors so far. */
+int yynerrs;
+ int yystate;
int yyn;
int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
@@ -1448,28 +1420,51 @@ YYSTYPE yylval;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss = yyssa;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
+
+
+
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
+
yyssp = yyss;
yyvsp = yyvs;
@@ -1499,6 +1494,7 @@ YYSTYPE yylval;
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
+
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
@@ -1506,6 +1502,7 @@ YYSTYPE yylval;
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
+
&yystacksize);
yyss = yyss1;
@@ -1528,8 +1525,9 @@ YYSTYPE yylval;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -1540,6 +1538,7 @@ YYSTYPE yylval;
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
+
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@@ -1549,9 +1548,6 @@ YYSTYPE yylval;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- if (yystate == YYFINAL)
- YYACCEPT;
-
goto yybackup;
/*-----------.
@@ -1560,16 +1556,16 @@ YYSTYPE yylval;
yybackup:
/* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
+ look-ahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1601,16 +1597,20 @@ yybackup:
goto yyreduce;
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the lookahead token. */
+ /* Shift the look-ahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token. */
- yychar = YYEMPTY;
+ /* Discard the shifted token unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -1891,6 +1891,7 @@ yyreduce:
break;
+/* Line 1267 of yacc.c. */
default: break;
}
@@ -1902,6 +1903,7 @@ yyreduce:
*++yyvsp = yyval;
+
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -1966,7 +1968,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -1983,7 +1985,7 @@ yyerrlab:
}
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
goto yyerrlab1;
@@ -2040,6 +2042,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
*++yyvsp = yylval;
@@ -2064,7 +2069,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#ifndef yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -2075,7 +2080,7 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEMPTY)
+ if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
/* Do not reclaim the symbols of the rule which action triggered
diff --git a/Zend/zend_ini_parser.h b/Zend/zend_ini_parser.h
index 1e0c9a96d..d883f9d40 100644
--- a/Zend/zend_ini_parser.h
+++ b/Zend/zend_ini_parser.h
@@ -1,23 +1,24 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
+
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -28,11 +29,10 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -76,11 +76,10 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
-
diff --git a/Zend/zend_ini_parser.output b/Zend/zend_ini_parser.output
index fc6468a7f..9f7bcda21 100644
--- a/Zend/zend_ini_parser.output
+++ b/Zend/zend_ini_parser.output
@@ -1,9 +1,9 @@
-Terminals unused in grammar
+Terminals which are not used
':'
','
'.'
- '\''
+ '''
'^'
'+'
'-'
@@ -90,7 +90,7 @@ $end (0) 0
'$' (36)
'%' (37)
'&' (38) 33
-'\'' (39)
+''' (39)
'(' (40) 36
')' (41) 36
'*' (42)
diff --git a/Zend/zend_ini_scanner.c b/Zend/zend_ini_scanner.c
index e7bb573cd..f346059e7 100644
--- a/Zend/zend_ini_scanner.c
+++ b/Zend/zend_ini_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Fri Aug 26 18:01:17 2011 */
+/* Generated by re2c 0.13.5 on Mon Jan 17 14:03:33 2011 */
#line 1 "Zend/zend_ini_scanner.l"
/*
+----------------------------------------------------------------------+
diff --git a/Zend/zend_ini_scanner_defs.h b/Zend/zend_ini_scanner_defs.h
index b3e2d726b..e01ce5851 100644
--- a/Zend/zend_ini_scanner_defs.h
+++ b/Zend/zend_ini_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Fri Aug 26 18:01:17 2011 */
+/* Generated by re2c 0.13.5 on Wed Jun 29 02:53:12 2011 */
#line 3 "Zend/zend_ini_scanner_defs.h"
enum YYCONDTYPE {
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index ea9d49d7c..ead8f763b 100755
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -31,7 +31,7 @@ ZEND_API zend_class_entry *zend_ce_serializable;
/* {{{ zend_call_method
Only returns the returned zval if retval_ptr != NULL */
-ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend_function **fn_proxy, char *function_name, int function_name_len, zval **retval_ptr_ptr, int param_count, zval* arg1, zval* arg2 TSRMLS_DC)
+ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend_function **fn_proxy, const char *function_name, int function_name_len, zval **retval_ptr_ptr, int param_count, zval* arg1, zval* arg2 TSRMLS_DC)
{
int result;
zend_fcall_info fci;
diff --git a/Zend/zend_interfaces.h b/Zend/zend_interfaces.h
index eaef9b98f..d0c7159ec 100755
--- a/Zend/zend_interfaces.h
+++ b/Zend/zend_interfaces.h
@@ -38,7 +38,7 @@ typedef struct _zend_user_iterator {
zval *value;
} zend_user_iterator;
-ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend_function **fn_proxy, char *function_name, int function_name_len, zval **retval_ptr_ptr, int param_count, zval* arg1, zval* arg2 TSRMLS_DC);
+ZEND_API zval* zend_call_method(zval **object_pp, zend_class_entry *obj_ce, zend_function **fn_proxy, const char *function_name, int function_name_len, zval **retval_ptr_ptr, int param_count, zval* arg1, zval* arg2 TSRMLS_DC);
#define zend_call_method_with_0_params(obj, obj_ce, fn_proxy, function_name, retval) \
zend_call_method(obj, obj_ce, fn_proxy, function_name, sizeof(function_name)-1, retval, 0, NULL, NULL TSRMLS_CC)
diff --git a/Zend/zend_iterators.c b/Zend/zend_iterators.c
index 759e84aa5..5e909fc9b 100755
--- a/Zend/zend_iterators.c
+++ b/Zend/zend_iterators.c
@@ -51,7 +51,7 @@ static zend_object_handlers iterator_object_handlers = {
ZEND_API void zend_register_iterator_wrapper(TSRMLS_D)
{
INIT_CLASS_ENTRY(zend_iterator_class_entry, "__iterator_wrapper", NULL);
- free(zend_iterator_class_entry.name);
+ str_free(zend_iterator_class_entry.name);
zend_iterator_class_entry.name = "__iterator_wrapper";
}
@@ -82,13 +82,13 @@ ZEND_API enum zend_object_iterator_kind zend_iterator_unwrap(
*iter = (zend_object_iterator *)zend_object_store_get_object(array_ptr TSRMLS_CC);
return ZEND_ITER_OBJECT;
}
- if (HASH_OF(array_ptr)) {
+ if (Z_OBJPROP_P(array_ptr)) {
return ZEND_ITER_PLAIN_OBJECT;
}
return ZEND_ITER_INVALID;
case IS_ARRAY:
- if (HASH_OF(array_ptr)) {
+ if (Z_ARRVAL_P(array_ptr)) {
return ZEND_ITER_PLAIN_ARRAY;
}
return ZEND_ITER_INVALID;
diff --git a/Zend/zend_language_parser.c b/Zend/zend_language_parser.c
index 12dcd67e0..99d6c1fd0 100644
--- a/Zend/zend_language_parser.c
+++ b/Zend/zend_language_parser.c
@@ -1,23 +1,24 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
+
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -28,7 +29,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -46,7 +47,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -54,93 +55,17 @@
/* Pure parsers. */
#define YYPURE 1
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
/* Using locations. */
#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
-#define yyparse zendparse
-#define yylex zendlex
-#define yyerror zenderror
-#define yylval zendlval
-#define yychar zendchar
-#define yydebug zenddebug
-#define yynerrs zendnerrs
-
-
-/* Copy the first part of user declarations. */
-
-
-/*
- +----------------------------------------------------------------------+
- | Zend Engine |
- +----------------------------------------------------------------------+
- | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
- +----------------------------------------------------------------------+
- | This source file is subject to version 2.00 of the Zend license, |
- | that is bundled with this package in the file LICENSE, and is |
- | available through the world-wide-web at the following url: |
- | http://www.zend.com/license/2_00.txt. |
- | If you did not receive a copy of the Zend license and are unable to |
- | obtain it through the world-wide-web, please send a note to |
- | license@zend.com so we can mail you a copy immediately. |
- +----------------------------------------------------------------------+
- | Authors: Andi Gutmans <andi@zend.com> |
- | Zeev Suraski <zeev@zend.com> |
- +----------------------------------------------------------------------+
-*/
-
-/* $Id: zend_language_parser.y 321634 2012-01-01 13:15:04Z felipe $ */
-
-/*
- * LALR shift/reduce conflicts and how they are resolved:
- *
- * - 2 shift/reduce conflicts due to the dangling elseif/else ambiguity. Solved by shift.
- *
- */
-
-
-#include "zend_compile.h"
-#include "zend.h"
-#include "zend_list.h"
-#include "zend_globals.h"
-#include "zend_API.h"
-#include "zend_constants.h"
-
-
-#define YYERROR_VERBOSE
-#define YYSTYPE znode
-#ifdef ZTS
-# define YYPARSE_PARAM tsrm_ls
-# define YYLEX_PARAM tsrm_ls
-#endif
-
-
-
-
-
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
+#define yyparse zendparse
+#define yylex zendlex
+#define yyerror zenderror
+#define yylval zendlval
+#define yychar zendchar
+#define yydebug zenddebug
+#define yynerrs zendnerrs
/* Tokens. */
@@ -149,6 +74,7 @@
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
+ END = 0,
T_REQUIRE_ONCE = 258,
T_REQUIRE = 259,
T_EVAL = 260,
@@ -232,49 +158,54 @@
T_CATCH = 338,
T_THROW = 339,
T_USE = 340,
- T_GLOBAL = 341,
- T_PUBLIC = 342,
- T_PROTECTED = 343,
- T_PRIVATE = 344,
- T_FINAL = 345,
- T_ABSTRACT = 346,
- T_STATIC = 347,
- T_VAR = 348,
- T_UNSET = 349,
- T_ISSET = 350,
- T_EMPTY = 351,
- T_HALT_COMPILER = 352,
- T_CLASS = 353,
- T_INTERFACE = 354,
- T_EXTENDS = 355,
- T_IMPLEMENTS = 356,
- T_OBJECT_OPERATOR = 357,
- T_DOUBLE_ARROW = 358,
- T_LIST = 359,
- T_ARRAY = 360,
- T_CLASS_C = 361,
- T_METHOD_C = 362,
- T_FUNC_C = 363,
- T_LINE = 364,
- T_FILE = 365,
- T_COMMENT = 366,
- T_DOC_COMMENT = 367,
- T_OPEN_TAG = 368,
- T_OPEN_TAG_WITH_ECHO = 369,
- T_CLOSE_TAG = 370,
- T_WHITESPACE = 371,
- T_START_HEREDOC = 372,
- T_END_HEREDOC = 373,
- T_DOLLAR_OPEN_CURLY_BRACES = 374,
- T_CURLY_OPEN = 375,
- T_PAAMAYIM_NEKUDOTAYIM = 376,
- T_NAMESPACE = 377,
- T_NS_C = 378,
- T_DIR = 379,
- T_NS_SEPARATOR = 380
+ T_INSTEADOF = 341,
+ T_GLOBAL = 342,
+ T_PUBLIC = 343,
+ T_PROTECTED = 344,
+ T_PRIVATE = 345,
+ T_FINAL = 346,
+ T_ABSTRACT = 347,
+ T_STATIC = 348,
+ T_VAR = 349,
+ T_UNSET = 350,
+ T_ISSET = 351,
+ T_EMPTY = 352,
+ T_HALT_COMPILER = 353,
+ T_CLASS = 354,
+ T_TRAIT = 355,
+ T_INTERFACE = 356,
+ T_EXTENDS = 357,
+ T_IMPLEMENTS = 358,
+ T_OBJECT_OPERATOR = 359,
+ T_DOUBLE_ARROW = 360,
+ T_LIST = 361,
+ T_ARRAY = 362,
+ T_CALLABLE = 363,
+ T_CLASS_C = 364,
+ T_TRAIT_C = 365,
+ T_METHOD_C = 366,
+ T_FUNC_C = 367,
+ T_LINE = 368,
+ T_FILE = 369,
+ T_COMMENT = 370,
+ T_DOC_COMMENT = 371,
+ T_OPEN_TAG = 372,
+ T_OPEN_TAG_WITH_ECHO = 373,
+ T_CLOSE_TAG = 374,
+ T_WHITESPACE = 375,
+ T_START_HEREDOC = 376,
+ T_END_HEREDOC = 377,
+ T_DOLLAR_OPEN_CURLY_BRACES = 378,
+ T_CURLY_OPEN = 379,
+ T_PAAMAYIM_NEKUDOTAYIM = 380,
+ T_NAMESPACE = 381,
+ T_NS_C = 382,
+ T_DIR = 383,
+ T_NS_SEPARATOR = 384
};
#endif
/* Tokens. */
+#define END 0
#define T_REQUIRE_ONCE 258
#define T_REQUIRE 259
#define T_EVAL 260
@@ -358,61 +289,139 @@
#define T_CATCH 338
#define T_THROW 339
#define T_USE 340
-#define T_GLOBAL 341
-#define T_PUBLIC 342
-#define T_PROTECTED 343
-#define T_PRIVATE 344
-#define T_FINAL 345
-#define T_ABSTRACT 346
-#define T_STATIC 347
-#define T_VAR 348
-#define T_UNSET 349
-#define T_ISSET 350
-#define T_EMPTY 351
-#define T_HALT_COMPILER 352
-#define T_CLASS 353
-#define T_INTERFACE 354
-#define T_EXTENDS 355
-#define T_IMPLEMENTS 356
-#define T_OBJECT_OPERATOR 357
-#define T_DOUBLE_ARROW 358
-#define T_LIST 359
-#define T_ARRAY 360
-#define T_CLASS_C 361
-#define T_METHOD_C 362
-#define T_FUNC_C 363
-#define T_LINE 364
-#define T_FILE 365
-#define T_COMMENT 366
-#define T_DOC_COMMENT 367
-#define T_OPEN_TAG 368
-#define T_OPEN_TAG_WITH_ECHO 369
-#define T_CLOSE_TAG 370
-#define T_WHITESPACE 371
-#define T_START_HEREDOC 372
-#define T_END_HEREDOC 373
-#define T_DOLLAR_OPEN_CURLY_BRACES 374
-#define T_CURLY_OPEN 375
-#define T_PAAMAYIM_NEKUDOTAYIM 376
-#define T_NAMESPACE 377
-#define T_NS_C 378
-#define T_DIR 379
-#define T_NS_SEPARATOR 380
+#define T_INSTEADOF 341
+#define T_GLOBAL 342
+#define T_PUBLIC 343
+#define T_PROTECTED 344
+#define T_PRIVATE 345
+#define T_FINAL 346
+#define T_ABSTRACT 347
+#define T_STATIC 348
+#define T_VAR 349
+#define T_UNSET 350
+#define T_ISSET 351
+#define T_EMPTY 352
+#define T_HALT_COMPILER 353
+#define T_CLASS 354
+#define T_TRAIT 355
+#define T_INTERFACE 356
+#define T_EXTENDS 357
+#define T_IMPLEMENTS 358
+#define T_OBJECT_OPERATOR 359
+#define T_DOUBLE_ARROW 360
+#define T_LIST 361
+#define T_ARRAY 362
+#define T_CALLABLE 363
+#define T_CLASS_C 364
+#define T_TRAIT_C 365
+#define T_METHOD_C 366
+#define T_FUNC_C 367
+#define T_LINE 368
+#define T_FILE 369
+#define T_COMMENT 370
+#define T_DOC_COMMENT 371
+#define T_OPEN_TAG 372
+#define T_OPEN_TAG_WITH_ECHO 373
+#define T_CLOSE_TAG 374
+#define T_WHITESPACE 375
+#define T_START_HEREDOC 376
+#define T_END_HEREDOC 377
+#define T_DOLLAR_OPEN_CURLY_BRACES 378
+#define T_CURLY_OPEN 379
+#define T_PAAMAYIM_NEKUDOTAYIM 380
+#define T_NAMESPACE 381
+#define T_NS_C 382
+#define T_DIR 383
+#define T_NS_SEPARATOR 384
+
+
+
+
+/* Copy the first part of user declarations. */
+
+
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Andi Gutmans <andi@zend.com> |
+ | Zeev Suraski <zeev@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+/* $Id: zend_language_parser.y 322378 2012-01-17 08:09:13Z dmitry $ */
+/*
+ * LALR shift/reduce conflicts and how they are resolved:
+ *
+ * - 2 shift/reduce conflicts due to the dangling elseif/else ambiguity. Solved by shift.
+ *
+ */
+#include "zend_compile.h"
+#include "zend.h"
+#include "zend_list.h"
+#include "zend_globals.h"
+#include "zend_API.h"
+#include "zend_constants.h"
+
+#define YYSIZE_T size_t
+#define yytnamerr zend_yytnamerr
+static YYSIZE_T zend_yytnamerr(char*, const char*);
+
+#define YYERROR_VERBOSE
+#define YYSTYPE znode
+#ifdef ZTS
+# define YYPARSE_PARAM tsrm_ls
+# define YYLEX_PARAM tsrm_ls
+#endif
+
+
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
+
/* Copy the second part of user declarations. */
+/* Line 216 of yacc.c. */
+
#ifdef short
# undef short
@@ -462,7 +471,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -487,14 +496,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int yyi)
+YYID (int i)
#else
static int
-YYID (yyi)
- int yyi;
+YYID (i)
+ int i;
#endif
{
- return yyi;
+ return i;
}
#endif
@@ -575,9 +584,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
+ yytype_int16 yyss;
+ YYSTYPE yyvs;
+ };
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -611,12 +620,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -627,20 +636,20 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 3
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 5168
+#define YYLAST 5312
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 154
+#define YYNTOKENS 158
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 181
+#define YYNNTS 206
/* YYNRULES -- Number of rules. */
-#define YYNRULES 464
+#define YYNRULES 516
/* YYNRULES -- Number of states. */
-#define YYNSTATES 894
+#define YYNSTATES 983
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 380
+#define YYMAXUTOK 384
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -651,16 +660,16 @@ static const yytype_uint8 yytranslate[] =
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 48, 152, 2, 150, 47, 31, 2,
- 145, 146, 45, 42, 8, 43, 44, 46, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 26, 147,
+ 2, 2, 2, 48, 157, 2, 154, 47, 31, 2,
+ 149, 150, 45, 42, 8, 43, 44, 46, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 26, 151,
36, 13, 37, 25, 51, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 61, 2, 153, 30, 2, 151, 2, 2, 2,
+ 2, 61, 2, 155, 30, 2, 156, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 148, 29, 149, 50, 2, 2, 2,
+ 2, 2, 2, 152, 29, 153, 50, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -686,7 +695,7 @@ static const yytype_uint8 yytranslate[] =
114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
- 144
+ 144, 145, 146, 147, 148
};
#if YYDEBUG
@@ -704,252 +713,278 @@ static const yytype_uint16 yyprhs[] =
234, 245, 246, 247, 258, 259, 266, 268, 269, 270,
271, 272, 273, 292, 296, 300, 302, 303, 305, 308,
309, 310, 321, 323, 327, 329, 331, 333, 334, 336,
- 337, 348, 349, 358, 359, 367, 369, 372, 375, 376,
- 379, 381, 382, 385, 386, 389, 391, 395, 396, 399,
- 401, 404, 406, 411, 413, 418, 420, 425, 429, 435,
- 439, 444, 449, 455, 456, 457, 464, 465, 471, 473,
- 475, 477, 482, 483, 484, 492, 493, 494, 503, 504,
- 507, 508, 512, 514, 515, 518, 522, 528, 533, 538,
- 544, 552, 559, 560, 562, 564, 566, 567, 569, 571,
- 574, 578, 582, 587, 591, 593, 595, 598, 603, 607,
- 613, 615, 619, 622, 623, 624, 629, 632, 633, 643,
- 645, 649, 651, 653, 654, 656, 658, 661, 663, 665,
- 667, 669, 671, 673, 677, 683, 685, 689, 695, 700,
- 704, 706, 707, 709, 710, 715, 717, 718, 726, 730,
- 735, 736, 744, 745, 750, 753, 757, 761, 765, 769,
- 773, 777, 781, 785, 789, 793, 797, 800, 803, 806,
- 809, 810, 815, 816, 821, 822, 827, 828, 833, 837,
- 841, 845, 849, 853, 857, 861, 865, 869, 873, 877,
- 881, 884, 887, 890, 893, 897, 901, 905, 909, 913,
- 917, 921, 925, 929, 933, 934, 935, 943, 944, 950,
- 952, 955, 958, 961, 964, 967, 970, 973, 976, 977,
- 981, 983, 988, 992, 995, 996, 1007, 1009, 1010, 1015,
- 1019, 1024, 1026, 1029, 1030, 1036, 1037, 1045, 1046, 1053,
- 1054, 1062, 1063, 1071, 1072, 1080, 1081, 1089, 1090, 1096,
- 1098, 1100, 1104, 1107, 1109, 1113, 1116, 1118, 1120, 1121,
- 1122, 1129, 1131, 1134, 1135, 1138, 1139, 1142, 1146, 1147,
- 1149, 1151, 1152, 1156, 1158, 1160, 1162, 1164, 1166, 1168,
- 1170, 1172, 1174, 1176, 1180, 1183, 1185, 1187, 1191, 1194,
- 1197, 1200, 1205, 1207, 1211, 1213, 1215, 1217, 1221, 1224,
- 1226, 1230, 1234, 1235, 1238, 1239, 1241, 1247, 1251, 1255,
- 1257, 1259, 1261, 1263, 1265, 1267, 1268, 1269, 1277, 1279,
- 1282, 1283, 1284, 1289, 1290, 1295, 1296, 1298, 1301, 1305,
- 1309, 1311, 1313, 1315, 1317, 1320, 1322, 1327, 1332, 1334,
- 1336, 1341, 1342, 1344, 1346, 1347, 1350, 1355, 1360, 1362,
- 1364, 1368, 1370, 1373, 1377, 1379, 1381, 1382, 1388, 1389,
- 1390, 1393, 1399, 1403, 1407, 1409, 1416, 1421, 1426, 1429,
- 1432, 1435, 1437, 1440, 1442, 1443, 1449, 1453, 1457, 1464,
- 1468, 1470, 1472, 1474, 1479, 1484, 1487, 1490, 1495, 1498,
- 1501, 1503, 1504, 1509, 1513
+ 337, 348, 349, 358, 359, 367, 369, 372, 374, 377,
+ 378, 381, 383, 384, 387, 388, 391, 393, 397, 398,
+ 401, 403, 406, 408, 413, 415, 420, 422, 427, 431,
+ 437, 441, 446, 451, 457, 458, 459, 466, 467, 473,
+ 475, 477, 479, 484, 485, 486, 494, 495, 496, 505,
+ 506, 509, 510, 514, 516, 517, 520, 524, 530, 535,
+ 540, 546, 554, 561, 562, 564, 566, 568, 570, 571,
+ 573, 575, 578, 582, 586, 591, 595, 597, 599, 602,
+ 607, 611, 617, 619, 623, 626, 627, 628, 633, 636,
+ 638, 639, 649, 653, 655, 659, 661, 665, 666, 668,
+ 670, 673, 676, 679, 683, 685, 689, 691, 693, 697,
+ 702, 706, 707, 709, 711, 715, 717, 719, 720, 722,
+ 724, 727, 729, 731, 733, 735, 737, 739, 743, 749,
+ 751, 755, 761, 766, 770, 772, 773, 775, 776, 781,
+ 783, 786, 788, 793, 797, 798, 802, 804, 806, 807,
+ 808, 811, 812, 817, 818, 826, 830, 835, 836, 844,
+ 847, 851, 855, 859, 863, 867, 871, 875, 879, 883,
+ 887, 891, 894, 897, 900, 903, 904, 909, 910, 915,
+ 916, 921, 922, 927, 931, 935, 939, 943, 947, 951,
+ 955, 959, 963, 967, 971, 975, 978, 981, 984, 987,
+ 991, 995, 999, 1003, 1007, 1011, 1015, 1019, 1023, 1027,
+ 1029, 1030, 1036, 1037, 1038, 1046, 1047, 1053, 1055, 1058,
+ 1061, 1064, 1067, 1070, 1073, 1076, 1079, 1080, 1084, 1086,
+ 1091, 1095, 1099, 1102, 1103, 1114, 1115, 1127, 1129, 1130,
+ 1135, 1139, 1144, 1146, 1149, 1150, 1156, 1157, 1165, 1166,
+ 1173, 1174, 1182, 1183, 1191, 1192, 1200, 1201, 1209, 1210,
+ 1216, 1218, 1220, 1224, 1227, 1229, 1233, 1236, 1238, 1240,
+ 1241, 1242, 1249, 1251, 1254, 1255, 1258, 1259, 1262, 1266,
+ 1267, 1269, 1271, 1272, 1276, 1278, 1280, 1282, 1284, 1286,
+ 1288, 1290, 1292, 1294, 1296, 1300, 1303, 1305, 1307, 1311,
+ 1314, 1317, 1320, 1325, 1329, 1331, 1333, 1337, 1339, 1341,
+ 1343, 1347, 1350, 1352, 1356, 1360, 1362, 1363, 1366, 1367,
+ 1369, 1375, 1379, 1383, 1385, 1387, 1389, 1391, 1393, 1395,
+ 1396, 1397, 1405, 1407, 1410, 1411, 1412, 1417, 1422, 1427,
+ 1428, 1433, 1435, 1437, 1438, 1440, 1443, 1447, 1451, 1453,
+ 1458, 1459, 1465, 1467, 1469, 1471, 1473, 1476, 1478, 1483,
+ 1488, 1490, 1492, 1497, 1498, 1500, 1502, 1503, 1506, 1511,
+ 1516, 1518, 1520, 1524, 1526, 1529, 1533, 1535, 1537, 1538,
+ 1544, 1545, 1546, 1549, 1555, 1559, 1563, 1565, 1572, 1577,
+ 1582, 1585, 1588, 1591, 1593, 1596, 1598, 1599, 1605, 1609,
+ 1613, 1620, 1624, 1626, 1628, 1630, 1635, 1640, 1643, 1646,
+ 1651, 1654, 1657, 1659, 1660, 1665, 1669
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 155, 0, -1, 156, -1, -1, 156, 157, 159, -1,
- -1, 71, -1, 158, 144, 71, -1, 168, -1, 199,
- -1, 200, -1, 116, 145, 146, 147, -1, 141, 158,
- 147, -1, -1, 141, 158, 148, 160, 156, 149, -1,
- -1, 141, 148, 161, 156, 149, -1, 104, 162, 147,
- -1, 164, 147, -1, 162, 8, 163, -1, 163, -1,
- 158, -1, 158, 90, 71, -1, 144, 158, -1, 144,
- 158, 90, 71, -1, 164, 8, 71, 13, 291, -1,
- 99, 71, 13, 291, -1, -1, 165, 166, 167, -1,
- -1, 168, -1, 199, -1, 200, -1, 116, 145, 146,
- 147, -1, 169, -1, 71, 26, -1, 148, 165, 149,
- -1, -1, -1, 65, 145, 297, 146, 170, 168, 171,
- 225, 229, -1, -1, -1, 65, 145, 297, 146, 26,
- 172, 165, 173, 227, 230, 68, 147, -1, -1, -1,
- 82, 145, 174, 297, 146, 175, 224, -1, -1, -1,
- 81, 176, 168, 82, 145, 177, 297, 146, 147, -1,
- -1, -1, -1, 84, 145, 251, 147, 178, 251, 147,
- 179, 251, 146, 180, 215, -1, -1, 91, 145, 297,
- 146, 181, 219, -1, 95, 147, -1, 95, 297, 147,
- -1, 96, 147, -1, 96, 297, 147, -1, 100, 147,
- -1, 100, 254, 147, -1, 100, 301, 147, -1, 105,
- 236, 147, -1, 111, 238, 147, -1, 80, 250, 147,
- -1, 75, -1, 297, 147, -1, 113, 145, 197, 146,
- 147, -1, -1, -1, 86, 145, 301, 90, 182, 214,
- 213, 146, 183, 216, -1, -1, -1, 86, 145, 254,
- 90, 184, 301, 213, 146, 185, 216, -1, -1, 88,
- 186, 145, 218, 146, 217, -1, 147, -1, -1, -1,
- -1, -1, -1, 101, 187, 148, 165, 149, 102, 145,
- 188, 280, 189, 73, 146, 190, 148, 165, 149, 191,
- 192, -1, 103, 297, 147, -1, 97, 71, 147, -1,
- 193, -1, -1, 194, -1, 193, 194, -1, -1, -1,
- 102, 145, 280, 195, 73, 146, 196, 148, 165, 149,
- -1, 198, -1, 197, 8, 198, -1, 301, -1, 202,
- -1, 204, -1, -1, 31, -1, -1, 267, 201, 71,
- 203, 145, 231, 146, 148, 165, 149, -1, -1, 207,
- 71, 208, 205, 211, 148, 239, 149, -1, -1, 209,
- 71, 206, 210, 148, 239, 149, -1, 117, -1, 110,
- 117, -1, 109, 117, -1, -1, 119, 280, -1, 118,
- -1, -1, 119, 212, -1, -1, 120, 212, -1, 280,
- -1, 212, 8, 280, -1, -1, 122, 214, -1, 301,
- -1, 31, 301, -1, 168, -1, 26, 165, 85, 147,
- -1, 168, -1, 26, 165, 87, 147, -1, 168, -1,
- 26, 165, 89, 147, -1, 71, 13, 291, -1, 218,
- 8, 71, 13, 291, -1, 148, 220, 149, -1, 148,
- 147, 220, 149, -1, 26, 220, 92, 147, -1, 26,
- 147, 220, 92, 147, -1, -1, -1, 220, 93, 297,
- 223, 221, 165, -1, -1, 220, 94, 223, 222, 165,
- -1, 26, -1, 147, -1, 168, -1, 26, 165, 83,
- 147, -1, -1, -1, 225, 66, 145, 297, 146, 226,
- 168, -1, -1, -1, 227, 66, 145, 297, 146, 26,
- 228, 165, -1, -1, 67, 168, -1, -1, 67, 26,
- 165, -1, 232, -1, -1, 233, 73, -1, 233, 31,
- 73, -1, 233, 31, 73, 13, 291, -1, 233, 73,
- 13, 291, -1, 232, 8, 233, 73, -1, 232, 8,
- 233, 31, 73, -1, 232, 8, 233, 31, 73, 13,
- 291, -1, 232, 8, 233, 73, 13, 291, -1, -1,
- 280, -1, 124, -1, 235, -1, -1, 254, -1, 301,
- -1, 31, 299, -1, 235, 8, 254, -1, 235, 8,
- 301, -1, 235, 8, 31, 299, -1, 236, 8, 237,
- -1, 237, -1, 73, -1, 150, 298, -1, 150, 148,
- 297, 149, -1, 238, 8, 73, -1, 238, 8, 73,
- 13, 291, -1, 73, -1, 73, 13, 291, -1, 239,
- 240, -1, -1, -1, 244, 241, 248, 147, -1, 249,
- 147, -1, -1, 245, 267, 201, 71, 242, 145, 231,
- 146, 243, -1, 147, -1, 148, 165, 149, -1, 246,
- -1, 112, -1, -1, 246, -1, 247, -1, 246, 247,
- -1, 106, -1, 107, -1, 108, -1, 111, -1, 110,
- -1, 109, -1, 248, 8, 73, -1, 248, 8, 73,
- 13, 291, -1, 73, -1, 73, 13, 291, -1, 249,
- 8, 71, 13, 291, -1, 99, 71, 13, 291, -1,
- 250, 8, 297, -1, 297, -1, -1, 252, -1, -1,
- 252, 8, 253, 297, -1, 297, -1, -1, 123, 145,
- 255, 322, 146, 13, 297, -1, 301, 13, 297, -1,
- 301, 13, 31, 301, -1, -1, 301, 13, 31, 63,
- 281, 256, 289, -1, -1, 63, 281, 257, 289, -1,
- 62, 297, -1, 301, 24, 297, -1, 301, 23, 297,
- -1, 301, 22, 297, -1, 301, 21, 297, -1, 301,
- 20, 297, -1, 301, 19, 297, -1, 301, 18, 297,
- -1, 301, 17, 297, -1, 301, 16, 297, -1, 301,
- 15, 297, -1, 301, 14, 297, -1, 300, 60, -1,
- 60, 300, -1, 300, 59, -1, 59, 300, -1, -1,
- 297, 27, 258, 297, -1, -1, 297, 28, 259, 297,
- -1, -1, 297, 9, 260, 297, -1, -1, 297, 11,
- 261, 297, -1, 297, 10, 297, -1, 297, 29, 297,
- -1, 297, 31, 297, -1, 297, 30, 297, -1, 297,
- 44, 297, -1, 297, 42, 297, -1, 297, 43, 297,
- -1, 297, 45, 297, -1, 297, 46, 297, -1, 297,
- 47, 297, -1, 297, 41, 297, -1, 297, 40, 297,
- -1, 42, 297, -1, 43, 297, -1, 48, 297, -1,
- 50, 297, -1, 297, 33, 297, -1, 297, 32, 297,
- -1, 297, 35, 297, -1, 297, 34, 297, -1, 297,
- 36, 297, -1, 297, 39, 297, -1, 297, 37, 297,
- -1, 297, 38, 297, -1, 297, 49, 281, -1, 145,
- 297, 146, -1, -1, -1, 297, 25, 262, 297, 26,
- 263, 297, -1, -1, 297, 25, 26, 264, 297, -1,
- 331, -1, 58, 297, -1, 57, 297, -1, 56, 297,
- -1, 55, 297, -1, 54, 297, -1, 53, 297, -1,
- 52, 297, -1, 64, 287, -1, -1, 51, 265, 297,
- -1, 293, -1, 124, 145, 325, 146, -1, 151, 288,
- 151, -1, 12, 297, -1, -1, 267, 201, 145, 266,
- 231, 146, 268, 148, 165, 149, -1, 98, -1, -1,
- 104, 145, 269, 146, -1, 269, 8, 73, -1, 269,
+ 159, 0, -1, 160, -1, -1, 160, 161, 163, -1,
+ -1, 71, -1, 162, 148, 71, -1, 172, -1, 203,
+ -1, 204, -1, 117, 149, 150, 151, -1, 145, 162,
+ 151, -1, -1, 145, 162, 152, 164, 160, 153, -1,
+ -1, 145, 152, 165, 160, 153, -1, 104, 166, 151,
+ -1, 168, 151, -1, 166, 8, 167, -1, 167, -1,
+ 162, -1, 162, 90, 71, -1, 148, 162, -1, 148,
+ 162, 90, 71, -1, 168, 8, 71, 13, 316, -1,
+ 99, 71, 13, 316, -1, -1, 169, 170, 171, -1,
+ -1, 172, -1, 203, -1, 204, -1, 117, 149, 150,
+ 151, -1, 173, -1, 71, 26, -1, 152, 169, 153,
+ -1, -1, -1, 65, 149, 322, 150, 174, 172, 175,
+ 229, 233, -1, -1, -1, 65, 149, 322, 150, 26,
+ 176, 169, 177, 231, 234, 68, 151, -1, -1, -1,
+ 82, 149, 178, 322, 150, 179, 228, -1, -1, -1,
+ 81, 180, 172, 82, 149, 181, 322, 150, 151, -1,
+ -1, -1, -1, 84, 149, 267, 151, 182, 267, 151,
+ 183, 267, 150, 184, 219, -1, -1, 91, 149, 322,
+ 150, 185, 223, -1, 95, 151, -1, 95, 322, 151,
+ -1, 96, 151, -1, 96, 322, 151, -1, 100, 151,
+ -1, 100, 278, 151, -1, 100, 326, 151, -1, 106,
+ 240, 151, -1, 112, 242, 151, -1, 80, 266, 151,
+ -1, 75, -1, 322, 151, -1, 114, 149, 201, 150,
+ 151, -1, -1, -1, 86, 149, 326, 90, 186, 218,
+ 217, 150, 187, 220, -1, -1, -1, 86, 149, 278,
+ 90, 188, 326, 217, 150, 189, 220, -1, -1, 88,
+ 190, 149, 222, 150, 221, -1, 151, -1, -1, -1,
+ -1, -1, -1, 101, 191, 152, 169, 153, 102, 149,
+ 192, 305, 193, 73, 150, 194, 152, 169, 153, 195,
+ 196, -1, 103, 322, 151, -1, 97, 71, 151, -1,
+ 197, -1, -1, 198, -1, 197, 198, -1, -1, -1,
+ 102, 149, 305, 199, 73, 150, 200, 152, 169, 153,
+ -1, 202, -1, 201, 8, 202, -1, 326, -1, 206,
+ -1, 208, -1, -1, 31, -1, -1, 292, 205, 71,
+ 207, 149, 235, 150, 152, 169, 153, -1, -1, 211,
+ 71, 212, 209, 215, 152, 243, 153, -1, -1, 213,
+ 71, 210, 214, 152, 243, 153, -1, 118, -1, 111,
+ 118, -1, 119, -1, 110, 118, -1, -1, 121, 305,
+ -1, 120, -1, -1, 121, 216, -1, -1, 122, 216,
+ -1, 305, -1, 216, 8, 305, -1, -1, 124, 218,
+ -1, 326, -1, 31, 326, -1, 172, -1, 26, 169,
+ 85, 151, -1, 172, -1, 26, 169, 87, 151, -1,
+ 172, -1, 26, 169, 89, 151, -1, 71, 13, 316,
+ -1, 222, 8, 71, 13, 316, -1, 152, 224, 153,
+ -1, 152, 151, 224, 153, -1, 26, 224, 92, 151,
+ -1, 26, 151, 224, 92, 151, -1, -1, -1, 224,
+ 93, 322, 227, 225, 169, -1, -1, 224, 94, 227,
+ 226, 169, -1, 26, -1, 151, -1, 172, -1, 26,
+ 169, 83, 151, -1, -1, -1, 229, 66, 149, 322,
+ 150, 230, 172, -1, -1, -1, 231, 66, 149, 322,
+ 150, 26, 232, 169, -1, -1, 67, 172, -1, -1,
+ 67, 26, 169, -1, 236, -1, -1, 237, 73, -1,
+ 237, 31, 73, -1, 237, 31, 73, 13, 316, -1,
+ 237, 73, 13, 316, -1, 236, 8, 237, 73, -1,
+ 236, 8, 237, 31, 73, -1, 236, 8, 237, 31,
+ 73, 13, 316, -1, 236, 8, 237, 73, 13, 316,
+ -1, -1, 126, -1, 127, -1, 305, -1, 239, -1,
+ -1, 278, -1, 326, -1, 31, 324, -1, 239, 8,
+ 278, -1, 239, 8, 326, -1, 239, 8, 31, 324,
+ -1, 240, 8, 241, -1, 241, -1, 73, -1, 154,
+ 323, -1, 154, 152, 322, 153, -1, 242, 8, 73,
+ -1, 242, 8, 73, 13, 316, -1, 73, -1, 73,
+ 13, 316, -1, 243, 244, -1, -1, -1, 260, 245,
+ 264, 151, -1, 265, 151, -1, 247, -1, -1, 261,
+ 292, 205, 71, 246, 149, 235, 150, 259, -1, 104,
+ 248, 249, -1, 305, -1, 248, 8, 305, -1, 151,
+ -1, 152, 250, 153, -1, -1, 251, -1, 252, -1,
+ 251, 252, -1, 253, 151, -1, 257, 151, -1, 256,
+ 105, 254, -1, 305, -1, 254, 8, 305, -1, 71,
+ -1, 256, -1, 305, 144, 71, -1, 255, 90, 258,
+ 71, -1, 255, 90, 263, -1, -1, 263, -1, 151,
+ -1, 152, 169, 153, -1, 262, -1, 113, -1, -1,
+ 262, -1, 263, -1, 262, 263, -1, 107, -1, 108,
+ -1, 109, -1, 112, -1, 111, -1, 110, -1, 264,
+ 8, 73, -1, 264, 8, 73, 13, 316, -1, 73,
+ -1, 73, 13, 316, -1, 265, 8, 71, 13, 316,
+ -1, 99, 71, 13, 316, -1, 266, 8, 322, -1,
+ 322, -1, -1, 268, -1, -1, 268, 8, 269, 322,
+ -1, 322, -1, 270, 330, -1, 330, -1, 271, 61,
+ 345, 155, -1, 61, 345, 155, -1, -1, 271, 273,
+ 270, -1, 271, -1, 270, -1, -1, -1, 275, 272,
+ -1, -1, 63, 306, 277, 314, -1, -1, 125, 149,
+ 279, 351, 150, 13, 322, -1, 326, 13, 322, -1,
+ 326, 13, 31, 326, -1, -1, 326, 13, 31, 63,
+ 306, 280, 314, -1, 62, 322, -1, 326, 24, 322,
+ -1, 326, 23, 322, -1, 326, 22, 322, -1, 326,
+ 21, 322, -1, 326, 20, 322, -1, 326, 19, 322,
+ -1, 326, 18, 322, -1, 326, 17, 322, -1, 326,
+ 16, 322, -1, 326, 15, 322, -1, 326, 14, 322,
+ -1, 325, 60, -1, 60, 325, -1, 325, 59, -1,
+ 59, 325, -1, -1, 322, 27, 281, 322, -1, -1,
+ 322, 28, 282, 322, -1, -1, 322, 9, 283, 322,
+ -1, -1, 322, 11, 284, 322, -1, 322, 10, 322,
+ -1, 322, 29, 322, -1, 322, 31, 322, -1, 322,
+ 30, 322, -1, 322, 44, 322, -1, 322, 42, 322,
+ -1, 322, 43, 322, -1, 322, 45, 322, -1, 322,
+ 46, 322, -1, 322, 47, 322, -1, 322, 41, 322,
+ -1, 322, 40, 322, -1, 42, 322, -1, 43, 322,
+ -1, 48, 322, -1, 50, 322, -1, 322, 33, 322,
+ -1, 322, 32, 322, -1, 322, 35, 322, -1, 322,
+ 34, 322, -1, 322, 36, 322, -1, 322, 39, 322,
+ -1, 322, 37, 322, -1, 322, 38, 322, -1, 322,
+ 49, 306, -1, 149, 322, 150, -1, 276, -1, -1,
+ 149, 276, 150, 285, 274, -1, -1, -1, 322, 25,
+ 286, 322, 26, 287, 322, -1, -1, 322, 25, 26,
+ 288, 322, -1, 360, -1, 58, 322, -1, 57, 322,
+ -1, 56, 322, -1, 55, 322, -1, 54, 322, -1,
+ 53, 322, -1, 52, 322, -1, 64, 312, -1, -1,
+ 51, 289, 322, -1, 318, -1, 126, 149, 354, 150,
+ -1, 61, 354, 155, -1, 156, 313, 156, -1, 12,
+ 322, -1, -1, 292, 205, 149, 290, 235, 150, 293,
+ 152, 169, 153, -1, -1, 112, 292, 205, 149, 291,
+ 235, 150, 293, 152, 169, 153, -1, 98, -1, -1,
+ 104, 149, 294, 150, -1, 294, 8, 73, -1, 294,
8, 31, 73, -1, 73, -1, 31, 73, -1, -1,
- 158, 145, 271, 234, 146, -1, -1, 141, 144, 158,
- 145, 272, 234, 146, -1, -1, 144, 158, 145, 273,
- 234, 146, -1, -1, 279, 140, 71, 145, 274, 234,
- 146, -1, -1, 279, 140, 309, 145, 275, 234, 146,
- -1, -1, 311, 140, 71, 145, 276, 234, 146, -1,
- -1, 311, 140, 309, 145, 277, 234, 146, -1, -1,
- 309, 145, 278, 234, 146, -1, 111, -1, 158, -1,
- 141, 144, 158, -1, 144, 158, -1, 158, -1, 141,
- 144, 158, -1, 144, 158, -1, 279, -1, 282, -1,
- -1, -1, 313, 121, 283, 317, 284, 285, -1, 313,
- -1, 285, 286, -1, -1, 121, 317, -1, -1, 145,
- 146, -1, 145, 297, 146, -1, -1, 78, -1, 327,
- -1, -1, 145, 234, 146, -1, 69, -1, 70, -1,
- 79, -1, 128, -1, 129, -1, 143, -1, 125, -1,
- 126, -1, 127, -1, 142, -1, 136, 78, 137, -1,
- 136, 137, -1, 290, -1, 158, -1, 141, 144, 158,
- -1, 144, 158, -1, 42, 291, -1, 43, 291, -1,
- 124, 145, 294, 146, -1, 292, -1, 279, 140, 71,
- -1, 72, -1, 334, -1, 158, -1, 141, 144, 158,
- -1, 144, 158, -1, 290, -1, 152, 327, 152, -1,
- 136, 327, 137, -1, -1, 296, 295, -1, -1, 8,
- -1, 296, 8, 291, 122, 291, -1, 296, 8, 291,
- -1, 291, 122, 291, -1, 291, -1, 298, -1, 254,
- -1, 301, -1, 301, -1, 301, -1, -1, -1, 312,
- 121, 302, 317, 303, 307, 304, -1, 312, -1, 304,
- 305, -1, -1, -1, 121, 317, 306, 307, -1, -1,
- 145, 308, 234, 146, -1, -1, 314, -1, 321, 314,
- -1, 279, 140, 309, -1, 311, 140, 309, -1, 314,
- -1, 313, -1, 270, -1, 314, -1, 321, 314, -1,
- 310, -1, 314, 61, 316, 153, -1, 314, 148, 297,
- 149, -1, 315, -1, 73, -1, 150, 148, 297, 149,
- -1, -1, 297, -1, 319, -1, -1, 309, 318, -1,
- 319, 61, 316, 153, -1, 319, 148, 297, 149, -1,
- 320, -1, 71, -1, 148, 297, 149, -1, 150, -1,
- 321, 150, -1, 322, 8, 323, -1, 323, -1, 301,
- -1, -1, 123, 145, 324, 322, 146, -1, -1, -1,
- 326, 295, -1, 326, 8, 297, 122, 297, -1, 326,
- 8, 297, -1, 297, 122, 297, -1, 297, -1, 326,
- 8, 297, 122, 31, 299, -1, 326, 8, 31, 299,
- -1, 297, 122, 31, 299, -1, 31, 299, -1, 327,
- 328, -1, 327, 78, -1, 328, -1, 78, 328, -1,
- 73, -1, -1, 73, 61, 329, 330, 153, -1, 73,
- 121, 71, -1, 138, 297, 149, -1, 138, 72, 61,
- 297, 153, 149, -1, 139, 301, 149, -1, 71, -1,
- 74, -1, 73, -1, 114, 145, 332, 146, -1, 115,
- 145, 301, 146, -1, 7, 297, -1, 6, 297, -1,
- 5, 145, 297, 146, -1, 4, 297, -1, 3, 297,
- -1, 301, -1, -1, 332, 8, 333, 301, -1, 279,
- 140, 71, -1, 311, 140, 71, -1
+ 162, 149, 296, 238, 150, -1, -1, 145, 148, 162,
+ 149, 297, 238, 150, -1, -1, 148, 162, 149, 298,
+ 238, 150, -1, -1, 304, 144, 349, 149, 299, 238,
+ 150, -1, -1, 304, 144, 336, 149, 300, 238, 150,
+ -1, -1, 338, 144, 349, 149, 301, 238, 150, -1,
+ -1, 338, 144, 336, 149, 302, 238, 150, -1, -1,
+ 336, 149, 303, 238, 150, -1, 112, -1, 162, -1,
+ 145, 148, 162, -1, 148, 162, -1, 162, -1, 145,
+ 148, 162, -1, 148, 162, -1, 304, -1, 307, -1,
+ -1, -1, 342, 123, 308, 346, 309, 310, -1, 342,
+ -1, 310, 311, -1, -1, 123, 346, -1, -1, 149,
+ 150, -1, 149, 322, 150, -1, -1, 78, -1, 356,
+ -1, -1, 149, 238, 150, -1, 69, -1, 70, -1,
+ 79, -1, 132, -1, 133, -1, 147, -1, 129, -1,
+ 130, -1, 131, -1, 146, -1, 140, 78, 141, -1,
+ 140, 141, -1, 315, -1, 162, -1, 145, 148, 162,
+ -1, 148, 162, -1, 42, 316, -1, 43, 316, -1,
+ 126, 149, 319, 150, -1, 61, 319, 155, -1, 317,
+ -1, 128, -1, 304, 144, 71, -1, 72, -1, 363,
+ -1, 162, -1, 145, 148, 162, -1, 148, 162, -1,
+ 315, -1, 157, 356, 157, -1, 140, 356, 141, -1,
+ 128, -1, -1, 321, 320, -1, -1, 8, -1, 321,
+ 8, 316, 124, 316, -1, 321, 8, 316, -1, 316,
+ 124, 316, -1, 316, -1, 323, -1, 278, -1, 326,
+ -1, 326, -1, 326, -1, -1, -1, 341, 123, 327,
+ 346, 328, 335, 329, -1, 341, -1, 329, 330, -1,
+ -1, -1, 123, 346, 331, 335, -1, 332, 61, 345,
+ 155, -1, 333, 61, 345, 155, -1, -1, 149, 334,
+ 238, 150, -1, 333, -1, 332, -1, -1, 343, -1,
+ 350, 343, -1, 304, 144, 336, -1, 338, 144, 336,
+ -1, 343, -1, 339, 61, 345, 155, -1, -1, 295,
+ 340, 61, 345, 155, -1, 342, -1, 339, -1, 295,
+ -1, 343, -1, 350, 343, -1, 337, -1, 343, 61,
+ 345, 155, -1, 343, 152, 322, 153, -1, 344, -1,
+ 73, -1, 154, 152, 322, 153, -1, -1, 322, -1,
+ 348, -1, -1, 336, 347, -1, 348, 61, 345, 155,
+ -1, 348, 152, 322, 153, -1, 349, -1, 71, -1,
+ 152, 322, 153, -1, 154, -1, 350, 154, -1, 351,
+ 8, 352, -1, 352, -1, 326, -1, -1, 125, 149,
+ 353, 351, 150, -1, -1, -1, 355, 320, -1, 355,
+ 8, 322, 124, 322, -1, 355, 8, 322, -1, 322,
+ 124, 322, -1, 322, -1, 355, 8, 322, 124, 31,
+ 324, -1, 355, 8, 31, 324, -1, 322, 124, 31,
+ 324, -1, 31, 324, -1, 356, 357, -1, 356, 78,
+ -1, 357, -1, 78, 357, -1, 73, -1, -1, 73,
+ 61, 358, 359, 155, -1, 73, 123, 71, -1, 142,
+ 322, 153, -1, 142, 72, 61, 322, 155, 153, -1,
+ 143, 326, 153, -1, 71, -1, 74, -1, 73, -1,
+ 115, 149, 361, 150, -1, 116, 149, 326, 150, -1,
+ 7, 322, -1, 6, 322, -1, 5, 149, 322, 150,
+ -1, 4, 322, -1, 3, 322, -1, 326, -1, -1,
+ 361, 8, 362, 326, -1, 304, 144, 71, -1, 338,
+ 144, 71, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 155, 155, 159, 159, 160, 164, 165, 169, 170,
- 171, 172, 173, 174, 174, 176, 176, 178, 179, 183,
- 184, 188, 189, 190, 191, 195, 196, 200, 200, 201,
- 206, 207, 208, 209, 214, 215, 219, 220, 220, 220,
- 221, 221, 221, 222, 222, 222, 223, 223, 223, 227,
- 229, 231, 224, 233, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 248, 249,
- 247, 252, 253, 251, 255, 255, 256, 257, 258, 259,
- 260, 261, 257, 263, 264, 269, 270, 274, 275, 280,
- 280, 280, 285, 286, 290, 294, 298, 303, 304, 309,
- 309, 315, 314, 321, 320, 330, 331, 332, 336, 337,
- 341, 344, 346, 349, 351, 355, 356, 360, 361, 366,
- 367, 371, 372, 377, 378, 383, 384, 389, 390, 395,
- 396, 397, 398, 403, 404, 404, 405, 405, 410, 411,
- 416, 417, 422, 424, 424, 428, 430, 430, 434, 436,
- 440, 442, 447, 448, 453, 454, 455, 456, 457, 458,
- 459, 460, 465, 466, 467, 472, 473, 478, 479, 480,
- 481, 482, 483, 487, 488, 493, 494, 495, 500, 501,
- 502, 503, 509, 510, 515, 515, 516, 517, 517, 523,
- 524, 528, 529, 533, 534, 538, 539, 543, 544, 545,
- 546, 547, 548, 552, 553, 554, 555, 559, 560, 564,
- 565, 570, 571, 575, 575, 576, 580, 580, 581, 582,
- 583, 583, 584, 584, 585, 586, 587, 588, 589, 590,
- 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
- 601, 601, 602, 602, 603, 603, 604, 604, 605, 606,
- 607, 608, 609, 610, 611, 612, 613, 614, 615, 616,
- 617, 618, 619, 620, 621, 622, 623, 624, 625, 626,
- 627, 628, 629, 630, 631, 632, 631, 634, 634, 636,
- 637, 638, 639, 640, 641, 642, 643, 644, 645, 645,
- 646, 647, 648, 649, 650, 650, 655, 658, 660, 664,
- 665, 666, 667, 671, 671, 674, 674, 677, 677, 680,
- 680, 683, 683, 686, 686, 689, 689, 692, 692, 698,
- 699, 700, 701, 705, 706, 707, 713, 714, 719, 720,
- 719, 722, 727, 728, 733, 737, 738, 739, 743, 744,
- 745, 750, 751, 756, 757, 758, 759, 760, 761, 762,
- 763, 764, 765, 766, 767, 772, 773, 774, 775, 776,
- 777, 778, 779, 783, 787, 788, 789, 790, 791, 792,
- 793, 794, 799, 800, 803, 805, 809, 810, 811, 812,
- 816, 817, 822, 827, 832, 837, 838, 837, 840, 844,
- 845, 850, 850, 854, 854, 858, 862, 863, 867, 868,
- 873, 877, 878, 883, 884, 885, 889, 890, 891, 896,
- 897, 901, 902, 907, 908, 908, 912, 913, 914, 918,
- 919, 923, 924, 928, 929, 934, 935, 935, 936, 941,
- 942, 946, 947, 948, 949, 950, 951, 952, 953, 957,
- 958, 959, 960, 966, 967, 967, 968, 969, 970, 971,
- 976, 977, 978, 983, 984, 985, 986, 987, 988, 989,
- 993, 994, 994, 998, 999
+ 0, 214, 214, 218, 218, 219, 223, 224, 228, 229,
+ 230, 231, 232, 233, 233, 235, 235, 237, 238, 242,
+ 243, 247, 248, 249, 250, 254, 255, 259, 259, 260,
+ 265, 266, 267, 268, 273, 274, 278, 279, 279, 279,
+ 280, 280, 280, 281, 281, 281, 282, 282, 282, 286,
+ 288, 290, 283, 292, 292, 293, 294, 295, 296, 297,
+ 298, 299, 300, 301, 302, 303, 304, 305, 307, 308,
+ 306, 311, 312, 310, 314, 314, 315, 316, 317, 318,
+ 319, 320, 316, 322, 323, 328, 329, 333, 334, 339,
+ 339, 339, 344, 345, 349, 353, 357, 362, 363, 368,
+ 368, 374, 373, 380, 379, 389, 390, 391, 392, 396,
+ 397, 401, 404, 406, 409, 411, 415, 416, 420, 421,
+ 426, 427, 431, 432, 437, 438, 443, 444, 449, 450,
+ 455, 456, 457, 458, 463, 464, 464, 465, 465, 470,
+ 471, 476, 477, 482, 484, 484, 488, 490, 490, 494,
+ 496, 500, 502, 507, 508, 513, 514, 515, 516, 517,
+ 518, 519, 520, 525, 526, 527, 528, 533, 534, 539,
+ 540, 541, 542, 543, 544, 548, 549, 554, 555, 556,
+ 561, 562, 563, 564, 570, 571, 576, 576, 577, 578,
+ 579, 579, 584, 588, 589, 593, 594, 597, 599, 603,
+ 604, 608, 609, 613, 617, 618, 622, 623, 627, 631,
+ 632, 636, 637, 641, 642, 646, 647, 651, 652, 656,
+ 657, 661, 662, 663, 664, 665, 666, 670, 671, 672,
+ 673, 677, 678, 682, 683, 688, 689, 693, 693, 694,
+ 698, 699, 703, 704, 708, 708, 709, 710, 714, 715,
+ 715, 720, 720, 724, 724, 725, 726, 727, 727, 728,
+ 729, 730, 731, 732, 733, 734, 735, 736, 737, 738,
+ 739, 740, 741, 742, 743, 744, 744, 745, 745, 746,
+ 746, 747, 747, 748, 749, 750, 751, 752, 753, 754,
+ 755, 756, 757, 758, 759, 760, 761, 762, 763, 764,
+ 765, 766, 767, 768, 769, 770, 771, 772, 773, 774,
+ 775, 775, 776, 777, 776, 779, 779, 781, 782, 783,
+ 784, 785, 786, 787, 788, 789, 790, 790, 791, 792,
+ 793, 794, 795, 796, 796, 798, 798, 803, 806, 808,
+ 812, 813, 814, 815, 819, 819, 822, 822, 825, 825,
+ 828, 828, 831, 831, 834, 834, 837, 837, 840, 840,
+ 846, 847, 848, 849, 853, 854, 855, 861, 862, 867,
+ 868, 867, 870, 875, 876, 881, 885, 886, 887, 891,
+ 892, 893, 898, 899, 904, 905, 906, 907, 908, 909,
+ 910, 911, 912, 913, 914, 915, 920, 921, 922, 923,
+ 924, 925, 926, 927, 928, 929, 933, 937, 938, 939,
+ 940, 941, 942, 943, 944, 945, 950, 951, 954, 956,
+ 960, 961, 962, 963, 967, 968, 973, 978, 983, 988,
+ 989, 988, 991, 995, 996, 1001, 1001, 1005, 1006, 1010,
+ 1010, 1016, 1017, 1018, 1022, 1023, 1027, 1028, 1033, 1037,
+ 1038, 1038, 1043, 1044, 1045, 1050, 1051, 1052, 1056, 1057,
+ 1058, 1063, 1064, 1068, 1069, 1074, 1075, 1075, 1079, 1080,
+ 1081, 1085, 1086, 1090, 1091, 1095, 1096, 1101, 1102, 1102,
+ 1103, 1108, 1109, 1113, 1114, 1115, 1116, 1117, 1118, 1119,
+ 1120, 1124, 1125, 1126, 1127, 1133, 1134, 1134, 1135, 1136,
+ 1137, 1138, 1143, 1144, 1145, 1150, 1151, 1152, 1153, 1154,
+ 1155, 1156, 1160, 1161, 1161, 1165, 1166
};
#endif
@@ -958,83 +993,122 @@ static const yytype_uint16 yyrline[] =
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "T_REQUIRE_ONCE", "T_REQUIRE", "T_EVAL",
- "T_INCLUDE_ONCE", "T_INCLUDE", "','", "T_LOGICAL_OR", "T_LOGICAL_XOR",
- "T_LOGICAL_AND", "T_PRINT", "'='", "T_SR_EQUAL", "T_SL_EQUAL",
- "T_XOR_EQUAL", "T_OR_EQUAL", "T_AND_EQUAL", "T_MOD_EQUAL",
- "T_CONCAT_EQUAL", "T_DIV_EQUAL", "T_MUL_EQUAL", "T_MINUS_EQUAL",
- "T_PLUS_EQUAL", "'?'", "':'", "T_BOOLEAN_OR", "T_BOOLEAN_AND", "'|'",
- "'^'", "'&'", "T_IS_NOT_IDENTICAL", "T_IS_IDENTICAL", "T_IS_NOT_EQUAL",
- "T_IS_EQUAL", "'<'", "'>'", "T_IS_GREATER_OR_EQUAL",
- "T_IS_SMALLER_OR_EQUAL", "T_SR", "T_SL", "'+'", "'-'", "'.'", "'*'",
- "'/'", "'%'", "'!'", "T_INSTANCEOF", "'~'", "'@'", "T_UNSET_CAST",
- "T_BOOL_CAST", "T_OBJECT_CAST", "T_ARRAY_CAST", "T_STRING_CAST",
- "T_DOUBLE_CAST", "T_INT_CAST", "T_DEC", "T_INC", "'['", "T_CLONE",
- "T_NEW", "T_EXIT", "T_IF", "T_ELSEIF", "T_ELSE", "T_ENDIF", "T_LNUMBER",
- "T_DNUMBER", "T_STRING", "T_STRING_VARNAME", "T_VARIABLE",
- "T_NUM_STRING", "T_INLINE_HTML", "T_CHARACTER", "T_BAD_CHARACTER",
- "T_ENCAPSED_AND_WHITESPACE", "T_CONSTANT_ENCAPSED_STRING", "T_ECHO",
- "T_DO", "T_WHILE", "T_ENDWHILE", "T_FOR", "T_ENDFOR", "T_FOREACH",
- "T_ENDFOREACH", "T_DECLARE", "T_ENDDECLARE", "T_AS", "T_SWITCH",
- "T_ENDSWITCH", "T_CASE", "T_DEFAULT", "T_BREAK", "T_CONTINUE", "T_GOTO",
- "T_FUNCTION", "T_CONST", "T_RETURN", "T_TRY", "T_CATCH", "T_THROW",
- "T_USE", "T_GLOBAL", "T_PUBLIC", "T_PROTECTED", "T_PRIVATE", "T_FINAL",
- "T_ABSTRACT", "T_STATIC", "T_VAR", "T_UNSET", "T_ISSET", "T_EMPTY",
- "T_HALT_COMPILER", "T_CLASS", "T_INTERFACE", "T_EXTENDS", "T_IMPLEMENTS",
- "T_OBJECT_OPERATOR", "T_DOUBLE_ARROW", "T_LIST", "T_ARRAY", "T_CLASS_C",
- "T_METHOD_C", "T_FUNC_C", "T_LINE", "T_FILE", "T_COMMENT",
- "T_DOC_COMMENT", "T_OPEN_TAG", "T_OPEN_TAG_WITH_ECHO", "T_CLOSE_TAG",
- "T_WHITESPACE", "T_START_HEREDOC", "T_END_HEREDOC",
- "T_DOLLAR_OPEN_CURLY_BRACES", "T_CURLY_OPEN", "T_PAAMAYIM_NEKUDOTAYIM",
- "T_NAMESPACE", "T_NS_C", "T_DIR", "T_NS_SEPARATOR", "'('", "')'", "';'",
- "'{'", "'}'", "'$'", "'`'", "'\"'", "']'", "$accept", "start",
- "top_statement_list", "$@1", "namespace_name", "top_statement", "$@2",
- "$@3", "use_declarations", "use_declaration", "constant_declaration",
- "inner_statement_list", "$@4", "inner_statement", "statement",
- "unticked_statement", "$@5", "$@6", "$@7", "$@8", "$@9", "$@10", "$@11",
- "$@12", "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "$@19", "$@20",
- "$@21", "$@22", "$@23", "$@24", "$@25", "$@26", "additional_catches",
- "non_empty_additional_catches", "additional_catch", "@27", "$@28",
- "unset_variables", "unset_variable", "function_declaration_statement",
- "class_declaration_statement", "is_reference",
- "unticked_function_declaration_statement", "$@29",
- "unticked_class_declaration_statement", "$@30", "$@31",
- "class_entry_type", "extends_from", "interface_entry",
- "interface_extends_list", "implements_list", "interface_list",
- "foreach_optional_arg", "foreach_variable", "for_statement",
- "foreach_statement", "declare_statement", "declare_list",
- "switch_case_list", "case_list", "$@32", "$@33", "case_separator",
- "while_statement", "elseif_list", "$@34", "new_elseif_list", "$@35",
- "else_single", "new_else_single", "parameter_list",
- "non_empty_parameter_list", "optional_class_type",
+ "\"end of file\"", "error", "$undefined",
+ "\"require_once (T_REQUIRE_ONCE)\"", "\"require (T_REQUIRE)\"",
+ "\"eval (T_EVAL)\"", "\"include_once (T_INCLUDE_ONCE)\"",
+ "\"include (T_INCLUDE)\"", "','", "\"or (T_LOGICAL_OR)\"",
+ "\"xor (T_LOGICAL_XOR)\"", "\"and (T_LOGICAL_AND)\"",
+ "\"print (T_PRINT)\"", "'='", "\">>= (T_SR_EQUAL)\"",
+ "\"<<= (T_SL_EQUAL)\"", "\"^= (T_XOR_EQUAL)\"", "\"|= (T_OR_EQUAL)\"",
+ "\"&= (T_AND_EQUAL)\"", "\"%= (T_MOD_EQUAL)\"",
+ "\".= (T_CONCAT_EQUAL)\"", "\"/= (T_DIV_EQUAL)\"",
+ "\"*= (T_MUL_EQUAL)\"", "\"-= (T_MINUS_EQUAL)\"",
+ "\"+= (T_PLUS_EQUAL)\"", "'?'", "':'", "\"|| (T_BOOLEAN_OR)\"",
+ "\"&& (T_BOOLEAN_AND)\"", "'|'", "'^'", "'&'",
+ "\"!== (T_IS_NOT_IDENTICAL)\"", "\"=== (T_IS_IDENTICAL)\"",
+ "\"!= (T_IS_NOT_EQUAL)\"", "\"== (T_IS_EQUAL)\"", "'<'", "'>'",
+ "\">= (T_IS_GREATER_OR_EQUAL)\"", "\"<= (T_IS_SMALLER_OR_EQUAL)\"",
+ "\">> (T_SR)\"", "\"<< (T_SL)\"", "'+'", "'-'", "'.'", "'*'", "'/'",
+ "'%'", "'!'", "\"instanceof (T_INSTANCEOF)\"", "'~'", "'@'",
+ "\"(unset) (T_UNSET_CAST)\"", "\"(bool) (T_BOOL_CAST)\"",
+ "\"(object) (T_OBJECT_CAST)\"", "\"(array) (T_ARRAY_CAST)\"",
+ "\"(string) (T_STRING_CAST)\"", "\"(double) (T_DOUBLE_CAST)\"",
+ "\"(int) (T_INT_CAST)\"", "\"-- (T_DEC)\"", "\"++ (T_INC)\"", "'['",
+ "\"clone (T_CLONE)\"", "\"new (T_NEW)\"", "\"exit (T_EXIT)\"",
+ "\"if (T_IF)\"", "\"elseif (T_ELSEIF)\"", "\"else (T_ELSE)\"",
+ "\"endif (T_ENDIF)\"", "\"integer number (T_LNUMBER)\"",
+ "\"floating-point number (T_DNUMBER)\"", "\"identifier (T_STRING)\"",
+ "\"variable name (T_STRING_VARNAME)\"", "\"variable (T_VARIABLE)\"",
+ "\"number (T_NUM_STRING)\"", "T_INLINE_HTML", "T_CHARACTER",
+ "T_BAD_CHARACTER",
+ "\"quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)\"",
+ "\"quoted-string (T_CONSTANT_ENCAPSED_STRING)\"", "\"echo (T_ECHO)\"",
+ "\"do (T_DO)\"", "\"while (T_WHILE)\"", "\"endwhile (T_ENDWHILE)\"",
+ "\"for (T_FOR)\"", "\"endfor (T_ENDFOR)\"", "\"foreach (T_FOREACH)\"",
+ "\"endforeach (T_ENDFOREACH)\"", "\"declare (T_DECLARE)\"",
+ "\"enddeclare (T_ENDDECLARE)\"", "\"as (T_AS)\"",
+ "\"switch (T_SWITCH)\"", "\"endswitch (T_ENDSWITCH)\"",
+ "\"case (T_CASE)\"", "\"default (T_DEFAULT)\"", "\"break (T_BREAK)\"",
+ "\"continue (T_CONTINUE)\"", "\"goto (T_GOTO)\"",
+ "\"function (T_FUNCTION)\"", "\"const (T_CONST)\"",
+ "\"return (T_RETURN)\"", "\"try (T_TRY)\"", "\"catch (T_CATCH)\"",
+ "\"throw (T_THROW)\"", "\"use (T_USE)\"", "\"insteadof (T_INSTEADOF)\"",
+ "\"global (T_GLOBAL)\"", "\"public (T_PUBLIC)\"",
+ "\"protected (T_PROTECTED)\"", "\"private (T_PRIVATE)\"",
+ "\"final (T_FINAL)\"", "\"abstract (T_ABSTRACT)\"",
+ "\"static (T_STATIC)\"", "\"var (T_VAR)\"", "\"unset (T_UNSET)\"",
+ "\"isset (T_ISSET)\"", "\"empty (T_EMPTY)\"",
+ "\"__halt_compiler (T_HALT_COMPILER)\"", "\"class (T_CLASS)\"",
+ "\"trait (T_TRAIT)\"", "\"interface (T_INTERFACE)\"",
+ "\"extends (T_EXTENDS)\"", "\"implements (T_IMPLEMENTS)\"",
+ "\"-> (T_OBJECT_OPERATOR)\"", "\"=> (T_DOUBLE_ARROW)\"",
+ "\"list (T_LIST)\"", "\"array (T_ARRAY)\"", "\"callable (T_CALLABLE)\"",
+ "\"__CLASS__ (T_CLASS_C)\"", "\"__TRAIT__ (T_TRAIT_C)\"",
+ "\"__METHOD__ (T_METHOD_C)\"", "\"__FUNCTION__ (T_FUNC_C)\"",
+ "\"__LINE__ (T_LINE)\"", "\"__FILE__ (T_FILE)\"",
+ "\"comment (T_COMMENT)\"", "\"doc comment (T_DOC_COMMENT)\"",
+ "\"open tag (T_OPEN_TAG)\"",
+ "\"open tag with echo (T_OPEN_TAG_WITH_ECHO)\"",
+ "\"close tag (T_CLOSE_TAG)\"", "\"whitespace (T_WHITESPACE)\"",
+ "\"heredoc start (T_START_HEREDOC)\"", "\"heredoc end (T_END_HEREDOC)\"",
+ "\"${ (T_DOLLAR_OPEN_CURLY_BRACES)\"", "\"{$ (T_CURLY_OPEN)\"",
+ "\":: (T_PAAMAYIM_NEKUDOTAYIM)\"", "\"namespace (T_NAMESPACE)\"",
+ "\"__NAMESPACE__ (T_NS_C)\"", "\"__DIR__ (T_DIR)\"",
+ "\"\\\\ (T_NS_SEPARATOR)\"", "'('", "')'", "';'", "'{'", "'}'", "'$'",
+ "']'", "'`'", "'\"'", "$accept", "start", "top_statement_list", "@1",
+ "namespace_name", "top_statement", "@2", "@3", "use_declarations",
+ "use_declaration", "constant_declaration", "inner_statement_list", "@4",
+ "inner_statement", "statement", "unticked_statement", "@5", "@6", "@7",
+ "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", "@16", "@17",
+ "@18", "@19", "@20", "@21", "@22", "@23", "@24", "@25", "@26",
+ "additional_catches", "non_empty_additional_catches", "additional_catch",
+ "@27", "@28", "unset_variables", "unset_variable",
+ "function_declaration_statement", "class_declaration_statement",
+ "is_reference", "unticked_function_declaration_statement", "@29",
+ "unticked_class_declaration_statement", "@30", "@31", "class_entry_type",
+ "extends_from", "interface_entry", "interface_extends_list",
+ "implements_list", "interface_list", "foreach_optional_arg",
+ "foreach_variable", "for_statement", "foreach_statement",
+ "declare_statement", "declare_list", "switch_case_list", "case_list",
+ "@32", "@33", "case_separator", "while_statement", "elseif_list", "@34",
+ "new_elseif_list", "@35", "else_single", "new_else_single",
+ "parameter_list", "non_empty_parameter_list", "optional_class_type",
"function_call_parameter_list", "non_empty_function_call_parameter_list",
"global_var_list", "global_var", "static_var_list",
- "class_statement_list", "class_statement", "$@36", "$@37", "method_body",
- "variable_modifiers", "method_modifiers", "non_empty_member_modifiers",
- "member_modifier", "class_variable_declaration",
- "class_constant_declaration", "echo_expr_list", "for_expr",
- "non_empty_for_expr", "$@38", "expr_without_variable", "$@39", "$@40",
- "$@41", "$@42", "$@43", "$@44", "$@45", "$@46", "$@47", "$@48", "$@49",
- "@50", "function", "lexical_vars", "lexical_var_list", "function_call",
- "$@51", "$@52", "$@53", "$@54", "$@55", "$@56", "$@57", "$@58",
- "class_name", "fully_qualified_class_name", "class_name_reference",
- "dynamic_class_name_reference", "$@59", "$@60",
+ "class_statement_list", "class_statement", "@36", "@37",
+ "trait_use_statement", "trait_list", "trait_adaptations",
+ "trait_adaptation_list", "non_empty_trait_adaptation_list",
+ "trait_adaptation_statement", "trait_precedence", "trait_reference_list",
+ "trait_method_reference", "trait_method_reference_fully_qualified",
+ "trait_alias", "trait_modifiers", "method_body", "variable_modifiers",
+ "method_modifiers", "non_empty_member_modifiers", "member_modifier",
+ "class_variable_declaration", "class_constant_declaration",
+ "echo_expr_list", "for_expr", "non_empty_for_expr", "@38",
+ "chaining_method_or_property", "chaining_dereference",
+ "chaining_instance_call", "@39", "instance_call", "@40", "new_expr",
+ "@41", "expr_without_variable", "@42", "@43", "@44", "@45", "@46", "@47",
+ "@48", "@49", "@50", "@51", "@52", "@53", "@54", "function",
+ "lexical_vars", "lexical_var_list", "function_call", "@55", "@56", "@57",
+ "@58", "@59", "@60", "@61", "@62", "class_name",
+ "fully_qualified_class_name", "class_name_reference",
+ "dynamic_class_name_reference", "@63", "@64",
"dynamic_class_name_variable_properties",
"dynamic_class_name_variable_property", "exit_expr", "backticks_expr",
"ctor_arguments", "common_scalar", "static_scalar",
"static_class_constant", "scalar", "static_array_pair_list",
"possible_comma", "non_empty_static_array_pair_list", "expr",
- "r_variable", "w_variable", "rw_variable", "variable", "$@61", "$@62",
- "variable_properties", "variable_property", "$@63", "method_or_not",
- "$@64", "variable_without_objects", "static_member",
- "variable_class_name", "base_variable_with_function_calls",
+ "r_variable", "w_variable", "rw_variable", "variable", "@65", "@66",
+ "variable_properties", "variable_property", "@67",
+ "array_method_dereference", "method", "@68", "method_or_not",
+ "variable_without_objects", "static_member", "variable_class_name",
+ "array_function_dereference", "@69", "base_variable_with_function_calls",
"base_variable", "reference_variable", "compound_variable", "dim_offset",
- "object_property", "$@65", "object_dim_list", "variable_name",
+ "object_property", "@70", "object_dim_list", "variable_name",
"simple_indirect_reference", "assignment_list",
- "assignment_list_element", "$@66", "array_pair_list",
- "non_empty_array_pair_list", "encaps_list", "encaps_var", "$@67",
+ "assignment_list_element", "@71", "array_pair_list",
+ "non_empty_array_pair_list", "encaps_list", "encaps_var", "@72",
"encaps_var_offset", "internal_functions_in_yacc", "isset_variables",
- "$@68", "class_constant", 0
+ "@73", "class_constant", 0
};
#endif
@@ -1057,61 +1131,66 @@ static const yytype_uint16 yytoknum[] =
346, 347, 348, 349, 350, 351, 352, 353, 354, 355,
356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
366, 367, 368, 369, 370, 371, 372, 373, 374, 375,
- 376, 377, 378, 379, 380, 40, 41, 59, 123, 125,
- 36, 96, 34, 93
+ 376, 377, 378, 379, 380, 381, 382, 383, 384, 40,
+ 41, 59, 123, 125, 36, 93, 96, 34
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 154, 155, 157, 156, 156, 158, 158, 159, 159,
- 159, 159, 159, 160, 159, 161, 159, 159, 159, 162,
- 162, 163, 163, 163, 163, 164, 164, 166, 165, 165,
- 167, 167, 167, 167, 168, 168, 169, 170, 171, 169,
- 172, 173, 169, 174, 175, 169, 176, 177, 169, 178,
- 179, 180, 169, 181, 169, 169, 169, 169, 169, 169,
- 169, 169, 169, 169, 169, 169, 169, 169, 182, 183,
- 169, 184, 185, 169, 186, 169, 169, 187, 188, 189,
- 190, 191, 169, 169, 169, 192, 192, 193, 193, 195,
- 196, 194, 197, 197, 198, 199, 200, 201, 201, 203,
- 202, 205, 204, 206, 204, 207, 207, 207, 208, 208,
- 209, 210, 210, 211, 211, 212, 212, 213, 213, 214,
- 214, 215, 215, 216, 216, 217, 217, 218, 218, 219,
- 219, 219, 219, 220, 221, 220, 222, 220, 223, 223,
- 224, 224, 225, 226, 225, 227, 228, 227, 229, 229,
- 230, 230, 231, 231, 232, 232, 232, 232, 232, 232,
- 232, 232, 233, 233, 233, 234, 234, 235, 235, 235,
- 235, 235, 235, 236, 236, 237, 237, 237, 238, 238,
- 238, 238, 239, 239, 241, 240, 240, 242, 240, 243,
- 243, 244, 244, 245, 245, 246, 246, 247, 247, 247,
- 247, 247, 247, 248, 248, 248, 248, 249, 249, 250,
- 250, 251, 251, 253, 252, 252, 255, 254, 254, 254,
- 256, 254, 257, 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 258, 254, 259, 254, 260, 254, 261, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
- 254, 254, 254, 254, 262, 263, 254, 264, 254, 254,
- 254, 254, 254, 254, 254, 254, 254, 254, 265, 254,
- 254, 254, 254, 254, 266, 254, 267, 268, 268, 269,
- 269, 269, 269, 271, 270, 272, 270, 273, 270, 274,
- 270, 275, 270, 276, 270, 277, 270, 278, 270, 279,
- 279, 279, 279, 280, 280, 280, 281, 281, 283, 284,
- 282, 282, 285, 285, 286, 287, 287, 287, 288, 288,
- 288, 289, 289, 290, 290, 290, 290, 290, 290, 290,
- 290, 290, 290, 290, 290, 291, 291, 291, 291, 291,
- 291, 291, 291, 292, 293, 293, 293, 293, 293, 293,
- 293, 293, 294, 294, 295, 295, 296, 296, 296, 296,
- 297, 297, 298, 299, 300, 302, 303, 301, 301, 304,
- 304, 306, 305, 308, 307, 307, 309, 309, 310, 310,
- 311, 312, 312, 313, 313, 313, 314, 314, 314, 315,
- 315, 316, 316, 317, 318, 317, 319, 319, 319, 320,
- 320, 321, 321, 322, 322, 323, 324, 323, 323, 325,
- 325, 326, 326, 326, 326, 326, 326, 326, 326, 327,
- 327, 327, 327, 328, 329, 328, 328, 328, 328, 328,
- 330, 330, 330, 331, 331, 331, 331, 331, 331, 331,
- 332, 333, 332, 334, 334
+ 0, 158, 159, 161, 160, 160, 162, 162, 163, 163,
+ 163, 163, 163, 164, 163, 165, 163, 163, 163, 166,
+ 166, 167, 167, 167, 167, 168, 168, 170, 169, 169,
+ 171, 171, 171, 171, 172, 172, 173, 174, 175, 173,
+ 176, 177, 173, 178, 179, 173, 180, 181, 173, 182,
+ 183, 184, 173, 185, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 186, 187,
+ 173, 188, 189, 173, 190, 173, 173, 191, 192, 193,
+ 194, 195, 173, 173, 173, 196, 196, 197, 197, 199,
+ 200, 198, 201, 201, 202, 203, 204, 205, 205, 207,
+ 206, 209, 208, 210, 208, 211, 211, 211, 211, 212,
+ 212, 213, 214, 214, 215, 215, 216, 216, 217, 217,
+ 218, 218, 219, 219, 220, 220, 221, 221, 222, 222,
+ 223, 223, 223, 223, 224, 225, 224, 226, 224, 227,
+ 227, 228, 228, 229, 230, 229, 231, 232, 231, 233,
+ 233, 234, 234, 235, 235, 236, 236, 236, 236, 236,
+ 236, 236, 236, 237, 237, 237, 237, 238, 238, 239,
+ 239, 239, 239, 239, 239, 240, 240, 241, 241, 241,
+ 242, 242, 242, 242, 243, 243, 245, 244, 244, 244,
+ 246, 244, 247, 248, 248, 249, 249, 250, 250, 251,
+ 251, 252, 252, 253, 254, 254, 255, 255, 256, 257,
+ 257, 258, 258, 259, 259, 260, 260, 261, 261, 262,
+ 262, 263, 263, 263, 263, 263, 263, 264, 264, 264,
+ 264, 265, 265, 266, 266, 267, 267, 269, 268, 268,
+ 270, 270, 271, 271, 273, 272, 272, 272, 274, 275,
+ 274, 277, 276, 279, 278, 278, 278, 280, 278, 278,
+ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
+ 278, 278, 278, 278, 278, 281, 278, 282, 278, 283,
+ 278, 284, 278, 278, 278, 278, 278, 278, 278, 278,
+ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
+ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278,
+ 285, 278, 286, 287, 278, 288, 278, 278, 278, 278,
+ 278, 278, 278, 278, 278, 278, 289, 278, 278, 278,
+ 278, 278, 278, 290, 278, 291, 278, 292, 293, 293,
+ 294, 294, 294, 294, 296, 295, 297, 295, 298, 295,
+ 299, 295, 300, 295, 301, 295, 302, 295, 303, 295,
+ 304, 304, 304, 304, 305, 305, 305, 306, 306, 308,
+ 309, 307, 307, 310, 310, 311, 312, 312, 312, 313,
+ 313, 313, 314, 314, 315, 315, 315, 315, 315, 315,
+ 315, 315, 315, 315, 315, 315, 316, 316, 316, 316,
+ 316, 316, 316, 316, 316, 316, 317, 318, 318, 318,
+ 318, 318, 318, 318, 318, 318, 319, 319, 320, 320,
+ 321, 321, 321, 321, 322, 322, 323, 324, 325, 327,
+ 328, 326, 326, 329, 329, 331, 330, 332, 332, 334,
+ 333, 335, 335, 335, 336, 336, 337, 337, 338, 339,
+ 340, 339, 341, 341, 341, 342, 342, 342, 343, 343,
+ 343, 344, 344, 345, 345, 346, 347, 346, 348, 348,
+ 348, 349, 349, 350, 350, 351, 351, 352, 353, 352,
+ 352, 354, 354, 355, 355, 355, 355, 355, 355, 355,
+ 355, 356, 356, 356, 356, 357, 358, 357, 357, 357,
+ 357, 357, 359, 359, 359, 360, 360, 360, 360, 360,
+ 360, 360, 361, 362, 361, 363, 363
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -1127,43 +1206,48 @@ static const yytype_uint8 yyr2[] =
10, 0, 0, 10, 0, 6, 1, 0, 0, 0,
0, 0, 18, 3, 3, 1, 0, 1, 2, 0,
0, 10, 1, 3, 1, 1, 1, 0, 1, 0,
- 10, 0, 8, 0, 7, 1, 2, 2, 0, 2,
- 1, 0, 2, 0, 2, 1, 3, 0, 2, 1,
- 2, 1, 4, 1, 4, 1, 4, 3, 5, 3,
- 4, 4, 5, 0, 0, 6, 0, 5, 1, 1,
- 1, 4, 0, 0, 7, 0, 0, 8, 0, 2,
- 0, 3, 1, 0, 2, 3, 5, 4, 4, 5,
- 7, 6, 0, 1, 1, 1, 0, 1, 1, 2,
- 3, 3, 4, 3, 1, 1, 2, 4, 3, 5,
- 1, 3, 2, 0, 0, 4, 2, 0, 9, 1,
- 3, 1, 1, 0, 1, 1, 2, 1, 1, 1,
- 1, 1, 1, 3, 5, 1, 3, 5, 4, 3,
- 1, 0, 1, 0, 4, 1, 0, 7, 3, 4,
- 0, 7, 0, 4, 2, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
- 0, 4, 0, 4, 0, 4, 0, 4, 3, 3,
+ 10, 0, 8, 0, 7, 1, 2, 1, 2, 0,
+ 2, 1, 0, 2, 0, 2, 1, 3, 0, 2,
+ 1, 2, 1, 4, 1, 4, 1, 4, 3, 5,
+ 3, 4, 4, 5, 0, 0, 6, 0, 5, 1,
+ 1, 1, 4, 0, 0, 7, 0, 0, 8, 0,
+ 2, 0, 3, 1, 0, 2, 3, 5, 4, 4,
+ 5, 7, 6, 0, 1, 1, 1, 1, 0, 1,
+ 1, 2, 3, 3, 4, 3, 1, 1, 2, 4,
+ 3, 5, 1, 3, 2, 0, 0, 4, 2, 1,
+ 0, 9, 3, 1, 3, 1, 3, 0, 1, 1,
+ 2, 2, 2, 3, 1, 3, 1, 1, 3, 4,
+ 3, 0, 1, 1, 3, 1, 1, 0, 1, 1,
+ 2, 1, 1, 1, 1, 1, 1, 3, 5, 1,
+ 3, 5, 4, 3, 1, 0, 1, 0, 4, 1,
+ 2, 1, 4, 3, 0, 3, 1, 1, 0, 0,
+ 2, 0, 4, 0, 7, 3, 4, 0, 7, 2,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 2, 2, 2, 2, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 0, 0, 7, 0, 5, 1,
- 2, 2, 2, 2, 2, 2, 2, 2, 0, 3,
- 1, 4, 3, 2, 0, 10, 1, 0, 4, 3,
- 4, 1, 2, 0, 5, 0, 7, 0, 6, 0,
- 7, 0, 7, 0, 7, 0, 7, 0, 5, 1,
- 1, 3, 2, 1, 3, 2, 1, 1, 0, 0,
- 6, 1, 2, 0, 2, 0, 2, 3, 0, 1,
- 1, 0, 3, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 3, 2, 1, 1, 3, 2, 2,
- 2, 4, 1, 3, 1, 1, 1, 3, 2, 1,
- 3, 3, 0, 2, 0, 1, 5, 3, 3, 1,
- 1, 1, 1, 1, 1, 0, 0, 7, 1, 2,
- 0, 0, 4, 0, 4, 0, 1, 2, 3, 3,
- 1, 1, 1, 1, 2, 1, 4, 4, 1, 1,
- 4, 0, 1, 1, 0, 2, 4, 4, 1, 1,
- 3, 1, 2, 3, 1, 1, 0, 5, 0, 0,
- 2, 5, 3, 3, 1, 6, 4, 4, 2, 2,
- 2, 1, 2, 1, 0, 5, 3, 3, 6, 3,
- 1, 1, 1, 4, 4, 2, 2, 4, 2, 2,
- 1, 0, 4, 3, 3
+ 3, 2, 2, 2, 2, 0, 4, 0, 4, 0,
+ 4, 0, 4, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 2, 2, 2, 2, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 1,
+ 0, 5, 0, 0, 7, 0, 5, 1, 2, 2,
+ 2, 2, 2, 2, 2, 2, 0, 3, 1, 4,
+ 3, 3, 2, 0, 10, 0, 11, 1, 0, 4,
+ 3, 4, 1, 2, 0, 5, 0, 7, 0, 6,
+ 0, 7, 0, 7, 0, 7, 0, 7, 0, 5,
+ 1, 1, 3, 2, 1, 3, 2, 1, 1, 0,
+ 0, 6, 1, 2, 0, 2, 0, 2, 3, 0,
+ 1, 1, 0, 3, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 3, 2, 1, 1, 3, 2,
+ 2, 2, 4, 3, 1, 1, 3, 1, 1, 1,
+ 3, 2, 1, 3, 3, 1, 0, 2, 0, 1,
+ 5, 3, 3, 1, 1, 1, 1, 1, 1, 0,
+ 0, 7, 1, 2, 0, 0, 4, 4, 4, 0,
+ 4, 1, 1, 0, 1, 2, 3, 3, 1, 4,
+ 0, 5, 1, 1, 1, 1, 2, 1, 4, 4,
+ 1, 1, 4, 0, 1, 1, 0, 2, 4, 4,
+ 1, 1, 3, 1, 2, 3, 1, 1, 0, 5,
+ 0, 0, 2, 5, 3, 3, 1, 6, 4, 4,
+ 2, 2, 2, 1, 2, 1, 0, 5, 3, 3,
+ 6, 3, 1, 1, 1, 4, 4, 2, 2, 4,
+ 2, 2, 1, 0, 4, 3, 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -1172,1383 +1256,1444 @@ static const yytype_uint8 yyr2[] =
static const yytype_uint16 yydefact[] =
{
5, 0, 3, 1, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 288, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 335, 0, 343,
- 344, 6, 364, 409, 65, 345, 0, 46, 0, 0,
- 0, 74, 0, 0, 0, 0, 296, 0, 0, 77,
- 0, 0, 0, 0, 0, 319, 0, 0, 0, 0,
- 105, 110, 0, 0, 349, 350, 351, 346, 347, 0,
- 0, 352, 348, 0, 0, 76, 29, 421, 338, 0,
- 366, 4, 0, 8, 34, 9, 10, 95, 96, 0,
- 0, 381, 97, 402, 0, 369, 290, 0, 380, 0,
- 382, 0, 405, 0, 388, 401, 403, 408, 0, 279,
- 365, 6, 319, 0, 97, 459, 458, 0, 456, 455,
- 293, 260, 261, 262, 263, 0, 286, 285, 284, 283,
- 282, 281, 280, 0, 0, 320, 0, 239, 384, 0,
- 237, 224, 0, 0, 320, 326, 222, 327, 0, 331,
- 403, 0, 0, 287, 0, 35, 0, 210, 0, 43,
- 211, 0, 0, 0, 55, 0, 57, 0, 0, 0,
- 59, 381, 0, 382, 0, 0, 0, 21, 0, 20,
- 175, 0, 0, 174, 107, 106, 180, 0, 0, 0,
- 0, 0, 216, 429, 443, 0, 354, 0, 0, 0,
- 441, 0, 15, 0, 368, 0, 27, 0, 339, 0,
- 340, 0, 0, 0, 303, 0, 18, 108, 103, 98,
- 0, 0, 244, 0, 246, 274, 240, 242, 0, 0,
+ 0, 0, 0, 0, 0, 326, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 481, 0, 0, 376, 0,
+ 384, 385, 6, 407, 461, 65, 386, 0, 46, 0,
+ 0, 0, 74, 0, 0, 0, 0, 337, 0, 0,
+ 77, 0, 0, 0, 0, 0, 360, 0, 0, 0,
+ 0, 105, 107, 111, 0, 0, 415, 390, 391, 392,
+ 387, 388, 0, 0, 393, 389, 0, 0, 76, 29,
+ 473, 379, 0, 409, 4, 0, 8, 34, 9, 10,
+ 95, 96, 0, 0, 309, 425, 97, 454, 0, 412,
+ 328, 0, 424, 0, 426, 0, 457, 0, 453, 432,
+ 452, 455, 460, 0, 317, 408, 6, 360, 0, 97,
+ 511, 510, 0, 508, 507, 332, 295, 296, 297, 298,
+ 0, 324, 323, 322, 321, 320, 319, 318, 360, 0,
+ 0, 361, 0, 274, 428, 0, 272, 0, 486, 0,
+ 418, 259, 0, 0, 361, 367, 251, 368, 0, 372,
+ 455, 0, 0, 325, 0, 35, 0, 234, 0, 43,
+ 235, 0, 0, 0, 55, 0, 57, 0, 0, 0,
+ 59, 425, 0, 426, 0, 0, 0, 21, 0, 20,
+ 177, 0, 0, 176, 108, 106, 182, 0, 97, 0,
+ 0, 0, 0, 253, 481, 495, 0, 395, 0, 0,
+ 0, 493, 0, 15, 0, 411, 309, 0, 27, 0,
+ 380, 0, 381, 0, 0, 0, 344, 0, 18, 109,
+ 103, 98, 0, 0, 0, 279, 0, 281, 312, 275,
+ 277, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 66, 238,
- 236, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 317, 0, 385, 411, 0, 422, 404,
- 0, 0, 289, 0, 322, 0, 0, 0, 322, 0,
- 341, 0, 328, 404, 336, 0, 0, 0, 64, 0,
- 0, 0, 212, 215, 381, 382, 0, 0, 56, 58,
+ 0, 66, 273, 271, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 358, 0, 463, 429,
+ 463, 0, 474, 456, 0, 0, 327, 0, 363, 0,
+ 0, 490, 427, 0, 330, 419, 482, 0, 363, 0,
+ 382, 0, 369, 456, 377, 0, 0, 0, 64, 0,
+ 0, 0, 236, 239, 425, 426, 0, 0, 56, 58,
84, 0, 60, 61, 29, 83, 23, 0, 0, 17,
- 0, 176, 382, 0, 62, 0, 0, 63, 0, 92,
- 94, 460, 0, 0, 0, 428, 0, 434, 0, 374,
- 444, 0, 353, 442, 364, 0, 0, 440, 371, 439,
- 367, 5, 12, 13, 307, 273, 36, 0, 0, 292,
- 370, 7, 166, 0, 0, 101, 111, 99, 294, 463,
- 398, 396, 0, 0, 248, 0, 277, 0, 0, 0,
- 249, 251, 250, 265, 264, 267, 266, 268, 270, 271,
- 269, 259, 258, 253, 254, 252, 255, 256, 257, 272,
- 0, 218, 235, 234, 233, 232, 231, 230, 229, 228,
- 227, 226, 225, 166, 464, 399, 0, 412, 0, 0,
- 457, 321, 0, 0, 321, 398, 166, 223, 399, 0,
- 337, 37, 209, 0, 0, 49, 213, 71, 68, 0,
- 0, 53, 0, 0, 0, 0, 0, 0, 356, 0,
- 355, 26, 362, 27, 0, 22, 19, 0, 173, 181,
- 178, 0, 0, 461, 453, 454, 11, 0, 425, 0,
- 424, 438, 383, 0, 291, 375, 430, 0, 446, 0,
- 447, 449, 305, 3, 5, 166, 0, 28, 30, 31,
- 32, 410, 0, 0, 165, 381, 382, 0, 0, 0,
- 323, 109, 113, 0, 0, 0, 162, 309, 311, 397,
- 245, 247, 0, 0, 241, 243, 0, 219, 0, 313,
- 315, 419, 0, 414, 386, 413, 418, 406, 407, 0,
- 329, 40, 0, 47, 44, 211, 0, 0, 0, 0,
- 0, 0, 0, 359, 360, 372, 0, 0, 358, 0,
- 0, 24, 177, 0, 93, 67, 0, 426, 428, 0,
- 0, 433, 0, 432, 450, 452, 451, 0, 0, 166,
- 16, 3, 0, 0, 169, 304, 0, 25, 0, 325,
- 0, 0, 112, 115, 183, 162, 164, 0, 152, 0,
- 163, 166, 166, 278, 275, 220, 318, 166, 166, 0,
- 415, 395, 411, 0, 342, 333, 29, 38, 0, 0,
- 0, 214, 117, 0, 117, 119, 127, 0, 29, 125,
- 75, 133, 133, 54, 379, 0, 374, 357, 363, 0,
- 179, 462, 428, 423, 0, 437, 436, 0, 445, 0,
- 0, 14, 308, 0, 0, 381, 382, 324, 114, 183,
- 0, 193, 0, 297, 162, 0, 154, 0, 0, 0,
- 341, 0, 0, 420, 393, 390, 0, 0, 330, 27,
- 142, 0, 29, 140, 45, 50, 0, 0, 120, 0,
- 0, 27, 133, 0, 133, 0, 0, 361, 375, 373,
- 78, 0, 217, 0, 431, 448, 306, 33, 172, 193,
- 116, 0, 197, 198, 199, 202, 201, 200, 192, 104,
- 182, 184, 0, 191, 195, 0, 0, 0, 0, 0,
- 155, 0, 310, 312, 276, 221, 314, 316, 166, 387,
- 416, 417, 0, 332, 145, 148, 0, 27, 211, 118,
- 72, 69, 128, 0, 0, 0, 0, 0, 0, 129,
- 378, 377, 0, 427, 435, 102, 0, 0, 97, 196,
- 0, 186, 29, 0, 29, 0, 158, 0, 157, 0,
- 0, 389, 334, 150, 0, 0, 39, 48, 0, 0,
- 0, 0, 126, 0, 131, 0, 138, 139, 136, 130,
- 0, 79, 0, 205, 0, 0, 0, 27, 0, 301,
- 0, 27, 159, 0, 156, 394, 391, 0, 0, 0,
- 0, 149, 141, 51, 29, 123, 73, 70, 132, 134,
- 29, 376, 0, 208, 0, 0, 185, 187, 0, 100,
- 302, 0, 298, 295, 0, 161, 395, 0, 29, 0,
- 0, 0, 27, 29, 27, 0, 206, 203, 0, 207,
- 0, 299, 160, 392, 0, 27, 42, 143, 29, 121,
- 52, 0, 27, 80, 0, 162, 300, 0, 0, 27,
- 124, 0, 204, 0, 146, 144, 0, 29, 0, 29,
- 122, 27, 189, 29, 188, 27, 81, 27, 86, 190,
- 0, 82, 85, 87, 0, 88, 89, 0, 0, 90,
- 0, 29, 27, 91
+ 0, 178, 426, 0, 62, 0, 0, 63, 0, 0,
+ 92, 94, 512, 0, 0, 0, 480, 0, 496, 0,
+ 394, 494, 407, 0, 0, 492, 414, 491, 410, 5,
+ 12, 13, 348, 310, 308, 36, 0, 0, 331, 413,
+ 7, 168, 0, 0, 101, 112, 99, 333, 463, 515,
+ 0, 446, 444, 0, 0, 0, 283, 0, 315, 0,
+ 0, 0, 284, 286, 285, 300, 299, 302, 301, 303,
+ 305, 306, 304, 294, 293, 288, 289, 287, 290, 291,
+ 292, 307, 0, 255, 270, 269, 268, 267, 266, 265,
+ 264, 263, 262, 261, 260, 168, 516, 447, 0, 464,
+ 0, 0, 0, 0, 509, 362, 471, 0, 485, 0,
+ 484, 362, 446, 168, 252, 447, 0, 378, 37, 233,
+ 0, 0, 49, 237, 71, 68, 0, 0, 53, 0,
+ 0, 416, 0, 405, 0, 0, 0, 397, 0, 396,
+ 26, 404, 27, 0, 22, 19, 0, 175, 183, 180,
+ 335, 0, 0, 513, 505, 506, 11, 0, 477, 0,
+ 476, 329, 0, 498, 0, 499, 501, 346, 3, 5,
+ 168, 248, 0, 28, 30, 31, 32, 462, 0, 0,
+ 167, 425, 426, 0, 0, 0, 364, 110, 114, 0,
+ 0, 0, 163, 0, 0, 352, 350, 445, 280, 282,
+ 0, 0, 276, 278, 0, 256, 0, 356, 354, 449,
+ 466, 430, 465, 470, 458, 459, 489, 488, 0, 0,
+ 370, 40, 0, 47, 44, 235, 0, 0, 0, 0,
+ 0, 0, 0, 400, 401, 423, 0, 418, 416, 0,
+ 0, 399, 0, 0, 24, 179, 0, 163, 93, 67,
+ 0, 478, 480, 0, 502, 504, 503, 0, 0, 168,
+ 16, 3, 0, 311, 0, 0, 171, 345, 0, 25,
+ 0, 366, 0, 0, 113, 116, 185, 163, 164, 165,
+ 0, 153, 0, 166, 451, 472, 168, 168, 316, 313,
+ 257, 359, 168, 168, 467, 443, 463, 0, 0, 483,
+ 383, 374, 29, 38, 0, 0, 0, 238, 118, 0,
+ 118, 120, 128, 0, 29, 126, 75, 134, 134, 54,
+ 0, 403, 419, 417, 0, 398, 406, 0, 181, 0,
+ 514, 480, 475, 0, 497, 0, 0, 14, 349, 463,
+ 0, 247, 246, 250, 241, 0, 0, 425, 426, 365,
+ 115, 185, 0, 217, 0, 338, 163, 0, 155, 0,
+ 0, 0, 382, 0, 0, 439, 442, 441, 434, 0,
+ 0, 487, 371, 27, 143, 0, 29, 141, 45, 50,
+ 0, 0, 121, 0, 0, 27, 134, 0, 134, 0,
+ 422, 421, 402, 78, 338, 0, 254, 500, 347, 0,
+ 435, 240, 463, 0, 33, 174, 217, 117, 0, 0,
+ 221, 222, 223, 226, 225, 224, 216, 104, 184, 189,
+ 186, 0, 215, 219, 0, 0, 0, 0, 0, 156,
+ 0, 353, 351, 314, 258, 357, 355, 168, 463, 463,
+ 431, 468, 469, 0, 373, 146, 149, 0, 27, 235,
+ 119, 72, 69, 129, 0, 0, 0, 0, 0, 0,
+ 130, 0, 0, 0, 479, 243, 443, 0, 245, 102,
+ 0, 0, 193, 0, 97, 220, 0, 188, 29, 0,
+ 29, 0, 159, 0, 158, 0, 0, 0, 433, 375,
+ 151, 0, 0, 39, 48, 0, 0, 0, 0, 127,
+ 0, 132, 0, 139, 140, 137, 131, 420, 79, 29,
+ 436, 242, 0, 0, 195, 197, 192, 229, 0, 0,
+ 0, 27, 0, 342, 0, 27, 160, 0, 157, 440,
+ 437, 438, 0, 0, 0, 0, 150, 142, 51, 29,
+ 124, 73, 70, 133, 135, 29, 0, 27, 232, 194,
+ 6, 0, 198, 199, 0, 0, 207, 0, 0, 0,
+ 0, 187, 190, 0, 100, 343, 0, 339, 334, 0,
+ 162, 0, 29, 0, 0, 0, 27, 29, 27, 0,
+ 336, 196, 200, 201, 211, 0, 202, 0, 230, 227,
+ 0, 231, 0, 340, 161, 0, 27, 42, 144, 29,
+ 122, 52, 0, 27, 80, 0, 210, 203, 204, 208,
+ 0, 163, 341, 0, 0, 27, 125, 0, 209, 0,
+ 228, 0, 147, 145, 0, 29, 205, 0, 29, 123,
+ 27, 213, 29, 191, 27, 81, 27, 86, 214, 0,
+ 82, 85, 87, 0, 88, 89, 0, 0, 90, 0,
+ 29, 27, 91
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 1, 2, 4, 80, 81, 474, 341, 178, 179,
- 82, 206, 347, 477, 805, 84, 522, 660, 596, 724,
- 290, 599, 158, 598, 525, 728, 831, 532, 528, 771,
- 527, 770, 162, 174, 742, 812, 861, 878, 881, 882,
- 883, 887, 890, 318, 319, 85, 86, 220, 87, 495,
- 88, 492, 356, 89, 355, 90, 494, 571, 572, 667,
- 604, 850, 806, 610, 430, 613, 673, 833, 810, 778,
- 664, 725, 858, 763, 869, 766, 799, 577, 578, 579,
- 483, 484, 182, 183, 187, 641, 700, 747, 838, 874,
- 701, 702, 703, 704, 784, 705, 156, 291, 292, 526,
- 91, 325, 650, 280, 368, 369, 363, 365, 367, 649,
- 502, 125, 496, 114, 708, 790, 93, 352, 559, 475,
- 581, 582, 587, 588, 403, 94, 580, 146, 147, 419,
- 595, 658, 723, 153, 209, 417, 95, 441, 442, 96,
- 615, 466, 616, 172, 98, 461, 99, 100, 406, 591,
- 719, 761, 826, 655, 718, 101, 102, 103, 104, 105,
- 106, 107, 408, 514, 590, 515, 516, 108, 459, 460,
- 622, 328, 329, 199, 200, 467, 557, 109, 322, 546,
- 110
+ -1, 1, 2, 4, 83, 84, 499, 359, 188, 189,
+ 85, 218, 366, 503, 870, 87, 552, 704, 632, 775,
+ 310, 635, 168, 634, 555, 779, 905, 562, 558, 828,
+ 557, 827, 172, 184, 792, 876, 947, 967, 970, 971,
+ 972, 976, 979, 339, 340, 88, 89, 232, 90, 521,
+ 91, 518, 375, 92, 374, 93, 520, 603, 604, 711,
+ 640, 931, 871, 646, 457, 649, 717, 907, 875, 835,
+ 708, 776, 944, 820, 958, 823, 864, 610, 611, 612,
+ 509, 510, 192, 193, 197, 683, 748, 803, 920, 749,
+ 801, 846, 881, 882, 883, 884, 937, 885, 886, 887,
+ 935, 963, 750, 751, 752, 753, 848, 754, 166, 311,
+ 312, 556, 671, 672, 673, 733, 593, 594, 94, 300,
+ 95, 346, 692, 390, 391, 385, 387, 501, 389, 691,
+ 530, 130, 522, 577, 119, 757, 854, 97, 371, 589,
+ 500, 617, 616, 623, 622, 425, 98, 613, 156, 157,
+ 446, 631, 702, 774, 163, 221, 444, 99, 565, 471,
+ 100, 566, 296, 567, 182, 102, 291, 103, 104, 431,
+ 625, 770, 674, 796, 696, 697, 767, 698, 105, 106,
+ 107, 108, 233, 109, 110, 111, 112, 430, 541, 624,
+ 542, 543, 113, 489, 490, 661, 149, 150, 210, 211,
+ 492, 587, 114, 343, 580, 115
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -563
+#define YYPACT_NINF -736
static const yytype_int16 yypact[] =
{
- -563, 73, 85, -563, 1470, 3756, 3756, -99, 3756, 3756,
- 3756, 3756, 3756, 3756, 3756, -563, 3756, 3756, 3756, 3756,
- 3756, 3756, 3756, 172, 172, 3756, 195, -91, -83, -563,
- -563, 44, -563, -563, -563, -563, 3756, -563, -55, 49,
- 60, -563, 74, 2359, 2486, 36, -563, 109, 2613, -563,
- 3756, 7, -36, 40, 90, 116, 76, 92, 99, 101,
- -563, -563, 144, 164, -563, -563, -563, -563, -563, 187,
- -10, -563, -563, 154, 3756, -563, -563, 87, 262, 268,
- -81, -563, 9, -563, -563, -563, -563, -563, -563, 220,
- 259, -563, 274, -563, 197, -563, -563, 4304, -563, 240,
- 1178, 203, -563, 212, 239, -563, -12, -563, 52, -563,
- -563, -563, -563, 222, 274, 4976, 4976, 3756, 4976, 4976,
- 5076, -563, -563, 321, -563, 3756, -563, -563, -563, -563,
- -563, -563, -563, 230, 154, 198, 273, -563, -563, 279,
- -563, -563, 264, 154, 319, 295, -563, -563, 325, 296,
- -35, 52, 2740, -563, 3756, -563, 12, 4976, 2232, -563,
- 3756, 3756, 324, 3756, -563, 4345, -563, 4386, 327, 458,
- -563, 328, 4976, 479, 329, 4427, 154, 54, 14, -563,
- -563, 138, 15, -563, -563, -563, 459, 16, 172, 172,
- 172, 332, -563, 2867, 127, 180, -563, 3883, 172, 234,
- -563, 154, -563, 243, -63, 4468, 330, 3756, 190, 333,
- 277, 190, 156, 409, -563, 410, -563, 366, -563, -563,
- -29, 35, -563, 3756, -563, 460, -563, -563, 3756, 3756,
- 3756, 3756, 3756, 3756, 3756, 3756, 3756, 3756, 3756, 3756,
- 3756, 3756, 3756, 3756, 3756, 3756, 3756, 195, -563, -563,
- -563, 2994, 3756, 3756, 3756, 3756, 3756, 3756, 3756, 3756,
- 3756, 3756, 3756, -563, 46, -563, 3756, 3756, 87, -30,
- 346, 4509, -563, 154, 252, 58, 111, 154, 319, 53,
- 362, 53, -563, -16, -563, 4550, 4591, 3756, -563, 426,
- 3756, 364, 501, 4976, 423, 1091, 446, 4632, -563, -563,
- -563, 926, -563, -563, -563, -563, 62, 448, 7, -563,
- 3756, -563, -563, -36, -563, 926, 449, -563, 8, -563,
- -563, -563, 24, 380, 383, 72, 172, 4837, 385, 524,
- -563, 463, -563, -563, 474, 411, 387, -563, -563, -563,
- 70, -563, -563, -563, -563, -563, -563, 1597, 4052, -563,
- -563, -563, 3121, 529, 5, -563, 429, -563, -563, 417,
- 418, -16, 52, 3756, 5053, 3756, -563, 3756, 3756, 3756,
- 2409, 2536, 2661, 2788, 2788, 2788, 2788, 1313, 1313, 1313,
- 1313, 512, 512, 339, 339, 339, 321, 321, 321, -563,
- -20, 5076, 5076, 5076, 5076, 5076, 5076, 5076, 5076, 5076,
- 5076, 5076, 5076, 3121, 420, 421, -13, 4976, 414, 4093,
- -563, 282, 417, 420, 319, -563, 3121, -563, -563, -13,
- -563, 544, 4976, 427, 4673, -563, -563, -563, -563, 558,
- 26, -563, 926, 926, 428, -45, 432, 154, -88, 439,
- -563, -563, -563, 433, 510, -563, -563, 4138, -563, -563,
- 570, 172, 447, -563, -563, -563, -563, 440, -563, 27,
- -563, -563, -563, 3248, -563, 3375, -563, 168, -563, 3756,
- -563, -563, -563, 451, -563, 3121, 450, -563, -563, -563,
- -563, -563, 172, 452, 588, 28, 80, 926, 462, 154,
- 319, -563, 482, 5, 456, 465, 210, -563, -563, -16,
- 5016, 5076, 3756, 4935, 5098, 5119, 195, -563, 461, -563,
- -563, -563, 3756, -563, -563, -6, -563, -563, -563, 466,
- -563, -563, 2232, -563, -563, 3756, 3756, 172, 160, 926,
- 537, 1724, -1, -563, -563, 926, 478, 154, -69, 545,
- 516, -563, -563, 926, -563, -563, 172, -563, 72, 606,
- 172, 4976, 172, 4878, -563, -563, -563, 470, 4011, 3121,
- -563, 475, 483, 484, -563, -563, 3502, -563, 154, 319,
- 5, 477, 620, -563, -563, 210, -563, 485, 627, 13,
- -563, 3121, 3121, 1283, -563, -563, -563, 3121, 3121, 4179,
- -563, 492, 3756, 3756, -563, -563, -563, -563, 3756, 1851,
- 493, 4976, 519, 172, 519, -563, -563, 629, -563, -563,
- -563, 497, 498, -563, 526, 500, 641, -61, -563, 505,
- -563, -563, 72, -563, 3756, -563, -563, 3629, -563, 502,
- 506, -563, -563, 509, 172, 30, 913, 319, 620, -563,
- 5, 615, 511, 555, 146, 599, 668, 538, 539, 3756,
- 362, 540, 541, -563, -563, -563, 530, 4220, 569, 291,
- -563, 4714, -563, -563, -563, -563, 160, 546, -563, 549,
- 926, 602, -563, 300, -563, 107, 926, -563, 926, -563,
- -563, 31, 5076, 172, 4976, -563, -563, -563, -563, 669,
- -563, 625, -563, -563, -563, -563, -563, -563, -563, -563,
- -563, -563, 601, 480, -563, 21, 556, 552, 561, 159,
- 690, 926, -563, -563, 1283, -563, -563, -563, 3121, 585,
- -563, -563, -13, -563, -563, 363, 565, 630, 3756, -563,
- -563, -563, -563, 568, 311, 571, 3756, 1, 227, -563,
- -563, 594, 5, -563, -563, -563, 704, 655, 274, -563,
- 658, -563, -563, 207, -563, 660, 717, 926, -563, 589,
- -13, -563, -563, 365, 592, 2232, -563, -563, 591, 596,
- 1978, 1978, -563, 597, -563, 4263, -563, -563, -563, -563,
- 926, -563, 926, 732, 22, 675, 734, 604, 677, -563,
- 33, 605, 735, 926, -563, -563, -563, 610, 725, 688,
- 3756, -563, -563, -563, -563, -563, -563, -563, -563, -563,
- -563, -563, 685, -563, 926, 687, -563, -563, 926, -563,
- -563, 238, -563, -563, 926, -563, 492, 3756, -563, 614,
- 4755, 2105, 676, -563, -27, 616, -563, 753, 626, -563,
- 699, -563, -563, -563, 4796, 705, -563, -563, -563, -563,
- -563, 636, 269, -563, 926, 210, -563, 758, 2232, 700,
- -563, 638, -563, 642, -563, -563, 640, -563, 286, -563,
- -563, 643, -563, -563, -563, 357, -563, 644, 692, -563,
- 645, -563, 692, -563, 5, -563, -563, 716, 650, -563,
- 649, -563, 651, -563
+ -736, 64, 80, -736, 1600, 3962, 3962, -83, 3962, 3962,
+ 3962, 3962, 3962, 3962, 3962, -736, 3962, 3962, 3962, 3962,
+ 3962, 3962, 3962, 171, 171, 2521, 3962, 187, -54, -52,
+ -736, -736, 76, -736, -736, -736, -736, 3962, -736, -44,
+ -36, 68, -736, 86, 2652, 2783, 57, -736, 82, 2914,
+ -736, 3962, -15, -13, 145, 153, -11, 100, 124, 152,
+ 168, -736, -736, -736, 185, 195, -736, -736, -736, -736,
+ -736, -736, 172, 127, -736, -736, 205, 3962, -736, -736,
+ 179, 178, 303, -66, -736, 11, -736, -736, -736, -736,
+ -736, -736, 282, 295, -736, -736, 338, 323, 252, -736,
+ -736, 4480, -736, 341, 1199, 249, -736, 261, 349, 292,
+ -736, -10, -736, 27, -736, -736, -736, 320, 287, 338,
+ 5120, 5120, 3962, 5120, 5120, 1452, -736, -736, 399, -736,
+ 3962, -736, -736, -736, -736, -736, -736, -736, -736, 296,
+ 205, -77, 306, -736, -736, 336, -736, 171, 1506, 302,
+ 456, -736, 334, 205, 340, 345, -736, -736, 347, 361,
+ -17, 27, 3045, -736, 3962, -736, 14, 5120, 2390, -736,
+ 3962, 3962, 346, 3962, -736, 4521, -736, 4562, 358, 485,
+ -736, 359, 5120, 1056, 362, 4605, 205, 98, 16, -736,
+ -736, -8, 18, -736, -736, -736, 487, 19, 338, 171,
+ 171, 171, 365, -736, 2521, 131, 63, -736, 4093, 171,
+ 290, -736, 205, -736, 260, -58, 366, 4646, 364, 3962,
+ 231, 367, 317, 231, 53, 450, -736, 455, -736, 416,
+ -736, -736, 5, 477, 45, -736, 3962, -736, 513, -736,
+ -736, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962,
+ 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962, 3962,
+ 187, -736, -736, -736, 3176, 3962, 3962, 3962, 3962, 3962,
+ 3962, 3962, 3962, 3962, 3962, 3962, -736, 170, 3962, -736,
+ 3962, 3962, 179, -27, 391, 4687, -736, 205, 281, 188,
+ 188, -736, -736, 3307, -736, 3438, -736, 205, 340, 39,
+ 392, 39, -736, -9, -736, 4730, 4772, 3962, -736, 461,
+ 3962, 393, 540, 5120, 460, 1219, 481, 4813, -736, -736,
+ -736, 1020, -736, -736, -736, -736, 162, 484, -15, -736,
+ 3962, -736, -736, -13, -736, 1020, 488, -736, 413, 30,
+ -736, -736, -736, 32, 414, 415, 143, 417, -736, 497,
+ -736, -736, 514, 1549, 425, -736, -736, -736, -50, -736,
+ -736, -736, -736, -736, -736, -736, 1731, 4226, -736, -736,
+ -736, 3569, 569, 148, -736, 462, -736, -736, 3962, 432,
+ 3962, 437, -9, 438, 27, 3962, 5197, 3962, -736, 3962,
+ 3962, 3962, 2571, 1582, 1373, 2700, 2700, 2700, 2700, 1288,
+ 1288, 1288, 1288, 568, 568, 61, 61, 61, 399, 399,
+ 399, -736, -16, 1452, 1452, 1452, 1452, 1452, 1452, 1452,
+ 1452, 1452, 1452, 1452, 1452, 3569, 432, 444, 446, 5120,
+ 443, 188, 447, 4267, -736, 319, -736, 171, 5120, 171,
+ 5020, 340, -736, 3569, -736, -736, 188, -736, 573, 5120,
+ 452, 4854, -736, -736, -736, -736, 590, 33, -736, 1020,
+ 1020, 1020, 457, -736, 25, 459, 205, -56, 464, -736,
+ -736, -736, 451, 549, -736, -736, 4308, -736, -736, 608,
+ -736, 171, 471, -736, -736, -736, -736, 475, -736, 34,
+ -736, -736, 221, -736, 3962, -736, -736, -736, 473, -736,
+ 3569, 159, 492, -736, -736, -736, -736, -736, 171, 480,
+ 634, 35, 210, 1020, 495, 205, 340, -736, 522, 148,
+ 494, 498, 235, 493, 4353, -736, -736, -9, 5160, 1452,
+ 3962, 5063, 5242, 5263, 187, -736, 499, -736, -736, -736,
+ -736, -736, 0, -736, -736, -736, -736, -736, 3700, 500,
+ -736, -736, 2390, -736, -736, 3962, 3962, 171, 2, 1020,
+ 583, 1863, -1, -736, -736, 531, 501, 652, 1020, 520,
+ 205, 118, 601, 572, -736, -736, 1020, 235, -736, -736,
+ 171, -736, 143, 662, -736, -736, -736, 521, 1418, 3569,
+ -736, 525, 530, -736, 206, 532, -736, -736, 3831, -736,
+ 205, 340, 148, 529, 675, -736, -736, 235, -736, -736,
+ 534, 677, 36, -736, -736, -736, 3569, 3569, 5220, -736,
+ -736, -736, 3569, 3569, -736, 537, 3962, 3962, 171, 5120,
+ -736, -736, -736, -736, 3962, 1995, 541, 5120, 574, 171,
+ 574, -736, -736, 680, -736, -736, -736, 545, 546, -736,
+ 1020, -736, 1020, -736, 550, 163, -736, 552, -736, 554,
+ -736, 143, -736, 3962, -736, 553, 557, -736, -736, 3962,
+ 188, 576, 225, -736, -736, 551, 171, 37, 1034, 340,
+ 675, -736, 148, 420, 559, 606, 182, 638, 700, 564,
+ 565, 3962, 392, 570, 571, -736, 657, 663, -736, 577,
+ 4394, -736, 600, 311, -736, 4896, -736, -736, -736, -736,
+ 2, 575, -736, 578, 1020, 640, -736, 328, -736, 310,
+ -736, 603, -736, -736, 606, 40, 1452, -736, -736, 580,
+ -736, -736, 3962, 576, -736, -736, 524, -736, 660, 148,
+ -736, -736, -736, -736, -736, -736, -736, -736, -736, -736,
+ -736, 320, 396, -736, 22, 581, 585, 605, 46, 745,
+ 1020, -736, -736, 5220, -736, -736, -736, 3569, 3962, 3962,
+ 576, -736, -736, 188, -736, -736, 395, 611, 681, 3962,
+ -736, -736, -736, -736, 612, 348, 615, 3962, 43, 313,
+ -736, 1020, 148, 618, -736, -736, 537, 619, 576, -736,
+ 754, 6, -736, 702, 338, -736, 706, -736, -736, 48,
+ -736, 707, 760, 1020, -736, 631, 627, 628, -736, -736,
+ 403, 635, 2390, -736, -736, 636, 641, 2127, 2127, -736,
+ 642, -736, 4437, -736, -736, -736, -736, -736, -736, -736,
+ -736, -736, 1020, 148, -736, 209, -736, 773, 24, 721,
+ 781, 643, 722, -736, 41, 644, 786, 1020, -736, -736,
+ -736, -736, 651, 775, 736, 3962, -736, -736, -736, -736,
+ -736, -736, -736, -736, -736, -736, 729, 653, -736, -736,
+ 715, 654, 209, -736, 658, 718, 705, 661, 671, 1020,
+ 743, -736, -736, 1020, -736, -736, 50, -736, -736, 1020,
+ -736, 3962, -736, 666, 4937, 2259, 731, -736, 294, 673,
+ -736, -736, -736, -736, 558, 148, -736, 750, -736, 811,
+ 682, -736, 756, -736, -736, 4978, 762, -736, -736, -736,
+ -736, -736, 684, 299, -736, 761, 766, 825, -736, -736,
+ 1020, 235, -736, 810, 2390, 753, -736, 688, -736, 148,
+ -736, 691, -736, -736, 692, -736, -736, 324, -736, -736,
+ 689, -736, -736, -736, 387, -736, 693, 742, -736, 696,
+ -736, 742, -736, 148, -736, -736, 776, 698, -736, 699,
+ -736, 697, -736
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -563, -563, -293, -563, -23, -563, -563, -563, -563, 491,
- -563, -264, -563, -563, 2, -563, -563, -563, -563, -563,
- -563, -563, -563, -563, -563, -563, -563, -563, -563, -563,
- -563, -563, -563, -563, -563, -563, -563, -563, -563, -563,
- -80, -563, -563, -563, 352, 457, 467, -109, -563, -563,
- -563, -563, -563, -563, -563, -563, -563, -563, 235, 202,
- 142, -563, 39, -563, -563, -563, -376, -563, -563, 37,
- -563, -563, -563, -563, -563, -563, -563, -562, -563, 175,
- -395, -563, -563, 503, -563, 183, -563, -563, -563, -563,
- -563, -563, -563, 120, -563, -563, -563, -510, -563, -563,
- -38, -563, -563, -563, -563, -563, -563, -563, -563, -563,
- -563, -563, -563, 0, -563, -563, -563, -563, -563, -563,
- -563, -563, -563, -563, -563, 551, -343, -229, -563, -563,
- -563, -563, -563, -563, -563, 174, -160, 278, -563, -563,
- -563, 209, -563, 657, 646, -463, 438, 820, -563, -563,
- -563, -563, -563, 3, -563, -207, -563, 86, -563, -19,
- -24, -563, 236, -407, -563, -563, -563, -17, 204, 287,
- -563, -563, -563, 389, 169, -563, -563, -563, -563, -563,
- -563
+ -736, -736, -328, -736, -23, -736, -736, -736, -736, 527,
+ -736, -250, -736, -736, 4, -736, -736, -736, -736, -736,
+ -736, -736, -736, -736, -736, -736, -736, -736, -736, -736,
+ -736, -736, -736, -736, -736, -736, -736, -736, -736, -736,
+ -119, -736, -736, -736, 372, 491, 496, -114, -736, -736,
+ -736, -736, -736, -736, -736, -736, -736, -736, 256, 220,
+ 151, -736, 44, -736, -736, -736, -367, -736, -736, 31,
+ -736, -736, -736, -736, -736, -736, -736, -570, -736, 181,
+ -415, -736, -736, 535, -736, 184, -736, -736, -736, -736,
+ -736, -736, -736, -736, -7, -736, -736, -736, -736, -736,
+ -736, -736, -736, -736, -736, -735, -736, -736, -736, -539,
+ -736, -736, 138, -736, -736, -736, -736, -736, 796, -736,
+ -26, -736, -736, -736, -736, -736, -736, -736, -736, -736,
+ -736, -736, -736, -736, -2, 150, -736, -736, -736, -736,
+ -736, -736, -736, -736, -736, -736, 12, -364, -249, -736,
+ -736, -736, -736, -736, -736, -736, 186, 579, 368, -736,
+ -736, 309, 312, -736, 734, 694, -419, 454, 765, -736,
+ -736, -736, -650, -736, -736, -736, -736, 84, -231, -736,
+ 137, -736, -736, -736, -21, -12, -736, -267, -434, -736,
+ -736, 13, 66, 222, 300, -736, 683, -736, 405, 203,
+ -736, -736, -736, -736, -736, -736
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -401
+#define YYTABLE_NINF -472
static const yytype_int16 yytable[] =
{
- 135, 135, 150, 144, 92, 270, 83, 149, 508, 151,
- 171, 491, 520, 642, 360, 600, 451, 215, 389, 564,
- 287, 519, 308, 313, 316, 611, 266, 776, 177, 750,
- 815, 266, 453, 536, 530, 548, -167, 180, -170, 548,
- 443, 821, 357, 506, 645, 266, 117, 203, 473, 266,
- 204, 111, -320, 33, 152, 592, 213, 405, 511, -320,
- 33, 111, 154, 213, 214, -137, -137, -137, 360, 405,
- 155, -322, 415, 3, 418, 213, 111, -322, 111, -321,
- 562, 213, 344, 213, 269, -2, 646, 625, -168, 626,
- 159, 112, 196, 251, 252, 253, 254, 255, 256, 257,
- 258, 259, 260, 261, 262, -400, 359, 168, 33, 139,
- 139, 274, 148, 267, 181, -397, 358, 404, 267, 33,
- 278, 133, -137, 294, 134, 33, 33, 283, -400, 412,
- 77, 33, 267, -396, 201, 512, 267, 77, 202, -384,
- -384, 440, 593, 111, 307, 33, 488, 612, 777, 489,
- 573, 176, 444, 306, 452, 440, 216, 184, 135, 288,
- 289, 309, 314, 317, 630, 135, 135, 135, 751, 816,
- 454, 688, 531, 549, -167, 135, -170, 743, 340, 822,
- 169, 561, 413, 112, 33, 77, 647, 648, 330, 186,
- 755, 603, 651, 652, 160, 457, 77, 361, 213, 513,
- 736, 737, 268, 77, 362, 161, 213, 185, 77, 111,
- -321, 33, 513, 133, 213, 472, 134, 111, 769, 163,
- 744, 188, 77, 150, 144, 111, -168, 573, 149, 194,
- 151, 111, 756, 33, 337, 207, 675, 189, 788, 554,
- 361, 555, 556, 111, 190, 33, 191, 362, 331, 112,
- 411, 361, 361, 194, 414, 361, 739, 361, 362, 362,
- 194, 77, 362, 194, 362, 195, 111, 139, 33, 840,
- 576, 112, 440, 440, 139, 139, 139, 585, 438, 133,
- 789, 111, 134, 112, 139, 177, 310, 488, 77, 192,
- 489, 217, 438, 863, 197, 198, 734, 690, 738, 249,
- 250, 133, 135, 135, 134, 219, 112, 194, 350, 193,
- 77, 841, 337, 133, 485, 762, 134, 332, 197, 198,
- 736, 737, 77, 759, 196, 197, 198, 440, 197, 198,
- 218, 490, 659, 148, 576, 194, 142, 221, 499, 143,
- 208, 194, 213, 214, 671, 77, 211, 92, 263, 478,
- 194, 488, 264, 796, 489, 337, -153, -41, -41, -41,
- 265, -135, -135, -135, 333, 485, 201, 135, 339, 440,
- 247, 338, 197, 198, 273, 440, 779, 333, 485, 339,
- 333, 339, 361, 440, 244, 245, 246, 213, 247, 362,
- 342, 343, 735, 736, 737, 361, 213, 344, 727, 781,
- 197, 198, 362, 773, 736, 737, 197, 198, 277, 438,
- 438, 139, 139, 275, 538, 197, 198, 282, -135, 276,
- 222, 223, 224, -147, -147, -147, 213, 472, 135, 764,
- 765, 797, 798, 872, 873, 279, 225, 485, 226, 227,
- 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
- 238, 239, 240, 241, 242, 243, 244, 245, 246, 135,
- 247, 137, 140, 213, 438, 281, 569, 210, 212, 296,
- 490, 301, 315, 490, 300, 302, 139, 304, 324, 346,
- 351, 353, 150, 144, 349, 354, 366, 149, 787, 151,
- 791, 358, 251, 252, 253, 254, 255, 256, 257, 258,
- 259, 260, 261, 262, 135, 135, 438, 416, 423, 426,
- 440, 425, 438, 427, 617, 513, 440, 429, 440, 445,
- 438, 485, 450, 135, 597, 135, 455, 135, 635, 135,
- 456, 464, 465, 609, 468, 469, 471, 139, -384, -384,
- 832, 886, 487, 485, 485, 637, 834, 490, 493, 485,
- 485, 440, 490, 513, 241, 242, 243, 244, 245, 246,
- 470, 247, 497, 498, 845, 509, 510, 517, 139, 852,
- 521, 529, 523, 535, 136, 136, 537, 145, -194, 539,
- 135, 541, 540, 543, 859, 547, 692, 693, 694, 695,
- 696, 697, 148, 449, 545, 563, 566, 440, 565, 135,
- 560, 663, 570, 871, 574, 875, 568, 586, 607, 877,
- 575, 135, 594, 139, 139, 332, 618, 490, 619, 624,
- 440, 490, 440, 628, 631, 639, 303, 892, 640, 632,
- 633, 643, 139, 440, 139, 644, 139, 654, 139, 785,
- 665, 666, 670, 135, 672, 674, 677, 438, 676, 678,
- 680, 685, 686, 438, 440, 438, 687, 706, 440, 707,
- 135, 97, 115, 116, 440, 118, 119, 120, 121, 122,
- 123, 124, 710, 126, 127, 128, 129, 130, 131, 132,
- 485, 711, 141, 720, 712, 713, 716, 717, 438, 139,
- 722, 733, 730, 157, 440, 731, 746, 753, 361, 46,
- 165, 167, 748, 757, 752, 362, 760, 175, 139, 754,
- 533, 534, 767, 768, 691, 772, 780, 782, 774, 490,
- 139, 692, 693, 694, 695, 696, 697, 698, 783, 786,
- 793, 205, 136, 792, 438, 795, 361, 800, 802, 136,
- 136, 136, 803, 362, 808, 814, 817, 818, 824, 136,
- 820, 828, 139, 819, 823, 827, 829, 438, 835, 438,
- 837, 846, 853, 851, 699, 567, 854, 801, 691, 139,
- 438, 855, 856, -151, 271, 692, 693, 694, 695, 696,
- 697, 698, 272, 860, 864, 866, 867, 870, 868, 888,
- 884, 438, 876, 879, 880, 438, 889, 891, 145, 446,
- 893, 438, 885, 544, 479, 638, 669, 606, 729, 285,
- 807, 286, 809, 614, 480, 97, 448, 293, 745, 709,
- 297, 620, 689, 749, 715, 679, 681, 311, 656, 843,
- 0, 438, 490, 849, 0, 623, 0, 0, 0, 0,
- 0, 0, 0, 138, 138, 0, 0, 0, 0, 0,
- 327, 0, 439, 0, 335, 0, 0, 0, 0, 0,
- 865, 490, 0, 0, 348, 0, 439, 0, 173, 0,
- 0, 0, 0, 0, 0, 0, 136, 136, 0, 0,
- 364, 0, 0, 0, 0, 370, 371, 372, 373, 374,
- 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
- 385, 386, 387, 388, 0, 0, 0, 0, 391, 392,
- 393, 394, 395, 396, 397, 398, 399, 400, 401, 402,
- 0, -171, 0, 407, 409, 0, 251, 252, 253, 254,
- 255, 256, 257, 258, 259, 260, 261, 262, 0, 0,
- 0, 136, 0, 0, 422, 0, 0, 424, 732, 0,
- 0, 0, 0, 0, 740, 0, 741, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 447, 432, 433,
- 0, 0, -384, -384, 0, 0, 0, 0, 0, 0,
- 0, 295, 0, 439, 439, 0, 0, 0, 0, 758,
- 0, 0, 0, 0, 0, 29, 30, 111, 0, 0,
- 0, 312, 136, 0, 97, 35, 0, 0, 320, 321,
- 323, 0, 0, 0, 0, 0, 0, 0, 336, 0,
- 500, 0, 501, 0, 503, 504, 505, 0, 0, 0,
- 0, 0, 0, 136, 0, 794, 0, 112, 439, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 434, 64, 65, 66, 67, 68, 0, 145, 811, -171,
- 813, 0, 435, 0, 0, 0, 0, 436, 71, 72,
- 437, 825, 0, 0, 0, 0, 0, 0, 136, 136,
- 439, 0, 0, 0, 0, 0, 439, 0, 0, 0,
- 0, 0, 836, 0, 439, 0, 839, 136, 0, 136,
- 0, 136, 842, 136, 251, 252, 253, 254, 255, 256,
- 257, 258, 259, 260, 261, 262, 0, 0, 0, 0,
- 551, 0, 553, 0, 0, 0, 558, 0, 0, 0,
- 0, 0, 862, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 458, 462, 0, 0, 0,
- -384, -384, 0, 0, 136, 0, 0, 0, 0, 583,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 589,
- 0, 0, 486, 136, 0, 0, 0, 0, 0, 97,
- 0, 428, 293, 601, 0, 136, 0, 0, 97, 0,
- 0, 251, 252, 253, 254, 255, 256, 257, 258, 259,
- 260, 261, 262, 0, 0, 0, 0, 0, 0, 0,
- 507, 0, 0, 0, 0, 0, 0, 136, 0, 0,
- 0, 439, 0, 486, 0, 0, 0, 439, 0, 439,
- 0, 0, 0, 0, 136, 0, 486, -384, -384, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 407,
- 657, 0, 0, 0, 0, 661, 97, 0, 0, 0,
- 0, 0, 439, 0, 0, 0, 0, 0, 0, 0,
- 0, 320, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 682, 0, 0, 684, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 486, 0, 0, 0, 0,
- 0, 0, 462, 0, 0, 0, 714, 0, 439, 0,
- 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
- 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
- 246, 439, 247, 439, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 439, 0, 0, 602, 605, -401,
- -401, -401, -401, 239, 240, 241, 242, 243, 244, 245,
- 246, 0, 247, 0, 0, 439, 621, 0, 458, 439,
- 462, 0, 462, 0, 0, 439, 0, 0, 0, 486,
- 0, 0, 0, 0, 0, 293, 636, 0, 0, 0,
- 0, 0, 0, 775, 0, 0, 0, 0, 0, 0,
- 0, 486, 486, 0, 0, 439, 0, 486, 486, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 97, 668, 0, 0, 0, 97, 97, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 458, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 462, 0, 0, 830, 0, 0,
+ 141, 141, 96, 381, 154, 284, 159, 659, 86, 517,
+ 536, 411, 550, 432, 843, 160, 636, 805, 546, 227,
+ 547, 731, 307, 181, 328, 647, 333, 336, 549, 187,
+ 806, 498, 890, 639, 280, 142, 142, 684, 481, 155,
+ 483, 560, 582, -169, 280, -172, 427, 534, 582, 896,
+ 214, 280, 280, 215, 198, 116, 116, 34, 381, 427,
+ 190, 626, 196, 116, 3, 34, 122, 687, 442, 833,
+ 445, 225, 226, 116, 472, 34, 376, 811, -361, 852,
+ -2, 922, 225, 226, 338, 592, -363, 47, -361, 596,
+ 225, 362, 225, 161, -362, 162, 138, 164, 225, 497,
+ 34, 283, 165, 569, 138, 169, 257, 258, 259, 688,
+ 260, 523, 34, 170, 138, 198, 379, 288, 34, 812,
+ 818, 853, -445, 923, 141, 281, 205, -448, 178, 139,
+ 298, 355, 140, 186, -448, 281, 205, 139, 80, -444,
+ 140, 191, 281, 281, 330, 314, 80, 139, 731, 303,
+ 140, 648, 627, 179, 377, 605, 80, 844, 845, 142,
+ 145, 145, 228, 326, 158, 308, 207, 329, 141, 334,
+ 337, 591, 309, 807, 666, 891, 141, 141, 141, 936,
+ 482, 282, 484, 561, 583, -169, 141, -172, 327, 358,
+ 794, 897, 348, 80, 834, 208, 209, 380, 116, 80,
+ 540, 689, 690, 142, 350, 208, 209, 693, 694, 701,
+ 369, 142, 142, 142, 116, 540, 34, 171, -170, 116,
+ -249, 142, 382, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 173, 730, 154, 605, 159,
+ 826, 426, 116, 34, 34, 205, 225, 383, 160, 199,
+ 206, 205, 473, 116, 349, 138, 220, 735, 116, 436,
+ 34, 34, -363, 194, 435, 382, 225, 669, 487, -428,
+ -428, 195, 155, 200, 441, 212, 116, 382, 382, 213,
+ 880, 719, -249, 138, 145, 620, 732, 382, 139, 382,
+ 428, 140, 584, 514, 585, 586, 515, 80, 467, 138,
+ 384, 201, 383, 428, 205, 187, 116, -362, 608, 609,
+ 225, 225, 467, 207, 208, 209, 139, 202, 737, 140,
+ 208, 209, 380, 141, 80, 80, 161, 514, 145, 670,
+ 515, 219, 152, 468, 203, 153, 145, 145, 145, 819,
+ 380, 80, 80, 384, 204, 511, 145, 468, -244, 785,
+ 516, 789, 815, 229, 514, 384, 384, 515, 142, 699,
+ -170, 608, 609, 205, 96, 384, 230, 384, 355, 231,
+ 504, 951, 527, 208, 209, 802, 205, -41, -41, -41,
+ 514, 223, 703, 515, -450, -154, -138, -138, -138, 141,
+ 205, -136, -136, -136, 715, 355, 234, 158, 276, 511,
+ 262, 263, 729, 787, 788, 277, 787, 788, 225, 351,
+ 278, 360, 361, 357, 141, 279, 141, 511, 47, 382,
+ 786, 787, 788, 351, 142, 357, 351, 357, 838, 225,
+ 362, 356, 208, 209, 382, 212, 467, 467, 467, 540,
+ 830, 787, 788, 571, 287, 208, 209, -138, 260, 142,
+ 289, 142, -136, -148, -148, -148, 778, 294, 141, 208,
+ 209, 821, 822, 790, 295, 797, 836, 225, 497, 862,
+ 863, 468, 468, 468, 511, 961, 962, 143, 146, 879,
+ 290, 888, 297, 145, 302, 141, 222, 224, 225, 299,
+ 467, 301, 601, 142, -218, 316, 516, 384, 321, 516,
+ 335, 816, 817, 740, 741, 742, 743, 744, 745, 320,
+ 322, 154, 384, 159, 324, 345, 363, 365, 888, 738,
+ 142, 370, 160, 368, 739, 468, 372, 740, 741, 742,
+ 743, 744, 745, 746, 141, 141, 467, 373, 378, 388,
+ 377, 443, 540, 450, 452, 467, 155, 655, 453, 145,
+ 454, 938, 456, 467, 516, 474, 633, 141, 851, 141,
+ 855, 479, 480, 511, 485, 645, 486, 491, 493, 142,
+ 142, 468, 677, 747, 145, 494, 145, 679, 496, 516,
+ 468, -471, 513, 519, 516, 956, 525, 526, 468, 877,
+ 511, 511, 142, 537, 142, 538, 511, 511, 539, 551,
+ 161, 553, 544, 559, 573, 141, 568, 570, 572, 975,
+ 254, 255, 256, 257, 258, 259, 141, 260, 145, 906,
+ 574, 576, 579, 738, 581, 908, 590, 467, 739, 467,
+ 597, 740, 741, 742, 743, 744, 745, 746, 141, 707,
+ 142, 595, 598, 600, 602, 145, 606, 607, 614, 621,
+ 630, 142, 926, 141, 643, 650, 651, 933, 382, 516,
+ 652, 350, 468, 516, 468, 740, 741, 742, 743, 744,
+ 745, 158, 656, 142, 657, 663, 664, 799, 667, 945,
+ 668, 681, 675, 682, 685, 686, 695, 141, 142, 470,
+ 849, 467, 709, 714, 145, 145, 716, 718, 710, 670,
+ 722, 723, 734, 478, 724, 960, 727, 728, 964, 755,
+ 756, 759, 966, 760, 761, 762, 516, 145, 768, 145,
+ 765, 766, 142, 773, 769, 781, 468, 791, 782, 784,
+ 981, 800, 771, 808, 809, 795, 384, 467, 101, 120,
+ 121, 511, 123, 124, 125, 126, 127, 128, 129, 804,
+ 131, 132, 133, 134, 135, 136, 137, 810, 813, 148,
+ 151, 382, 824, 829, 825, 145, 831, 842, 467, 516,
+ 839, 167, 468, 857, 841, 847, 145, 850, 175, 177,
+ 856, 859, 860, 861, 865, 185, 889, 867, 144, 144,
+ 467, 868, 892, 873, 893, 895, 894, 898, 145, 899,
+ 901, 902, 909, 468, 903, -206, 910, 911, 914, 913,
+ 915, 217, 916, 145, 183, 917, 919, 927, 932, 467,
+ 516, 939, 516, 934, 940, 468, 866, 563, 564, 942,
+ -152, 941, 948, 949, 467, 946, 952, -212, 954, 384,
+ 955, 957, 965, 959, 969, 973, 968, 145, 978, 977,
+ 982, 980, 974, 578, 468, 475, 285, 505, 680, 516,
+ 713, 780, 506, 874, 286, 736, 467, 758, 477, 468,
+ 467, 798, 872, 216, 793, 912, 467, 654, 764, 653,
+ 840, 599, 662, 725, 0, 331, 0, 347, 0, 0,
+ 0, 0, 516, 0, 0, 0, 305, 0, 306, 0,
+ 469, 468, 101, 0, 313, 468, 0, 317, 0, 930,
+ 0, 468, 292, 0, 469, 0, 0, 467, 516, 0,
+ 0, 0, 0, 0, 0, 0, 516, 642, 0, 0,
+ 0, 0, 0, 0, 0, 0, 315, 0, 148, 0,
+ 0, 0, 353, 0, 658, 0, 0, 0, 953, 0,
+ 516, 0, 468, 367, 0, 0, 332, 0, 0, 0,
+ 0, 0, 0, 0, 341, 342, 344, 0, 0, 0,
+ 386, 0, 0, 0, 354, 392, 393, 394, 395, 396,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, 409, 410, 0, 0, 0, 0, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 0, 0, 429, 0, 429, 433, 0, 0, 720, 0,
+ 721, 0, 0, 0, 0, 0, 0, 438, 0, 440,
+ 0, 0, 0, 0, 0, 0, 0, 0, 469, 469,
+ 469, 449, -173, 0, 451, 0, 0, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 0,
+ 0, 0, 459, 460, 476, 0, 0, 0, 0, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 461, 783, 0, 0, 0, 0, 0, 0, 30,
+ 31, 116, 469, -428, -428, 0, 0, 0, 0, 36,
+ 101, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 488, 429, 0, 524, -428, -428, 0, 0, 528,
+ 0, 529, 0, 531, 532, 533, 0, 0, 814, 0,
+ 0, 0, 138, 0, 0, 0, 512, 0, 469, 0,
+ 0, 0, 0, 0, 0, 0, 462, 469, 463, 67,
+ 68, 69, 70, 71, 0, 469, 0, 0, 0, 837,
+ 464, 0, 0, 0, 0, 465, 74, 75, 466, 0,
+ 0, 0, 0, 0, 0, 0, 0, 535, 0, 0,
+ 0, 858, 0, 0, -173, 0, 0, 0, 0, 0,
+ 512, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 292, 0, 292, 0, 0, 323, 512, 0,
+ 878, 0, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 900, 0, 0, 588, 469,
+ 0, 469, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 274, 275, 0, 0, 341, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 918, -428, -428,
+ 0, 921, 0, 0, 618, 512, 0, 924, 0, 0,
+ 0, 0, 0, 292, 0, 0, 0, 0, -428, -428,
+ 0, 0, 629, 0, 0, 0, 101, 0, 0, 313,
+ 637, 0, 0, 469, 0, 101, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 950, 455,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 638, 641, -472, -472, -472, -472, 252, 253,
+ 254, 255, 256, 257, 258, 259, 0, 260, 0, 469,
+ 0, 0, 0, 0, 0, 660, 0, 488, 0, 0,
+ 0, 0, 0, 0, 512, 0, 0, 0, 0, 0,
+ 429, 700, 0, 678, 0, 0, 0, 0, 705, 101,
+ 469, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 512, 512, 0, 0, 0, 0, 512, 512, 0,
+ 0, 0, 469, 292, 0, 0, 0, 726, 0, 0,
+ 0, 0, 0, 429, 712, 244, 245, 246, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 469, 260, 0, 0, 763, 488, 235, 236, 237,
+ 0, 0, 0, 0, 0, 0, 469, 0, 0, 0,
+ 0, 292, 0, 238, 0, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 429, 260, 469, 0,
+ 0, 0, 469, 0, 0, 641, 0, 238, 469, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 0, 260, 429, 429, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 313, 0, 235, 236, 237, 0, 469,
+ 0, 832, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 238, 512, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 0, 260, 101, 0, 235, 236,
+ 237, 101, 101, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 665, 238, 0, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 0, 260, 904,
0, 0, 0, 5, 6, 7, 8, 9, 0, 0,
- 0, 0, 10, 0, 844, 0, 605, 0, 97, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 462, 0, 0, 0, 0, 0, 0,
- 0, 0, 11, 12, 0, 97, 0, 0, 13, 0,
+ 0, 0, 10, 243, 244, 245, 246, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 293, 260, 0, 0, 0, 925, 0, 0, 0, 101,
+ 0, 0, 11, 12, 0, 0, 0, 0, 13, 0,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 0, 25, 26, 27, 28, 0, 0, 486, 29,
- 30, 31, 32, 33, 0, 34, 0, 0, 0, 35,
- 36, 37, 38, 0, 39, 0, 40, 0, 41, 0,
- 0, 42, 0, 0, 0, 43, 44, 45, 46, 47,
- 48, 49, 0, 50, 51, 52, 0, 0, 0, 53,
- 54, 55, 0, 56, 57, 58, 59, 60, 61, 0,
- 0, 0, 0, 62, 63, 64, 65, 66, 67, 68,
- 5, 6, 7, 8, 9, 0, 69, 0, 0, 10,
- 0, 70, 71, 72, 73, 74, 0, 75, 76, 0,
- 77, 78, 79, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
- 12, 0, 0, 0, 0, 13, 0, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 0, 25,
- 26, 27, 28, 0, 0, 0, 29, 30, 31, 32,
- 33, 0, 34, 0, 0, 0, 35, 36, 37, 38,
- 0, 39, 0, 40, 0, 41, 0, 0, 42, 0,
- 0, 0, 43, 44, 45, 46, 0, 48, 49, 0,
- 50, 0, 52, 0, 0, 0, 53, 54, 55, 0,
- 56, 57, 58, 476, 60, 61, 0, 0, 0, 0,
- 62, 63, 64, 65, 66, 67, 68, 5, 6, 7,
- 8, 9, 0, 69, 0, 0, 10, 0, 113, 71,
- 72, 73, 74, 0, 75, 76, 0, 77, 78, 79,
- 608, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 11, 12, 0, 0,
- 0, 0, 13, 0, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 0, 25, 26, 27, 28,
- 0, 0, 0, 29, 30, 31, 32, 33, 0, 34,
- 0, 0, 0, 35, 36, 37, 38, 0, 39, 0,
- 40, 0, 41, 0, 0, 42, 0, 0, 0, 43,
- 44, 45, 46, 0, 48, 49, 0, 50, 0, 52,
- 0, 0, 0, 0, 0, 55, 0, 56, 57, 58,
- 0, 0, 0, 0, 0, 0, 0, 62, 63, 64,
- 65, 66, 67, 68, 5, 6, 7, 8, 9, 0,
- 69, 0, 0, 10, 0, 113, 71, 72, 73, 74,
- 0, 75, 76, 0, 77, 78, 79, 662, 0, 0,
+ 24, 25, 26, 27, 28, 29, 0, 0, 0, 30,
+ 31, 32, 33, 34, 0, 35, 0, 0, 101, 36,
+ 37, 38, 39, 0, 40, 0, 41, 0, 42, 0,
+ 0, 43, 0, 0, 0, 44, 45, 46, 47, 48,
+ 49, 50, 495, 51, 52, 0, 53, 0, 0, 0,
+ 54, 55, 56, 0, 57, 58, 59, 60, 61, 62,
+ 63, 0, 0, 0, 0, 64, 65, 0, 66, 67,
+ 68, 69, 70, 71, 5, 6, 7, 8, 9, 0,
+ 72, 0, 0, 10, 0, 73, 74, 75, 76, 77,
+ 0, 78, 79, 0, 80, 0, 81, 82, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 11, 12, 0, 0, 0, 0, 13,
0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 0, 25, 26, 27, 28, 0, 0, 0,
- 29, 30, 31, 32, 33, 0, 34, 0, 0, 0,
- 35, 36, 37, 38, 0, 39, 0, 40, 0, 41,
- 0, 0, 42, 0, 0, 0, 43, 44, 45, 46,
- 0, 48, 49, 0, 50, 0, 52, 0, 0, 0,
- 0, 0, 55, 0, 56, 57, 58, 0, 0, 0,
- 0, 0, 0, 0, 62, 63, 64, 65, 66, 67,
- 68, 5, 6, 7, 8, 9, 0, 69, 0, 0,
- 10, 0, 113, 71, 72, 73, 74, 0, 75, 76,
- 0, 77, 78, 79, 804, 0, 0, 0, 0, 0,
+ 23, 24, 25, 26, 27, 28, 29, 0, 0, 0,
+ 30, 31, 32, 33, 34, 0, 35, 0, 0, 0,
+ 36, 37, 38, 39, 0, 40, 0, 41, 0, 42,
+ 0, 0, 43, 0, 0, 0, 44, 45, 46, 47,
+ 0, 49, 50, 0, 51, 0, 0, 53, 0, 0,
+ 0, 54, 55, 56, 0, 57, 58, 59, 502, 61,
+ 62, 63, 0, 0, 0, 0, 64, 65, 0, 66,
+ 67, 68, 69, 70, 71, 0, 5, 6, 7, 8,
+ 9, 72, 0, 0, 0, 10, 118, 74, 75, 76,
+ 77, 0, 78, 79, 0, 80, 0, 81, 82, 644,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 11, 12, 0, 0, 0, 0, 13, 0, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 0,
- 25, 26, 27, 28, 0, 0, 0, 29, 30, 31,
- 32, 33, 0, 34, 0, 0, 0, 35, 36, 37,
- 38, 0, 39, 0, 40, 0, 41, 0, 0, 42,
- 0, 0, 0, 43, 44, 45, 46, 0, 48, 49,
- 0, 50, 0, 52, 0, 0, 0, 0, 0, 55,
- 0, 56, 57, 58, 0, 0, 0, 0, 0, 0,
- 0, 62, 63, 64, 65, 66, 67, 68, 5, 6,
- 7, 8, 9, 0, 69, 0, 0, 10, 0, 113,
- 71, 72, 73, 74, 0, 75, 76, 0, 77, 78,
- 79, 848, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 11, 12, 0, 0, 0,
+ 0, 13, 0, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 0,
+ 0, 0, 30, 31, 32, 33, 34, 0, 35, 0,
+ 0, 0, 36, 37, 38, 39, 0, 40, 0, 41,
+ 0, 42, 0, 0, 43, 0, 0, 0, 44, 45,
+ 46, 47, 0, 49, 50, 0, 51, 0, 0, 53,
+ 0, 0, 0, 0, 0, 56, 0, 57, 58, 59,
+ 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
+ 0, 66, 67, 68, 69, 70, 71, 0, 5, 6,
+ 7, 8, 9, 72, 0, 0, 0, 10, 118, 74,
+ 75, 76, 77, 0, 78, 79, 0, 80, 0, 81,
+ 82, 706, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 11, 12, 0,
0, 0, 0, 13, 0, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 0, 25, 26, 27,
- 28, 0, 0, 0, 29, 30, 31, 32, 33, 0,
- 34, 0, 0, 0, 35, 36, 37, 38, 0, 39,
- 0, 40, 0, 41, 0, 0, 42, 0, 0, 0,
- 43, 44, 45, 46, 0, 48, 49, 0, 50, 0,
- 52, 0, 0, 0, 0, 0, 55, 0, 56, 57,
- 58, 0, 0, 0, 0, 0, 0, 0, 62, 63,
- 64, 65, 66, 67, 68, 5, 6, 7, 8, 9,
- 0, 69, 0, 0, 10, 0, 113, 71, 72, 73,
- 74, 0, 75, 76, 0, 77, 78, 79, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 11, 12, 0, 0, 0, 0,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 28, 0, 0,
- 0, 29, 30, 31, 32, 33, 0, 34, 0, 0,
- 0, 35, 36, 37, 38, 0, 39, 0, 40, 0,
- 41, 0, 0, 42, 0, 0, 0, 43, 44, 45,
- 46, 0, 48, 49, 0, 50, 0, 52, 0, 0,
- 0, 0, 0, 55, 0, 56, 57, 58, 0, 0,
- 0, 0, 0, 0, 0, 62, 63, 64, 65, 66,
- 67, 68, 5, 6, 7, 8, 9, 0, 69, 0,
- 0, 10, 0, 113, 71, 72, 73, 74, 0, 75,
- 76, 0, 77, 78, 79, 0, 0, 0, 0, 0,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 0, 0, 0, 30, 31, 32, 33, 34, 0,
+ 35, 0, 0, 0, 36, 37, 38, 39, 0, 40,
+ 0, 41, 0, 42, 0, 0, 43, 0, 0, 0,
+ 44, 45, 46, 47, 0, 49, 50, 0, 51, 0,
+ 0, 53, 0, 0, 0, 0, 0, 56, 0, 57,
+ 58, 59, 0, 0, 0, 0, 0, 0, 0, 0,
+ 64, 65, 0, 66, 67, 68, 69, 70, 71, 0,
+ 5, 6, 7, 8, 9, 72, 0, 0, 0, 10,
+ 118, 74, 75, 76, 77, 0, 78, 79, 0, 80,
+ 0, 81, 82, 869, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
+ 12, 0, 0, 0, 0, 13, 0, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 0, 0, 0, 30, 31, 32, 33,
+ 34, 0, 35, 0, 0, 0, 36, 37, 38, 39,
+ 0, 40, 0, 41, 0, 42, 0, 0, 43, 0,
+ 0, 0, 44, 45, 46, 47, 0, 49, 50, 0,
+ 51, 0, 0, 53, 0, 0, 0, 0, 0, 56,
+ 0, 57, 58, 59, 0, 0, 0, 0, 0, 0,
+ 0, 0, 64, 65, 0, 66, 67, 68, 69, 70,
+ 71, 0, 5, 6, 7, 8, 9, 72, 0, 0,
+ 0, 10, 118, 74, 75, 76, 77, 0, 78, 79,
+ 0, 80, 0, 81, 82, 929, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 11, 12, 0, 0, 0, 0, 13, 0, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 0, 25, 26, 27, 0, 0, 0, 0, 29, 30,
- 111, 32, 33, 0, 0, 0, 0, 0, 35, 229,
- 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 46, 247, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 112, 0, 0, 57, 58, 0, 0, 0, 0, 0,
- 0, 0, 62, 63, 64, 65, 66, 67, 68, 5,
- 6, 7, 8, 9, 0, 69, 0, 0, 10, 0,
- 113, 71, 72, 73, 74, 0, 164, 0, 0, 77,
- 78, 79, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 11, 12,
- 0, 0, 0, 0, 13, 0, 14, 15, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, 0, 25, 26,
- 27, 0, 0, 0, 0, 29, 30, 111, 32, 33,
- 0, 0, 0, 0, 0, 35, 0, 230, 231, 232,
- 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
- 243, 244, 245, 246, 46, 247, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 112, 0, 0,
- 57, 58, 0, 0, 0, 0, 0, 0, 0, 62,
- 63, 64, 65, 66, 67, 68, 5, 6, 7, 8,
- 9, 0, 69, 0, 0, 10, 0, 113, 71, 72,
- 73, 74, 0, 166, 0, 0, 77, 78, 79, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 11, 12, 0, 0, 0,
- 0, 13, 0, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 0, 25, 26, 27, 0, 0,
- 0, 0, 29, 30, 111, 32, 33, 0, 0, 0,
- 0, 0, 35, 231, 232, 233, 234, 235, 236, 237,
- 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
- 247, 46, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 112, 0, 0, 57, 58, 0,
- 0, 0, 0, 0, 0, 0, 62, 63, 64, 65,
- 66, 67, 68, 5, 6, 7, 8, 9, 0, 69,
- 0, 0, 10, 0, 113, 71, 72, 73, 74, 0,
- 170, 0, 0, 77, 78, 79, 0, 0, 0, 0,
+ 25, 26, 27, 28, 29, 0, 0, 0, 30, 31,
+ 32, 33, 34, 0, 35, 0, 0, 0, 36, 37,
+ 38, 39, 0, 40, 0, 41, 0, 42, 0, 0,
+ 43, 0, 0, 0, 44, 45, 46, 47, 0, 49,
+ 50, 0, 51, 0, 0, 53, 0, 0, 0, 0,
+ 0, 56, 0, 57, 58, 59, 0, 0, 0, 0,
+ 0, 0, 0, 0, 64, 65, 0, 66, 67, 68,
+ 69, 70, 71, 5, 6, 7, 8, 9, 0, 72,
+ 0, 0, 10, 0, 118, 74, 75, 76, 77, 0,
+ 78, 79, 0, 80, 0, 81, 82, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 11, 12, 0, 0, 0, 0, 13, 0,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 0, 25, 26, 27, 0, 0, 0, 0, 29,
- 30, 111, 32, 33, 0, 0, 0, 0, 0, 35,
- -401, -401, -401, -401, 235, 236, 237, 238, 239, 240,
- 241, 242, 243, 244, 245, 246, 0, 247, 46, 0,
+ 24, 25, 26, 27, 28, 29, 0, 0, 0, 30,
+ 31, 32, 33, 34, 0, 35, 0, 0, 0, 36,
+ 37, 38, 39, 0, 40, 0, 41, 0, 42, 0,
+ 0, 43, 0, 0, 0, 44, 45, 46, 47, 0,
+ 49, 50, 0, 51, 0, 0, 53, 0, 0, 0,
+ 0, 0, 56, 0, 57, 58, 59, 0, 0, 0,
+ 0, 0, 0, 0, 0, 64, 65, 0, 66, 67,
+ 68, 69, 70, 71, 5, 6, 7, 8, 9, 0,
+ 72, 0, 0, 10, 0, 118, 74, 75, 76, 77,
+ 0, 78, 79, 0, 80, 0, 81, 82, 0, 0,
+ 0, 0, 147, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 11, 12, 0, 0, 0, 0, 13,
+ 0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 0, 0, 0, 0,
+ 30, 31, 116, 33, 34, 0, 0, 0, 0, 0,
+ 36, 242, 243, 244, 245, 246, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 47,
+ 260, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 117, 0, 0, 58, 59, 0, 0,
+ 0, 0, 0, 0, 0, 0, 64, 65, 0, 66,
+ 67, 68, 69, 70, 71, 5, 6, 7, 8, 9,
+ 0, 72, 0, 0, 10, 0, 118, 74, 75, 76,
+ 77, 0, 0, 0, 0, 80, 0, 81, 82, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 112, 0, 0, 57, 58, 0, 0, 0, 0,
- 0, 0, 0, 62, 63, 64, 65, 66, 67, 68,
- 5, 6, 7, 8, 9, 0, 69, 0, 0, 10,
- 0, 113, 71, 72, 73, 74, 284, 0, 0, 0,
- 77, 78, 79, 0, 0, 0, 0, 0, 326, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
- 12, 0, 0, 0, 0, 13, 0, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 0, 25,
- 26, 27, 0, 0, 0, 0, 29, 30, 111, 32,
- 33, 0, 0, 0, 0, 0, 35, 0, 0, 0,
+ 0, 0, 0, 0, 11, 12, 0, 0, 0, 0,
+ 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 0, 0, 0,
+ 0, 30, 31, 116, 33, 34, 0, 0, 0, 0,
+ 0, 36, -472, -472, -472, -472, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
+ 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 117, 0, 0, 58, 59, 0,
+ 0, 0, 0, 0, 0, 0, 0, 64, 65, 0,
+ 66, 67, 68, 69, 70, 71, 5, 6, 7, 8,
+ 9, 0, 72, 0, 0, 10, 0, 118, 74, 75,
+ 76, 77, 0, 174, 0, 0, 80, 0, 81, 82,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 46, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 112, 0,
- 0, 57, 58, 0, 0, 0, 0, 0, 0, 0,
- 62, 63, 64, 65, 66, 67, 68, 5, 6, 7,
- 8, 9, 0, 69, 0, 0, 10, 0, 113, 71,
- 72, 73, 74, 0, 0, 0, 0, 77, 78, 79,
- 0, 0, 0, 0, 0, 390, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 11, 12, 0, 0, 0,
+ 0, 13, 0, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 27, 28, 0, 0,
+ 0, 0, 30, 31, 116, 33, 34, 0, 0, 0,
+ 0, 0, 36, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 47, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 117, 0, 0, 58, 59,
+ 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
+ 0, 66, 67, 68, 69, 70, 71, 5, 6, 7,
+ 8, 9, 0, 72, 0, 0, 10, 0, 118, 74,
+ 75, 76, 77, 0, 176, 0, 0, 80, 0, 81,
+ 82, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 11, 12, 0, 0,
0, 0, 13, 0, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 0, 25, 26, 27, 0,
- 0, 0, 0, 29, 30, 111, 32, 33, 0, 0,
- 0, 0, 0, 35, 0, 0, 0, 0, 0, 0,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 0,
+ 0, 0, 0, 30, 31, 116, 33, 34, 0, 0,
+ 0, 0, 0, 36, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 46, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 112, 0, 0, 57, 58,
- 0, 0, 0, 0, 0, 0, 0, 62, 63, 64,
- 65, 66, 67, 68, 5, 6, 7, 8, 9, 0,
- 69, 0, 0, 10, 0, 113, 71, 72, 73, 74,
- 0, 0, 0, 0, 77, 78, 79, 0, 0, 0,
- 0, 0, 482, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 11, 12, 0, 0, 0, 0, 13,
- 0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 23, 24, 0, 25, 26, 27, 0, 0, 0, 0,
- 29, 30, 111, 32, 33, 0, 0, 0, 0, 0,
- 35, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 46,
+ 0, 0, 47, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 117, 0, 0, 58,
+ 59, 0, 0, 0, 0, 0, 0, 0, 0, 64,
+ 65, 0, 66, 67, 68, 69, 70, 71, 5, 6,
+ 7, 8, 9, 0, 72, 0, 0, 10, 0, 118,
+ 74, 75, 76, 77, 0, 180, 0, 0, 80, 0,
+ 81, 82, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 11, 12, 0,
+ 0, 0, 0, 13, 0, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ 0, 0, 0, 0, 30, 31, 116, 33, 34, 0,
+ 0, 0, 0, 0, 36, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 112, 0, 0, 57, 58, 0, 0, 0,
- 0, 0, 0, 0, 62, 63, 64, 65, 66, 67,
- 68, 5, 6, 7, 8, 9, 0, 69, 0, 0,
- 10, 0, 113, 71, 72, 73, 74, 0, 0, 0,
- 0, 77, 78, 79, 0, 0, 0, 0, 0, 550,
+ 0, 0, 0, 47, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 117, 0, 0,
+ 58, 59, 0, 0, 0, 0, 0, 0, 0, 0,
+ 64, 65, 0, 66, 67, 68, 69, 70, 71, 5,
+ 6, 7, 8, 9, 0, 72, 0, 0, 10, 0,
+ 118, 74, 75, 76, 77, 304, 0, 0, 0, 80,
+ 0, 81, 82, 0, 0, 0, 0, 412, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 11, 12,
+ 0, 0, 0, 0, 13, 0, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 0, 0, 0, 0, 30, 31, 116, 33, 34,
+ 0, 0, 0, 0, 0, 36, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 11, 12, 0, 0, 0, 0, 13, 0, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 0,
- 25, 26, 27, 0, 0, 0, 0, 29, 30, 111,
- 32, 33, 0, 0, 0, 0, 0, 35, 0, 0,
+ 0, 0, 0, 0, 47, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 117, 0,
+ 0, 58, 59, 0, 0, 0, 0, 0, 0, 0,
+ 0, 64, 65, 0, 66, 67, 68, 69, 70, 71,
+ 5, 6, 7, 8, 9, 0, 72, 0, 0, 10,
+ 0, 118, 74, 75, 76, 77, 0, 0, 0, 0,
+ 80, 0, 81, 82, 0, 0, 0, 0, 437, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
+ 12, 0, 0, 0, 0, 13, 0, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 0, 0, 0, 0, 30, 31, 116, 33,
+ 34, 0, 0, 0, 0, 0, 36, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 46, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 112,
- 0, 0, 57, 58, 0, 0, 0, 0, 0, 0,
- 0, 62, 63, 64, 65, 66, 67, 68, 5, 6,
- 7, 8, 9, 0, 69, 0, 0, 10, 0, 113,
- 71, 72, 73, 74, 0, 0, 0, 0, 77, 78,
- 79, 0, 0, 0, 0, 0, 552, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 11, 12, 0,
- 0, 0, 0, 13, 0, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 0, 25, 26, 27,
- 0, 0, 0, 0, 29, 30, 111, 32, 33, 0,
- 0, 0, 0, 0, 35, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 47, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 117,
+ 0, 0, 58, 59, 0, 0, 0, 0, 0, 0,
+ 0, 0, 64, 65, 0, 66, 67, 68, 69, 70,
+ 71, 5, 6, 7, 8, 9, 0, 72, 0, 0,
+ 10, 0, 118, 74, 75, 76, 77, 0, 0, 0,
+ 0, 80, 0, 81, 82, 0, 0, 0, 0, 439,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 46, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 112, 0, 0, 57,
- 58, 0, 0, 0, 0, 0, 0, 0, 62, 63,
- 64, 65, 66, 67, 68, 5, 6, 7, 8, 9,
- 0, 69, 0, 0, 10, 0, 113, 71, 72, 73,
- 74, 0, 0, 0, 0, 77, 78, 79, 0, 0,
- 0, 0, 0, 634, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 11, 12, 0, 0, 0, 0,
- 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 0, 25, 26, 27, 0, 0, 0,
- 0, 29, 30, 111, 32, 33, 0, 0, 0, 0,
- 0, 35, 0, 0, 0, 0, 0, 0, 0, 0,
+ 11, 12, 0, 0, 0, 0, 13, 0, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 0, 0, 0, 0, 30, 31, 116,
+ 33, 34, 0, 0, 0, 0, 0, 36, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 47, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 46, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 112, 0, 0, 57, 58, 0, 0,
- 0, 0, 0, 0, 0, 62, 63, 64, 65, 66,
- 67, 68, 5, 6, 7, 8, 9, 0, 69, 0,
- 0, 10, 0, 113, 71, 72, 73, 74, 0, 0,
- 0, 0, 77, 78, 79, 0, 0, 0, 0, 0,
- 683, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 117, 0, 0, 58, 59, 0, 0, 0, 0, 0,
+ 0, 0, 0, 64, 65, 0, 66, 67, 68, 69,
+ 70, 71, 5, 6, 7, 8, 9, 0, 72, 0,
+ 0, 10, 0, 118, 74, 75, 76, 77, 0, 0,
+ 0, 0, 80, 0, 81, 82, 0, 0, 0, 0,
+ 508, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 11, 12, 0, 0, 0, 0, 13, 0, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 0, 25, 26, 27, 0, 0, 0, 0, 29, 30,
- 111, 32, 33, 0, 0, 0, 0, 0, 35, 0,
+ 25, 26, 27, 28, 0, 0, 0, 0, 30, 31,
+ 116, 33, 34, 0, 0, 0, 0, 0, 36, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 46, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 47, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 112, 0, 0, 57, 58, 0, 0, 0, 0, 0,
- 0, 0, 62, 63, 64, 65, 66, 67, 68, 5,
- 6, 7, 8, 9, 0, 69, 0, 0, 10, 0,
- 113, 71, 72, 73, 74, 0, 0, 0, 0, 77,
- 78, 79, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 11, 12,
- 0, 0, 0, 0, 13, 0, 14, 15, 16, 17,
- 18, 19, 20, 21, 22, 23, 24, 0, 25, 26,
- 27, 0, 0, 0, 0, 29, 30, 111, 32, 33,
- 0, 0, 0, 0, 0, 35, 0, 0, 0, 0,
+ 0, 117, 0, 0, 58, 59, 0, 0, 0, 0,
+ 0, 0, 0, 0, 64, 65, 0, 66, 67, 68,
+ 69, 70, 71, 5, 6, 7, 8, 9, 0, 72,
+ 0, 0, 10, 0, 118, 74, 75, 76, 77, 0,
+ 0, 0, 0, 80, 0, 81, 82, 0, 0, 0,
+ 0, 628, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 11, 12, 0, 0, 0, 0, 13, 0,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 0, 0, 0, 0, 30,
+ 31, 116, 33, 34, 0, 0, 0, 0, 0, 36,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 47, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 117, 0, 0, 58, 59, 0, 0, 0,
+ 0, 0, 0, 0, 0, 64, 65, 0, 66, 67,
+ 68, 69, 70, 71, 5, 6, 7, 8, 9, 0,
+ 72, 0, 0, 10, 0, 118, 74, 75, 76, 77,
+ 0, 0, 0, 0, 80, 0, 81, 82, 0, 0,
+ 0, 0, 676, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 11, 12, 0, 0, 0, 0, 13,
+ 0, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 0, 0, 0, 0,
+ 30, 31, 116, 33, 34, 0, 0, 0, 0, 0,
+ 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 117, 0, 0, 58, 59, 0, 0,
+ 0, 0, 0, 0, 0, 0, 64, 65, 0, 66,
+ 67, 68, 69, 70, 71, 5, 6, 7, 8, 9,
+ 0, 72, 0, 0, 10, 0, 118, 74, 75, 76,
+ 77, 0, 0, 0, 0, 80, 0, 81, 82, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 11, 12, 0, 0, 0, 0,
+ 13, 0, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 0, 0, 0,
+ 0, 30, 31, 116, 33, 34, 0, 0, 0, 0,
+ 0, 36, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 46, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 112, 0, 0,
- 57, 58, 0, 0, 0, 0, 0, 0, 0, 62,
- 63, 64, 65, 66, 67, 68, 5, 6, 7, 8,
- 9, 0, 69, 0, 0, 10, 0, 113, 71, 72,
- 73, 74, 0, 0, 0, 0, 77, 78, 79, 0,
+ 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 117, 0, 0, 58, 59, 0,
+ 0, 0, 0, 0, 0, 0, 0, 64, 65, 0,
+ 66, 67, 68, 69, 70, 71, 5, 6, 7, 8,
+ 9, 0, 72, 0, 0, 10, 0, 118, 74, 75,
+ 76, 77, 0, 0, 0, 0, 80, 0, 81, 82,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 11, 12, 0, 0, 0,
0, 13, 0, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 0, 25, 26, 27, 0, 0,
- 0, 0, 29, 30, 111, 334, 33, 0, 0, 0,
- 0, 0, 35, 0, 0, 0, 0, 0, 0, 0,
+ 21, 22, 23, 24, 25, 26, 27, 28, 0, 0,
+ 0, 0, 30, 31, 116, 352, 34, 0, 0, 0,
+ 0, 0, 36, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 46, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 112, 0, 0, 57, 58, 0,
- 0, 0, 0, 0, 0, 0, 62, 63, 64, 65,
- 66, 67, 68, 0, 0, 0, 0, 0, 0, 69,
- 222, 223, 224, 0, 113, 71, 72, 73, 74, 0,
- 0, 0, 0, 77, 78, 79, 225, 0, 226, 227,
- 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
- 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
- 247, 222, 223, 224, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 225, 0, 226,
- 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
- 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
- 0, 247, 222, 223, 224, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 225, 0,
- 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
- 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
- 246, 0, 247, 0, 0, 0, 0, 222, 223, 224,
+ 0, 47, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 117, 0, 0, 58, 59,
+ 0, 0, 0, 0, 0, 0, 0, 0, 64, 65,
+ 0, 66, 67, 68, 69, 70, 71, 0, 0, 0,
+ 0, 0, 0, 72, 0, 235, 236, 237, 118, 74,
+ 75, 76, 77, 0, 0, 0, 0, 80, 0, 81,
+ 82, 238, 0, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 0, 260, 235, 236, 237, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 225, 629, 226, 227, 228, 229, 230,
- 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
- 241, 242, 243, 244, 245, 246, 0, 247, 222, 223,
- 224, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 481, 0, 0, 225, 0, 226, 227, 228, 229,
- 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 0, 247, 222,
- 223, 224, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 518, 0, 0, 225, 0, 226, 227, 228,
- 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 0, 247,
- 0, 0, 222, 223, 224, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 542, 225, 776,
- 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
- 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
- 246, 0, 247, 222, 223, 224, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 653, 225,
- 0, 226, 227, 228, 229, 230, 231, 232, 233, 234,
- 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
- 245, 246, 0, 247, 222, 223, 224, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 721,
- 225, 0, 226, 227, 228, 229, 230, 231, 232, 233,
- 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
- 244, 245, 246, 0, 247, 222, 223, 224, 0, 0,
+ 0, 0, 238, 0, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 0, 260, 235, 236, 237,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 777, 225, 0, 226, 227, 228, 229, 230, 231, 232,
- 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
- 243, 244, 245, 246, 0, 247, 222, 223, 224, 0,
+ 0, 0, 0, 238, 0, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 0, 260, 0, 0,
+ 0, 0, 235, 236, 237, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 238, 507,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 0, 260, 235, 236, 237, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 238,
+ 545, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 0, 260, 0, 0, 235, 236, 237, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 248, 225, 0, 226, 227, 228, 229, 230, 231,
- 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
- 242, 243, 244, 245, 246, 0, 247, 222, 223, 224,
+ 0, 575, 238, 833, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 0, 260, 0, 0, 235,
+ 236, 237, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 238, 615, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
+ 235, 236, 237, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 238, 772, 239, 240,
+ 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 0,
+ 260, 235, 236, 237, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 238, 834, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 0, 260, 0, 0, 235, 236, 237, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 298, 225, 0, 226, 227, 228, 229, 230,
- 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
- 241, 242, 243, 244, 245, 246, 0, 247, 222, 223,
- 224, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 299, 225, 0, 226, 227, 228, 229,
- 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 0, 247, 222,
- 223, 224, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 305, 225, 0, 226, 227, 228,
- 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
- 239, 240, 241, 242, 243, 244, 245, 246, 0, 247,
- 222, 223, 224, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 345, 0, 225, 0, 226, 227,
- 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
- 238, 239, 240, 241, 242, 243, 244, 245, 246, 0,
- 247, 222, 223, 224, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 410, 0, 225, 0, 226,
- 227, 228, 229, 230, 231, 232, 233, 234, 235, 236,
- 237, 238, 239, 240, 241, 242, 243, 244, 245, 246,
- 0, 247, 222, 223, 224, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 420, 0, 225, 0,
- 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
- 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
- 246, 0, 247, 222, 223, 224, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 421, 0, 225,
- 0, 226, 227, 228, 229, 230, 231, 232, 233, 234,
- 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
- 245, 246, 0, 247, 222, 223, 224, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 431, 0,
- 225, 0, 226, 227, 228, 229, 230, 231, 232, 233,
- 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
- 244, 245, 246, 0, 247, 222, 223, 224, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 524,
- 0, 225, 0, 226, 227, 228, 229, 230, 231, 232,
- 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
- 243, 244, 245, 246, 0, 247, 222, 223, 224, 0,
+ 238, 261, 239, 240, 241, 242, 243, 244, 245, 246,
+ 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, 0, 260, 235, 236, 237, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 726, 0, 225, 0, 226, 227, 228, 229, 230, 231,
- 232, 233, 234, 235, 236, 237, 238, 239, 240, 241,
- 242, 243, 244, 245, 246, 0, 247, 222, 223, 224,
+ 0, 238, 318, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 0, 260, 235, 236, 237, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 847, 0, 225, 0, 226, 227, 228, 229, 230,
- 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
- 241, 242, 243, 244, 245, 246, 0, 247, 0, 0,
+ 0, 0, 238, 319, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 0, 260, 0, 0, 235,
+ 236, 237, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 238, 325, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
+ 0, 235, 236, 237, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 364, 238, 0, 239,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 0, 260, 235, 236, 237, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 434, 238, 0,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 0, 260, 235, 236, 237, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 238,
+ 447, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 0, 260, 0, 235, 236, 237, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 857, 0, 222, 223, 224, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 463,
- 225, 584, 226, 227, 228, 229, 230, 231, 232, 233,
- 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
- 244, 245, 246, 0, 247, 222, 223, 224, 0, 0,
+ 0, 238, 448, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 0, 260, 235, 236, 237, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 627, 225, 0, 226, 227, 228, 229, 230, 231, 232,
- 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
- 243, 244, 245, 246, 0, 247, 223, 224, 0, 0,
+ 0, 0, 238, 458, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 0, 260, 235, 236, 237,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 225, 0, 226, 227, 228, 229, 230, 231, 232,
- 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
- 243, 244, 245, 246, 224, 247, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 225, 0,
- 226, 227, 228, 229, 230, 231, 232, 233, 234, 235,
- 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
- 246, 225, 247, 226, 227, 228, 229, 230, 231, 232,
- 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
- 243, 244, 245, 246, 0, 247, 227, 228, 229, 230,
- 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
- 241, 242, 243, 244, 245, 246, 0, 247, 228, 229,
- 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 0, 247
+ 0, 0, 0, 238, 554, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, 0, 260, 0, 235,
+ 236, 237, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 238, 777, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
+ 0, 0, 235, 236, 237, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 928, 238, 619,
+ 239, 240, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 0, 260, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 943, 235,
+ 236, 237, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 548, 238, 0, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
+ 236, 237, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 238, 0, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 237, 260,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 238, 0, 239, 240, 241, 242, 243, 244,
+ 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 0, 260, 239, 240, 241,
+ 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 0, 260,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 0, 260, 241, 242, 243, 244, 245, 246, 247, 248,
+ 249, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, 0, 260
};
static const yytype_int16 yycheck[] =
{
- 23, 24, 26, 26, 4, 114, 4, 26, 403, 26,
- 48, 354, 419, 575, 221, 525, 8, 8, 247, 482,
- 8, 416, 8, 8, 8, 26, 61, 26, 51, 8,
- 8, 61, 8, 78, 8, 8, 8, 73, 8, 8,
- 304, 8, 71, 63, 31, 61, 145, 70, 341, 61,
- 73, 71, 140, 73, 145, 61, 144, 264, 71, 140,
- 73, 71, 145, 144, 145, 92, 93, 94, 275, 276,
- 26, 140, 279, 0, 281, 144, 71, 140, 71, 140,
- 475, 144, 145, 144, 108, 0, 73, 550, 8, 552,
- 145, 111, 137, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 140, 71, 71, 73, 23,
- 24, 134, 26, 148, 150, 145, 145, 71, 148, 73,
- 143, 141, 149, 161, 144, 73, 73, 151, 140, 71,
- 150, 73, 148, 145, 144, 148, 148, 150, 148, 59,
- 60, 301, 148, 71, 90, 73, 141, 148, 147, 144,
- 493, 144, 90, 176, 146, 315, 147, 117, 181, 147,
- 158, 147, 147, 147, 559, 188, 189, 190, 147, 147,
- 146, 634, 146, 146, 146, 198, 146, 146, 201, 146,
- 71, 474, 71, 111, 73, 150, 581, 582, 61, 73,
- 31, 31, 587, 588, 145, 123, 150, 221, 144, 406,
- 93, 94, 150, 150, 221, 145, 144, 117, 150, 71,
- 140, 73, 419, 141, 144, 145, 144, 71, 728, 145,
- 683, 145, 150, 247, 247, 71, 146, 570, 247, 73,
- 247, 71, 73, 73, 78, 148, 612, 145, 31, 71,
- 264, 73, 74, 71, 145, 73, 145, 264, 121, 111,
- 273, 275, 276, 73, 277, 279, 149, 281, 275, 276,
- 73, 150, 279, 73, 281, 78, 71, 181, 73, 31,
- 124, 111, 432, 433, 188, 189, 190, 506, 301, 141,
- 73, 71, 144, 111, 198, 308, 148, 141, 150, 145,
- 144, 71, 315, 855, 138, 139, 672, 640, 674, 59,
- 60, 141, 325, 326, 144, 31, 111, 73, 152, 145,
- 150, 73, 78, 141, 352, 722, 144, 137, 138, 139,
- 93, 94, 150, 718, 137, 138, 139, 487, 138, 139,
- 71, 354, 596, 247, 124, 73, 141, 140, 362, 144,
- 78, 73, 144, 145, 608, 150, 78, 347, 145, 347,
- 73, 141, 140, 760, 144, 78, 146, 66, 67, 68,
- 121, 92, 93, 94, 195, 403, 144, 390, 199, 529,
- 49, 137, 138, 139, 144, 535, 149, 208, 416, 210,
- 211, 212, 406, 543, 45, 46, 47, 144, 49, 406,
- 147, 148, 92, 93, 94, 419, 144, 145, 662, 742,
- 138, 139, 419, 92, 93, 94, 138, 139, 144, 432,
- 433, 325, 326, 140, 437, 138, 139, 121, 149, 140,
- 9, 10, 11, 66, 67, 68, 144, 145, 451, 66,
- 67, 66, 67, 147, 148, 140, 25, 475, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 482,
- 49, 23, 24, 144, 487, 140, 489, 78, 79, 145,
- 493, 13, 13, 496, 147, 147, 390, 148, 146, 149,
- 71, 71, 506, 506, 151, 119, 26, 506, 752, 506,
- 754, 145, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 527, 528, 529, 145, 82, 8,
- 670, 147, 535, 90, 537, 722, 676, 71, 678, 71,
- 543, 559, 73, 546, 522, 548, 146, 550, 566, 552,
- 147, 146, 8, 531, 71, 61, 149, 451, 59, 60,
- 804, 884, 13, 581, 582, 568, 810, 570, 119, 587,
- 588, 711, 575, 760, 42, 43, 44, 45, 46, 47,
- 149, 49, 145, 145, 828, 145, 145, 153, 482, 833,
- 26, 13, 145, 145, 23, 24, 144, 26, 98, 140,
- 603, 71, 149, 13, 848, 145, 106, 107, 108, 109,
- 110, 111, 506, 315, 147, 145, 8, 757, 146, 622,
- 149, 599, 120, 867, 148, 869, 144, 146, 71, 873,
- 145, 634, 146, 527, 528, 137, 71, 640, 102, 13,
- 780, 644, 782, 153, 149, 148, 147, 891, 8, 146,
- 146, 146, 546, 793, 548, 8, 550, 145, 552, 748,
- 147, 122, 13, 666, 147, 147, 146, 670, 122, 8,
- 145, 149, 146, 676, 814, 678, 147, 146, 818, 104,
- 683, 4, 5, 6, 824, 8, 9, 10, 11, 12,
- 13, 14, 73, 16, 17, 18, 19, 20, 21, 22,
- 718, 13, 25, 153, 146, 146, 146, 146, 711, 603,
- 121, 89, 146, 36, 854, 146, 71, 145, 722, 98,
- 43, 44, 702, 13, 148, 722, 121, 50, 622, 148,
- 432, 433, 147, 83, 99, 147, 122, 13, 147, 742,
- 634, 106, 107, 108, 109, 110, 111, 112, 73, 71,
- 13, 74, 181, 73, 757, 146, 760, 145, 147, 188,
- 189, 190, 146, 760, 147, 13, 71, 13, 13, 198,
- 73, 26, 666, 149, 149, 145, 68, 780, 73, 782,
- 73, 147, 146, 87, 149, 487, 13, 765, 99, 683,
- 793, 145, 73, 68, 117, 106, 107, 108, 109, 110,
- 111, 112, 125, 147, 26, 85, 148, 147, 146, 73,
- 145, 814, 149, 149, 102, 818, 146, 148, 247, 308,
- 149, 824, 882, 451, 347, 570, 604, 529, 666, 152,
- 771, 154, 775, 535, 347, 158, 313, 160, 149, 644,
- 163, 543, 639, 703, 650, 616, 622, 181, 592, 826,
- -1, 854, 855, 831, -1, 548, -1, -1, -1, -1,
- -1, -1, -1, 23, 24, -1, -1, -1, -1, -1,
- 193, -1, 301, -1, 197, -1, -1, -1, -1, -1,
- 858, 884, -1, -1, 207, -1, 315, -1, 48, -1,
- -1, -1, -1, -1, -1, -1, 325, 326, -1, -1,
- 223, -1, -1, -1, -1, 228, 229, 230, 231, 232,
- 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
- 243, 244, 245, 246, -1, -1, -1, -1, 251, 252,
- 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
- -1, 8, -1, 266, 267, -1, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, -1, -1,
- -1, 390, -1, -1, 287, -1, -1, 290, 670, -1,
- -1, -1, -1, -1, 676, -1, 678, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 310, 42, 43,
- -1, -1, 59, 60, -1, -1, -1, -1, -1, -1,
- -1, 161, -1, 432, 433, -1, -1, -1, -1, 711,
- -1, -1, -1, -1, -1, 69, 70, 71, -1, -1,
- -1, 181, 451, -1, 347, 79, -1, -1, 188, 189,
- 190, -1, -1, -1, -1, -1, -1, -1, 198, -1,
- 363, -1, 365, -1, 367, 368, 369, -1, -1, -1,
- -1, -1, -1, 482, -1, 757, -1, 111, 487, -1,
+ 23, 24, 4, 234, 27, 119, 27, 577, 4, 373,
+ 425, 260, 446, 280, 8, 27, 555, 752, 437, 8,
+ 439, 671, 8, 49, 8, 26, 8, 8, 443, 52,
+ 8, 359, 8, 31, 61, 23, 24, 607, 8, 27,
+ 8, 8, 8, 8, 61, 8, 277, 63, 8, 8,
+ 73, 61, 61, 76, 56, 71, 71, 73, 289, 290,
+ 73, 61, 73, 71, 0, 73, 149, 31, 299, 26,
+ 301, 148, 149, 71, 324, 73, 71, 31, 144, 31,
+ 0, 31, 148, 149, 198, 500, 144, 98, 144, 508,
+ 148, 149, 148, 27, 144, 149, 112, 149, 148, 149,
+ 73, 113, 26, 78, 112, 149, 45, 46, 47, 73,
+ 49, 378, 73, 149, 112, 117, 71, 140, 73, 73,
+ 770, 73, 149, 73, 147, 152, 73, 144, 71, 145,
+ 153, 78, 148, 148, 144, 152, 73, 145, 154, 149,
+ 148, 154, 152, 152, 152, 171, 154, 145, 798, 161,
+ 148, 152, 152, 71, 149, 519, 154, 151, 152, 147,
+ 23, 24, 151, 186, 27, 151, 141, 151, 191, 151,
+ 151, 499, 168, 151, 589, 151, 199, 200, 201, 914,
+ 150, 154, 150, 150, 150, 150, 209, 150, 90, 212,
+ 150, 150, 61, 154, 151, 142, 143, 152, 71, 154,
+ 431, 616, 617, 191, 141, 142, 143, 622, 623, 628,
+ 157, 199, 200, 201, 71, 446, 73, 149, 8, 71,
+ 61, 209, 234, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 149, 670, 260, 602, 260,
+ 779, 71, 71, 73, 73, 73, 148, 234, 260, 149,
+ 78, 73, 90, 71, 123, 112, 78, 676, 71, 71,
+ 73, 73, 144, 118, 287, 277, 148, 61, 125, 59,
+ 60, 118, 260, 149, 297, 148, 71, 289, 290, 152,
+ 71, 648, 123, 112, 147, 534, 61, 299, 145, 301,
+ 277, 148, 71, 145, 73, 74, 148, 154, 321, 112,
+ 234, 149, 289, 290, 73, 328, 71, 144, 126, 127,
+ 148, 148, 335, 141, 142, 143, 145, 149, 682, 148,
+ 142, 143, 152, 346, 154, 154, 260, 145, 191, 123,
+ 148, 152, 145, 321, 149, 148, 199, 200, 201, 773,
+ 152, 154, 154, 277, 149, 371, 209, 335, 123, 716,
+ 373, 718, 767, 71, 145, 289, 290, 148, 346, 626,
+ 150, 126, 127, 73, 366, 299, 71, 301, 78, 31,
+ 366, 941, 384, 142, 143, 739, 73, 66, 67, 68,
+ 145, 78, 632, 148, 61, 150, 92, 93, 94, 412,
+ 73, 92, 93, 94, 644, 78, 144, 260, 149, 425,
+ 59, 60, 669, 93, 94, 144, 93, 94, 148, 206,
+ 61, 151, 152, 210, 437, 123, 439, 443, 98, 431,
+ 92, 93, 94, 220, 412, 222, 223, 224, 792, 148,
+ 149, 141, 142, 143, 446, 148, 459, 460, 461, 670,
+ 92, 93, 94, 466, 148, 142, 143, 153, 49, 437,
+ 144, 439, 153, 66, 67, 68, 706, 155, 481, 142,
+ 143, 66, 67, 153, 8, 732, 153, 148, 149, 66,
+ 67, 459, 460, 461, 500, 151, 152, 23, 24, 843,
+ 144, 845, 148, 346, 123, 508, 81, 82, 148, 144,
+ 513, 144, 515, 481, 98, 149, 519, 431, 13, 522,
+ 13, 768, 769, 107, 108, 109, 110, 111, 112, 151,
+ 151, 534, 446, 534, 152, 150, 150, 153, 882, 99,
+ 508, 71, 534, 156, 104, 513, 71, 107, 108, 109,
+ 110, 111, 112, 113, 557, 558, 559, 121, 61, 26,
+ 149, 149, 773, 82, 151, 568, 534, 570, 8, 412,
+ 90, 915, 71, 576, 577, 71, 552, 580, 808, 582,
+ 810, 73, 149, 589, 150, 561, 151, 150, 71, 557,
+ 558, 559, 598, 153, 437, 61, 439, 600, 153, 602,
+ 568, 149, 13, 121, 607, 949, 149, 149, 576, 839,
+ 616, 617, 580, 149, 582, 149, 622, 623, 155, 26,
+ 534, 149, 155, 13, 153, 628, 149, 148, 144, 973,
+ 42, 43, 44, 45, 46, 47, 639, 49, 481, 869,
+ 71, 13, 151, 99, 149, 875, 153, 650, 104, 652,
+ 150, 107, 108, 109, 110, 111, 112, 113, 661, 635,
+ 628, 149, 8, 148, 122, 508, 152, 149, 155, 150,
+ 150, 639, 902, 676, 71, 124, 155, 907, 670, 682,
+ 8, 141, 650, 686, 652, 107, 108, 109, 110, 111,
+ 112, 534, 71, 661, 102, 13, 155, 153, 153, 929,
+ 150, 152, 150, 8, 150, 8, 149, 710, 676, 321,
+ 804, 714, 151, 13, 557, 558, 151, 151, 124, 123,
+ 150, 149, 151, 335, 150, 955, 153, 150, 958, 150,
+ 104, 73, 962, 13, 150, 150, 739, 580, 61, 582,
+ 150, 150, 710, 123, 61, 150, 714, 124, 150, 89,
+ 980, 71, 155, 152, 149, 155, 670, 760, 4, 5,
+ 6, 767, 8, 9, 10, 11, 12, 13, 14, 751,
+ 16, 17, 18, 19, 20, 21, 22, 152, 13, 25,
+ 26, 773, 151, 151, 83, 628, 151, 13, 791, 792,
+ 152, 37, 760, 13, 155, 73, 639, 71, 44, 45,
+ 73, 150, 155, 155, 149, 51, 13, 151, 23, 24,
+ 813, 150, 71, 151, 13, 73, 153, 153, 661, 13,
+ 149, 26, 73, 791, 68, 90, 153, 153, 90, 151,
+ 105, 77, 151, 676, 49, 144, 73, 151, 87, 842,
+ 843, 71, 845, 150, 13, 813, 822, 459, 460, 73,
+ 68, 149, 71, 8, 857, 151, 26, 71, 85, 773,
+ 152, 150, 153, 151, 102, 149, 153, 710, 150, 73,
+ 153, 152, 971, 481, 842, 328, 122, 366, 602, 882,
+ 640, 710, 366, 832, 130, 681, 889, 686, 333, 857,
+ 893, 733, 828, 77, 724, 882, 899, 568, 692, 567,
+ 796, 513, 582, 661, -1, 191, -1, 204, -1, -1,
+ -1, -1, 915, -1, -1, -1, 162, -1, 164, -1,
+ 321, 889, 168, -1, 170, 893, -1, 173, -1, 905,
+ -1, 899, 147, -1, 335, -1, -1, 940, 941, -1,
+ -1, -1, -1, -1, -1, -1, 949, 559, -1, -1,
+ -1, -1, -1, -1, -1, -1, 171, -1, 204, -1,
+ -1, -1, 208, -1, 576, -1, -1, -1, 944, -1,
+ 973, -1, 940, 219, -1, -1, 191, -1, -1, -1,
+ -1, -1, -1, -1, 199, 200, 201, -1, -1, -1,
+ 236, -1, -1, -1, 209, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, -1, -1, -1, -1, 264, 265,
+ 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ -1, -1, 278, -1, 280, 281, -1, -1, 650, -1,
+ 652, -1, -1, -1, -1, -1, -1, 293, -1, 295,
+ -1, -1, -1, -1, -1, -1, -1, -1, 459, 460,
+ 461, 307, 8, -1, 310, -1, -1, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, -1,
+ -1, -1, 42, 43, 330, -1, -1, -1, -1, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 61, 714, -1, -1, -1, -1, -1, -1, 69,
+ 70, 71, 513, 59, 60, -1, -1, -1, -1, 79,
+ 366, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 346, 378, -1, 380, 59, 60, -1, -1, 385,
+ -1, 387, -1, 389, 390, 391, -1, -1, 760, -1,
+ -1, -1, 112, -1, -1, -1, 371, -1, 559, -1,
+ -1, -1, -1, -1, -1, -1, 126, 568, 128, 129,
+ 130, 131, 132, 133, -1, 576, -1, -1, -1, 791,
+ 140, -1, -1, -1, -1, 145, 146, 147, 148, -1,
+ -1, -1, -1, -1, -1, -1, -1, 412, -1, -1,
+ -1, 813, -1, -1, 150, -1, -1, -1, -1, -1,
+ 425, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 437, -1, 439, -1, -1, 151, 443, -1,
+ 842, -1, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, -1, 857, -1, -1, 494, 650,
+ -1, 652, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, -1, -1, 481, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 889, 59, 60,
+ -1, 893, -1, -1, 530, 500, -1, 899, -1, -1,
+ -1, -1, -1, 508, -1, -1, -1, -1, 59, 60,
+ -1, -1, 548, -1, -1, -1, 552, -1, -1, 555,
+ 556, -1, -1, 714, -1, 561, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 940, 90,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 124, 125, 126, 127, 128, 129, -1, 506, 780, 146,
- 782, -1, 136, -1, -1, -1, -1, 141, 142, 143,
- 144, 793, -1, -1, -1, -1, -1, -1, 527, 528,
- 529, -1, -1, -1, -1, -1, 535, -1, -1, -1,
- -1, -1, 814, -1, 543, -1, 818, 546, -1, 548,
- -1, 550, 824, 552, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, -1, -1, -1, -1,
- 463, -1, 465, -1, -1, -1, 469, -1, -1, -1,
- -1, -1, 854, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 325, 326, -1, -1, -1,
- 59, 60, -1, -1, 603, -1, -1, -1, -1, 502,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 512,
- -1, -1, 352, 622, -1, -1, -1, -1, -1, 522,
- -1, 90, 525, 526, -1, 634, -1, -1, 531, -1,
- -1, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, -1, -1, -1, -1, -1, -1, -1,
- 390, -1, -1, -1, -1, -1, -1, 666, -1, -1,
- -1, 670, -1, 403, -1, -1, -1, 676, -1, 678,
- -1, -1, -1, -1, 683, -1, 416, 59, 60, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 592,
- 593, -1, -1, -1, -1, 598, 599, -1, -1, -1,
- -1, -1, 711, -1, -1, -1, -1, -1, -1, -1,
- -1, 451, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 624, -1, -1, 627, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 475, -1, -1, -1, -1,
- -1, -1, 482, -1, -1, -1, 649, -1, 757, -1,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 780, 49, 782, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 793, -1, -1, 527, 528, 36,
+ -1, -1, 557, 558, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, -1, 49, -1, 760,
+ -1, -1, -1, -1, -1, 580, -1, 582, -1, -1,
+ -1, -1, -1, -1, 589, -1, -1, -1, -1, -1,
+ 626, 627, -1, 598, -1, -1, -1, -1, 634, 635,
+ 791, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 616, 617, -1, -1, -1, -1, 622, 623, -1,
+ -1, -1, 813, 628, -1, -1, -1, 663, -1, -1,
+ -1, -1, -1, 669, 639, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, -1, -1, 814, 546, -1, 548, 818,
- 550, -1, 552, -1, -1, 824, -1, -1, -1, 559,
- -1, -1, -1, -1, -1, 728, 566, -1, -1, -1,
- -1, -1, -1, 736, -1, -1, -1, -1, -1, -1,
- -1, 581, 582, -1, -1, 854, -1, 587, 588, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 765, 603, -1, -1, -1, 770, 771, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 622, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 634, -1, -1, 800, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 47, 842, 49, -1, -1, 691, 661, 9, 10, 11,
+ -1, -1, -1, -1, -1, -1, 857, -1, -1, -1,
+ -1, 676, -1, 25, -1, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 732, 49, 889, -1,
+ -1, -1, 893, -1, -1, 710, -1, 25, 899, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ -1, 49, 768, 769, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 779, -1, 9, 10, 11, -1, 940,
+ -1, 787, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 25, 767, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, -1, 49, 822, -1, 9, 10,
+ 11, 827, 828, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 155, 25, -1, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, -1, 49, 865,
-1, -1, -1, 3, 4, 5, 6, 7, -1, -1,
- -1, -1, 12, -1, 827, -1, 666, -1, 831, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 683, -1, -1, -1, -1, -1, -1,
- -1, -1, 42, 43, -1, 858, -1, -1, 48, -1,
+ -1, -1, 12, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 124, 49, -1, -1, -1, 901, -1, -1, -1, 905,
+ -1, -1, 42, 43, -1, -1, -1, -1, 48, -1,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, -1, 62, 63, 64, 65, -1, -1, 718, 69,
- 70, 71, 72, 73, -1, 75, -1, -1, -1, 79,
+ 60, 61, 62, 63, 64, 65, -1, -1, -1, 69,
+ 70, 71, 72, 73, -1, 75, -1, -1, 944, 79,
80, 81, 82, -1, 84, -1, 86, -1, 88, -1,
-1, 91, -1, -1, -1, 95, 96, 97, 98, 99,
- 100, 101, -1, 103, 104, 105, -1, -1, -1, 109,
- 110, 111, -1, 113, 114, 115, 116, 117, 118, -1,
- -1, -1, -1, 123, 124, 125, 126, 127, 128, 129,
- 3, 4, 5, 6, 7, -1, 136, -1, -1, 12,
- -1, 141, 142, 143, 144, 145, -1, 147, 148, -1,
- 150, 151, 152, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 42,
- 43, -1, -1, -1, -1, 48, -1, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
- 63, 64, 65, -1, -1, -1, 69, 70, 71, 72,
- 73, -1, 75, -1, -1, -1, 79, 80, 81, 82,
- -1, 84, -1, 86, -1, 88, -1, -1, 91, -1,
- -1, -1, 95, 96, 97, 98, -1, 100, 101, -1,
- 103, -1, 105, -1, -1, -1, 109, 110, 111, -1,
- 113, 114, 115, 116, 117, 118, -1, -1, -1, -1,
- 123, 124, 125, 126, 127, 128, 129, 3, 4, 5,
- 6, 7, -1, 136, -1, -1, 12, -1, 141, 142,
- 143, 144, 145, -1, 147, 148, -1, 150, 151, 152,
- 26, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 42, 43, -1, -1,
- -1, -1, 48, -1, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, -1, 62, 63, 64, 65,
- -1, -1, -1, 69, 70, 71, 72, 73, -1, 75,
- -1, -1, -1, 79, 80, 81, 82, -1, 84, -1,
- 86, -1, 88, -1, -1, 91, -1, -1, -1, 95,
- 96, 97, 98, -1, 100, 101, -1, 103, -1, 105,
- -1, -1, -1, -1, -1, 111, -1, 113, 114, 115,
- -1, -1, -1, -1, -1, -1, -1, 123, 124, 125,
- 126, 127, 128, 129, 3, 4, 5, 6, 7, -1,
- 136, -1, -1, 12, -1, 141, 142, 143, 144, 145,
- -1, 147, 148, -1, 150, 151, 152, 26, -1, -1,
+ 100, 101, 153, 103, 104, -1, 106, -1, -1, -1,
+ 110, 111, 112, -1, 114, 115, 116, 117, 118, 119,
+ 120, -1, -1, -1, -1, 125, 126, -1, 128, 129,
+ 130, 131, 132, 133, 3, 4, 5, 6, 7, -1,
+ 140, -1, -1, 12, -1, 145, 146, 147, 148, 149,
+ -1, 151, 152, -1, 154, -1, 156, 157, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 42, 43, -1, -1, -1, -1, 48,
-1, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, -1, 62, 63, 64, 65, -1, -1, -1,
+ 59, 60, 61, 62, 63, 64, 65, -1, -1, -1,
69, 70, 71, 72, 73, -1, 75, -1, -1, -1,
79, 80, 81, 82, -1, 84, -1, 86, -1, 88,
-1, -1, 91, -1, -1, -1, 95, 96, 97, 98,
- -1, 100, 101, -1, 103, -1, 105, -1, -1, -1,
- -1, -1, 111, -1, 113, 114, 115, -1, -1, -1,
- -1, -1, -1, -1, 123, 124, 125, 126, 127, 128,
- 129, 3, 4, 5, 6, 7, -1, 136, -1, -1,
- 12, -1, 141, 142, 143, 144, 145, -1, 147, 148,
- -1, 150, 151, 152, 26, -1, -1, -1, -1, -1,
+ -1, 100, 101, -1, 103, -1, -1, 106, -1, -1,
+ -1, 110, 111, 112, -1, 114, 115, 116, 117, 118,
+ 119, 120, -1, -1, -1, -1, 125, 126, -1, 128,
+ 129, 130, 131, 132, 133, -1, 3, 4, 5, 6,
+ 7, 140, -1, -1, -1, 12, 145, 146, 147, 148,
+ 149, -1, 151, 152, -1, 154, -1, 156, 157, 26,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 42, 43, -1, -1, -1, -1, 48, -1, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
- 62, 63, 64, 65, -1, -1, -1, 69, 70, 71,
- 72, 73, -1, 75, -1, -1, -1, 79, 80, 81,
- 82, -1, 84, -1, 86, -1, 88, -1, -1, 91,
- -1, -1, -1, 95, 96, 97, 98, -1, 100, 101,
- -1, 103, -1, 105, -1, -1, -1, -1, -1, 111,
- -1, 113, 114, 115, -1, -1, -1, -1, -1, -1,
- -1, 123, 124, 125, 126, 127, 128, 129, 3, 4,
- 5, 6, 7, -1, 136, -1, -1, 12, -1, 141,
- 142, 143, 144, 145, -1, 147, 148, -1, 150, 151,
- 152, 26, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 42, 43, -1, -1, -1,
+ -1, 48, -1, 50, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 60, 61, 62, 63, 64, 65, -1,
+ -1, -1, 69, 70, 71, 72, 73, -1, 75, -1,
+ -1, -1, 79, 80, 81, 82, -1, 84, -1, 86,
+ -1, 88, -1, -1, 91, -1, -1, -1, 95, 96,
+ 97, 98, -1, 100, 101, -1, 103, -1, -1, 106,
+ -1, -1, -1, -1, -1, 112, -1, 114, 115, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, 125, 126,
+ -1, 128, 129, 130, 131, 132, 133, -1, 3, 4,
+ 5, 6, 7, 140, -1, -1, -1, 12, 145, 146,
+ 147, 148, 149, -1, 151, 152, -1, 154, -1, 156,
+ 157, 26, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 42, 43, -1,
-1, -1, -1, 48, -1, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, -1, -1, -1, 69, 70, 71, 72, 73, -1,
75, -1, -1, -1, 79, 80, 81, 82, -1, 84,
-1, 86, -1, 88, -1, -1, 91, -1, -1, -1,
95, 96, 97, 98, -1, 100, 101, -1, 103, -1,
- 105, -1, -1, -1, -1, -1, 111, -1, 113, 114,
- 115, -1, -1, -1, -1, -1, -1, -1, 123, 124,
- 125, 126, 127, 128, 129, 3, 4, 5, 6, 7,
- -1, 136, -1, -1, 12, -1, 141, 142, 143, 144,
- 145, -1, 147, 148, -1, 150, 151, 152, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 42, 43, -1, -1, -1, -1,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, 65, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, 75, -1, -1,
- -1, 79, 80, 81, 82, -1, 84, -1, 86, -1,
- 88, -1, -1, 91, -1, -1, -1, 95, 96, 97,
- 98, -1, 100, 101, -1, 103, -1, 105, -1, -1,
- -1, -1, -1, 111, -1, 113, 114, 115, -1, -1,
- -1, -1, -1, -1, -1, 123, 124, 125, 126, 127,
- 128, 129, 3, 4, 5, 6, 7, -1, 136, -1,
- -1, 12, -1, 141, 142, 143, 144, 145, -1, 147,
- 148, -1, 150, 151, 152, -1, -1, -1, -1, -1,
+ -1, 106, -1, -1, -1, -1, -1, 112, -1, 114,
+ 115, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ 125, 126, -1, 128, 129, 130, 131, 132, 133, -1,
+ 3, 4, 5, 6, 7, 140, -1, -1, -1, 12,
+ 145, 146, 147, 148, 149, -1, 151, 152, -1, 154,
+ -1, 156, 157, 26, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 42,
+ 43, -1, -1, -1, -1, 48, -1, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, -1, -1, -1, 69, 70, 71, 72,
+ 73, -1, 75, -1, -1, -1, 79, 80, 81, 82,
+ -1, 84, -1, 86, -1, 88, -1, -1, 91, -1,
+ -1, -1, 95, 96, 97, 98, -1, 100, 101, -1,
+ 103, -1, -1, 106, -1, -1, -1, -1, -1, 112,
+ -1, 114, 115, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, 125, 126, -1, 128, 129, 130, 131, 132,
+ 133, -1, 3, 4, 5, 6, 7, 140, -1, -1,
+ -1, 12, 145, 146, 147, 148, 149, -1, 151, 152,
+ -1, 154, -1, 156, 157, 26, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 42, 43, -1, -1, -1, -1, 48, -1, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- -1, 62, 63, 64, -1, -1, -1, -1, 69, 70,
- 71, 72, 73, -1, -1, -1, -1, -1, 79, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 98, 49, -1,
+ 61, 62, 63, 64, 65, -1, -1, -1, 69, 70,
+ 71, 72, 73, -1, 75, -1, -1, -1, 79, 80,
+ 81, 82, -1, 84, -1, 86, -1, 88, -1, -1,
+ 91, -1, -1, -1, 95, 96, 97, 98, -1, 100,
+ 101, -1, 103, -1, -1, 106, -1, -1, -1, -1,
+ -1, 112, -1, 114, 115, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, 125, 126, -1, 128, 129, 130,
+ 131, 132, 133, 3, 4, 5, 6, 7, -1, 140,
+ -1, -1, 12, -1, 145, 146, 147, 148, 149, -1,
+ 151, 152, -1, 154, -1, 156, 157, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 111, -1, -1, 114, 115, -1, -1, -1, -1, -1,
- -1, -1, 123, 124, 125, 126, 127, 128, 129, 3,
- 4, 5, 6, 7, -1, 136, -1, -1, 12, -1,
- 141, 142, 143, 144, 145, -1, 147, -1, -1, 150,
- 151, 152, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 42, 43,
- -1, -1, -1, -1, 48, -1, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, -1, 62, 63,
- 64, -1, -1, -1, -1, 69, 70, 71, 72, 73,
- -1, -1, -1, -1, -1, 79, -1, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 98, 49, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
- 114, 115, -1, -1, -1, -1, -1, -1, -1, 123,
- 124, 125, 126, 127, 128, 129, 3, 4, 5, 6,
- 7, -1, 136, -1, -1, 12, -1, 141, 142, 143,
- 144, 145, -1, 147, -1, -1, 150, 151, 152, -1,
+ -1, -1, 42, 43, -1, -1, -1, -1, 48, -1,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, -1, -1, -1, 69,
+ 70, 71, 72, 73, -1, 75, -1, -1, -1, 79,
+ 80, 81, 82, -1, 84, -1, 86, -1, 88, -1,
+ -1, 91, -1, -1, -1, 95, 96, 97, 98, -1,
+ 100, 101, -1, 103, -1, -1, 106, -1, -1, -1,
+ -1, -1, 112, -1, 114, 115, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, 125, 126, -1, 128, 129,
+ 130, 131, 132, 133, 3, 4, 5, 6, 7, -1,
+ 140, -1, -1, 12, -1, 145, 146, 147, 148, 149,
+ -1, 151, 152, -1, 154, -1, 156, 157, -1, -1,
+ -1, -1, 31, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 42, 43, -1, -1, -1, -1, 48,
+ -1, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, -1, -1, -1, -1,
+ 69, 70, 71, 72, 73, -1, -1, -1, -1, -1,
+ 79, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 98,
+ 49, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 112, -1, -1, 115, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, 125, 126, -1, 128,
+ 129, 130, 131, 132, 133, 3, 4, 5, 6, 7,
+ -1, 140, -1, -1, 12, -1, 145, 146, 147, 148,
+ 149, -1, -1, -1, -1, 154, -1, 156, 157, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 42, 43, -1, -1, -1, -1,
+ 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, -1, -1, -1,
+ -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
+ -1, 79, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
+ 98, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 112, -1, -1, 115, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, 125, 126, -1,
+ 128, 129, 130, 131, 132, 133, 3, 4, 5, 6,
+ 7, -1, 140, -1, -1, 12, -1, 145, 146, 147,
+ 148, 149, -1, 151, -1, -1, 154, -1, 156, 157,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 42, 43, -1, -1, -1,
-1, 48, -1, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, -1, 62, 63, 64, -1, -1,
+ 57, 58, 59, 60, 61, 62, 63, 64, -1, -1,
-1, -1, 69, 70, 71, 72, 73, -1, -1, -1,
- -1, -1, 79, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
- 49, 98, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 111, -1, -1, 114, 115, -1,
- -1, -1, -1, -1, -1, -1, 123, 124, 125, 126,
- 127, 128, 129, 3, 4, 5, 6, 7, -1, 136,
- -1, -1, 12, -1, 141, 142, 143, 144, 145, -1,
- 147, -1, -1, 150, 151, 152, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 42, 43, -1, -1, -1, -1, 48, -1,
- 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
- 60, -1, 62, 63, 64, -1, -1, -1, -1, 69,
- 70, 71, 72, 73, -1, -1, -1, -1, -1, 79,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, -1, 49, 98, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 111, -1, -1, 114, 115, -1, -1, -1, -1,
- -1, -1, -1, 123, 124, 125, 126, 127, 128, 129,
- 3, 4, 5, 6, 7, -1, 136, -1, -1, 12,
- -1, 141, 142, 143, 144, 145, 146, -1, -1, -1,
- 150, 151, 152, -1, -1, -1, -1, -1, 31, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 42,
- 43, -1, -1, -1, -1, 48, -1, 50, 51, 52,
- 53, 54, 55, 56, 57, 58, 59, 60, -1, 62,
- 63, 64, -1, -1, -1, -1, 69, 70, 71, 72,
- 73, -1, -1, -1, -1, -1, 79, -1, -1, -1,
+ -1, -1, 79, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 98, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 111, -1,
- -1, 114, 115, -1, -1, -1, -1, -1, -1, -1,
- 123, 124, 125, 126, 127, 128, 129, 3, 4, 5,
- 6, 7, -1, 136, -1, -1, 12, -1, 141, 142,
- 143, 144, 145, -1, -1, -1, -1, 150, 151, 152,
- -1, -1, -1, -1, -1, 31, -1, -1, -1, -1,
+ -1, 98, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 112, -1, -1, 115, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, 125, 126,
+ -1, 128, 129, 130, 131, 132, 133, 3, 4, 5,
+ 6, 7, -1, 140, -1, -1, 12, -1, 145, 146,
+ 147, 148, 149, -1, 151, -1, -1, 154, -1, 156,
+ 157, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 42, 43, -1, -1,
-1, -1, 48, -1, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, -1, 62, 63, 64, -1,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, -1,
-1, -1, -1, 69, 70, 71, 72, 73, -1, -1,
-1, -1, -1, 79, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 98, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 111, -1, -1, 114, 115,
- -1, -1, -1, -1, -1, -1, -1, 123, 124, 125,
- 126, 127, 128, 129, 3, 4, 5, 6, 7, -1,
- 136, -1, -1, 12, -1, 141, 142, 143, 144, 145,
- -1, -1, -1, -1, 150, 151, 152, -1, -1, -1,
- -1, -1, 31, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 42, 43, -1, -1, -1, -1, 48,
- -1, 50, 51, 52, 53, 54, 55, 56, 57, 58,
- 59, 60, -1, 62, 63, 64, -1, -1, -1, -1,
- 69, 70, 71, 72, 73, -1, -1, -1, -1, -1,
- 79, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 98,
+ -1, -1, -1, -1, -1, -1, 112, -1, -1, 115,
+ 116, -1, -1, -1, -1, -1, -1, -1, -1, 125,
+ 126, -1, 128, 129, 130, 131, 132, 133, 3, 4,
+ 5, 6, 7, -1, 140, -1, -1, 12, -1, 145,
+ 146, 147, 148, 149, -1, 151, -1, -1, 154, -1,
+ 156, 157, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 42, 43, -1,
+ -1, -1, -1, 48, -1, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ -1, -1, -1, -1, 69, 70, 71, 72, 73, -1,
+ -1, -1, -1, -1, 79, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 98, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 112, -1, -1,
+ 115, 116, -1, -1, -1, -1, -1, -1, -1, -1,
+ 125, 126, -1, 128, 129, 130, 131, 132, 133, 3,
+ 4, 5, 6, 7, -1, 140, -1, -1, 12, -1,
+ 145, 146, 147, 148, 149, 150, -1, -1, -1, 154,
+ -1, 156, 157, -1, -1, -1, -1, 31, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 42, 43,
+ -1, -1, -1, -1, 48, -1, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, -1, -1, -1, -1, 69, 70, 71, 72, 73,
+ -1, -1, -1, -1, -1, 79, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 111, -1, -1, 114, 115, -1, -1, -1,
- -1, -1, -1, -1, 123, 124, 125, 126, 127, 128,
- 129, 3, 4, 5, 6, 7, -1, 136, -1, -1,
- 12, -1, 141, 142, 143, 144, 145, -1, -1, -1,
- -1, 150, 151, 152, -1, -1, -1, -1, -1, 31,
+ -1, -1, -1, -1, 98, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 112, -1,
+ -1, 115, 116, -1, -1, -1, -1, -1, -1, -1,
+ -1, 125, 126, -1, 128, 129, 130, 131, 132, 133,
+ 3, 4, 5, 6, 7, -1, 140, -1, -1, 12,
+ -1, 145, 146, 147, 148, 149, -1, -1, -1, -1,
+ 154, -1, 156, 157, -1, -1, -1, -1, 31, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 42,
+ 43, -1, -1, -1, -1, 48, -1, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, -1, -1, -1, -1, 69, 70, 71, 72,
+ 73, -1, -1, -1, -1, -1, 79, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 98, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 112,
+ -1, -1, 115, 116, -1, -1, -1, -1, -1, -1,
+ -1, -1, 125, 126, -1, 128, 129, 130, 131, 132,
+ 133, 3, 4, 5, 6, 7, -1, 140, -1, -1,
+ 12, -1, 145, 146, 147, 148, 149, -1, -1, -1,
+ -1, 154, -1, 156, 157, -1, -1, -1, -1, 31,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
42, 43, -1, -1, -1, -1, 48, -1, 50, 51,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, -1,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
62, 63, 64, -1, -1, -1, -1, 69, 70, 71,
72, 73, -1, -1, -1, -1, -1, 79, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 98, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 111,
- -1, -1, 114, 115, -1, -1, -1, -1, -1, -1,
- -1, 123, 124, 125, 126, 127, 128, 129, 3, 4,
- 5, 6, 7, -1, 136, -1, -1, 12, -1, 141,
- 142, 143, 144, 145, -1, -1, -1, -1, 150, 151,
- 152, -1, -1, -1, -1, -1, 31, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 42, 43, -1,
- -1, -1, -1, 48, -1, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, -1, 62, 63, 64,
- -1, -1, -1, -1, 69, 70, 71, 72, 73, -1,
- -1, -1, -1, -1, 79, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 98, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 111, -1, -1, 114,
- 115, -1, -1, -1, -1, -1, -1, -1, 123, 124,
- 125, 126, 127, 128, 129, 3, 4, 5, 6, 7,
- -1, 136, -1, -1, 12, -1, 141, 142, 143, 144,
- 145, -1, -1, -1, -1, 150, 151, 152, -1, -1,
- -1, -1, -1, 31, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 42, 43, -1, -1, -1, -1,
- 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, -1, 62, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
- -1, 79, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 98, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 111, -1, -1, 114, 115, -1, -1,
- -1, -1, -1, -1, -1, 123, 124, 125, 126, 127,
- 128, 129, 3, 4, 5, 6, 7, -1, 136, -1,
- -1, 12, -1, 141, 142, 143, 144, 145, -1, -1,
- -1, -1, 150, 151, 152, -1, -1, -1, -1, -1,
+ 112, -1, -1, 115, 116, -1, -1, -1, -1, -1,
+ -1, -1, -1, 125, 126, -1, 128, 129, 130, 131,
+ 132, 133, 3, 4, 5, 6, 7, -1, 140, -1,
+ -1, 12, -1, 145, 146, 147, 148, 149, -1, -1,
+ -1, -1, 154, -1, 156, 157, -1, -1, -1, -1,
31, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 42, 43, -1, -1, -1, -1, 48, -1, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
- -1, 62, 63, 64, -1, -1, -1, -1, 69, 70,
+ 61, 62, 63, 64, -1, -1, -1, -1, 69, 70,
71, 72, 73, -1, -1, -1, -1, -1, 79, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 98, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 111, -1, -1, 114, 115, -1, -1, -1, -1, -1,
- -1, -1, 123, 124, 125, 126, 127, 128, 129, 3,
- 4, 5, 6, 7, -1, 136, -1, -1, 12, -1,
- 141, 142, 143, 144, 145, -1, -1, -1, -1, 150,
- 151, 152, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 42, 43,
- -1, -1, -1, -1, 48, -1, 50, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, -1, 62, 63,
- 64, -1, -1, -1, -1, 69, 70, 71, 72, 73,
- -1, -1, -1, -1, -1, 79, -1, -1, -1, -1,
+ -1, 112, -1, -1, 115, 116, -1, -1, -1, -1,
+ -1, -1, -1, -1, 125, 126, -1, 128, 129, 130,
+ 131, 132, 133, 3, 4, 5, 6, 7, -1, 140,
+ -1, -1, 12, -1, 145, 146, 147, 148, 149, -1,
+ -1, -1, -1, 154, -1, 156, 157, -1, -1, -1,
+ -1, 31, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 42, 43, -1, -1, -1, -1, 48, -1,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, -1, -1, -1, -1, 69,
+ 70, 71, 72, 73, -1, -1, -1, -1, -1, 79,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 98, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 111, -1, -1,
- 114, 115, -1, -1, -1, -1, -1, -1, -1, 123,
- 124, 125, 126, 127, 128, 129, 3, 4, 5, 6,
- 7, -1, 136, -1, -1, 12, -1, 141, 142, 143,
- 144, 145, -1, -1, -1, -1, 150, 151, 152, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 98, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 112, -1, -1, 115, 116, -1, -1, -1,
+ -1, -1, -1, -1, -1, 125, 126, -1, 128, 129,
+ 130, 131, 132, 133, 3, 4, 5, 6, 7, -1,
+ 140, -1, -1, 12, -1, 145, 146, 147, 148, 149,
+ -1, -1, -1, -1, 154, -1, 156, 157, -1, -1,
+ -1, -1, 31, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 42, 43, -1, -1, -1, -1, 48,
+ -1, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, -1, -1, -1, -1,
+ 69, 70, 71, 72, 73, -1, -1, -1, -1, -1,
+ 79, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 98,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 112, -1, -1, 115, 116, -1, -1,
+ -1, -1, -1, -1, -1, -1, 125, 126, -1, 128,
+ 129, 130, 131, 132, 133, 3, 4, 5, 6, 7,
+ -1, 140, -1, -1, 12, -1, 145, 146, 147, 148,
+ 149, -1, -1, -1, -1, 154, -1, 156, 157, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 42, 43, -1, -1, -1, -1,
+ 48, -1, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, -1, -1, -1,
+ -1, 69, 70, 71, 72, 73, -1, -1, -1, -1,
+ -1, 79, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 98, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 112, -1, -1, 115, 116, -1,
+ -1, -1, -1, -1, -1, -1, -1, 125, 126, -1,
+ 128, 129, 130, 131, 132, 133, 3, 4, 5, 6,
+ 7, -1, 140, -1, -1, 12, -1, 145, 146, 147,
+ 148, 149, -1, -1, -1, -1, 154, -1, 156, 157,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 42, 43, -1, -1, -1,
-1, 48, -1, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, -1, 62, 63, 64, -1, -1,
+ 57, 58, 59, 60, 61, 62, 63, 64, -1, -1,
-1, -1, 69, 70, 71, 72, 73, -1, -1, -1,
-1, -1, 79, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 98, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 111, -1, -1, 114, 115, -1,
- -1, -1, -1, -1, -1, -1, 123, 124, 125, 126,
- 127, 128, 129, -1, -1, -1, -1, -1, -1, 136,
- 9, 10, 11, -1, 141, 142, 143, 144, 145, -1,
- -1, -1, -1, 150, 151, 152, 25, -1, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
- 49, 9, 10, 11, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 25, -1, 27,
- 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
- -1, 49, 9, 10, 11, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 25, -1,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, -1, 49, -1, -1, -1, -1, 9, 10, 11,
+ -1, -1, -1, -1, -1, 112, -1, -1, 115, 116,
+ -1, -1, -1, -1, -1, -1, -1, -1, 125, 126,
+ -1, 128, 129, 130, 131, 132, 133, -1, -1, -1,
+ -1, -1, -1, 140, -1, 9, 10, 11, 145, 146,
+ 147, 148, 149, -1, -1, -1, -1, 154, -1, 156,
+ 157, 25, -1, 27, 28, 29, 30, 31, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, -1, 49, 9, 10, 11, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 25, 153, 27, 28, 29, 30, 31,
+ -1, -1, 25, -1, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, -1, 49, 9, 10, 11,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 25, -1, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, -1, 49, 9, 10,
- 11, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 149, -1, -1, 25, -1, 27, 28, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, -1, 49, 9,
- 10, 11, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 149, -1, -1, 25, -1, 27, 28, 29,
- 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
+ 42, 43, 44, 45, 46, 47, -1, 49, -1, -1,
-1, -1, 9, 10, 11, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 149, 25, 26,
+ -1, -1, -1, -1, -1, -1, -1, -1, 25, 153,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, -1, 49, 9, 10, 11, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 149, 25,
- -1, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 25,
+ 153, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, -1, 49, 9, 10, 11, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 149,
- 25, -1, 27, 28, 29, 30, 31, 32, 33, 34,
+ 46, 47, -1, 49, -1, -1, 9, 10, 11, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 153, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, -1, 49, -1, -1, 9,
+ 10, 11, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 25, 153, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
+ 9, 10, 11, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 25, 153, 27, 28,
+ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
+ 49, 9, 10, 11, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 25, 151, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ -1, 49, -1, -1, 9, 10, 11, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 25, 151, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, -1, 49, 9, 10, 11, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 147, 25, -1, 27, 28, 29, 30, 31, 32, 33,
+ -1, 25, 151, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, -1, 49, 9, 10, 11, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 147, 25, -1, 27, 28, 29, 30, 31, 32,
+ -1, -1, 25, 151, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, -1, 49, 9, 10, 11,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 147, 25, -1, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, -1, 49, 9, 10,
- 11, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 147, 25, -1, 27, 28, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, -1, 49, 9,
+ 43, 44, 45, 46, 47, -1, 49, -1, -1, 9,
10, 11, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 147, 25, -1, 27, 28, 29,
+ -1, -1, -1, -1, -1, 25, 151, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
- 9, 10, 11, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 146, -1, 25, -1, 27, 28,
- 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, -1,
- 49, 9, 10, 11, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 146, -1, 25, -1, 27,
+ -1, 9, 10, 11, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 150, 25, -1, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
-1, 49, 9, 10, 11, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 146, -1, 25, -1,
+ -1, -1, -1, -1, -1, -1, -1, 150, 25, -1,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
47, -1, 49, 9, 10, 11, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 146, -1, 25,
- -1, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 25,
+ 150, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, -1, 49, 9, 10, 11, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 146, -1,
- 25, -1, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, 9, 10, 11, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 146,
- -1, 25, -1, 27, 28, 29, 30, 31, 32, 33,
+ 46, 47, -1, 49, -1, 9, 10, 11, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 25, 150, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
44, 45, 46, 47, -1, 49, 9, 10, 11, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 146, -1, 25, -1, 27, 28, 29, 30, 31, 32,
+ -1, -1, 25, 150, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, -1, 49, 9, 10, 11,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 146, -1, 25, -1, 27, 28, 29, 30, 31,
+ -1, -1, -1, 25, 150, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, -1, 49, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 146, -1, 9, 10, 11, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, -1, 49, 9, 10, 11, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 122, 25, -1, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, -1, 49, 10, 11, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 25, -1, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, 11, 49, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 25, -1,
+ 42, 43, 44, 45, 46, 47, -1, 49, -1, 9,
+ 10, 11, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 25, 150, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
+ -1, -1, 9, 10, 11, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 150, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 25, 49, 27, 28, 29, 30, 31, 32, 33,
- 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
- 44, 45, 46, 47, -1, 49, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, -1, 49, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, -1, 49
+ 47, -1, 49, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 150, 9,
+ 10, 11, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 124, 25, -1, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
+ 10, 11, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 25, -1, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 11, 49,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 25, -1, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, -1, 49, 27, 28, 29,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, -1, 49,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ -1, 49, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, -1, 49
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint16 yystos[] =
{
- 0, 155, 156, 0, 157, 3, 4, 5, 6, 7,
+ 0, 159, 160, 0, 161, 3, 4, 5, 6, 7,
12, 42, 43, 48, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 62, 63, 64, 65, 69,
- 70, 71, 72, 73, 75, 79, 80, 81, 82, 84,
- 86, 88, 91, 95, 96, 97, 98, 99, 100, 101,
- 103, 104, 105, 109, 110, 111, 113, 114, 115, 116,
- 117, 118, 123, 124, 125, 126, 127, 128, 129, 136,
- 141, 142, 143, 144, 145, 147, 148, 150, 151, 152,
- 158, 159, 164, 168, 169, 199, 200, 202, 204, 207,
- 209, 254, 267, 270, 279, 290, 293, 297, 298, 300,
- 301, 309, 310, 311, 312, 313, 314, 315, 321, 331,
- 334, 71, 111, 141, 267, 297, 297, 145, 297, 297,
- 297, 297, 297, 297, 297, 265, 297, 297, 297, 297,
- 297, 297, 297, 141, 144, 158, 279, 300, 301, 311,
- 300, 297, 141, 144, 158, 279, 281, 282, 311, 313,
- 314, 321, 145, 287, 145, 26, 250, 297, 176, 145,
- 145, 145, 186, 145, 147, 297, 147, 297, 71, 71,
- 147, 254, 297, 301, 187, 297, 144, 158, 162, 163,
- 73, 150, 236, 237, 117, 117, 73, 238, 145, 145,
- 145, 145, 145, 145, 73, 78, 137, 138, 139, 327,
- 328, 144, 148, 158, 158, 297, 165, 148, 78, 288,
- 327, 78, 327, 144, 145, 8, 147, 71, 71, 31,
- 201, 140, 9, 10, 11, 25, 27, 28, 29, 30,
- 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 49, 147, 59,
- 60, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 145, 140, 121, 61, 148, 150, 314,
- 201, 297, 297, 144, 158, 140, 140, 144, 158, 140,
- 257, 140, 121, 314, 146, 297, 297, 8, 147, 168,
- 174, 251, 252, 297, 254, 301, 145, 297, 147, 147,
- 147, 13, 147, 147, 148, 147, 158, 90, 8, 147,
- 148, 298, 301, 8, 147, 13, 8, 147, 197, 198,
- 301, 301, 332, 301, 146, 255, 31, 297, 325, 326,
- 61, 121, 137, 328, 72, 297, 301, 78, 137, 328,
- 158, 161, 147, 148, 145, 146, 149, 166, 297, 151,
- 152, 71, 271, 71, 119, 208, 206, 71, 145, 71,
- 309, 314, 321, 260, 297, 261, 26, 262, 258, 259,
- 297, 297, 297, 297, 297, 297, 297, 297, 297, 297,
- 297, 297, 297, 297, 297, 297, 297, 297, 297, 281,
- 31, 297, 297, 297, 297, 297, 297, 297, 297, 297,
- 297, 297, 297, 278, 71, 309, 302, 297, 316, 297,
- 146, 158, 71, 71, 158, 309, 145, 289, 309, 283,
- 146, 146, 297, 82, 297, 147, 8, 90, 90, 71,
- 218, 146, 42, 43, 124, 136, 141, 144, 158, 279,
- 290, 291, 292, 165, 90, 71, 163, 297, 237, 291,
- 73, 8, 146, 8, 146, 146, 147, 123, 301, 322,
- 323, 299, 301, 122, 146, 8, 295, 329, 71, 61,
- 149, 149, 145, 156, 160, 273, 116, 167, 168, 199,
- 200, 149, 31, 234, 235, 254, 301, 13, 141, 144,
- 158, 280, 205, 119, 210, 203, 266, 145, 145, 314,
- 297, 297, 264, 297, 297, 297, 63, 301, 234, 145,
- 145, 71, 148, 309, 317, 319, 320, 153, 149, 234,
- 317, 26, 170, 145, 146, 178, 253, 184, 182, 13,
- 8, 146, 181, 291, 291, 145, 78, 144, 158, 140,
- 149, 71, 149, 13, 198, 147, 333, 145, 8, 146,
- 31, 297, 31, 297, 71, 73, 74, 330, 297, 272,
- 149, 156, 234, 145, 299, 146, 8, 291, 144, 158,
- 120, 211, 212, 280, 148, 145, 124, 231, 232, 233,
- 280, 274, 275, 297, 26, 281, 146, 276, 277, 297,
- 318, 303, 61, 148, 146, 284, 172, 168, 177, 175,
- 251, 297, 301, 31, 214, 301, 291, 71, 26, 168,
- 217, 26, 148, 219, 291, 294, 296, 158, 71, 102,
- 291, 301, 324, 323, 13, 299, 299, 122, 153, 153,
- 234, 149, 146, 146, 31, 254, 301, 158, 212, 148,
- 8, 239, 231, 146, 8, 31, 73, 234, 234, 263,
- 256, 234, 234, 149, 145, 307, 316, 297, 285, 165,
- 171, 297, 26, 168, 224, 147, 122, 213, 301, 213,
- 13, 165, 147, 220, 147, 220, 122, 146, 8, 295,
- 145, 322, 297, 31, 297, 149, 146, 147, 299, 239,
- 280, 99, 106, 107, 108, 109, 110, 111, 112, 149,
- 240, 244, 245, 246, 247, 249, 146, 104, 268, 233,
- 73, 13, 146, 146, 297, 289, 146, 146, 308, 304,
- 153, 149, 121, 286, 173, 225, 146, 165, 179, 214,
- 146, 146, 291, 89, 220, 92, 93, 94, 220, 149,
- 291, 291, 188, 146, 299, 149, 71, 241, 267, 247,
- 8, 147, 148, 145, 148, 31, 73, 13, 291, 234,
- 121, 305, 317, 227, 66, 67, 229, 147, 83, 251,
- 185, 183, 147, 92, 147, 297, 26, 147, 223, 149,
- 122, 280, 13, 73, 248, 201, 71, 165, 31, 73,
- 269, 165, 73, 13, 291, 146, 317, 66, 67, 230,
- 145, 168, 147, 146, 26, 168, 216, 216, 147, 223,
- 222, 291, 189, 291, 13, 8, 147, 71, 13, 149,
- 73, 8, 146, 149, 13, 291, 306, 145, 26, 68,
- 297, 180, 165, 221, 165, 73, 291, 73, 242, 291,
- 31, 73, 291, 307, 297, 165, 147, 146, 26, 168,
- 215, 87, 165, 146, 13, 145, 73, 146, 226, 165,
- 147, 190, 291, 231, 26, 168, 85, 148, 146, 228,
- 147, 165, 147, 148, 243, 165, 149, 165, 191, 149,
- 102, 192, 193, 194, 145, 194, 280, 195, 73, 146,
- 196, 148, 165, 149
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 69, 70, 71, 72, 73, 75, 79, 80, 81, 82,
+ 84, 86, 88, 91, 95, 96, 97, 98, 99, 100,
+ 101, 103, 104, 106, 110, 111, 112, 114, 115, 116,
+ 117, 118, 119, 120, 125, 126, 128, 129, 130, 131,
+ 132, 133, 140, 145, 146, 147, 148, 149, 151, 152,
+ 154, 156, 157, 162, 163, 168, 172, 173, 203, 204,
+ 206, 208, 211, 213, 276, 278, 292, 295, 304, 315,
+ 318, 322, 323, 325, 326, 336, 337, 338, 339, 341,
+ 342, 343, 344, 350, 360, 363, 71, 112, 145, 292,
+ 322, 322, 149, 322, 322, 322, 322, 322, 322, 322,
+ 289, 322, 322, 322, 322, 322, 322, 322, 112, 145,
+ 148, 162, 304, 325, 326, 338, 325, 31, 322, 354,
+ 355, 322, 145, 148, 162, 304, 306, 307, 338, 342,
+ 343, 350, 149, 312, 149, 26, 266, 322, 180, 149,
+ 149, 149, 190, 149, 151, 322, 151, 322, 71, 71,
+ 151, 278, 322, 326, 191, 322, 148, 162, 166, 167,
+ 73, 154, 240, 241, 118, 118, 73, 242, 292, 149,
+ 149, 149, 149, 149, 149, 73, 78, 141, 142, 143,
+ 356, 357, 148, 152, 162, 162, 276, 322, 169, 152,
+ 78, 313, 356, 78, 356, 148, 149, 8, 151, 71,
+ 71, 31, 205, 340, 144, 9, 10, 11, 25, 27,
+ 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 49, 151, 59, 60, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 149, 144, 61, 123,
+ 61, 152, 154, 343, 205, 322, 322, 148, 162, 144,
+ 144, 324, 326, 124, 155, 8, 320, 148, 162, 144,
+ 277, 144, 123, 343, 150, 322, 322, 8, 151, 172,
+ 178, 267, 268, 322, 278, 326, 149, 322, 151, 151,
+ 151, 13, 151, 151, 152, 151, 162, 90, 8, 151,
+ 152, 323, 326, 8, 151, 13, 8, 151, 205, 201,
+ 202, 326, 326, 361, 326, 150, 279, 354, 61, 123,
+ 141, 357, 72, 322, 326, 78, 141, 357, 162, 165,
+ 151, 152, 149, 150, 150, 153, 170, 322, 156, 157,
+ 71, 296, 71, 121, 212, 210, 71, 149, 61, 71,
+ 152, 336, 343, 349, 350, 283, 322, 284, 26, 286,
+ 281, 282, 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322,
+ 322, 306, 31, 322, 322, 322, 322, 322, 322, 322,
+ 322, 322, 322, 322, 322, 303, 71, 336, 349, 322,
+ 345, 327, 345, 322, 150, 162, 71, 31, 322, 31,
+ 322, 162, 336, 149, 314, 336, 308, 150, 150, 322,
+ 82, 322, 151, 8, 90, 90, 71, 222, 150, 42,
+ 43, 61, 126, 128, 140, 145, 148, 162, 304, 315,
+ 316, 317, 169, 90, 71, 167, 322, 241, 316, 73,
+ 149, 8, 150, 8, 150, 150, 151, 125, 326, 351,
+ 352, 150, 358, 71, 61, 153, 153, 149, 160, 164,
+ 298, 285, 117, 171, 172, 203, 204, 153, 31, 238,
+ 239, 278, 326, 13, 145, 148, 162, 305, 209, 121,
+ 214, 207, 290, 345, 322, 149, 149, 343, 322, 322,
+ 288, 322, 322, 322, 63, 326, 238, 149, 149, 155,
+ 336, 346, 348, 349, 155, 153, 324, 324, 124, 238,
+ 346, 26, 174, 149, 150, 182, 269, 188, 186, 13,
+ 8, 150, 185, 316, 316, 316, 319, 321, 149, 78,
+ 148, 162, 144, 153, 71, 153, 13, 291, 202, 151,
+ 362, 149, 8, 150, 71, 73, 74, 359, 322, 297,
+ 153, 160, 238, 274, 275, 149, 324, 150, 8, 316,
+ 148, 162, 122, 215, 216, 305, 152, 149, 126, 127,
+ 235, 236, 237, 305, 155, 153, 300, 299, 322, 26,
+ 306, 150, 302, 301, 347, 328, 61, 152, 31, 322,
+ 150, 309, 176, 172, 181, 179, 267, 322, 326, 31,
+ 218, 326, 316, 71, 26, 172, 221, 26, 152, 223,
+ 124, 155, 8, 320, 319, 162, 71, 102, 316, 235,
+ 326, 353, 352, 13, 155, 155, 238, 153, 150, 61,
+ 123, 270, 271, 272, 330, 150, 31, 278, 326, 162,
+ 216, 152, 8, 243, 235, 150, 8, 31, 73, 238,
+ 238, 287, 280, 238, 238, 149, 332, 333, 335, 345,
+ 322, 324, 310, 169, 175, 322, 26, 172, 228, 151,
+ 124, 217, 326, 217, 13, 169, 151, 224, 151, 224,
+ 316, 316, 150, 149, 150, 351, 322, 153, 150, 345,
+ 346, 330, 61, 273, 151, 324, 243, 305, 99, 104,
+ 107, 108, 109, 110, 111, 112, 113, 153, 244, 247,
+ 260, 261, 262, 263, 265, 150, 104, 293, 237, 73,
+ 13, 150, 150, 322, 314, 150, 150, 334, 61, 61,
+ 329, 155, 153, 123, 311, 177, 229, 150, 169, 183,
+ 218, 150, 150, 316, 89, 224, 92, 93, 94, 224,
+ 153, 124, 192, 293, 150, 155, 331, 345, 270, 153,
+ 71, 248, 305, 245, 292, 263, 8, 151, 152, 149,
+ 152, 31, 73, 13, 316, 238, 345, 345, 330, 346,
+ 231, 66, 67, 233, 151, 83, 267, 189, 187, 151,
+ 92, 151, 322, 26, 151, 227, 153, 316, 305, 152,
+ 335, 155, 13, 8, 151, 152, 249, 73, 264, 205,
+ 71, 169, 31, 73, 294, 169, 73, 13, 316, 150,
+ 155, 155, 66, 67, 234, 149, 172, 151, 150, 26,
+ 172, 220, 220, 151, 227, 226, 193, 169, 316, 305,
+ 71, 250, 251, 252, 253, 255, 256, 257, 305, 13,
+ 8, 151, 71, 13, 153, 73, 8, 150, 153, 13,
+ 316, 149, 26, 68, 322, 184, 169, 225, 169, 73,
+ 153, 153, 252, 151, 90, 105, 151, 144, 316, 73,
+ 246, 316, 31, 73, 316, 322, 169, 151, 150, 26,
+ 172, 219, 87, 169, 150, 258, 263, 254, 305, 71,
+ 13, 149, 73, 150, 230, 169, 151, 194, 71, 8,
+ 316, 235, 26, 172, 85, 152, 305, 150, 232, 151,
+ 169, 151, 152, 259, 169, 153, 169, 195, 153, 102,
+ 196, 197, 198, 149, 198, 305, 199, 73, 150, 200,
+ 152, 169, 153
};
#define yyerrok (yyerrstatus = 0)
@@ -2622,7 +2767,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -2733,20 +2878,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
+yy_stack_print (bottom, top)
+ yytype_int16 *bottom;
+ yytype_int16 *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
+ for (; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
@@ -2780,11 +2922,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ fprintf (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
);
- YYFPRINTF (stderr, "\n");
+ fprintf (stderr, "\n");
}
}
@@ -3064,8 +3206,10 @@ yydestruct (yymsg, yytype, yyvaluep)
break;
}
}
+
/* Prevent warnings from -Wmissing-prototypes. */
+
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -3084,9 +3228,10 @@ int yyparse ();
-/*-------------------------.
-| yyparse or yypush_parse. |
-`-------------------------*/
+
+/*----------.
+| yyparse. |
+`----------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -3110,46 +3255,22 @@ yyparse ()
#endif
#endif
{
-/* The lookahead symbol. */
+ /* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
- /* Number of syntax errors so far. */
- int yynerrs;
-
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
-
- YYSIZE_T yystacksize;
+/* Number of syntax errors so far. */
+int yynerrs;
+ int yystate;
int yyn;
int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
@@ -3157,28 +3278,51 @@ YYSTYPE yylval;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss = yyssa;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
+
+
+
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
+
yyssp = yyss;
yyvsp = yyvs;
@@ -3208,6 +3352,7 @@ YYSTYPE yylval;
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
+
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
@@ -3215,6 +3360,7 @@ YYSTYPE yylval;
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
+
&yystacksize);
yyss = yyss1;
@@ -3237,8 +3383,9 @@ YYSTYPE yylval;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -3249,6 +3396,7 @@ YYSTYPE yylval;
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
+
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@@ -3258,9 +3406,6 @@ YYSTYPE yylval;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- if (yystate == YYFINAL)
- YYACCEPT;
-
goto yybackup;
/*-----------.
@@ -3269,16 +3414,16 @@ YYSTYPE yylval;
yybackup:
/* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
+ look-ahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -3310,16 +3455,20 @@ yybackup:
goto yyreduce;
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the lookahead token. */
+ /* Shift the look-ahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token. */
- yychar = YYEMPTY;
+ /* Discard the shifted token unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -3525,7 +3674,7 @@ yyreduce:
case 43:
- { (yyvsp[(1) - (2)]).u.opline_num = get_next_op_number(CG(active_op_array)); }
+ { (yyvsp[(1) - (2)]).u.op.opline_num = get_next_op_number(CG(active_op_array)); }
break;
case 44:
@@ -3540,12 +3689,12 @@ yyreduce:
case 46:
- { (yyvsp[(1) - (1)]).u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(TSRMLS_C); }
+ { (yyvsp[(1) - (1)]).u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(TSRMLS_C); }
break;
case 47:
- { (yyvsp[(5) - (5)]).u.opline_num = get_next_op_number(CG(active_op_array)); }
+ { (yyvsp[(5) - (5)]).u.op.opline_num = get_next_op_number(CG(active_op_array)); }
break;
case 48:
@@ -3555,7 +3704,7 @@ yyreduce:
case 49:
- { zend_do_free(&(yyvsp[(3) - (4)]) TSRMLS_CC); (yyvsp[(4) - (4)]).u.opline_num = get_next_op_number(CG(active_op_array)); }
+ { zend_do_free(&(yyvsp[(3) - (4)]) TSRMLS_CC); (yyvsp[(4) - (4)]).u.op.opline_num = get_next_op_number(CG(active_op_array)); }
break;
case 50:
@@ -3660,7 +3809,7 @@ yyreduce:
case 74:
- { (yyvsp[(1) - (1)]).u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); }
+ { (yyvsp[(1) - (1)]).u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); }
break;
case 75:
@@ -3715,7 +3864,7 @@ yyreduce:
case 86:
- { (yyval).u.opline_num = -1; }
+ { (yyval).u.op.opline_num = -1; }
break;
case 87:
@@ -3730,7 +3879,7 @@ yyreduce:
case 89:
- { (yyval).u.opline_num = get_next_op_number(CG(active_op_array)); }
+ { (yyval).u.op.opline_num = get_next_op_number(CG(active_op_array)); }
break;
case 90:
@@ -3800,1638 +3949,1858 @@ yyreduce:
case 105:
- { (yyval).u.opline_num = CG(zend_lineno); (yyval).u.EA.type = 0; }
+ { (yyval).u.op.opline_num = CG(zend_lineno); (yyval).EA = 0; }
break;
case 106:
- { (yyval).u.opline_num = CG(zend_lineno); (yyval).u.EA.type = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
+ { (yyval).u.op.opline_num = CG(zend_lineno); (yyval).EA = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
break;
case 107:
- { (yyval).u.opline_num = CG(zend_lineno); (yyval).u.EA.type = ZEND_ACC_FINAL_CLASS; }
+ { (yyval).u.op.opline_num = CG(zend_lineno); (yyval).EA = ZEND_ACC_TRAIT; }
break;
case 108:
- { (yyval).op_type = IS_UNUSED; }
+ { (yyval).u.op.opline_num = CG(zend_lineno); (yyval).EA = ZEND_ACC_FINAL_CLASS; }
break;
case 109:
- { zend_do_fetch_class(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
+ { (yyval).op_type = IS_UNUSED; }
break;
case 110:
- { (yyval).u.opline_num = CG(zend_lineno); (yyval).u.EA.type = ZEND_ACC_INTERFACE; }
+ { zend_do_fetch_class(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 115:
+ case 111:
- { zend_do_implements_interface(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ { (yyval).u.op.opline_num = CG(zend_lineno); (yyval).EA = ZEND_ACC_INTERFACE; }
break;
case 116:
- { zend_do_implements_interface(&(yyvsp[(3) - (3)]) TSRMLS_CC); }
+ { zend_do_implements_interface(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
case 117:
- { (yyval).op_type = IS_UNUSED; }
+ { zend_do_implements_interface(&(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
case 118:
- { (yyval) = (yyvsp[(2) - (2)]); }
+ { (yyval).op_type = IS_UNUSED; }
break;
case 119:
- { zend_check_writable_variable(&(yyvsp[(1) - (1)])); (yyval) = (yyvsp[(1) - (1)]); }
+ { (yyval) = (yyvsp[(2) - (2)]); }
break;
case 120:
- { zend_check_writable_variable(&(yyvsp[(2) - (2)])); (yyval) = (yyvsp[(2) - (2)]); (yyval).u.EA.type |= ZEND_PARSED_REFERENCE_VARIABLE; }
+ { zend_check_writable_variable(&(yyvsp[(1) - (1)])); (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 127:
+ case 121:
- { zend_do_declare_stmt(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
+ { zend_check_writable_variable(&(yyvsp[(2) - (2)])); (yyval) = (yyvsp[(2) - (2)]); (yyval).EA |= ZEND_PARSED_REFERENCE_VARIABLE; }
break;
case 128:
- { zend_do_declare_stmt(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
+ { zend_do_declare_stmt(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
case 129:
- { (yyval) = (yyvsp[(2) - (3)]); }
+ { zend_do_declare_stmt(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
break;
case 130:
- { (yyval) = (yyvsp[(3) - (4)]); }
+ { (yyval) = (yyvsp[(2) - (3)]); }
break;
case 131:
- { (yyval) = (yyvsp[(2) - (4)]); }
+ { (yyval) = (yyvsp[(3) - (4)]); }
break;
case 132:
- { (yyval) = (yyvsp[(3) - (5)]); }
+ { (yyval) = (yyvsp[(2) - (4)]); }
break;
case 133:
- { (yyval).op_type = IS_UNUSED; }
+ { (yyval) = (yyvsp[(3) - (5)]); }
break;
case 134:
- { zend_do_extended_info(TSRMLS_C); zend_do_case_before_statement(&(yyvsp[(1) - (4)]), &(yyvsp[(2) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ { (yyval).op_type = IS_UNUSED; }
break;
case 135:
- { zend_do_case_after_statement(&(yyval), &(yyvsp[(2) - (6)]) TSRMLS_CC); (yyval).op_type = IS_CONST; }
+ { zend_do_extended_info(TSRMLS_C); zend_do_case_before_statement(&(yyvsp[(1) - (4)]), &(yyvsp[(2) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
case 136:
- { zend_do_extended_info(TSRMLS_C); zend_do_default_before_statement(&(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]) TSRMLS_CC); }
+ { zend_do_case_after_statement(&(yyval), &(yyvsp[(2) - (6)]) TSRMLS_CC); (yyval).op_type = IS_CONST; }
break;
case 137:
- { zend_do_case_after_statement(&(yyval), &(yyvsp[(2) - (5)]) TSRMLS_CC); (yyval).op_type = IS_CONST; }
+ { zend_do_extended_info(TSRMLS_C); zend_do_default_before_statement(&(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]) TSRMLS_CC); }
break;
- case 143:
+ case 138:
- { zend_do_if_cond(&(yyvsp[(4) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
+ { zend_do_case_after_statement(&(yyval), &(yyvsp[(2) - (5)]) TSRMLS_CC); (yyval).op_type = IS_CONST; }
break;
case 144:
- { zend_do_if_after_statement(&(yyvsp[(5) - (7)]), 0 TSRMLS_CC); }
+ { zend_do_if_cond(&(yyvsp[(4) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
break;
- case 146:
+ case 145:
- { zend_do_if_cond(&(yyvsp[(4) - (6)]), &(yyvsp[(5) - (6)]) TSRMLS_CC); }
+ { zend_do_if_after_statement(&(yyvsp[(5) - (7)]), 0 TSRMLS_CC); }
break;
case 147:
- { zend_do_if_after_statement(&(yyvsp[(5) - (8)]), 0 TSRMLS_CC); }
+ { zend_do_if_cond(&(yyvsp[(4) - (6)]), &(yyvsp[(5) - (6)]) TSRMLS_CC); }
break;
- case 154:
+ case 148:
- { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(2) - (2)]), 0 TSRMLS_CC); (yyval).op_type = IS_CONST; Z_LVAL((yyval).u.constant)=1; Z_TYPE((yyval).u.constant)=IS_LONG; INIT_PZVAL(&(yyval).u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &(yyval), NULL, &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]), 0 TSRMLS_CC); }
+ { zend_do_if_after_statement(&(yyvsp[(5) - (8)]), 0 TSRMLS_CC); }
break;
case 155:
- { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(3) - (3)]), 0 TSRMLS_CC); (yyval).op_type = IS_CONST; Z_LVAL((yyval).u.constant)=1; Z_TYPE((yyval).u.constant)=IS_LONG; INIT_PZVAL(&(yyval).u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &(yyval), NULL, &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), 1 TSRMLS_CC); }
+ { (yyval).op_type = IS_UNUSED; (yyval).u.op.num=1; zend_do_receive_arg(ZEND_RECV, &(yyvsp[(2) - (2)]), &(yyval), NULL, &(yyvsp[(1) - (2)]), 0 TSRMLS_CC); }
break;
case 156:
- { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(3) - (5)]), 0 TSRMLS_CC); (yyval).op_type = IS_CONST; Z_LVAL((yyval).u.constant)=1; Z_TYPE((yyval).u.constant)=IS_LONG; INIT_PZVAL(&(yyval).u.constant); zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &(yyval), &(yyvsp[(5) - (5)]), &(yyvsp[(1) - (5)]), &(yyvsp[(3) - (5)]), 1 TSRMLS_CC); }
+ { (yyval).op_type = IS_UNUSED; (yyval).u.op.num=1; zend_do_receive_arg(ZEND_RECV, &(yyvsp[(3) - (3)]), &(yyval), NULL, &(yyvsp[(1) - (3)]), 1 TSRMLS_CC); }
break;
case 157:
- { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(2) - (4)]), 0 TSRMLS_CC); (yyval).op_type = IS_CONST; Z_LVAL((yyval).u.constant)=1; Z_TYPE((yyval).u.constant)=IS_LONG; INIT_PZVAL(&(yyval).u.constant); zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &(yyval), &(yyvsp[(4) - (4)]), &(yyvsp[(1) - (4)]), &(yyvsp[(2) - (4)]), 0 TSRMLS_CC); }
+ { (yyval).op_type = IS_UNUSED; (yyval).u.op.num=1; zend_do_receive_arg(ZEND_RECV_INIT, &(yyvsp[(3) - (5)]), &(yyval), &(yyvsp[(5) - (5)]), &(yyvsp[(1) - (5)]), 1 TSRMLS_CC); }
break;
case 158:
- { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(4) - (4)]), 0 TSRMLS_CC); (yyval)=(yyvsp[(1) - (4)]); Z_LVAL((yyval).u.constant)++; zend_do_receive_arg(ZEND_RECV, &tmp, &(yyval), NULL, &(yyvsp[(3) - (4)]), &(yyvsp[(4) - (4)]), 0 TSRMLS_CC); }
+ { (yyval).op_type = IS_UNUSED; (yyval).u.op.num=1; zend_do_receive_arg(ZEND_RECV_INIT, &(yyvsp[(2) - (4)]), &(yyval), &(yyvsp[(4) - (4)]), &(yyvsp[(1) - (4)]), 0 TSRMLS_CC); }
break;
case 159:
- { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(5) - (5)]), 0 TSRMLS_CC); (yyval)=(yyvsp[(1) - (5)]); Z_LVAL((yyval).u.constant)++; zend_do_receive_arg(ZEND_RECV, &tmp, &(yyval), NULL, &(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]), 1 TSRMLS_CC); }
+ { (yyval)=(yyvsp[(1) - (4)]); (yyval).u.op.num++; zend_do_receive_arg(ZEND_RECV, &(yyvsp[(4) - (4)]), &(yyval), NULL, &(yyvsp[(3) - (4)]), 0 TSRMLS_CC); }
break;
case 160:
- { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(5) - (7)]), 0 TSRMLS_CC); (yyval)=(yyvsp[(1) - (7)]); Z_LVAL((yyval).u.constant)++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &(yyval), &(yyvsp[(7) - (7)]), &(yyvsp[(3) - (7)]), &(yyvsp[(5) - (7)]), 1 TSRMLS_CC); }
+ { (yyval)=(yyvsp[(1) - (5)]); (yyval).u.op.num++; zend_do_receive_arg(ZEND_RECV, &(yyvsp[(5) - (5)]), &(yyval), NULL, &(yyvsp[(3) - (5)]), 1 TSRMLS_CC); }
break;
case 161:
- { znode tmp; fetch_simple_variable(&tmp, &(yyvsp[(4) - (6)]), 0 TSRMLS_CC); (yyval)=(yyvsp[(1) - (6)]); Z_LVAL((yyval).u.constant)++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &(yyval), &(yyvsp[(6) - (6)]), &(yyvsp[(3) - (6)]), &(yyvsp[(4) - (6)]), 0 TSRMLS_CC); }
+ { (yyval)=(yyvsp[(1) - (7)]); (yyval).u.op.num++; zend_do_receive_arg(ZEND_RECV_INIT, &(yyvsp[(5) - (7)]), &(yyval), &(yyvsp[(7) - (7)]), &(yyvsp[(3) - (7)]), 1 TSRMLS_CC); }
break;
case 162:
- { (yyval).op_type = IS_UNUSED; }
+ { (yyval)=(yyvsp[(1) - (6)]); (yyval).u.op.num++; zend_do_receive_arg(ZEND_RECV_INIT, &(yyvsp[(4) - (6)]), &(yyval), &(yyvsp[(6) - (6)]), &(yyvsp[(3) - (6)]), 0 TSRMLS_CC); }
break;
case 163:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { (yyval).op_type = IS_UNUSED; }
break;
case 164:
- { (yyval).op_type = IS_CONST; Z_TYPE((yyval).u.constant)=IS_NULL;}
+ { (yyval).op_type = IS_CONST; Z_TYPE((yyval).u.constant)=IS_ARRAY; }
break;
case 165:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { (yyval).op_type = IS_CONST; Z_TYPE((yyval).u.constant)=IS_CALLABLE; }
break;
case 166:
- { Z_LVAL((yyval).u.constant) = 0; }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 167:
- { Z_LVAL((yyval).u.constant) = 1; zend_do_pass_param(&(yyvsp[(1) - (1)]), ZEND_SEND_VAL, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 168:
- { Z_LVAL((yyval).u.constant) = 1; zend_do_pass_param(&(yyvsp[(1) - (1)]), ZEND_SEND_VAR, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
+ { Z_LVAL((yyval).u.constant) = 0; }
break;
case 169:
- { Z_LVAL((yyval).u.constant) = 1; zend_do_pass_param(&(yyvsp[(2) - (2)]), ZEND_SEND_REF, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
+ { Z_LVAL((yyval).u.constant) = 1; zend_do_pass_param(&(yyvsp[(1) - (1)]), ZEND_SEND_VAL, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
case 170:
- { Z_LVAL((yyval).u.constant)=Z_LVAL((yyvsp[(1) - (3)]).u.constant)+1; zend_do_pass_param(&(yyvsp[(3) - (3)]), ZEND_SEND_VAL, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
+ { Z_LVAL((yyval).u.constant) = 1; zend_do_pass_param(&(yyvsp[(1) - (1)]), ZEND_SEND_VAR, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
case 171:
- { Z_LVAL((yyval).u.constant)=Z_LVAL((yyvsp[(1) - (3)]).u.constant)+1; zend_do_pass_param(&(yyvsp[(3) - (3)]), ZEND_SEND_VAR, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
+ { Z_LVAL((yyval).u.constant) = 1; zend_do_pass_param(&(yyvsp[(2) - (2)]), ZEND_SEND_REF, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
case 172:
- { Z_LVAL((yyval).u.constant)=Z_LVAL((yyvsp[(1) - (4)]).u.constant)+1; zend_do_pass_param(&(yyvsp[(4) - (4)]), ZEND_SEND_REF, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
+ { Z_LVAL((yyval).u.constant)=Z_LVAL((yyvsp[(1) - (3)]).u.constant)+1; zend_do_pass_param(&(yyvsp[(3) - (3)]), ZEND_SEND_VAL, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
case 173:
- { zend_do_fetch_global_variable(&(yyvsp[(3) - (3)]), NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); }
+ { Z_LVAL((yyval).u.constant)=Z_LVAL((yyvsp[(1) - (3)]).u.constant)+1; zend_do_pass_param(&(yyvsp[(3) - (3)]), ZEND_SEND_VAR, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
case 174:
- { zend_do_fetch_global_variable(&(yyvsp[(1) - (1)]), NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); }
+ { Z_LVAL((yyval).u.constant)=Z_LVAL((yyvsp[(1) - (4)]).u.constant)+1; zend_do_pass_param(&(yyvsp[(4) - (4)]), ZEND_SEND_REF, Z_LVAL((yyval).u.constant) TSRMLS_CC); }
break;
case 175:
- { (yyval) = (yyvsp[(1) - (1)]); }
+ { zend_do_fetch_global_variable(&(yyvsp[(3) - (3)]), NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); }
break;
case 176:
- { (yyval) = (yyvsp[(2) - (2)]); }
+ { zend_do_fetch_global_variable(&(yyvsp[(1) - (1)]), NULL, ZEND_FETCH_GLOBAL_LOCK TSRMLS_CC); }
break;
case 177:
- { (yyval) = (yyvsp[(3) - (4)]); }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 178:
- { zend_do_fetch_static_variable(&(yyvsp[(3) - (3)]), NULL, ZEND_FETCH_STATIC TSRMLS_CC); }
+ { (yyval) = (yyvsp[(2) - (2)]); }
break;
case 179:
- { zend_do_fetch_static_variable(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]), ZEND_FETCH_STATIC TSRMLS_CC); }
+ { (yyval) = (yyvsp[(3) - (4)]); }
break;
case 180:
- { zend_do_fetch_static_variable(&(yyvsp[(1) - (1)]), NULL, ZEND_FETCH_STATIC TSRMLS_CC); }
+ { zend_do_fetch_static_variable(&(yyvsp[(3) - (3)]), NULL, ZEND_FETCH_STATIC TSRMLS_CC); }
break;
case 181:
+ { zend_do_fetch_static_variable(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]), ZEND_FETCH_STATIC TSRMLS_CC); }
+ break;
+
+ case 182:
+
+ { zend_do_fetch_static_variable(&(yyvsp[(1) - (1)]), NULL, ZEND_FETCH_STATIC TSRMLS_CC); }
+ break;
+
+ case 183:
+
{ zend_do_fetch_static_variable(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_FETCH_STATIC TSRMLS_CC); }
break;
- case 184:
+ case 186:
{ CG(access_type) = Z_LVAL((yyvsp[(1) - (1)]).u.constant); }
break;
- case 187:
+ case 190:
{ zend_do_begin_function_declaration(&(yyvsp[(2) - (4)]), &(yyvsp[(4) - (4)]), 1, (yyvsp[(3) - (4)]).op_type, &(yyvsp[(1) - (4)]) TSRMLS_CC); }
break;
- case 188:
+ case 191:
{ zend_do_abstract_method(&(yyvsp[(4) - (9)]), &(yyvsp[(1) - (9)]), &(yyvsp[(9) - (9)]) TSRMLS_CC); zend_do_end_function_declaration(&(yyvsp[(2) - (9)]) TSRMLS_CC); }
break;
- case 189:
+ case 193:
+
+ { zend_do_implements_trait(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ break;
+
+ case 194:
+
+ { zend_do_implements_trait(&(yyvsp[(3) - (3)]) TSRMLS_CC); }
+ break;
+
+ case 201:
+
+ { zend_add_trait_precedence(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
+ break;
+
+ case 202:
+
+ { zend_add_trait_alias(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
+ break;
+
+ case 203:
+
+ { zend_prepare_trait_precedence(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
+ break;
+
+ case 204:
+
+ { zend_resolve_class_name(&(yyvsp[(1) - (1)]), ZEND_FETCH_CLASS_GLOBAL, 1 TSRMLS_CC); zend_init_list(&(yyval).u.op.ptr, Z_STRVAL((yyvsp[(1) - (1)]).u.constant) TSRMLS_CC); }
+ break;
+
+ case 205:
+
+ { zend_resolve_class_name(&(yyvsp[(3) - (3)]), ZEND_FETCH_CLASS_GLOBAL, 1 TSRMLS_CC); zend_add_to_list(&(yyvsp[(1) - (3)]).u.op.ptr, Z_STRVAL((yyvsp[(3) - (3)]).u.constant) TSRMLS_CC); (yyval) = (yyvsp[(1) - (3)]); }
+ break;
+
+ case 206:
+
+ { zend_prepare_reference(&(yyval), NULL, &(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ break;
+
+ case 207:
+
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 208:
+
+ { zend_prepare_reference(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
+ break;
+
+ case 209:
+
+ { zend_prepare_trait_alias(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); }
+ break;
+
+ case 210:
+
+ { zend_prepare_trait_alias(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), NULL TSRMLS_CC); }
+ break;
+
+ case 211:
+
+ { Z_LVAL((yyval).u.constant) = 0x0; }
+ break;
+
+ case 212:
+
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 213:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_ABSTRACT; }
break;
- case 190:
+ case 214:
{ Z_LVAL((yyval).u.constant) = 0; }
break;
- case 191:
+ case 215:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 192:
+ case 216:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_PUBLIC; }
break;
- case 193:
+ case 217:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_PUBLIC; }
break;
- case 194:
+ case 218:
{ (yyval) = (yyvsp[(1) - (1)]); if (!(Z_LVAL((yyval).u.constant) & ZEND_ACC_PPP_MASK)) { Z_LVAL((yyval).u.constant) |= ZEND_ACC_PUBLIC; } }
break;
- case 195:
+ case 219:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 196:
+ case 220:
{ Z_LVAL((yyval).u.constant) = zend_do_verify_access_types(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); }
break;
- case 197:
+ case 221:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_PUBLIC; }
break;
- case 198:
+ case 222:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_PROTECTED; }
break;
- case 199:
+ case 223:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_PRIVATE; }
break;
- case 200:
+ case 224:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_STATIC; }
break;
- case 201:
+ case 225:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_ABSTRACT; }
break;
- case 202:
+ case 226:
{ Z_LVAL((yyval).u.constant) = ZEND_ACC_FINAL; }
break;
- case 203:
+ case 227:
{ zend_do_declare_property(&(yyvsp[(3) - (3)]), NULL, CG(access_type) TSRMLS_CC); }
break;
- case 204:
+ case 228:
{ zend_do_declare_property(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]), CG(access_type) TSRMLS_CC); }
break;
- case 205:
+ case 229:
{ zend_do_declare_property(&(yyvsp[(1) - (1)]), NULL, CG(access_type) TSRMLS_CC); }
break;
- case 206:
+ case 230:
{ zend_do_declare_property(&(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), CG(access_type) TSRMLS_CC); }
break;
- case 207:
+ case 231:
{ zend_do_declare_class_constant(&(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
break;
- case 208:
+ case 232:
{ zend_do_declare_class_constant(&(yyvsp[(2) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); }
break;
- case 209:
+ case 233:
{ zend_do_echo(&(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 210:
+ case 234:
{ zend_do_echo(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 211:
+ case 235:
{ (yyval).op_type = IS_CONST; Z_TYPE((yyval).u.constant) = IS_BOOL; Z_LVAL((yyval).u.constant) = 1; }
break;
- case 212:
+ case 236:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 213:
+ case 237:
{ zend_do_free(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
- case 214:
+ case 238:
{ (yyval) = (yyvsp[(4) - (4)]); }
break;
- case 215:
+ case 239:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 216:
+ case 240:
- { zend_do_list_init(TSRMLS_C); }
+ { (yyval).EA = (yyvsp[(2) - (2)]).EA; }
break;
- case 217:
+ case 241:
- { zend_do_list_end(&(yyval), &(yyvsp[(7) - (7)]) TSRMLS_CC); }
+ { (yyval).EA = (yyvsp[(1) - (1)]).EA; }
break;
- case 218:
+ case 242:
- { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_assign(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
+ { fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 219:
+ case 243:
- { zend_check_writable_variable(&(yyvsp[(1) - (4)])); zend_do_end_variable_parse(&(yyvsp[(4) - (4)]), BP_VAR_W, 1 TSRMLS_CC); zend_do_end_variable_parse(&(yyvsp[(1) - (4)]), BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); }
+ { zend_do_pop_object(&(yyvsp[(1) - (3)]) TSRMLS_CC); fetch_array_dim(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]) TSRMLS_CC); }
break;
- case 220:
+ case 244:
- { zend_error(E_DEPRECATED, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&(yyvsp[(1) - (5)])); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&(yyvsp[(4) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
+ { zend_do_push_object(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 221:
+ case 245:
- { zend_do_end_new_object(&(yyvsp[(3) - (7)]), &(yyvsp[(4) - (7)]), &(yyvsp[(7) - (7)]) TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(&(yyvsp[(1) - (7)]), BP_VAR_W, 0 TSRMLS_CC); (yyvsp[(3) - (7)]).u.EA.type = ZEND_PARSED_NEW; zend_do_assign_ref(&(yyval), &(yyvsp[(1) - (7)]), &(yyvsp[(3) - (7)]) TSRMLS_CC); }
+ { (yyval) = (yyvsp[(3) - (3)]); }
break;
- case 222:
+ case 246:
+
+ { zend_do_push_object(&(yyvsp[(1) - (1)]) TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 247:
+
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 248:
+
+ { (yyval) = (yyvsp[(0) - (0)]); }
+ break;
+
+ case 249:
+
+ { zend_do_push_object(&(yyvsp[(0) - (0)]) TSRMLS_CC); zend_do_begin_variable_parse(TSRMLS_C); }
+ break;
+
+ case 250:
+
+ { zend_do_pop_object(&(yyval) TSRMLS_CC); zend_do_end_variable_parse(&(yyvsp[(2) - (2)]), BP_VAR_R, 0 TSRMLS_CC); }
+ break;
+
+ case 251:
{ zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 223:
+ case 252:
{ zend_do_end_new_object(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 224:
+ case 253:
+
+ { zend_do_list_init(TSRMLS_C); }
+ break;
+
+ case 254:
+
+ { zend_do_list_end(&(yyval), &(yyvsp[(7) - (7)]) TSRMLS_CC); }
+ break;
+
+ case 255:
+
+ { zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_assign(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
+ break;
+
+ case 256:
+
+ { zend_check_writable_variable(&(yyvsp[(1) - (4)])); zend_do_end_variable_parse(&(yyvsp[(4) - (4)]), BP_VAR_W, 1 TSRMLS_CC); zend_do_end_variable_parse(&(yyvsp[(1) - (4)]), BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]) TSRMLS_CC); }
+ break;
+
+ case 257:
+
+ { zend_error(E_DEPRECATED, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&(yyvsp[(1) - (5)])); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&(yyvsp[(4) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
+ break;
+
+ case 258:
+
+ { zend_do_end_new_object(&(yyvsp[(3) - (7)]), &(yyvsp[(4) - (7)]), &(yyvsp[(7) - (7)]) TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(&(yyvsp[(1) - (7)]), BP_VAR_W, 0 TSRMLS_CC); (yyvsp[(3) - (7)]).EA = ZEND_PARSED_NEW; zend_do_assign_ref(&(yyval), &(yyvsp[(1) - (7)]), &(yyvsp[(3) - (7)]) TSRMLS_CC); }
+ break;
+
+ case 259:
{ zend_do_clone(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 225:
+ case 260:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 226:
+ case 261:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SUB, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 227:
+ case 262:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MUL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 228:
+ case 263:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_DIV, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 229:
+ case 264:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_CONCAT, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 230:
+ case 265:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_MOD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 231:
+ case 266:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_AND, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 232:
+ case 267:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_OR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 233:
+ case 268:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_BW_XOR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 234:
+ case 269:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 235:
+ case 270:
{ zend_check_writable_variable(&(yyvsp[(1) - (3)])); zend_do_end_variable_parse(&(yyvsp[(1) - (3)]), BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 236:
+ case 271:
{ zend_do_post_incdec(&(yyval), &(yyvsp[(1) - (2)]), ZEND_POST_INC TSRMLS_CC); }
break;
- case 237:
+ case 272:
{ zend_do_pre_incdec(&(yyval), &(yyvsp[(2) - (2)]), ZEND_PRE_INC TSRMLS_CC); }
break;
- case 238:
+ case 273:
{ zend_do_post_incdec(&(yyval), &(yyvsp[(1) - (2)]), ZEND_POST_DEC TSRMLS_CC); }
break;
- case 239:
+ case 274:
{ zend_do_pre_incdec(&(yyval), &(yyvsp[(2) - (2)]), ZEND_PRE_DEC TSRMLS_CC); }
break;
- case 240:
+ case 275:
{ zend_do_boolean_or_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 241:
+ case 276:
{ zend_do_boolean_or_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 242:
+ case 277:
{ zend_do_boolean_and_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 243:
+ case 278:
{ zend_do_boolean_and_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 244:
+ case 279:
{ zend_do_boolean_or_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 245:
+ case 280:
{ zend_do_boolean_or_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 246:
+ case 281:
{ zend_do_boolean_and_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 247:
+ case 282:
{ zend_do_boolean_and_end(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(4) - (4)]), &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 248:
+ case 283:
{ zend_do_binary_op(ZEND_BOOL_XOR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 249:
+ case 284:
{ zend_do_binary_op(ZEND_BW_OR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 250:
+ case 285:
{ zend_do_binary_op(ZEND_BW_AND, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 251:
+ case 286:
{ zend_do_binary_op(ZEND_BW_XOR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 252:
+ case 287:
{ zend_do_binary_op(ZEND_CONCAT, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 253:
+ case 288:
{ zend_do_binary_op(ZEND_ADD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 254:
+ case 289:
{ zend_do_binary_op(ZEND_SUB, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 255:
+ case 290:
{ zend_do_binary_op(ZEND_MUL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 256:
+ case 291:
{ zend_do_binary_op(ZEND_DIV, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 257:
+ case 292:
{ zend_do_binary_op(ZEND_MOD, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 258:
+ case 293:
{ zend_do_binary_op(ZEND_SL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 259:
+ case 294:
{ zend_do_binary_op(ZEND_SR, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 260:
+ case 295:
{ ZVAL_LONG(&(yyvsp[(1) - (2)]).u.constant, 0); if ((yyvsp[(2) - (2)]).op_type == IS_CONST) { add_function(&(yyvsp[(2) - (2)]).u.constant, &(yyvsp[(1) - (2)]).u.constant, &(yyvsp[(2) - (2)]).u.constant TSRMLS_CC); (yyval) = (yyvsp[(2) - (2)]); } else { (yyvsp[(1) - (2)]).op_type = IS_CONST; INIT_PZVAL(&(yyvsp[(1) - (2)]).u.constant); zend_do_binary_op(ZEND_ADD, &(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } }
break;
- case 261:
+ case 296:
{ ZVAL_LONG(&(yyvsp[(1) - (2)]).u.constant, 0); if ((yyvsp[(2) - (2)]).op_type == IS_CONST) { sub_function(&(yyvsp[(2) - (2)]).u.constant, &(yyvsp[(1) - (2)]).u.constant, &(yyvsp[(2) - (2)]).u.constant TSRMLS_CC); (yyval) = (yyvsp[(2) - (2)]); } else { (yyvsp[(1) - (2)]).op_type = IS_CONST; INIT_PZVAL(&(yyvsp[(1) - (2)]).u.constant); zend_do_binary_op(ZEND_SUB, &(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); } }
break;
- case 262:
+ case 297:
{ zend_do_unary_op(ZEND_BOOL_NOT, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 263:
+ case 298:
{ zend_do_unary_op(ZEND_BW_NOT, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 264:
+ case 299:
{ zend_do_binary_op(ZEND_IS_IDENTICAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 265:
+ case 300:
{ zend_do_binary_op(ZEND_IS_NOT_IDENTICAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 266:
+ case 301:
{ zend_do_binary_op(ZEND_IS_EQUAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 267:
+ case 302:
{ zend_do_binary_op(ZEND_IS_NOT_EQUAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 268:
+ case 303:
{ zend_do_binary_op(ZEND_IS_SMALLER, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 269:
+ case 304:
{ zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 270:
+ case 305:
{ zend_do_binary_op(ZEND_IS_SMALLER, &(yyval), &(yyvsp[(3) - (3)]), &(yyvsp[(1) - (3)]) TSRMLS_CC); }
break;
- case 271:
+ case 306:
{ zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &(yyval), &(yyvsp[(3) - (3)]), &(yyvsp[(1) - (3)]) TSRMLS_CC); }
break;
- case 272:
+ case 307:
{ zend_do_instanceof(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), 0 TSRMLS_CC); }
break;
- case 273:
+ case 308:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 274:
+ case 309:
+
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 310:
+
+ { (yyval) = (yyvsp[(2) - (3)]); }
+ break;
+
+ case 311:
+
+ { (yyval) = (yyvsp[(5) - (5)]); }
+ break;
+
+ case 312:
{ zend_do_begin_qm_op(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 275:
+ case 313:
{ zend_do_qm_true(&(yyvsp[(4) - (5)]), &(yyvsp[(2) - (5)]), &(yyvsp[(5) - (5)]) TSRMLS_CC); }
break;
- case 276:
+ case 314:
{ zend_do_qm_false(&(yyval), &(yyvsp[(7) - (7)]), &(yyvsp[(2) - (7)]), &(yyvsp[(5) - (7)]) TSRMLS_CC); }
break;
- case 277:
+ case 315:
{ zend_do_jmp_set(&(yyvsp[(1) - (3)]), &(yyvsp[(2) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 278:
+ case 316:
{ zend_do_jmp_set_else(&(yyval), &(yyvsp[(5) - (5)]), &(yyvsp[(2) - (5)]), &(yyvsp[(3) - (5)]) TSRMLS_CC); }
break;
- case 279:
+ case 317:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 280:
+ case 318:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_LONG TSRMLS_CC); }
break;
- case 281:
+ case 319:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_DOUBLE TSRMLS_CC); }
break;
- case 282:
+ case 320:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_STRING TSRMLS_CC); }
break;
- case 283:
+ case 321:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_ARRAY TSRMLS_CC); }
break;
- case 284:
+ case 322:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_OBJECT TSRMLS_CC); }
break;
- case 285:
+ case 323:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_BOOL TSRMLS_CC); }
break;
- case 286:
+ case 324:
{ zend_do_cast(&(yyval), &(yyvsp[(2) - (2)]), IS_NULL TSRMLS_CC); }
break;
- case 287:
+ case 325:
{ zend_do_exit(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 288:
+ case 326:
{ zend_do_begin_silence(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 289:
+ case 327:
{ zend_do_end_silence(&(yyvsp[(1) - (3)]) TSRMLS_CC); (yyval) = (yyvsp[(3) - (3)]); }
break;
- case 290:
+ case 328:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 291:
+ case 329:
{ (yyval) = (yyvsp[(3) - (4)]); }
break;
- case 292:
+ case 330:
+
+ { (yyval) = (yyvsp[(2) - (3)]); }
+ break;
+
+ case 331:
{ zend_do_shell_exec(&(yyval), &(yyvsp[(2) - (3)]) TSRMLS_CC); }
break;
- case 293:
+ case 332:
{ zend_do_print(&(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 294:
+ case 333:
- { zend_do_begin_lambda_function_declaration(&(yyval), &(yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]).op_type TSRMLS_CC); }
+ { zend_do_begin_lambda_function_declaration(&(yyval), &(yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]).op_type, 0 TSRMLS_CC); }
break;
- case 295:
+ case 334:
{ zend_do_end_function_declaration(&(yyvsp[(1) - (10)]) TSRMLS_CC); (yyval) = (yyvsp[(4) - (10)]); }
break;
- case 296:
+ case 335:
- { (yyval).u.opline_num = CG(zend_lineno); }
+ { zend_do_begin_lambda_function_declaration(&(yyval), &(yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]).op_type, 1 TSRMLS_CC); }
break;
- case 299:
+ case 336:
+
+ { zend_do_end_function_declaration(&(yyvsp[(2) - (11)]) TSRMLS_CC); (yyval) = (yyvsp[(5) - (11)]); }
+ break;
+
+ case 337:
+
+ { (yyval).u.op.opline_num = CG(zend_lineno); }
+ break;
+
+ case 340:
{ zend_do_fetch_lexical_variable(&(yyvsp[(3) - (3)]), 0 TSRMLS_CC); }
break;
- case 300:
+ case 341:
{ zend_do_fetch_lexical_variable(&(yyvsp[(4) - (4)]), 1 TSRMLS_CC); }
break;
- case 301:
+ case 342:
{ zend_do_fetch_lexical_variable(&(yyvsp[(1) - (1)]), 0 TSRMLS_CC); }
break;
- case 302:
+ case 343:
{ zend_do_fetch_lexical_variable(&(yyvsp[(2) - (2)]), 1 TSRMLS_CC); }
break;
- case 303:
+ case 344:
- { (yyvsp[(2) - (2)]).u.opline_num = zend_do_begin_function_call(&(yyvsp[(1) - (2)]), 1 TSRMLS_CC); }
+ { (yyvsp[(2) - (2)]).u.op.opline_num = zend_do_begin_function_call(&(yyvsp[(1) - (2)]), 1 TSRMLS_CC); }
break;
- case 304:
+ case 345:
- { zend_do_end_function_call(&(yyvsp[(1) - (5)]), &(yyval), &(yyvsp[(4) - (5)]), 0, (yyvsp[(2) - (5)]).u.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ { zend_do_end_function_call(&(yyvsp[(1) - (5)]), &(yyval), &(yyvsp[(4) - (5)]), 0, (yyvsp[(2) - (5)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
break;
- case 305:
+ case 346:
- { (yyvsp[(1) - (4)]).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyvsp[(1) - (4)]).u.constant); zend_do_build_namespace_name(&(yyvsp[(1) - (4)]), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); (yyvsp[(4) - (4)]).u.opline_num = zend_do_begin_function_call(&(yyvsp[(1) - (4)]), 0 TSRMLS_CC); }
+ { (yyvsp[(1) - (4)]).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyvsp[(1) - (4)]).u.constant); zend_do_build_namespace_name(&(yyvsp[(1) - (4)]), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); (yyvsp[(4) - (4)]).u.op.opline_num = zend_do_begin_function_call(&(yyvsp[(1) - (4)]), 0 TSRMLS_CC); }
break;
- case 306:
+ case 347:
- { zend_do_end_function_call(&(yyvsp[(1) - (7)]), &(yyval), &(yyvsp[(6) - (7)]), 0, (yyvsp[(4) - (7)]).u.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ { zend_do_end_function_call(&(yyvsp[(1) - (7)]), &(yyval), &(yyvsp[(6) - (7)]), 0, (yyvsp[(4) - (7)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
break;
- case 307:
+ case 348:
- { (yyvsp[(3) - (3)]).u.opline_num = zend_do_begin_function_call(&(yyvsp[(2) - (3)]), 0 TSRMLS_CC); }
+ { (yyvsp[(3) - (3)]).u.op.opline_num = zend_do_begin_function_call(&(yyvsp[(2) - (3)]), 0 TSRMLS_CC); }
break;
- case 308:
+ case 349:
- { zend_do_end_function_call(&(yyvsp[(2) - (6)]), &(yyval), &(yyvsp[(5) - (6)]), 0, (yyvsp[(3) - (6)]).u.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ { zend_do_end_function_call(&(yyvsp[(2) - (6)]), &(yyval), &(yyvsp[(5) - (6)]), 0, (yyvsp[(3) - (6)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
break;
- case 309:
+ case 350:
- { (yyvsp[(4) - (4)]).u.opline_num = zend_do_begin_class_member_function_call(&(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ { (yyvsp[(4) - (4)]).u.op.opline_num = zend_do_begin_class_member_function_call(&(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 310:
+ case 351:
- { zend_do_end_function_call((yyvsp[(4) - (7)]).u.opline_num?NULL:&(yyvsp[(3) - (7)]), &(yyval), &(yyvsp[(6) - (7)]), (yyvsp[(4) - (7)]).u.opline_num, (yyvsp[(4) - (7)]).u.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ { zend_do_end_function_call((yyvsp[(4) - (7)]).u.op.opline_num?NULL:&(yyvsp[(3) - (7)]), &(yyval), &(yyvsp[(6) - (7)]), (yyvsp[(4) - (7)]).u.op.opline_num, (yyvsp[(4) - (7)]).u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 311:
+ case 352:
{ zend_do_end_variable_parse(&(yyvsp[(3) - (4)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 312:
+ case 353:
{ zend_do_end_function_call(NULL, &(yyval), &(yyvsp[(6) - (7)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 313:
+ case 354:
{ zend_do_begin_class_member_function_call(&(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 314:
+ case 355:
{ zend_do_end_function_call(NULL, &(yyval), &(yyvsp[(6) - (7)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 315:
+ case 356:
{ zend_do_end_variable_parse(&(yyvsp[(3) - (4)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 316:
+ case 357:
{ zend_do_end_function_call(NULL, &(yyval), &(yyvsp[(6) - (7)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 317:
+ case 358:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (2)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_dynamic_function_call(&(yyvsp[(1) - (2)]), 0 TSRMLS_CC); }
break;
- case 318:
+ case 359:
{ zend_do_end_function_call(&(yyvsp[(1) - (5)]), &(yyval), &(yyvsp[(4) - (5)]), 0, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
break;
- case 319:
+ case 360:
{ (yyval).op_type = IS_CONST; ZVAL_STRINGL(&(yyval).u.constant, "static", sizeof("static")-1, 1);}
break;
- case 320:
+ case 361:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 321:
+ case 362:
{ (yyval).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyval).u.constant); zend_do_build_namespace_name(&(yyval), &(yyval), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 322:
+ case 363:
{ char *tmp = estrndup(Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL((yyvsp[(2) - (2)]).u.constant)); Z_STRVAL((yyvsp[(2) - (2)]).u.constant) = tmp; ++Z_STRLEN((yyvsp[(2) - (2)]).u.constant); (yyval) = (yyvsp[(2) - (2)]); }
break;
- case 323:
+ case 364:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 324:
+ case 365:
{ (yyval).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyval).u.constant); zend_do_build_namespace_name(&(yyval), &(yyval), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 325:
+ case 366:
{ char *tmp = estrndup(Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL((yyvsp[(2) - (2)]).u.constant)); Z_STRVAL((yyvsp[(2) - (2)]).u.constant) = tmp; ++Z_STRLEN((yyvsp[(2) - (2)]).u.constant); (yyval) = (yyvsp[(2) - (2)]); }
break;
- case 326:
+ case 367:
{ zend_do_fetch_class(&(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 327:
+ case 368:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_fetch_class(&(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 328:
+ case 369:
{ zend_do_push_object(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
- case 329:
+ case 370:
- { zend_do_push_object(&(yyvsp[(4) - (4)]) TSRMLS_CC); zend_do_declare_implicit_property(TSRMLS_C); }
+ { zend_do_push_object(&(yyvsp[(4) - (4)]) TSRMLS_CC); }
break;
- case 330:
+ case 371:
- { zend_do_pop_object(&(yyval) TSRMLS_CC); (yyval).u.EA.type = ZEND_PARSED_MEMBER; }
+ { zend_do_pop_object(&(yyval) TSRMLS_CC); (yyval).EA = ZEND_PARSED_MEMBER; }
break;
- case 331:
+ case 372:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 334:
+ case 375:
- { zend_do_push_object(&(yyvsp[(2) - (2)]) TSRMLS_CC); zend_do_declare_implicit_property(TSRMLS_C); }
+ { zend_do_push_object(&(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 335:
+ case 376:
{ memset(&(yyval), 0, sizeof(znode)); (yyval).op_type = IS_UNUSED; }
break;
- case 336:
+ case 377:
{ memset(&(yyval), 0, sizeof(znode)); (yyval).op_type = IS_UNUSED; }
break;
- case 337:
+ case 378:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 338:
+ case 379:
{ ZVAL_EMPTY_STRING(&(yyval).u.constant); INIT_PZVAL(&(yyval).u.constant); (yyval).op_type = IS_CONST; }
break;
- case 339:
+ case 380:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 340:
+ case 381:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 341:
+ case 382:
{ Z_LVAL((yyval).u.constant)=0; }
break;
- case 342:
+ case 383:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 343:
+ case 384:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 344:
+ case 385:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 345:
+ case 386:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 346:
+ case 387:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 347:
+ case 388:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 348:
+ case 389:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 349:
+ case 390:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 350:
+ case 391:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 351:
+ case 392:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 352:
+ case 393:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 353:
+ case 394:
{ (yyval) = (yyvsp[(2) - (3)]); CG(heredoc) = Z_STRVAL((yyvsp[(1) - (3)]).u.constant); CG(heredoc_len) = Z_STRLEN((yyvsp[(1) - (3)]).u.constant); }
break;
- case 354:
+ case 395:
{ ZVAL_EMPTY_STRING(&(yyval).u.constant); INIT_PZVAL(&(yyval).u.constant); (yyval).op_type = IS_CONST; CG(heredoc) = Z_STRVAL((yyvsp[(1) - (2)]).u.constant); CG(heredoc_len) = Z_STRLEN((yyvsp[(1) - (2)]).u.constant); }
break;
- case 355:
+ case 396:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 356:
+ case 397:
{ zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(1) - (1)]), ZEND_CT, 1 TSRMLS_CC); }
break;
- case 357:
+ case 398:
{ (yyval).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyval).u.constant); zend_do_build_namespace_name(&(yyval), &(yyval), &(yyvsp[(3) - (3)]) TSRMLS_CC); (yyvsp[(3) - (3)]) = (yyval); zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(3) - (3)]), ZEND_CT, 0 TSRMLS_CC); }
break;
- case 358:
+ case 399:
{ char *tmp = estrndup(Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL((yyvsp[(2) - (2)]).u.constant)); Z_STRVAL((yyvsp[(2) - (2)]).u.constant) = tmp; ++Z_STRLEN((yyvsp[(2) - (2)]).u.constant); zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(2) - (2)]), ZEND_CT, 0 TSRMLS_CC); }
break;
- case 359:
+ case 400:
{ ZVAL_LONG(&(yyvsp[(1) - (2)]).u.constant, 0); add_function(&(yyvsp[(2) - (2)]).u.constant, &(yyvsp[(1) - (2)]).u.constant, &(yyvsp[(2) - (2)]).u.constant TSRMLS_CC); (yyval) = (yyvsp[(2) - (2)]); }
break;
- case 360:
+ case 401:
{ ZVAL_LONG(&(yyvsp[(1) - (2)]).u.constant, 0); sub_function(&(yyvsp[(2) - (2)]).u.constant, &(yyvsp[(1) - (2)]).u.constant, &(yyvsp[(2) - (2)]).u.constant TSRMLS_CC); (yyval) = (yyvsp[(2) - (2)]); }
break;
- case 361:
+ case 402:
{ (yyval) = (yyvsp[(3) - (4)]); Z_TYPE((yyval).u.constant) = IS_CONSTANT_ARRAY; }
break;
- case 362:
+ case 403:
+
+ { (yyval) = (yyvsp[(2) - (3)]); Z_TYPE((yyval).u.constant) = IS_CONSTANT_ARRAY; }
+ break;
+
+ case 404:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 363:
+ case 405:
+
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 406:
{ zend_do_fetch_constant(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_CT, 0 TSRMLS_CC); }
break;
- case 364:
+ case 407:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 365:
+ case 408:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 366:
+ case 409:
{ zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(1) - (1)]), ZEND_RT, 1 TSRMLS_CC); }
break;
- case 367:
+ case 410:
{ (yyval).op_type = IS_CONST; ZVAL_EMPTY_STRING(&(yyval).u.constant); zend_do_build_namespace_name(&(yyval), &(yyval), &(yyvsp[(3) - (3)]) TSRMLS_CC); (yyvsp[(3) - (3)]) = (yyval); zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(3) - (3)]), ZEND_RT, 0 TSRMLS_CC); }
break;
- case 368:
+ case 411:
{ char *tmp = estrndup(Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL((yyvsp[(2) - (2)]).u.constant), Z_STRLEN((yyvsp[(2) - (2)]).u.constant)+1); tmp[0] = '\\'; efree(Z_STRVAL((yyvsp[(2) - (2)]).u.constant)); Z_STRVAL((yyvsp[(2) - (2)]).u.constant) = tmp; ++Z_STRLEN((yyvsp[(2) - (2)]).u.constant); zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(2) - (2)]), ZEND_RT, 0 TSRMLS_CC); }
break;
- case 369:
+ case 412:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 370:
+ case 413:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 371:
+ case 414:
{ (yyval) = (yyvsp[(2) - (3)]); CG(heredoc) = Z_STRVAL((yyvsp[(1) - (3)]).u.constant); CG(heredoc_len) = Z_STRLEN((yyvsp[(1) - (3)]).u.constant); }
break;
- case 372:
+ case 415:
+
+ { if (Z_TYPE((yyvsp[(1) - (1)]).u.constant) == IS_CONSTANT) {zend_do_fetch_constant(&(yyval), NULL, &(yyvsp[(1) - (1)]), ZEND_RT, 1 TSRMLS_CC);} else {(yyval) = (yyvsp[(1) - (1)]);} }
+ break;
+
+ case 416:
{ (yyval).op_type = IS_CONST; INIT_PZVAL(&(yyval).u.constant); array_init(&(yyval).u.constant); }
break;
- case 373:
+ case 417:
{ (yyval) = (yyvsp[(1) - (2)]); }
break;
- case 376:
+ case 420:
{ zend_do_add_static_array_element(&(yyval), &(yyvsp[(3) - (5)]), &(yyvsp[(5) - (5)])); }
break;
- case 377:
+ case 421:
{ zend_do_add_static_array_element(&(yyval), NULL, &(yyvsp[(3) - (3)])); }
break;
- case 378:
+ case 422:
{ (yyval).op_type = IS_CONST; INIT_PZVAL(&(yyval).u.constant); array_init(&(yyval).u.constant); zend_do_add_static_array_element(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); }
break;
- case 379:
+ case 423:
{ (yyval).op_type = IS_CONST; INIT_PZVAL(&(yyval).u.constant); array_init(&(yyval).u.constant); zend_do_add_static_array_element(&(yyval), NULL, &(yyvsp[(1) - (1)])); }
break;
- case 380:
+ case 424:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 381:
+ case 425:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 382:
+ case 426:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 383:
+ case 427:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_W, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]);
zend_check_writable_variable(&(yyvsp[(1) - (1)])); }
break;
- case 384:
+ case 428:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_RW, 0 TSRMLS_CC); (yyval) = (yyvsp[(1) - (1)]);
zend_check_writable_variable(&(yyvsp[(1) - (1)])); }
break;
- case 385:
+ case 429:
{ zend_do_push_object(&(yyvsp[(1) - (2)]) TSRMLS_CC); }
break;
- case 386:
+ case 430:
{ zend_do_push_object(&(yyvsp[(4) - (4)]) TSRMLS_CC); }
break;
- case 387:
+ case 431:
- { zend_do_pop_object(&(yyval) TSRMLS_CC); (yyval).u.EA.type = (yyvsp[(1) - (7)]).u.EA.type | ((yyvsp[(7) - (7)]).u.EA.type ? (yyvsp[(7) - (7)]).u.EA.type : (yyvsp[(6) - (7)]).u.EA.type); }
+ { zend_do_pop_object(&(yyval) TSRMLS_CC); (yyval).EA = (yyvsp[(1) - (7)]).EA | ((yyvsp[(7) - (7)]).EA ? (yyvsp[(7) - (7)]).EA : (yyvsp[(6) - (7)]).EA); }
break;
- case 388:
+ case 432:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 389:
+ case 433:
- { (yyval).u.EA.type = (yyvsp[(2) - (2)]).u.EA.type; }
+ { (yyval).EA = (yyvsp[(2) - (2)]).EA; }
break;
- case 390:
+ case 434:
- { (yyval).u.EA.type = 0; }
+ { (yyval).EA = 0; }
break;
- case 391:
+ case 435:
{ zend_do_push_object(&(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 392:
+ case 436:
- { (yyval).u.EA.type = (yyvsp[(4) - (4)]).u.EA.type; }
+ { (yyval).EA = (yyvsp[(4) - (4)]).EA; }
break;
- case 393:
+ case 437:
+
+ { fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ break;
+
+ case 438:
+
+ { (yyvsp[(1) - (4)]).EA = ZEND_PARSED_METHOD_CALL; fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ break;
+
+ case 439:
{ zend_do_pop_object(&(yyvsp[(1) - (1)]) TSRMLS_CC); zend_do_begin_method_call(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 394:
+ case 440:
- { zend_do_end_function_call(&(yyvsp[(1) - (4)]), &(yyval), &(yyvsp[(3) - (4)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);
- zend_do_push_object(&(yyval) TSRMLS_CC); (yyval).u.EA.type = ZEND_PARSED_METHOD_CALL; }
+ { zend_do_end_function_call(&(yyvsp[(1) - (4)]), &(yyval), &(yyvsp[(3) - (4)]), 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
break;
- case 395:
+ case 441:
- { zend_do_declare_implicit_property(TSRMLS_C); (yyval).u.EA.type = ZEND_PARSED_MEMBER; }
+ { (yyval) = (yyvsp[(1) - (1)]); (yyval).EA = ZEND_PARSED_METHOD_CALL; zend_do_push_object(&(yyval) TSRMLS_CC); }
break;
- case 396:
+ case 442:
+
+ { (yyval) = (yyvsp[(1) - (1)]); zend_do_push_object(&(yyval) TSRMLS_CC); }
+ break;
+
+ case 443:
+
+ { (yyval).EA = ZEND_PARSED_MEMBER; }
+ break;
+
+ case 444:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 397:
+ case 445:
{ zend_do_indirect_references(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 398:
+ case 446:
{ (yyval) = (yyvsp[(3) - (3)]); zend_do_fetch_static_member(&(yyval), &(yyvsp[(1) - (3)]) TSRMLS_CC); }
break;
- case 399:
+ case 447:
{ (yyval) = (yyvsp[(3) - (3)]); zend_do_fetch_static_member(&(yyval), &(yyvsp[(1) - (3)]) TSRMLS_CC); }
break;
- case 400:
+ case 448:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); (yyval)=(yyvsp[(1) - (1)]);; }
break;
- case 401:
+ case 449:
+
+ { fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
+ break;
+
+ case 450:
+
+ { zend_do_begin_variable_parse(TSRMLS_C); (yyvsp[(1) - (1)]).EA = ZEND_PARSED_FUNCTION_CALL; }
+ break;
+
+ case 451:
+
+ { fetch_array_dim(&(yyval), &(yyvsp[(1) - (5)]), &(yyvsp[(4) - (5)]) TSRMLS_CC); }
+ break;
+
+ case 452:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 402:
+ case 453:
- { zend_do_begin_variable_parse(TSRMLS_C); (yyval) = (yyvsp[(1) - (1)]); (yyval).u.EA.type = ZEND_PARSED_FUNCTION_CALL; }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 403:
+ case 454:
- { (yyval) = (yyvsp[(1) - (1)]); (yyval).u.EA.type = ZEND_PARSED_VARIABLE; }
+ { zend_do_begin_variable_parse(TSRMLS_C); (yyval) = (yyvsp[(1) - (1)]); (yyval).EA = ZEND_PARSED_FUNCTION_CALL; }
break;
- case 404:
+ case 455:
- { zend_do_indirect_references(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); (yyval).u.EA.type = ZEND_PARSED_VARIABLE; }
+ { (yyval) = (yyvsp[(1) - (1)]); (yyval).EA = ZEND_PARSED_VARIABLE; }
break;
- case 405:
+ case 456:
- { (yyval) = (yyvsp[(1) - (1)]); (yyval).u.EA.type = ZEND_PARSED_STATIC_MEMBER; }
+ { zend_do_indirect_references(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); (yyval).EA = ZEND_PARSED_VARIABLE; }
break;
- case 406:
+ case 457:
+
+ { (yyval) = (yyvsp[(1) - (1)]); (yyval).EA = ZEND_PARSED_STATIC_MEMBER; }
+ break;
+
+ case 458:
{ fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 407:
+ case 459:
{ fetch_string_offset(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 408:
+ case 460:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); }
break;
- case 409:
+ case 461:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 410:
+ case 462:
{ (yyval) = (yyvsp[(3) - (4)]); }
break;
- case 411:
+ case 463:
{ (yyval).op_type = IS_UNUSED; }
break;
- case 412:
+ case 464:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 413:
+ case 465:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 414:
+ case 466:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); }
break;
- case 415:
+ case 467:
{ znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&(yyval), &tmp_znode, &(yyvsp[(1) - (2)]) TSRMLS_CC);}
break;
- case 416:
+ case 468:
{ fetch_array_dim(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 417:
+ case 469:
{ fetch_string_offset(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 418:
+ case 470:
{ znode tmp_znode; zend_do_pop_object(&tmp_znode TSRMLS_CC); zend_do_fetch_property(&(yyval), &tmp_znode, &(yyvsp[(1) - (1)]) TSRMLS_CC);}
break;
- case 419:
+ case 471:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 420:
+ case 472:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 421:
+ case 473:
{ Z_LVAL((yyval).u.constant) = 1; }
break;
- case 422:
+ case 474:
{ Z_LVAL((yyval).u.constant)++; }
break;
- case 425:
+ case 477:
{ zend_do_add_list_element(&(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 426:
+ case 478:
{ zend_do_new_list_begin(TSRMLS_C); }
break;
- case 427:
+ case 479:
{ zend_do_new_list_end(TSRMLS_C); }
break;
- case 428:
+ case 480:
{ zend_do_add_list_element(NULL TSRMLS_CC); }
break;
- case 429:
+ case 481:
{ zend_do_init_array(&(yyval), NULL, NULL, 0 TSRMLS_CC); }
break;
- case 430:
+ case 482:
{ (yyval) = (yyvsp[(1) - (2)]); }
break;
- case 431:
+ case 483:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(5) - (5)]), &(yyvsp[(3) - (5)]), 0 TSRMLS_CC); }
break;
- case 432:
+ case 484:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(3) - (3)]), NULL, 0 TSRMLS_CC); }
break;
- case 433:
+ case 485:
{ zend_do_init_array(&(yyval), &(yyvsp[(3) - (3)]), &(yyvsp[(1) - (3)]), 0 TSRMLS_CC); }
break;
- case 434:
+ case 486:
{ zend_do_init_array(&(yyval), &(yyvsp[(1) - (1)]), NULL, 0 TSRMLS_CC); }
break;
- case 435:
+ case 487:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(6) - (6)]), &(yyvsp[(3) - (6)]), 1 TSRMLS_CC); }
break;
- case 436:
+ case 488:
{ zend_do_add_array_element(&(yyval), &(yyvsp[(4) - (4)]), NULL, 1 TSRMLS_CC); }
break;
- case 437:
+ case 489:
{ zend_do_init_array(&(yyval), &(yyvsp[(4) - (4)]), &(yyvsp[(1) - (4)]), 1 TSRMLS_CC); }
break;
- case 438:
+ case 490:
{ zend_do_init_array(&(yyval), &(yyvsp[(2) - (2)]), NULL, 1 TSRMLS_CC); }
break;
- case 439:
+ case 491:
{ zend_do_end_variable_parse(&(yyvsp[(2) - (2)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 440:
+ case 492:
{ zend_do_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 441:
+ case 493:
{ zend_do_end_variable_parse(&(yyvsp[(1) - (1)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&(yyval), NULL, &(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 442:
+ case 494:
{ zend_do_add_string(&(yyval), NULL, &(yyvsp[(1) - (2)]) TSRMLS_CC); zend_do_end_variable_parse(&(yyvsp[(2) - (2)]), BP_VAR_R, 0 TSRMLS_CC); zend_do_add_variable(&(yyval), &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 443:
+ case 495:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); }
break;
- case 444:
+ case 496:
{ zend_do_begin_variable_parse(TSRMLS_C); }
break;
- case 445:
+ case 497:
{ fetch_array_begin(&(yyval), &(yyvsp[(1) - (5)]), &(yyvsp[(4) - (5)]) TSRMLS_CC); }
break;
- case 446:
+ case 498:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyvsp[(2) - (3)]), &(yyvsp[(1) - (3)]), 1 TSRMLS_CC); zend_do_fetch_property(&(yyval), &(yyvsp[(2) - (3)]), &(yyvsp[(3) - (3)]) TSRMLS_CC); }
break;
- case 447:
+ case 499:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_simple_variable(&(yyval), &(yyvsp[(2) - (3)]), 1 TSRMLS_CC); }
break;
- case 448:
+ case 500:
{ zend_do_begin_variable_parse(TSRMLS_C); fetch_array_begin(&(yyval), &(yyvsp[(2) - (6)]), &(yyvsp[(4) - (6)]) TSRMLS_CC); }
break;
- case 449:
+ case 501:
{ (yyval) = (yyvsp[(2) - (3)]); }
break;
- case 450:
+ case 502:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 451:
+ case 503:
{ (yyval) = (yyvsp[(1) - (1)]); }
break;
- case 452:
+ case 504:
{ fetch_simple_variable(&(yyval), &(yyvsp[(1) - (1)]), 1 TSRMLS_CC); }
break;
- case 453:
+ case 505:
{ (yyval) = (yyvsp[(3) - (4)]); }
break;
- case 454:
+ case 506:
{ zend_do_isset_or_isempty(ZEND_ISEMPTY, &(yyval), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 455:
+ case 507:
{ zend_do_include_or_eval(ZEND_INCLUDE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 456:
+ case 508:
{ zend_do_include_or_eval(ZEND_INCLUDE_ONCE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 457:
+ case 509:
{ zend_do_include_or_eval(ZEND_EVAL, &(yyval), &(yyvsp[(3) - (4)]) TSRMLS_CC); }
break;
- case 458:
+ case 510:
{ zend_do_include_or_eval(ZEND_REQUIRE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 459:
+ case 511:
{ zend_do_include_or_eval(ZEND_REQUIRE_ONCE, &(yyval), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 460:
+ case 512:
{ zend_do_isset_or_isempty(ZEND_ISSET, &(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); }
break;
- case 461:
+ case 513:
{ zend_do_boolean_and_begin(&(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)]) TSRMLS_CC); }
break;
- case 462:
+ case 514:
{ znode tmp; zend_do_isset_or_isempty(ZEND_ISSET, &tmp, &(yyvsp[(4) - (4)]) TSRMLS_CC); zend_do_boolean_and_end(&(yyval), &(yyvsp[(1) - (4)]), &tmp, &(yyvsp[(2) - (4)]) TSRMLS_CC); }
break;
- case 463:
+ case 515:
{ zend_do_fetch_constant(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_RT, 0 TSRMLS_CC); }
break;
- case 464:
+ case 516:
{ zend_do_fetch_constant(&(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)]), ZEND_RT, 0 TSRMLS_CC); }
break;
+/* Line 1267 of yacc.c. */
default: break;
}
@@ -5443,6 +5812,7 @@ yyreduce:
*++yyvsp = yyval;
+
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -5507,7 +5877,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -5524,7 +5894,7 @@ yyerrlab:
}
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
goto yyerrlab1;
@@ -5581,6 +5951,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
*++yyvsp = yylval;
@@ -5605,7 +5978,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#ifndef yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -5616,7 +5989,7 @@ yyexhaustedlab:
#endif
yyreturn:
- if (yychar != YYEMPTY)
+ if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval);
/* Do not reclaim the symbols of the rule which action triggered
@@ -5645,6 +6018,74 @@ yyreturn:
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T zend_yytnamerr(char *yyres, const char *yystr)
+{
+ if (!yyres) {
+ return yystrlen(yystr);
+ }
+ {
+ TSRMLS_FETCH();
+ if (CG(parse_error) == 0) {
+ char buffer[120];
+ const unsigned char *end, *str, *tok1 = NULL, *tok2 = NULL;
+ unsigned int len = 0, toklen = 0, yystr_len;
+
+ CG(parse_error) = 1;
+
+ if (LANG_SCNG(yy_text)[0] == 0 &&
+ LANG_SCNG(yy_leng) == 1 &&
+ memcmp(yystr, ZEND_STRL("\"end of file\"")) == 0) {
+ yystpcpy(yyres, "end of file");
+ return sizeof("end of file")-1;
+ }
+
+ str = LANG_SCNG(yy_text);
+ end = memchr(str, '\n', LANG_SCNG(yy_leng));
+ yystr_len = yystrlen(yystr);
+
+ if ((tok1 = memchr(yystr, '(', yystr_len)) != NULL
+ && (tok2 = zend_memrchr(yystr, ')', yystr_len)) != NULL) {
+ toklen = (tok2 - tok1) + 1;
+ } else {
+ tok1 = tok2 = NULL;
+ toklen = 0;
+ }
+
+ if (end == NULL) {
+ len = LANG_SCNG(yy_leng) > 30 ? 30 : LANG_SCNG(yy_leng);
+ } else {
+ len = (end - str) > 30 ? 30 : (end - str);
+ }
+ if (toklen) {
+ snprintf(buffer, sizeof(buffer), "'%.*s' %.*s", len, str, toklen, tok1);
+ } else {
+ snprintf(buffer, sizeof(buffer), "'%.*s'", len, str);
+ }
+ yystpcpy(yyres, buffer);
+ return len + (toklen ? toklen + 1 : 0) + 2;
+ }
+ }
+ if (*yystr == '"') {
+ YYSIZE_T yyn = 0;
+ const char *yyp = yystr;
+
+ for (; *++yyp != '"'; ++yyn) {
+ yyres[yyn] = *yyp;
+ }
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ yystpcpy(yyres, yystr);
+ return strlen(yystr);
+}
+
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_language_parser.h b/Zend/zend_language_parser.h
index be6c758ad..152ff00e7 100644
--- a/Zend/zend_language_parser.h
+++ b/Zend/zend_language_parser.h
@@ -1,23 +1,24 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
+
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -28,17 +29,17 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
+ END = 0,
T_REQUIRE_ONCE = 258,
T_REQUIRE = 259,
T_EVAL = 260,
@@ -122,49 +123,54 @@
T_CATCH = 338,
T_THROW = 339,
T_USE = 340,
- T_GLOBAL = 341,
- T_PUBLIC = 342,
- T_PROTECTED = 343,
- T_PRIVATE = 344,
- T_FINAL = 345,
- T_ABSTRACT = 346,
- T_STATIC = 347,
- T_VAR = 348,
- T_UNSET = 349,
- T_ISSET = 350,
- T_EMPTY = 351,
- T_HALT_COMPILER = 352,
- T_CLASS = 353,
- T_INTERFACE = 354,
- T_EXTENDS = 355,
- T_IMPLEMENTS = 356,
- T_OBJECT_OPERATOR = 357,
- T_DOUBLE_ARROW = 358,
- T_LIST = 359,
- T_ARRAY = 360,
- T_CLASS_C = 361,
- T_METHOD_C = 362,
- T_FUNC_C = 363,
- T_LINE = 364,
- T_FILE = 365,
- T_COMMENT = 366,
- T_DOC_COMMENT = 367,
- T_OPEN_TAG = 368,
- T_OPEN_TAG_WITH_ECHO = 369,
- T_CLOSE_TAG = 370,
- T_WHITESPACE = 371,
- T_START_HEREDOC = 372,
- T_END_HEREDOC = 373,
- T_DOLLAR_OPEN_CURLY_BRACES = 374,
- T_CURLY_OPEN = 375,
- T_PAAMAYIM_NEKUDOTAYIM = 376,
- T_NAMESPACE = 377,
- T_NS_C = 378,
- T_DIR = 379,
- T_NS_SEPARATOR = 380
+ T_INSTEADOF = 341,
+ T_GLOBAL = 342,
+ T_PUBLIC = 343,
+ T_PROTECTED = 344,
+ T_PRIVATE = 345,
+ T_FINAL = 346,
+ T_ABSTRACT = 347,
+ T_STATIC = 348,
+ T_VAR = 349,
+ T_UNSET = 350,
+ T_ISSET = 351,
+ T_EMPTY = 352,
+ T_HALT_COMPILER = 353,
+ T_CLASS = 354,
+ T_TRAIT = 355,
+ T_INTERFACE = 356,
+ T_EXTENDS = 357,
+ T_IMPLEMENTS = 358,
+ T_OBJECT_OPERATOR = 359,
+ T_DOUBLE_ARROW = 360,
+ T_LIST = 361,
+ T_ARRAY = 362,
+ T_CALLABLE = 363,
+ T_CLASS_C = 364,
+ T_TRAIT_C = 365,
+ T_METHOD_C = 366,
+ T_FUNC_C = 367,
+ T_LINE = 368,
+ T_FILE = 369,
+ T_COMMENT = 370,
+ T_DOC_COMMENT = 371,
+ T_OPEN_TAG = 372,
+ T_OPEN_TAG_WITH_ECHO = 373,
+ T_CLOSE_TAG = 374,
+ T_WHITESPACE = 375,
+ T_START_HEREDOC = 376,
+ T_END_HEREDOC = 377,
+ T_DOLLAR_OPEN_CURLY_BRACES = 378,
+ T_CURLY_OPEN = 379,
+ T_PAAMAYIM_NEKUDOTAYIM = 380,
+ T_NAMESPACE = 381,
+ T_NS_C = 382,
+ T_DIR = 383,
+ T_NS_SEPARATOR = 384
};
#endif
/* Tokens. */
+#define END 0
#define T_REQUIRE_ONCE 258
#define T_REQUIRE 259
#define T_EVAL 260
@@ -248,57 +254,60 @@
#define T_CATCH 338
#define T_THROW 339
#define T_USE 340
-#define T_GLOBAL 341
-#define T_PUBLIC 342
-#define T_PROTECTED 343
-#define T_PRIVATE 344
-#define T_FINAL 345
-#define T_ABSTRACT 346
-#define T_STATIC 347
-#define T_VAR 348
-#define T_UNSET 349
-#define T_ISSET 350
-#define T_EMPTY 351
-#define T_HALT_COMPILER 352
-#define T_CLASS 353
-#define T_INTERFACE 354
-#define T_EXTENDS 355
-#define T_IMPLEMENTS 356
-#define T_OBJECT_OPERATOR 357
-#define T_DOUBLE_ARROW 358
-#define T_LIST 359
-#define T_ARRAY 360
-#define T_CLASS_C 361
-#define T_METHOD_C 362
-#define T_FUNC_C 363
-#define T_LINE 364
-#define T_FILE 365
-#define T_COMMENT 366
-#define T_DOC_COMMENT 367
-#define T_OPEN_TAG 368
-#define T_OPEN_TAG_WITH_ECHO 369
-#define T_CLOSE_TAG 370
-#define T_WHITESPACE 371
-#define T_START_HEREDOC 372
-#define T_END_HEREDOC 373
-#define T_DOLLAR_OPEN_CURLY_BRACES 374
-#define T_CURLY_OPEN 375
-#define T_PAAMAYIM_NEKUDOTAYIM 376
-#define T_NAMESPACE 377
-#define T_NS_C 378
-#define T_DIR 379
-#define T_NS_SEPARATOR 380
+#define T_INSTEADOF 341
+#define T_GLOBAL 342
+#define T_PUBLIC 343
+#define T_PROTECTED 344
+#define T_PRIVATE 345
+#define T_FINAL 346
+#define T_ABSTRACT 347
+#define T_STATIC 348
+#define T_VAR 349
+#define T_UNSET 350
+#define T_ISSET 351
+#define T_EMPTY 352
+#define T_HALT_COMPILER 353
+#define T_CLASS 354
+#define T_TRAIT 355
+#define T_INTERFACE 356
+#define T_EXTENDS 357
+#define T_IMPLEMENTS 358
+#define T_OBJECT_OPERATOR 359
+#define T_DOUBLE_ARROW 360
+#define T_LIST 361
+#define T_ARRAY 362
+#define T_CALLABLE 363
+#define T_CLASS_C 364
+#define T_TRAIT_C 365
+#define T_METHOD_C 366
+#define T_FUNC_C 367
+#define T_LINE 368
+#define T_FILE 369
+#define T_COMMENT 370
+#define T_DOC_COMMENT 371
+#define T_OPEN_TAG 372
+#define T_OPEN_TAG_WITH_ECHO 373
+#define T_CLOSE_TAG 374
+#define T_WHITESPACE 375
+#define T_START_HEREDOC 376
+#define T_END_HEREDOC 377
+#define T_DOLLAR_OPEN_CURLY_BRACES 378
+#define T_CURLY_OPEN 379
+#define T_PAAMAYIM_NEKUDOTAYIM 380
+#define T_NAMESPACE 381
+#define T_NS_C 382
+#define T_DIR 383
+#define T_NS_SEPARATOR 384
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
-
diff --git a/Zend/zend_language_parser.output b/Zend/zend_language_parser.output
index 1034fdce6..a67c1a458 100644
--- a/Zend/zend_language_parser.output
+++ b/Zend/zend_language_parser.output
@@ -1,153 +1,154 @@
-Terminals unused in grammar
+Terminals which are not used
T_CHARACTER
T_BAD_CHARACTER
- T_COMMENT
- T_DOC_COMMENT
- T_OPEN_TAG
- T_OPEN_TAG_WITH_ECHO
- T_CLOSE_TAG
- T_WHITESPACE
+ "comment (T_COMMENT)"
+ "doc comment (T_DOC_COMMENT)"
+ "open tag (T_OPEN_TAG)"
+ "open tag with echo (T_OPEN_TAG_WITH_ECHO)"
+ "close tag (T_CLOSE_TAG)"
+ "whitespace (T_WHITESPACE)"
-State 725 conflicts: 2 shift/reduce
+State 216 conflicts: 1 shift/reduce
+State 776 conflicts: 2 shift/reduce
Grammar
- 0 $accept: start $end
+ 0 $accept: start "end of file"
1 start: top_statement_list
- 2 $@1: /* empty */
+ 2 @1: /* empty */
- 3 top_statement_list: top_statement_list $@1 top_statement
+ 3 top_statement_list: top_statement_list @1 top_statement
4 | /* empty */
- 5 namespace_name: T_STRING
- 6 | namespace_name T_NS_SEPARATOR T_STRING
+ 5 namespace_name: "identifier (T_STRING)"
+ 6 | namespace_name "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
7 top_statement: statement
8 | function_declaration_statement
9 | class_declaration_statement
- 10 | T_HALT_COMPILER '(' ')' ';'
- 11 | T_NAMESPACE namespace_name ';'
+ 10 | "__halt_compiler (T_HALT_COMPILER)" '(' ')' ';'
+ 11 | "namespace (T_NAMESPACE)" namespace_name ';'
- 12 $@2: /* empty */
+ 12 @2: /* empty */
- 13 top_statement: T_NAMESPACE namespace_name '{' $@2 top_statement_list '}'
+ 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' @2 top_statement_list '}'
- 14 $@3: /* empty */
+ 14 @3: /* empty */
- 15 top_statement: T_NAMESPACE '{' $@3 top_statement_list '}'
- 16 | T_USE use_declarations ';'
+ 15 top_statement: "namespace (T_NAMESPACE)" '{' @3 top_statement_list '}'
+ 16 | "use (T_USE)" use_declarations ';'
17 | constant_declaration ';'
18 use_declarations: use_declarations ',' use_declaration
19 | use_declaration
20 use_declaration: namespace_name
- 21 | namespace_name T_AS T_STRING
- 22 | T_NS_SEPARATOR namespace_name
- 23 | T_NS_SEPARATOR namespace_name T_AS T_STRING
+ 21 | namespace_name "as (T_AS)" "identifier (T_STRING)"
+ 22 | "\\ (T_NS_SEPARATOR)" namespace_name
+ 23 | "\\ (T_NS_SEPARATOR)" namespace_name "as (T_AS)" "identifier (T_STRING)"
- 24 constant_declaration: constant_declaration ',' T_STRING '=' static_scalar
- 25 | T_CONST T_STRING '=' static_scalar
+ 24 constant_declaration: constant_declaration ',' "identifier (T_STRING)" '=' static_scalar
+ 25 | "const (T_CONST)" "identifier (T_STRING)" '=' static_scalar
- 26 $@4: /* empty */
+ 26 @4: /* empty */
- 27 inner_statement_list: inner_statement_list $@4 inner_statement
+ 27 inner_statement_list: inner_statement_list @4 inner_statement
28 | /* empty */
29 inner_statement: statement
30 | function_declaration_statement
31 | class_declaration_statement
- 32 | T_HALT_COMPILER '(' ')' ';'
+ 32 | "__halt_compiler (T_HALT_COMPILER)" '(' ')' ';'
33 statement: unticked_statement
- 34 | T_STRING ':'
+ 34 | "identifier (T_STRING)" ':'
35 unticked_statement: '{' inner_statement_list '}'
- 36 $@5: /* empty */
+ 36 @5: /* empty */
- 37 $@6: /* empty */
+ 37 @6: /* empty */
- 38 unticked_statement: T_IF '(' expr ')' $@5 statement $@6 elseif_list else_single
+ 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 statement @6 elseif_list else_single
- 39 $@7: /* empty */
+ 39 @7: /* empty */
- 40 $@8: /* empty */
+ 40 @8: /* empty */
- 41 unticked_statement: T_IF '(' expr ')' ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single T_ENDIF ';'
+ 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
- 42 $@9: /* empty */
+ 42 @9: /* empty */
- 43 $@10: /* empty */
+ 43 @10: /* empty */
- 44 unticked_statement: T_WHILE '(' $@9 expr ')' $@10 while_statement
+ 44 unticked_statement: "while (T_WHILE)" '(' @9 expr ')' @10 while_statement
- 45 $@11: /* empty */
+ 45 @11: /* empty */
- 46 $@12: /* empty */
+ 46 @12: /* empty */
- 47 unticked_statement: T_DO $@11 statement T_WHILE '(' $@12 expr ')' ';'
+ 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' @12 expr ')' ';'
- 48 $@13: /* empty */
+ 48 @13: /* empty */
- 49 $@14: /* empty */
+ 49 @14: /* empty */
- 50 $@15: /* empty */
+ 50 @15: /* empty */
- 51 unticked_statement: T_FOR '(' for_expr ';' $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 for_expr ')' @15 for_statement
- 52 $@16: /* empty */
+ 52 @16: /* empty */
- 53 unticked_statement: T_SWITCH '(' expr ')' $@16 switch_case_list
- 54 | T_BREAK ';'
- 55 | T_BREAK expr ';'
- 56 | T_CONTINUE ';'
- 57 | T_CONTINUE expr ';'
- 58 | T_RETURN ';'
- 59 | T_RETURN expr_without_variable ';'
- 60 | T_RETURN variable ';'
- 61 | T_GLOBAL global_var_list ';'
- 62 | T_STATIC static_var_list ';'
- 63 | T_ECHO echo_expr_list ';'
+ 53 unticked_statement: "switch (T_SWITCH)" '(' expr ')' @16 switch_case_list
+ 54 | "break (T_BREAK)" ';'
+ 55 | "break (T_BREAK)" expr ';'
+ 56 | "continue (T_CONTINUE)" ';'
+ 57 | "continue (T_CONTINUE)" expr ';'
+ 58 | "return (T_RETURN)" ';'
+ 59 | "return (T_RETURN)" expr_without_variable ';'
+ 60 | "return (T_RETURN)" variable ';'
+ 61 | "global (T_GLOBAL)" global_var_list ';'
+ 62 | "static (T_STATIC)" static_var_list ';'
+ 63 | "echo (T_ECHO)" echo_expr_list ';'
64 | T_INLINE_HTML
65 | expr ';'
- 66 | T_UNSET '(' unset_variables ')' ';'
+ 66 | "unset (T_UNSET)" '(' unset_variables ')' ';'
- 67 $@17: /* empty */
+ 67 @17: /* empty */
- 68 $@18: /* empty */
+ 68 @18: /* empty */
- 69 unticked_statement: T_FOREACH '(' variable T_AS $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement
+ 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement
- 70 $@19: /* empty */
+ 70 @19: /* empty */
- 71 $@20: /* empty */
+ 71 @20: /* empty */
- 72 unticked_statement: T_FOREACH '(' expr_without_variable T_AS $@19 variable foreach_optional_arg ')' $@20 foreach_statement
+ 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' @20 foreach_statement
- 73 $@21: /* empty */
+ 73 @21: /* empty */
- 74 unticked_statement: T_DECLARE $@21 '(' declare_list ')' declare_statement
+ 74 unticked_statement: "declare (T_DECLARE)" @21 '(' declare_list ')' declare_statement
75 | ';'
- 76 $@22: /* empty */
+ 76 @22: /* empty */
- 77 $@23: /* empty */
+ 77 @23: /* empty */
- 78 $@24: /* empty */
+ 78 @24: /* empty */
- 79 $@25: /* empty */
+ 79 @25: /* empty */
- 80 $@26: /* empty */
+ 80 @26: /* empty */
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
- 82 | T_THROW expr ';'
- 83 | T_GOTO T_STRING ';'
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
+ 82 | "throw (T_THROW)" expr ';'
+ 83 | "goto (T_GOTO)" "identifier (T_STRING)" ';'
84 additional_catches: non_empty_additional_catches
85 | /* empty */
@@ -157,9 +158,9 @@ Grammar
88 @27: /* empty */
- 89 $@28: /* empty */
+ 89 @28: /* empty */
- 90 additional_catch: T_CATCH '(' fully_qualified_class_name @27 T_VARIABLE ')' $@28 '{' inner_statement_list '}'
+ 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}'
91 unset_variables: unset_variable
92 | unset_variables ',' unset_variable
@@ -173,1090 +174,1232 @@ Grammar
96 is_reference: /* empty */
97 | '&'
- 98 $@29: /* empty */
+ 98 @29: /* empty */
- 99 unticked_function_declaration_statement: function is_reference T_STRING $@29 '(' parameter_list ')' '{' inner_statement_list '}'
+ 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' '{' inner_statement_list '}'
- 100 $@30: /* empty */
+ 100 @30: /* empty */
- 101 unticked_class_declaration_statement: class_entry_type T_STRING extends_from $@30 implements_list '{' class_statement_list '}'
+ 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 implements_list '{' class_statement_list '}'
- 102 $@31: /* empty */
+ 102 @31: /* empty */
- 103 unticked_class_declaration_statement: interface_entry T_STRING $@31 interface_extends_list '{' class_statement_list '}'
+ 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 interface_extends_list '{' class_statement_list '}'
- 104 class_entry_type: T_CLASS
- 105 | T_ABSTRACT T_CLASS
- 106 | T_FINAL T_CLASS
+ 104 class_entry_type: "class (T_CLASS)"
+ 105 | "abstract (T_ABSTRACT)" "class (T_CLASS)"
+ 106 | "trait (T_TRAIT)"
+ 107 | "final (T_FINAL)" "class (T_CLASS)"
- 107 extends_from: /* empty */
- 108 | T_EXTENDS fully_qualified_class_name
+ 108 extends_from: /* empty */
+ 109 | "extends (T_EXTENDS)" fully_qualified_class_name
- 109 interface_entry: T_INTERFACE
+ 110 interface_entry: "interface (T_INTERFACE)"
- 110 interface_extends_list: /* empty */
- 111 | T_EXTENDS interface_list
+ 111 interface_extends_list: /* empty */
+ 112 | "extends (T_EXTENDS)" interface_list
- 112 implements_list: /* empty */
- 113 | T_IMPLEMENTS interface_list
+ 113 implements_list: /* empty */
+ 114 | "implements (T_IMPLEMENTS)" interface_list
- 114 interface_list: fully_qualified_class_name
- 115 | interface_list ',' fully_qualified_class_name
+ 115 interface_list: fully_qualified_class_name
+ 116 | interface_list ',' fully_qualified_class_name
- 116 foreach_optional_arg: /* empty */
- 117 | T_DOUBLE_ARROW foreach_variable
+ 117 foreach_optional_arg: /* empty */
+ 118 | "=> (T_DOUBLE_ARROW)" foreach_variable
- 118 foreach_variable: variable
- 119 | '&' variable
+ 119 foreach_variable: variable
+ 120 | '&' variable
- 120 for_statement: statement
- 121 | ':' inner_statement_list T_ENDFOR ';'
+ 121 for_statement: statement
+ 122 | ':' inner_statement_list "endfor (T_ENDFOR)" ';'
- 122 foreach_statement: statement
- 123 | ':' inner_statement_list T_ENDFOREACH ';'
+ 123 foreach_statement: statement
+ 124 | ':' inner_statement_list "endforeach (T_ENDFOREACH)" ';'
- 124 declare_statement: statement
- 125 | ':' inner_statement_list T_ENDDECLARE ';'
+ 125 declare_statement: statement
+ 126 | ':' inner_statement_list "enddeclare (T_ENDDECLARE)" ';'
- 126 declare_list: T_STRING '=' static_scalar
- 127 | declare_list ',' T_STRING '=' static_scalar
+ 127 declare_list: "identifier (T_STRING)" '=' static_scalar
+ 128 | declare_list ',' "identifier (T_STRING)" '=' static_scalar
- 128 switch_case_list: '{' case_list '}'
- 129 | '{' ';' case_list '}'
- 130 | ':' case_list T_ENDSWITCH ';'
- 131 | ':' ';' case_list T_ENDSWITCH ';'
+ 129 switch_case_list: '{' case_list '}'
+ 130 | '{' ';' case_list '}'
+ 131 | ':' case_list "endswitch (T_ENDSWITCH)" ';'
+ 132 | ':' ';' case_list "endswitch (T_ENDSWITCH)" ';'
- 132 case_list: /* empty */
+ 133 case_list: /* empty */
- 133 $@32: /* empty */
+ 134 @32: /* empty */
- 134 case_list: case_list T_CASE expr case_separator $@32 inner_statement_list
+ 135 case_list: case_list "case (T_CASE)" expr case_separator @32 inner_statement_list
- 135 $@33: /* empty */
+ 136 @33: /* empty */
- 136 case_list: case_list T_DEFAULT case_separator $@33 inner_statement_list
+ 137 case_list: case_list "default (T_DEFAULT)" case_separator @33 inner_statement_list
- 137 case_separator: ':'
- 138 | ';'
+ 138 case_separator: ':'
+ 139 | ';'
- 139 while_statement: statement
- 140 | ':' inner_statement_list T_ENDWHILE ';'
+ 140 while_statement: statement
+ 141 | ':' inner_statement_list "endwhile (T_ENDWHILE)" ';'
- 141 elseif_list: /* empty */
+ 142 elseif_list: /* empty */
- 142 $@34: /* empty */
+ 143 @34: /* empty */
- 143 elseif_list: elseif_list T_ELSEIF '(' expr ')' $@34 statement
+ 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' expr ')' @34 statement
- 144 new_elseif_list: /* empty */
+ 145 new_elseif_list: /* empty */
- 145 $@35: /* empty */
+ 146 @35: /* empty */
- 146 new_elseif_list: new_elseif_list T_ELSEIF '(' expr ')' ':' $@35 inner_statement_list
+ 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr ')' ':' @35 inner_statement_list
- 147 else_single: /* empty */
- 148 | T_ELSE statement
+ 148 else_single: /* empty */
+ 149 | "else (T_ELSE)" statement
- 149 new_else_single: /* empty */
- 150 | T_ELSE ':' inner_statement_list
+ 150 new_else_single: /* empty */
+ 151 | "else (T_ELSE)" ':' inner_statement_list
- 151 parameter_list: non_empty_parameter_list
- 152 | /* empty */
+ 152 parameter_list: non_empty_parameter_list
+ 153 | /* empty */
- 153 non_empty_parameter_list: optional_class_type T_VARIABLE
- 154 | optional_class_type '&' T_VARIABLE
- 155 | optional_class_type '&' T_VARIABLE '=' static_scalar
- 156 | optional_class_type T_VARIABLE '=' static_scalar
- 157 | non_empty_parameter_list ',' optional_class_type T_VARIABLE
- 158 | non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE
- 159 | non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE '=' static_scalar
- 160 | non_empty_parameter_list ',' optional_class_type T_VARIABLE '=' static_scalar
+ 154 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)"
+ 155 | optional_class_type '&' "variable (T_VARIABLE)"
+ 156 | optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
+ 157 | optional_class_type "variable (T_VARIABLE)" '=' static_scalar
+ 158 | non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)"
+ 159 | non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)"
+ 160 | non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
+ 161 | non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" '=' static_scalar
- 161 optional_class_type: /* empty */
- 162 | fully_qualified_class_name
- 163 | T_ARRAY
+ 162 optional_class_type: /* empty */
+ 163 | "array (T_ARRAY)"
+ 164 | "callable (T_CALLABLE)"
+ 165 | fully_qualified_class_name
- 164 function_call_parameter_list: non_empty_function_call_parameter_list
- 165 | /* empty */
+ 166 function_call_parameter_list: non_empty_function_call_parameter_list
+ 167 | /* empty */
- 166 non_empty_function_call_parameter_list: expr_without_variable
- 167 | variable
- 168 | '&' w_variable
- 169 | non_empty_function_call_parameter_list ',' expr_without_variable
- 170 | non_empty_function_call_parameter_list ',' variable
- 171 | non_empty_function_call_parameter_list ',' '&' w_variable
+ 168 non_empty_function_call_parameter_list: expr_without_variable
+ 169 | variable
+ 170 | '&' w_variable
+ 171 | non_empty_function_call_parameter_list ',' expr_without_variable
+ 172 | non_empty_function_call_parameter_list ',' variable
+ 173 | non_empty_function_call_parameter_list ',' '&' w_variable
- 172 global_var_list: global_var_list ',' global_var
- 173 | global_var
+ 174 global_var_list: global_var_list ',' global_var
+ 175 | global_var
- 174 global_var: T_VARIABLE
- 175 | '$' r_variable
- 176 | '$' '{' expr '}'
+ 176 global_var: "variable (T_VARIABLE)"
+ 177 | '$' r_variable
+ 178 | '$' '{' expr '}'
- 177 static_var_list: static_var_list ',' T_VARIABLE
- 178 | static_var_list ',' T_VARIABLE '=' static_scalar
- 179 | T_VARIABLE
- 180 | T_VARIABLE '=' static_scalar
+ 179 static_var_list: static_var_list ',' "variable (T_VARIABLE)"
+ 180 | static_var_list ',' "variable (T_VARIABLE)" '=' static_scalar
+ 181 | "variable (T_VARIABLE)"
+ 182 | "variable (T_VARIABLE)" '=' static_scalar
- 181 class_statement_list: class_statement_list class_statement
- 182 | /* empty */
+ 183 class_statement_list: class_statement_list class_statement
+ 184 | /* empty */
- 183 $@36: /* empty */
+ 185 @36: /* empty */
- 184 class_statement: variable_modifiers $@36 class_variable_declaration ';'
- 185 | class_constant_declaration ';'
+ 186 class_statement: variable_modifiers @36 class_variable_declaration ';'
+ 187 | class_constant_declaration ';'
+ 188 | trait_use_statement
- 186 $@37: /* empty */
+ 189 @37: /* empty */
- 187 class_statement: method_modifiers function is_reference T_STRING $@37 '(' parameter_list ')' method_body
+ 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 '(' parameter_list ')' method_body
- 188 method_body: ';'
- 189 | '{' inner_statement_list '}'
+ 191 trait_use_statement: "use (T_USE)" trait_list trait_adaptations
- 190 variable_modifiers: non_empty_member_modifiers
- 191 | T_VAR
+ 192 trait_list: fully_qualified_class_name
+ 193 | trait_list ',' fully_qualified_class_name
- 192 method_modifiers: /* empty */
- 193 | non_empty_member_modifiers
+ 194 trait_adaptations: ';'
+ 195 | '{' trait_adaptation_list '}'
- 194 non_empty_member_modifiers: member_modifier
- 195 | non_empty_member_modifiers member_modifier
+ 196 trait_adaptation_list: /* empty */
+ 197 | non_empty_trait_adaptation_list
- 196 member_modifier: T_PUBLIC
- 197 | T_PROTECTED
- 198 | T_PRIVATE
- 199 | T_STATIC
- 200 | T_ABSTRACT
- 201 | T_FINAL
+ 198 non_empty_trait_adaptation_list: trait_adaptation_statement
+ 199 | non_empty_trait_adaptation_list trait_adaptation_statement
- 202 class_variable_declaration: class_variable_declaration ',' T_VARIABLE
- 203 | class_variable_declaration ',' T_VARIABLE '=' static_scalar
- 204 | T_VARIABLE
- 205 | T_VARIABLE '=' static_scalar
+ 200 trait_adaptation_statement: trait_precedence ';'
+ 201 | trait_alias ';'
- 206 class_constant_declaration: class_constant_declaration ',' T_STRING '=' static_scalar
- 207 | T_CONST T_STRING '=' static_scalar
+ 202 trait_precedence: trait_method_reference_fully_qualified "insteadof (T_INSTEADOF)" trait_reference_list
- 208 echo_expr_list: echo_expr_list ',' expr
- 209 | expr
+ 203 trait_reference_list: fully_qualified_class_name
+ 204 | trait_reference_list ',' fully_qualified_class_name
- 210 for_expr: /* empty */
- 211 | non_empty_for_expr
+ 205 trait_method_reference: "identifier (T_STRING)"
+ 206 | trait_method_reference_fully_qualified
- 212 $@38: /* empty */
+ 207 trait_method_reference_fully_qualified: fully_qualified_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- 213 non_empty_for_expr: non_empty_for_expr ',' $@38 expr
- 214 | expr
+ 208 trait_alias: trait_method_reference "as (T_AS)" trait_modifiers "identifier (T_STRING)"
+ 209 | trait_method_reference "as (T_AS)" member_modifier
- 215 $@39: /* empty */
+ 210 trait_modifiers: /* empty */
+ 211 | member_modifier
- 216 expr_without_variable: T_LIST '(' $@39 assignment_list ')' '=' expr
- 217 | variable '=' expr
- 218 | variable '=' '&' variable
+ 212 method_body: ';'
+ 213 | '{' inner_statement_list '}'
- 219 $@40: /* empty */
+ 214 variable_modifiers: non_empty_member_modifiers
+ 215 | "var (T_VAR)"
- 220 expr_without_variable: variable '=' '&' T_NEW class_name_reference $@40 ctor_arguments
+ 216 method_modifiers: /* empty */
+ 217 | non_empty_member_modifiers
- 221 $@41: /* empty */
+ 218 non_empty_member_modifiers: member_modifier
+ 219 | non_empty_member_modifiers member_modifier
- 222 expr_without_variable: T_NEW class_name_reference $@41 ctor_arguments
- 223 | T_CLONE expr
- 224 | variable T_PLUS_EQUAL expr
- 225 | variable T_MINUS_EQUAL expr
- 226 | variable T_MUL_EQUAL expr
- 227 | variable T_DIV_EQUAL expr
- 228 | variable T_CONCAT_EQUAL expr
- 229 | variable T_MOD_EQUAL expr
- 230 | variable T_AND_EQUAL expr
- 231 | variable T_OR_EQUAL expr
- 232 | variable T_XOR_EQUAL expr
- 233 | variable T_SL_EQUAL expr
- 234 | variable T_SR_EQUAL expr
- 235 | rw_variable T_INC
- 236 | T_INC rw_variable
- 237 | rw_variable T_DEC
- 238 | T_DEC rw_variable
+ 220 member_modifier: "public (T_PUBLIC)"
+ 221 | "protected (T_PROTECTED)"
+ 222 | "private (T_PRIVATE)"
+ 223 | "static (T_STATIC)"
+ 224 | "abstract (T_ABSTRACT)"
+ 225 | "final (T_FINAL)"
- 239 $@42: /* empty */
+ 226 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)"
+ 227 | class_variable_declaration ',' "variable (T_VARIABLE)" '=' static_scalar
+ 228 | "variable (T_VARIABLE)"
+ 229 | "variable (T_VARIABLE)" '=' static_scalar
- 240 expr_without_variable: expr T_BOOLEAN_OR $@42 expr
+ 230 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" '=' static_scalar
+ 231 | "const (T_CONST)" "identifier (T_STRING)" '=' static_scalar
- 241 $@43: /* empty */
+ 232 echo_expr_list: echo_expr_list ',' expr
+ 233 | expr
- 242 expr_without_variable: expr T_BOOLEAN_AND $@43 expr
+ 234 for_expr: /* empty */
+ 235 | non_empty_for_expr
- 243 $@44: /* empty */
+ 236 @38: /* empty */
- 244 expr_without_variable: expr T_LOGICAL_OR $@44 expr
+ 237 non_empty_for_expr: non_empty_for_expr ',' @38 expr
+ 238 | expr
- 245 $@45: /* empty */
+ 239 chaining_method_or_property: chaining_method_or_property variable_property
+ 240 | variable_property
- 246 expr_without_variable: expr T_LOGICAL_AND $@45 expr
- 247 | expr T_LOGICAL_XOR expr
- 248 | expr '|' expr
- 249 | expr '&' expr
- 250 | expr '^' expr
- 251 | expr '.' expr
- 252 | expr '+' expr
- 253 | expr '-' expr
- 254 | expr '*' expr
- 255 | expr '/' expr
- 256 | expr '%' expr
- 257 | expr T_SL expr
- 258 | expr T_SR expr
- 259 | '+' expr
- 260 | '-' expr
- 261 | '!' expr
- 262 | '~' expr
- 263 | expr T_IS_IDENTICAL expr
- 264 | expr T_IS_NOT_IDENTICAL expr
- 265 | expr T_IS_EQUAL expr
- 266 | expr T_IS_NOT_EQUAL expr
- 267 | expr '<' expr
- 268 | expr T_IS_SMALLER_OR_EQUAL expr
- 269 | expr '>' expr
- 270 | expr T_IS_GREATER_OR_EQUAL expr
- 271 | expr T_INSTANCEOF class_name_reference
- 272 | '(' expr ')'
+ 241 chaining_dereference: chaining_dereference '[' dim_offset ']'
+ 242 | '[' dim_offset ']'
- 273 $@46: /* empty */
+ 243 @39: /* empty */
- 274 $@47: /* empty */
+ 244 chaining_instance_call: chaining_dereference @39 chaining_method_or_property
+ 245 | chaining_dereference
+ 246 | chaining_method_or_property
- 275 expr_without_variable: expr '?' $@46 expr ':' $@47 expr
+ 247 instance_call: /* empty */
- 276 $@48: /* empty */
+ 248 @40: /* empty */
- 277 expr_without_variable: expr '?' ':' $@48 expr
- 278 | internal_functions_in_yacc
- 279 | T_INT_CAST expr
- 280 | T_DOUBLE_CAST expr
- 281 | T_STRING_CAST expr
- 282 | T_ARRAY_CAST expr
- 283 | T_OBJECT_CAST expr
- 284 | T_BOOL_CAST expr
- 285 | T_UNSET_CAST expr
- 286 | T_EXIT exit_expr
+ 249 instance_call: @40 chaining_instance_call
- 287 $@49: /* empty */
+ 250 @41: /* empty */
- 288 expr_without_variable: '@' $@49 expr
- 289 | scalar
- 290 | T_ARRAY '(' array_pair_list ')'
- 291 | '`' backticks_expr '`'
- 292 | T_PRINT expr
+ 251 new_expr: "new (T_NEW)" class_name_reference @41 ctor_arguments
- 293 @50: /* empty */
+ 252 @42: /* empty */
- 294 expr_without_variable: function is_reference '(' @50 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 253 expr_without_variable: "list (T_LIST)" '(' @42 assignment_list ')' '=' expr
+ 254 | variable '=' expr
+ 255 | variable '=' '&' variable
- 295 function: T_FUNCTION
+ 256 @43: /* empty */
- 296 lexical_vars: /* empty */
- 297 | T_USE '(' lexical_var_list ')'
+ 257 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
+ 258 | "clone (T_CLONE)" expr
+ 259 | variable "+= (T_PLUS_EQUAL)" expr
+ 260 | variable "-= (T_MINUS_EQUAL)" expr
+ 261 | variable "*= (T_MUL_EQUAL)" expr
+ 262 | variable "/= (T_DIV_EQUAL)" expr
+ 263 | variable ".= (T_CONCAT_EQUAL)" expr
+ 264 | variable "%= (T_MOD_EQUAL)" expr
+ 265 | variable "&= (T_AND_EQUAL)" expr
+ 266 | variable "|= (T_OR_EQUAL)" expr
+ 267 | variable "^= (T_XOR_EQUAL)" expr
+ 268 | variable "<<= (T_SL_EQUAL)" expr
+ 269 | variable ">>= (T_SR_EQUAL)" expr
+ 270 | rw_variable "++ (T_INC)"
+ 271 | "++ (T_INC)" rw_variable
+ 272 | rw_variable "-- (T_DEC)"
+ 273 | "-- (T_DEC)" rw_variable
- 298 lexical_var_list: lexical_var_list ',' T_VARIABLE
- 299 | lexical_var_list ',' '&' T_VARIABLE
- 300 | T_VARIABLE
- 301 | '&' T_VARIABLE
+ 274 @44: /* empty */
- 302 $@51: /* empty */
+ 275 expr_without_variable: expr "|| (T_BOOLEAN_OR)" @44 expr
- 303 function_call: namespace_name '(' $@51 function_call_parameter_list ')'
+ 276 @45: /* empty */
- 304 $@52: /* empty */
+ 277 expr_without_variable: expr "&& (T_BOOLEAN_AND)" @45 expr
- 305 function_call: T_NAMESPACE T_NS_SEPARATOR namespace_name '(' $@52 function_call_parameter_list ')'
+ 278 @46: /* empty */
- 306 $@53: /* empty */
+ 279 expr_without_variable: expr "or (T_LOGICAL_OR)" @46 expr
- 307 function_call: T_NS_SEPARATOR namespace_name '(' $@53 function_call_parameter_list ')'
+ 280 @47: /* empty */
- 308 $@54: /* empty */
+ 281 expr_without_variable: expr "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr "xor (T_LOGICAL_XOR)" expr
+ 283 | expr '|' expr
+ 284 | expr '&' expr
+ 285 | expr '^' expr
+ 286 | expr '.' expr
+ 287 | expr '+' expr
+ 288 | expr '-' expr
+ 289 | expr '*' expr
+ 290 | expr '/' expr
+ 291 | expr '%' expr
+ 292 | expr "<< (T_SL)" expr
+ 293 | expr ">> (T_SR)" expr
+ 294 | '+' expr
+ 295 | '-' expr
+ 296 | '!' expr
+ 297 | '~' expr
+ 298 | expr "=== (T_IS_IDENTICAL)" expr
+ 299 | expr "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr "== (T_IS_EQUAL)" expr
+ 301 | expr "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr '<' expr
+ 303 | expr "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr '>' expr
+ 305 | expr ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr "instanceof (T_INSTANCEOF)" class_name_reference
+ 307 | '(' expr ')'
+ 308 | new_expr
- 309 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@54 function_call_parameter_list ')'
+ 309 @48: /* empty */
- 310 $@55: /* empty */
+ 310 expr_without_variable: '(' new_expr ')' @48 instance_call
- 311 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@55 function_call_parameter_list ')'
+ 311 @49: /* empty */
- 312 $@56: /* empty */
+ 312 @50: /* empty */
- 313 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@56 function_call_parameter_list ')'
+ 313 expr_without_variable: expr '?' @49 expr ':' @50 expr
- 314 $@57: /* empty */
+ 314 @51: /* empty */
- 315 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@57 function_call_parameter_list ')'
+ 315 expr_without_variable: expr '?' ':' @51 expr
+ 316 | internal_functions_in_yacc
+ 317 | "(int) (T_INT_CAST)" expr
+ 318 | "(double) (T_DOUBLE_CAST)" expr
+ 319 | "(string) (T_STRING_CAST)" expr
+ 320 | "(array) (T_ARRAY_CAST)" expr
+ 321 | "(object) (T_OBJECT_CAST)" expr
+ 322 | "(bool) (T_BOOL_CAST)" expr
+ 323 | "(unset) (T_UNSET_CAST)" expr
+ 324 | "exit (T_EXIT)" exit_expr
- 316 $@58: /* empty */
+ 325 @52: /* empty */
- 317 function_call: variable_without_objects '(' $@58 function_call_parameter_list ')'
+ 326 expr_without_variable: '@' @52 expr
+ 327 | scalar
+ 328 | "array (T_ARRAY)" '(' array_pair_list ')'
+ 329 | '[' array_pair_list ']'
+ 330 | '`' backticks_expr '`'
+ 331 | "print (T_PRINT)" expr
- 318 class_name: T_STATIC
- 319 | namespace_name
- 320 | T_NAMESPACE T_NS_SEPARATOR namespace_name
- 321 | T_NS_SEPARATOR namespace_name
+ 332 @53: /* empty */
- 322 fully_qualified_class_name: namespace_name
- 323 | T_NAMESPACE T_NS_SEPARATOR namespace_name
- 324 | T_NS_SEPARATOR namespace_name
+ 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- 325 class_name_reference: class_name
- 326 | dynamic_class_name_reference
+ 334 @54: /* empty */
- 327 $@59: /* empty */
+ 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- 328 $@60: /* empty */
+ 336 function: "function (T_FUNCTION)"
- 329 dynamic_class_name_reference: base_variable T_OBJECT_OPERATOR $@59 object_property $@60 dynamic_class_name_variable_properties
- 330 | base_variable
+ 337 lexical_vars: /* empty */
+ 338 | "use (T_USE)" '(' lexical_var_list ')'
- 331 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties dynamic_class_name_variable_property
- 332 | /* empty */
+ 339 lexical_var_list: lexical_var_list ',' "variable (T_VARIABLE)"
+ 340 | lexical_var_list ',' '&' "variable (T_VARIABLE)"
+ 341 | "variable (T_VARIABLE)"
+ 342 | '&' "variable (T_VARIABLE)"
- 333 dynamic_class_name_variable_property: T_OBJECT_OPERATOR object_property
+ 343 @55: /* empty */
- 334 exit_expr: /* empty */
- 335 | '(' ')'
- 336 | '(' expr ')'
+ 344 function_call: namespace_name '(' @55 function_call_parameter_list ')'
- 337 backticks_expr: /* empty */
- 338 | T_ENCAPSED_AND_WHITESPACE
- 339 | encaps_list
+ 345 @56: /* empty */
- 340 ctor_arguments: /* empty */
- 341 | '(' function_call_parameter_list ')'
+ 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list ')'
- 342 common_scalar: T_LNUMBER
- 343 | T_DNUMBER
- 344 | T_CONSTANT_ENCAPSED_STRING
- 345 | T_LINE
- 346 | T_FILE
- 347 | T_DIR
- 348 | T_CLASS_C
- 349 | T_METHOD_C
- 350 | T_FUNC_C
- 351 | T_NS_C
- 352 | T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC
- 353 | T_START_HEREDOC T_END_HEREDOC
+ 347 @57: /* empty */
- 354 static_scalar: common_scalar
- 355 | namespace_name
- 356 | T_NAMESPACE T_NS_SEPARATOR namespace_name
- 357 | T_NS_SEPARATOR namespace_name
- 358 | '+' static_scalar
- 359 | '-' static_scalar
- 360 | T_ARRAY '(' static_array_pair_list ')'
- 361 | static_class_constant
+ 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name '(' @57 function_call_parameter_list ')'
- 362 static_class_constant: class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING
+ 349 @58: /* empty */
- 363 scalar: T_STRING_VARNAME
- 364 | class_constant
- 365 | namespace_name
- 366 | T_NAMESPACE T_NS_SEPARATOR namespace_name
- 367 | T_NS_SEPARATOR namespace_name
- 368 | common_scalar
- 369 | '"' encaps_list '"'
- 370 | T_START_HEREDOC encaps_list T_END_HEREDOC
+ 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 function_call_parameter_list ')'
- 371 static_array_pair_list: /* empty */
- 372 | non_empty_static_array_pair_list possible_comma
+ 351 @59: /* empty */
- 373 possible_comma: /* empty */
- 374 | ','
+ 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 function_call_parameter_list ')'
- 375 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar
- 376 | non_empty_static_array_pair_list ',' static_scalar
- 377 | static_scalar T_DOUBLE_ARROW static_scalar
- 378 | static_scalar
+ 353 @60: /* empty */
- 379 expr: r_variable
- 380 | expr_without_variable
+ 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 function_call_parameter_list ')'
- 381 r_variable: variable
+ 355 @61: /* empty */
- 382 w_variable: variable
+ 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 function_call_parameter_list ')'
- 383 rw_variable: variable
+ 357 @62: /* empty */
- 384 $@61: /* empty */
+ 358 function_call: variable_without_objects '(' @62 function_call_parameter_list ')'
- 385 $@62: /* empty */
+ 359 class_name: "static (T_STATIC)"
+ 360 | namespace_name
+ 361 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
+ 362 | "\\ (T_NS_SEPARATOR)" namespace_name
- 386 variable: base_variable_with_function_calls T_OBJECT_OPERATOR $@61 object_property $@62 method_or_not variable_properties
- 387 | base_variable_with_function_calls
+ 363 fully_qualified_class_name: namespace_name
+ 364 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
+ 365 | "\\ (T_NS_SEPARATOR)" namespace_name
- 388 variable_properties: variable_properties variable_property
- 389 | /* empty */
+ 366 class_name_reference: class_name
+ 367 | dynamic_class_name_reference
- 390 $@63: /* empty */
+ 368 @63: /* empty */
- 391 variable_property: T_OBJECT_OPERATOR object_property $@63 method_or_not
+ 369 @64: /* empty */
- 392 $@64: /* empty */
+ 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" @63 object_property @64 dynamic_class_name_variable_properties
+ 371 | base_variable
- 393 method_or_not: '(' $@64 function_call_parameter_list ')'
- 394 | /* empty */
+ 372 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties dynamic_class_name_variable_property
+ 373 | /* empty */
- 395 variable_without_objects: reference_variable
- 396 | simple_indirect_reference reference_variable
+ 374 dynamic_class_name_variable_property: "-> (T_OBJECT_OPERATOR)" object_property
- 397 static_member: class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
- 398 | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
+ 375 exit_expr: /* empty */
+ 376 | '(' ')'
+ 377 | '(' expr ')'
- 399 variable_class_name: reference_variable
+ 378 backticks_expr: /* empty */
+ 379 | "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
+ 380 | encaps_list
- 400 base_variable_with_function_calls: base_variable
- 401 | function_call
+ 381 ctor_arguments: /* empty */
+ 382 | '(' function_call_parameter_list ')'
- 402 base_variable: reference_variable
- 403 | simple_indirect_reference reference_variable
- 404 | static_member
+ 383 common_scalar: "integer number (T_LNUMBER)"
+ 384 | "floating-point number (T_DNUMBER)"
+ 385 | "quoted-string (T_CONSTANT_ENCAPSED_STRING)"
+ 386 | "__LINE__ (T_LINE)"
+ 387 | "__FILE__ (T_FILE)"
+ 388 | "__DIR__ (T_DIR)"
+ 389 | "__TRAIT__ (T_TRAIT_C)"
+ 390 | "__METHOD__ (T_METHOD_C)"
+ 391 | "__FUNCTION__ (T_FUNC_C)"
+ 392 | "__NAMESPACE__ (T_NS_C)"
+ 393 | "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)"
+ 394 | "heredoc start (T_START_HEREDOC)" "heredoc end (T_END_HEREDOC)"
- 405 reference_variable: reference_variable '[' dim_offset ']'
- 406 | reference_variable '{' expr '}'
- 407 | compound_variable
+ 395 static_scalar: common_scalar
+ 396 | namespace_name
+ 397 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
+ 398 | "\\ (T_NS_SEPARATOR)" namespace_name
+ 399 | '+' static_scalar
+ 400 | '-' static_scalar
+ 401 | "array (T_ARRAY)" '(' static_array_pair_list ')'
+ 402 | '[' static_array_pair_list ']'
+ 403 | static_class_constant
+ 404 | "__CLASS__ (T_CLASS_C)"
- 408 compound_variable: T_VARIABLE
- 409 | '$' '{' expr '}'
+ 405 static_class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- 410 dim_offset: /* empty */
- 411 | expr
+ 406 scalar: "variable name (T_STRING_VARNAME)"
+ 407 | class_constant
+ 408 | namespace_name
+ 409 | "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name
+ 410 | "\\ (T_NS_SEPARATOR)" namespace_name
+ 411 | common_scalar
+ 412 | '"' encaps_list '"'
+ 413 | "heredoc start (T_START_HEREDOC)" encaps_list "heredoc end (T_END_HEREDOC)"
+ 414 | "__CLASS__ (T_CLASS_C)"
- 412 object_property: object_dim_list
+ 415 static_array_pair_list: /* empty */
+ 416 | non_empty_static_array_pair_list possible_comma
- 413 $@65: /* empty */
+ 417 possible_comma: /* empty */
+ 418 | ','
- 414 object_property: variable_without_objects $@65
+ 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
+ 420 | non_empty_static_array_pair_list ',' static_scalar
+ 421 | static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
+ 422 | static_scalar
- 415 object_dim_list: object_dim_list '[' dim_offset ']'
- 416 | object_dim_list '{' expr '}'
- 417 | variable_name
+ 423 expr: r_variable
+ 424 | expr_without_variable
- 418 variable_name: T_STRING
- 419 | '{' expr '}'
+ 425 r_variable: variable
- 420 simple_indirect_reference: '$'
- 421 | simple_indirect_reference '$'
+ 426 w_variable: variable
- 422 assignment_list: assignment_list ',' assignment_list_element
- 423 | assignment_list_element
+ 427 rw_variable: variable
- 424 assignment_list_element: variable
+ 428 @65: /* empty */
- 425 $@66: /* empty */
+ 429 @66: /* empty */
- 426 assignment_list_element: T_LIST '(' $@66 assignment_list ')'
- 427 | /* empty */
+ 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 object_property @66 method_or_not variable_properties
+ 431 | base_variable_with_function_calls
- 428 array_pair_list: /* empty */
- 429 | non_empty_array_pair_list possible_comma
+ 432 variable_properties: variable_properties variable_property
+ 433 | /* empty */
- 430 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr
- 431 | non_empty_array_pair_list ',' expr
- 432 | expr T_DOUBLE_ARROW expr
- 433 | expr
- 434 | non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_variable
- 435 | non_empty_array_pair_list ',' '&' w_variable
- 436 | expr T_DOUBLE_ARROW '&' w_variable
- 437 | '&' w_variable
+ 434 @67: /* empty */
- 438 encaps_list: encaps_list encaps_var
- 439 | encaps_list T_ENCAPSED_AND_WHITESPACE
- 440 | encaps_var
- 441 | T_ENCAPSED_AND_WHITESPACE encaps_var
+ 435 variable_property: "-> (T_OBJECT_OPERATOR)" object_property @67 method_or_not
- 442 encaps_var: T_VARIABLE
+ 436 array_method_dereference: array_method_dereference '[' dim_offset ']'
+ 437 | method '[' dim_offset ']'
- 443 $@67: /* empty */
+ 438 @68: /* empty */
- 444 encaps_var: T_VARIABLE '[' $@67 encaps_var_offset ']'
- 445 | T_VARIABLE T_OBJECT_OPERATOR T_STRING
- 446 | T_DOLLAR_OPEN_CURLY_BRACES expr '}'
- 447 | T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}'
- 448 | T_CURLY_OPEN variable '}'
+ 439 method: '(' @68 function_call_parameter_list ')'
- 449 encaps_var_offset: T_STRING
- 450 | T_NUM_STRING
- 451 | T_VARIABLE
+ 440 method_or_not: method
+ 441 | array_method_dereference
+ 442 | /* empty */
- 452 internal_functions_in_yacc: T_ISSET '(' isset_variables ')'
- 453 | T_EMPTY '(' variable ')'
- 454 | T_INCLUDE expr
- 455 | T_INCLUDE_ONCE expr
- 456 | T_EVAL '(' expr ')'
- 457 | T_REQUIRE expr
- 458 | T_REQUIRE_ONCE expr
+ 443 variable_without_objects: reference_variable
+ 444 | simple_indirect_reference reference_variable
- 459 isset_variables: variable
+ 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+ 446 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
- 460 $@68: /* empty */
+ 447 variable_class_name: reference_variable
- 461 isset_variables: isset_variables ',' $@68 variable
+ 448 array_function_dereference: array_function_dereference '[' dim_offset ']'
- 462 class_constant: class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING
- 463 | variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING
+ 449 @69: /* empty */
+
+ 450 array_function_dereference: function_call @69 '[' dim_offset ']'
+
+ 451 base_variable_with_function_calls: base_variable
+ 452 | array_function_dereference
+ 453 | function_call
+
+ 454 base_variable: reference_variable
+ 455 | simple_indirect_reference reference_variable
+ 456 | static_member
+
+ 457 reference_variable: reference_variable '[' dim_offset ']'
+ 458 | reference_variable '{' expr '}'
+ 459 | compound_variable
+
+ 460 compound_variable: "variable (T_VARIABLE)"
+ 461 | '$' '{' expr '}'
+
+ 462 dim_offset: /* empty */
+ 463 | expr
+
+ 464 object_property: object_dim_list
+
+ 465 @70: /* empty */
+
+ 466 object_property: variable_without_objects @70
+
+ 467 object_dim_list: object_dim_list '[' dim_offset ']'
+ 468 | object_dim_list '{' expr '}'
+ 469 | variable_name
+
+ 470 variable_name: "identifier (T_STRING)"
+ 471 | '{' expr '}'
+
+ 472 simple_indirect_reference: '$'
+ 473 | simple_indirect_reference '$'
+
+ 474 assignment_list: assignment_list ',' assignment_list_element
+ 475 | assignment_list_element
+
+ 476 assignment_list_element: variable
+
+ 477 @71: /* empty */
+
+ 478 assignment_list_element: "list (T_LIST)" '(' @71 assignment_list ')'
+ 479 | /* empty */
+
+ 480 array_pair_list: /* empty */
+ 481 | non_empty_array_pair_list possible_comma
+
+ 482 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" expr
+ 483 | non_empty_array_pair_list ',' expr
+ 484 | expr "=> (T_DOUBLE_ARROW)" expr
+ 485 | expr
+ 486 | non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" '&' w_variable
+ 487 | non_empty_array_pair_list ',' '&' w_variable
+ 488 | expr "=> (T_DOUBLE_ARROW)" '&' w_variable
+ 489 | '&' w_variable
+
+ 490 encaps_list: encaps_list encaps_var
+ 491 | encaps_list "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
+ 492 | encaps_var
+ 493 | "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" encaps_var
+
+ 494 encaps_var: "variable (T_VARIABLE)"
+
+ 495 @72: /* empty */
+
+ 496 encaps_var: "variable (T_VARIABLE)" '[' @72 encaps_var_offset ']'
+ 497 | "variable (T_VARIABLE)" "-> (T_OBJECT_OPERATOR)" "identifier (T_STRING)"
+ 498 | "${ (T_DOLLAR_OPEN_CURLY_BRACES)" expr '}'
+ 499 | "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr ']' '}'
+ 500 | "{$ (T_CURLY_OPEN)" variable '}'
+
+ 501 encaps_var_offset: "identifier (T_STRING)"
+ 502 | "number (T_NUM_STRING)"
+ 503 | "variable (T_VARIABLE)"
+
+ 504 internal_functions_in_yacc: "isset (T_ISSET)" '(' isset_variables ')'
+ 505 | "empty (T_EMPTY)" '(' variable ')'
+ 506 | "include (T_INCLUDE)" expr
+ 507 | "include_once (T_INCLUDE_ONCE)" expr
+ 508 | "eval (T_EVAL)" '(' expr ')'
+ 509 | "require (T_REQUIRE)" expr
+ 510 | "require_once (T_REQUIRE_ONCE)" expr
+
+ 511 isset_variables: variable
+
+ 512 @73: /* empty */
+
+ 513 isset_variables: isset_variables ',' @73 variable
+
+ 514 class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
+ 515 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
Terminals, with rules where they appear
-$end (0) 0
-'!' (33) 261
-'"' (34) 369
-'$' (36) 175 176 409 420 421
-'%' (37) 256
-'&' (38) 97 119 154 155 158 159 168 171 218 220 249 299 301 434 435
- 436 437
-'(' (40) 10 32 38 41 44 47 51 53 66 69 72 74 81 90 99 143 146 187 216
- 272 290 294 297 303 305 307 309 311 313 315 317 335 336 341 360
- 393 426 452 453 456
-')' (41) 10 32 38 41 44 47 51 53 66 69 72 74 81 90 99 143 146 187 216
- 272 290 294 297 303 305 307 309 311 313 315 317 335 336 341 360
- 393 426 452 453 456
-'*' (42) 254
-'+' (43) 252 259 358
-',' (44) 18 24 92 115 127 157 158 159 160 169 170 171 172 177 178 202
- 203 206 208 213 298 299 374 375 376 422 430 431 434 435 461
-'-' (45) 253 260 359
-'.' (46) 251
-'/' (47) 255
-':' (58) 34 41 121 123 125 130 131 137 140 146 150 275 277
+"end of file" (0) 0
+'!' (33) 296
+'"' (34) 412
+'$' (36) 177 178 461 472 473
+'%' (37) 291
+'&' (38) 97 120 155 156 159 160 170 173 255 257 284 340 342 486 487
+ 488 489
+'(' (40) 10 32 38 41 44 47 51 53 66 69 72 74 81 90 99 144 147 190 253
+ 307 310 328 333 335 338 344 346 348 350 352 354 356 358 376 377
+ 382 401 439 478 504 505 508
+')' (41) 10 32 38 41 44 47 51 53 66 69 72 74 81 90 99 144 147 190 253
+ 307 310 328 333 335 338 344 346 348 350 352 354 356 358 376 377
+ 382 401 439 478 504 505 508
+'*' (42) 289
+'+' (43) 287 294 399
+',' (44) 18 24 92 116 128 158 159 160 161 171 172 173 174 179 180 193
+ 204 226 227 230 232 237 339 340 418 419 420 474 482 483 486 487
+ 513
+'-' (45) 288 295 400
+'.' (46) 286
+'/' (47) 290
+':' (58) 34 41 122 124 126 131 132 138 141 147 151 313 315
';' (59) 10 11 16 17 32 41 47 51 54 55 56 57 58 59 60 61 62 63 65 66
- 75 82 83 121 123 125 129 130 131 138 140 184 185 188
-'<' (60) 267
-'=' (61) 24 25 126 127 155 156 159 160 178 180 203 205 206 207 216
- 217 218 220
-'>' (62) 269
-'?' (63) 275 277
-'@' (64) 288
-'[' (91) 405 415 444 447
-']' (93) 405 415 444 447
-'^' (94) 250
-'`' (96) 291
-'{' (123) 13 15 35 81 90 99 101 103 128 129 176 189 294 406 409 416
- 419
-'|' (124) 248
-'}' (125) 13 15 35 81 90 99 101 103 128 129 176 189 294 406 409 416
- 419 446 447 448
-'~' (126) 262
+ 75 82 83 122 124 126 130 131 132 139 141 186 187 194 200 201 212
+'<' (60) 302
+'=' (61) 24 25 127 128 156 157 160 161 180 182 227 229 230 231 253
+ 254 255 257
+'>' (62) 304
+'?' (63) 313 315
+'@' (64) 326
+'[' (91) 241 242 329 402 436 437 448 450 457 467 496 499
+']' (93) 241 242 329 402 436 437 448 450 457 467 496 499
+'^' (94) 285
+'`' (96) 330
+'{' (123) 13 15 35 81 90 99 101 103 129 130 178 195 213 333 335 458
+ 461 468 471
+'|' (124) 283
+'}' (125) 13 15 35 81 90 99 101 103 129 130 178 195 213 333 335 458
+ 461 468 471 498 499 500
+'~' (126) 297
error (256)
-T_REQUIRE_ONCE (258) 458
-T_REQUIRE (259) 457
-T_EVAL (260) 456
-T_INCLUDE_ONCE (261) 455
-T_INCLUDE (262) 454
-T_LOGICAL_OR (263) 244
-T_LOGICAL_XOR (264) 247
-T_LOGICAL_AND (265) 246
-T_PRINT (266) 292
-T_SR_EQUAL (267) 234
-T_SL_EQUAL (268) 233
-T_XOR_EQUAL (269) 232
-T_OR_EQUAL (270) 231
-T_AND_EQUAL (271) 230
-T_MOD_EQUAL (272) 229
-T_CONCAT_EQUAL (273) 228
-T_DIV_EQUAL (274) 227
-T_MUL_EQUAL (275) 226
-T_MINUS_EQUAL (276) 225
-T_PLUS_EQUAL (277) 224
-T_BOOLEAN_OR (278) 240
-T_BOOLEAN_AND (279) 242
-T_IS_NOT_IDENTICAL (280) 264
-T_IS_IDENTICAL (281) 263
-T_IS_NOT_EQUAL (282) 266
-T_IS_EQUAL (283) 265
-T_IS_GREATER_OR_EQUAL (284) 270
-T_IS_SMALLER_OR_EQUAL (285) 268
-T_SR (286) 258
-T_SL (287) 257
-T_INSTANCEOF (288) 271
-T_UNSET_CAST (289) 285
-T_BOOL_CAST (290) 284
-T_OBJECT_CAST (291) 283
-T_ARRAY_CAST (292) 282
-T_STRING_CAST (293) 281
-T_DOUBLE_CAST (294) 280
-T_INT_CAST (295) 279
-T_DEC (296) 237 238
-T_INC (297) 235 236
-T_CLONE (298) 223
-T_NEW (299) 220 222
-T_EXIT (300) 286
-T_IF (301) 38 41
-T_ELSEIF (302) 143 146
-T_ELSE (303) 148 150
-T_ENDIF (304) 41
-T_LNUMBER (305) 342
-T_DNUMBER (306) 343
-T_STRING (307) 5 6 21 23 24 25 34 83 99 101 103 126 127 187 206 207
- 309 313 362 418 445 449 462 463
-T_STRING_VARNAME (308) 363 447
-T_VARIABLE (309) 81 90 153 154 155 156 157 158 159 160 174 177 178
- 179 180 202 203 204 205 298 299 300 301 408 442 444 445 451
-T_NUM_STRING (310) 450
+"require_once (T_REQUIRE_ONCE)" (258) 510
+"require (T_REQUIRE)" (259) 509
+"eval (T_EVAL)" (260) 508
+"include_once (T_INCLUDE_ONCE)" (261) 507
+"include (T_INCLUDE)" (262) 506
+"or (T_LOGICAL_OR)" (263) 279
+"xor (T_LOGICAL_XOR)" (264) 282
+"and (T_LOGICAL_AND)" (265) 281
+"print (T_PRINT)" (266) 331
+">>= (T_SR_EQUAL)" (267) 269
+"<<= (T_SL_EQUAL)" (268) 268
+"^= (T_XOR_EQUAL)" (269) 267
+"|= (T_OR_EQUAL)" (270) 266
+"&= (T_AND_EQUAL)" (271) 265
+"%= (T_MOD_EQUAL)" (272) 264
+".= (T_CONCAT_EQUAL)" (273) 263
+"/= (T_DIV_EQUAL)" (274) 262
+"*= (T_MUL_EQUAL)" (275) 261
+"-= (T_MINUS_EQUAL)" (276) 260
+"+= (T_PLUS_EQUAL)" (277) 259
+"|| (T_BOOLEAN_OR)" (278) 275
+"&& (T_BOOLEAN_AND)" (279) 277
+"!== (T_IS_NOT_IDENTICAL)" (280) 299
+"=== (T_IS_IDENTICAL)" (281) 298
+"!= (T_IS_NOT_EQUAL)" (282) 301
+"== (T_IS_EQUAL)" (283) 300
+">= (T_IS_GREATER_OR_EQUAL)" (284) 305
+"<= (T_IS_SMALLER_OR_EQUAL)" (285) 303
+">> (T_SR)" (286) 293
+"<< (T_SL)" (287) 292
+"instanceof (T_INSTANCEOF)" (288) 306
+"(unset) (T_UNSET_CAST)" (289) 323
+"(bool) (T_BOOL_CAST)" (290) 322
+"(object) (T_OBJECT_CAST)" (291) 321
+"(array) (T_ARRAY_CAST)" (292) 320
+"(string) (T_STRING_CAST)" (293) 319
+"(double) (T_DOUBLE_CAST)" (294) 318
+"(int) (T_INT_CAST)" (295) 317
+"-- (T_DEC)" (296) 272 273
+"++ (T_INC)" (297) 270 271
+"clone (T_CLONE)" (298) 258
+"new (T_NEW)" (299) 251 257
+"exit (T_EXIT)" (300) 324
+"if (T_IF)" (301) 38 41
+"elseif (T_ELSEIF)" (302) 144 147
+"else (T_ELSE)" (303) 149 151
+"endif (T_ENDIF)" (304) 41
+"integer number (T_LNUMBER)" (305) 383
+"floating-point number (T_DNUMBER)" (306) 384
+"identifier (T_STRING)" (307) 5 6 21 23 24 25 34 83 99 101 103 127
+ 128 190 205 207 208 230 231 405 470 497 501 514 515
+"variable name (T_STRING_VARNAME)" (308) 406 499
+"variable (T_VARIABLE)" (309) 81 90 154 155 156 157 158 159 160 161
+ 176 179 180 181 182 226 227 228 229 339 340 341 342 460 494 496
+ 497 503
+"number (T_NUM_STRING)" (310) 502
T_INLINE_HTML (311) 64
T_CHARACTER (312)
T_BAD_CHARACTER (313)
-T_ENCAPSED_AND_WHITESPACE (314) 338 352 439 441
-T_CONSTANT_ENCAPSED_STRING (315) 344
-T_ECHO (316) 63
-T_DO (317) 47
-T_WHILE (318) 44 47
-T_ENDWHILE (319) 140
-T_FOR (320) 51
-T_ENDFOR (321) 121
-T_FOREACH (322) 69 72
-T_ENDFOREACH (323) 123
-T_DECLARE (324) 74
-T_ENDDECLARE (325) 125
-T_AS (326) 21 23 69 72
-T_SWITCH (327) 53
-T_ENDSWITCH (328) 130 131
-T_CASE (329) 134
-T_DEFAULT (330) 136
-T_BREAK (331) 54 55
-T_CONTINUE (332) 56 57
-T_GOTO (333) 83
-T_FUNCTION (334) 295
-T_CONST (335) 25 207
-T_RETURN (336) 58 59 60
-T_TRY (337) 81
-T_CATCH (338) 81 90
-T_THROW (339) 82
-T_USE (340) 16 297
-T_GLOBAL (341) 61
-T_PUBLIC (342) 196
-T_PROTECTED (343) 197
-T_PRIVATE (344) 198
-T_FINAL (345) 106 201
-T_ABSTRACT (346) 105 200
-T_STATIC (347) 62 199 318
-T_VAR (348) 191
-T_UNSET (349) 66
-T_ISSET (350) 452
-T_EMPTY (351) 453
-T_HALT_COMPILER (352) 10 32
-T_CLASS (353) 104 105 106
-T_INTERFACE (354) 109
-T_EXTENDS (355) 108 111
-T_IMPLEMENTS (356) 113
-T_OBJECT_OPERATOR (357) 329 333 386 391 445
-T_DOUBLE_ARROW (358) 117 375 377 430 432 434 436
-T_LIST (359) 216 426
-T_ARRAY (360) 163 290 360
-T_CLASS_C (361) 348
-T_METHOD_C (362) 349
-T_FUNC_C (363) 350
-T_LINE (364) 345
-T_FILE (365) 346
-T_COMMENT (366)
-T_DOC_COMMENT (367)
-T_OPEN_TAG (368)
-T_OPEN_TAG_WITH_ECHO (369)
-T_CLOSE_TAG (370)
-T_WHITESPACE (371)
-T_START_HEREDOC (372) 352 353 370
-T_END_HEREDOC (373) 352 353 370
-T_DOLLAR_OPEN_CURLY_BRACES (374) 446 447
-T_CURLY_OPEN (375) 448
-T_PAAMAYIM_NEKUDOTAYIM (376) 309 311 313 315 362 397 398 462 463
-T_NAMESPACE (377) 11 13 15 305 320 323 356 366
-T_NS_C (378) 351
-T_DIR (379) 347
-T_NS_SEPARATOR (380) 6 22 23 305 307 320 321 323 324 356 357 366 367
+"quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
+ (314) 379 393 491 493
+"quoted-string (T_CONSTANT_ENCAPSED_STRING)" (315) 385
+"echo (T_ECHO)" (316) 63
+"do (T_DO)" (317) 47
+"while (T_WHILE)" (318) 44 47
+"endwhile (T_ENDWHILE)" (319) 141
+"for (T_FOR)" (320) 51
+"endfor (T_ENDFOR)" (321) 122
+"foreach (T_FOREACH)" (322) 69 72
+"endforeach (T_ENDFOREACH)" (323) 124
+"declare (T_DECLARE)" (324) 74
+"enddeclare (T_ENDDECLARE)" (325) 126
+"as (T_AS)" (326) 21 23 69 72 208 209
+"switch (T_SWITCH)" (327) 53
+"endswitch (T_ENDSWITCH)" (328) 131 132
+"case (T_CASE)" (329) 135
+"default (T_DEFAULT)" (330) 137
+"break (T_BREAK)" (331) 54 55
+"continue (T_CONTINUE)" (332) 56 57
+"goto (T_GOTO)" (333) 83
+"function (T_FUNCTION)" (334) 336
+"const (T_CONST)" (335) 25 231
+"return (T_RETURN)" (336) 58 59 60
+"try (T_TRY)" (337) 81
+"catch (T_CATCH)" (338) 81 90
+"throw (T_THROW)" (339) 82
+"use (T_USE)" (340) 16 191 338
+"insteadof (T_INSTEADOF)" (341) 202
+"global (T_GLOBAL)" (342) 61
+"public (T_PUBLIC)" (343) 220
+"protected (T_PROTECTED)" (344) 221
+"private (T_PRIVATE)" (345) 222
+"final (T_FINAL)" (346) 107 225
+"abstract (T_ABSTRACT)" (347) 105 224
+"static (T_STATIC)" (348) 62 223 335 359
+"var (T_VAR)" (349) 215
+"unset (T_UNSET)" (350) 66
+"isset (T_ISSET)" (351) 504
+"empty (T_EMPTY)" (352) 505
+"__halt_compiler (T_HALT_COMPILER)" (353) 10 32
+"class (T_CLASS)" (354) 104 105 107
+"trait (T_TRAIT)" (355) 106
+"interface (T_INTERFACE)" (356) 110
+"extends (T_EXTENDS)" (357) 109 112
+"implements (T_IMPLEMENTS)" (358) 114
+"-> (T_OBJECT_OPERATOR)" (359) 370 374 430 435 497
+"=> (T_DOUBLE_ARROW)" (360) 118 419 421 482 484 486 488
+"list (T_LIST)" (361) 253 478
+"array (T_ARRAY)" (362) 163 328 401
+"callable (T_CALLABLE)" (363) 164
+"__CLASS__ (T_CLASS_C)" (364) 404 414
+"__TRAIT__ (T_TRAIT_C)" (365) 389
+"__METHOD__ (T_METHOD_C)" (366) 390
+"__FUNCTION__ (T_FUNC_C)" (367) 391
+"__LINE__ (T_LINE)" (368) 386
+"__FILE__ (T_FILE)" (369) 387
+"comment (T_COMMENT)" (370)
+"doc comment (T_DOC_COMMENT)" (371)
+"open tag (T_OPEN_TAG)" (372)
+"open tag with echo (T_OPEN_TAG_WITH_ECHO)" (373)
+"close tag (T_CLOSE_TAG)" (374)
+"whitespace (T_WHITESPACE)" (375)
+"heredoc start (T_START_HEREDOC)" (376) 393 394 413
+"heredoc end (T_END_HEREDOC)" (377) 393 394 413
+"${ (T_DOLLAR_OPEN_CURLY_BRACES)" (378) 498 499
+"{$ (T_CURLY_OPEN)" (379) 500
+":: (T_PAAMAYIM_NEKUDOTAYIM)" (380) 207 350 352 354 356 405 445 446
+ 514 515
+"namespace (T_NAMESPACE)" (381) 11 13 15 346 361 364 397 409
+"__NAMESPACE__ (T_NS_C)" (382) 392
+"__DIR__ (T_DIR)" (383) 388
+"\\ (T_NS_SEPARATOR)" (384) 6 22 23 346 348 361 362 364 365 397 398
+ 409 410
Nonterminals, with rules where they appear
-$accept (154)
+$accept (158)
on left: 0
-start (155)
+start (159)
on left: 1, on right: 0
-top_statement_list (156)
+top_statement_list (160)
on left: 3 4, on right: 1 3 13 15
-$@1 (157)
+@1 (161)
on left: 2, on right: 3
-namespace_name (158)
- on left: 5 6, on right: 6 11 13 20 21 22 23 303 305 307 319 320
- 321 322 323 324 355 356 357 365 366 367
-top_statement (159)
+namespace_name (162)
+ on left: 5 6, on right: 6 11 13 20 21 22 23 344 346 348 360 361
+ 362 363 364 365 396 397 398 408 409 410
+top_statement (163)
on left: 7 8 9 10 11 13 15 16 17, on right: 3
-$@2 (160)
+@2 (164)
on left: 12, on right: 13
-$@3 (161)
+@3 (165)
on left: 14, on right: 15
-use_declarations (162)
+use_declarations (166)
on left: 18 19, on right: 16 18
-use_declaration (163)
+use_declaration (167)
on left: 20 21 22 23, on right: 18 19
-constant_declaration (164)
+constant_declaration (168)
on left: 24 25, on right: 17 24
-inner_statement_list (165)
- on left: 27 28, on right: 27 35 41 81 90 99 121 123 125 134 136
- 140 146 150 189 294
-$@4 (166)
+inner_statement_list (169)
+ on left: 27 28, on right: 27 35 41 81 90 99 122 124 126 135 137
+ 141 147 151 213 333 335
+@4 (170)
on left: 26, on right: 27
-inner_statement (167)
+inner_statement (171)
on left: 29 30 31 32, on right: 27
-statement (168)
- on left: 33 34, on right: 7 29 38 47 120 122 124 139 143 148
-unticked_statement (169)
+statement (172)
+ on left: 33 34, on right: 7 29 38 47 121 123 125 140 144 149
+unticked_statement (173)
on left: 35 38 41 44 47 51 53 54 55 56 57 58 59 60 61 62 63 64
65 66 69 72 74 75 81 82 83, on right: 33
-$@5 (170)
+@5 (174)
on left: 36, on right: 38
-$@6 (171)
+@6 (175)
on left: 37, on right: 38
-$@7 (172)
+@7 (176)
on left: 39, on right: 41
-$@8 (173)
+@8 (177)
on left: 40, on right: 41
-$@9 (174)
+@9 (178)
on left: 42, on right: 44
-$@10 (175)
+@10 (179)
on left: 43, on right: 44
-$@11 (176)
+@11 (180)
on left: 45, on right: 47
-$@12 (177)
+@12 (181)
on left: 46, on right: 47
-$@13 (178)
+@13 (182)
on left: 48, on right: 51
-$@14 (179)
+@14 (183)
on left: 49, on right: 51
-$@15 (180)
+@15 (184)
on left: 50, on right: 51
-$@16 (181)
+@16 (185)
on left: 52, on right: 53
-$@17 (182)
+@17 (186)
on left: 67, on right: 69
-$@18 (183)
+@18 (187)
on left: 68, on right: 69
-$@19 (184)
+@19 (188)
on left: 70, on right: 72
-$@20 (185)
+@20 (189)
on left: 71, on right: 72
-$@21 (186)
+@21 (190)
on left: 73, on right: 74
-$@22 (187)
+@22 (191)
on left: 76, on right: 81
-$@23 (188)
+@23 (192)
on left: 77, on right: 81
-$@24 (189)
+@24 (193)
on left: 78, on right: 81
-$@25 (190)
+@25 (194)
on left: 79, on right: 81
-$@26 (191)
+@26 (195)
on left: 80, on right: 81
-additional_catches (192)
+additional_catches (196)
on left: 84 85, on right: 81
-non_empty_additional_catches (193)
+non_empty_additional_catches (197)
on left: 86 87, on right: 84 87
-additional_catch (194)
+additional_catch (198)
on left: 90, on right: 86 87
-@27 (195)
+@27 (199)
on left: 88, on right: 90
-$@28 (196)
+@28 (200)
on left: 89, on right: 90
-unset_variables (197)
+unset_variables (201)
on left: 91 92, on right: 66 92
-unset_variable (198)
+unset_variable (202)
on left: 93, on right: 91 92
-function_declaration_statement (199)
+function_declaration_statement (203)
on left: 94, on right: 8 30
-class_declaration_statement (200)
+class_declaration_statement (204)
on left: 95, on right: 9 31
-is_reference (201)
- on left: 96 97, on right: 99 187 294
-unticked_function_declaration_statement (202)
+is_reference (205)
+ on left: 96 97, on right: 99 190 333 335
+unticked_function_declaration_statement (206)
on left: 99, on right: 94
-$@29 (203)
+@29 (207)
on left: 98, on right: 99
-unticked_class_declaration_statement (204)
+unticked_class_declaration_statement (208)
on left: 101 103, on right: 95
-$@30 (205)
+@30 (209)
on left: 100, on right: 101
-$@31 (206)
+@31 (210)
on left: 102, on right: 103
-class_entry_type (207)
- on left: 104 105 106, on right: 101
-extends_from (208)
- on left: 107 108, on right: 101
-interface_entry (209)
- on left: 109, on right: 103
-interface_extends_list (210)
- on left: 110 111, on right: 103
-implements_list (211)
- on left: 112 113, on right: 101
-interface_list (212)
- on left: 114 115, on right: 111 113 115
-foreach_optional_arg (213)
- on left: 116 117, on right: 69 72
-foreach_variable (214)
- on left: 118 119, on right: 69 117
-for_statement (215)
- on left: 120 121, on right: 51
-foreach_statement (216)
- on left: 122 123, on right: 69 72
-declare_statement (217)
- on left: 124 125, on right: 74
-declare_list (218)
- on left: 126 127, on right: 74 127
-switch_case_list (219)
- on left: 128 129 130 131, on right: 53
-case_list (220)
- on left: 132 134 136, on right: 128 129 130 131 134 136
-$@32 (221)
- on left: 133, on right: 134
-$@33 (222)
- on left: 135, on right: 136
-case_separator (223)
- on left: 137 138, on right: 134 136
-while_statement (224)
- on left: 139 140, on right: 44
-elseif_list (225)
- on left: 141 143, on right: 38 143
-$@34 (226)
- on left: 142, on right: 143
-new_elseif_list (227)
- on left: 144 146, on right: 41 146
-$@35 (228)
- on left: 145, on right: 146
-else_single (229)
- on left: 147 148, on right: 38
-new_else_single (230)
- on left: 149 150, on right: 41
-parameter_list (231)
- on left: 151 152, on right: 99 187 294
-non_empty_parameter_list (232)
- on left: 153 154 155 156 157 158 159 160, on right: 151 157 158
- 159 160
-optional_class_type (233)
- on left: 161 162 163, on right: 153 154 155 156 157 158 159 160
-function_call_parameter_list (234)
- on left: 164 165, on right: 303 305 307 309 311 313 315 317 341
- 393
-non_empty_function_call_parameter_list (235)
- on left: 166 167 168 169 170 171, on right: 164 169 170 171
-global_var_list (236)
- on left: 172 173, on right: 61 172
-global_var (237)
- on left: 174 175 176, on right: 172 173
-static_var_list (238)
- on left: 177 178 179 180, on right: 62 177 178
-class_statement_list (239)
- on left: 181 182, on right: 101 103 181
-class_statement (240)
- on left: 184 185 187, on right: 181
-$@36 (241)
- on left: 183, on right: 184
-$@37 (242)
- on left: 186, on right: 187
-method_body (243)
- on left: 188 189, on right: 187
-variable_modifiers (244)
- on left: 190 191, on right: 184
-method_modifiers (245)
- on left: 192 193, on right: 187
-non_empty_member_modifiers (246)
- on left: 194 195, on right: 190 193 195
-member_modifier (247)
- on left: 196 197 198 199 200 201, on right: 194 195
-class_variable_declaration (248)
- on left: 202 203 204 205, on right: 184 202 203
-class_constant_declaration (249)
- on left: 206 207, on right: 185 206
-echo_expr_list (250)
- on left: 208 209, on right: 63 208
-for_expr (251)
- on left: 210 211, on right: 51
-non_empty_for_expr (252)
- on left: 213 214, on right: 211 213
-$@38 (253)
- on left: 212, on right: 213
-expr_without_variable (254)
- on left: 216 217 218 220 222 223 224 225 226 227 228 229 230 231
- 232 233 234 235 236 237 238 240 242 244 246 247 248 249 250 251
- 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
- 268 269 270 271 272 275 277 278 279 280 281 282 283 284 285 286
- 288 289 290 291 292 294, on right: 59 72 166 169 380
-$@39 (255)
- on left: 215, on right: 216
-$@40 (256)
- on left: 219, on right: 220
-$@41 (257)
- on left: 221, on right: 222
-$@42 (258)
- on left: 239, on right: 240
-$@43 (259)
- on left: 241, on right: 242
-$@44 (260)
+class_entry_type (211)
+ on left: 104 105 106 107, on right: 101
+extends_from (212)
+ on left: 108 109, on right: 101
+interface_entry (213)
+ on left: 110, on right: 103
+interface_extends_list (214)
+ on left: 111 112, on right: 103
+implements_list (215)
+ on left: 113 114, on right: 101
+interface_list (216)
+ on left: 115 116, on right: 112 114 116
+foreach_optional_arg (217)
+ on left: 117 118, on right: 69 72
+foreach_variable (218)
+ on left: 119 120, on right: 69 118
+for_statement (219)
+ on left: 121 122, on right: 51
+foreach_statement (220)
+ on left: 123 124, on right: 69 72
+declare_statement (221)
+ on left: 125 126, on right: 74
+declare_list (222)
+ on left: 127 128, on right: 74 128
+switch_case_list (223)
+ on left: 129 130 131 132, on right: 53
+case_list (224)
+ on left: 133 135 137, on right: 129 130 131 132 135 137
+@32 (225)
+ on left: 134, on right: 135
+@33 (226)
+ on left: 136, on right: 137
+case_separator (227)
+ on left: 138 139, on right: 135 137
+while_statement (228)
+ on left: 140 141, on right: 44
+elseif_list (229)
+ on left: 142 144, on right: 38 144
+@34 (230)
+ on left: 143, on right: 144
+new_elseif_list (231)
+ on left: 145 147, on right: 41 147
+@35 (232)
+ on left: 146, on right: 147
+else_single (233)
+ on left: 148 149, on right: 38
+new_else_single (234)
+ on left: 150 151, on right: 41
+parameter_list (235)
+ on left: 152 153, on right: 99 190 333 335
+non_empty_parameter_list (236)
+ on left: 154 155 156 157 158 159 160 161, on right: 152 158 159
+ 160 161
+optional_class_type (237)
+ on left: 162 163 164 165, on right: 154 155 156 157 158 159 160
+ 161
+function_call_parameter_list (238)
+ on left: 166 167, on right: 344 346 348 350 352 354 356 358 382
+ 439
+non_empty_function_call_parameter_list (239)
+ on left: 168 169 170 171 172 173, on right: 166 171 172 173
+global_var_list (240)
+ on left: 174 175, on right: 61 174
+global_var (241)
+ on left: 176 177 178, on right: 174 175
+static_var_list (242)
+ on left: 179 180 181 182, on right: 62 179 180
+class_statement_list (243)
+ on left: 183 184, on right: 101 103 183
+class_statement (244)
+ on left: 186 187 188 190, on right: 183
+@36 (245)
+ on left: 185, on right: 186
+@37 (246)
+ on left: 189, on right: 190
+trait_use_statement (247)
+ on left: 191, on right: 188
+trait_list (248)
+ on left: 192 193, on right: 191 193
+trait_adaptations (249)
+ on left: 194 195, on right: 191
+trait_adaptation_list (250)
+ on left: 196 197, on right: 195
+non_empty_trait_adaptation_list (251)
+ on left: 198 199, on right: 197 199
+trait_adaptation_statement (252)
+ on left: 200 201, on right: 198 199
+trait_precedence (253)
+ on left: 202, on right: 200
+trait_reference_list (254)
+ on left: 203 204, on right: 202 204
+trait_method_reference (255)
+ on left: 205 206, on right: 208 209
+trait_method_reference_fully_qualified (256)
+ on left: 207, on right: 202 206
+trait_alias (257)
+ on left: 208 209, on right: 201
+trait_modifiers (258)
+ on left: 210 211, on right: 208
+method_body (259)
+ on left: 212 213, on right: 190
+variable_modifiers (260)
+ on left: 214 215, on right: 186
+method_modifiers (261)
+ on left: 216 217, on right: 190
+non_empty_member_modifiers (262)
+ on left: 218 219, on right: 214 217 219
+member_modifier (263)
+ on left: 220 221 222 223 224 225, on right: 209 211 218 219
+class_variable_declaration (264)
+ on left: 226 227 228 229, on right: 186 226 227
+class_constant_declaration (265)
+ on left: 230 231, on right: 187 230
+echo_expr_list (266)
+ on left: 232 233, on right: 63 232
+for_expr (267)
+ on left: 234 235, on right: 51
+non_empty_for_expr (268)
+ on left: 237 238, on right: 235 237
+@38 (269)
+ on left: 236, on right: 237
+chaining_method_or_property (270)
+ on left: 239 240, on right: 239 244 246
+chaining_dereference (271)
+ on left: 241 242, on right: 241 244 245
+chaining_instance_call (272)
+ on left: 244 245 246, on right: 249
+@39 (273)
on left: 243, on right: 244
-$@45 (261)
- on left: 245, on right: 246
-$@46 (262)
- on left: 273, on right: 275
-$@47 (263)
+instance_call (274)
+ on left: 247 249, on right: 310
+@40 (275)
+ on left: 248, on right: 249
+new_expr (276)
+ on left: 251, on right: 308 310
+@41 (277)
+ on left: 250, on right: 251
+expr_without_variable (278)
+ on left: 253 254 255 257 258 259 260 261 262 263 264 265 266 267
+ 268 269 270 271 272 273 275 277 279 281 282 283 284 285 286 287
+ 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
+ 304 305 306 307 308 310 313 315 316 317 318 319 320 321 322 323
+ 324 326 327 328 329 330 331 333 335, on right: 59 72 168 171 424
+@42 (279)
+ on left: 252, on right: 253
+@43 (280)
+ on left: 256, on right: 257
+@44 (281)
on left: 274, on right: 275
-$@48 (264)
+@45 (282)
on left: 276, on right: 277
-$@49 (265)
- on left: 287, on right: 288
-@50 (266)
- on left: 293, on right: 294
-function (267)
- on left: 295, on right: 99 187 294
-lexical_vars (268)
- on left: 296 297, on right: 294
-lexical_var_list (269)
- on left: 298 299 300 301, on right: 297 298 299
-function_call (270)
- on left: 303 305 307 309 311 313 315 317, on right: 401
-$@51 (271)
- on left: 302, on right: 303
-$@52 (272)
- on left: 304, on right: 305
-$@53 (273)
- on left: 306, on right: 307
-$@54 (274)
- on left: 308, on right: 309
-$@55 (275)
- on left: 310, on right: 311
-$@56 (276)
+@46 (283)
+ on left: 278, on right: 279
+@47 (284)
+ on left: 280, on right: 281
+@48 (285)
+ on left: 309, on right: 310
+@49 (286)
+ on left: 311, on right: 313
+@50 (287)
on left: 312, on right: 313
-$@57 (277)
+@51 (288)
on left: 314, on right: 315
-$@58 (278)
- on left: 316, on right: 317
-class_name (279)
- on left: 318 319 320 321, on right: 309 311 325 362 397 462
-fully_qualified_class_name (280)
- on left: 322 323 324, on right: 81 90 108 114 115 162
-class_name_reference (281)
- on left: 325 326, on right: 220 222 271
-dynamic_class_name_reference (282)
- on left: 329 330, on right: 326
-$@59 (283)
- on left: 327, on right: 329
-$@60 (284)
- on left: 328, on right: 329
-dynamic_class_name_variable_properties (285)
- on left: 331 332, on right: 329 331
-dynamic_class_name_variable_property (286)
- on left: 333, on right: 331
-exit_expr (287)
- on left: 334 335 336, on right: 286
-backticks_expr (288)
- on left: 337 338 339, on right: 291
-ctor_arguments (289)
- on left: 340 341, on right: 220 222
-common_scalar (290)
- on left: 342 343 344 345 346 347 348 349 350 351 352 353, on right:
- 354 368
-static_scalar (291)
- on left: 354 355 356 357 358 359 360 361, on right: 24 25 126 127
- 155 156 159 160 178 180 203 205 206 207 358 359 375 376 377 378
-static_class_constant (292)
- on left: 362, on right: 361
-scalar (293)
- on left: 363 364 365 366 367 368 369 370, on right: 289
-static_array_pair_list (294)
- on left: 371 372, on right: 360
-possible_comma (295)
- on left: 373 374, on right: 372 429
-non_empty_static_array_pair_list (296)
- on left: 375 376 377 378, on right: 372 375 376
-expr (297)
- on left: 379 380, on right: 38 41 44 47 53 55 57 65 82 134 143
- 146 176 208 209 213 214 216 217 223 224 225 226 227 228 229 230
- 231 232 233 234 240 242 244 246 247 248 249 250 251 252 253 254
- 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
- 271 272 275 277 279 280 281 282 283 284 285 288 292 336 406 409
- 411 416 419 430 431 432 433 434 436 446 447 454 455 456 457 458
-r_variable (298)
- on left: 381, on right: 175 379
-w_variable (299)
- on left: 382, on right: 168 171 434 435 436 437
-rw_variable (300)
- on left: 383, on right: 235 236 237 238
-variable (301)
- on left: 386 387, on right: 60 69 72 93 118 119 167 170 217 218
- 220 224 225 226 227 228 229 230 231 232 233 234 381 382 383 424
- 448 453 459 461
-$@61 (302)
- on left: 384, on right: 386
-$@62 (303)
- on left: 385, on right: 386
-variable_properties (304)
- on left: 388 389, on right: 386 388
-variable_property (305)
- on left: 391, on right: 388
-$@63 (306)
- on left: 390, on right: 391
-method_or_not (307)
- on left: 393 394, on right: 386 391
-$@64 (308)
- on left: 392, on right: 393
-variable_without_objects (309)
- on left: 395 396, on right: 311 315 317 397 398 414
-static_member (310)
- on left: 397 398, on right: 404
-variable_class_name (311)
- on left: 399, on right: 313 315 398 463
-base_variable_with_function_calls (312)
- on left: 400 401, on right: 386 387
-base_variable (313)
- on left: 402 403 404, on right: 329 330 400
-reference_variable (314)
- on left: 405 406 407, on right: 395 396 399 402 403 405 406
-compound_variable (315)
- on left: 408 409, on right: 407
-dim_offset (316)
- on left: 410 411, on right: 405 415
-object_property (317)
- on left: 412 414, on right: 329 333 386 391
-$@65 (318)
- on left: 413, on right: 414
-object_dim_list (319)
- on left: 415 416 417, on right: 412 415 416
-variable_name (320)
- on left: 418 419, on right: 417
-simple_indirect_reference (321)
- on left: 420 421, on right: 396 403 421
-assignment_list (322)
- on left: 422 423, on right: 216 422 426
-assignment_list_element (323)
- on left: 424 426 427, on right: 422 423
-$@66 (324)
- on left: 425, on right: 426
-array_pair_list (325)
- on left: 428 429, on right: 290
-non_empty_array_pair_list (326)
- on left: 430 431 432 433 434 435 436 437, on right: 429 430 431
- 434 435
-encaps_list (327)
- on left: 438 439 440 441, on right: 339 369 370 438 439
-encaps_var (328)
- on left: 442 444 445 446 447 448, on right: 438 440 441
-$@67 (329)
- on left: 443, on right: 444
-encaps_var_offset (330)
- on left: 449 450 451, on right: 444
-internal_functions_in_yacc (331)
- on left: 452 453 454 455 456 457 458, on right: 278
-isset_variables (332)
- on left: 459 461, on right: 452 461
-$@68 (333)
- on left: 460, on right: 461
-class_constant (334)
- on left: 462 463, on right: 364
+@52 (289)
+ on left: 325, on right: 326
+@53 (290)
+ on left: 332, on right: 333
+@54 (291)
+ on left: 334, on right: 335
+function (292)
+ on left: 336, on right: 99 190 333 335
+lexical_vars (293)
+ on left: 337 338, on right: 333 335
+lexical_var_list (294)
+ on left: 339 340 341 342, on right: 338 339 340
+function_call (295)
+ on left: 344 346 348 350 352 354 356 358, on right: 450 453
+@55 (296)
+ on left: 343, on right: 344
+@56 (297)
+ on left: 345, on right: 346
+@57 (298)
+ on left: 347, on right: 348
+@58 (299)
+ on left: 349, on right: 350
+@59 (300)
+ on left: 351, on right: 352
+@60 (301)
+ on left: 353, on right: 354
+@61 (302)
+ on left: 355, on right: 356
+@62 (303)
+ on left: 357, on right: 358
+class_name (304)
+ on left: 359 360 361 362, on right: 350 352 366 405 445 514
+fully_qualified_class_name (305)
+ on left: 363 364 365, on right: 81 90 109 115 116 165 192 193 203
+ 204 207
+class_name_reference (306)
+ on left: 366 367, on right: 251 257 306
+dynamic_class_name_reference (307)
+ on left: 370 371, on right: 367
+@63 (308)
+ on left: 368, on right: 370
+@64 (309)
+ on left: 369, on right: 370
+dynamic_class_name_variable_properties (310)
+ on left: 372 373, on right: 370 372
+dynamic_class_name_variable_property (311)
+ on left: 374, on right: 372
+exit_expr (312)
+ on left: 375 376 377, on right: 324
+backticks_expr (313)
+ on left: 378 379 380, on right: 330
+ctor_arguments (314)
+ on left: 381 382, on right: 251 257
+common_scalar (315)
+ on left: 383 384 385 386 387 388 389 390 391 392 393 394,
+ on right: 395 411
+static_scalar (316)
+ on left: 395 396 397 398 399 400 401 402 403 404,
+ on right: 24 25 127 128 156 157 160 161 180 182 227 229 230 231
+ 399 400 419 420 421 422
+static_class_constant (317)
+ on left: 405, on right: 403
+scalar (318)
+ on left: 406 407 408 409 410 411 412 413 414, on right: 327
+static_array_pair_list (319)
+ on left: 415 416, on right: 401 402
+possible_comma (320)
+ on left: 417 418, on right: 416 481
+non_empty_static_array_pair_list (321)
+ on left: 419 420 421 422, on right: 416 419 420
+expr (322)
+ on left: 423 424, on right: 38 41 44 47 53 55 57 65 82 135 144
+ 147 178 232 233 237 238 253 254 258 259 260 261 262 263 264 265
+ 266 267 268 269 275 277 279 281 282 283 284 285 286 287 288 289
+ 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305
+ 306 307 313 315 317 318 319 320 321 322 323 326 331 377 458 461
+ 463 468 471 482 483 484 485 486 488 498 499 506 507 508 509 510
+r_variable (323)
+ on left: 425, on right: 177 423
+w_variable (324)
+ on left: 426, on right: 170 173 486 487 488 489
+rw_variable (325)
+ on left: 427, on right: 270 271 272 273
+variable (326)
+ on left: 430 431, on right: 60 69 72 93 119 120 169 172 254 255
+ 257 259 260 261 262 263 264 265 266 267 268 269 425 426 427 476
+ 500 505 511 513
+@65 (327)
+ on left: 428, on right: 430
+@66 (328)
+ on left: 429, on right: 430
+variable_properties (329)
+ on left: 432 433, on right: 430 432
+variable_property (330)
+ on left: 435, on right: 239 240 432
+@67 (331)
+ on left: 434, on right: 435
+array_method_dereference (332)
+ on left: 436 437, on right: 436 441
+method (333)
+ on left: 439, on right: 437 440
+@68 (334)
+ on left: 438, on right: 439
+method_or_not (335)
+ on left: 440 441 442, on right: 430 435
+variable_without_objects (336)
+ on left: 443 444, on right: 352 356 358 445 446 466
+static_member (337)
+ on left: 445 446, on right: 456
+variable_class_name (338)
+ on left: 447, on right: 354 356 446 515
+array_function_dereference (339)
+ on left: 448 450, on right: 448 452
+@69 (340)
+ on left: 449, on right: 450
+base_variable_with_function_calls (341)
+ on left: 451 452 453, on right: 430 431
+base_variable (342)
+ on left: 454 455 456, on right: 370 371 451
+reference_variable (343)
+ on left: 457 458 459, on right: 443 444 447 454 455 457 458
+compound_variable (344)
+ on left: 460 461, on right: 459
+dim_offset (345)
+ on left: 462 463, on right: 241 242 436 437 448 450 457 467
+object_property (346)
+ on left: 464 466, on right: 370 374 430 435
+@70 (347)
+ on left: 465, on right: 466
+object_dim_list (348)
+ on left: 467 468 469, on right: 464 467 468
+variable_name (349)
+ on left: 470 471, on right: 350 354 469
+simple_indirect_reference (350)
+ on left: 472 473, on right: 444 455 473
+assignment_list (351)
+ on left: 474 475, on right: 253 474 478
+assignment_list_element (352)
+ on left: 476 478 479, on right: 474 475
+@71 (353)
+ on left: 477, on right: 478
+array_pair_list (354)
+ on left: 480 481, on right: 328 329
+non_empty_array_pair_list (355)
+ on left: 482 483 484 485 486 487 488 489, on right: 481 482 483
+ 486 487
+encaps_list (356)
+ on left: 490 491 492 493, on right: 380 412 413 490 491
+encaps_var (357)
+ on left: 494 496 497 498 499 500, on right: 490 492 493
+@72 (358)
+ on left: 495, on right: 496
+encaps_var_offset (359)
+ on left: 501 502 503, on right: 496
+internal_functions_in_yacc (360)
+ on left: 504 505 506 507 508 509 510, on right: 316
+isset_variables (361)
+ on left: 511 513, on right: 504 513
+@73 (362)
+ on left: 512, on right: 513
+class_constant (363)
+ on left: 514 515, on right: 407
state 0
- 0 $accept: . start $end
+ 0 $accept: . start "end of file"
$default reduce using rule 4 (top_statement_list)
@@ -1266,20916 +1409,22813 @@ state 0
state 1
- 0 $accept: start . $end
+ 0 $accept: start . "end of file"
- $end shift, and go to state 3
+ "end of file" shift, and go to state 3
state 2
1 start: top_statement_list .
- 3 top_statement_list: top_statement_list . $@1 top_statement
+ 3 top_statement_list: top_statement_list . @1 top_statement
- $end reduce using rule 1 (start)
- $default reduce using rule 2 ($@1)
+ "end of file" reduce using rule 1 (start)
+ $default reduce using rule 2 (@1)
- $@1 go to state 4
+ @1 go to state 4
state 3
- 0 $accept: start $end .
+ 0 $accept: start "end of file" .
$default accept
state 4
- 3 top_statement_list: top_statement_list $@1 . top_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_IF shift, and go to state 28
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_INLINE_HTML shift, and go to state 34
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ECHO shift, and go to state 36
- T_DO shift, and go to state 37
- T_WHILE shift, and go to state 38
- T_FOR shift, and go to state 39
- T_FOREACH shift, and go to state 40
- T_DECLARE shift, and go to state 41
- T_SWITCH shift, and go to state 42
- T_BREAK shift, and go to state 43
- T_CONTINUE shift, and go to state 44
- T_GOTO shift, and go to state 45
- T_FUNCTION shift, and go to state 46
- T_CONST shift, and go to state 47
- T_RETURN shift, and go to state 48
- T_TRY shift, and go to state 49
- T_THROW shift, and go to state 50
- T_USE shift, and go to state 51
- T_GLOBAL shift, and go to state 52
- T_FINAL shift, and go to state 53
- T_ABSTRACT shift, and go to state 54
- T_STATIC shift, and go to state 55
- T_UNSET shift, and go to state 56
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_HALT_COMPILER shift, and go to state 59
- T_CLASS shift, and go to state 60
- T_INTERFACE shift, and go to state 61
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 70
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 75
- '{' shift, and go to state 76
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- top_statement go to state 81
- constant_declaration go to state 82
- statement go to state 83
- unticked_statement go to state 84
- function_declaration_statement go to state 85
- class_declaration_statement go to state 86
- unticked_function_declaration_statement go to state 87
- unticked_class_declaration_statement go to state 88
- class_entry_type go to state 89
- interface_entry go to state 90
- expr_without_variable go to state 91
- function go to state 92
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 97
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 3 top_statement_list: top_statement_list @1 . top_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "if (T_IF)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 32
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ T_INLINE_HTML shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "echo (T_ECHO)" shift, and go to state 37
+ "do (T_DO)" shift, and go to state 38
+ "while (T_WHILE)" shift, and go to state 39
+ "for (T_FOR)" shift, and go to state 40
+ "foreach (T_FOREACH)" shift, and go to state 41
+ "declare (T_DECLARE)" shift, and go to state 42
+ "switch (T_SWITCH)" shift, and go to state 43
+ "break (T_BREAK)" shift, and go to state 44
+ "continue (T_CONTINUE)" shift, and go to state 45
+ "goto (T_GOTO)" shift, and go to state 46
+ "function (T_FUNCTION)" shift, and go to state 47
+ "const (T_CONST)" shift, and go to state 48
+ "return (T_RETURN)" shift, and go to state 49
+ "try (T_TRY)" shift, and go to state 50
+ "throw (T_THROW)" shift, and go to state 51
+ "use (T_USE)" shift, and go to state 52
+ "global (T_GLOBAL)" shift, and go to state 53
+ "final (T_FINAL)" shift, and go to state 54
+ "abstract (T_ABSTRACT)" shift, and go to state 55
+ "static (T_STATIC)" shift, and go to state 56
+ "unset (T_UNSET)" shift, and go to state 57
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "__halt_compiler (T_HALT_COMPILER)" shift, and go to state 60
+ "class (T_CLASS)" shift, and go to state 61
+ "trait (T_TRAIT)" shift, and go to state 62
+ "interface (T_INTERFACE)" shift, and go to state 63
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 73
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 78
+ '{' shift, and go to state 79
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ top_statement go to state 84
+ constant_declaration go to state 85
+ statement go to state 86
+ unticked_statement go to state 87
+ function_declaration_statement go to state 88
+ class_declaration_statement go to state 89
+ unticked_function_declaration_statement go to state 90
+ unticked_class_declaration_statement go to state 91
+ class_entry_type go to state 92
+ interface_entry go to state 93
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 96
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 101
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 5
- 458 internal_functions_in_yacc: T_REQUIRE_ONCE . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 115
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 510 internal_functions_in_yacc: "require_once (T_REQUIRE_ONCE)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 120
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 6
- 457 internal_functions_in_yacc: T_REQUIRE . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 116
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 509 internal_functions_in_yacc: "require (T_REQUIRE)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 121
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 7
- 456 internal_functions_in_yacc: T_EVAL . '(' expr ')'
+ 508 internal_functions_in_yacc: "eval (T_EVAL)" . '(' expr ')'
- '(' shift, and go to state 117
+ '(' shift, and go to state 122
state 8
- 455 internal_functions_in_yacc: T_INCLUDE_ONCE . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 118
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 507 internal_functions_in_yacc: "include_once (T_INCLUDE_ONCE)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 123
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 9
- 454 internal_functions_in_yacc: T_INCLUDE . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 119
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 506 internal_functions_in_yacc: "include (T_INCLUDE)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 124
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 10
- 292 expr_without_variable: T_PRINT . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 120
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 331 expr_without_variable: "print (T_PRINT)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 125
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 11
- 259 expr_without_variable: '+' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 121
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 294 expr_without_variable: '+' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 126
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 12
- 260 expr_without_variable: '-' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 122
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 295 expr_without_variable: '-' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 127
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 13
- 261 expr_without_variable: '!' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 123
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 296 expr_without_variable: '!' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 128
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 14
- 262 expr_without_variable: '~' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 124
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 297 expr_without_variable: '~' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 129
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 15
- 288 expr_without_variable: '@' . $@49 expr
+ 326 expr_without_variable: '@' . @52 expr
- $default reduce using rule 287 ($@49)
+ $default reduce using rule 325 (@52)
- $@49 go to state 125
+ @52 go to state 130
state 16
- 285 expr_without_variable: T_UNSET_CAST . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 126
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 323 expr_without_variable: "(unset) (T_UNSET_CAST)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 131
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 17
- 284 expr_without_variable: T_BOOL_CAST . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 127
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 322 expr_without_variable: "(bool) (T_BOOL_CAST)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 132
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 18
- 283 expr_without_variable: T_OBJECT_CAST . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 128
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 321 expr_without_variable: "(object) (T_OBJECT_CAST)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 133
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 19
- 282 expr_without_variable: T_ARRAY_CAST . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 129
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 320 expr_without_variable: "(array) (T_ARRAY_CAST)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 134
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 20
- 281 expr_without_variable: T_STRING_CAST . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 130
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 319 expr_without_variable: "(string) (T_STRING_CAST)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 135
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 21
- 280 expr_without_variable: T_DOUBLE_CAST . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 131
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 318 expr_without_variable: "(double) (T_DOUBLE_CAST)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 136
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 22
- 279 expr_without_variable: T_INT_CAST . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 132
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 317 expr_without_variable: "(int) (T_INT_CAST)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 137
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 23
- 238 expr_without_variable: T_DEC . rw_variable
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- rw_variable go to state 137
- variable go to state 138
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 273 expr_without_variable: "-- (T_DEC)" . rw_variable
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ rw_variable go to state 143
+ variable go to state 144
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 24
- 236 expr_without_variable: T_INC . rw_variable
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- rw_variable go to state 140
- variable go to state 138
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 271 expr_without_variable: "++ (T_INC)" . rw_variable
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ rw_variable go to state 146
+ variable go to state 144
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 25
- 223 expr_without_variable: T_CLONE . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 141
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 329 expr_without_variable: '[' . array_pair_list ']'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 147
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 480 (array_pair_list)
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 148
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ array_pair_list go to state 149
+ non_empty_array_pair_list go to state 150
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 26
- 222 expr_without_variable: T_NEW . class_name_reference $@41 ctor_arguments
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 142
- T_NS_SEPARATOR shift, and go to state 143
- '$' shift, and go to state 77
-
- namespace_name go to state 144
- class_name go to state 145
- class_name_reference go to state 146
- dynamic_class_name_reference go to state 147
- static_member go to state 102
- variable_class_name go to state 148
- base_variable go to state 149
- reference_variable go to state 150
- compound_variable go to state 107
- simple_indirect_reference go to state 151
+ 258 expr_without_variable: "clone (T_CLONE)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 151
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 27
- 286 expr_without_variable: T_EXIT . exit_expr
+ 251 new_expr: "new (T_NEW)" . class_name_reference @41 ctor_arguments
- '(' shift, and go to state 152
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 152
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 153
+ '$' shift, and go to state 80
- $default reduce using rule 334 (exit_expr)
-
- exit_expr go to state 153
+ namespace_name go to state 154
+ class_name go to state 155
+ class_name_reference go to state 156
+ dynamic_class_name_reference go to state 157
+ static_member go to state 106
+ variable_class_name go to state 158
+ base_variable go to state 159
+ reference_variable go to state 160
+ compound_variable go to state 112
+ simple_indirect_reference go to state 161
state 28
- 38 unticked_statement: T_IF . '(' expr ')' $@5 statement $@6 elseif_list else_single
- 41 | T_IF . '(' expr ')' ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single T_ENDIF ';'
+ 324 expr_without_variable: "exit (T_EXIT)" . exit_expr
+
+ '(' shift, and go to state 162
+
+ $default reduce using rule 375 (exit_expr)
- '(' shift, and go to state 154
+ exit_expr go to state 163
state 29
- 342 common_scalar: T_LNUMBER .
+ 38 unticked_statement: "if (T_IF)" . '(' expr ')' @5 statement @6 elseif_list else_single
+ 41 | "if (T_IF)" . '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
- $default reduce using rule 342 (common_scalar)
+ '(' shift, and go to state 164
state 30
- 343 common_scalar: T_DNUMBER .
+ 383 common_scalar: "integer number (T_LNUMBER)" .
- $default reduce using rule 343 (common_scalar)
+ $default reduce using rule 383 (common_scalar)
state 31
- 5 namespace_name: T_STRING .
- 34 statement: T_STRING . ':'
+ 384 common_scalar: "floating-point number (T_DNUMBER)" .
- ':' shift, and go to state 155
-
- $default reduce using rule 5 (namespace_name)
+ $default reduce using rule 384 (common_scalar)
state 32
- 363 scalar: T_STRING_VARNAME .
+ 5 namespace_name: "identifier (T_STRING)" .
+ 34 statement: "identifier (T_STRING)" . ':'
+
+ ':' shift, and go to state 165
- $default reduce using rule 363 (scalar)
+ $default reduce using rule 5 (namespace_name)
state 33
- 408 compound_variable: T_VARIABLE .
+ 406 scalar: "variable name (T_STRING_VARNAME)" .
- $default reduce using rule 408 (compound_variable)
+ $default reduce using rule 406 (scalar)
state 34
- 64 unticked_statement: T_INLINE_HTML .
+ 460 compound_variable: "variable (T_VARIABLE)" .
- $default reduce using rule 64 (unticked_statement)
+ $default reduce using rule 460 (compound_variable)
state 35
- 344 common_scalar: T_CONSTANT_ENCAPSED_STRING .
+ 64 unticked_statement: T_INLINE_HTML .
- $default reduce using rule 344 (common_scalar)
+ $default reduce using rule 64 (unticked_statement)
state 36
- 63 unticked_statement: T_ECHO . echo_expr_list ';'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- echo_expr_list go to state 156
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 157
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
-
+ 385 common_scalar: "quoted-string (T_CONSTANT_ENCAPSED_STRING)" .
-state 37
+ $default reduce using rule 385 (common_scalar)
- 47 unticked_statement: T_DO . $@11 statement T_WHILE '(' $@12 expr ')' ';'
- $default reduce using rule 45 ($@11)
+state 37
- $@11 go to state 158
+ 63 unticked_statement: "echo (T_ECHO)" . echo_expr_list ';'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ echo_expr_list go to state 166
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 167
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 38
- 44 unticked_statement: T_WHILE . '(' $@9 expr ')' $@10 while_statement
+ 47 unticked_statement: "do (T_DO)" . @11 statement "while (T_WHILE)" '(' @12 expr ')' ';'
- '(' shift, and go to state 159
+ $default reduce using rule 45 (@11)
+
+ @11 go to state 168
state 39
- 51 unticked_statement: T_FOR . '(' for_expr ';' $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement
+ 44 unticked_statement: "while (T_WHILE)" . '(' @9 expr ')' @10 while_statement
- '(' shift, and go to state 160
+ '(' shift, and go to state 169
state 40
- 69 unticked_statement: T_FOREACH . '(' variable T_AS $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement
- 72 | T_FOREACH . '(' expr_without_variable T_AS $@19 variable foreach_optional_arg ')' $@20 foreach_statement
+ 51 unticked_statement: "for (T_FOR)" . '(' for_expr ';' @13 for_expr ';' @14 for_expr ')' @15 for_statement
- '(' shift, and go to state 161
+ '(' shift, and go to state 170
state 41
- 74 unticked_statement: T_DECLARE . $@21 '(' declare_list ')' declare_statement
-
- $default reduce using rule 73 ($@21)
+ 69 unticked_statement: "foreach (T_FOREACH)" . '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement
+ 72 | "foreach (T_FOREACH)" . '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' @20 foreach_statement
- $@21 go to state 162
+ '(' shift, and go to state 171
state 42
- 53 unticked_statement: T_SWITCH . '(' expr ')' $@16 switch_case_list
+ 74 unticked_statement: "declare (T_DECLARE)" . @21 '(' declare_list ')' declare_statement
+
+ $default reduce using rule 73 (@21)
- '(' shift, and go to state 163
+ @21 go to state 172
state 43
- 54 unticked_statement: T_BREAK . ';'
- 55 | T_BREAK . expr ';'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 164
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 165
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 53 unticked_statement: "switch (T_SWITCH)" . '(' expr ')' @16 switch_case_list
+
+ '(' shift, and go to state 173
state 44
- 56 unticked_statement: T_CONTINUE . ';'
- 57 | T_CONTINUE . expr ';'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 166
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 167
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 54 unticked_statement: "break (T_BREAK)" . ';'
+ 55 | "break (T_BREAK)" . expr ';'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 174
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 175
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 45
- 83 unticked_statement: T_GOTO . T_STRING ';'
-
- T_STRING shift, and go to state 168
+ 56 unticked_statement: "continue (T_CONTINUE)" . ';'
+ 57 | "continue (T_CONTINUE)" . expr ';'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 176
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 177
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 46
- 295 function: T_FUNCTION .
+ 83 unticked_statement: "goto (T_GOTO)" . "identifier (T_STRING)" ';'
- $default reduce using rule 295 (function)
+ "identifier (T_STRING)" shift, and go to state 178
state 47
- 25 constant_declaration: T_CONST . T_STRING '=' static_scalar
+ 336 function: "function (T_FUNCTION)" .
- T_STRING shift, and go to state 169
+ $default reduce using rule 336 (function)
state 48
- 58 unticked_statement: T_RETURN . ';'
- 59 | T_RETURN . expr_without_variable ';'
- 60 | T_RETURN . variable ';'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 170
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 171
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 173
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
-
+ 25 constant_declaration: "const (T_CONST)" . "identifier (T_STRING)" '=' static_scalar
-state 49
+ "identifier (T_STRING)" shift, and go to state 179
- 81 unticked_statement: T_TRY . $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
- $default reduce using rule 76 ($@22)
+state 49
- $@22 go to state 174
+ 58 unticked_statement: "return (T_RETURN)" . ';'
+ 59 | "return (T_RETURN)" . expr_without_variable ';'
+ 60 | "return (T_RETURN)" . variable ';'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 180
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 181
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 183
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 50
- 82 unticked_statement: T_THROW . expr ';'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 175
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 81 unticked_statement: "try (T_TRY)" . @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
+ $default reduce using rule 76 (@22)
-state 51
+ @22 go to state 184
- 16 top_statement: T_USE . use_declarations ';'
- T_STRING shift, and go to state 111
- T_NS_SEPARATOR shift, and go to state 176
+state 51
- namespace_name go to state 177
- use_declarations go to state 178
- use_declaration go to state 179
+ 82 unticked_statement: "throw (T_THROW)" . expr ';'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 185
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 52
- 61 unticked_statement: T_GLOBAL . global_var_list ';'
+ 16 top_statement: "use (T_USE)" . use_declarations ';'
- T_VARIABLE shift, and go to state 180
- '$' shift, and go to state 181
+ "identifier (T_STRING)" shift, and go to state 116
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 186
- global_var_list go to state 182
- global_var go to state 183
+ namespace_name go to state 187
+ use_declarations go to state 188
+ use_declaration go to state 189
state 53
- 106 class_entry_type: T_FINAL . T_CLASS
+ 61 unticked_statement: "global (T_GLOBAL)" . global_var_list ';'
+
+ "variable (T_VARIABLE)" shift, and go to state 190
+ '$' shift, and go to state 191
- T_CLASS shift, and go to state 184
+ global_var_list go to state 192
+ global_var go to state 193
state 54
- 105 class_entry_type: T_ABSTRACT . T_CLASS
+ 107 class_entry_type: "final (T_FINAL)" . "class (T_CLASS)"
- T_CLASS shift, and go to state 185
+ "class (T_CLASS)" shift, and go to state 194
state 55
- 62 unticked_statement: T_STATIC . static_var_list ';'
- 318 class_name: T_STATIC .
+ 105 class_entry_type: "abstract (T_ABSTRACT)" . "class (T_CLASS)"
- T_VARIABLE shift, and go to state 186
+ "class (T_CLASS)" shift, and go to state 195
- $default reduce using rule 318 (class_name)
- static_var_list go to state 187
+state 56
+ 62 unticked_statement: "static (T_STATIC)" . static_var_list ';'
+ 335 expr_without_variable: "static (T_STATIC)" . function is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 359 class_name: "static (T_STATIC)" .
-state 56
+ "variable (T_VARIABLE)" shift, and go to state 196
+ "function (T_FUNCTION)" shift, and go to state 47
- 66 unticked_statement: T_UNSET . '(' unset_variables ')' ';'
+ $default reduce using rule 359 (class_name)
- '(' shift, and go to state 188
+ static_var_list go to state 197
+ function go to state 198
state 57
- 452 internal_functions_in_yacc: T_ISSET . '(' isset_variables ')'
+ 66 unticked_statement: "unset (T_UNSET)" . '(' unset_variables ')' ';'
- '(' shift, and go to state 189
+ '(' shift, and go to state 199
state 58
- 453 internal_functions_in_yacc: T_EMPTY . '(' variable ')'
+ 504 internal_functions_in_yacc: "isset (T_ISSET)" . '(' isset_variables ')'
- '(' shift, and go to state 190
+ '(' shift, and go to state 200
state 59
- 10 top_statement: T_HALT_COMPILER . '(' ')' ';'
+ 505 internal_functions_in_yacc: "empty (T_EMPTY)" . '(' variable ')'
- '(' shift, and go to state 191
+ '(' shift, and go to state 201
state 60
- 104 class_entry_type: T_CLASS .
+ 10 top_statement: "__halt_compiler (T_HALT_COMPILER)" . '(' ')' ';'
- $default reduce using rule 104 (class_entry_type)
+ '(' shift, and go to state 202
state 61
- 109 interface_entry: T_INTERFACE .
+ 104 class_entry_type: "class (T_CLASS)" .
- $default reduce using rule 109 (interface_entry)
+ $default reduce using rule 104 (class_entry_type)
state 62
- 216 expr_without_variable: T_LIST . '(' $@39 assignment_list ')' '=' expr
+ 106 class_entry_type: "trait (T_TRAIT)" .
- '(' shift, and go to state 192
+ $default reduce using rule 106 (class_entry_type)
state 63
- 290 expr_without_variable: T_ARRAY . '(' array_pair_list ')'
+ 110 interface_entry: "interface (T_INTERFACE)" .
- '(' shift, and go to state 193
+ $default reduce using rule 110 (interface_entry)
state 64
- 348 common_scalar: T_CLASS_C .
+ 253 expr_without_variable: "list (T_LIST)" . '(' @42 assignment_list ')' '=' expr
- $default reduce using rule 348 (common_scalar)
+ '(' shift, and go to state 203
state 65
- 349 common_scalar: T_METHOD_C .
+ 328 expr_without_variable: "array (T_ARRAY)" . '(' array_pair_list ')'
- $default reduce using rule 349 (common_scalar)
+ '(' shift, and go to state 204
state 66
- 350 common_scalar: T_FUNC_C .
+ 414 scalar: "__CLASS__ (T_CLASS_C)" .
- $default reduce using rule 350 (common_scalar)
+ $default reduce using rule 414 (scalar)
state 67
- 345 common_scalar: T_LINE .
+ 389 common_scalar: "__TRAIT__ (T_TRAIT_C)" .
- $default reduce using rule 345 (common_scalar)
+ $default reduce using rule 389 (common_scalar)
state 68
- 346 common_scalar: T_FILE .
+ 390 common_scalar: "__METHOD__ (T_METHOD_C)" .
- $default reduce using rule 346 (common_scalar)
+ $default reduce using rule 390 (common_scalar)
state 69
- 352 common_scalar: T_START_HEREDOC . T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC
- 353 | T_START_HEREDOC . T_END_HEREDOC
- 370 scalar: T_START_HEREDOC . encaps_list T_END_HEREDOC
-
- T_VARIABLE shift, and go to state 194
- T_ENCAPSED_AND_WHITESPACE shift, and go to state 195
- T_END_HEREDOC shift, and go to state 196
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 197
- T_CURLY_OPEN shift, and go to state 198
+ 391 common_scalar: "__FUNCTION__ (T_FUNC_C)" .
- encaps_list go to state 199
- encaps_var go to state 200
+ $default reduce using rule 391 (common_scalar)
state 70
- 11 top_statement: T_NAMESPACE . namespace_name ';'
- 13 | T_NAMESPACE . namespace_name '{' $@2 top_statement_list '}'
- 15 | T_NAMESPACE . '{' $@3 top_statement_list '}'
- 305 function_call: T_NAMESPACE . T_NS_SEPARATOR namespace_name '(' $@52 function_call_parameter_list ')'
- 320 class_name: T_NAMESPACE . T_NS_SEPARATOR namespace_name
- 366 scalar: T_NAMESPACE . T_NS_SEPARATOR namespace_name
-
- T_STRING shift, and go to state 111
- T_NS_SEPARATOR shift, and go to state 201
- '{' shift, and go to state 202
+ 386 common_scalar: "__LINE__ (T_LINE)" .
- namespace_name go to state 203
+ $default reduce using rule 386 (common_scalar)
state 71
- 351 common_scalar: T_NS_C .
+ 387 common_scalar: "__FILE__ (T_FILE)" .
- $default reduce using rule 351 (common_scalar)
+ $default reduce using rule 387 (common_scalar)
state 72
- 347 common_scalar: T_DIR .
+ 393 common_scalar: "heredoc start (T_START_HEREDOC)" . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)"
+ 394 | "heredoc start (T_START_HEREDOC)" . "heredoc end (T_END_HEREDOC)"
+ 413 scalar: "heredoc start (T_START_HEREDOC)" . encaps_list "heredoc end (T_END_HEREDOC)"
- $default reduce using rule 347 (common_scalar)
+ "variable (T_VARIABLE)" shift, and go to state 205
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 206
+ "heredoc end (T_END_HEREDOC)" shift, and go to state 207
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
+ "{$ (T_CURLY_OPEN)" shift, and go to state 209
+
+ encaps_list go to state 210
+ encaps_var go to state 211
state 73
- 307 function_call: T_NS_SEPARATOR . namespace_name '(' $@53 function_call_parameter_list ')'
- 321 class_name: T_NS_SEPARATOR . namespace_name
- 367 scalar: T_NS_SEPARATOR . namespace_name
+ 11 top_statement: "namespace (T_NAMESPACE)" . namespace_name ';'
+ 13 | "namespace (T_NAMESPACE)" . namespace_name '{' @2 top_statement_list '}'
+ 15 | "namespace (T_NAMESPACE)" . '{' @3 top_statement_list '}'
+ 346 function_call: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list ')'
+ 361 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+ 409 scalar: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
- T_STRING shift, and go to state 111
+ "identifier (T_STRING)" shift, and go to state 116
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 212
+ '{' shift, and go to state 213
- namespace_name go to state 204
+ namespace_name go to state 214
state 74
- 272 expr_without_variable: '(' . expr ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 205
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 392 common_scalar: "__NAMESPACE__ (T_NS_C)" .
+
+ $default reduce using rule 392 (common_scalar)
state 75
- 75 unticked_statement: ';' .
+ 388 common_scalar: "__DIR__ (T_DIR)" .
- $default reduce using rule 75 (unticked_statement)
+ $default reduce using rule 388 (common_scalar)
state 76
- 35 unticked_statement: '{' . inner_statement_list '}'
+ 348 function_call: "\\ (T_NS_SEPARATOR)" . namespace_name '(' @57 function_call_parameter_list ')'
+ 362 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
+ 410 scalar: "\\ (T_NS_SEPARATOR)" . namespace_name
- $default reduce using rule 28 (inner_statement_list)
+ "identifier (T_STRING)" shift, and go to state 116
- inner_statement_list go to state 206
+ namespace_name go to state 215
state 77
- 409 compound_variable: '$' . '{' expr '}'
- 420 simple_indirect_reference: '$' .
-
- '{' shift, and go to state 207
-
- $default reduce using rule 420 (simple_indirect_reference)
+ 307 expr_without_variable: '(' . expr ')'
+ 310 | '(' . new_expr ')' @48 instance_call
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 216
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 217
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 78
- 291 expr_without_variable: '`' . backticks_expr '`'
-
- T_VARIABLE shift, and go to state 194
- T_ENCAPSED_AND_WHITESPACE shift, and go to state 208
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 197
- T_CURLY_OPEN shift, and go to state 198
-
- $default reduce using rule 337 (backticks_expr)
+ 75 unticked_statement: ';' .
- backticks_expr go to state 209
- encaps_list go to state 210
- encaps_var go to state 200
+ $default reduce using rule 75 (unticked_statement)
state 79
- 369 scalar: '"' . encaps_list '"'
+ 35 unticked_statement: '{' . inner_statement_list '}'
- T_VARIABLE shift, and go to state 194
- T_ENCAPSED_AND_WHITESPACE shift, and go to state 211
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 197
- T_CURLY_OPEN shift, and go to state 198
+ $default reduce using rule 28 (inner_statement_list)
- encaps_list go to state 212
- encaps_var go to state 200
+ inner_statement_list go to state 218
state 80
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 303 function_call: namespace_name . '(' $@51 function_call_parameter_list ')'
- 319 class_name: namespace_name .
- 365 scalar: namespace_name .
+ 461 compound_variable: '$' . '{' expr '}'
+ 472 simple_indirect_reference: '$' .
- T_NS_SEPARATOR shift, and go to state 213
- '(' shift, and go to state 214
+ '{' shift, and go to state 219
- T_PAAMAYIM_NEKUDOTAYIM reduce using rule 319 (class_name)
- $default reduce using rule 365 (scalar)
+ $default reduce using rule 472 (simple_indirect_reference)
state 81
- 3 top_statement_list: top_statement_list $@1 top_statement .
+ 330 expr_without_variable: '`' . backticks_expr '`'
- $default reduce using rule 3 (top_statement_list)
+ "variable (T_VARIABLE)" shift, and go to state 205
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 220
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
+ "{$ (T_CURLY_OPEN)" shift, and go to state 209
+
+ $default reduce using rule 378 (backticks_expr)
+
+ backticks_expr go to state 221
+ encaps_list go to state 222
+ encaps_var go to state 211
state 82
- 17 top_statement: constant_declaration . ';'
- 24 constant_declaration: constant_declaration . ',' T_STRING '=' static_scalar
+ 412 scalar: '"' . encaps_list '"'
+
+ "variable (T_VARIABLE)" shift, and go to state 205
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 223
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
+ "{$ (T_CURLY_OPEN)" shift, and go to state 209
- ',' shift, and go to state 215
- ';' shift, and go to state 216
+ encaps_list go to state 224
+ encaps_var go to state 211
state 83
- 7 top_statement: statement .
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 344 function_call: namespace_name . '(' @55 function_call_parameter_list ')'
+ 360 class_name: namespace_name .
+ 408 scalar: namespace_name .
- $default reduce using rule 7 (top_statement)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ '(' shift, and go to state 226
+
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 360 (class_name)
+ $default reduce using rule 408 (scalar)
state 84
- 33 statement: unticked_statement .
+ 3 top_statement_list: top_statement_list @1 top_statement .
- $default reduce using rule 33 (statement)
+ $default reduce using rule 3 (top_statement_list)
state 85
- 8 top_statement: function_declaration_statement .
+ 17 top_statement: constant_declaration . ';'
+ 24 constant_declaration: constant_declaration . ',' "identifier (T_STRING)" '=' static_scalar
- $default reduce using rule 8 (top_statement)
+ ',' shift, and go to state 227
+ ';' shift, and go to state 228
state 86
- 9 top_statement: class_declaration_statement .
+ 7 top_statement: statement .
- $default reduce using rule 9 (top_statement)
+ $default reduce using rule 7 (top_statement)
state 87
- 94 function_declaration_statement: unticked_function_declaration_statement .
+ 33 statement: unticked_statement .
- $default reduce using rule 94 (function_declaration_statement)
+ $default reduce using rule 33 (statement)
state 88
- 95 class_declaration_statement: unticked_class_declaration_statement .
+ 8 top_statement: function_declaration_statement .
- $default reduce using rule 95 (class_declaration_statement)
+ $default reduce using rule 8 (top_statement)
state 89
- 101 unticked_class_declaration_statement: class_entry_type . T_STRING extends_from $@30 implements_list '{' class_statement_list '}'
+ 9 top_statement: class_declaration_statement .
- T_STRING shift, and go to state 217
+ $default reduce using rule 9 (top_statement)
state 90
- 103 unticked_class_declaration_statement: interface_entry . T_STRING $@31 interface_extends_list '{' class_statement_list '}'
+ 94 function_declaration_statement: unticked_function_declaration_statement .
- T_STRING shift, and go to state 218
+ $default reduce using rule 94 (function_declaration_statement)
state 91
- 380 expr: expr_without_variable .
+ 95 class_declaration_statement: unticked_class_declaration_statement .
- $default reduce using rule 380 (expr)
+ $default reduce using rule 95 (class_declaration_statement)
state 92
- 99 unticked_function_declaration_statement: function . is_reference T_STRING $@29 '(' parameter_list ')' '{' inner_statement_list '}'
- 294 expr_without_variable: function . is_reference '(' @50 parameter_list ')' lexical_vars '{' inner_statement_list '}'
-
- '&' shift, and go to state 219
+ 101 unticked_class_declaration_statement: class_entry_type . "identifier (T_STRING)" extends_from @30 implements_list '{' class_statement_list '}'
- $default reduce using rule 96 (is_reference)
-
- is_reference go to state 220
+ "identifier (T_STRING)" shift, and go to state 229
state 93
- 401 base_variable_with_function_calls: function_call .
+ 103 unticked_class_declaration_statement: interface_entry . "identifier (T_STRING)" @31 interface_extends_list '{' class_statement_list '}'
- $default reduce using rule 401 (base_variable_with_function_calls)
+ "identifier (T_STRING)" shift, and go to state 230
state 94
- 309 function_call: class_name . T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@54 function_call_parameter_list ')'
- 311 | class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@55 function_call_parameter_list ')'
- 397 static_member: class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
- 462 class_constant: class_name . T_PAAMAYIM_NEKUDOTAYIM T_STRING
+ 308 expr_without_variable: new_expr .
- T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 221
+ $default reduce using rule 308 (expr_without_variable)
state 95
- 368 scalar: common_scalar .
+ 424 expr: expr_without_variable .
- $default reduce using rule 368 (scalar)
+ $default reduce using rule 424 (expr)
state 96
- 289 expr_without_variable: scalar .
+ 99 unticked_function_declaration_statement: function . is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' '{' inner_statement_list '}'
+ 333 expr_without_variable: function . is_reference '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- $default reduce using rule 289 (expr_without_variable)
+ '&' shift, and go to state 231
+
+ $default reduce using rule 96 (is_reference)
+
+ is_reference go to state 232
state 97
- 65 unticked_statement: expr . ';'
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ';' shift, and go to state 248
+ 450 array_function_dereference: function_call . @69 '[' dim_offset ']'
+ 453 base_variable_with_function_calls: function_call .
+
+ '[' reduce using rule 449 (@69)
+ $default reduce using rule 453 (base_variable_with_function_calls)
+
+ @69 go to state 233
state 98
- 379 expr: r_variable .
+ 350 function_call: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 function_call_parameter_list ')'
+ 352 | class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 function_call_parameter_list ')'
+ 445 static_member: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+ 514 class_constant: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- $default reduce using rule 379 (expr)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 234
state 99
- 235 expr_without_variable: rw_variable . T_INC
- 237 | rw_variable . T_DEC
+ 411 scalar: common_scalar .
- T_DEC shift, and go to state 249
- T_INC shift, and go to state 250
+ $default reduce using rule 411 (scalar)
state 100
- 217 expr_without_variable: variable . '=' expr
- 218 | variable . '=' '&' variable
- 220 | variable . '=' '&' T_NEW class_name_reference $@40 ctor_arguments
- 224 | variable . T_PLUS_EQUAL expr
- 225 | variable . T_MINUS_EQUAL expr
- 226 | variable . T_MUL_EQUAL expr
- 227 | variable . T_DIV_EQUAL expr
- 228 | variable . T_CONCAT_EQUAL expr
- 229 | variable . T_MOD_EQUAL expr
- 230 | variable . T_AND_EQUAL expr
- 231 | variable . T_OR_EQUAL expr
- 232 | variable . T_XOR_EQUAL expr
- 233 | variable . T_SL_EQUAL expr
- 234 | variable . T_SR_EQUAL expr
- 381 r_variable: variable .
- 383 rw_variable: variable .
-
- '=' shift, and go to state 251
- T_SR_EQUAL shift, and go to state 252
- T_SL_EQUAL shift, and go to state 253
- T_XOR_EQUAL shift, and go to state 254
- T_OR_EQUAL shift, and go to state 255
- T_AND_EQUAL shift, and go to state 256
- T_MOD_EQUAL shift, and go to state 257
- T_CONCAT_EQUAL shift, and go to state 258
- T_DIV_EQUAL shift, and go to state 259
- T_MUL_EQUAL shift, and go to state 260
- T_MINUS_EQUAL shift, and go to state 261
- T_PLUS_EQUAL shift, and go to state 262
-
- T_DEC reduce using rule 383 (rw_variable)
- T_INC reduce using rule 383 (rw_variable)
- $default reduce using rule 381 (r_variable)
+ 327 expr_without_variable: scalar .
+ $default reduce using rule 327 (expr_without_variable)
-state 101
- 317 function_call: variable_without_objects . '(' $@58 function_call_parameter_list ')'
+state 101
- '(' shift, and go to state 263
+ 65 unticked_statement: expr . ';'
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ';' shift, and go to state 261
state 102
- 404 base_variable: static_member .
+ 423 expr: r_variable .
- $default reduce using rule 404 (base_variable)
+ $default reduce using rule 423 (expr)
state 103
- 313 function_call: variable_class_name . T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@56 function_call_parameter_list ')'
- 315 | variable_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@57 function_call_parameter_list ')'
- 398 static_member: variable_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
- 463 class_constant: variable_class_name . T_PAAMAYIM_NEKUDOTAYIM T_STRING
+ 270 expr_without_variable: rw_variable . "++ (T_INC)"
+ 272 | rw_variable . "-- (T_DEC)"
- T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 264
+ "-- (T_DEC)" shift, and go to state 262
+ "++ (T_INC)" shift, and go to state 263
state 104
- 386 variable: base_variable_with_function_calls . T_OBJECT_OPERATOR $@61 object_property $@62 method_or_not variable_properties
- 387 | base_variable_with_function_calls .
-
- T_OBJECT_OPERATOR shift, and go to state 265
-
- $default reduce using rule 387 (variable)
+ 254 expr_without_variable: variable . '=' expr
+ 255 | variable . '=' '&' variable
+ 257 | variable . '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
+ 259 | variable . "+= (T_PLUS_EQUAL)" expr
+ 260 | variable . "-= (T_MINUS_EQUAL)" expr
+ 261 | variable . "*= (T_MUL_EQUAL)" expr
+ 262 | variable . "/= (T_DIV_EQUAL)" expr
+ 263 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 264 | variable . "%= (T_MOD_EQUAL)" expr
+ 265 | variable . "&= (T_AND_EQUAL)" expr
+ 266 | variable . "|= (T_OR_EQUAL)" expr
+ 267 | variable . "^= (T_XOR_EQUAL)" expr
+ 268 | variable . "<<= (T_SL_EQUAL)" expr
+ 269 | variable . ">>= (T_SR_EQUAL)" expr
+ 425 r_variable: variable .
+ 427 rw_variable: variable .
+
+ '=' shift, and go to state 264
+ ">>= (T_SR_EQUAL)" shift, and go to state 265
+ "<<= (T_SL_EQUAL)" shift, and go to state 266
+ "^= (T_XOR_EQUAL)" shift, and go to state 267
+ "|= (T_OR_EQUAL)" shift, and go to state 268
+ "&= (T_AND_EQUAL)" shift, and go to state 269
+ "%= (T_MOD_EQUAL)" shift, and go to state 270
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 271
+ "/= (T_DIV_EQUAL)" shift, and go to state 272
+ "*= (T_MUL_EQUAL)" shift, and go to state 273
+ "-= (T_MINUS_EQUAL)" shift, and go to state 274
+ "+= (T_PLUS_EQUAL)" shift, and go to state 275
+
+ "-- (T_DEC)" reduce using rule 427 (rw_variable)
+ "++ (T_INC)" reduce using rule 427 (rw_variable)
+ $default reduce using rule 425 (r_variable)
state 105
- 400 base_variable_with_function_calls: base_variable .
+ 358 function_call: variable_without_objects . '(' @62 function_call_parameter_list ')'
- $default reduce using rule 400 (base_variable_with_function_calls)
+ '(' shift, and go to state 276
state 106
- 395 variable_without_objects: reference_variable .
- 399 variable_class_name: reference_variable .
- 402 base_variable: reference_variable .
- 405 reference_variable: reference_variable . '[' dim_offset ']'
- 406 | reference_variable . '{' expr '}'
+ 456 base_variable: static_member .
- '[' shift, and go to state 266
- '{' shift, and go to state 267
-
- T_PAAMAYIM_NEKUDOTAYIM reduce using rule 399 (variable_class_name)
- '(' reduce using rule 395 (variable_without_objects)
- $default reduce using rule 402 (base_variable)
+ $default reduce using rule 456 (base_variable)
state 107
- 407 reference_variable: compound_variable .
+ 354 function_call: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 function_call_parameter_list ')'
+ 356 | variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 function_call_parameter_list ')'
+ 446 static_member: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+ 515 class_constant: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- $default reduce using rule 407 (reference_variable)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 277
state 108
- 396 variable_without_objects: simple_indirect_reference . reference_variable
- 403 base_variable: simple_indirect_reference . reference_variable
- 421 simple_indirect_reference: simple_indirect_reference . '$'
+ 448 array_function_dereference: array_function_dereference . '[' dim_offset ']'
+ 452 base_variable_with_function_calls: array_function_dereference .
- T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 268
+ '[' shift, and go to state 278
- reference_variable go to state 269
- compound_variable go to state 107
+ $default reduce using rule 452 (base_variable_with_function_calls)
state 109
- 278 expr_without_variable: internal_functions_in_yacc .
+ 430 variable: base_variable_with_function_calls . "-> (T_OBJECT_OPERATOR)" @65 object_property @66 method_or_not variable_properties
+ 431 | base_variable_with_function_calls .
+
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 279
- $default reduce using rule 278 (expr_without_variable)
+ $default reduce using rule 431 (variable)
state 110
- 364 scalar: class_constant .
+ 451 base_variable_with_function_calls: base_variable .
- $default reduce using rule 364 (scalar)
+ $default reduce using rule 451 (base_variable_with_function_calls)
state 111
- 5 namespace_name: T_STRING .
+ 443 variable_without_objects: reference_variable .
+ 447 variable_class_name: reference_variable .
+ 454 base_variable: reference_variable .
+ 457 reference_variable: reference_variable . '[' dim_offset ']'
+ 458 | reference_variable . '{' expr '}'
- $default reduce using rule 5 (namespace_name)
+ '[' shift, and go to state 280
+ '{' shift, and go to state 281
+
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 447 (variable_class_name)
+ '(' reduce using rule 443 (variable_without_objects)
+ $default reduce using rule 454 (base_variable)
state 112
- 318 class_name: T_STATIC .
+ 459 reference_variable: compound_variable .
- $default reduce using rule 318 (class_name)
+ $default reduce using rule 459 (reference_variable)
state 113
- 305 function_call: T_NAMESPACE . T_NS_SEPARATOR namespace_name '(' $@52 function_call_parameter_list ')'
- 320 class_name: T_NAMESPACE . T_NS_SEPARATOR namespace_name
- 366 scalar: T_NAMESPACE . T_NS_SEPARATOR namespace_name
-
- T_NS_SEPARATOR shift, and go to state 201
+ 444 variable_without_objects: simple_indirect_reference . reference_variable
+ 455 base_variable: simple_indirect_reference . reference_variable
+ 473 simple_indirect_reference: simple_indirect_reference . '$'
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '$' shift, and go to state 282
-state 114
+ reference_variable go to state 283
+ compound_variable go to state 112
- 294 expr_without_variable: function . is_reference '(' @50 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- '&' shift, and go to state 219
+state 114
- $default reduce using rule 96 (is_reference)
+ 316 expr_without_variable: internal_functions_in_yacc .
- is_reference go to state 270
+ $default reduce using rule 316 (expr_without_variable)
state 115
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 458 internal_functions_in_yacc: T_REQUIRE_ONCE expr .
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 458 (internal_functions_in_yacc)
+ 407 scalar: class_constant .
+
+ $default reduce using rule 407 (scalar)
state 116
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 457 internal_functions_in_yacc: T_REQUIRE expr .
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 457 (internal_functions_in_yacc)
+ 5 namespace_name: "identifier (T_STRING)" .
+
+ $default reduce using rule 5 (namespace_name)
state 117
- 456 internal_functions_in_yacc: T_EVAL '(' . expr ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 271
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 335 expr_without_variable: "static (T_STATIC)" . function is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 359 class_name: "static (T_STATIC)" .
+
+ "function (T_FUNCTION)" shift, and go to state 47
+
+ $default reduce using rule 359 (class_name)
+
+ function go to state 198
state 118
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 455 internal_functions_in_yacc: T_INCLUDE_ONCE expr .
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 455 (internal_functions_in_yacc)
+ 346 function_call: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list ')'
+ 361 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+ 409 scalar: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 212
state 119
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 454 internal_functions_in_yacc: T_INCLUDE expr .
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 454 (internal_functions_in_yacc)
+ 333 expr_without_variable: function . is_reference '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ '&' shift, and go to state 231
-state 120
+ $default reduce using rule 96 (is_reference)
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 292 | T_PRINT expr .
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
+ is_reference go to state 284
- $default reduce using rule 292 (expr_without_variable)
+state 120
-state 121
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 510 internal_functions_in_yacc: "require_once (T_REQUIRE_ONCE)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 510 (internal_functions_in_yacc)
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 259 | '+' expr .
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- $default reduce using rule 259 (expr_without_variable)
+state 121
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 509 internal_functions_in_yacc: "require (T_REQUIRE)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 509 (internal_functions_in_yacc)
-state 122
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 260 | '-' expr .
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
+state 122
- $default reduce using rule 260 (expr_without_variable)
+ 508 internal_functions_in_yacc: "eval (T_EVAL)" '(' . expr ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 285
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 123
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 261 | '!' expr .
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 261 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 507 internal_functions_in_yacc: "include_once (T_INCLUDE_ONCE)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 507 (internal_functions_in_yacc)
state 124
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 262 | '~' expr .
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- $default reduce using rule 262 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 506 internal_functions_in_yacc: "include (T_INCLUDE)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 506 (internal_functions_in_yacc)
state 125
- 288 expr_without_variable: '@' $@49 . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 272
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 331 | "print (T_PRINT)" expr .
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 331 (expr_without_variable)
state 126
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 285 | T_UNSET_CAST expr .
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 294 | '+' expr .
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
- $default reduce using rule 285 (expr_without_variable)
+ $default reduce using rule 294 (expr_without_variable)
state 127
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 284 | T_BOOL_CAST expr .
-
- $default reduce using rule 284 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 295 | '-' expr .
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ $default reduce using rule 295 (expr_without_variable)
state 128
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 283 | T_OBJECT_CAST expr .
-
- $default reduce using rule 283 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 296 | '!' expr .
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 296 (expr_without_variable)
state 129
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 282 | T_ARRAY_CAST expr .
-
- $default reduce using rule 282 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 297 | '~' expr .
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ $default reduce using rule 297 (expr_without_variable)
state 130
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 281 | T_STRING_CAST expr .
-
- $default reduce using rule 281 (expr_without_variable)
+ 326 expr_without_variable: '@' @52 . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 286
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 131
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 280 | T_DOUBLE_CAST expr .
-
- $default reduce using rule 280 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 323 | "(unset) (T_UNSET_CAST)" expr .
+
+ $default reduce using rule 323 (expr_without_variable)
state 132
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 279 | T_INT_CAST expr .
-
- $default reduce using rule 279 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 322 | "(bool) (T_BOOL_CAST)" expr .
+
+ $default reduce using rule 322 (expr_without_variable)
state 133
- 305 function_call: T_NAMESPACE . T_NS_SEPARATOR namespace_name '(' $@52 function_call_parameter_list ')'
- 320 class_name: T_NAMESPACE . T_NS_SEPARATOR namespace_name
-
- T_NS_SEPARATOR shift, and go to state 273
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 321 | "(object) (T_OBJECT_CAST)" expr .
+
+ $default reduce using rule 321 (expr_without_variable)
state 134
- 307 function_call: T_NS_SEPARATOR . namespace_name '(' $@53 function_call_parameter_list ')'
- 321 class_name: T_NS_SEPARATOR . namespace_name
-
- T_STRING shift, and go to state 111
-
- namespace_name go to state 274
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 320 | "(array) (T_ARRAY_CAST)" expr .
+
+ $default reduce using rule 320 (expr_without_variable)
state 135
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 303 function_call: namespace_name . '(' $@51 function_call_parameter_list ')'
- 319 class_name: namespace_name .
-
- T_NS_SEPARATOR shift, and go to state 213
- '(' shift, and go to state 214
-
- $default reduce using rule 319 (class_name)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 319 | "(string) (T_STRING_CAST)" expr .
+
+ $default reduce using rule 319 (expr_without_variable)
state 136
- 309 function_call: class_name . T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@54 function_call_parameter_list ')'
- 311 | class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@55 function_call_parameter_list ')'
- 397 static_member: class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
-
- T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 275
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 318 | "(double) (T_DOUBLE_CAST)" expr .
+
+ $default reduce using rule 318 (expr_without_variable)
state 137
- 238 expr_without_variable: T_DEC rw_variable .
-
- $default reduce using rule 238 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 317 | "(int) (T_INT_CAST)" expr .
+
+ $default reduce using rule 317 (expr_without_variable)
state 138
- 383 rw_variable: variable .
+ 359 class_name: "static (T_STATIC)" .
- $default reduce using rule 383 (rw_variable)
+ $default reduce using rule 359 (class_name)
state 139
- 313 function_call: variable_class_name . T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@56 function_call_parameter_list ')'
- 315 | variable_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@57 function_call_parameter_list ')'
- 398 static_member: variable_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
+ 346 function_call: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list ')'
+ 361 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
- T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 276
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 287
state 140
- 236 expr_without_variable: T_INC rw_variable .
+ 348 function_call: "\\ (T_NS_SEPARATOR)" . namespace_name '(' @57 function_call_parameter_list ')'
+ 362 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
+
+ "identifier (T_STRING)" shift, and go to state 116
- $default reduce using rule 236 (expr_without_variable)
+ namespace_name go to state 288
state 141
- 223 expr_without_variable: T_CLONE expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- $default reduce using rule 223 (expr_without_variable)
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 344 function_call: namespace_name . '(' @55 function_call_parameter_list ')'
+ 360 class_name: namespace_name .
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ '(' shift, and go to state 226
+
+ $default reduce using rule 360 (class_name)
state 142
- 320 class_name: T_NAMESPACE . T_NS_SEPARATOR namespace_name
+ 350 function_call: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 function_call_parameter_list ')'
+ 352 | class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 function_call_parameter_list ')'
+ 445 static_member: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
- T_NS_SEPARATOR shift, and go to state 277
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 289
state 143
- 321 class_name: T_NS_SEPARATOR . namespace_name
-
- T_STRING shift, and go to state 111
+ 273 expr_without_variable: "-- (T_DEC)" rw_variable .
- namespace_name go to state 278
+ $default reduce using rule 273 (expr_without_variable)
state 144
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 319 class_name: namespace_name .
+ 427 rw_variable: variable .
- T_NS_SEPARATOR shift, and go to state 213
-
- $default reduce using rule 319 (class_name)
+ $default reduce using rule 427 (rw_variable)
state 145
- 325 class_name_reference: class_name .
- 397 static_member: class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
-
- T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 279
+ 354 function_call: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 function_call_parameter_list ')'
+ 356 | variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 function_call_parameter_list ')'
+ 446 static_member: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
- $default reduce using rule 325 (class_name_reference)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 290
state 146
- 222 expr_without_variable: T_NEW class_name_reference . $@41 ctor_arguments
-
- $default reduce using rule 221 ($@41)
+ 271 expr_without_variable: "++ (T_INC)" rw_variable .
- $@41 go to state 280
+ $default reduce using rule 271 (expr_without_variable)
state 147
- 326 class_name_reference: dynamic_class_name_reference .
-
- $default reduce using rule 326 (class_name_reference)
+ 489 non_empty_array_pair_list: '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ w_variable go to state 291
+ variable go to state 292
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 148
- 398 static_member: variable_class_name . T_PAAMAYIM_NEKUDOTAYIM variable_without_objects
-
- T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 281
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 484 non_empty_array_pair_list: expr . "=> (T_DOUBLE_ARROW)" expr
+ 485 | expr .
+ 488 | expr . "=> (T_DOUBLE_ARROW)" '&' w_variable
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 293
+
+ $default reduce using rule 485 (non_empty_array_pair_list)
state 149
- 329 dynamic_class_name_reference: base_variable . T_OBJECT_OPERATOR $@59 object_property $@60 dynamic_class_name_variable_properties
- 330 | base_variable .
+ 329 expr_without_variable: '[' array_pair_list . ']'
- T_OBJECT_OPERATOR shift, and go to state 282
-
- $default reduce using rule 330 (dynamic_class_name_reference)
+ ']' shift, and go to state 294
state 150
- 399 variable_class_name: reference_variable .
- 402 base_variable: reference_variable .
- 405 reference_variable: reference_variable . '[' dim_offset ']'
- 406 | reference_variable . '{' expr '}'
+ 481 array_pair_list: non_empty_array_pair_list . possible_comma
+ 482 non_empty_array_pair_list: non_empty_array_pair_list . ',' expr "=> (T_DOUBLE_ARROW)" expr
+ 483 | non_empty_array_pair_list . ',' expr
+ 486 | non_empty_array_pair_list . ',' expr "=> (T_DOUBLE_ARROW)" '&' w_variable
+ 487 | non_empty_array_pair_list . ',' '&' w_variable
- '[' shift, and go to state 266
- '{' shift, and go to state 267
+ ',' shift, and go to state 295
- T_PAAMAYIM_NEKUDOTAYIM reduce using rule 399 (variable_class_name)
- $default reduce using rule 402 (base_variable)
+ $default reduce using rule 417 (possible_comma)
+ possible_comma go to state 296
-state 151
- 403 base_variable: simple_indirect_reference . reference_variable
- 421 simple_indirect_reference: simple_indirect_reference . '$'
+state 151
- T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 268
+ 258 expr_without_variable: "clone (T_CLONE)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
- reference_variable go to state 283
- compound_variable go to state 107
+ $default reduce using rule 258 (expr_without_variable)
state 152
- 335 exit_expr: '(' . ')'
- 336 | '(' . expr ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ')' shift, and go to state 284
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 285
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 361 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 297
state 153
- 286 expr_without_variable: T_EXIT exit_expr .
+ 362 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
- $default reduce using rule 286 (expr_without_variable)
+ "identifier (T_STRING)" shift, and go to state 116
+
+ namespace_name go to state 298
state 154
- 38 unticked_statement: T_IF '(' . expr ')' $@5 statement $@6 elseif_list else_single
- 41 | T_IF '(' . expr ')' ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single T_ENDIF ';'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 286
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 360 class_name: namespace_name .
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+
+ $default reduce using rule 360 (class_name)
state 155
- 34 statement: T_STRING ':' .
+ 366 class_name_reference: class_name .
+ 445 static_member: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
- $default reduce using rule 34 (statement)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 299
+
+ $default reduce using rule 366 (class_name_reference)
state 156
- 63 unticked_statement: T_ECHO echo_expr_list . ';'
- 208 echo_expr_list: echo_expr_list . ',' expr
+ 251 new_expr: "new (T_NEW)" class_name_reference . @41 ctor_arguments
+
+ $default reduce using rule 250 (@41)
- ',' shift, and go to state 287
- ';' shift, and go to state 288
+ @41 go to state 300
state 157
- 209 echo_expr_list: expr .
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 209 (echo_expr_list)
+ 367 class_name_reference: dynamic_class_name_reference .
+
+ $default reduce using rule 367 (class_name_reference)
state 158
- 47 unticked_statement: T_DO $@11 . statement T_WHILE '(' $@12 expr ')' ';'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_IF shift, and go to state 28
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_INLINE_HTML shift, and go to state 34
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ECHO shift, and go to state 36
- T_DO shift, and go to state 37
- T_WHILE shift, and go to state 38
- T_FOR shift, and go to state 39
- T_FOREACH shift, and go to state 40
- T_DECLARE shift, and go to state 41
- T_SWITCH shift, and go to state 42
- T_BREAK shift, and go to state 43
- T_CONTINUE shift, and go to state 44
- T_GOTO shift, and go to state 45
- T_FUNCTION shift, and go to state 46
- T_RETURN shift, and go to state 48
- T_TRY shift, and go to state 49
- T_THROW shift, and go to state 50
- T_GLOBAL shift, and go to state 52
- T_STATIC shift, and go to state 55
- T_UNSET shift, and go to state 56
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 75
- '{' shift, and go to state 76
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- statement go to state 289
- unticked_statement go to state 84
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 97
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 446 static_member: variable_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects
+
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 301
state 159
- 44 unticked_statement: T_WHILE '(' . $@9 expr ')' $@10 while_statement
+ 370 dynamic_class_name_reference: base_variable . "-> (T_OBJECT_OPERATOR)" @63 object_property @64 dynamic_class_name_variable_properties
+ 371 | base_variable .
- $default reduce using rule 42 ($@9)
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 302
- $@9 go to state 290
+ $default reduce using rule 371 (dynamic_class_name_reference)
state 160
- 51 unticked_statement: T_FOR '(' . for_expr ';' $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 210 (for_expr)
-
- namespace_name go to state 80
- for_expr go to state 291
- non_empty_for_expr go to state 292
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 293
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 447 variable_class_name: reference_variable .
+ 454 base_variable: reference_variable .
+ 457 reference_variable: reference_variable . '[' dim_offset ']'
+ 458 | reference_variable . '{' expr '}'
+
+ '[' shift, and go to state 280
+ '{' shift, and go to state 281
+
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 447 (variable_class_name)
+ $default reduce using rule 454 (base_variable)
state 161
- 69 unticked_statement: T_FOREACH '(' . variable T_AS $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement
- 72 | T_FOREACH '(' . expr_without_variable T_AS $@19 variable foreach_optional_arg ')' $@20 foreach_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 294
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 295
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 455 base_variable: simple_indirect_reference . reference_variable
+ 473 simple_indirect_reference: simple_indirect_reference . '$'
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '$' shift, and go to state 282
-state 162
+ reference_variable go to state 303
+ compound_variable go to state 112
- 74 unticked_statement: T_DECLARE $@21 . '(' declare_list ')' declare_statement
- '(' shift, and go to state 296
+state 162
+
+ 376 exit_expr: '(' . ')'
+ 377 | '(' . expr ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ')' shift, and go to state 304
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 305
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 163
- 53 unticked_statement: T_SWITCH '(' . expr ')' $@16 switch_case_list
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 297
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 324 expr_without_variable: "exit (T_EXIT)" exit_expr .
+
+ $default reduce using rule 324 (expr_without_variable)
state 164
- 54 unticked_statement: T_BREAK ';' .
-
- $default reduce using rule 54 (unticked_statement)
+ 38 unticked_statement: "if (T_IF)" '(' . expr ')' @5 statement @6 elseif_list else_single
+ 41 | "if (T_IF)" '(' . expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 306
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 165
- 55 unticked_statement: T_BREAK expr . ';'
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ';' shift, and go to state 298
+ 34 statement: "identifier (T_STRING)" ':' .
+
+ $default reduce using rule 34 (statement)
state 166
- 56 unticked_statement: T_CONTINUE ';' .
+ 63 unticked_statement: "echo (T_ECHO)" echo_expr_list . ';'
+ 232 echo_expr_list: echo_expr_list . ',' expr
- $default reduce using rule 56 (unticked_statement)
+ ',' shift, and go to state 307
+ ';' shift, and go to state 308
state 167
- 57 unticked_statement: T_CONTINUE expr . ';'
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ';' shift, and go to state 299
+ 233 echo_expr_list: expr .
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 233 (echo_expr_list)
state 168
- 83 unticked_statement: T_GOTO T_STRING . ';'
-
- ';' shift, and go to state 300
+ 47 unticked_statement: "do (T_DO)" @11 . statement "while (T_WHILE)" '(' @12 expr ')' ';'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "if (T_IF)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 32
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ T_INLINE_HTML shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "echo (T_ECHO)" shift, and go to state 37
+ "do (T_DO)" shift, and go to state 38
+ "while (T_WHILE)" shift, and go to state 39
+ "for (T_FOR)" shift, and go to state 40
+ "foreach (T_FOREACH)" shift, and go to state 41
+ "declare (T_DECLARE)" shift, and go to state 42
+ "switch (T_SWITCH)" shift, and go to state 43
+ "break (T_BREAK)" shift, and go to state 44
+ "continue (T_CONTINUE)" shift, and go to state 45
+ "goto (T_GOTO)" shift, and go to state 46
+ "function (T_FUNCTION)" shift, and go to state 47
+ "return (T_RETURN)" shift, and go to state 49
+ "try (T_TRY)" shift, and go to state 50
+ "throw (T_THROW)" shift, and go to state 51
+ "global (T_GLOBAL)" shift, and go to state 53
+ "static (T_STATIC)" shift, and go to state 56
+ "unset (T_UNSET)" shift, and go to state 57
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 78
+ '{' shift, and go to state 79
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ statement go to state 309
+ unticked_statement go to state 87
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 101
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 169
- 25 constant_declaration: T_CONST T_STRING . '=' static_scalar
+ 44 unticked_statement: "while (T_WHILE)" '(' . @9 expr ')' @10 while_statement
- '=' shift, and go to state 301
+ $default reduce using rule 42 (@9)
+ @9 go to state 310
-state 170
- 58 unticked_statement: T_RETURN ';' .
+state 170
- $default reduce using rule 58 (unticked_statement)
+ 51 unticked_statement: "for (T_FOR)" '(' . for_expr ';' @13 for_expr ';' @14 for_expr ')' @15 for_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 234 (for_expr)
+
+ namespace_name go to state 83
+ for_expr go to state 311
+ non_empty_for_expr go to state 312
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 313
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 171
- 59 unticked_statement: T_RETURN expr_without_variable . ';'
- 380 expr: expr_without_variable .
-
- ';' shift, and go to state 302
-
- $default reduce using rule 380 (expr)
+ 69 unticked_statement: "foreach (T_FOREACH)" '(' . variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement
+ 72 | "foreach (T_FOREACH)" '(' . expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' @20 foreach_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 314
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 315
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 172
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
+ 74 unticked_statement: "declare (T_DECLARE)" @21 . '(' declare_list ')' declare_statement
+
+ '(' shift, and go to state 316
state 173
- 60 unticked_statement: T_RETURN variable . ';'
- 217 expr_without_variable: variable . '=' expr
- 218 | variable . '=' '&' variable
- 220 | variable . '=' '&' T_NEW class_name_reference $@40 ctor_arguments
- 224 | variable . T_PLUS_EQUAL expr
- 225 | variable . T_MINUS_EQUAL expr
- 226 | variable . T_MUL_EQUAL expr
- 227 | variable . T_DIV_EQUAL expr
- 228 | variable . T_CONCAT_EQUAL expr
- 229 | variable . T_MOD_EQUAL expr
- 230 | variable . T_AND_EQUAL expr
- 231 | variable . T_OR_EQUAL expr
- 232 | variable . T_XOR_EQUAL expr
- 233 | variable . T_SL_EQUAL expr
- 234 | variable . T_SR_EQUAL expr
- 381 r_variable: variable .
- 383 rw_variable: variable .
-
- '=' shift, and go to state 251
- T_SR_EQUAL shift, and go to state 252
- T_SL_EQUAL shift, and go to state 253
- T_XOR_EQUAL shift, and go to state 254
- T_OR_EQUAL shift, and go to state 255
- T_AND_EQUAL shift, and go to state 256
- T_MOD_EQUAL shift, and go to state 257
- T_CONCAT_EQUAL shift, and go to state 258
- T_DIV_EQUAL shift, and go to state 259
- T_MUL_EQUAL shift, and go to state 260
- T_MINUS_EQUAL shift, and go to state 261
- T_PLUS_EQUAL shift, and go to state 262
- ';' shift, and go to state 303
-
- T_DEC reduce using rule 383 (rw_variable)
- T_INC reduce using rule 383 (rw_variable)
- $default reduce using rule 381 (r_variable)
+ 53 unticked_statement: "switch (T_SWITCH)" '(' . expr ')' @16 switch_case_list
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 317
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 174
- 81 unticked_statement: T_TRY $@22 . '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
+ 54 unticked_statement: "break (T_BREAK)" ';' .
- '{' shift, and go to state 304
+ $default reduce using rule 54 (unticked_statement)
state 175
- 82 unticked_statement: T_THROW expr . ';'
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ';' shift, and go to state 305
+ 55 unticked_statement: "break (T_BREAK)" expr . ';'
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ';' shift, and go to state 318
state 176
- 22 use_declaration: T_NS_SEPARATOR . namespace_name
- 23 | T_NS_SEPARATOR . namespace_name T_AS T_STRING
-
- T_STRING shift, and go to state 111
+ 56 unticked_statement: "continue (T_CONTINUE)" ';' .
- namespace_name go to state 306
+ $default reduce using rule 56 (unticked_statement)
state 177
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 20 use_declaration: namespace_name .
- 21 | namespace_name . T_AS T_STRING
-
- T_AS shift, and go to state 307
- T_NS_SEPARATOR shift, and go to state 213
-
- $default reduce using rule 20 (use_declaration)
+ 57 unticked_statement: "continue (T_CONTINUE)" expr . ';'
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ';' shift, and go to state 319
state 178
- 16 top_statement: T_USE use_declarations . ';'
- 18 use_declarations: use_declarations . ',' use_declaration
+ 83 unticked_statement: "goto (T_GOTO)" "identifier (T_STRING)" . ';'
- ',' shift, and go to state 308
- ';' shift, and go to state 309
+ ';' shift, and go to state 320
state 179
- 19 use_declarations: use_declaration .
+ 25 constant_declaration: "const (T_CONST)" "identifier (T_STRING)" . '=' static_scalar
- $default reduce using rule 19 (use_declarations)
+ '=' shift, and go to state 321
state 180
- 174 global_var: T_VARIABLE .
+ 58 unticked_statement: "return (T_RETURN)" ';' .
- $default reduce using rule 174 (global_var)
+ $default reduce using rule 58 (unticked_statement)
state 181
- 175 global_var: '$' . r_variable
- 176 | '$' . '{' expr '}'
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '{' shift, and go to state 310
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- r_variable go to state 311
- variable go to state 312
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 59 unticked_statement: "return (T_RETURN)" expr_without_variable . ';'
+ 424 expr: expr_without_variable .
+ ';' shift, and go to state 322
-state 182
+ $default reduce using rule 424 (expr)
- 61 unticked_statement: T_GLOBAL global_var_list . ';'
- 172 global_var_list: global_var_list . ',' global_var
- ',' shift, and go to state 313
- ';' shift, and go to state 314
+state 182
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
-state 183
- 173 global_var_list: global_var .
+state 183
- $default reduce using rule 173 (global_var_list)
+ 60 unticked_statement: "return (T_RETURN)" variable . ';'
+ 254 expr_without_variable: variable . '=' expr
+ 255 | variable . '=' '&' variable
+ 257 | variable . '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
+ 259 | variable . "+= (T_PLUS_EQUAL)" expr
+ 260 | variable . "-= (T_MINUS_EQUAL)" expr
+ 261 | variable . "*= (T_MUL_EQUAL)" expr
+ 262 | variable . "/= (T_DIV_EQUAL)" expr
+ 263 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 264 | variable . "%= (T_MOD_EQUAL)" expr
+ 265 | variable . "&= (T_AND_EQUAL)" expr
+ 266 | variable . "|= (T_OR_EQUAL)" expr
+ 267 | variable . "^= (T_XOR_EQUAL)" expr
+ 268 | variable . "<<= (T_SL_EQUAL)" expr
+ 269 | variable . ">>= (T_SR_EQUAL)" expr
+ 425 r_variable: variable .
+ 427 rw_variable: variable .
+
+ '=' shift, and go to state 264
+ ">>= (T_SR_EQUAL)" shift, and go to state 265
+ "<<= (T_SL_EQUAL)" shift, and go to state 266
+ "^= (T_XOR_EQUAL)" shift, and go to state 267
+ "|= (T_OR_EQUAL)" shift, and go to state 268
+ "&= (T_AND_EQUAL)" shift, and go to state 269
+ "%= (T_MOD_EQUAL)" shift, and go to state 270
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 271
+ "/= (T_DIV_EQUAL)" shift, and go to state 272
+ "*= (T_MUL_EQUAL)" shift, and go to state 273
+ "-= (T_MINUS_EQUAL)" shift, and go to state 274
+ "+= (T_PLUS_EQUAL)" shift, and go to state 275
+ ';' shift, and go to state 323
+
+ "-- (T_DEC)" reduce using rule 427 (rw_variable)
+ "++ (T_INC)" reduce using rule 427 (rw_variable)
+ $default reduce using rule 425 (r_variable)
state 184
- 106 class_entry_type: T_FINAL T_CLASS .
+ 81 unticked_statement: "try (T_TRY)" @22 . '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
- $default reduce using rule 106 (class_entry_type)
+ '{' shift, and go to state 324
state 185
- 105 class_entry_type: T_ABSTRACT T_CLASS .
-
- $default reduce using rule 105 (class_entry_type)
+ 82 unticked_statement: "throw (T_THROW)" expr . ';'
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ';' shift, and go to state 325
state 186
- 179 static_var_list: T_VARIABLE .
- 180 | T_VARIABLE . '=' static_scalar
+ 22 use_declaration: "\\ (T_NS_SEPARATOR)" . namespace_name
+ 23 | "\\ (T_NS_SEPARATOR)" . namespace_name "as (T_AS)" "identifier (T_STRING)"
- '=' shift, and go to state 315
+ "identifier (T_STRING)" shift, and go to state 116
- $default reduce using rule 179 (static_var_list)
+ namespace_name go to state 326
state 187
- 62 unticked_statement: T_STATIC static_var_list . ';'
- 177 static_var_list: static_var_list . ',' T_VARIABLE
- 178 | static_var_list . ',' T_VARIABLE '=' static_scalar
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 20 use_declaration: namespace_name .
+ 21 | namespace_name . "as (T_AS)" "identifier (T_STRING)"
+
+ "as (T_AS)" shift, and go to state 327
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- ',' shift, and go to state 316
- ';' shift, and go to state 317
+ $default reduce using rule 20 (use_declaration)
state 188
- 66 unticked_statement: T_UNSET '(' . unset_variables ')' ';'
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- unset_variables go to state 318
- unset_variable go to state 319
- function_call go to state 93
- class_name go to state 136
- variable go to state 320
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 16 top_statement: "use (T_USE)" use_declarations . ';'
+ 18 use_declarations: use_declarations . ',' use_declaration
+
+ ',' shift, and go to state 328
+ ';' shift, and go to state 329
state 189
- 452 internal_functions_in_yacc: T_ISSET '(' . isset_variables ')'
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- variable go to state 321
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- isset_variables go to state 322
+ 19 use_declarations: use_declaration .
+
+ $default reduce using rule 19 (use_declarations)
state 190
- 453 internal_functions_in_yacc: T_EMPTY '(' . variable ')'
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- variable go to state 323
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 176 global_var: "variable (T_VARIABLE)" .
+ $default reduce using rule 176 (global_var)
-state 191
- 10 top_statement: T_HALT_COMPILER '(' . ')' ';'
+state 191
- ')' shift, and go to state 324
+ 177 global_var: '$' . r_variable
+ 178 | '$' . '{' expr '}'
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '{' shift, and go to state 330
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ r_variable go to state 331
+ variable go to state 332
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 192
- 216 expr_without_variable: T_LIST '(' . $@39 assignment_list ')' '=' expr
+ 61 unticked_statement: "global (T_GLOBAL)" global_var_list . ';'
+ 174 global_var_list: global_var_list . ',' global_var
- $default reduce using rule 215 ($@39)
-
- $@39 go to state 325
+ ',' shift, and go to state 333
+ ';' shift, and go to state 334
state 193
- 290 expr_without_variable: T_ARRAY '(' . array_pair_list ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 326
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 428 (array_pair_list)
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 327
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- array_pair_list go to state 328
- non_empty_array_pair_list go to state 329
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 175 global_var_list: global_var .
+ $default reduce using rule 175 (global_var_list)
-state 194
- 442 encaps_var: T_VARIABLE .
- 444 | T_VARIABLE . '[' $@67 encaps_var_offset ']'
- 445 | T_VARIABLE . T_OBJECT_OPERATOR T_STRING
+state 194
- '[' shift, and go to state 330
- T_OBJECT_OPERATOR shift, and go to state 331
+ 107 class_entry_type: "final (T_FINAL)" "class (T_CLASS)" .
- $default reduce using rule 442 (encaps_var)
+ $default reduce using rule 107 (class_entry_type)
state 195
- 352 common_scalar: T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE . T_END_HEREDOC
- 441 encaps_list: T_ENCAPSED_AND_WHITESPACE . encaps_var
+ 105 class_entry_type: "abstract (T_ABSTRACT)" "class (T_CLASS)" .
- T_VARIABLE shift, and go to state 194
- T_END_HEREDOC shift, and go to state 332
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 197
- T_CURLY_OPEN shift, and go to state 198
-
- encaps_var go to state 333
+ $default reduce using rule 105 (class_entry_type)
state 196
- 353 common_scalar: T_START_HEREDOC T_END_HEREDOC .
+ 181 static_var_list: "variable (T_VARIABLE)" .
+ 182 | "variable (T_VARIABLE)" . '=' static_scalar
+
+ '=' shift, and go to state 335
- $default reduce using rule 353 (common_scalar)
+ $default reduce using rule 181 (static_var_list)
state 197
- 446 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES . expr '}'
- 447 | T_DOLLAR_OPEN_CURLY_BRACES . T_STRING_VARNAME '[' expr ']' '}'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 334
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 335
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 62 unticked_statement: "static (T_STATIC)" static_var_list . ';'
+ 179 static_var_list: static_var_list . ',' "variable (T_VARIABLE)"
+ 180 | static_var_list . ',' "variable (T_VARIABLE)" '=' static_scalar
+
+ ',' shift, and go to state 336
+ ';' shift, and go to state 337
state 198
- 448 encaps_var: T_CURLY_OPEN . variable '}'
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- variable go to state 336
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 335 expr_without_variable: "static (T_STATIC)" function . is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ '&' shift, and go to state 231
-state 199
+ $default reduce using rule 96 (is_reference)
- 370 scalar: T_START_HEREDOC encaps_list . T_END_HEREDOC
- 438 encaps_list: encaps_list . encaps_var
- 439 | encaps_list . T_ENCAPSED_AND_WHITESPACE
+ is_reference go to state 338
- T_VARIABLE shift, and go to state 194
- T_ENCAPSED_AND_WHITESPACE shift, and go to state 337
- T_END_HEREDOC shift, and go to state 338
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 197
- T_CURLY_OPEN shift, and go to state 198
- encaps_var go to state 339
+state 199
+ 66 unticked_statement: "unset (T_UNSET)" '(' . unset_variables ')' ';'
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ unset_variables go to state 339
+ unset_variable go to state 340
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 341
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
-state 200
- 440 encaps_list: encaps_var .
+state 200
- $default reduce using rule 440 (encaps_list)
+ 504 internal_functions_in_yacc: "isset (T_ISSET)" '(' . isset_variables ')'
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 342
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ isset_variables go to state 343
state 201
- 305 function_call: T_NAMESPACE T_NS_SEPARATOR . namespace_name '(' $@52 function_call_parameter_list ')'
- 320 class_name: T_NAMESPACE T_NS_SEPARATOR . namespace_name
- 366 scalar: T_NAMESPACE T_NS_SEPARATOR . namespace_name
-
- T_STRING shift, and go to state 111
-
- namespace_name go to state 340
+ 505 internal_functions_in_yacc: "empty (T_EMPTY)" '(' . variable ')'
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 344
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 202
- 15 top_statement: T_NAMESPACE '{' . $@3 top_statement_list '}'
+ 10 top_statement: "__halt_compiler (T_HALT_COMPILER)" '(' . ')' ';'
- $default reduce using rule 14 ($@3)
-
- $@3 go to state 341
+ ')' shift, and go to state 345
state 203
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 11 top_statement: T_NAMESPACE namespace_name . ';'
- 13 | T_NAMESPACE namespace_name . '{' $@2 top_statement_list '}'
+ 253 expr_without_variable: "list (T_LIST)" '(' . @42 assignment_list ')' '=' expr
+
+ $default reduce using rule 252 (@42)
- T_NS_SEPARATOR shift, and go to state 213
- ';' shift, and go to state 342
- '{' shift, and go to state 343
+ @42 go to state 346
state 204
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 307 function_call: T_NS_SEPARATOR namespace_name . '(' $@53 function_call_parameter_list ')'
- 321 class_name: T_NS_SEPARATOR namespace_name .
- 367 scalar: T_NS_SEPARATOR namespace_name .
+ 328 expr_without_variable: "array (T_ARRAY)" '(' . array_pair_list ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 147
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 480 (array_pair_list)
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 148
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ array_pair_list go to state 347
+ non_empty_array_pair_list go to state 150
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
- T_NS_SEPARATOR shift, and go to state 213
- '(' shift, and go to state 344
- T_PAAMAYIM_NEKUDOTAYIM reduce using rule 321 (class_name)
- $default reduce using rule 367 (scalar)
+state 205
+ 494 encaps_var: "variable (T_VARIABLE)" .
+ 496 | "variable (T_VARIABLE)" . '[' @72 encaps_var_offset ']'
+ 497 | "variable (T_VARIABLE)" . "-> (T_OBJECT_OPERATOR)" "identifier (T_STRING)"
-state 205
+ '[' shift, and go to state 348
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 349
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 272 | '(' expr . ')'
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ')' shift, and go to state 345
+ $default reduce using rule 494 (encaps_var)
state 206
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 35 unticked_statement: '{' inner_statement_list . '}'
-
- '}' shift, and go to state 346
+ 393 common_scalar: "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . "heredoc end (T_END_HEREDOC)"
+ 493 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . encaps_var
- $default reduce using rule 26 ($@4)
+ "variable (T_VARIABLE)" shift, and go to state 205
+ "heredoc end (T_END_HEREDOC)" shift, and go to state 350
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
+ "{$ (T_CURLY_OPEN)" shift, and go to state 209
- $@4 go to state 347
+ encaps_var go to state 351
state 207
- 409 compound_variable: '$' '{' . expr '}'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 348
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 394 common_scalar: "heredoc start (T_START_HEREDOC)" "heredoc end (T_END_HEREDOC)" .
+ $default reduce using rule 394 (common_scalar)
-state 208
-
- 338 backticks_expr: T_ENCAPSED_AND_WHITESPACE .
- 441 encaps_list: T_ENCAPSED_AND_WHITESPACE . encaps_var
-
- T_VARIABLE shift, and go to state 194
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 197
- T_CURLY_OPEN shift, and go to state 198
- $default reduce using rule 338 (backticks_expr)
+state 208
- encaps_var go to state 333
+ 498 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" . expr '}'
+ 499 | "${ (T_DOLLAR_OPEN_CURLY_BRACES)" . "variable name (T_STRING_VARNAME)" '[' expr ']' '}'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 352
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 353
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 209
- 291 expr_without_variable: '`' backticks_expr . '`'
-
- '`' shift, and go to state 349
+ 500 encaps_var: "{$ (T_CURLY_OPEN)" . variable '}'
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 354
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 210
- 339 backticks_expr: encaps_list .
- 438 encaps_list: encaps_list . encaps_var
- 439 | encaps_list . T_ENCAPSED_AND_WHITESPACE
-
- T_VARIABLE shift, and go to state 194
- T_ENCAPSED_AND_WHITESPACE shift, and go to state 337
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 197
- T_CURLY_OPEN shift, and go to state 198
+ 413 scalar: "heredoc start (T_START_HEREDOC)" encaps_list . "heredoc end (T_END_HEREDOC)"
+ 490 encaps_list: encaps_list . encaps_var
+ 491 | encaps_list . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
- $default reduce using rule 339 (backticks_expr)
+ "variable (T_VARIABLE)" shift, and go to state 205
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 355
+ "heredoc end (T_END_HEREDOC)" shift, and go to state 356
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
+ "{$ (T_CURLY_OPEN)" shift, and go to state 209
- encaps_var go to state 339
+ encaps_var go to state 357
state 211
- 441 encaps_list: T_ENCAPSED_AND_WHITESPACE . encaps_var
+ 492 encaps_list: encaps_var .
- T_VARIABLE shift, and go to state 194
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 197
- T_CURLY_OPEN shift, and go to state 198
-
- encaps_var go to state 333
+ $default reduce using rule 492 (encaps_list)
state 212
- 369 scalar: '"' encaps_list . '"'
- 438 encaps_list: encaps_list . encaps_var
- 439 | encaps_list . T_ENCAPSED_AND_WHITESPACE
+ 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name '(' @56 function_call_parameter_list ')'
+ 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+ 409 scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
- T_VARIABLE shift, and go to state 194
- T_ENCAPSED_AND_WHITESPACE shift, and go to state 337
- T_DOLLAR_OPEN_CURLY_BRACES shift, and go to state 197
- T_CURLY_OPEN shift, and go to state 198
- '"' shift, and go to state 350
+ "identifier (T_STRING)" shift, and go to state 116
- encaps_var go to state 339
+ namespace_name go to state 358
state 213
- 6 namespace_name: namespace_name T_NS_SEPARATOR . T_STRING
+ 15 top_statement: "namespace (T_NAMESPACE)" '{' . @3 top_statement_list '}'
- T_STRING shift, and go to state 351
+ $default reduce using rule 14 (@3)
+ @3 go to state 359
-state 214
- 303 function_call: namespace_name '(' . $@51 function_call_parameter_list ')'
+state 214
- $default reduce using rule 302 ($@51)
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 11 top_statement: "namespace (T_NAMESPACE)" namespace_name . ';'
+ 13 | "namespace (T_NAMESPACE)" namespace_name . '{' @2 top_statement_list '}'
- $@51 go to state 352
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ ';' shift, and go to state 360
+ '{' shift, and go to state 361
state 215
- 24 constant_declaration: constant_declaration ',' . T_STRING '=' static_scalar
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name . '(' @57 function_call_parameter_list ')'
+ 362 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
+ 410 scalar: "\\ (T_NS_SEPARATOR)" namespace_name .
- T_STRING shift, and go to state 353
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ '(' shift, and go to state 362
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 362 (class_name)
+ $default reduce using rule 410 (scalar)
-state 216
-
- 17 top_statement: constant_declaration ';' .
- $default reduce using rule 17 (top_statement)
+state 216
+ 308 expr_without_variable: new_expr .
+ 310 | '(' new_expr . ')' @48 instance_call
-state 217
+ ')' shift, and go to state 363
- 101 unticked_class_declaration_statement: class_entry_type T_STRING . extends_from $@30 implements_list '{' class_statement_list '}'
+ ')' [reduce using rule 308 (expr_without_variable)]
+ $default reduce using rule 308 (expr_without_variable)
- T_EXTENDS shift, and go to state 354
- $default reduce using rule 107 (extends_from)
+state 217
- extends_from go to state 355
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 307 | '(' expr . ')'
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ')' shift, and go to state 364
state 218
- 103 unticked_class_declaration_statement: interface_entry T_STRING . $@31 interface_extends_list '{' class_statement_list '}'
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 35 unticked_statement: '{' inner_statement_list . '}'
- $default reduce using rule 102 ($@31)
+ '}' shift, and go to state 365
- $@31 go to state 356
+ $default reduce using rule 26 (@4)
+ @4 go to state 366
-state 219
- 97 is_reference: '&' .
+state 219
- $default reduce using rule 97 (is_reference)
+ 461 compound_variable: '$' '{' . expr '}'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 367
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 220
- 99 unticked_function_declaration_statement: function is_reference . T_STRING $@29 '(' parameter_list ')' '{' inner_statement_list '}'
- 294 expr_without_variable: function is_reference . '(' @50 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 379 backticks_expr: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" .
+ 493 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . encaps_var
- T_STRING shift, and go to state 357
- '(' shift, and go to state 358
+ "variable (T_VARIABLE)" shift, and go to state 205
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
+ "{$ (T_CURLY_OPEN)" shift, and go to state 209
+ $default reduce using rule 379 (backticks_expr)
+
+ encaps_var go to state 351
-state 221
- 309 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM . T_STRING '(' $@54 function_call_parameter_list ')'
- 311 | class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects '(' $@55 function_call_parameter_list ')'
- 397 static_member: class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
- 462 class_constant: class_name T_PAAMAYIM_NEKUDOTAYIM . T_STRING
+state 221
- T_STRING shift, and go to state 359
- T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 77
+ 330 expr_without_variable: '`' backticks_expr . '`'
- variable_without_objects go to state 360
- reference_variable go to state 361
- compound_variable go to state 107
- simple_indirect_reference go to state 362
+ '`' shift, and go to state 368
state 222
- 244 expr_without_variable: expr T_LOGICAL_OR . $@44 expr
+ 380 backticks_expr: encaps_list .
+ 490 encaps_list: encaps_list . encaps_var
+ 491 | encaps_list . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
- $default reduce using rule 243 ($@44)
+ "variable (T_VARIABLE)" shift, and go to state 205
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 355
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
+ "{$ (T_CURLY_OPEN)" shift, and go to state 209
- $@44 go to state 363
+ $default reduce using rule 380 (backticks_expr)
+
+ encaps_var go to state 357
state 223
- 247 expr_without_variable: expr T_LOGICAL_XOR . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 364
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 493 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . encaps_var
+ "variable (T_VARIABLE)" shift, and go to state 205
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
+ "{$ (T_CURLY_OPEN)" shift, and go to state 209
-state 224
+ encaps_var go to state 351
- 246 expr_without_variable: expr T_LOGICAL_AND . $@45 expr
- $default reduce using rule 245 ($@45)
+state 224
- $@45 go to state 365
+ 412 scalar: '"' encaps_list . '"'
+ 490 encaps_list: encaps_list . encaps_var
+ 491 | encaps_list . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
+ "variable (T_VARIABLE)" shift, and go to state 205
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 355
+ "${ (T_DOLLAR_OPEN_CURLY_BRACES)" shift, and go to state 208
+ "{$ (T_CURLY_OPEN)" shift, and go to state 209
+ '"' shift, and go to state 369
-state 225
+ encaps_var go to state 357
- 275 expr_without_variable: expr '?' . $@46 expr ':' $@47 expr
- 277 | expr '?' . ':' $@48 expr
- ':' shift, and go to state 366
+state 225
- $default reduce using rule 273 ($@46)
+ 6 namespace_name: namespace_name "\\ (T_NS_SEPARATOR)" . "identifier (T_STRING)"
- $@46 go to state 367
+ "identifier (T_STRING)" shift, and go to state 370
state 226
- 240 expr_without_variable: expr T_BOOLEAN_OR . $@42 expr
+ 344 function_call: namespace_name '(' . @55 function_call_parameter_list ')'
- $default reduce using rule 239 ($@42)
+ $default reduce using rule 343 (@55)
- $@42 go to state 368
+ @55 go to state 371
state 227
- 242 expr_without_variable: expr T_BOOLEAN_AND . $@43 expr
-
- $default reduce using rule 241 ($@43)
+ 24 constant_declaration: constant_declaration ',' . "identifier (T_STRING)" '=' static_scalar
- $@43 go to state 369
+ "identifier (T_STRING)" shift, and go to state 372
state 228
- 248 expr_without_variable: expr '|' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 370
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 17 top_statement: constant_declaration ';' .
+
+ $default reduce using rule 17 (top_statement)
state 229
- 250 expr_without_variable: expr '^' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 371
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" . extends_from @30 implements_list '{' class_statement_list '}'
+
+ "extends (T_EXTENDS)" shift, and go to state 373
+
+ $default reduce using rule 108 (extends_from)
+
+ extends_from go to state 374
state 230
- 249 expr_without_variable: expr '&' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 372
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" . @31 interface_extends_list '{' class_statement_list '}'
+
+ $default reduce using rule 102 (@31)
+
+ @31 go to state 375
state 231
- 264 expr_without_variable: expr T_IS_NOT_IDENTICAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 373
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 97 is_reference: '&' .
+
+ $default reduce using rule 97 (is_reference)
state 232
- 263 expr_without_variable: expr T_IS_IDENTICAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 374
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 99 unticked_function_declaration_statement: function is_reference . "identifier (T_STRING)" @29 '(' parameter_list ')' '{' inner_statement_list '}'
+ 333 expr_without_variable: function is_reference . '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+
+ "identifier (T_STRING)" shift, and go to state 376
+ '(' shift, and go to state 377
state 233
- 266 expr_without_variable: expr T_IS_NOT_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 375
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 450 array_function_dereference: function_call @69 . '[' dim_offset ']'
+
+ '[' shift, and go to state 378
state 234
- 265 expr_without_variable: expr T_IS_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 376
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name '(' @58 function_call_parameter_list ')'
+ 352 | class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects '(' @59 function_call_parameter_list ')'
+ 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
+ 514 class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
+
+ "identifier (T_STRING)" shift, and go to state 379
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '{' shift, and go to state 380
+ '$' shift, and go to state 80
+
+ variable_without_objects go to state 381
+ reference_variable go to state 382
+ compound_variable go to state 112
+ variable_name go to state 383
+ simple_indirect_reference go to state 384
state 235
- 267 expr_without_variable: expr '<' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 377
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 279 expr_without_variable: expr "or (T_LOGICAL_OR)" . @46 expr
+
+ $default reduce using rule 278 (@46)
+
+ @46 go to state 385
state 236
- 269 expr_without_variable: expr '>' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 378
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 282 expr_without_variable: expr "xor (T_LOGICAL_XOR)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 386
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 237
- 270 expr_without_variable: expr T_IS_GREATER_OR_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 379
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 281 expr_without_variable: expr "and (T_LOGICAL_AND)" . @47 expr
+
+ $default reduce using rule 280 (@47)
+
+ @47 go to state 387
state 238
- 268 expr_without_variable: expr T_IS_SMALLER_OR_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 380
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 313 expr_without_variable: expr '?' . @49 expr ':' @50 expr
+ 315 | expr '?' . ':' @51 expr
+
+ ':' shift, and go to state 388
+
+ $default reduce using rule 311 (@49)
+
+ @49 go to state 389
state 239
- 258 expr_without_variable: expr T_SR . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 381
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 275 expr_without_variable: expr "|| (T_BOOLEAN_OR)" . @44 expr
+
+ $default reduce using rule 274 (@44)
+
+ @44 go to state 390
state 240
- 257 expr_without_variable: expr T_SL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 382
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 277 expr_without_variable: expr "&& (T_BOOLEAN_AND)" . @45 expr
+
+ $default reduce using rule 276 (@45)
+
+ @45 go to state 391
state 241
- 252 expr_without_variable: expr '+' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 383
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 283 expr_without_variable: expr '|' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 392
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 242
- 253 expr_without_variable: expr '-' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 384
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 285 expr_without_variable: expr '^' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 393
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 243
- 251 expr_without_variable: expr '.' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 385
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 284 expr_without_variable: expr '&' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 394
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 244
- 254 expr_without_variable: expr '*' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 386
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 299 expr_without_variable: expr "!== (T_IS_NOT_IDENTICAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 395
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 245
- 255 expr_without_variable: expr '/' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 387
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 298 expr_without_variable: expr "=== (T_IS_IDENTICAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 396
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 246
- 256 expr_without_variable: expr '%' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 388
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 301 expr_without_variable: expr "!= (T_IS_NOT_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 397
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 247
- 271 expr_without_variable: expr T_INSTANCEOF . class_name_reference
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 142
- T_NS_SEPARATOR shift, and go to state 143
- '$' shift, and go to state 77
-
- namespace_name go to state 144
- class_name go to state 145
- class_name_reference go to state 389
- dynamic_class_name_reference go to state 147
- static_member go to state 102
- variable_class_name go to state 148
- base_variable go to state 149
- reference_variable go to state 150
- compound_variable go to state 107
- simple_indirect_reference go to state 151
+ 300 expr_without_variable: expr "== (T_IS_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 398
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 248
- 65 unticked_statement: expr ';' .
-
- $default reduce using rule 65 (unticked_statement)
+ 302 expr_without_variable: expr '<' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 399
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 249
- 237 expr_without_variable: rw_variable T_DEC .
-
- $default reduce using rule 237 (expr_without_variable)
+ 304 expr_without_variable: expr '>' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 400
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 250
- 235 expr_without_variable: rw_variable T_INC .
-
- $default reduce using rule 235 (expr_without_variable)
+ 305 expr_without_variable: expr ">= (T_IS_GREATER_OR_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 401
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 251
- 217 expr_without_variable: variable '=' . expr
- 218 | variable '=' . '&' variable
- 220 | variable '=' . '&' T_NEW class_name_reference $@40 ctor_arguments
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 390
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 391
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 303 expr_without_variable: expr "<= (T_IS_SMALLER_OR_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 402
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 252
- 234 expr_without_variable: variable T_SR_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 392
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 293 expr_without_variable: expr ">> (T_SR)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 403
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 253
- 233 expr_without_variable: variable T_SL_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 393
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 292 expr_without_variable: expr "<< (T_SL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 404
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 254
- 232 expr_without_variable: variable T_XOR_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 394
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 287 expr_without_variable: expr '+' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 405
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 255
- 231 expr_without_variable: variable T_OR_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 395
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 288 expr_without_variable: expr '-' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 406
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 256
- 230 expr_without_variable: variable T_AND_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 396
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 286 expr_without_variable: expr '.' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 407
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 257
- 229 expr_without_variable: variable T_MOD_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 397
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 289 expr_without_variable: expr '*' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 408
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 258
- 228 expr_without_variable: variable T_CONCAT_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 398
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 290 expr_without_variable: expr '/' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 409
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 259
- 227 expr_without_variable: variable T_DIV_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 399
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 291 expr_without_variable: expr '%' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 410
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 260
- 226 expr_without_variable: variable T_MUL_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 400
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 306 expr_without_variable: expr "instanceof (T_INSTANCEOF)" . class_name_reference
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 152
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 153
+ '$' shift, and go to state 80
+
+ namespace_name go to state 154
+ class_name go to state 155
+ class_name_reference go to state 411
+ dynamic_class_name_reference go to state 157
+ static_member go to state 106
+ variable_class_name go to state 158
+ base_variable go to state 159
+ reference_variable go to state 160
+ compound_variable go to state 112
+ simple_indirect_reference go to state 161
state 261
- 225 expr_without_variable: variable T_MINUS_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 401
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 65 unticked_statement: expr ';' .
+
+ $default reduce using rule 65 (unticked_statement)
state 262
- 224 expr_without_variable: variable T_PLUS_EQUAL . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 402
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 272 expr_without_variable: rw_variable "-- (T_DEC)" .
+
+ $default reduce using rule 272 (expr_without_variable)
state 263
- 317 function_call: variable_without_objects '(' . $@58 function_call_parameter_list ')'
-
- $default reduce using rule 316 ($@58)
+ 270 expr_without_variable: rw_variable "++ (T_INC)" .
- $@58 go to state 403
+ $default reduce using rule 270 (expr_without_variable)
state 264
- 313 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM . T_STRING '(' $@56 function_call_parameter_list ')'
- 315 | variable_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects '(' $@57 function_call_parameter_list ')'
- 398 static_member: variable_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
- 463 class_constant: variable_class_name T_PAAMAYIM_NEKUDOTAYIM . T_STRING
-
- T_STRING shift, and go to state 404
- T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 77
-
- variable_without_objects go to state 405
- reference_variable go to state 361
- compound_variable go to state 107
- simple_indirect_reference go to state 362
+ 254 expr_without_variable: variable '=' . expr
+ 255 | variable '=' . '&' variable
+ 257 | variable '=' . '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 412
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 413
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 265
- 386 variable: base_variable_with_function_calls T_OBJECT_OPERATOR . $@61 object_property $@62 method_or_not variable_properties
-
- $default reduce using rule 384 ($@61)
-
- $@61 go to state 406
+ 269 expr_without_variable: variable ">>= (T_SR_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 414
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 266
- 405 reference_variable: reference_variable '[' . dim_offset ']'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 410 (dim_offset)
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 407
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- dim_offset go to state 408
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 268 expr_without_variable: variable "<<= (T_SL_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 415
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 267
- 406 reference_variable: reference_variable '{' . expr '}'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 409
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 267 expr_without_variable: variable "^= (T_XOR_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 416
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 268
- 409 compound_variable: '$' . '{' expr '}'
- 421 simple_indirect_reference: simple_indirect_reference '$' .
-
- '{' shift, and go to state 207
-
- $default reduce using rule 421 (simple_indirect_reference)
+ 266 expr_without_variable: variable "|= (T_OR_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 417
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 269
- 396 variable_without_objects: simple_indirect_reference reference_variable .
- 403 base_variable: simple_indirect_reference reference_variable .
- 405 reference_variable: reference_variable . '[' dim_offset ']'
- 406 | reference_variable . '{' expr '}'
-
- '[' shift, and go to state 266
- '{' shift, and go to state 267
-
- '(' reduce using rule 396 (variable_without_objects)
- $default reduce using rule 403 (base_variable)
+ 265 expr_without_variable: variable "&= (T_AND_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 418
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 270
- 294 expr_without_variable: function is_reference . '(' @50 parameter_list ')' lexical_vars '{' inner_statement_list '}'
-
- '(' shift, and go to state 358
+ 264 expr_without_variable: variable "%= (T_MOD_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 419
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 271
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 456 internal_functions_in_yacc: T_EVAL '(' expr . ')'
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ')' shift, and go to state 410
+ 263 expr_without_variable: variable ".= (T_CONCAT_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 420
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 272
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 288 | '@' $@49 expr .
-
- $default reduce using rule 288 (expr_without_variable)
+ 262 expr_without_variable: variable "/= (T_DIV_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 421
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 273
- 305 function_call: T_NAMESPACE T_NS_SEPARATOR . namespace_name '(' $@52 function_call_parameter_list ')'
- 320 class_name: T_NAMESPACE T_NS_SEPARATOR . namespace_name
-
- T_STRING shift, and go to state 111
-
- namespace_name go to state 411
+ 261 expr_without_variable: variable "*= (T_MUL_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 422
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 274
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 307 function_call: T_NS_SEPARATOR namespace_name . '(' $@53 function_call_parameter_list ')'
- 321 class_name: T_NS_SEPARATOR namespace_name .
-
- T_NS_SEPARATOR shift, and go to state 213
- '(' shift, and go to state 344
-
- $default reduce using rule 321 (class_name)
+ 260 expr_without_variable: variable "-= (T_MINUS_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 423
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 275
- 309 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM . T_STRING '(' $@54 function_call_parameter_list ')'
- 311 | class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects '(' $@55 function_call_parameter_list ')'
- 397 static_member: class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
-
- T_STRING shift, and go to state 412
- T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 77
-
- variable_without_objects go to state 360
- reference_variable go to state 361
- compound_variable go to state 107
- simple_indirect_reference go to state 362
+ 259 expr_without_variable: variable "+= (T_PLUS_EQUAL)" . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 424
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 276
- 313 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM . T_STRING '(' $@56 function_call_parameter_list ')'
- 315 | variable_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects '(' $@57 function_call_parameter_list ')'
- 398 static_member: variable_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
+ 358 function_call: variable_without_objects '(' . @62 function_call_parameter_list ')'
- T_STRING shift, and go to state 413
- T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 77
+ $default reduce using rule 357 (@62)
- variable_without_objects go to state 405
- reference_variable go to state 361
- compound_variable go to state 107
- simple_indirect_reference go to state 362
+ @62 go to state 425
state 277
- 320 class_name: T_NAMESPACE T_NS_SEPARATOR . namespace_name
+ 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name '(' @60 function_call_parameter_list ')'
+ 356 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects '(' @61 function_call_parameter_list ')'
+ 446 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
+ 515 class_constant: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
- T_STRING shift, and go to state 111
+ "identifier (T_STRING)" shift, and go to state 426
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '{' shift, and go to state 380
+ '$' shift, and go to state 80
- namespace_name go to state 414
+ variable_without_objects go to state 427
+ reference_variable go to state 382
+ compound_variable go to state 112
+ variable_name go to state 428
+ simple_indirect_reference go to state 384
state 278
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 321 class_name: T_NS_SEPARATOR namespace_name .
-
- T_NS_SEPARATOR shift, and go to state 213
-
- $default reduce using rule 321 (class_name)
+ 448 array_function_dereference: array_function_dereference '[' . dim_offset ']'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 462 (dim_offset)
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 429
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ dim_offset go to state 430
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 279
- 397 static_member: class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
+ 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" . @65 object_property @66 method_or_not variable_properties
- T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 77
+ $default reduce using rule 428 (@65)
- variable_without_objects go to state 415
- reference_variable go to state 361
- compound_variable go to state 107
- simple_indirect_reference go to state 362
+ @65 go to state 431
state 280
- 222 expr_without_variable: T_NEW class_name_reference $@41 . ctor_arguments
-
- '(' shift, and go to state 416
-
- $default reduce using rule 340 (ctor_arguments)
-
- ctor_arguments go to state 417
+ 457 reference_variable: reference_variable '[' . dim_offset ']'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 462 (dim_offset)
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 429
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ dim_offset go to state 432
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 281
- 398 static_member: variable_class_name T_PAAMAYIM_NEKUDOTAYIM . variable_without_objects
-
- T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 77
-
- variable_without_objects go to state 418
- reference_variable go to state 361
- compound_variable go to state 107
- simple_indirect_reference go to state 362
+ 458 reference_variable: reference_variable '{' . expr '}'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 433
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 282
- 329 dynamic_class_name_reference: base_variable T_OBJECT_OPERATOR . $@59 object_property $@60 dynamic_class_name_variable_properties
+ 461 compound_variable: '$' . '{' expr '}'
+ 473 simple_indirect_reference: simple_indirect_reference '$' .
- $default reduce using rule 327 ($@59)
+ '{' shift, and go to state 219
- $@59 go to state 419
+ $default reduce using rule 473 (simple_indirect_reference)
state 283
- 403 base_variable: simple_indirect_reference reference_variable .
- 405 reference_variable: reference_variable . '[' dim_offset ']'
- 406 | reference_variable . '{' expr '}'
+ 444 variable_without_objects: simple_indirect_reference reference_variable .
+ 455 base_variable: simple_indirect_reference reference_variable .
+ 457 reference_variable: reference_variable . '[' dim_offset ']'
+ 458 | reference_variable . '{' expr '}'
- '[' shift, and go to state 266
- '{' shift, and go to state 267
+ '[' shift, and go to state 280
+ '{' shift, and go to state 281
- $default reduce using rule 403 (base_variable)
+ '(' reduce using rule 444 (variable_without_objects)
+ $default reduce using rule 455 (base_variable)
state 284
- 335 exit_expr: '(' ')' .
+ 333 expr_without_variable: function is_reference . '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- $default reduce using rule 335 (exit_expr)
+ '(' shift, and go to state 377
state 285
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 336 exit_expr: '(' expr . ')'
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ')' shift, and go to state 420
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 508 internal_functions_in_yacc: "eval (T_EVAL)" '(' expr . ')'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ')' shift, and go to state 434
state 286
- 38 unticked_statement: T_IF '(' expr . ')' $@5 statement $@6 elseif_list else_single
- 41 | T_IF '(' expr . ')' ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single T_ENDIF ';'
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ')' shift, and go to state 421
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 326 | '@' @52 expr .
+
+ $default reduce using rule 326 (expr_without_variable)
state 287
- 208 echo_expr_list: echo_expr_list ',' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 422
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name '(' @56 function_call_parameter_list ')'
+ 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+
+ "identifier (T_STRING)" shift, and go to state 116
+
+ namespace_name go to state 435
state 288
- 63 unticked_statement: T_ECHO echo_expr_list ';' .
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name . '(' @57 function_call_parameter_list ')'
+ 362 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
- $default reduce using rule 63 (unticked_statement)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ '(' shift, and go to state 362
+
+ $default reduce using rule 362 (class_name)
state 289
- 47 unticked_statement: T_DO $@11 statement . T_WHILE '(' $@12 expr ')' ';'
+ 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name '(' @58 function_call_parameter_list ')'
+ 352 | class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects '(' @59 function_call_parameter_list ')'
+ 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
+
+ "identifier (T_STRING)" shift, and go to state 436
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '{' shift, and go to state 380
+ '$' shift, and go to state 80
- T_WHILE shift, and go to state 423
+ variable_without_objects go to state 381
+ reference_variable go to state 382
+ compound_variable go to state 112
+ variable_name go to state 383
+ simple_indirect_reference go to state 384
state 290
- 44 unticked_statement: T_WHILE '(' $@9 . expr ')' $@10 while_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 424
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_name '(' @60 function_call_parameter_list ')'
+ 356 | variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects '(' @61 function_call_parameter_list ')'
+ 446 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
+
+ "identifier (T_STRING)" shift, and go to state 436
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '{' shift, and go to state 380
+ '$' shift, and go to state 80
+
+ variable_without_objects go to state 427
+ reference_variable go to state 382
+ compound_variable go to state 112
+ variable_name go to state 428
+ simple_indirect_reference go to state 384
state 291
- 51 unticked_statement: T_FOR '(' for_expr . ';' $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement
+ 489 non_empty_array_pair_list: '&' w_variable .
- ';' shift, and go to state 425
+ $default reduce using rule 489 (non_empty_array_pair_list)
state 292
- 211 for_expr: non_empty_for_expr .
- 213 non_empty_for_expr: non_empty_for_expr . ',' $@38 expr
-
- ',' shift, and go to state 426
+ 426 w_variable: variable .
- $default reduce using rule 211 (for_expr)
+ $default reduce using rule 426 (w_variable)
state 293
- 214 non_empty_for_expr: expr .
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 214 (non_empty_for_expr)
+ 484 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" . expr
+ 488 | expr "=> (T_DOUBLE_ARROW)" . '&' w_variable
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 437
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 438
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 294
- 72 unticked_statement: T_FOREACH '(' expr_without_variable . T_AS $@19 variable foreach_optional_arg ')' $@20 foreach_statement
- 380 expr: expr_without_variable .
+ 329 expr_without_variable: '[' array_pair_list ']' .
- T_AS shift, and go to state 427
-
- $default reduce using rule 380 (expr)
+ $default reduce using rule 329 (expr_without_variable)
state 295
- 69 unticked_statement: T_FOREACH '(' variable . T_AS $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement
- 217 expr_without_variable: variable . '=' expr
- 218 | variable . '=' '&' variable
- 220 | variable . '=' '&' T_NEW class_name_reference $@40 ctor_arguments
- 224 | variable . T_PLUS_EQUAL expr
- 225 | variable . T_MINUS_EQUAL expr
- 226 | variable . T_MUL_EQUAL expr
- 227 | variable . T_DIV_EQUAL expr
- 228 | variable . T_CONCAT_EQUAL expr
- 229 | variable . T_MOD_EQUAL expr
- 230 | variable . T_AND_EQUAL expr
- 231 | variable . T_OR_EQUAL expr
- 232 | variable . T_XOR_EQUAL expr
- 233 | variable . T_SL_EQUAL expr
- 234 | variable . T_SR_EQUAL expr
- 381 r_variable: variable .
- 383 rw_variable: variable .
-
- '=' shift, and go to state 251
- T_SR_EQUAL shift, and go to state 252
- T_SL_EQUAL shift, and go to state 253
- T_XOR_EQUAL shift, and go to state 254
- T_OR_EQUAL shift, and go to state 255
- T_AND_EQUAL shift, and go to state 256
- T_MOD_EQUAL shift, and go to state 257
- T_CONCAT_EQUAL shift, and go to state 258
- T_DIV_EQUAL shift, and go to state 259
- T_MUL_EQUAL shift, and go to state 260
- T_MINUS_EQUAL shift, and go to state 261
- T_PLUS_EQUAL shift, and go to state 262
- T_AS shift, and go to state 428
-
- T_DEC reduce using rule 383 (rw_variable)
- T_INC reduce using rule 383 (rw_variable)
- $default reduce using rule 381 (r_variable)
+ 418 possible_comma: ',' .
+ 482 non_empty_array_pair_list: non_empty_array_pair_list ',' . expr "=> (T_DOUBLE_ARROW)" expr
+ 483 | non_empty_array_pair_list ',' . expr
+ 486 | non_empty_array_pair_list ',' . expr "=> (T_DOUBLE_ARROW)" '&' w_variable
+ 487 | non_empty_array_pair_list ',' . '&' w_variable
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 439
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 418 (possible_comma)
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 440
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 296
- 74 unticked_statement: T_DECLARE $@21 '(' . declare_list ')' declare_statement
-
- T_STRING shift, and go to state 429
+ 481 array_pair_list: non_empty_array_pair_list possible_comma .
- declare_list go to state 430
+ $default reduce using rule 481 (array_pair_list)
state 297
- 53 unticked_statement: T_SWITCH '(' expr . ')' $@16 switch_case_list
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ')' shift, and go to state 431
+ 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+
+ "identifier (T_STRING)" shift, and go to state 116
+
+ namespace_name go to state 441
state 298
- 55 unticked_statement: T_BREAK expr ';' .
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 362 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
- $default reduce using rule 55 (unticked_statement)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+
+ $default reduce using rule 362 (class_name)
state 299
- 57 unticked_statement: T_CONTINUE expr ';' .
+ 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
- $default reduce using rule 57 (unticked_statement)
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '$' shift, and go to state 80
+
+ variable_without_objects go to state 442
+ reference_variable go to state 382
+ compound_variable go to state 112
+ simple_indirect_reference go to state 384
state 300
- 83 unticked_statement: T_GOTO T_STRING ';' .
+ 251 new_expr: "new (T_NEW)" class_name_reference @41 . ctor_arguments
- $default reduce using rule 83 (unticked_statement)
+ '(' shift, and go to state 443
+
+ $default reduce using rule 381 (ctor_arguments)
+
+ ctor_arguments go to state 444
state 301
- 25 constant_declaration: T_CONST T_STRING '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 441
- static_class_constant go to state 442
+ 446 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . variable_without_objects
+
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '$' shift, and go to state 80
+
+ variable_without_objects go to state 445
+ reference_variable go to state 382
+ compound_variable go to state 112
+ simple_indirect_reference go to state 384
state 302
- 59 unticked_statement: T_RETURN expr_without_variable ';' .
+ 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" . @63 object_property @64 dynamic_class_name_variable_properties
- $default reduce using rule 59 (unticked_statement)
+ $default reduce using rule 368 (@63)
+
+ @63 go to state 446
state 303
- 60 unticked_statement: T_RETURN variable ';' .
+ 455 base_variable: simple_indirect_reference reference_variable .
+ 457 reference_variable: reference_variable . '[' dim_offset ']'
+ 458 | reference_variable . '{' expr '}'
- $default reduce using rule 60 (unticked_statement)
+ '[' shift, and go to state 280
+ '{' shift, and go to state 281
+ $default reduce using rule 455 (base_variable)
-state 304
- 81 unticked_statement: T_TRY $@22 '{' . inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
+state 304
- $default reduce using rule 28 (inner_statement_list)
+ 376 exit_expr: '(' ')' .
- inner_statement_list go to state 443
+ $default reduce using rule 376 (exit_expr)
state 305
- 82 unticked_statement: T_THROW expr ';' .
-
- $default reduce using rule 82 (unticked_statement)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 377 exit_expr: '(' expr . ')'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ')' shift, and go to state 447
state 306
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 22 use_declaration: T_NS_SEPARATOR namespace_name .
- 23 | T_NS_SEPARATOR namespace_name . T_AS T_STRING
-
- T_AS shift, and go to state 444
- T_NS_SEPARATOR shift, and go to state 213
-
- $default reduce using rule 22 (use_declaration)
+ 38 unticked_statement: "if (T_IF)" '(' expr . ')' @5 statement @6 elseif_list else_single
+ 41 | "if (T_IF)" '(' expr . ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ')' shift, and go to state 448
state 307
- 21 use_declaration: namespace_name T_AS . T_STRING
-
- T_STRING shift, and go to state 445
+ 232 echo_expr_list: echo_expr_list ',' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 449
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 308
- 18 use_declarations: use_declarations ',' . use_declaration
-
- T_STRING shift, and go to state 111
- T_NS_SEPARATOR shift, and go to state 176
+ 63 unticked_statement: "echo (T_ECHO)" echo_expr_list ';' .
- namespace_name go to state 177
- use_declaration go to state 446
+ $default reduce using rule 63 (unticked_statement)
state 309
- 16 top_statement: T_USE use_declarations ';' .
+ 47 unticked_statement: "do (T_DO)" @11 statement . "while (T_WHILE)" '(' @12 expr ')' ';'
- $default reduce using rule 16 (top_statement)
+ "while (T_WHILE)" shift, and go to state 450
state 310
- 176 global_var: '$' '{' . expr '}'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 447
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 44 unticked_statement: "while (T_WHILE)" '(' @9 . expr ')' @10 while_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 451
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 311
- 175 global_var: '$' r_variable .
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr . ';' @13 for_expr ';' @14 for_expr ')' @15 for_statement
- $default reduce using rule 175 (global_var)
+ ';' shift, and go to state 452
state 312
- 381 r_variable: variable .
-
- $default reduce using rule 381 (r_variable)
+ 235 for_expr: non_empty_for_expr .
+ 237 non_empty_for_expr: non_empty_for_expr . ',' @38 expr
+ ',' shift, and go to state 453
-state 313
+ $default reduce using rule 235 (for_expr)
- 172 global_var_list: global_var_list ',' . global_var
- T_VARIABLE shift, and go to state 180
- '$' shift, and go to state 181
+state 313
- global_var go to state 448
+ 238 non_empty_for_expr: expr .
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 238 (non_empty_for_expr)
state 314
- 61 unticked_statement: T_GLOBAL global_var_list ';' .
+ 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable . "as (T_AS)" @19 variable foreach_optional_arg ')' @20 foreach_statement
+ 424 expr: expr_without_variable .
- $default reduce using rule 61 (unticked_statement)
+ "as (T_AS)" shift, and go to state 454
+
+ $default reduce using rule 424 (expr)
state 315
- 180 static_var_list: T_VARIABLE '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 449
- static_class_constant go to state 442
+ 69 unticked_statement: "foreach (T_FOREACH)" '(' variable . "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement
+ 254 expr_without_variable: variable . '=' expr
+ 255 | variable . '=' '&' variable
+ 257 | variable . '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
+ 259 | variable . "+= (T_PLUS_EQUAL)" expr
+ 260 | variable . "-= (T_MINUS_EQUAL)" expr
+ 261 | variable . "*= (T_MUL_EQUAL)" expr
+ 262 | variable . "/= (T_DIV_EQUAL)" expr
+ 263 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 264 | variable . "%= (T_MOD_EQUAL)" expr
+ 265 | variable . "&= (T_AND_EQUAL)" expr
+ 266 | variable . "|= (T_OR_EQUAL)" expr
+ 267 | variable . "^= (T_XOR_EQUAL)" expr
+ 268 | variable . "<<= (T_SL_EQUAL)" expr
+ 269 | variable . ">>= (T_SR_EQUAL)" expr
+ 425 r_variable: variable .
+ 427 rw_variable: variable .
+
+ '=' shift, and go to state 264
+ ">>= (T_SR_EQUAL)" shift, and go to state 265
+ "<<= (T_SL_EQUAL)" shift, and go to state 266
+ "^= (T_XOR_EQUAL)" shift, and go to state 267
+ "|= (T_OR_EQUAL)" shift, and go to state 268
+ "&= (T_AND_EQUAL)" shift, and go to state 269
+ "%= (T_MOD_EQUAL)" shift, and go to state 270
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 271
+ "/= (T_DIV_EQUAL)" shift, and go to state 272
+ "*= (T_MUL_EQUAL)" shift, and go to state 273
+ "-= (T_MINUS_EQUAL)" shift, and go to state 274
+ "+= (T_PLUS_EQUAL)" shift, and go to state 275
+ "as (T_AS)" shift, and go to state 455
+
+ "-- (T_DEC)" reduce using rule 427 (rw_variable)
+ "++ (T_INC)" reduce using rule 427 (rw_variable)
+ $default reduce using rule 425 (r_variable)
state 316
- 177 static_var_list: static_var_list ',' . T_VARIABLE
- 178 | static_var_list ',' . T_VARIABLE '=' static_scalar
+ 74 unticked_statement: "declare (T_DECLARE)" @21 '(' . declare_list ')' declare_statement
- T_VARIABLE shift, and go to state 450
+ "identifier (T_STRING)" shift, and go to state 456
+ declare_list go to state 457
-state 317
- 62 unticked_statement: T_STATIC static_var_list ';' .
+state 317
- $default reduce using rule 62 (unticked_statement)
+ 53 unticked_statement: "switch (T_SWITCH)" '(' expr . ')' @16 switch_case_list
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ')' shift, and go to state 458
state 318
- 66 unticked_statement: T_UNSET '(' unset_variables . ')' ';'
- 92 unset_variables: unset_variables . ',' unset_variable
+ 55 unticked_statement: "break (T_BREAK)" expr ';' .
- ',' shift, and go to state 451
- ')' shift, and go to state 452
+ $default reduce using rule 55 (unticked_statement)
state 319
- 91 unset_variables: unset_variable .
+ 57 unticked_statement: "continue (T_CONTINUE)" expr ';' .
- $default reduce using rule 91 (unset_variables)
+ $default reduce using rule 57 (unticked_statement)
state 320
- 93 unset_variable: variable .
+ 83 unticked_statement: "goto (T_GOTO)" "identifier (T_STRING)" ';' .
- $default reduce using rule 93 (unset_variable)
+ $default reduce using rule 83 (unticked_statement)
state 321
- 459 isset_variables: variable .
-
- $default reduce using rule 459 (isset_variables)
+ 25 constant_declaration: "const (T_CONST)" "identifier (T_STRING)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 470
+ static_class_constant go to state 471
state 322
- 452 internal_functions_in_yacc: T_ISSET '(' isset_variables . ')'
- 461 isset_variables: isset_variables . ',' $@68 variable
+ 59 unticked_statement: "return (T_RETURN)" expr_without_variable ';' .
- ',' shift, and go to state 453
- ')' shift, and go to state 454
+ $default reduce using rule 59 (unticked_statement)
state 323
- 453 internal_functions_in_yacc: T_EMPTY '(' variable . ')'
+ 60 unticked_statement: "return (T_RETURN)" variable ';' .
- ')' shift, and go to state 455
+ $default reduce using rule 60 (unticked_statement)
state 324
- 10 top_statement: T_HALT_COMPILER '(' ')' . ';'
+ 81 unticked_statement: "try (T_TRY)" @22 '{' . inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
- ';' shift, and go to state 456
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 472
state 325
- 216 expr_without_variable: T_LIST '(' $@39 . assignment_list ')' '=' expr
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_LIST shift, and go to state 457
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- $default reduce using rule 427 (assignment_list_element)
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- variable go to state 458
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- assignment_list go to state 459
- assignment_list_element go to state 460
+ 82 unticked_statement: "throw (T_THROW)" expr ';' .
+
+ $default reduce using rule 82 (unticked_statement)
state 326
- 437 non_empty_array_pair_list: '&' . w_variable
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- w_variable go to state 461
- variable go to state 462
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 22 use_declaration: "\\ (T_NS_SEPARATOR)" namespace_name .
+ 23 | "\\ (T_NS_SEPARATOR)" namespace_name . "as (T_AS)" "identifier (T_STRING)"
+ "as (T_AS)" shift, and go to state 473
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
-state 327
+ $default reduce using rule 22 (use_declaration)
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 432 non_empty_array_pair_list: expr . T_DOUBLE_ARROW expr
- 433 | expr .
- 436 | expr . T_DOUBLE_ARROW '&' w_variable
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- T_DOUBLE_ARROW shift, and go to state 463
-
- $default reduce using rule 433 (non_empty_array_pair_list)
+state 327
-state 328
+ 21 use_declaration: namespace_name "as (T_AS)" . "identifier (T_STRING)"
- 290 expr_without_variable: T_ARRAY '(' array_pair_list . ')'
+ "identifier (T_STRING)" shift, and go to state 474
- ')' shift, and go to state 464
+state 328
-state 329
+ 18 use_declarations: use_declarations ',' . use_declaration
- 429 array_pair_list: non_empty_array_pair_list . possible_comma
- 430 non_empty_array_pair_list: non_empty_array_pair_list . ',' expr T_DOUBLE_ARROW expr
- 431 | non_empty_array_pair_list . ',' expr
- 434 | non_empty_array_pair_list . ',' expr T_DOUBLE_ARROW '&' w_variable
- 435 | non_empty_array_pair_list . ',' '&' w_variable
+ "identifier (T_STRING)" shift, and go to state 116
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 186
- ',' shift, and go to state 465
+ namespace_name go to state 187
+ use_declaration go to state 475
- $default reduce using rule 373 (possible_comma)
- possible_comma go to state 466
+state 329
+ 16 top_statement: "use (T_USE)" use_declarations ';' .
-state 330
+ $default reduce using rule 16 (top_statement)
- 444 encaps_var: T_VARIABLE '[' . $@67 encaps_var_offset ']'
- $default reduce using rule 443 ($@67)
+state 330
- $@67 go to state 467
+ 178 global_var: '$' '{' . expr '}'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 476
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 331
- 445 encaps_var: T_VARIABLE T_OBJECT_OPERATOR . T_STRING
+ 177 global_var: '$' r_variable .
- T_STRING shift, and go to state 468
+ $default reduce using rule 177 (global_var)
state 332
- 352 common_scalar: T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC .
+ 425 r_variable: variable .
- $default reduce using rule 352 (common_scalar)
+ $default reduce using rule 425 (r_variable)
state 333
- 441 encaps_list: T_ENCAPSED_AND_WHITESPACE encaps_var .
+ 174 global_var_list: global_var_list ',' . global_var
- $default reduce using rule 441 (encaps_list)
+ "variable (T_VARIABLE)" shift, and go to state 190
+ '$' shift, and go to state 191
+ global_var go to state 477
-state 334
- 363 scalar: T_STRING_VARNAME .
- 447 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME . '[' expr ']' '}'
+state 334
- '[' shift, and go to state 469
+ 61 unticked_statement: "global (T_GLOBAL)" global_var_list ';' .
- $default reduce using rule 363 (scalar)
+ $default reduce using rule 61 (unticked_statement)
state 335
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 446 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES expr . '}'
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- '}' shift, and go to state 470
+ 182 static_var_list: "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 478
+ static_class_constant go to state 471
state 336
- 448 encaps_var: T_CURLY_OPEN variable . '}'
+ 179 static_var_list: static_var_list ',' . "variable (T_VARIABLE)"
+ 180 | static_var_list ',' . "variable (T_VARIABLE)" '=' static_scalar
- '}' shift, and go to state 471
+ "variable (T_VARIABLE)" shift, and go to state 479
state 337
- 439 encaps_list: encaps_list T_ENCAPSED_AND_WHITESPACE .
+ 62 unticked_statement: "static (T_STATIC)" static_var_list ';' .
- $default reduce using rule 439 (encaps_list)
+ $default reduce using rule 62 (unticked_statement)
state 338
- 370 scalar: T_START_HEREDOC encaps_list T_END_HEREDOC .
+ 335 expr_without_variable: "static (T_STATIC)" function is_reference . '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- $default reduce using rule 370 (scalar)
+ '(' shift, and go to state 480
state 339
- 438 encaps_list: encaps_list encaps_var .
+ 66 unticked_statement: "unset (T_UNSET)" '(' unset_variables . ')' ';'
+ 92 unset_variables: unset_variables . ',' unset_variable
- $default reduce using rule 438 (encaps_list)
+ ',' shift, and go to state 481
+ ')' shift, and go to state 482
state 340
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 305 function_call: T_NAMESPACE T_NS_SEPARATOR namespace_name . '(' $@52 function_call_parameter_list ')'
- 320 class_name: T_NAMESPACE T_NS_SEPARATOR namespace_name .
- 366 scalar: T_NAMESPACE T_NS_SEPARATOR namespace_name .
-
- T_NS_SEPARATOR shift, and go to state 213
- '(' shift, and go to state 472
+ 91 unset_variables: unset_variable .
- T_PAAMAYIM_NEKUDOTAYIM reduce using rule 320 (class_name)
- $default reduce using rule 366 (scalar)
+ $default reduce using rule 91 (unset_variables)
state 341
- 15 top_statement: T_NAMESPACE '{' $@3 . top_statement_list '}'
-
- $default reduce using rule 4 (top_statement_list)
+ 93 unset_variable: variable .
- top_statement_list go to state 473
+ $default reduce using rule 93 (unset_variable)
state 342
- 11 top_statement: T_NAMESPACE namespace_name ';' .
+ 511 isset_variables: variable .
- $default reduce using rule 11 (top_statement)
+ $default reduce using rule 511 (isset_variables)
state 343
- 13 top_statement: T_NAMESPACE namespace_name '{' . $@2 top_statement_list '}'
-
- $default reduce using rule 12 ($@2)
+ 504 internal_functions_in_yacc: "isset (T_ISSET)" '(' isset_variables . ')'
+ 513 isset_variables: isset_variables . ',' @73 variable
- $@2 go to state 474
+ ',' shift, and go to state 483
+ ')' shift, and go to state 484
state 344
- 307 function_call: T_NS_SEPARATOR namespace_name '(' . $@53 function_call_parameter_list ')'
-
- $default reduce using rule 306 ($@53)
+ 505 internal_functions_in_yacc: "empty (T_EMPTY)" '(' variable . ')'
- $@53 go to state 475
+ ')' shift, and go to state 485
state 345
- 272 expr_without_variable: '(' expr ')' .
+ 10 top_statement: "__halt_compiler (T_HALT_COMPILER)" '(' ')' . ';'
- $default reduce using rule 272 (expr_without_variable)
+ ';' shift, and go to state 486
state 346
- 35 unticked_statement: '{' inner_statement_list '}' .
-
- $default reduce using rule 35 (unticked_statement)
+ 253 expr_without_variable: "list (T_LIST)" '(' @42 . assignment_list ')' '=' expr
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "list (T_LIST)" shift, and go to state 487
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ $default reduce using rule 479 (assignment_list_element)
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 488
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ assignment_list go to state 489
+ assignment_list_element go to state 490
state 347
- 27 inner_statement_list: inner_statement_list $@4 . inner_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_IF shift, and go to state 28
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_INLINE_HTML shift, and go to state 34
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ECHO shift, and go to state 36
- T_DO shift, and go to state 37
- T_WHILE shift, and go to state 38
- T_FOR shift, and go to state 39
- T_FOREACH shift, and go to state 40
- T_DECLARE shift, and go to state 41
- T_SWITCH shift, and go to state 42
- T_BREAK shift, and go to state 43
- T_CONTINUE shift, and go to state 44
- T_GOTO shift, and go to state 45
- T_FUNCTION shift, and go to state 46
- T_RETURN shift, and go to state 48
- T_TRY shift, and go to state 49
- T_THROW shift, and go to state 50
- T_GLOBAL shift, and go to state 52
- T_FINAL shift, and go to state 53
- T_ABSTRACT shift, and go to state 54
- T_STATIC shift, and go to state 55
- T_UNSET shift, and go to state 56
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_HALT_COMPILER shift, and go to state 476
- T_CLASS shift, and go to state 60
- T_INTERFACE shift, and go to state 61
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 75
- '{' shift, and go to state 76
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- inner_statement go to state 477
- statement go to state 478
- unticked_statement go to state 84
- function_declaration_statement go to state 479
- class_declaration_statement go to state 480
- unticked_function_declaration_statement go to state 87
- unticked_class_declaration_statement go to state 88
- class_entry_type go to state 89
- interface_entry go to state 90
- expr_without_variable go to state 91
- function go to state 92
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 97
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 328 expr_without_variable: "array (T_ARRAY)" '(' array_pair_list . ')'
+
+ ')' shift, and go to state 491
state 348
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 409 compound_variable: '$' '{' expr . '}'
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- '}' shift, and go to state 481
+ 496 encaps_var: "variable (T_VARIABLE)" '[' . @72 encaps_var_offset ']'
+
+ $default reduce using rule 495 (@72)
+
+ @72 go to state 492
state 349
- 291 expr_without_variable: '`' backticks_expr '`' .
+ 497 encaps_var: "variable (T_VARIABLE)" "-> (T_OBJECT_OPERATOR)" . "identifier (T_STRING)"
- $default reduce using rule 291 (expr_without_variable)
+ "identifier (T_STRING)" shift, and go to state 493
state 350
- 369 scalar: '"' encaps_list '"' .
+ 393 common_scalar: "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)" .
- $default reduce using rule 369 (scalar)
+ $default reduce using rule 393 (common_scalar)
state 351
- 6 namespace_name: namespace_name T_NS_SEPARATOR T_STRING .
+ 493 encaps_list: "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" encaps_var .
- $default reduce using rule 6 (namespace_name)
+ $default reduce using rule 493 (encaps_list)
state 352
- 303 function_call: namespace_name '(' $@51 . function_call_parameter_list ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 482
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 165 (function_call_parameter_list)
-
- namespace_name go to state 80
- function_call_parameter_list go to state 483
- non_empty_function_call_parameter_list go to state 484
- expr_without_variable go to state 485
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 486
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 406 scalar: "variable name (T_STRING_VARNAME)" .
+ 499 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" . '[' expr ']' '}'
+ '[' shift, and go to state 494
+
+ $default reduce using rule 406 (scalar)
-state 353
- 24 constant_declaration: constant_declaration ',' T_STRING . '=' static_scalar
+state 353
- '=' shift, and go to state 487
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 498 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" expr . '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ '}' shift, and go to state 495
state 354
- 108 extends_from: T_EXTENDS . fully_qualified_class_name
-
- T_STRING shift, and go to state 111
- T_NAMESPACE shift, and go to state 488
- T_NS_SEPARATOR shift, and go to state 489
+ 500 encaps_var: "{$ (T_CURLY_OPEN)" variable . '}'
- namespace_name go to state 490
- fully_qualified_class_name go to state 491
+ '}' shift, and go to state 496
state 355
- 101 unticked_class_declaration_statement: class_entry_type T_STRING extends_from . $@30 implements_list '{' class_statement_list '}'
-
- $default reduce using rule 100 ($@30)
+ 491 encaps_list: encaps_list "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" .
- $@30 go to state 492
+ $default reduce using rule 491 (encaps_list)
state 356
- 103 unticked_class_declaration_statement: interface_entry T_STRING $@31 . interface_extends_list '{' class_statement_list '}'
+ 413 scalar: "heredoc start (T_START_HEREDOC)" encaps_list "heredoc end (T_END_HEREDOC)" .
- T_EXTENDS shift, and go to state 493
-
- $default reduce using rule 110 (interface_extends_list)
-
- interface_extends_list go to state 494
+ $default reduce using rule 413 (scalar)
state 357
- 99 unticked_function_declaration_statement: function is_reference T_STRING . $@29 '(' parameter_list ')' '{' inner_statement_list '}'
-
- $default reduce using rule 98 ($@29)
+ 490 encaps_list: encaps_list encaps_var .
- $@29 go to state 495
+ $default reduce using rule 490 (encaps_list)
state 358
- 294 expr_without_variable: function is_reference '(' . @50 parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name . '(' @56 function_call_parameter_list ')'
+ 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
+ 409 scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- $default reduce using rule 293 (@50)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ '(' shift, and go to state 497
- @50 go to state 496
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 361 (class_name)
+ $default reduce using rule 409 (scalar)
state 359
- 309 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING . '(' $@54 function_call_parameter_list ')'
- 462 class_constant: class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING .
+ 15 top_statement: "namespace (T_NAMESPACE)" '{' @3 . top_statement_list '}'
- '(' shift, and go to state 497
+ $default reduce using rule 4 (top_statement_list)
- $default reduce using rule 462 (class_constant)
+ top_statement_list go to state 498
state 360
- 311 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects . '(' $@55 function_call_parameter_list ')'
- 397 static_member: class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects .
-
- '(' shift, and go to state 498
+ 11 top_statement: "namespace (T_NAMESPACE)" namespace_name ';' .
- $default reduce using rule 397 (static_member)
+ $default reduce using rule 11 (top_statement)
state 361
- 395 variable_without_objects: reference_variable .
- 405 reference_variable: reference_variable . '[' dim_offset ']'
- 406 | reference_variable . '{' expr '}'
+ 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' . @2 top_statement_list '}'
- '[' shift, and go to state 266
- '{' shift, and go to state 267
+ $default reduce using rule 12 (@2)
- $default reduce using rule 395 (variable_without_objects)
+ @2 go to state 499
state 362
- 396 variable_without_objects: simple_indirect_reference . reference_variable
- 421 simple_indirect_reference: simple_indirect_reference . '$'
+ 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name '(' . @57 function_call_parameter_list ')'
- T_VARIABLE shift, and go to state 33
- '$' shift, and go to state 268
+ $default reduce using rule 347 (@57)
- reference_variable go to state 499
- compound_variable go to state 107
+ @57 go to state 500
state 363
- 244 expr_without_variable: expr T_LOGICAL_OR $@44 . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 500
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 310 expr_without_variable: '(' new_expr ')' . @48 instance_call
+
+ $default reduce using rule 309 (@48)
+
+ @48 go to state 501
state 364
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 247 | expr T_LOGICAL_XOR expr .
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 247 (expr_without_variable)
+ 307 expr_without_variable: '(' expr ')' .
+ $default reduce using rule 307 (expr_without_variable)
-state 365
- 246 expr_without_variable: expr T_LOGICAL_AND $@45 . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 501
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+state 365
+ 35 unticked_statement: '{' inner_statement_list '}' .
-state 366
+ $default reduce using rule 35 (unticked_statement)
- 277 expr_without_variable: expr '?' ':' . $@48 expr
- $default reduce using rule 276 ($@48)
+state 366
- $@48 go to state 502
+ 27 inner_statement_list: inner_statement_list @4 . inner_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "if (T_IF)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 32
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ T_INLINE_HTML shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "echo (T_ECHO)" shift, and go to state 37
+ "do (T_DO)" shift, and go to state 38
+ "while (T_WHILE)" shift, and go to state 39
+ "for (T_FOR)" shift, and go to state 40
+ "foreach (T_FOREACH)" shift, and go to state 41
+ "declare (T_DECLARE)" shift, and go to state 42
+ "switch (T_SWITCH)" shift, and go to state 43
+ "break (T_BREAK)" shift, and go to state 44
+ "continue (T_CONTINUE)" shift, and go to state 45
+ "goto (T_GOTO)" shift, and go to state 46
+ "function (T_FUNCTION)" shift, and go to state 47
+ "return (T_RETURN)" shift, and go to state 49
+ "try (T_TRY)" shift, and go to state 50
+ "throw (T_THROW)" shift, and go to state 51
+ "global (T_GLOBAL)" shift, and go to state 53
+ "final (T_FINAL)" shift, and go to state 54
+ "abstract (T_ABSTRACT)" shift, and go to state 55
+ "static (T_STATIC)" shift, and go to state 56
+ "unset (T_UNSET)" shift, and go to state 57
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "__halt_compiler (T_HALT_COMPILER)" shift, and go to state 502
+ "class (T_CLASS)" shift, and go to state 61
+ "trait (T_TRAIT)" shift, and go to state 62
+ "interface (T_INTERFACE)" shift, and go to state 63
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 78
+ '{' shift, and go to state 79
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ inner_statement go to state 503
+ statement go to state 504
+ unticked_statement go to state 87
+ function_declaration_statement go to state 505
+ class_declaration_statement go to state 506
+ unticked_function_declaration_statement go to state 90
+ unticked_class_declaration_statement go to state 91
+ class_entry_type go to state 92
+ interface_entry go to state 93
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 96
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 101
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 367
- 275 expr_without_variable: expr '?' $@46 . expr ':' $@47 expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 503
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 461 compound_variable: '$' '{' expr . '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ '}' shift, and go to state 507
state 368
- 240 expr_without_variable: expr T_BOOLEAN_OR $@42 . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 504
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 330 expr_without_variable: '`' backticks_expr '`' .
+
+ $default reduce using rule 330 (expr_without_variable)
state 369
- 242 expr_without_variable: expr T_BOOLEAN_AND $@43 . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 505
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 412 scalar: '"' encaps_list '"' .
+
+ $default reduce using rule 412 (scalar)
state 370
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 248 | expr '|' expr .
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 248 (expr_without_variable)
+ 6 namespace_name: namespace_name "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)" .
+
+ $default reduce using rule 6 (namespace_name)
state 371
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 250 | expr '^' expr .
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 250 (expr_without_variable)
+ 344 function_call: namespace_name '(' @55 . function_call_parameter_list ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 508
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 167 (function_call_parameter_list)
+
+ namespace_name go to state 83
+ function_call_parameter_list go to state 509
+ non_empty_function_call_parameter_list go to state 510
+ new_expr go to state 94
+ expr_without_variable go to state 511
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 512
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 372
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 249 | expr '&' expr .
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 249 (expr_without_variable)
+ 24 constant_declaration: constant_declaration ',' "identifier (T_STRING)" . '=' static_scalar
+
+ '=' shift, and go to state 513
state 373
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 264 | expr T_IS_NOT_IDENTICAL expr .
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- T_IS_NOT_IDENTICAL error (nonassociative)
- T_IS_IDENTICAL error (nonassociative)
- T_IS_NOT_EQUAL error (nonassociative)
- T_IS_EQUAL error (nonassociative)
+ 109 extends_from: "extends (T_EXTENDS)" . fully_qualified_class_name
- $default reduce using rule 264 (expr_without_variable)
+ "identifier (T_STRING)" shift, and go to state 116
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+
+ namespace_name go to state 516
+ fully_qualified_class_name go to state 517
state 374
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 263 | expr T_IS_IDENTICAL expr .
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- T_IS_NOT_IDENTICAL error (nonassociative)
- T_IS_IDENTICAL error (nonassociative)
- T_IS_NOT_EQUAL error (nonassociative)
- T_IS_EQUAL error (nonassociative)
+ 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from . @30 implements_list '{' class_statement_list '}'
- $default reduce using rule 263 (expr_without_variable)
+ $default reduce using rule 100 (@30)
+
+ @30 go to state 518
state 375
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 266 | expr T_IS_NOT_EQUAL expr .
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- T_IS_NOT_IDENTICAL error (nonassociative)
- T_IS_IDENTICAL error (nonassociative)
- T_IS_NOT_EQUAL error (nonassociative)
- T_IS_EQUAL error (nonassociative)
+ 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 . interface_extends_list '{' class_statement_list '}'
- $default reduce using rule 266 (expr_without_variable)
+ "extends (T_EXTENDS)" shift, and go to state 519
+
+ $default reduce using rule 111 (interface_extends_list)
+
+ interface_extends_list go to state 520
state 376
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 265 | expr T_IS_EQUAL expr .
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- T_IS_NOT_IDENTICAL error (nonassociative)
- T_IS_IDENTICAL error (nonassociative)
- T_IS_NOT_EQUAL error (nonassociative)
- T_IS_EQUAL error (nonassociative)
+ 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" . @29 '(' parameter_list ')' '{' inner_statement_list '}'
- $default reduce using rule 265 (expr_without_variable)
+ $default reduce using rule 98 (@29)
+
+ @29 go to state 521
state 377
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 267 | expr '<' expr .
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- '<' error (nonassociative)
- '>' error (nonassociative)
- T_IS_GREATER_OR_EQUAL error (nonassociative)
- T_IS_SMALLER_OR_EQUAL error (nonassociative)
+ 333 expr_without_variable: function is_reference '(' . @53 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- $default reduce using rule 267 (expr_without_variable)
+ $default reduce using rule 332 (@53)
+
+ @53 go to state 522
state 378
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 269 | expr '>' expr .
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- '<' error (nonassociative)
- '>' error (nonassociative)
- T_IS_GREATER_OR_EQUAL error (nonassociative)
- T_IS_SMALLER_OR_EQUAL error (nonassociative)
-
- $default reduce using rule 269 (expr_without_variable)
+ 450 array_function_dereference: function_call @69 '[' . dim_offset ']'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 462 (dim_offset)
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 429
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ dim_offset go to state 523
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 379
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 270 | expr T_IS_GREATER_OR_EQUAL expr .
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- '<' error (nonassociative)
- '>' error (nonassociative)
- T_IS_GREATER_OR_EQUAL error (nonassociative)
- T_IS_SMALLER_OR_EQUAL error (nonassociative)
+ 470 variable_name: "identifier (T_STRING)" .
+ 514 class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
- $default reduce using rule 270 (expr_without_variable)
+ '(' reduce using rule 470 (variable_name)
+ $default reduce using rule 514 (class_constant)
state 380
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 268 | expr T_IS_SMALLER_OR_EQUAL expr .
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- '<' error (nonassociative)
- '>' error (nonassociative)
- T_IS_GREATER_OR_EQUAL error (nonassociative)
- T_IS_SMALLER_OR_EQUAL error (nonassociative)
-
- $default reduce using rule 268 (expr_without_variable)
+ 471 variable_name: '{' . expr '}'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 524
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 381
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 258 | expr T_SR expr .
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
+ 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects . '(' @59 function_call_parameter_list ')'
+ 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
- $default reduce using rule 258 (expr_without_variable)
+ '(' shift, and go to state 525
+
+ $default reduce using rule 445 (static_member)
state 382
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 257 | expr T_SL expr .
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
+ 443 variable_without_objects: reference_variable .
+ 457 reference_variable: reference_variable . '[' dim_offset ']'
+ 458 | reference_variable . '{' expr '}'
- $default reduce using rule 257 (expr_without_variable)
+ '[' shift, and go to state 280
+ '{' shift, and go to state 281
+
+ $default reduce using rule 443 (variable_without_objects)
state 383
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 252 | expr '+' expr .
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 252 (expr_without_variable)
+ 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name . '(' @58 function_call_parameter_list ')'
+
+ '(' shift, and go to state 526
state 384
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 253 | expr '-' expr .
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
+ 444 variable_without_objects: simple_indirect_reference . reference_variable
+ 473 simple_indirect_reference: simple_indirect_reference . '$'
- $default reduce using rule 253 (expr_without_variable)
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '$' shift, and go to state 282
+
+ reference_variable go to state 527
+ compound_variable go to state 112
state 385
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 251 | expr '.' expr .
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 251 (expr_without_variable)
+ 279 expr_without_variable: expr "or (T_LOGICAL_OR)" @46 . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 528
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 386
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 254 | expr '*' expr .
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_INSTANCEOF shift, and go to state 247
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 282 | expr "xor (T_LOGICAL_XOR)" expr .
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- $default reduce using rule 254 (expr_without_variable)
+ $default reduce using rule 282 (expr_without_variable)
state 387
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 255 | expr '/' expr .
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 255 (expr_without_variable)
+ 281 expr_without_variable: expr "and (T_LOGICAL_AND)" @47 . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 529
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 388
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 256 | expr '%' expr .
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 256 (expr_without_variable)
+ 315 expr_without_variable: expr '?' ':' . @51 expr
+ $default reduce using rule 314 (@51)
-state 389
+ @51 go to state 530
- 271 expr_without_variable: expr T_INSTANCEOF class_name_reference .
- $default reduce using rule 271 (expr_without_variable)
+state 389
+
+ 313 expr_without_variable: expr '?' @49 . expr ':' @50 expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 531
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 390
- 218 expr_without_variable: variable '=' '&' . variable
- 220 | variable '=' '&' . T_NEW class_name_reference $@40 ctor_arguments
-
- T_NEW shift, and go to state 506
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- variable go to state 507
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 275 expr_without_variable: expr "|| (T_BOOLEAN_OR)" @44 . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 532
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 391
- 217 expr_without_variable: variable '=' expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 217 (expr_without_variable)
+ 277 expr_without_variable: expr "&& (T_BOOLEAN_AND)" @45 . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 533
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 392
- 234 expr_without_variable: variable T_SR_EQUAL expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 234 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 283 | expr '|' expr .
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 283 (expr_without_variable)
state 393
- 233 expr_without_variable: variable T_SL_EQUAL expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 233 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 285 | expr '^' expr .
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 285 (expr_without_variable)
state 394
- 232 expr_without_variable: variable T_XOR_EQUAL expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 232 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 284 | expr '&' expr .
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 284 (expr_without_variable)
state 395
- 231 expr_without_variable: variable T_OR_EQUAL expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 231 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 299 | expr "!== (T_IS_NOT_IDENTICAL)" expr .
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ "!== (T_IS_NOT_IDENTICAL)" error (nonassociative)
+ "=== (T_IS_IDENTICAL)" error (nonassociative)
+ "!= (T_IS_NOT_EQUAL)" error (nonassociative)
+ "== (T_IS_EQUAL)" error (nonassociative)
+
+ $default reduce using rule 299 (expr_without_variable)
state 396
- 230 expr_without_variable: variable T_AND_EQUAL expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 230 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 298 | expr "=== (T_IS_IDENTICAL)" expr .
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ "!== (T_IS_NOT_IDENTICAL)" error (nonassociative)
+ "=== (T_IS_IDENTICAL)" error (nonassociative)
+ "!= (T_IS_NOT_EQUAL)" error (nonassociative)
+ "== (T_IS_EQUAL)" error (nonassociative)
+
+ $default reduce using rule 298 (expr_without_variable)
state 397
- 229 expr_without_variable: variable T_MOD_EQUAL expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 229 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 301 | expr "!= (T_IS_NOT_EQUAL)" expr .
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ "!== (T_IS_NOT_IDENTICAL)" error (nonassociative)
+ "=== (T_IS_IDENTICAL)" error (nonassociative)
+ "!= (T_IS_NOT_EQUAL)" error (nonassociative)
+ "== (T_IS_EQUAL)" error (nonassociative)
+
+ $default reduce using rule 301 (expr_without_variable)
state 398
- 228 expr_without_variable: variable T_CONCAT_EQUAL expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 228 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 300 | expr "== (T_IS_EQUAL)" expr .
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ "!== (T_IS_NOT_IDENTICAL)" error (nonassociative)
+ "=== (T_IS_IDENTICAL)" error (nonassociative)
+ "!= (T_IS_NOT_EQUAL)" error (nonassociative)
+ "== (T_IS_EQUAL)" error (nonassociative)
+
+ $default reduce using rule 300 (expr_without_variable)
state 399
- 227 expr_without_variable: variable T_DIV_EQUAL expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 227 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 302 | expr '<' expr .
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ '<' error (nonassociative)
+ '>' error (nonassociative)
+ ">= (T_IS_GREATER_OR_EQUAL)" error (nonassociative)
+ "<= (T_IS_SMALLER_OR_EQUAL)" error (nonassociative)
+
+ $default reduce using rule 302 (expr_without_variable)
state 400
- 226 expr_without_variable: variable T_MUL_EQUAL expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 226 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 304 | expr '>' expr .
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ '<' error (nonassociative)
+ '>' error (nonassociative)
+ ">= (T_IS_GREATER_OR_EQUAL)" error (nonassociative)
+ "<= (T_IS_SMALLER_OR_EQUAL)" error (nonassociative)
+
+ $default reduce using rule 304 (expr_without_variable)
state 401
- 225 expr_without_variable: variable T_MINUS_EQUAL expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 225 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 305 | expr ">= (T_IS_GREATER_OR_EQUAL)" expr .
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ '<' error (nonassociative)
+ '>' error (nonassociative)
+ ">= (T_IS_GREATER_OR_EQUAL)" error (nonassociative)
+ "<= (T_IS_SMALLER_OR_EQUAL)" error (nonassociative)
+
+ $default reduce using rule 305 (expr_without_variable)
state 402
- 224 expr_without_variable: variable T_PLUS_EQUAL expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 224 (expr_without_variable)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 303 | expr "<= (T_IS_SMALLER_OR_EQUAL)" expr .
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ '<' error (nonassociative)
+ '>' error (nonassociative)
+ ">= (T_IS_GREATER_OR_EQUAL)" error (nonassociative)
+ "<= (T_IS_SMALLER_OR_EQUAL)" error (nonassociative)
+
+ $default reduce using rule 303 (expr_without_variable)
state 403
- 317 function_call: variable_without_objects '(' $@58 . function_call_parameter_list ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 482
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 165 (function_call_parameter_list)
-
- namespace_name go to state 80
- function_call_parameter_list go to state 508
- non_empty_function_call_parameter_list go to state 484
- expr_without_variable go to state 485
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 486
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 293 | expr ">> (T_SR)" expr .
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 293 (expr_without_variable)
state 404
- 313 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING . '(' $@56 function_call_parameter_list ')'
- 463 class_constant: variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING .
-
- '(' shift, and go to state 509
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 292 | expr "<< (T_SL)" expr .
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- $default reduce using rule 463 (class_constant)
+ $default reduce using rule 292 (expr_without_variable)
state 405
- 315 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects . '(' $@57 function_call_parameter_list ')'
- 398 static_member: variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects .
-
- '(' shift, and go to state 510
-
- $default reduce using rule 398 (static_member)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 287 | expr '+' expr .
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 287 (expr_without_variable)
state 406
- 386 variable: base_variable_with_function_calls T_OBJECT_OPERATOR $@61 . object_property $@62 method_or_not variable_properties
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 288 | expr '-' expr .
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- T_STRING shift, and go to state 511
- T_VARIABLE shift, and go to state 33
- '{' shift, and go to state 512
- '$' shift, and go to state 77
-
- variable_without_objects go to state 513
- reference_variable go to state 361
- compound_variable go to state 107
- object_property go to state 514
- object_dim_list go to state 515
- variable_name go to state 516
- simple_indirect_reference go to state 362
+ $default reduce using rule 288 (expr_without_variable)
state 407
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 411 dim_offset: expr .
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 411 (dim_offset)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 286 | expr '.' expr .
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 286 (expr_without_variable)
state 408
- 405 reference_variable: reference_variable '[' dim_offset . ']'
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 289 | expr '*' expr .
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ']' shift, and go to state 517
+ $default reduce using rule 289 (expr_without_variable)
state 409
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 406 reference_variable: reference_variable '{' expr . '}'
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- '}' shift, and go to state 518
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 290 | expr '/' expr .
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 290 (expr_without_variable)
state 410
- 456 internal_functions_in_yacc: T_EVAL '(' expr ')' .
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 291 | expr '%' expr .
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- $default reduce using rule 456 (internal_functions_in_yacc)
+ $default reduce using rule 291 (expr_without_variable)
state 411
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 305 function_call: T_NAMESPACE T_NS_SEPARATOR namespace_name . '(' $@52 function_call_parameter_list ')'
- 320 class_name: T_NAMESPACE T_NS_SEPARATOR namespace_name .
-
- T_NS_SEPARATOR shift, and go to state 213
- '(' shift, and go to state 472
+ 306 expr_without_variable: expr "instanceof (T_INSTANCEOF)" class_name_reference .
- $default reduce using rule 320 (class_name)
+ $default reduce using rule 306 (expr_without_variable)
state 412
- 309 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING . '(' $@54 function_call_parameter_list ')'
-
- '(' shift, and go to state 497
+ 255 expr_without_variable: variable '=' '&' . variable
+ 257 | variable '=' '&' . "new (T_NEW)" class_name_reference @43 ctor_arguments
+
+ "new (T_NEW)" shift, and go to state 534
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 535
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 413
- 313 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING . '(' $@56 function_call_parameter_list ')'
+ 254 expr_without_variable: variable '=' expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- '(' shift, and go to state 509
+ $default reduce using rule 254 (expr_without_variable)
state 414
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 320 class_name: T_NAMESPACE T_NS_SEPARATOR namespace_name .
-
- T_NS_SEPARATOR shift, and go to state 213
+ 269 expr_without_variable: variable ">>= (T_SR_EQUAL)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- $default reduce using rule 320 (class_name)
+ $default reduce using rule 269 (expr_without_variable)
state 415
- 397 static_member: class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects .
+ 268 expr_without_variable: variable "<<= (T_SL_EQUAL)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- $default reduce using rule 397 (static_member)
+ $default reduce using rule 268 (expr_without_variable)
state 416
- 341 ctor_arguments: '(' . function_call_parameter_list ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 482
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 165 (function_call_parameter_list)
-
- namespace_name go to state 80
- function_call_parameter_list go to state 519
- non_empty_function_call_parameter_list go to state 484
- expr_without_variable go to state 485
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 486
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 267 expr_without_variable: variable "^= (T_XOR_EQUAL)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 267 (expr_without_variable)
state 417
- 222 expr_without_variable: T_NEW class_name_reference $@41 ctor_arguments .
+ 266 expr_without_variable: variable "|= (T_OR_EQUAL)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- $default reduce using rule 222 (expr_without_variable)
+ $default reduce using rule 266 (expr_without_variable)
state 418
- 398 static_member: variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects .
+ 265 expr_without_variable: variable "&= (T_AND_EQUAL)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- $default reduce using rule 398 (static_member)
+ $default reduce using rule 265 (expr_without_variable)
state 419
- 329 dynamic_class_name_reference: base_variable T_OBJECT_OPERATOR $@59 . object_property $@60 dynamic_class_name_variable_properties
+ 264 expr_without_variable: variable "%= (T_MOD_EQUAL)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- T_STRING shift, and go to state 511
- T_VARIABLE shift, and go to state 33
- '{' shift, and go to state 512
- '$' shift, and go to state 77
-
- variable_without_objects go to state 513
- reference_variable go to state 361
- compound_variable go to state 107
- object_property go to state 520
- object_dim_list go to state 515
- variable_name go to state 516
- simple_indirect_reference go to state 362
+ $default reduce using rule 264 (expr_without_variable)
state 420
- 336 exit_expr: '(' expr ')' .
+ 263 expr_without_variable: variable ".= (T_CONCAT_EQUAL)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- $default reduce using rule 336 (exit_expr)
+ $default reduce using rule 263 (expr_without_variable)
state 421
- 38 unticked_statement: T_IF '(' expr ')' . $@5 statement $@6 elseif_list else_single
- 41 | T_IF '(' expr ')' . ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single T_ENDIF ';'
-
- ':' shift, and go to state 521
-
- $default reduce using rule 36 ($@5)
+ 262 expr_without_variable: variable "/= (T_DIV_EQUAL)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- $@5 go to state 522
+ $default reduce using rule 262 (expr_without_variable)
state 422
- 208 echo_expr_list: echo_expr_list ',' expr .
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 208 (echo_expr_list)
+ 261 expr_without_variable: variable "*= (T_MUL_EQUAL)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 261 (expr_without_variable)
state 423
- 47 unticked_statement: T_DO $@11 statement T_WHILE . '(' $@12 expr ')' ';'
+ 260 expr_without_variable: variable "-= (T_MINUS_EQUAL)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- '(' shift, and go to state 523
+ $default reduce using rule 260 (expr_without_variable)
state 424
- 44 unticked_statement: T_WHILE '(' $@9 expr . ')' $@10 while_statement
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ')' shift, and go to state 524
-
+ 259 expr_without_variable: variable "+= (T_PLUS_EQUAL)" expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
-state 425
+ $default reduce using rule 259 (expr_without_variable)
- 51 unticked_statement: T_FOR '(' for_expr ';' . $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement
- $default reduce using rule 48 ($@13)
+state 425
- $@13 go to state 525
+ 358 function_call: variable_without_objects '(' @62 . function_call_parameter_list ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 508
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 167 (function_call_parameter_list)
+
+ namespace_name go to state 83
+ function_call_parameter_list go to state 536
+ non_empty_function_call_parameter_list go to state 510
+ new_expr go to state 94
+ expr_without_variable go to state 511
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 512
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 426
- 213 non_empty_for_expr: non_empty_for_expr ',' . $@38 expr
-
- $default reduce using rule 212 ($@38)
+ 470 variable_name: "identifier (T_STRING)" .
+ 515 class_constant: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
- $@38 go to state 526
+ '(' reduce using rule 470 (variable_name)
+ $default reduce using rule 515 (class_constant)
state 427
- 72 unticked_statement: T_FOREACH '(' expr_without_variable T_AS . $@19 variable foreach_optional_arg ')' $@20 foreach_statement
+ 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects . '(' @61 function_call_parameter_list ')'
+ 446 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
- $default reduce using rule 70 ($@19)
+ '(' shift, and go to state 537
- $@19 go to state 527
+ $default reduce using rule 446 (static_member)
state 428
- 69 unticked_statement: T_FOREACH '(' variable T_AS . $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement
+ 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name . '(' @60 function_call_parameter_list ')'
- $default reduce using rule 67 ($@17)
-
- $@17 go to state 528
+ '(' shift, and go to state 538
state 429
- 126 declare_list: T_STRING . '=' static_scalar
-
- '=' shift, and go to state 529
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 463 dim_offset: expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 463 (dim_offset)
state 430
- 74 unticked_statement: T_DECLARE $@21 '(' declare_list . ')' declare_statement
- 127 declare_list: declare_list . ',' T_STRING '=' static_scalar
+ 448 array_function_dereference: array_function_dereference '[' dim_offset . ']'
- ',' shift, and go to state 530
- ')' shift, and go to state 531
+ ']' shift, and go to state 539
state 431
- 53 unticked_statement: T_SWITCH '(' expr ')' . $@16 switch_case_list
+ 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 . object_property @66 method_or_not variable_properties
- $default reduce using rule 52 ($@16)
+ "identifier (T_STRING)" shift, and go to state 436
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '{' shift, and go to state 380
+ '$' shift, and go to state 80
- $@16 go to state 532
+ variable_without_objects go to state 540
+ reference_variable go to state 382
+ compound_variable go to state 112
+ object_property go to state 541
+ object_dim_list go to state 542
+ variable_name go to state 543
+ simple_indirect_reference go to state 384
state 432
- 358 static_scalar: '+' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 533
- static_class_constant go to state 442
+ 457 reference_variable: reference_variable '[' dim_offset . ']'
+
+ ']' shift, and go to state 544
state 433
- 359 static_scalar: '-' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 534
- static_class_constant go to state 442
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 458 reference_variable: reference_variable '{' expr . '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ '}' shift, and go to state 545
state 434
- 360 static_scalar: T_ARRAY . '(' static_array_pair_list ')'
+ 508 internal_functions_in_yacc: "eval (T_EVAL)" '(' expr ')' .
- '(' shift, and go to state 535
+ $default reduce using rule 508 (internal_functions_in_yacc)
state 435
- 352 common_scalar: T_START_HEREDOC . T_ENCAPSED_AND_WHITESPACE T_END_HEREDOC
- 353 | T_START_HEREDOC . T_END_HEREDOC
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name . '(' @56 function_call_parameter_list ')'
+ 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- T_ENCAPSED_AND_WHITESPACE shift, and go to state 536
- T_END_HEREDOC shift, and go to state 196
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ '(' shift, and go to state 497
+
+ $default reduce using rule 361 (class_name)
state 436
- 320 class_name: T_NAMESPACE . T_NS_SEPARATOR namespace_name
- 356 static_scalar: T_NAMESPACE . T_NS_SEPARATOR namespace_name
+ 470 variable_name: "identifier (T_STRING)" .
- T_NS_SEPARATOR shift, and go to state 537
+ $default reduce using rule 470 (variable_name)
state 437
- 321 class_name: T_NS_SEPARATOR . namespace_name
- 357 static_scalar: T_NS_SEPARATOR . namespace_name
-
- T_STRING shift, and go to state 111
-
- namespace_name go to state 538
+ 488 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ w_variable go to state 546
+ variable go to state 292
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 438
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 319 class_name: namespace_name .
- 355 static_scalar: namespace_name .
-
- T_NS_SEPARATOR shift, and go to state 213
-
- T_PAAMAYIM_NEKUDOTAYIM reduce using rule 319 (class_name)
- $default reduce using rule 355 (static_scalar)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 484 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 484 (non_empty_array_pair_list)
state 439
- 362 static_class_constant: class_name . T_PAAMAYIM_NEKUDOTAYIM T_STRING
-
- T_PAAMAYIM_NEKUDOTAYIM shift, and go to state 539
+ 487 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ w_variable go to state 547
+ variable go to state 292
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 440
- 354 static_scalar: common_scalar .
-
- $default reduce using rule 354 (static_scalar)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 482 non_empty_array_pair_list: non_empty_array_pair_list ',' expr . "=> (T_DOUBLE_ARROW)" expr
+ 483 | non_empty_array_pair_list ',' expr .
+ 486 | non_empty_array_pair_list ',' expr . "=> (T_DOUBLE_ARROW)" '&' w_variable
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 548
+
+ $default reduce using rule 483 (non_empty_array_pair_list)
state 441
- 25 constant_declaration: T_CONST T_STRING '=' static_scalar .
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- $default reduce using rule 25 (constant_declaration)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+
+ $default reduce using rule 361 (class_name)
state 442
- 361 static_scalar: static_class_constant .
+ 445 static_member: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
- $default reduce using rule 361 (static_scalar)
+ $default reduce using rule 445 (static_member)
state 443
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list . '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
-
- '}' shift, and go to state 540
-
- $default reduce using rule 26 ($@4)
-
- $@4 go to state 347
+ 382 ctor_arguments: '(' . function_call_parameter_list ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 508
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 167 (function_call_parameter_list)
+
+ namespace_name go to state 83
+ function_call_parameter_list go to state 549
+ non_empty_function_call_parameter_list go to state 510
+ new_expr go to state 94
+ expr_without_variable go to state 511
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 512
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 444
- 23 use_declaration: T_NS_SEPARATOR namespace_name T_AS . T_STRING
+ 251 new_expr: "new (T_NEW)" class_name_reference @41 ctor_arguments .
- T_STRING shift, and go to state 541
+ $default reduce using rule 251 (new_expr)
state 445
- 21 use_declaration: namespace_name T_AS T_STRING .
+ 446 static_member: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects .
- $default reduce using rule 21 (use_declaration)
+ $default reduce using rule 446 (static_member)
state 446
- 18 use_declarations: use_declarations ',' use_declaration .
+ 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" @63 . object_property @64 dynamic_class_name_variable_properties
- $default reduce using rule 18 (use_declarations)
+ "identifier (T_STRING)" shift, and go to state 436
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '{' shift, and go to state 380
+ '$' shift, and go to state 80
+
+ variable_without_objects go to state 540
+ reference_variable go to state 382
+ compound_variable go to state 112
+ object_property go to state 550
+ object_dim_list go to state 542
+ variable_name go to state 543
+ simple_indirect_reference go to state 384
state 447
- 176 global_var: '$' '{' expr . '}'
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- '}' shift, and go to state 542
+ 377 exit_expr: '(' expr ')' .
+
+ $default reduce using rule 377 (exit_expr)
state 448
- 172 global_var_list: global_var_list ',' global_var .
+ 38 unticked_statement: "if (T_IF)" '(' expr ')' . @5 statement @6 elseif_list else_single
+ 41 | "if (T_IF)" '(' expr ')' . ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
- $default reduce using rule 172 (global_var_list)
+ ':' shift, and go to state 551
+ $default reduce using rule 36 (@5)
-state 449
+ @5 go to state 552
- 180 static_var_list: T_VARIABLE '=' static_scalar .
- $default reduce using rule 180 (static_var_list)
+state 449
+ 232 echo_expr_list: echo_expr_list ',' expr .
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 232 (echo_expr_list)
-state 450
- 177 static_var_list: static_var_list ',' T_VARIABLE .
- 178 | static_var_list ',' T_VARIABLE . '=' static_scalar
+state 450
- '=' shift, and go to state 543
+ 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" . '(' @12 expr ')' ';'
- $default reduce using rule 177 (static_var_list)
+ '(' shift, and go to state 553
state 451
- 92 unset_variables: unset_variables ',' . unset_variable
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- unset_variable go to state 544
- function_call go to state 93
- class_name go to state 136
- variable go to state 320
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 44 unticked_statement: "while (T_WHILE)" '(' @9 expr . ')' @10 while_statement
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ')' shift, and go to state 554
state 452
- 66 unticked_statement: T_UNSET '(' unset_variables ')' . ';'
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' . @13 for_expr ';' @14 for_expr ')' @15 for_statement
+
+ $default reduce using rule 48 (@13)
- ';' shift, and go to state 545
+ @13 go to state 555
state 453
- 461 isset_variables: isset_variables ',' . $@68 variable
+ 237 non_empty_for_expr: non_empty_for_expr ',' . @38 expr
- $default reduce using rule 460 ($@68)
+ $default reduce using rule 236 (@38)
- $@68 go to state 546
+ @38 go to state 556
state 454
- 452 internal_functions_in_yacc: T_ISSET '(' isset_variables ')' .
+ 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" . @19 variable foreach_optional_arg ')' @20 foreach_statement
+
+ $default reduce using rule 70 (@19)
- $default reduce using rule 452 (internal_functions_in_yacc)
+ @19 go to state 557
state 455
- 453 internal_functions_in_yacc: T_EMPTY '(' variable ')' .
+ 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" . @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement
- $default reduce using rule 453 (internal_functions_in_yacc)
+ $default reduce using rule 67 (@17)
+
+ @17 go to state 558
state 456
- 10 top_statement: T_HALT_COMPILER '(' ')' ';' .
+ 127 declare_list: "identifier (T_STRING)" . '=' static_scalar
- $default reduce using rule 10 (top_statement)
+ '=' shift, and go to state 559
state 457
- 426 assignment_list_element: T_LIST . '(' $@66 assignment_list ')'
+ 74 unticked_statement: "declare (T_DECLARE)" @21 '(' declare_list . ')' declare_statement
+ 128 declare_list: declare_list . ',' "identifier (T_STRING)" '=' static_scalar
- '(' shift, and go to state 547
+ ',' shift, and go to state 560
+ ')' shift, and go to state 561
state 458
- 424 assignment_list_element: variable .
+ 53 unticked_statement: "switch (T_SWITCH)" '(' expr ')' . @16 switch_case_list
- $default reduce using rule 424 (assignment_list_element)
+ $default reduce using rule 52 (@16)
+ @16 go to state 562
-state 459
- 216 expr_without_variable: T_LIST '(' $@39 assignment_list . ')' '=' expr
- 422 assignment_list: assignment_list . ',' assignment_list_element
+state 459
- ',' shift, and go to state 548
- ')' shift, and go to state 549
+ 399 static_scalar: '+' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 563
+ static_class_constant go to state 471
state 460
- 423 assignment_list: assignment_list_element .
-
- $default reduce using rule 423 (assignment_list)
+ 400 static_scalar: '-' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 564
+ static_class_constant go to state 471
state 461
- 437 non_empty_array_pair_list: '&' w_variable .
-
- $default reduce using rule 437 (non_empty_array_pair_list)
+ 402 static_scalar: '[' . static_array_pair_list ']'
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ $default reduce using rule 415 (static_array_pair_list)
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 565
+ static_class_constant go to state 471
+ static_array_pair_list go to state 566
+ non_empty_static_array_pair_list go to state 567
state 462
- 382 w_variable: variable .
+ 401 static_scalar: "array (T_ARRAY)" . '(' static_array_pair_list ')'
- $default reduce using rule 382 (w_variable)
+ '(' shift, and go to state 568
state 463
- 432 non_empty_array_pair_list: expr T_DOUBLE_ARROW . expr
- 436 | expr T_DOUBLE_ARROW . '&' w_variable
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 550
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 551
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 404 static_scalar: "__CLASS__ (T_CLASS_C)" .
+
+ $default reduce using rule 404 (static_scalar)
state 464
- 290 expr_without_variable: T_ARRAY '(' array_pair_list ')' .
+ 393 common_scalar: "heredoc start (T_START_HEREDOC)" . "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" "heredoc end (T_END_HEREDOC)"
+ 394 | "heredoc start (T_START_HEREDOC)" . "heredoc end (T_END_HEREDOC)"
- $default reduce using rule 290 (expr_without_variable)
+ "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" shift, and go to state 569
+ "heredoc end (T_END_HEREDOC)" shift, and go to state 207
state 465
- 374 possible_comma: ',' .
- 430 non_empty_array_pair_list: non_empty_array_pair_list ',' . expr T_DOUBLE_ARROW expr
- 431 | non_empty_array_pair_list ',' . expr
- 434 | non_empty_array_pair_list ',' . expr T_DOUBLE_ARROW '&' w_variable
- 435 | non_empty_array_pair_list ',' . '&' w_variable
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 552
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 374 (possible_comma)
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 553
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 361 class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+ 397 static_scalar: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 570
state 466
- 429 array_pair_list: non_empty_array_pair_list possible_comma .
+ 362 class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
+ 398 static_scalar: "\\ (T_NS_SEPARATOR)" . namespace_name
+
+ "identifier (T_STRING)" shift, and go to state 116
- $default reduce using rule 429 (array_pair_list)
+ namespace_name go to state 571
state 467
- 444 encaps_var: T_VARIABLE '[' $@67 . encaps_var_offset ']'
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 360 class_name: namespace_name .
+ 396 static_scalar: namespace_name .
- T_STRING shift, and go to state 554
- T_VARIABLE shift, and go to state 555
- T_NUM_STRING shift, and go to state 556
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- encaps_var_offset go to state 557
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 360 (class_name)
+ $default reduce using rule 396 (static_scalar)
state 468
- 445 encaps_var: T_VARIABLE T_OBJECT_OPERATOR T_STRING .
+ 405 static_class_constant: class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
- $default reduce using rule 445 (encaps_var)
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 572
state 469
- 447 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' . expr ']' '}'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 558
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 395 static_scalar: common_scalar .
+
+ $default reduce using rule 395 (static_scalar)
state 470
- 446 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES expr '}' .
+ 25 constant_declaration: "const (T_CONST)" "identifier (T_STRING)" '=' static_scalar .
- $default reduce using rule 446 (encaps_var)
+ $default reduce using rule 25 (constant_declaration)
state 471
- 448 encaps_var: T_CURLY_OPEN variable '}' .
+ 403 static_scalar: static_class_constant .
- $default reduce using rule 448 (encaps_var)
+ $default reduce using rule 403 (static_scalar)
state 472
- 305 function_call: T_NAMESPACE T_NS_SEPARATOR namespace_name '(' . $@52 function_call_parameter_list ')'
-
- $default reduce using rule 304 ($@52)
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list . '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
- $@52 go to state 559
+ '}' shift, and go to state 573
+ $default reduce using rule 26 (@4)
-state 473
+ @4 go to state 366
- 3 top_statement_list: top_statement_list . $@1 top_statement
- 15 top_statement: T_NAMESPACE '{' $@3 top_statement_list . '}'
- '}' shift, and go to state 560
+state 473
- $default reduce using rule 2 ($@1)
+ 23 use_declaration: "\\ (T_NS_SEPARATOR)" namespace_name "as (T_AS)" . "identifier (T_STRING)"
- $@1 go to state 4
+ "identifier (T_STRING)" shift, and go to state 574
state 474
- 13 top_statement: T_NAMESPACE namespace_name '{' $@2 . top_statement_list '}'
-
- $default reduce using rule 4 (top_statement_list)
+ 21 use_declaration: namespace_name "as (T_AS)" "identifier (T_STRING)" .
- top_statement_list go to state 561
+ $default reduce using rule 21 (use_declaration)
state 475
- 307 function_call: T_NS_SEPARATOR namespace_name '(' $@53 . function_call_parameter_list ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 482
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 165 (function_call_parameter_list)
-
- namespace_name go to state 80
- function_call_parameter_list go to state 562
- non_empty_function_call_parameter_list go to state 484
- expr_without_variable go to state 485
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 486
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 18 use_declarations: use_declarations ',' use_declaration .
+
+ $default reduce using rule 18 (use_declarations)
state 476
- 32 inner_statement: T_HALT_COMPILER . '(' ')' ';'
-
- '(' shift, and go to state 563
+ 178 global_var: '$' '{' expr . '}'
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ '}' shift, and go to state 575
state 477
- 27 inner_statement_list: inner_statement_list $@4 inner_statement .
+ 174 global_var_list: global_var_list ',' global_var .
- $default reduce using rule 27 (inner_statement_list)
+ $default reduce using rule 174 (global_var_list)
state 478
- 29 inner_statement: statement .
+ 182 static_var_list: "variable (T_VARIABLE)" '=' static_scalar .
- $default reduce using rule 29 (inner_statement)
+ $default reduce using rule 182 (static_var_list)
state 479
- 30 inner_statement: function_declaration_statement .
+ 179 static_var_list: static_var_list ',' "variable (T_VARIABLE)" .
+ 180 | static_var_list ',' "variable (T_VARIABLE)" . '=' static_scalar
- $default reduce using rule 30 (inner_statement)
+ '=' shift, and go to state 576
+
+ $default reduce using rule 179 (static_var_list)
state 480
- 31 inner_statement: class_declaration_statement .
+ 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' . @54 parameter_list ')' lexical_vars '{' inner_statement_list '}'
- $default reduce using rule 31 (inner_statement)
+ $default reduce using rule 334 (@54)
+
+ @54 go to state 577
state 481
- 409 compound_variable: '$' '{' expr '}' .
+ 92 unset_variables: unset_variables ',' . unset_variable
- $default reduce using rule 409 (compound_variable)
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ unset_variable go to state 578
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 341
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 482
- 168 non_empty_function_call_parameter_list: '&' . w_variable
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- w_variable go to state 564
- variable go to state 462
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 66 unticked_statement: "unset (T_UNSET)" '(' unset_variables ')' . ';'
+
+ ';' shift, and go to state 579
state 483
- 303 function_call: namespace_name '(' $@51 function_call_parameter_list . ')'
+ 513 isset_variables: isset_variables ',' . @73 variable
- ')' shift, and go to state 565
+ $default reduce using rule 512 (@73)
+ @73 go to state 580
-state 484
- 164 function_call_parameter_list: non_empty_function_call_parameter_list .
- 169 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list . ',' expr_without_variable
- 170 | non_empty_function_call_parameter_list . ',' variable
- 171 | non_empty_function_call_parameter_list . ',' '&' w_variable
+state 484
- ',' shift, and go to state 566
+ 504 internal_functions_in_yacc: "isset (T_ISSET)" '(' isset_variables ')' .
- $default reduce using rule 164 (function_call_parameter_list)
+ $default reduce using rule 504 (internal_functions_in_yacc)
state 485
- 166 non_empty_function_call_parameter_list: expr_without_variable .
- 380 expr: expr_without_variable .
+ 505 internal_functions_in_yacc: "empty (T_EMPTY)" '(' variable ')' .
- ',' reduce using rule 166 (non_empty_function_call_parameter_list)
- ')' reduce using rule 166 (non_empty_function_call_parameter_list)
- $default reduce using rule 380 (expr)
+ $default reduce using rule 505 (internal_functions_in_yacc)
state 486
- 167 non_empty_function_call_parameter_list: variable .
- 217 expr_without_variable: variable . '=' expr
- 218 | variable . '=' '&' variable
- 220 | variable . '=' '&' T_NEW class_name_reference $@40 ctor_arguments
- 224 | variable . T_PLUS_EQUAL expr
- 225 | variable . T_MINUS_EQUAL expr
- 226 | variable . T_MUL_EQUAL expr
- 227 | variable . T_DIV_EQUAL expr
- 228 | variable . T_CONCAT_EQUAL expr
- 229 | variable . T_MOD_EQUAL expr
- 230 | variable . T_AND_EQUAL expr
- 231 | variable . T_OR_EQUAL expr
- 232 | variable . T_XOR_EQUAL expr
- 233 | variable . T_SL_EQUAL expr
- 234 | variable . T_SR_EQUAL expr
- 381 r_variable: variable .
- 383 rw_variable: variable .
-
- '=' shift, and go to state 251
- T_SR_EQUAL shift, and go to state 252
- T_SL_EQUAL shift, and go to state 253
- T_XOR_EQUAL shift, and go to state 254
- T_OR_EQUAL shift, and go to state 255
- T_AND_EQUAL shift, and go to state 256
- T_MOD_EQUAL shift, and go to state 257
- T_CONCAT_EQUAL shift, and go to state 258
- T_DIV_EQUAL shift, and go to state 259
- T_MUL_EQUAL shift, and go to state 260
- T_MINUS_EQUAL shift, and go to state 261
- T_PLUS_EQUAL shift, and go to state 262
-
- ',' reduce using rule 167 (non_empty_function_call_parameter_list)
- T_DEC reduce using rule 383 (rw_variable)
- T_INC reduce using rule 383 (rw_variable)
- ')' reduce using rule 167 (non_empty_function_call_parameter_list)
- $default reduce using rule 381 (r_variable)
+ 10 top_statement: "__halt_compiler (T_HALT_COMPILER)" '(' ')' ';' .
+
+ $default reduce using rule 10 (top_statement)
state 487
- 24 constant_declaration: constant_declaration ',' T_STRING '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 567
- static_class_constant go to state 442
+ 478 assignment_list_element: "list (T_LIST)" . '(' @71 assignment_list ')'
+
+ '(' shift, and go to state 581
state 488
- 323 fully_qualified_class_name: T_NAMESPACE . T_NS_SEPARATOR namespace_name
+ 476 assignment_list_element: variable .
- T_NS_SEPARATOR shift, and go to state 568
+ $default reduce using rule 476 (assignment_list_element)
state 489
- 324 fully_qualified_class_name: T_NS_SEPARATOR . namespace_name
-
- T_STRING shift, and go to state 111
+ 253 expr_without_variable: "list (T_LIST)" '(' @42 assignment_list . ')' '=' expr
+ 474 assignment_list: assignment_list . ',' assignment_list_element
- namespace_name go to state 569
+ ',' shift, and go to state 582
+ ')' shift, and go to state 583
state 490
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 322 fully_qualified_class_name: namespace_name .
-
- T_NS_SEPARATOR shift, and go to state 213
+ 475 assignment_list: assignment_list_element .
- $default reduce using rule 322 (fully_qualified_class_name)
+ $default reduce using rule 475 (assignment_list)
state 491
- 108 extends_from: T_EXTENDS fully_qualified_class_name .
+ 328 expr_without_variable: "array (T_ARRAY)" '(' array_pair_list ')' .
- $default reduce using rule 108 (extends_from)
+ $default reduce using rule 328 (expr_without_variable)
state 492
- 101 unticked_class_declaration_statement: class_entry_type T_STRING extends_from $@30 . implements_list '{' class_statement_list '}'
-
- T_IMPLEMENTS shift, and go to state 570
+ 496 encaps_var: "variable (T_VARIABLE)" '[' @72 . encaps_var_offset ']'
- $default reduce using rule 112 (implements_list)
+ "identifier (T_STRING)" shift, and go to state 584
+ "variable (T_VARIABLE)" shift, and go to state 585
+ "number (T_NUM_STRING)" shift, and go to state 586
- implements_list go to state 571
+ encaps_var_offset go to state 587
state 493
- 111 interface_extends_list: T_EXTENDS . interface_list
-
- T_STRING shift, and go to state 111
- T_NAMESPACE shift, and go to state 488
- T_NS_SEPARATOR shift, and go to state 489
+ 497 encaps_var: "variable (T_VARIABLE)" "-> (T_OBJECT_OPERATOR)" "identifier (T_STRING)" .
- namespace_name go to state 490
- interface_list go to state 572
- fully_qualified_class_name go to state 573
+ $default reduce using rule 497 (encaps_var)
state 494
- 103 unticked_class_declaration_statement: interface_entry T_STRING $@31 interface_extends_list . '{' class_statement_list '}'
-
- '{' shift, and go to state 574
+ 499 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' . expr ']' '}'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 588
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 495
- 99 unticked_function_declaration_statement: function is_reference T_STRING $@29 . '(' parameter_list ')' '{' inner_statement_list '}'
+ 498 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" expr '}' .
- '(' shift, and go to state 575
+ $default reduce using rule 498 (encaps_var)
state 496
- 294 expr_without_variable: function is_reference '(' @50 . parameter_list ')' lexical_vars '{' inner_statement_list '}'
-
- T_STRING shift, and go to state 111
- T_ARRAY shift, and go to state 576
- T_NAMESPACE shift, and go to state 488
- T_NS_SEPARATOR shift, and go to state 489
-
- ')' reduce using rule 152 (parameter_list)
- $default reduce using rule 161 (optional_class_type)
+ 500 encaps_var: "{$ (T_CURLY_OPEN)" variable '}' .
- namespace_name go to state 490
- parameter_list go to state 577
- non_empty_parameter_list go to state 578
- optional_class_type go to state 579
- fully_qualified_class_name go to state 580
+ $default reduce using rule 500 (encaps_var)
state 497
- 309 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' . $@54 function_call_parameter_list ')'
+ 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name '(' . @56 function_call_parameter_list ')'
- $default reduce using rule 308 ($@54)
+ $default reduce using rule 345 (@56)
- $@54 go to state 581
+ @56 go to state 589
state 498
- 311 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' . $@55 function_call_parameter_list ')'
+ 3 top_statement_list: top_statement_list . @1 top_statement
+ 15 top_statement: "namespace (T_NAMESPACE)" '{' @3 top_statement_list . '}'
- $default reduce using rule 310 ($@55)
+ '}' shift, and go to state 590
- $@55 go to state 582
+ $default reduce using rule 2 (@1)
+
+ @1 go to state 4
state 499
- 396 variable_without_objects: simple_indirect_reference reference_variable .
- 405 reference_variable: reference_variable . '[' dim_offset ']'
- 406 | reference_variable . '{' expr '}'
+ 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' @2 . top_statement_list '}'
- '[' shift, and go to state 266
- '{' shift, and go to state 267
+ $default reduce using rule 4 (top_statement_list)
- $default reduce using rule 396 (variable_without_objects)
+ top_statement_list go to state 591
state 500
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 244 | expr T_LOGICAL_OR $@44 expr .
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 244 (expr_without_variable)
+ 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name '(' @57 . function_call_parameter_list ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 508
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 167 (function_call_parameter_list)
+
+ namespace_name go to state 83
+ function_call_parameter_list go to state 592
+ non_empty_function_call_parameter_list go to state 510
+ new_expr go to state 94
+ expr_without_variable go to state 511
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 512
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 501
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 246 | expr T_LOGICAL_AND $@45 expr .
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 246 (expr_without_variable)
+ 310 expr_without_variable: '(' new_expr ')' @48 . instance_call
+
+ '[' reduce using rule 248 (@40)
+ "-> (T_OBJECT_OPERATOR)" reduce using rule 248 (@40)
+ $default reduce using rule 247 (instance_call)
+
+ instance_call go to state 593
+ @40 go to state 594
state 502
- 277 expr_without_variable: expr '?' ':' $@48 . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 583
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" . '(' ')' ';'
+
+ '(' shift, and go to state 595
state 503
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 275 | expr '?' $@46 expr . ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- ':' shift, and go to state 584
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
+ 27 inner_statement_list: inner_statement_list @4 inner_statement .
+
+ $default reduce using rule 27 (inner_statement_list)
state 504
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 240 | expr T_BOOLEAN_OR $@42 expr .
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 240 (expr_without_variable)
+ 29 inner_statement: statement .
+
+ $default reduce using rule 29 (inner_statement)
state 505
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 242 | expr T_BOOLEAN_AND $@43 expr .
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 242 (expr_without_variable)
+ 30 inner_statement: function_declaration_statement .
+
+ $default reduce using rule 30 (inner_statement)
state 506
- 220 expr_without_variable: variable '=' '&' T_NEW . class_name_reference $@40 ctor_arguments
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 142
- T_NS_SEPARATOR shift, and go to state 143
- '$' shift, and go to state 77
+ 31 inner_statement: class_declaration_statement .
- namespace_name go to state 144
- class_name go to state 145
- class_name_reference go to state 585
- dynamic_class_name_reference go to state 147
- static_member go to state 102
- variable_class_name go to state 148
- base_variable go to state 149
- reference_variable go to state 150
- compound_variable go to state 107
- simple_indirect_reference go to state 151
+ $default reduce using rule 31 (inner_statement)
state 507
- 218 expr_without_variable: variable '=' '&' variable .
+ 461 compound_variable: '$' '{' expr '}' .
- $default reduce using rule 218 (expr_without_variable)
+ $default reduce using rule 461 (compound_variable)
state 508
- 317 function_call: variable_without_objects '(' $@58 function_call_parameter_list . ')'
-
- ')' shift, and go to state 586
+ 170 non_empty_function_call_parameter_list: '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ w_variable go to state 596
+ variable go to state 292
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 509
- 313 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' . $@56 function_call_parameter_list ')'
+ 344 function_call: namespace_name '(' @55 function_call_parameter_list . ')'
- $default reduce using rule 312 ($@56)
-
- $@56 go to state 587
+ ')' shift, and go to state 597
state 510
- 315 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' . $@57 function_call_parameter_list ')'
+ 166 function_call_parameter_list: non_empty_function_call_parameter_list .
+ 171 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list . ',' expr_without_variable
+ 172 | non_empty_function_call_parameter_list . ',' variable
+ 173 | non_empty_function_call_parameter_list . ',' '&' w_variable
- $default reduce using rule 314 ($@57)
+ ',' shift, and go to state 598
- $@57 go to state 588
+ $default reduce using rule 166 (function_call_parameter_list)
state 511
- 418 variable_name: T_STRING .
+ 168 non_empty_function_call_parameter_list: expr_without_variable .
+ 424 expr: expr_without_variable .
- $default reduce using rule 418 (variable_name)
+ ',' reduce using rule 168 (non_empty_function_call_parameter_list)
+ ')' reduce using rule 168 (non_empty_function_call_parameter_list)
+ $default reduce using rule 424 (expr)
state 512
- 419 variable_name: '{' . expr '}'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 589
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 169 non_empty_function_call_parameter_list: variable .
+ 254 expr_without_variable: variable . '=' expr
+ 255 | variable . '=' '&' variable
+ 257 | variable . '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
+ 259 | variable . "+= (T_PLUS_EQUAL)" expr
+ 260 | variable . "-= (T_MINUS_EQUAL)" expr
+ 261 | variable . "*= (T_MUL_EQUAL)" expr
+ 262 | variable . "/= (T_DIV_EQUAL)" expr
+ 263 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 264 | variable . "%= (T_MOD_EQUAL)" expr
+ 265 | variable . "&= (T_AND_EQUAL)" expr
+ 266 | variable . "|= (T_OR_EQUAL)" expr
+ 267 | variable . "^= (T_XOR_EQUAL)" expr
+ 268 | variable . "<<= (T_SL_EQUAL)" expr
+ 269 | variable . ">>= (T_SR_EQUAL)" expr
+ 425 r_variable: variable .
+ 427 rw_variable: variable .
+
+ '=' shift, and go to state 264
+ ">>= (T_SR_EQUAL)" shift, and go to state 265
+ "<<= (T_SL_EQUAL)" shift, and go to state 266
+ "^= (T_XOR_EQUAL)" shift, and go to state 267
+ "|= (T_OR_EQUAL)" shift, and go to state 268
+ "&= (T_AND_EQUAL)" shift, and go to state 269
+ "%= (T_MOD_EQUAL)" shift, and go to state 270
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 271
+ "/= (T_DIV_EQUAL)" shift, and go to state 272
+ "*= (T_MUL_EQUAL)" shift, and go to state 273
+ "-= (T_MINUS_EQUAL)" shift, and go to state 274
+ "+= (T_PLUS_EQUAL)" shift, and go to state 275
+
+ ',' reduce using rule 169 (non_empty_function_call_parameter_list)
+ "-- (T_DEC)" reduce using rule 427 (rw_variable)
+ "++ (T_INC)" reduce using rule 427 (rw_variable)
+ ')' reduce using rule 169 (non_empty_function_call_parameter_list)
+ $default reduce using rule 425 (r_variable)
state 513
- 414 object_property: variable_without_objects . $@65
-
- $default reduce using rule 413 ($@65)
-
- $@65 go to state 590
+ 24 constant_declaration: constant_declaration ',' "identifier (T_STRING)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 599
+ static_class_constant go to state 471
state 514
- 386 variable: base_variable_with_function_calls T_OBJECT_OPERATOR $@61 object_property . $@62 method_or_not variable_properties
+ 364 fully_qualified_class_name: "namespace (T_NAMESPACE)" . "\\ (T_NS_SEPARATOR)" namespace_name
- $default reduce using rule 385 ($@62)
-
- $@62 go to state 591
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 600
state 515
- 412 object_property: object_dim_list .
- 415 object_dim_list: object_dim_list . '[' dim_offset ']'
- 416 | object_dim_list . '{' expr '}'
+ 365 fully_qualified_class_name: "\\ (T_NS_SEPARATOR)" . namespace_name
- '[' shift, and go to state 592
- '{' shift, and go to state 593
+ "identifier (T_STRING)" shift, and go to state 116
- $default reduce using rule 412 (object_property)
+ namespace_name go to state 601
state 516
- 417 object_dim_list: variable_name .
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 363 fully_qualified_class_name: namespace_name .
+
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- $default reduce using rule 417 (object_dim_list)
+ $default reduce using rule 363 (fully_qualified_class_name)
state 517
- 405 reference_variable: reference_variable '[' dim_offset ']' .
+ 109 extends_from: "extends (T_EXTENDS)" fully_qualified_class_name .
- $default reduce using rule 405 (reference_variable)
+ $default reduce using rule 109 (extends_from)
state 518
- 406 reference_variable: reference_variable '{' expr '}' .
+ 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 . implements_list '{' class_statement_list '}'
+
+ "implements (T_IMPLEMENTS)" shift, and go to state 602
- $default reduce using rule 406 (reference_variable)
+ $default reduce using rule 113 (implements_list)
+
+ implements_list go to state 603
state 519
- 341 ctor_arguments: '(' function_call_parameter_list . ')'
+ 112 interface_extends_list: "extends (T_EXTENDS)" . interface_list
- ')' shift, and go to state 594
+ "identifier (T_STRING)" shift, and go to state 116
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ namespace_name go to state 516
+ interface_list go to state 604
+ fully_qualified_class_name go to state 605
-state 520
- 329 dynamic_class_name_reference: base_variable T_OBJECT_OPERATOR $@59 object_property . $@60 dynamic_class_name_variable_properties
+state 520
- $default reduce using rule 328 ($@60)
+ 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 interface_extends_list . '{' class_statement_list '}'
- $@60 go to state 595
+ '{' shift, and go to state 606
state 521
- 41 unticked_statement: T_IF '(' expr ')' ':' . $@7 inner_statement_list $@8 new_elseif_list new_else_single T_ENDIF ';'
-
- $default reduce using rule 39 ($@7)
+ 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 . '(' parameter_list ')' '{' inner_statement_list '}'
- $@7 go to state 596
+ '(' shift, and go to state 607
state 522
- 38 unticked_statement: T_IF '(' expr ')' $@5 . statement $@6 elseif_list else_single
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_IF shift, and go to state 28
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_INLINE_HTML shift, and go to state 34
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ECHO shift, and go to state 36
- T_DO shift, and go to state 37
- T_WHILE shift, and go to state 38
- T_FOR shift, and go to state 39
- T_FOREACH shift, and go to state 40
- T_DECLARE shift, and go to state 41
- T_SWITCH shift, and go to state 42
- T_BREAK shift, and go to state 43
- T_CONTINUE shift, and go to state 44
- T_GOTO shift, and go to state 45
- T_FUNCTION shift, and go to state 46
- T_RETURN shift, and go to state 48
- T_TRY shift, and go to state 49
- T_THROW shift, and go to state 50
- T_GLOBAL shift, and go to state 52
- T_STATIC shift, and go to state 55
- T_UNSET shift, and go to state 56
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 75
- '{' shift, and go to state 76
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- statement go to state 597
- unticked_statement go to state 84
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 97
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 333 expr_without_variable: function is_reference '(' @53 . parameter_list ')' lexical_vars '{' inner_statement_list '}'
+ "identifier (T_STRING)" shift, and go to state 116
+ "array (T_ARRAY)" shift, and go to state 608
+ "callable (T_CALLABLE)" shift, and go to state 609
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
-state 523
+ ')' reduce using rule 153 (parameter_list)
+ $default reduce using rule 162 (optional_class_type)
+
+ namespace_name go to state 516
+ parameter_list go to state 610
+ non_empty_parameter_list go to state 611
+ optional_class_type go to state 612
+ fully_qualified_class_name go to state 613
- 47 unticked_statement: T_DO $@11 statement T_WHILE '(' . $@12 expr ')' ';'
- $default reduce using rule 46 ($@12)
+state 523
+
+ 450 array_function_dereference: function_call @69 '[' dim_offset . ']'
- $@12 go to state 598
+ ']' shift, and go to state 614
state 524
- 44 unticked_statement: T_WHILE '(' $@9 expr ')' . $@10 while_statement
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 471 variable_name: '{' expr . '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ '}' shift, and go to state 615
- $default reduce using rule 43 ($@10)
- $@10 go to state 599
+state 525
+ 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' . @59 function_call_parameter_list ')'
-state 525
+ $default reduce using rule 351 (@59)
- 51 unticked_statement: T_FOR '(' for_expr ';' $@13 . for_expr ';' $@14 for_expr ')' $@15 for_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 210 (for_expr)
-
- namespace_name go to state 80
- for_expr go to state 600
- non_empty_for_expr go to state 292
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 293
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ @59 go to state 616
state 526
- 213 non_empty_for_expr: non_empty_for_expr ',' $@38 . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 601
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' . @58 function_call_parameter_list ')'
+
+ $default reduce using rule 349 (@58)
+
+ @58 go to state 617
state 527
- 72 unticked_statement: T_FOREACH '(' expr_without_variable T_AS $@19 . variable foreach_optional_arg ')' $@20 foreach_statement
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- variable go to state 602
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 444 variable_without_objects: simple_indirect_reference reference_variable .
+ 457 reference_variable: reference_variable . '[' dim_offset ']'
+ 458 | reference_variable . '{' expr '}'
+
+ '[' shift, and go to state 280
+ '{' shift, and go to state 281
+
+ $default reduce using rule 444 (variable_without_objects)
state 528
- 69 unticked_statement: T_FOREACH '(' variable T_AS $@17 . foreach_variable foreach_optional_arg ')' $@18 foreach_statement
-
- '&' shift, and go to state 603
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- foreach_variable go to state 604
- function_call go to state 93
- class_name go to state 136
- variable go to state 605
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 279 | expr "or (T_LOGICAL_OR)" @46 expr .
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 279 (expr_without_variable)
state 529
- 126 declare_list: T_STRING '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 606
- static_class_constant go to state 442
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 281 | expr "and (T_LOGICAL_AND)" @47 expr .
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ $default reduce using rule 281 (expr_without_variable)
-state 530
- 127 declare_list: declare_list ',' . T_STRING '=' static_scalar
+state 530
- T_STRING shift, and go to state 607
+ 315 expr_without_variable: expr '?' ':' @51 . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 618
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 531
- 74 unticked_statement: T_DECLARE $@21 '(' declare_list ')' . declare_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- ':' shift, and go to state 608
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_IF shift, and go to state 28
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_INLINE_HTML shift, and go to state 34
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ECHO shift, and go to state 36
- T_DO shift, and go to state 37
- T_WHILE shift, and go to state 38
- T_FOR shift, and go to state 39
- T_FOREACH shift, and go to state 40
- T_DECLARE shift, and go to state 41
- T_SWITCH shift, and go to state 42
- T_BREAK shift, and go to state 43
- T_CONTINUE shift, and go to state 44
- T_GOTO shift, and go to state 45
- T_FUNCTION shift, and go to state 46
- T_RETURN shift, and go to state 48
- T_TRY shift, and go to state 49
- T_THROW shift, and go to state 50
- T_GLOBAL shift, and go to state 52
- T_STATIC shift, and go to state 55
- T_UNSET shift, and go to state 56
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 75
- '{' shift, and go to state 76
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- statement go to state 609
- unticked_statement go to state 84
- declare_statement go to state 610
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 97
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 313 | expr '?' @49 expr . ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ ':' shift, and go to state 619
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
state 532
- 53 unticked_statement: T_SWITCH '(' expr ')' $@16 . switch_case_list
-
- ':' shift, and go to state 611
- '{' shift, and go to state 612
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 275 | expr "|| (T_BOOLEAN_OR)" @44 expr .
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- switch_case_list go to state 613
+ $default reduce using rule 275 (expr_without_variable)
state 533
- 358 static_scalar: '+' static_scalar .
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 277 | expr "&& (T_BOOLEAN_AND)" @45 expr .
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- $default reduce using rule 358 (static_scalar)
+ $default reduce using rule 277 (expr_without_variable)
state 534
- 359 static_scalar: '-' static_scalar .
+ 257 expr_without_variable: variable '=' '&' "new (T_NEW)" . class_name_reference @43 ctor_arguments
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 152
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 153
+ '$' shift, and go to state 80
- $default reduce using rule 359 (static_scalar)
+ namespace_name go to state 154
+ class_name go to state 155
+ class_name_reference go to state 620
+ dynamic_class_name_reference go to state 157
+ static_member go to state 106
+ variable_class_name go to state 158
+ base_variable go to state 159
+ reference_variable go to state 160
+ compound_variable go to state 112
+ simple_indirect_reference go to state 161
state 535
- 360 static_scalar: T_ARRAY '(' . static_array_pair_list ')'
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- $default reduce using rule 371 (static_array_pair_list)
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 614
- static_class_constant go to state 442
- static_array_pair_list go to state 615
- non_empty_static_array_pair_list go to state 616
+ 255 expr_without_variable: variable '=' '&' variable .
+
+ $default reduce using rule 255 (expr_without_variable)
state 536
- 352 common_scalar: T_START_HEREDOC T_ENCAPSED_AND_WHITESPACE . T_END_HEREDOC
+ 358 function_call: variable_without_objects '(' @62 function_call_parameter_list . ')'
- T_END_HEREDOC shift, and go to state 332
+ ')' shift, and go to state 621
state 537
- 320 class_name: T_NAMESPACE T_NS_SEPARATOR . namespace_name
- 356 static_scalar: T_NAMESPACE T_NS_SEPARATOR . namespace_name
+ 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' . @61 function_call_parameter_list ')'
- T_STRING shift, and go to state 111
+ $default reduce using rule 355 (@61)
- namespace_name go to state 617
+ @61 go to state 622
state 538
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 321 class_name: T_NS_SEPARATOR namespace_name .
- 357 static_scalar: T_NS_SEPARATOR namespace_name .
+ 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' . @60 function_call_parameter_list ')'
- T_NS_SEPARATOR shift, and go to state 213
+ $default reduce using rule 353 (@60)
- T_PAAMAYIM_NEKUDOTAYIM reduce using rule 321 (class_name)
- $default reduce using rule 357 (static_scalar)
+ @60 go to state 623
state 539
- 362 static_class_constant: class_name T_PAAMAYIM_NEKUDOTAYIM . T_STRING
+ 448 array_function_dereference: array_function_dereference '[' dim_offset ']' .
- T_STRING shift, and go to state 618
+ $default reduce using rule 448 (array_function_dereference)
state 540
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' . T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
+ 466 object_property: variable_without_objects . @70
+
+ $default reduce using rule 465 (@70)
- T_CATCH shift, and go to state 619
+ @70 go to state 624
state 541
- 23 use_declaration: T_NS_SEPARATOR namespace_name T_AS T_STRING .
+ 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 object_property . @66 method_or_not variable_properties
- $default reduce using rule 23 (use_declaration)
+ $default reduce using rule 429 (@66)
+
+ @66 go to state 625
state 542
- 176 global_var: '$' '{' expr '}' .
+ 464 object_property: object_dim_list .
+ 467 object_dim_list: object_dim_list . '[' dim_offset ']'
+ 468 | object_dim_list . '{' expr '}'
- $default reduce using rule 176 (global_var)
+ '[' shift, and go to state 626
+ '{' shift, and go to state 627
+
+ $default reduce using rule 464 (object_property)
state 543
- 178 static_var_list: static_var_list ',' T_VARIABLE '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 620
- static_class_constant go to state 442
+ 469 object_dim_list: variable_name .
+
+ $default reduce using rule 469 (object_dim_list)
state 544
- 92 unset_variables: unset_variables ',' unset_variable .
+ 457 reference_variable: reference_variable '[' dim_offset ']' .
- $default reduce using rule 92 (unset_variables)
+ $default reduce using rule 457 (reference_variable)
state 545
- 66 unticked_statement: T_UNSET '(' unset_variables ')' ';' .
+ 458 reference_variable: reference_variable '{' expr '}' .
- $default reduce using rule 66 (unticked_statement)
+ $default reduce using rule 458 (reference_variable)
state 546
- 461 isset_variables: isset_variables ',' $@68 . variable
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- variable go to state 621
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 488 non_empty_array_pair_list: expr "=> (T_DOUBLE_ARROW)" '&' w_variable .
+ $default reduce using rule 488 (non_empty_array_pair_list)
-state 547
- 426 assignment_list_element: T_LIST '(' . $@66 assignment_list ')'
+state 547
- $default reduce using rule 425 ($@66)
+ 487 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' w_variable .
- $@66 go to state 622
+ $default reduce using rule 487 (non_empty_array_pair_list)
state 548
- 422 assignment_list: assignment_list ',' . assignment_list_element
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_LIST shift, and go to state 457
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- $default reduce using rule 427 (assignment_list_element)
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- variable go to state 458
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- assignment_list_element go to state 623
+ 482 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" . expr
+ 486 | non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" . '&' w_variable
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 628
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 629
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 549
- 216 expr_without_variable: T_LIST '(' $@39 assignment_list ')' . '=' expr
+ 382 ctor_arguments: '(' function_call_parameter_list . ')'
- '=' shift, and go to state 624
+ ')' shift, and go to state 630
state 550
- 436 non_empty_array_pair_list: expr T_DOUBLE_ARROW '&' . w_variable
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- w_variable go to state 625
- variable go to state 462
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" @63 object_property . @64 dynamic_class_name_variable_properties
+
+ $default reduce using rule 369 (@64)
+
+ @64 go to state 631
state 551
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 432 non_empty_array_pair_list: expr T_DOUBLE_ARROW expr .
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 432 (non_empty_array_pair_list)
+ 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' . @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
+
+ $default reduce using rule 39 (@7)
+
+ @7 go to state 632
state 552
- 435 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' . w_variable
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- w_variable go to state 626
- variable go to state 462
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 . statement @6 elseif_list else_single
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "if (T_IF)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 32
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ T_INLINE_HTML shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "echo (T_ECHO)" shift, and go to state 37
+ "do (T_DO)" shift, and go to state 38
+ "while (T_WHILE)" shift, and go to state 39
+ "for (T_FOR)" shift, and go to state 40
+ "foreach (T_FOREACH)" shift, and go to state 41
+ "declare (T_DECLARE)" shift, and go to state 42
+ "switch (T_SWITCH)" shift, and go to state 43
+ "break (T_BREAK)" shift, and go to state 44
+ "continue (T_CONTINUE)" shift, and go to state 45
+ "goto (T_GOTO)" shift, and go to state 46
+ "function (T_FUNCTION)" shift, and go to state 47
+ "return (T_RETURN)" shift, and go to state 49
+ "try (T_TRY)" shift, and go to state 50
+ "throw (T_THROW)" shift, and go to state 51
+ "global (T_GLOBAL)" shift, and go to state 53
+ "static (T_STATIC)" shift, and go to state 56
+ "unset (T_UNSET)" shift, and go to state 57
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 78
+ '{' shift, and go to state 79
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ statement go to state 633
+ unticked_statement go to state 87
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 101
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 553
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 430 non_empty_array_pair_list: non_empty_array_pair_list ',' expr . T_DOUBLE_ARROW expr
- 431 | non_empty_array_pair_list ',' expr .
- 434 | non_empty_array_pair_list ',' expr . T_DOUBLE_ARROW '&' w_variable
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- T_DOUBLE_ARROW shift, and go to state 627
-
- $default reduce using rule 431 (non_empty_array_pair_list)
+ 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' . @12 expr ')' ';'
+
+ $default reduce using rule 46 (@12)
+
+ @12 go to state 634
state 554
- 449 encaps_var_offset: T_STRING .
+ 44 unticked_statement: "while (T_WHILE)" '(' @9 expr ')' . @10 while_statement
- $default reduce using rule 449 (encaps_var_offset)
+ $default reduce using rule 43 (@10)
+ @10 go to state 635
-state 555
- 451 encaps_var_offset: T_VARIABLE .
+state 555
- $default reduce using rule 451 (encaps_var_offset)
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 . for_expr ';' @14 for_expr ')' @15 for_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 234 (for_expr)
+
+ namespace_name go to state 83
+ for_expr go to state 636
+ non_empty_for_expr go to state 312
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 313
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 556
- 450 encaps_var_offset: T_NUM_STRING .
-
- $default reduce using rule 450 (encaps_var_offset)
+ 237 non_empty_for_expr: non_empty_for_expr ',' @38 . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 637
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 557
- 444 encaps_var: T_VARIABLE '[' $@67 encaps_var_offset . ']'
-
- ']' shift, and go to state 628
+ 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 . variable foreach_optional_arg ')' @20 foreach_statement
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 638
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 558
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 447 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr . ']' '}'
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ']' shift, and go to state 629
+ 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 . foreach_variable foreach_optional_arg ')' @18 foreach_statement
+
+ '&' shift, and go to state 639
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ foreach_variable go to state 640
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 641
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 559
- 305 function_call: T_NAMESPACE T_NS_SEPARATOR namespace_name '(' $@52 . function_call_parameter_list ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 482
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 165 (function_call_parameter_list)
-
- namespace_name go to state 80
- function_call_parameter_list go to state 630
- non_empty_function_call_parameter_list go to state 484
- expr_without_variable go to state 485
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 486
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 127 declare_list: "identifier (T_STRING)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 642
+ static_class_constant go to state 471
state 560
- 15 top_statement: T_NAMESPACE '{' $@3 top_statement_list '}' .
+ 128 declare_list: declare_list ',' . "identifier (T_STRING)" '=' static_scalar
- $default reduce using rule 15 (top_statement)
+ "identifier (T_STRING)" shift, and go to state 643
state 561
- 3 top_statement_list: top_statement_list . $@1 top_statement
- 13 top_statement: T_NAMESPACE namespace_name '{' $@2 top_statement_list . '}'
-
- '}' shift, and go to state 631
-
- $default reduce using rule 2 ($@1)
-
- $@1 go to state 4
+ 74 unticked_statement: "declare (T_DECLARE)" @21 '(' declare_list ')' . declare_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ ':' shift, and go to state 644
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "if (T_IF)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 32
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ T_INLINE_HTML shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "echo (T_ECHO)" shift, and go to state 37
+ "do (T_DO)" shift, and go to state 38
+ "while (T_WHILE)" shift, and go to state 39
+ "for (T_FOR)" shift, and go to state 40
+ "foreach (T_FOREACH)" shift, and go to state 41
+ "declare (T_DECLARE)" shift, and go to state 42
+ "switch (T_SWITCH)" shift, and go to state 43
+ "break (T_BREAK)" shift, and go to state 44
+ "continue (T_CONTINUE)" shift, and go to state 45
+ "goto (T_GOTO)" shift, and go to state 46
+ "function (T_FUNCTION)" shift, and go to state 47
+ "return (T_RETURN)" shift, and go to state 49
+ "try (T_TRY)" shift, and go to state 50
+ "throw (T_THROW)" shift, and go to state 51
+ "global (T_GLOBAL)" shift, and go to state 53
+ "static (T_STATIC)" shift, and go to state 56
+ "unset (T_UNSET)" shift, and go to state 57
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 78
+ '{' shift, and go to state 79
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ statement go to state 645
+ unticked_statement go to state 87
+ declare_statement go to state 646
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 101
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 562
- 307 function_call: T_NS_SEPARATOR namespace_name '(' $@53 function_call_parameter_list . ')'
+ 53 unticked_statement: "switch (T_SWITCH)" '(' expr ')' @16 . switch_case_list
- ')' shift, and go to state 632
+ ':' shift, and go to state 647
+ '{' shift, and go to state 648
+
+ switch_case_list go to state 649
state 563
- 32 inner_statement: T_HALT_COMPILER '(' . ')' ';'
+ 399 static_scalar: '+' static_scalar .
- ')' shift, and go to state 633
+ $default reduce using rule 399 (static_scalar)
state 564
- 168 non_empty_function_call_parameter_list: '&' w_variable .
+ 400 static_scalar: '-' static_scalar .
- $default reduce using rule 168 (non_empty_function_call_parameter_list)
+ $default reduce using rule 400 (static_scalar)
state 565
- 303 function_call: namespace_name '(' $@51 function_call_parameter_list ')' .
+ 421 non_empty_static_array_pair_list: static_scalar . "=> (T_DOUBLE_ARROW)" static_scalar
+ 422 | static_scalar .
+
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 650
- $default reduce using rule 303 (function_call)
+ $default reduce using rule 422 (non_empty_static_array_pair_list)
state 566
- 169 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' . expr_without_variable
- 170 | non_empty_function_call_parameter_list ',' . variable
- 171 | non_empty_function_call_parameter_list ',' . '&' w_variable
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 634
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 635
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 636
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 402 static_scalar: '[' static_array_pair_list . ']'
+
+ ']' shift, and go to state 651
state 567
- 24 constant_declaration: constant_declaration ',' T_STRING '=' static_scalar .
+ 416 static_array_pair_list: non_empty_static_array_pair_list . possible_comma
+ 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list . ',' static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
+ 420 | non_empty_static_array_pair_list . ',' static_scalar
- $default reduce using rule 24 (constant_declaration)
+ ',' shift, and go to state 652
+ $default reduce using rule 417 (possible_comma)
-state 568
+ possible_comma go to state 653
- 323 fully_qualified_class_name: T_NAMESPACE T_NS_SEPARATOR . namespace_name
- T_STRING shift, and go to state 111
+state 568
- namespace_name go to state 637
+ 401 static_scalar: "array (T_ARRAY)" '(' . static_array_pair_list ')'
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ $default reduce using rule 415 (static_array_pair_list)
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 565
+ static_class_constant go to state 471
+ static_array_pair_list go to state 654
+ non_empty_static_array_pair_list go to state 567
state 569
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 324 fully_qualified_class_name: T_NS_SEPARATOR namespace_name .
+ 393 common_scalar: "heredoc start (T_START_HEREDOC)" "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)" . "heredoc end (T_END_HEREDOC)"
- T_NS_SEPARATOR shift, and go to state 213
-
- $default reduce using rule 324 (fully_qualified_class_name)
+ "heredoc end (T_END_HEREDOC)" shift, and go to state 350
state 570
- 113 implements_list: T_IMPLEMENTS . interface_list
+ 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+ 397 static_scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
- T_STRING shift, and go to state 111
- T_NAMESPACE shift, and go to state 488
- T_NS_SEPARATOR shift, and go to state 489
+ "identifier (T_STRING)" shift, and go to state 116
- namespace_name go to state 490
- interface_list go to state 638
- fully_qualified_class_name go to state 573
+ namespace_name go to state 655
state 571
- 101 unticked_class_declaration_statement: class_entry_type T_STRING extends_from $@30 implements_list . '{' class_statement_list '}'
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 362 class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
+ 398 static_scalar: "\\ (T_NS_SEPARATOR)" namespace_name .
- '{' shift, and go to state 639
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 362 (class_name)
+ $default reduce using rule 398 (static_scalar)
-state 572
- 111 interface_extends_list: T_EXTENDS interface_list .
- 115 interface_list: interface_list . ',' fully_qualified_class_name
+state 572
- ',' shift, and go to state 640
+ 405 static_class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
- $default reduce using rule 111 (interface_extends_list)
+ "identifier (T_STRING)" shift, and go to state 656
state 573
- 114 interface_list: fully_qualified_class_name .
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' . "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
- $default reduce using rule 114 (interface_list)
+ "catch (T_CATCH)" shift, and go to state 657
state 574
- 103 unticked_class_declaration_statement: interface_entry T_STRING $@31 interface_extends_list '{' . class_statement_list '}'
-
- $default reduce using rule 182 (class_statement_list)
+ 23 use_declaration: "\\ (T_NS_SEPARATOR)" namespace_name "as (T_AS)" "identifier (T_STRING)" .
- class_statement_list go to state 641
+ $default reduce using rule 23 (use_declaration)
state 575
- 99 unticked_function_declaration_statement: function is_reference T_STRING $@29 '(' . parameter_list ')' '{' inner_statement_list '}'
+ 178 global_var: '$' '{' expr '}' .
- T_STRING shift, and go to state 111
- T_ARRAY shift, and go to state 576
- T_NAMESPACE shift, and go to state 488
- T_NS_SEPARATOR shift, and go to state 489
-
- ')' reduce using rule 152 (parameter_list)
- $default reduce using rule 161 (optional_class_type)
-
- namespace_name go to state 490
- parameter_list go to state 642
- non_empty_parameter_list go to state 578
- optional_class_type go to state 579
- fully_qualified_class_name go to state 580
+ $default reduce using rule 178 (global_var)
state 576
- 163 optional_class_type: T_ARRAY .
-
- $default reduce using rule 163 (optional_class_type)
+ 180 static_var_list: static_var_list ',' "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 658
+ static_class_constant go to state 471
state 577
- 294 expr_without_variable: function is_reference '(' @50 parameter_list . ')' lexical_vars '{' inner_statement_list '}'
+ 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 . parameter_list ')' lexical_vars '{' inner_statement_list '}'
- ')' shift, and go to state 643
+ "identifier (T_STRING)" shift, and go to state 116
+ "array (T_ARRAY)" shift, and go to state 608
+ "callable (T_CALLABLE)" shift, and go to state 609
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ ')' reduce using rule 153 (parameter_list)
+ $default reduce using rule 162 (optional_class_type)
-state 578
+ namespace_name go to state 516
+ parameter_list go to state 659
+ non_empty_parameter_list go to state 611
+ optional_class_type go to state 612
+ fully_qualified_class_name go to state 613
- 151 parameter_list: non_empty_parameter_list .
- 157 non_empty_parameter_list: non_empty_parameter_list . ',' optional_class_type T_VARIABLE
- 158 | non_empty_parameter_list . ',' optional_class_type '&' T_VARIABLE
- 159 | non_empty_parameter_list . ',' optional_class_type '&' T_VARIABLE '=' static_scalar
- 160 | non_empty_parameter_list . ',' optional_class_type T_VARIABLE '=' static_scalar
- ',' shift, and go to state 644
+state 578
- $default reduce using rule 151 (parameter_list)
+ 92 unset_variables: unset_variables ',' unset_variable .
+
+ $default reduce using rule 92 (unset_variables)
state 579
- 153 non_empty_parameter_list: optional_class_type . T_VARIABLE
- 154 | optional_class_type . '&' T_VARIABLE
- 155 | optional_class_type . '&' T_VARIABLE '=' static_scalar
- 156 | optional_class_type . T_VARIABLE '=' static_scalar
+ 66 unticked_statement: "unset (T_UNSET)" '(' unset_variables ')' ';' .
- '&' shift, and go to state 645
- T_VARIABLE shift, and go to state 646
+ $default reduce using rule 66 (unticked_statement)
state 580
- 162 optional_class_type: fully_qualified_class_name .
-
- $default reduce using rule 162 (optional_class_type)
+ 513 isset_variables: isset_variables ',' @73 . variable
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 660
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 581
- 309 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@54 . function_call_parameter_list ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 482
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 165 (function_call_parameter_list)
-
- namespace_name go to state 80
- function_call_parameter_list go to state 647
- non_empty_function_call_parameter_list go to state 484
- expr_without_variable go to state 485
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 486
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 478 assignment_list_element: "list (T_LIST)" '(' . @71 assignment_list ')'
+
+ $default reduce using rule 477 (@71)
+
+ @71 go to state 661
state 582
- 311 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@55 . function_call_parameter_list ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 482
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 165 (function_call_parameter_list)
-
- namespace_name go to state 80
- function_call_parameter_list go to state 648
- non_empty_function_call_parameter_list go to state 484
- expr_without_variable go to state 485
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 486
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 474 assignment_list: assignment_list ',' . assignment_list_element
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "list (T_LIST)" shift, and go to state 487
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ $default reduce using rule 479 (assignment_list_element)
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 488
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ assignment_list_element go to state 662
state 583
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 277 | expr '?' ':' $@48 expr .
-
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
+ 253 expr_without_variable: "list (T_LIST)" '(' @42 assignment_list ')' . '=' expr
- $default reduce using rule 277 (expr_without_variable)
+ '=' shift, and go to state 663
state 584
- 275 expr_without_variable: expr '?' $@46 expr ':' . $@47 expr
-
- $default reduce using rule 274 ($@47)
+ 501 encaps_var_offset: "identifier (T_STRING)" .
- $@47 go to state 649
+ $default reduce using rule 501 (encaps_var_offset)
state 585
- 220 expr_without_variable: variable '=' '&' T_NEW class_name_reference . $@40 ctor_arguments
+ 503 encaps_var_offset: "variable (T_VARIABLE)" .
- $default reduce using rule 219 ($@40)
-
- $@40 go to state 650
+ $default reduce using rule 503 (encaps_var_offset)
state 586
- 317 function_call: variable_without_objects '(' $@58 function_call_parameter_list ')' .
+ 502 encaps_var_offset: "number (T_NUM_STRING)" .
- $default reduce using rule 317 (function_call)
+ $default reduce using rule 502 (encaps_var_offset)
state 587
- 313 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@56 . function_call_parameter_list ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 482
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 165 (function_call_parameter_list)
-
- namespace_name go to state 80
- function_call_parameter_list go to state 651
- non_empty_function_call_parameter_list go to state 484
- expr_without_variable go to state 485
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 486
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 496 encaps_var: "variable (T_VARIABLE)" '[' @72 encaps_var_offset . ']'
+
+ ']' shift, and go to state 664
state 588
- 315 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@57 . function_call_parameter_list ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 482
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 165 (function_call_parameter_list)
-
- namespace_name go to state 80
- function_call_parameter_list go to state 652
- non_empty_function_call_parameter_list go to state 484
- expr_without_variable go to state 485
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 486
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 499 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr . ']' '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ']' shift, and go to state 665
state 589
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 419 variable_name: '{' expr . '}'
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- '}' shift, and go to state 653
+ 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 . function_call_parameter_list ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 508
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 167 (function_call_parameter_list)
+
+ namespace_name go to state 83
+ function_call_parameter_list go to state 666
+ non_empty_function_call_parameter_list go to state 510
+ new_expr go to state 94
+ expr_without_variable go to state 511
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 512
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 590
- 414 object_property: variable_without_objects $@65 .
+ 15 top_statement: "namespace (T_NAMESPACE)" '{' @3 top_statement_list '}' .
- $default reduce using rule 414 (object_property)
+ $default reduce using rule 15 (top_statement)
state 591
- 386 variable: base_variable_with_function_calls T_OBJECT_OPERATOR $@61 object_property $@62 . method_or_not variable_properties
+ 3 top_statement_list: top_statement_list . @1 top_statement
+ 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' @2 top_statement_list . '}'
- '(' shift, and go to state 654
+ '}' shift, and go to state 667
- $default reduce using rule 394 (method_or_not)
+ $default reduce using rule 2 (@1)
- method_or_not go to state 655
+ @1 go to state 4
state 592
- 415 object_dim_list: object_dim_list '[' . dim_offset ']'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 410 (dim_offset)
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 407
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- dim_offset go to state 656
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name '(' @57 function_call_parameter_list . ')'
+
+ ')' shift, and go to state 668
state 593
- 416 object_dim_list: object_dim_list '{' . expr '}'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 657
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 310 expr_without_variable: '(' new_expr ')' @48 instance_call .
+
+ $default reduce using rule 310 (expr_without_variable)
state 594
- 341 ctor_arguments: '(' function_call_parameter_list ')' .
+ 249 instance_call: @40 . chaining_instance_call
- $default reduce using rule 341 (ctor_arguments)
+ '[' shift, and go to state 669
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 670
+ chaining_method_or_property go to state 671
+ chaining_dereference go to state 672
+ chaining_instance_call go to state 673
+ variable_property go to state 674
-state 595
- 329 dynamic_class_name_reference: base_variable T_OBJECT_OPERATOR $@59 object_property $@60 . dynamic_class_name_variable_properties
+state 595
- $default reduce using rule 332 (dynamic_class_name_variable_properties)
+ 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" '(' . ')' ';'
- dynamic_class_name_variable_properties go to state 658
+ ')' shift, and go to state 675
state 596
- 41 unticked_statement: T_IF '(' expr ')' ':' $@7 . inner_statement_list $@8 new_elseif_list new_else_single T_ENDIF ';'
-
- $default reduce using rule 28 (inner_statement_list)
+ 170 non_empty_function_call_parameter_list: '&' w_variable .
- inner_statement_list go to state 659
+ $default reduce using rule 170 (non_empty_function_call_parameter_list)
state 597
- 38 unticked_statement: T_IF '(' expr ')' $@5 statement . $@6 elseif_list else_single
-
- $default reduce using rule 37 ($@6)
+ 344 function_call: namespace_name '(' @55 function_call_parameter_list ')' .
- $@6 go to state 660
+ $default reduce using rule 344 (function_call)
state 598
- 47 unticked_statement: T_DO $@11 statement T_WHILE '(' $@12 . expr ')' ';'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 661
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 171 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' . expr_without_variable
+ 172 | non_empty_function_call_parameter_list ',' . variable
+ 173 | non_empty_function_call_parameter_list ',' . '&' w_variable
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 676
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 677
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 678
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 599
- 44 unticked_statement: T_WHILE '(' $@9 expr ')' $@10 . while_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- ':' shift, and go to state 662
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_IF shift, and go to state 28
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_INLINE_HTML shift, and go to state 34
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ECHO shift, and go to state 36
- T_DO shift, and go to state 37
- T_WHILE shift, and go to state 38
- T_FOR shift, and go to state 39
- T_FOREACH shift, and go to state 40
- T_DECLARE shift, and go to state 41
- T_SWITCH shift, and go to state 42
- T_BREAK shift, and go to state 43
- T_CONTINUE shift, and go to state 44
- T_GOTO shift, and go to state 45
- T_FUNCTION shift, and go to state 46
- T_RETURN shift, and go to state 48
- T_TRY shift, and go to state 49
- T_THROW shift, and go to state 50
- T_GLOBAL shift, and go to state 52
- T_STATIC shift, and go to state 55
- T_UNSET shift, and go to state 56
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 75
- '{' shift, and go to state 76
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- statement go to state 663
- unticked_statement go to state 84
- while_statement go to state 664
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 97
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 24 constant_declaration: constant_declaration ',' "identifier (T_STRING)" '=' static_scalar .
+
+ $default reduce using rule 24 (constant_declaration)
state 600
- 51 unticked_statement: T_FOR '(' for_expr ';' $@13 for_expr . ';' $@14 for_expr ')' $@15 for_statement
+ 364 fully_qualified_class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" . namespace_name
+
+ "identifier (T_STRING)" shift, and go to state 116
- ';' shift, and go to state 665
+ namespace_name go to state 679
state 601
- 213 non_empty_for_expr: non_empty_for_expr ',' $@38 expr .
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 213 (non_empty_for_expr)
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 365 fully_qualified_class_name: "\\ (T_NS_SEPARATOR)" namespace_name .
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
-state 602
+ $default reduce using rule 365 (fully_qualified_class_name)
- 72 unticked_statement: T_FOREACH '(' expr_without_variable T_AS $@19 variable . foreach_optional_arg ')' $@20 foreach_statement
- T_DOUBLE_ARROW shift, and go to state 666
+state 602
+
+ 114 implements_list: "implements (T_IMPLEMENTS)" . interface_list
- $default reduce using rule 116 (foreach_optional_arg)
+ "identifier (T_STRING)" shift, and go to state 116
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
- foreach_optional_arg go to state 667
+ namespace_name go to state 516
+ interface_list go to state 680
+ fully_qualified_class_name go to state 605
state 603
- 119 foreach_variable: '&' . variable
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- variable go to state 668
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 implements_list . '{' class_statement_list '}'
+ '{' shift, and go to state 681
-state 604
- 69 unticked_statement: T_FOREACH '(' variable T_AS $@17 foreach_variable . foreach_optional_arg ')' $@18 foreach_statement
+state 604
- T_DOUBLE_ARROW shift, and go to state 666
+ 112 interface_extends_list: "extends (T_EXTENDS)" interface_list .
+ 116 interface_list: interface_list . ',' fully_qualified_class_name
- $default reduce using rule 116 (foreach_optional_arg)
+ ',' shift, and go to state 682
- foreach_optional_arg go to state 669
+ $default reduce using rule 112 (interface_extends_list)
state 605
- 118 foreach_variable: variable .
+ 115 interface_list: fully_qualified_class_name .
- $default reduce using rule 118 (foreach_variable)
+ $default reduce using rule 115 (interface_list)
state 606
- 126 declare_list: T_STRING '=' static_scalar .
+ 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 interface_extends_list '{' . class_statement_list '}'
+
+ $default reduce using rule 184 (class_statement_list)
- $default reduce using rule 126 (declare_list)
+ class_statement_list go to state 683
state 607
- 127 declare_list: declare_list ',' T_STRING . '=' static_scalar
+ 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' . parameter_list ')' '{' inner_statement_list '}'
- '=' shift, and go to state 670
+ "identifier (T_STRING)" shift, and go to state 116
+ "array (T_ARRAY)" shift, and go to state 608
+ "callable (T_CALLABLE)" shift, and go to state 609
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+ ')' reduce using rule 153 (parameter_list)
+ $default reduce using rule 162 (optional_class_type)
-state 608
+ namespace_name go to state 516
+ parameter_list go to state 684
+ non_empty_parameter_list go to state 611
+ optional_class_type go to state 612
+ fully_qualified_class_name go to state 613
- 125 declare_statement: ':' . inner_statement_list T_ENDDECLARE ';'
- $default reduce using rule 28 (inner_statement_list)
+state 608
+
+ 163 optional_class_type: "array (T_ARRAY)" .
- inner_statement_list go to state 671
+ $default reduce using rule 163 (optional_class_type)
state 609
- 124 declare_statement: statement .
+ 164 optional_class_type: "callable (T_CALLABLE)" .
- $default reduce using rule 124 (declare_statement)
+ $default reduce using rule 164 (optional_class_type)
state 610
- 74 unticked_statement: T_DECLARE $@21 '(' declare_list ')' declare_statement .
+ 333 expr_without_variable: function is_reference '(' @53 parameter_list . ')' lexical_vars '{' inner_statement_list '}'
- $default reduce using rule 74 (unticked_statement)
+ ')' shift, and go to state 685
state 611
- 130 switch_case_list: ':' . case_list T_ENDSWITCH ';'
- 131 | ':' . ';' case_list T_ENDSWITCH ';'
-
- ';' shift, and go to state 672
+ 152 parameter_list: non_empty_parameter_list .
+ 158 non_empty_parameter_list: non_empty_parameter_list . ',' optional_class_type "variable (T_VARIABLE)"
+ 159 | non_empty_parameter_list . ',' optional_class_type '&' "variable (T_VARIABLE)"
+ 160 | non_empty_parameter_list . ',' optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
+ 161 | non_empty_parameter_list . ',' optional_class_type "variable (T_VARIABLE)" '=' static_scalar
- $default reduce using rule 132 (case_list)
+ ',' shift, and go to state 686
- case_list go to state 673
+ $default reduce using rule 152 (parameter_list)
state 612
- 128 switch_case_list: '{' . case_list '}'
- 129 | '{' . ';' case_list '}'
-
- ';' shift, and go to state 674
+ 154 non_empty_parameter_list: optional_class_type . "variable (T_VARIABLE)"
+ 155 | optional_class_type . '&' "variable (T_VARIABLE)"
+ 156 | optional_class_type . '&' "variable (T_VARIABLE)" '=' static_scalar
+ 157 | optional_class_type . "variable (T_VARIABLE)" '=' static_scalar
- $default reduce using rule 132 (case_list)
-
- case_list go to state 675
+ '&' shift, and go to state 687
+ "variable (T_VARIABLE)" shift, and go to state 688
state 613
- 53 unticked_statement: T_SWITCH '(' expr ')' $@16 switch_case_list .
+ 165 optional_class_type: fully_qualified_class_name .
- $default reduce using rule 53 (unticked_statement)
+ $default reduce using rule 165 (optional_class_type)
state 614
- 377 non_empty_static_array_pair_list: static_scalar . T_DOUBLE_ARROW static_scalar
- 378 | static_scalar .
-
- T_DOUBLE_ARROW shift, and go to state 676
+ 450 array_function_dereference: function_call @69 '[' dim_offset ']' .
- $default reduce using rule 378 (non_empty_static_array_pair_list)
+ $default reduce using rule 450 (array_function_dereference)
state 615
- 360 static_scalar: T_ARRAY '(' static_array_pair_list . ')'
+ 471 variable_name: '{' expr '}' .
- ')' shift, and go to state 677
+ $default reduce using rule 471 (variable_name)
state 616
- 372 static_array_pair_list: non_empty_static_array_pair_list . possible_comma
- 375 non_empty_static_array_pair_list: non_empty_static_array_pair_list . ',' static_scalar T_DOUBLE_ARROW static_scalar
- 376 | non_empty_static_array_pair_list . ',' static_scalar
-
- ',' shift, and go to state 678
-
- $default reduce using rule 373 (possible_comma)
-
- possible_comma go to state 679
+ 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 . function_call_parameter_list ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 508
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 167 (function_call_parameter_list)
+
+ namespace_name go to state 83
+ function_call_parameter_list go to state 689
+ non_empty_function_call_parameter_list go to state 510
+ new_expr go to state 94
+ expr_without_variable go to state 511
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 512
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 617
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 320 class_name: T_NAMESPACE T_NS_SEPARATOR namespace_name .
- 356 static_scalar: T_NAMESPACE T_NS_SEPARATOR namespace_name .
-
- T_NS_SEPARATOR shift, and go to state 213
-
- T_PAAMAYIM_NEKUDOTAYIM reduce using rule 320 (class_name)
- $default reduce using rule 356 (static_scalar)
+ 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 . function_call_parameter_list ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 508
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 167 (function_call_parameter_list)
+
+ namespace_name go to state 83
+ function_call_parameter_list go to state 690
+ non_empty_function_call_parameter_list go to state 510
+ new_expr go to state 94
+ expr_without_variable go to state 511
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 512
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 618
- 362 static_class_constant: class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING .
-
- $default reduce using rule 362 (static_class_constant)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 315 | expr '?' ':' @51 expr .
+
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 315 (expr_without_variable)
state 619
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH . '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
+ 313 expr_without_variable: expr '?' @49 expr ':' . @50 expr
- '(' shift, and go to state 680
+ $default reduce using rule 312 (@50)
+
+ @50 go to state 691
state 620
- 178 static_var_list: static_var_list ',' T_VARIABLE '=' static_scalar .
+ 257 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference . @43 ctor_arguments
+
+ $default reduce using rule 256 (@43)
- $default reduce using rule 178 (static_var_list)
+ @43 go to state 692
state 621
- 461 isset_variables: isset_variables ',' $@68 variable .
+ 358 function_call: variable_without_objects '(' @62 function_call_parameter_list ')' .
- $default reduce using rule 461 (isset_variables)
+ $default reduce using rule 358 (function_call)
state 622
- 426 assignment_list_element: T_LIST '(' $@66 . assignment_list ')'
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_LIST shift, and go to state 457
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- $default reduce using rule 427 (assignment_list_element)
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- variable go to state 458
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- assignment_list go to state 681
- assignment_list_element go to state 460
+ 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 . function_call_parameter_list ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 508
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 167 (function_call_parameter_list)
+
+ namespace_name go to state 83
+ function_call_parameter_list go to state 693
+ non_empty_function_call_parameter_list go to state 510
+ new_expr go to state 94
+ expr_without_variable go to state 511
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 512
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 623
- 422 assignment_list: assignment_list ',' assignment_list_element .
-
- $default reduce using rule 422 (assignment_list)
+ 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 . function_call_parameter_list ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 508
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 167 (function_call_parameter_list)
+
+ namespace_name go to state 83
+ function_call_parameter_list go to state 694
+ non_empty_function_call_parameter_list go to state 510
+ new_expr go to state 94
+ expr_without_variable go to state 511
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 512
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 624
- 216 expr_without_variable: T_LIST '(' $@39 assignment_list ')' '=' . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 682
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 466 object_property: variable_without_objects @70 .
+
+ $default reduce using rule 466 (object_property)
state 625
- 436 non_empty_array_pair_list: expr T_DOUBLE_ARROW '&' w_variable .
+ 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 object_property @66 . method_or_not variable_properties
- $default reduce using rule 436 (non_empty_array_pair_list)
+ '(' shift, and go to state 695
+ $default reduce using rule 442 (method_or_not)
-state 626
+ array_method_dereference go to state 696
+ method go to state 697
+ method_or_not go to state 698
- 435 non_empty_array_pair_list: non_empty_array_pair_list ',' '&' w_variable .
- $default reduce using rule 435 (non_empty_array_pair_list)
+state 626
+
+ 467 object_dim_list: object_dim_list '[' . dim_offset ']'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 462 (dim_offset)
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 429
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ dim_offset go to state 699
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 627
- 430 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW . expr
- 434 | non_empty_array_pair_list ',' expr T_DOUBLE_ARROW . '&' w_variable
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 683
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 684
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 468 object_dim_list: object_dim_list '{' . expr '}'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 700
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 628
- 444 encaps_var: T_VARIABLE '[' $@67 encaps_var_offset ']' .
-
- $default reduce using rule 444 (encaps_var)
+ 486 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ w_variable go to state 701
+ variable go to state 292
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 629
- 447 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' . '}'
-
- '}' shift, and go to state 685
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 482 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" expr .
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 482 (non_empty_array_pair_list)
state 630
- 305 function_call: T_NAMESPACE T_NS_SEPARATOR namespace_name '(' $@52 function_call_parameter_list . ')'
+ 382 ctor_arguments: '(' function_call_parameter_list ')' .
- ')' shift, and go to state 686
+ $default reduce using rule 382 (ctor_arguments)
state 631
- 13 top_statement: T_NAMESPACE namespace_name '{' $@2 top_statement_list '}' .
+ 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" @63 object_property @64 . dynamic_class_name_variable_properties
- $default reduce using rule 13 (top_statement)
+ $default reduce using rule 373 (dynamic_class_name_variable_properties)
+
+ dynamic_class_name_variable_properties go to state 702
state 632
- 307 function_call: T_NS_SEPARATOR namespace_name '(' $@53 function_call_parameter_list ')' .
+ 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 . inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
- $default reduce using rule 307 (function_call)
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 703
state 633
- 32 inner_statement: T_HALT_COMPILER '(' ')' . ';'
+ 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 statement . @6 elseif_list else_single
+
+ $default reduce using rule 37 (@6)
- ';' shift, and go to state 687
+ @6 go to state 704
state 634
- 171 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' '&' . w_variable
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- w_variable go to state 688
- variable go to state 462
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' @12 . expr ')' ';'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 705
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 635
- 169 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' expr_without_variable .
- 380 expr: expr_without_variable .
-
- ',' reduce using rule 169 (non_empty_function_call_parameter_list)
- ')' reduce using rule 169 (non_empty_function_call_parameter_list)
- $default reduce using rule 380 (expr)
+ 44 unticked_statement: "while (T_WHILE)" '(' @9 expr ')' @10 . while_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ ':' shift, and go to state 706
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "if (T_IF)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 32
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ T_INLINE_HTML shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "echo (T_ECHO)" shift, and go to state 37
+ "do (T_DO)" shift, and go to state 38
+ "while (T_WHILE)" shift, and go to state 39
+ "for (T_FOR)" shift, and go to state 40
+ "foreach (T_FOREACH)" shift, and go to state 41
+ "declare (T_DECLARE)" shift, and go to state 42
+ "switch (T_SWITCH)" shift, and go to state 43
+ "break (T_BREAK)" shift, and go to state 44
+ "continue (T_CONTINUE)" shift, and go to state 45
+ "goto (T_GOTO)" shift, and go to state 46
+ "function (T_FUNCTION)" shift, and go to state 47
+ "return (T_RETURN)" shift, and go to state 49
+ "try (T_TRY)" shift, and go to state 50
+ "throw (T_THROW)" shift, and go to state 51
+ "global (T_GLOBAL)" shift, and go to state 53
+ "static (T_STATIC)" shift, and go to state 56
+ "unset (T_UNSET)" shift, and go to state 57
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 78
+ '{' shift, and go to state 79
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ statement go to state 707
+ unticked_statement go to state 87
+ while_statement go to state 708
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 101
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 636
- 170 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' variable .
- 217 expr_without_variable: variable . '=' expr
- 218 | variable . '=' '&' variable
- 220 | variable . '=' '&' T_NEW class_name_reference $@40 ctor_arguments
- 224 | variable . T_PLUS_EQUAL expr
- 225 | variable . T_MINUS_EQUAL expr
- 226 | variable . T_MUL_EQUAL expr
- 227 | variable . T_DIV_EQUAL expr
- 228 | variable . T_CONCAT_EQUAL expr
- 229 | variable . T_MOD_EQUAL expr
- 230 | variable . T_AND_EQUAL expr
- 231 | variable . T_OR_EQUAL expr
- 232 | variable . T_XOR_EQUAL expr
- 233 | variable . T_SL_EQUAL expr
- 234 | variable . T_SR_EQUAL expr
- 381 r_variable: variable .
- 383 rw_variable: variable .
-
- '=' shift, and go to state 251
- T_SR_EQUAL shift, and go to state 252
- T_SL_EQUAL shift, and go to state 253
- T_XOR_EQUAL shift, and go to state 254
- T_OR_EQUAL shift, and go to state 255
- T_AND_EQUAL shift, and go to state 256
- T_MOD_EQUAL shift, and go to state 257
- T_CONCAT_EQUAL shift, and go to state 258
- T_DIV_EQUAL shift, and go to state 259
- T_MUL_EQUAL shift, and go to state 260
- T_MINUS_EQUAL shift, and go to state 261
- T_PLUS_EQUAL shift, and go to state 262
-
- ',' reduce using rule 170 (non_empty_function_call_parameter_list)
- T_DEC reduce using rule 383 (rw_variable)
- T_INC reduce using rule 383 (rw_variable)
- ')' reduce using rule 170 (non_empty_function_call_parameter_list)
- $default reduce using rule 381 (r_variable)
-
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr . ';' @14 for_expr ')' @15 for_statement
-state 637
+ ';' shift, and go to state 709
- 6 namespace_name: namespace_name . T_NS_SEPARATOR T_STRING
- 323 fully_qualified_class_name: T_NAMESPACE T_NS_SEPARATOR namespace_name .
- T_NS_SEPARATOR shift, and go to state 213
+state 637
- $default reduce using rule 323 (fully_qualified_class_name)
+ 237 non_empty_for_expr: non_empty_for_expr ',' @38 expr .
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 237 (non_empty_for_expr)
state 638
- 113 implements_list: T_IMPLEMENTS interface_list .
- 115 interface_list: interface_list . ',' fully_qualified_class_name
-
- ',' shift, and go to state 640
+ 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable . foreach_optional_arg ')' @20 foreach_statement
- $default reduce using rule 113 (implements_list)
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 710
+ $default reduce using rule 117 (foreach_optional_arg)
-state 639
+ foreach_optional_arg go to state 711
- 101 unticked_class_declaration_statement: class_entry_type T_STRING extends_from $@30 implements_list '{' . class_statement_list '}'
- $default reduce using rule 182 (class_statement_list)
+state 639
- class_statement_list go to state 689
+ 120 foreach_variable: '&' . variable
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 712
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 640
- 115 interface_list: interface_list ',' . fully_qualified_class_name
+ 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable . foreach_optional_arg ')' @18 foreach_statement
- T_STRING shift, and go to state 111
- T_NAMESPACE shift, and go to state 488
- T_NS_SEPARATOR shift, and go to state 489
-
- namespace_name go to state 490
- fully_qualified_class_name go to state 690
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 710
+ $default reduce using rule 117 (foreach_optional_arg)
-state 641
+ foreach_optional_arg go to state 713
- 103 unticked_class_declaration_statement: interface_entry T_STRING $@31 interface_extends_list '{' class_statement_list . '}'
- 181 class_statement_list: class_statement_list . class_statement
- T_CONST shift, and go to state 691
- T_PUBLIC shift, and go to state 692
- T_PROTECTED shift, and go to state 693
- T_PRIVATE shift, and go to state 694
- T_FINAL shift, and go to state 695
- T_ABSTRACT shift, and go to state 696
- T_STATIC shift, and go to state 697
- T_VAR shift, and go to state 698
- '}' shift, and go to state 699
+state 641
- $default reduce using rule 192 (method_modifiers)
+ 119 foreach_variable: variable .
- class_statement go to state 700
- variable_modifiers go to state 701
- method_modifiers go to state 702
- non_empty_member_modifiers go to state 703
- member_modifier go to state 704
- class_constant_declaration go to state 705
+ $default reduce using rule 119 (foreach_variable)
state 642
- 99 unticked_function_declaration_statement: function is_reference T_STRING $@29 '(' parameter_list . ')' '{' inner_statement_list '}'
+ 127 declare_list: "identifier (T_STRING)" '=' static_scalar .
- ')' shift, and go to state 706
+ $default reduce using rule 127 (declare_list)
state 643
- 294 expr_without_variable: function is_reference '(' @50 parameter_list ')' . lexical_vars '{' inner_statement_list '}'
+ 128 declare_list: declare_list ',' "identifier (T_STRING)" . '=' static_scalar
- T_USE shift, and go to state 707
-
- $default reduce using rule 296 (lexical_vars)
-
- lexical_vars go to state 708
+ '=' shift, and go to state 714
state 644
- 157 non_empty_parameter_list: non_empty_parameter_list ',' . optional_class_type T_VARIABLE
- 158 | non_empty_parameter_list ',' . optional_class_type '&' T_VARIABLE
- 159 | non_empty_parameter_list ',' . optional_class_type '&' T_VARIABLE '=' static_scalar
- 160 | non_empty_parameter_list ',' . optional_class_type T_VARIABLE '=' static_scalar
-
- T_STRING shift, and go to state 111
- T_ARRAY shift, and go to state 576
- T_NAMESPACE shift, and go to state 488
- T_NS_SEPARATOR shift, and go to state 489
+ 126 declare_statement: ':' . inner_statement_list "enddeclare (T_ENDDECLARE)" ';'
- $default reduce using rule 161 (optional_class_type)
+ $default reduce using rule 28 (inner_statement_list)
- namespace_name go to state 490
- optional_class_type go to state 709
- fully_qualified_class_name go to state 580
+ inner_statement_list go to state 715
state 645
- 154 non_empty_parameter_list: optional_class_type '&' . T_VARIABLE
- 155 | optional_class_type '&' . T_VARIABLE '=' static_scalar
+ 125 declare_statement: statement .
- T_VARIABLE shift, and go to state 710
+ $default reduce using rule 125 (declare_statement)
state 646
- 153 non_empty_parameter_list: optional_class_type T_VARIABLE .
- 156 | optional_class_type T_VARIABLE . '=' static_scalar
-
- '=' shift, and go to state 711
+ 74 unticked_statement: "declare (T_DECLARE)" @21 '(' declare_list ')' declare_statement .
- $default reduce using rule 153 (non_empty_parameter_list)
+ $default reduce using rule 74 (unticked_statement)
state 647
- 309 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@54 function_call_parameter_list . ')'
+ 131 switch_case_list: ':' . case_list "endswitch (T_ENDSWITCH)" ';'
+ 132 | ':' . ';' case_list "endswitch (T_ENDSWITCH)" ';'
+
+ ';' shift, and go to state 716
+
+ $default reduce using rule 133 (case_list)
- ')' shift, and go to state 712
+ case_list go to state 717
state 648
- 311 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@55 function_call_parameter_list . ')'
+ 129 switch_case_list: '{' . case_list '}'
+ 130 | '{' . ';' case_list '}'
- ')' shift, and go to state 713
+ ';' shift, and go to state 718
+ $default reduce using rule 133 (case_list)
-state 649
+ case_list go to state 719
- 275 expr_without_variable: expr '?' $@46 expr ':' $@47 . expr
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 714
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+state 649
-state 650
+ 53 unticked_statement: "switch (T_SWITCH)" '(' expr ')' @16 switch_case_list .
- 220 expr_without_variable: variable '=' '&' T_NEW class_name_reference $@40 . ctor_arguments
+ $default reduce using rule 53 (unticked_statement)
- '(' shift, and go to state 416
- $default reduce using rule 340 (ctor_arguments)
+state 650
- ctor_arguments go to state 715
+ 421 non_empty_static_array_pair_list: static_scalar "=> (T_DOUBLE_ARROW)" . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 720
+ static_class_constant go to state 471
state 651
- 313 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@56 function_call_parameter_list . ')'
+ 402 static_scalar: '[' static_array_pair_list ']' .
- ')' shift, and go to state 716
+ $default reduce using rule 402 (static_scalar)
state 652
- 315 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@57 function_call_parameter_list . ')'
-
- ')' shift, and go to state 717
+ 418 possible_comma: ',' .
+ 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' . static_scalar "=> (T_DOUBLE_ARROW)" static_scalar
+ 420 | non_empty_static_array_pair_list ',' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ $default reduce using rule 418 (possible_comma)
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 721
+ static_class_constant go to state 471
state 653
- 419 variable_name: '{' expr '}' .
+ 416 static_array_pair_list: non_empty_static_array_pair_list possible_comma .
- $default reduce using rule 419 (variable_name)
+ $default reduce using rule 416 (static_array_pair_list)
state 654
- 393 method_or_not: '(' . $@64 function_call_parameter_list ')'
+ 401 static_scalar: "array (T_ARRAY)" '(' static_array_pair_list . ')'
- $default reduce using rule 392 ($@64)
-
- $@64 go to state 718
+ ')' shift, and go to state 722
state 655
- 386 variable: base_variable_with_function_calls T_OBJECT_OPERATOR $@61 object_property $@62 method_or_not . variable_properties
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 361 class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
+ 397 static_scalar: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- $default reduce using rule 389 (variable_properties)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
- variable_properties go to state 719
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" reduce using rule 361 (class_name)
+ $default reduce using rule 397 (static_scalar)
state 656
- 415 object_dim_list: object_dim_list '[' dim_offset . ']'
+ 405 static_class_constant: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
- ']' shift, and go to state 720
+ $default reduce using rule 405 (static_class_constant)
state 657
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 416 object_dim_list: object_dim_list '{' expr . '}'
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- '}' shift, and go to state 721
-
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" . '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
-state 658
+ '(' shift, and go to state 723
- 329 dynamic_class_name_reference: base_variable T_OBJECT_OPERATOR $@59 object_property $@60 dynamic_class_name_variable_properties .
- 331 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties . dynamic_class_name_variable_property
- T_OBJECT_OPERATOR shift, and go to state 722
+state 658
- $default reduce using rule 329 (dynamic_class_name_reference)
+ 180 static_var_list: static_var_list ',' "variable (T_VARIABLE)" '=' static_scalar .
- dynamic_class_name_variable_property go to state 723
+ $default reduce using rule 180 (static_var_list)
state 659
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 41 unticked_statement: T_IF '(' expr ')' ':' $@7 inner_statement_list . $@8 new_elseif_list new_else_single T_ENDIF ';'
-
- T_ELSEIF reduce using rule 40 ($@8)
- T_ELSE reduce using rule 40 ($@8)
- T_ENDIF reduce using rule 40 ($@8)
- $default reduce using rule 26 ($@4)
+ 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list . ')' lexical_vars '{' inner_statement_list '}'
- $@4 go to state 347
- $@8 go to state 724
+ ')' shift, and go to state 724
state 660
- 38 unticked_statement: T_IF '(' expr ')' $@5 statement $@6 . elseif_list else_single
+ 513 isset_variables: isset_variables ',' @73 variable .
- $default reduce using rule 141 (elseif_list)
-
- elseif_list go to state 725
+ $default reduce using rule 513 (isset_variables)
state 661
- 47 unticked_statement: T_DO $@11 statement T_WHILE '(' $@12 expr . ')' ';'
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ')' shift, and go to state 726
+ 478 assignment_list_element: "list (T_LIST)" '(' @71 . assignment_list ')'
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "list (T_LIST)" shift, and go to state 487
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ $default reduce using rule 479 (assignment_list_element)
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 488
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ assignment_list go to state 725
+ assignment_list_element go to state 490
state 662
- 140 while_statement: ':' . inner_statement_list T_ENDWHILE ';'
+ 474 assignment_list: assignment_list ',' assignment_list_element .
- $default reduce using rule 28 (inner_statement_list)
-
- inner_statement_list go to state 727
+ $default reduce using rule 474 (assignment_list)
state 663
- 139 while_statement: statement .
-
- $default reduce using rule 139 (while_statement)
+ 253 expr_without_variable: "list (T_LIST)" '(' @42 assignment_list ')' '=' . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 726
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 664
- 44 unticked_statement: T_WHILE '(' $@9 expr ')' $@10 while_statement .
+ 496 encaps_var: "variable (T_VARIABLE)" '[' @72 encaps_var_offset ']' .
- $default reduce using rule 44 (unticked_statement)
+ $default reduce using rule 496 (encaps_var)
state 665
- 51 unticked_statement: T_FOR '(' for_expr ';' $@13 for_expr ';' . $@14 for_expr ')' $@15 for_statement
+ 499 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr ']' . '}'
- $default reduce using rule 49 ($@14)
-
- $@14 go to state 728
+ '}' shift, and go to state 727
state 666
- 117 foreach_optional_arg: T_DOUBLE_ARROW . foreach_variable
-
- '&' shift, and go to state 603
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- foreach_variable go to state 729
- function_call go to state 93
- class_name go to state 136
- variable go to state 605
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list . ')'
+
+ ')' shift, and go to state 728
state 667
- 72 unticked_statement: T_FOREACH '(' expr_without_variable T_AS $@19 variable foreach_optional_arg . ')' $@20 foreach_statement
+ 13 top_statement: "namespace (T_NAMESPACE)" namespace_name '{' @2 top_statement_list '}' .
- ')' shift, and go to state 730
+ $default reduce using rule 13 (top_statement)
state 668
- 119 foreach_variable: '&' variable .
+ 348 function_call: "\\ (T_NS_SEPARATOR)" namespace_name '(' @57 function_call_parameter_list ')' .
- $default reduce using rule 119 (foreach_variable)
+ $default reduce using rule 348 (function_call)
state 669
- 69 unticked_statement: T_FOREACH '(' variable T_AS $@17 foreach_variable foreach_optional_arg . ')' $@18 foreach_statement
-
- ')' shift, and go to state 731
+ 242 chaining_dereference: '[' . dim_offset ']'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 462 (dim_offset)
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 429
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ dim_offset go to state 729
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 670
- 127 declare_list: declare_list ',' T_STRING '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 732
- static_class_constant go to state 442
+ 435 variable_property: "-> (T_OBJECT_OPERATOR)" . object_property @67 method_or_not
+
+ "identifier (T_STRING)" shift, and go to state 436
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '{' shift, and go to state 380
+ '$' shift, and go to state 80
+
+ variable_without_objects go to state 540
+ reference_variable go to state 382
+ compound_variable go to state 112
+ object_property go to state 730
+ object_dim_list go to state 542
+ variable_name go to state 543
+ simple_indirect_reference go to state 384
state 671
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 125 declare_statement: ':' inner_statement_list . T_ENDDECLARE ';'
+ 239 chaining_method_or_property: chaining_method_or_property . variable_property
+ 246 chaining_instance_call: chaining_method_or_property .
- T_ENDDECLARE shift, and go to state 733
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 670
- $default reduce using rule 26 ($@4)
+ $default reduce using rule 246 (chaining_instance_call)
- $@4 go to state 347
+ variable_property go to state 731
state 672
- 131 switch_case_list: ':' ';' . case_list T_ENDSWITCH ';'
+ 241 chaining_dereference: chaining_dereference . '[' dim_offset ']'
+ 244 chaining_instance_call: chaining_dereference . @39 chaining_method_or_property
+ 245 | chaining_dereference .
+
+ '[' shift, and go to state 732
- $default reduce using rule 132 (case_list)
+ "-> (T_OBJECT_OPERATOR)" reduce using rule 243 (@39)
+ $default reduce using rule 245 (chaining_instance_call)
- case_list go to state 734
+ @39 go to state 733
state 673
- 130 switch_case_list: ':' case_list . T_ENDSWITCH ';'
- 134 case_list: case_list . T_CASE expr case_separator $@32 inner_statement_list
- 136 | case_list . T_DEFAULT case_separator $@33 inner_statement_list
+ 249 instance_call: @40 chaining_instance_call .
- T_ENDSWITCH shift, and go to state 735
- T_CASE shift, and go to state 736
- T_DEFAULT shift, and go to state 737
+ $default reduce using rule 249 (instance_call)
state 674
- 129 switch_case_list: '{' ';' . case_list '}'
-
- $default reduce using rule 132 (case_list)
+ 240 chaining_method_or_property: variable_property .
- case_list go to state 738
+ $default reduce using rule 240 (chaining_method_or_property)
state 675
- 128 switch_case_list: '{' case_list . '}'
- 134 case_list: case_list . T_CASE expr case_separator $@32 inner_statement_list
- 136 | case_list . T_DEFAULT case_separator $@33 inner_statement_list
+ 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" '(' ')' . ';'
- T_CASE shift, and go to state 736
- T_DEFAULT shift, and go to state 737
- '}' shift, and go to state 739
+ ';' shift, and go to state 734
state 676
- 377 non_empty_static_array_pair_list: static_scalar T_DOUBLE_ARROW . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 740
- static_class_constant go to state 442
+ 173 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' '&' . w_variable
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ function_call go to state 97
+ class_name go to state 142
+ w_variable go to state 735
+ variable go to state 292
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 677
- 360 static_scalar: T_ARRAY '(' static_array_pair_list ')' .
+ 171 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' expr_without_variable .
+ 424 expr: expr_without_variable .
- $default reduce using rule 360 (static_scalar)
+ ',' reduce using rule 171 (non_empty_function_call_parameter_list)
+ ')' reduce using rule 171 (non_empty_function_call_parameter_list)
+ $default reduce using rule 424 (expr)
state 678
- 374 possible_comma: ',' .
- 375 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' . static_scalar T_DOUBLE_ARROW static_scalar
- 376 | non_empty_static_array_pair_list ',' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- $default reduce using rule 374 (possible_comma)
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 741
- static_class_constant go to state 442
+ 172 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' variable .
+ 254 expr_without_variable: variable . '=' expr
+ 255 | variable . '=' '&' variable
+ 257 | variable . '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments
+ 259 | variable . "+= (T_PLUS_EQUAL)" expr
+ 260 | variable . "-= (T_MINUS_EQUAL)" expr
+ 261 | variable . "*= (T_MUL_EQUAL)" expr
+ 262 | variable . "/= (T_DIV_EQUAL)" expr
+ 263 | variable . ".= (T_CONCAT_EQUAL)" expr
+ 264 | variable . "%= (T_MOD_EQUAL)" expr
+ 265 | variable . "&= (T_AND_EQUAL)" expr
+ 266 | variable . "|= (T_OR_EQUAL)" expr
+ 267 | variable . "^= (T_XOR_EQUAL)" expr
+ 268 | variable . "<<= (T_SL_EQUAL)" expr
+ 269 | variable . ">>= (T_SR_EQUAL)" expr
+ 425 r_variable: variable .
+ 427 rw_variable: variable .
+
+ '=' shift, and go to state 264
+ ">>= (T_SR_EQUAL)" shift, and go to state 265
+ "<<= (T_SL_EQUAL)" shift, and go to state 266
+ "^= (T_XOR_EQUAL)" shift, and go to state 267
+ "|= (T_OR_EQUAL)" shift, and go to state 268
+ "&= (T_AND_EQUAL)" shift, and go to state 269
+ "%= (T_MOD_EQUAL)" shift, and go to state 270
+ ".= (T_CONCAT_EQUAL)" shift, and go to state 271
+ "/= (T_DIV_EQUAL)" shift, and go to state 272
+ "*= (T_MUL_EQUAL)" shift, and go to state 273
+ "-= (T_MINUS_EQUAL)" shift, and go to state 274
+ "+= (T_PLUS_EQUAL)" shift, and go to state 275
+
+ ',' reduce using rule 172 (non_empty_function_call_parameter_list)
+ "-- (T_DEC)" reduce using rule 427 (rw_variable)
+ "++ (T_INC)" reduce using rule 427 (rw_variable)
+ ')' reduce using rule 172 (non_empty_function_call_parameter_list)
+ $default reduce using rule 425 (r_variable)
state 679
- 372 static_array_pair_list: non_empty_static_array_pair_list possible_comma .
+ 6 namespace_name: namespace_name . "\\ (T_NS_SEPARATOR)" "identifier (T_STRING)"
+ 364 fully_qualified_class_name: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name .
- $default reduce using rule 372 (static_array_pair_list)
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 225
+
+ $default reduce using rule 364 (fully_qualified_class_name)
state 680
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' . $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
+ 114 implements_list: "implements (T_IMPLEMENTS)" interface_list .
+ 116 interface_list: interface_list . ',' fully_qualified_class_name
- $default reduce using rule 77 ($@23)
+ ',' shift, and go to state 682
- $@23 go to state 742
+ $default reduce using rule 114 (implements_list)
state 681
- 422 assignment_list: assignment_list . ',' assignment_list_element
- 426 assignment_list_element: T_LIST '(' $@66 assignment_list . ')'
+ 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 implements_list '{' . class_statement_list '}'
+
+ $default reduce using rule 184 (class_statement_list)
- ',' shift, and go to state 548
- ')' shift, and go to state 743
+ class_statement_list go to state 736
state 682
- 216 expr_without_variable: T_LIST '(' $@39 assignment_list ')' '=' expr .
- 240 | expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 216 (expr_without_variable)
+ 116 interface_list: interface_list ',' . fully_qualified_class_name
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+
+ namespace_name go to state 516
+ fully_qualified_class_name go to state 737
state 683
- 434 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' . w_variable
-
- T_STRING shift, and go to state 111
- T_VARIABLE shift, and go to state 33
- T_STATIC shift, and go to state 112
- T_NAMESPACE shift, and go to state 133
- T_NS_SEPARATOR shift, and go to state 134
- '$' shift, and go to state 77
-
- namespace_name go to state 135
- function_call go to state 93
- class_name go to state 136
- w_variable go to state 744
- variable go to state 462
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 139
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
+ 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 interface_extends_list '{' class_statement_list . '}'
+ 183 class_statement_list: class_statement_list . class_statement
+
+ "const (T_CONST)" shift, and go to state 738
+ "use (T_USE)" shift, and go to state 739
+ "public (T_PUBLIC)" shift, and go to state 740
+ "protected (T_PROTECTED)" shift, and go to state 741
+ "private (T_PRIVATE)" shift, and go to state 742
+ "final (T_FINAL)" shift, and go to state 743
+ "abstract (T_ABSTRACT)" shift, and go to state 744
+ "static (T_STATIC)" shift, and go to state 745
+ "var (T_VAR)" shift, and go to state 746
+ '}' shift, and go to state 747
+
+ $default reduce using rule 216 (method_modifiers)
+
+ class_statement go to state 748
+ trait_use_statement go to state 749
+ variable_modifiers go to state 750
+ method_modifiers go to state 751
+ non_empty_member_modifiers go to state 752
+ member_modifier go to state 753
+ class_constant_declaration go to state 754
state 684
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
- 430 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW expr .
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 430 (non_empty_array_pair_list)
+ 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list . ')' '{' inner_statement_list '}'
+
+ ')' shift, and go to state 755
state 685
- 447 encaps_var: T_DOLLAR_OPEN_CURLY_BRACES T_STRING_VARNAME '[' expr ']' '}' .
+ 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' . lexical_vars '{' inner_statement_list '}'
+
+ "use (T_USE)" shift, and go to state 756
- $default reduce using rule 447 (encaps_var)
+ $default reduce using rule 337 (lexical_vars)
+
+ lexical_vars go to state 757
state 686
- 305 function_call: T_NAMESPACE T_NS_SEPARATOR namespace_name '(' $@52 function_call_parameter_list ')' .
+ 158 non_empty_parameter_list: non_empty_parameter_list ',' . optional_class_type "variable (T_VARIABLE)"
+ 159 | non_empty_parameter_list ',' . optional_class_type '&' "variable (T_VARIABLE)"
+ 160 | non_empty_parameter_list ',' . optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar
+ 161 | non_empty_parameter_list ',' . optional_class_type "variable (T_VARIABLE)" '=' static_scalar
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "array (T_ARRAY)" shift, and go to state 608
+ "callable (T_CALLABLE)" shift, and go to state 609
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
- $default reduce using rule 305 (function_call)
+ $default reduce using rule 162 (optional_class_type)
+
+ namespace_name go to state 516
+ optional_class_type go to state 758
+ fully_qualified_class_name go to state 613
state 687
- 32 inner_statement: T_HALT_COMPILER '(' ')' ';' .
+ 155 non_empty_parameter_list: optional_class_type '&' . "variable (T_VARIABLE)"
+ 156 | optional_class_type '&' . "variable (T_VARIABLE)" '=' static_scalar
- $default reduce using rule 32 (inner_statement)
+ "variable (T_VARIABLE)" shift, and go to state 759
state 688
- 171 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' '&' w_variable .
+ 154 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)" .
+ 157 | optional_class_type "variable (T_VARIABLE)" . '=' static_scalar
- $default reduce using rule 171 (non_empty_function_call_parameter_list)
+ '=' shift, and go to state 760
+ $default reduce using rule 154 (non_empty_parameter_list)
-state 689
-
- 101 unticked_class_declaration_statement: class_entry_type T_STRING extends_from $@30 implements_list '{' class_statement_list . '}'
- 181 class_statement_list: class_statement_list . class_statement
- T_CONST shift, and go to state 691
- T_PUBLIC shift, and go to state 692
- T_PROTECTED shift, and go to state 693
- T_PRIVATE shift, and go to state 694
- T_FINAL shift, and go to state 695
- T_ABSTRACT shift, and go to state 696
- T_STATIC shift, and go to state 697
- T_VAR shift, and go to state 698
- '}' shift, and go to state 745
+state 689
- $default reduce using rule 192 (method_modifiers)
+ 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 function_call_parameter_list . ')'
- class_statement go to state 700
- variable_modifiers go to state 701
- method_modifiers go to state 702
- non_empty_member_modifiers go to state 703
- member_modifier go to state 704
- class_constant_declaration go to state 705
+ ')' shift, and go to state 761
state 690
- 115 interface_list: interface_list ',' fully_qualified_class_name .
+ 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 function_call_parameter_list . ')'
- $default reduce using rule 115 (interface_list)
+ ')' shift, and go to state 762
state 691
- 207 class_constant_declaration: T_CONST . T_STRING '=' static_scalar
-
- T_STRING shift, and go to state 746
+ 313 expr_without_variable: expr '?' @49 expr ':' @50 . expr
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 763
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 692
- 196 member_modifier: T_PUBLIC .
+ 257 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference @43 . ctor_arguments
- $default reduce using rule 196 (member_modifier)
+ '(' shift, and go to state 443
+
+ $default reduce using rule 381 (ctor_arguments)
+
+ ctor_arguments go to state 764
state 693
- 197 member_modifier: T_PROTECTED .
+ 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 function_call_parameter_list . ')'
- $default reduce using rule 197 (member_modifier)
+ ')' shift, and go to state 765
state 694
- 198 member_modifier: T_PRIVATE .
+ 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 function_call_parameter_list . ')'
- $default reduce using rule 198 (member_modifier)
+ ')' shift, and go to state 766
state 695
- 201 member_modifier: T_FINAL .
+ 439 method: '(' . @68 function_call_parameter_list ')'
+
+ $default reduce using rule 438 (@68)
- $default reduce using rule 201 (member_modifier)
+ @68 go to state 767
state 696
- 200 member_modifier: T_ABSTRACT .
+ 436 array_method_dereference: array_method_dereference . '[' dim_offset ']'
+ 441 method_or_not: array_method_dereference .
- $default reduce using rule 200 (member_modifier)
+ '[' shift, and go to state 768
+
+ $default reduce using rule 441 (method_or_not)
state 697
- 199 member_modifier: T_STATIC .
+ 437 array_method_dereference: method . '[' dim_offset ']'
+ 440 method_or_not: method .
+
+ '[' shift, and go to state 769
- $default reduce using rule 199 (member_modifier)
+ $default reduce using rule 440 (method_or_not)
state 698
- 191 variable_modifiers: T_VAR .
+ 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 object_property @66 method_or_not . variable_properties
+
+ $default reduce using rule 433 (variable_properties)
- $default reduce using rule 191 (variable_modifiers)
+ variable_properties go to state 770
state 699
- 103 unticked_class_declaration_statement: interface_entry T_STRING $@31 interface_extends_list '{' class_statement_list '}' .
+ 467 object_dim_list: object_dim_list '[' dim_offset . ']'
- $default reduce using rule 103 (unticked_class_declaration_statement)
+ ']' shift, and go to state 771
state 700
- 181 class_statement_list: class_statement_list class_statement .
-
- $default reduce using rule 181 (class_statement_list)
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+ 468 object_dim_list: object_dim_list '{' expr . '}'
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ '}' shift, and go to state 772
state 701
- 184 class_statement: variable_modifiers . $@36 class_variable_declaration ';'
-
- $default reduce using rule 183 ($@36)
+ 486 non_empty_array_pair_list: non_empty_array_pair_list ',' expr "=> (T_DOUBLE_ARROW)" '&' w_variable .
- $@36 go to state 747
+ $default reduce using rule 486 (non_empty_array_pair_list)
state 702
- 187 class_statement: method_modifiers . function is_reference T_STRING $@37 '(' parameter_list ')' method_body
+ 370 dynamic_class_name_reference: base_variable "-> (T_OBJECT_OPERATOR)" @63 object_property @64 dynamic_class_name_variable_properties .
+ 372 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties . dynamic_class_name_variable_property
- T_FUNCTION shift, and go to state 46
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 773
- function go to state 748
+ $default reduce using rule 370 (dynamic_class_name_reference)
+ dynamic_class_name_variable_property go to state 774
-state 703
- 190 variable_modifiers: non_empty_member_modifiers .
- 193 method_modifiers: non_empty_member_modifiers .
- 195 non_empty_member_modifiers: non_empty_member_modifiers . member_modifier
+state 703
- T_PUBLIC shift, and go to state 692
- T_PROTECTED shift, and go to state 693
- T_PRIVATE shift, and go to state 694
- T_FINAL shift, and go to state 695
- T_ABSTRACT shift, and go to state 696
- T_STATIC shift, and go to state 697
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list . @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';'
- T_FUNCTION reduce using rule 193 (method_modifiers)
- $default reduce using rule 190 (variable_modifiers)
+ "elseif (T_ELSEIF)" reduce using rule 40 (@8)
+ "else (T_ELSE)" reduce using rule 40 (@8)
+ "endif (T_ENDIF)" reduce using rule 40 (@8)
+ $default reduce using rule 26 (@4)
- member_modifier go to state 749
+ @4 go to state 366
+ @8 go to state 775
state 704
- 194 non_empty_member_modifiers: member_modifier .
+ 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 statement @6 . elseif_list else_single
- $default reduce using rule 194 (non_empty_member_modifiers)
+ $default reduce using rule 142 (elseif_list)
+ elseif_list go to state 776
-state 705
- 185 class_statement: class_constant_declaration . ';'
- 206 class_constant_declaration: class_constant_declaration . ',' T_STRING '=' static_scalar
+state 705
- ',' shift, and go to state 750
- ';' shift, and go to state 751
+ 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' @12 expr . ')' ';'
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ')' shift, and go to state 777
state 706
- 99 unticked_function_declaration_statement: function is_reference T_STRING $@29 '(' parameter_list ')' . '{' inner_statement_list '}'
+ 141 while_statement: ':' . inner_statement_list "endwhile (T_ENDWHILE)" ';'
+
+ $default reduce using rule 28 (inner_statement_list)
- '{' shift, and go to state 752
+ inner_statement_list go to state 778
state 707
- 297 lexical_vars: T_USE . '(' lexical_var_list ')'
+ 140 while_statement: statement .
- '(' shift, and go to state 753
+ $default reduce using rule 140 (while_statement)
state 708
- 294 expr_without_variable: function is_reference '(' @50 parameter_list ')' lexical_vars . '{' inner_statement_list '}'
+ 44 unticked_statement: "while (T_WHILE)" '(' @9 expr ')' @10 while_statement .
- '{' shift, and go to state 754
+ $default reduce using rule 44 (unticked_statement)
state 709
- 157 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type . T_VARIABLE
- 158 | non_empty_parameter_list ',' optional_class_type . '&' T_VARIABLE
- 159 | non_empty_parameter_list ',' optional_class_type . '&' T_VARIABLE '=' static_scalar
- 160 | non_empty_parameter_list ',' optional_class_type . T_VARIABLE '=' static_scalar
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' . @14 for_expr ')' @15 for_statement
- '&' shift, and go to state 755
- T_VARIABLE shift, and go to state 756
+ $default reduce using rule 49 (@14)
+ @14 go to state 779
-state 710
-
- 154 non_empty_parameter_list: optional_class_type '&' T_VARIABLE .
- 155 | optional_class_type '&' T_VARIABLE . '=' static_scalar
- '=' shift, and go to state 757
+state 710
- $default reduce using rule 154 (non_empty_parameter_list)
+ 118 foreach_optional_arg: "=> (T_DOUBLE_ARROW)" . foreach_variable
+
+ '&' shift, and go to state 639
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "static (T_STATIC)" shift, and go to state 138
+ "namespace (T_NAMESPACE)" shift, and go to state 139
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 140
+ '$' shift, and go to state 80
+
+ namespace_name go to state 141
+ foreach_variable go to state 780
+ function_call go to state 97
+ class_name go to state 142
+ variable go to state 641
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 145
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
state 711
- 156 non_empty_parameter_list: optional_class_type T_VARIABLE '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 758
- static_class_constant go to state 442
+ 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg . ')' @20 foreach_statement
+
+ ')' shift, and go to state 781
state 712
- 309 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@54 function_call_parameter_list ')' .
+ 120 foreach_variable: '&' variable .
- $default reduce using rule 309 (function_call)
+ $default reduce using rule 120 (foreach_variable)
state 713
- 311 function_call: class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@55 function_call_parameter_list ')' .
+ 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg . ')' @18 foreach_statement
- $default reduce using rule 311 (function_call)
+ ')' shift, and go to state 782
state 714
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 275 | expr '?' $@46 expr ':' $@47 expr .
- 277 | expr . '?' ':' $@48 expr
-
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
-
- $default reduce using rule 275 (expr_without_variable)
+ 128 declare_list: declare_list ',' "identifier (T_STRING)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 783
+ static_class_constant go to state 471
state 715
- 220 expr_without_variable: variable '=' '&' T_NEW class_name_reference $@40 ctor_arguments .
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 126 declare_statement: ':' inner_statement_list . "enddeclare (T_ENDDECLARE)" ';'
+
+ "enddeclare (T_ENDDECLARE)" shift, and go to state 784
+
+ $default reduce using rule 26 (@4)
- $default reduce using rule 220 (expr_without_variable)
+ @4 go to state 366
state 716
- 313 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' $@56 function_call_parameter_list ')' .
+ 132 switch_case_list: ':' ';' . case_list "endswitch (T_ENDSWITCH)" ';'
- $default reduce using rule 313 (function_call)
+ $default reduce using rule 133 (case_list)
+
+ case_list go to state 785
state 717
- 315 function_call: variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' $@57 function_call_parameter_list ')' .
+ 131 switch_case_list: ':' case_list . "endswitch (T_ENDSWITCH)" ';'
+ 135 case_list: case_list . "case (T_CASE)" expr case_separator @32 inner_statement_list
+ 137 | case_list . "default (T_DEFAULT)" case_separator @33 inner_statement_list
- $default reduce using rule 315 (function_call)
+ "endswitch (T_ENDSWITCH)" shift, and go to state 786
+ "case (T_CASE)" shift, and go to state 787
+ "default (T_DEFAULT)" shift, and go to state 788
state 718
- 393 method_or_not: '(' $@64 . function_call_parameter_list ')'
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '&' shift, and go to state 482
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 165 (function_call_parameter_list)
-
- namespace_name go to state 80
- function_call_parameter_list go to state 759
- non_empty_function_call_parameter_list go to state 484
- expr_without_variable go to state 485
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 172
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 486
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 130 switch_case_list: '{' ';' . case_list '}'
+ $default reduce using rule 133 (case_list)
-state 719
+ case_list go to state 789
- 386 variable: base_variable_with_function_calls T_OBJECT_OPERATOR $@61 object_property $@62 method_or_not variable_properties .
- 388 variable_properties: variable_properties . variable_property
- T_OBJECT_OPERATOR shift, and go to state 760
+state 719
- $default reduce using rule 386 (variable)
+ 129 switch_case_list: '{' case_list . '}'
+ 135 case_list: case_list . "case (T_CASE)" expr case_separator @32 inner_statement_list
+ 137 | case_list . "default (T_DEFAULT)" case_separator @33 inner_statement_list
- variable_property go to state 761
+ "case (T_CASE)" shift, and go to state 787
+ "default (T_DEFAULT)" shift, and go to state 788
+ '}' shift, and go to state 790
state 720
- 415 object_dim_list: object_dim_list '[' dim_offset ']' .
+ 421 non_empty_static_array_pair_list: static_scalar "=> (T_DOUBLE_ARROW)" static_scalar .
- $default reduce using rule 415 (object_dim_list)
+ $default reduce using rule 421 (non_empty_static_array_pair_list)
state 721
- 416 object_dim_list: object_dim_list '{' expr '}' .
+ 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar . "=> (T_DOUBLE_ARROW)" static_scalar
+ 420 | non_empty_static_array_pair_list ',' static_scalar .
- $default reduce using rule 416 (object_dim_list)
+ "=> (T_DOUBLE_ARROW)" shift, and go to state 791
+ $default reduce using rule 420 (non_empty_static_array_pair_list)
-state 722
- 333 dynamic_class_name_variable_property: T_OBJECT_OPERATOR . object_property
+state 722
- T_STRING shift, and go to state 511
- T_VARIABLE shift, and go to state 33
- '{' shift, and go to state 512
- '$' shift, and go to state 77
+ 401 static_scalar: "array (T_ARRAY)" '(' static_array_pair_list ')' .
- variable_without_objects go to state 513
- reference_variable go to state 361
- compound_variable go to state 107
- object_property go to state 762
- object_dim_list go to state 515
- variable_name go to state 516
- simple_indirect_reference go to state 362
+ $default reduce using rule 401 (static_scalar)
state 723
- 331 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties dynamic_class_name_variable_property .
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' . @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
- $default reduce using rule 331 (dynamic_class_name_variable_properties)
+ $default reduce using rule 77 (@23)
+ @23 go to state 792
-state 724
- 41 unticked_statement: T_IF '(' expr ')' ':' $@7 inner_statement_list $@8 . new_elseif_list new_else_single T_ENDIF ';'
+state 724
- $default reduce using rule 144 (new_elseif_list)
+ 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' . lexical_vars '{' inner_statement_list '}'
- new_elseif_list go to state 763
+ "use (T_USE)" shift, and go to state 756
+ $default reduce using rule 337 (lexical_vars)
-state 725
+ lexical_vars go to state 793
- 38 unticked_statement: T_IF '(' expr ')' $@5 statement $@6 elseif_list . else_single
- 143 elseif_list: elseif_list . T_ELSEIF '(' expr ')' $@34 statement
- T_ELSEIF shift, and go to state 764
- T_ELSE shift, and go to state 765
+state 725
- T_ELSEIF [reduce using rule 147 (else_single)]
- T_ELSE [reduce using rule 147 (else_single)]
- $default reduce using rule 147 (else_single)
+ 474 assignment_list: assignment_list . ',' assignment_list_element
+ 478 assignment_list_element: "list (T_LIST)" '(' @71 assignment_list . ')'
- else_single go to state 766
+ ',' shift, and go to state 582
+ ')' shift, and go to state 794
state 726
- 47 unticked_statement: T_DO $@11 statement T_WHILE '(' $@12 expr ')' . ';'
+ 253 expr_without_variable: "list (T_LIST)" '(' @42 assignment_list ')' '=' expr .
+ 275 | expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
- ';' shift, and go to state 767
+ $default reduce using rule 253 (expr_without_variable)
state 727
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 140 while_statement: ':' inner_statement_list . T_ENDWHILE ';'
-
- T_ENDWHILE shift, and go to state 768
-
- $default reduce using rule 26 ($@4)
+ 499 encaps_var: "${ (T_DOLLAR_OPEN_CURLY_BRACES)" "variable name (T_STRING_VARNAME)" '[' expr ']' '}' .
- $@4 go to state 347
+ $default reduce using rule 499 (encaps_var)
state 728
- 51 unticked_statement: T_FOR '(' for_expr ';' $@13 for_expr ';' $@14 . for_expr ')' $@15 for_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- $default reduce using rule 210 (for_expr)
-
- namespace_name go to state 80
- for_expr go to state 769
- non_empty_for_expr go to state 292
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 293
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 346 function_call: "namespace (T_NAMESPACE)" "\\ (T_NS_SEPARATOR)" namespace_name '(' @56 function_call_parameter_list ')' .
+
+ $default reduce using rule 346 (function_call)
state 729
- 117 foreach_optional_arg: T_DOUBLE_ARROW foreach_variable .
+ 242 chaining_dereference: '[' dim_offset . ']'
- $default reduce using rule 117 (foreach_optional_arg)
+ ']' shift, and go to state 795
state 730
- 72 unticked_statement: T_FOREACH '(' expr_without_variable T_AS $@19 variable foreach_optional_arg ')' . $@20 foreach_statement
+ 435 variable_property: "-> (T_OBJECT_OPERATOR)" object_property . @67 method_or_not
- $default reduce using rule 71 ($@20)
+ $default reduce using rule 434 (@67)
- $@20 go to state 770
+ @67 go to state 796
state 731
- 69 unticked_statement: T_FOREACH '(' variable T_AS $@17 foreach_variable foreach_optional_arg ')' . $@18 foreach_statement
-
- $default reduce using rule 68 ($@18)
+ 239 chaining_method_or_property: chaining_method_or_property variable_property .
- $@18 go to state 771
+ $default reduce using rule 239 (chaining_method_or_property)
state 732
- 127 declare_list: declare_list ',' T_STRING '=' static_scalar .
-
- $default reduce using rule 127 (declare_list)
+ 241 chaining_dereference: chaining_dereference '[' . dim_offset ']'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 462 (dim_offset)
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 429
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ dim_offset go to state 797
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 733
- 125 declare_statement: ':' inner_statement_list T_ENDDECLARE . ';'
+ 244 chaining_instance_call: chaining_dereference @39 . chaining_method_or_property
+
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 670
- ';' shift, and go to state 772
+ chaining_method_or_property go to state 798
+ variable_property go to state 674
state 734
- 131 switch_case_list: ':' ';' case_list . T_ENDSWITCH ';'
- 134 case_list: case_list . T_CASE expr case_separator $@32 inner_statement_list
- 136 | case_list . T_DEFAULT case_separator $@33 inner_statement_list
+ 32 inner_statement: "__halt_compiler (T_HALT_COMPILER)" '(' ')' ';' .
- T_ENDSWITCH shift, and go to state 773
- T_CASE shift, and go to state 736
- T_DEFAULT shift, and go to state 737
+ $default reduce using rule 32 (inner_statement)
state 735
- 130 switch_case_list: ':' case_list T_ENDSWITCH . ';'
+ 173 non_empty_function_call_parameter_list: non_empty_function_call_parameter_list ',' '&' w_variable .
- ';' shift, and go to state 774
+ $default reduce using rule 173 (non_empty_function_call_parameter_list)
state 736
- 134 case_list: case_list T_CASE . expr case_separator $@32 inner_statement_list
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 775
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 implements_list '{' class_statement_list . '}'
+ 183 class_statement_list: class_statement_list . class_statement
+ "const (T_CONST)" shift, and go to state 738
+ "use (T_USE)" shift, and go to state 739
+ "public (T_PUBLIC)" shift, and go to state 740
+ "protected (T_PROTECTED)" shift, and go to state 741
+ "private (T_PRIVATE)" shift, and go to state 742
+ "final (T_FINAL)" shift, and go to state 743
+ "abstract (T_ABSTRACT)" shift, and go to state 744
+ "static (T_STATIC)" shift, and go to state 745
+ "var (T_VAR)" shift, and go to state 746
+ '}' shift, and go to state 799
-state 737
+ $default reduce using rule 216 (method_modifiers)
+
+ class_statement go to state 748
+ trait_use_statement go to state 749
+ variable_modifiers go to state 750
+ method_modifiers go to state 751
+ non_empty_member_modifiers go to state 752
+ member_modifier go to state 753
+ class_constant_declaration go to state 754
- 136 case_list: case_list T_DEFAULT . case_separator $@33 inner_statement_list
- ':' shift, and go to state 776
- ';' shift, and go to state 777
+state 737
+
+ 116 interface_list: interface_list ',' fully_qualified_class_name .
- case_separator go to state 778
+ $default reduce using rule 116 (interface_list)
state 738
- 129 switch_case_list: '{' ';' case_list . '}'
- 134 case_list: case_list . T_CASE expr case_separator $@32 inner_statement_list
- 136 | case_list . T_DEFAULT case_separator $@33 inner_statement_list
+ 231 class_constant_declaration: "const (T_CONST)" . "identifier (T_STRING)" '=' static_scalar
- T_CASE shift, and go to state 736
- T_DEFAULT shift, and go to state 737
- '}' shift, and go to state 779
+ "identifier (T_STRING)" shift, and go to state 800
state 739
- 128 switch_case_list: '{' case_list '}' .
+ 191 trait_use_statement: "use (T_USE)" . trait_list trait_adaptations
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
- $default reduce using rule 128 (switch_case_list)
+ namespace_name go to state 516
+ trait_list go to state 801
+ fully_qualified_class_name go to state 802
state 740
- 377 non_empty_static_array_pair_list: static_scalar T_DOUBLE_ARROW static_scalar .
+ 220 member_modifier: "public (T_PUBLIC)" .
- $default reduce using rule 377 (non_empty_static_array_pair_list)
+ $default reduce using rule 220 (member_modifier)
state 741
- 375 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar . T_DOUBLE_ARROW static_scalar
- 376 | non_empty_static_array_pair_list ',' static_scalar .
+ 221 member_modifier: "protected (T_PROTECTED)" .
- T_DOUBLE_ARROW shift, and go to state 780
-
- $default reduce using rule 376 (non_empty_static_array_pair_list)
+ $default reduce using rule 221 (member_modifier)
state 742
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 . fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
-
- T_STRING shift, and go to state 111
- T_NAMESPACE shift, and go to state 488
- T_NS_SEPARATOR shift, and go to state 489
+ 222 member_modifier: "private (T_PRIVATE)" .
- namespace_name go to state 490
- fully_qualified_class_name go to state 781
+ $default reduce using rule 222 (member_modifier)
state 743
- 426 assignment_list_element: T_LIST '(' $@66 assignment_list ')' .
+ 225 member_modifier: "final (T_FINAL)" .
- $default reduce using rule 426 (assignment_list_element)
+ $default reduce using rule 225 (member_modifier)
state 744
- 434 non_empty_array_pair_list: non_empty_array_pair_list ',' expr T_DOUBLE_ARROW '&' w_variable .
+ 224 member_modifier: "abstract (T_ABSTRACT)" .
- $default reduce using rule 434 (non_empty_array_pair_list)
+ $default reduce using rule 224 (member_modifier)
state 745
- 101 unticked_class_declaration_statement: class_entry_type T_STRING extends_from $@30 implements_list '{' class_statement_list '}' .
+ 223 member_modifier: "static (T_STATIC)" .
- $default reduce using rule 101 (unticked_class_declaration_statement)
+ $default reduce using rule 223 (member_modifier)
state 746
- 207 class_constant_declaration: T_CONST T_STRING . '=' static_scalar
+ 215 variable_modifiers: "var (T_VAR)" .
- '=' shift, and go to state 782
+ $default reduce using rule 215 (variable_modifiers)
state 747
- 184 class_statement: variable_modifiers $@36 . class_variable_declaration ';'
+ 103 unticked_class_declaration_statement: interface_entry "identifier (T_STRING)" @31 interface_extends_list '{' class_statement_list '}' .
- T_VARIABLE shift, and go to state 783
-
- class_variable_declaration go to state 784
+ $default reduce using rule 103 (unticked_class_declaration_statement)
state 748
- 187 class_statement: method_modifiers function . is_reference T_STRING $@37 '(' parameter_list ')' method_body
+ 183 class_statement_list: class_statement_list class_statement .
- '&' shift, and go to state 219
-
- $default reduce using rule 96 (is_reference)
-
- is_reference go to state 785
+ $default reduce using rule 183 (class_statement_list)
state 749
- 195 non_empty_member_modifiers: non_empty_member_modifiers member_modifier .
+ 188 class_statement: trait_use_statement .
- $default reduce using rule 195 (non_empty_member_modifiers)
+ $default reduce using rule 188 (class_statement)
state 750
- 206 class_constant_declaration: class_constant_declaration ',' . T_STRING '=' static_scalar
+ 186 class_statement: variable_modifiers . @36 class_variable_declaration ';'
+
+ $default reduce using rule 185 (@36)
- T_STRING shift, and go to state 786
+ @36 go to state 803
state 751
- 185 class_statement: class_constant_declaration ';' .
+ 190 class_statement: method_modifiers . function is_reference "identifier (T_STRING)" @37 '(' parameter_list ')' method_body
- $default reduce using rule 185 (class_statement)
+ "function (T_FUNCTION)" shift, and go to state 47
+
+ function go to state 804
state 752
- 99 unticked_function_declaration_statement: function is_reference T_STRING $@29 '(' parameter_list ')' '{' . inner_statement_list '}'
+ 214 variable_modifiers: non_empty_member_modifiers .
+ 217 method_modifiers: non_empty_member_modifiers .
+ 219 non_empty_member_modifiers: non_empty_member_modifiers . member_modifier
- $default reduce using rule 28 (inner_statement_list)
+ "public (T_PUBLIC)" shift, and go to state 740
+ "protected (T_PROTECTED)" shift, and go to state 741
+ "private (T_PRIVATE)" shift, and go to state 742
+ "final (T_FINAL)" shift, and go to state 743
+ "abstract (T_ABSTRACT)" shift, and go to state 744
+ "static (T_STATIC)" shift, and go to state 745
- inner_statement_list go to state 787
+ "function (T_FUNCTION)" reduce using rule 217 (method_modifiers)
+ $default reduce using rule 214 (variable_modifiers)
+ member_modifier go to state 805
-state 753
- 297 lexical_vars: T_USE '(' . lexical_var_list ')'
+state 753
- '&' shift, and go to state 788
- T_VARIABLE shift, and go to state 789
+ 218 non_empty_member_modifiers: member_modifier .
- lexical_var_list go to state 790
+ $default reduce using rule 218 (non_empty_member_modifiers)
state 754
- 294 expr_without_variable: function is_reference '(' @50 parameter_list ')' lexical_vars '{' . inner_statement_list '}'
-
- $default reduce using rule 28 (inner_statement_list)
+ 187 class_statement: class_constant_declaration . ';'
+ 230 class_constant_declaration: class_constant_declaration . ',' "identifier (T_STRING)" '=' static_scalar
- inner_statement_list go to state 791
+ ',' shift, and go to state 806
+ ';' shift, and go to state 807
state 755
- 158 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' . T_VARIABLE
- 159 | non_empty_parameter_list ',' optional_class_type '&' . T_VARIABLE '=' static_scalar
+ 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' . '{' inner_statement_list '}'
- T_VARIABLE shift, and go to state 792
+ '{' shift, and go to state 808
state 756
- 157 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type T_VARIABLE .
- 160 | non_empty_parameter_list ',' optional_class_type T_VARIABLE . '=' static_scalar
-
- '=' shift, and go to state 793
+ 338 lexical_vars: "use (T_USE)" . '(' lexical_var_list ')'
- $default reduce using rule 157 (non_empty_parameter_list)
+ '(' shift, and go to state 809
state 757
- 155 non_empty_parameter_list: optional_class_type '&' T_VARIABLE '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 794
- static_class_constant go to state 442
+ 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' lexical_vars . '{' inner_statement_list '}'
+
+ '{' shift, and go to state 810
state 758
- 156 non_empty_parameter_list: optional_class_type T_VARIABLE '=' static_scalar .
+ 158 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type . "variable (T_VARIABLE)"
+ 159 | non_empty_parameter_list ',' optional_class_type . '&' "variable (T_VARIABLE)"
+ 160 | non_empty_parameter_list ',' optional_class_type . '&' "variable (T_VARIABLE)" '=' static_scalar
+ 161 | non_empty_parameter_list ',' optional_class_type . "variable (T_VARIABLE)" '=' static_scalar
- $default reduce using rule 156 (non_empty_parameter_list)
+ '&' shift, and go to state 811
+ "variable (T_VARIABLE)" shift, and go to state 812
state 759
- 393 method_or_not: '(' $@64 function_call_parameter_list . ')'
-
- ')' shift, and go to state 795
+ 155 non_empty_parameter_list: optional_class_type '&' "variable (T_VARIABLE)" .
+ 156 | optional_class_type '&' "variable (T_VARIABLE)" . '=' static_scalar
+ '=' shift, and go to state 813
-state 760
+ $default reduce using rule 155 (non_empty_parameter_list)
- 391 variable_property: T_OBJECT_OPERATOR . object_property $@63 method_or_not
- T_STRING shift, and go to state 511
- T_VARIABLE shift, and go to state 33
- '{' shift, and go to state 512
- '$' shift, and go to state 77
+state 760
- variable_without_objects go to state 513
- reference_variable go to state 361
- compound_variable go to state 107
- object_property go to state 796
- object_dim_list go to state 515
- variable_name go to state 516
- simple_indirect_reference go to state 362
+ 157 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 814
+ static_class_constant go to state 471
state 761
- 388 variable_properties: variable_properties variable_property .
+ 352 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @59 function_call_parameter_list ')' .
- $default reduce using rule 388 (variable_properties)
+ $default reduce using rule 352 (function_call)
state 762
- 333 dynamic_class_name_variable_property: T_OBJECT_OPERATOR object_property .
+ 350 function_call: class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @58 function_call_parameter_list ')' .
- $default reduce using rule 333 (dynamic_class_name_variable_property)
+ $default reduce using rule 350 (function_call)
state 763
- 41 unticked_statement: T_IF '(' expr ')' ':' $@7 inner_statement_list $@8 new_elseif_list . new_else_single T_ENDIF ';'
- 146 new_elseif_list: new_elseif_list . T_ELSEIF '(' expr ')' ':' $@35 inner_statement_list
-
- T_ELSEIF shift, and go to state 797
- T_ELSE shift, and go to state 798
-
- $default reduce using rule 149 (new_else_single)
-
- new_else_single go to state 799
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 313 | expr '?' @49 expr ':' @50 expr .
+ 315 | expr . '?' ':' @51 expr
+
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+
+ $default reduce using rule 313 (expr_without_variable)
state 764
- 143 elseif_list: elseif_list T_ELSEIF . '(' expr ')' $@34 statement
+ 257 expr_without_variable: variable '=' '&' "new (T_NEW)" class_name_reference @43 ctor_arguments .
- '(' shift, and go to state 800
+ $default reduce using rule 257 (expr_without_variable)
state 765
- 148 else_single: T_ELSE . statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_IF shift, and go to state 28
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_INLINE_HTML shift, and go to state 34
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ECHO shift, and go to state 36
- T_DO shift, and go to state 37
- T_WHILE shift, and go to state 38
- T_FOR shift, and go to state 39
- T_FOREACH shift, and go to state 40
- T_DECLARE shift, and go to state 41
- T_SWITCH shift, and go to state 42
- T_BREAK shift, and go to state 43
- T_CONTINUE shift, and go to state 44
- T_GOTO shift, and go to state 45
- T_FUNCTION shift, and go to state 46
- T_RETURN shift, and go to state 48
- T_TRY shift, and go to state 49
- T_THROW shift, and go to state 50
- T_GLOBAL shift, and go to state 52
- T_STATIC shift, and go to state 55
- T_UNSET shift, and go to state 56
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 75
- '{' shift, and go to state 76
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- statement go to state 801
- unticked_statement go to state 84
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 97
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 356 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_without_objects '(' @61 function_call_parameter_list ')' .
+
+ $default reduce using rule 356 (function_call)
state 766
- 38 unticked_statement: T_IF '(' expr ')' $@5 statement $@6 elseif_list else_single .
+ 354 function_call: variable_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" variable_name '(' @60 function_call_parameter_list ')' .
- $default reduce using rule 38 (unticked_statement)
+ $default reduce using rule 354 (function_call)
state 767
- 47 unticked_statement: T_DO $@11 statement T_WHILE '(' $@12 expr ')' ';' .
-
- $default reduce using rule 47 (unticked_statement)
+ 439 method: '(' @68 . function_call_parameter_list ')'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '&' shift, and go to state 508
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 167 (function_call_parameter_list)
+
+ namespace_name go to state 83
+ function_call_parameter_list go to state 815
+ non_empty_function_call_parameter_list go to state 510
+ new_expr go to state 94
+ expr_without_variable go to state 511
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 182
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 512
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 768
- 140 while_statement: ':' inner_statement_list T_ENDWHILE . ';'
-
- ';' shift, and go to state 802
+ 436 array_method_dereference: array_method_dereference '[' . dim_offset ']'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 462 (dim_offset)
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 429
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ dim_offset go to state 816
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 769
- 51 unticked_statement: T_FOR '(' for_expr ';' $@13 for_expr ';' $@14 for_expr . ')' $@15 for_statement
-
- ')' shift, and go to state 803
+ 437 array_method_dereference: method '[' . dim_offset ']'
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 462 (dim_offset)
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 429
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ dim_offset go to state 817
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 770
- 72 unticked_statement: T_FOREACH '(' expr_without_variable T_AS $@19 variable foreach_optional_arg ')' $@20 . foreach_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- ':' shift, and go to state 804
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_IF shift, and go to state 28
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_INLINE_HTML shift, and go to state 34
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ECHO shift, and go to state 36
- T_DO shift, and go to state 37
- T_WHILE shift, and go to state 38
- T_FOR shift, and go to state 39
- T_FOREACH shift, and go to state 40
- T_DECLARE shift, and go to state 41
- T_SWITCH shift, and go to state 42
- T_BREAK shift, and go to state 43
- T_CONTINUE shift, and go to state 44
- T_GOTO shift, and go to state 45
- T_FUNCTION shift, and go to state 46
- T_RETURN shift, and go to state 48
- T_TRY shift, and go to state 49
- T_THROW shift, and go to state 50
- T_GLOBAL shift, and go to state 52
- T_STATIC shift, and go to state 55
- T_UNSET shift, and go to state 56
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 75
- '{' shift, and go to state 76
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- statement go to state 805
- unticked_statement go to state 84
- foreach_statement go to state 806
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 97
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 430 variable: base_variable_with_function_calls "-> (T_OBJECT_OPERATOR)" @65 object_property @66 method_or_not variable_properties .
+ 432 variable_properties: variable_properties . variable_property
+
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 670
+
+ $default reduce using rule 430 (variable)
+
+ variable_property go to state 818
state 771
- 69 unticked_statement: T_FOREACH '(' variable T_AS $@17 foreach_variable foreach_optional_arg ')' $@18 . foreach_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- ':' shift, and go to state 804
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_IF shift, and go to state 28
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_INLINE_HTML shift, and go to state 34
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ECHO shift, and go to state 36
- T_DO shift, and go to state 37
- T_WHILE shift, and go to state 38
- T_FOR shift, and go to state 39
- T_FOREACH shift, and go to state 40
- T_DECLARE shift, and go to state 41
- T_SWITCH shift, and go to state 42
- T_BREAK shift, and go to state 43
- T_CONTINUE shift, and go to state 44
- T_GOTO shift, and go to state 45
- T_FUNCTION shift, and go to state 46
- T_RETURN shift, and go to state 48
- T_TRY shift, and go to state 49
- T_THROW shift, and go to state 50
- T_GLOBAL shift, and go to state 52
- T_STATIC shift, and go to state 55
- T_UNSET shift, and go to state 56
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 75
- '{' shift, and go to state 76
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- statement go to state 805
- unticked_statement go to state 84
- foreach_statement go to state 807
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 97
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 467 object_dim_list: object_dim_list '[' dim_offset ']' .
+
+ $default reduce using rule 467 (object_dim_list)
state 772
- 125 declare_statement: ':' inner_statement_list T_ENDDECLARE ';' .
+ 468 object_dim_list: object_dim_list '{' expr '}' .
- $default reduce using rule 125 (declare_statement)
+ $default reduce using rule 468 (object_dim_list)
state 773
- 131 switch_case_list: ':' ';' case_list T_ENDSWITCH . ';'
+ 374 dynamic_class_name_variable_property: "-> (T_OBJECT_OPERATOR)" . object_property
- ';' shift, and go to state 808
+ "identifier (T_STRING)" shift, and go to state 436
+ "variable (T_VARIABLE)" shift, and go to state 34
+ '{' shift, and go to state 380
+ '$' shift, and go to state 80
+
+ variable_without_objects go to state 540
+ reference_variable go to state 382
+ compound_variable go to state 112
+ object_property go to state 819
+ object_dim_list go to state 542
+ variable_name go to state 543
+ simple_indirect_reference go to state 384
state 774
- 130 switch_case_list: ':' case_list T_ENDSWITCH ';' .
+ 372 dynamic_class_name_variable_properties: dynamic_class_name_variable_properties dynamic_class_name_variable_property .
- $default reduce using rule 130 (switch_case_list)
+ $default reduce using rule 372 (dynamic_class_name_variable_properties)
state 775
- 134 case_list: case_list T_CASE expr . case_separator $@32 inner_statement_list
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- ':' shift, and go to state 776
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ';' shift, and go to state 777
-
- case_separator go to state 809
+ 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 . new_elseif_list new_else_single "endif (T_ENDIF)" ';'
+
+ $default reduce using rule 145 (new_elseif_list)
+
+ new_elseif_list go to state 820
state 776
- 137 case_separator: ':' .
+ 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 statement @6 elseif_list . else_single
+ 144 elseif_list: elseif_list . "elseif (T_ELSEIF)" '(' expr ')' @34 statement
+
+ "elseif (T_ELSEIF)" shift, and go to state 821
+ "else (T_ELSE)" shift, and go to state 822
+
+ "elseif (T_ELSEIF)" [reduce using rule 148 (else_single)]
+ "else (T_ELSE)" [reduce using rule 148 (else_single)]
+ $default reduce using rule 148 (else_single)
- $default reduce using rule 137 (case_separator)
+ else_single go to state 823
state 777
- 138 case_separator: ';' .
+ 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' @12 expr ')' . ';'
- $default reduce using rule 138 (case_separator)
+ ';' shift, and go to state 824
state 778
- 136 case_list: case_list T_DEFAULT case_separator . $@33 inner_statement_list
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 141 while_statement: ':' inner_statement_list . "endwhile (T_ENDWHILE)" ';'
+
+ "endwhile (T_ENDWHILE)" shift, and go to state 825
- $default reduce using rule 135 ($@33)
+ $default reduce using rule 26 (@4)
- $@33 go to state 810
+ @4 go to state 366
state 779
- 129 switch_case_list: '{' ';' case_list '}' .
-
- $default reduce using rule 129 (switch_case_list)
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 . for_expr ')' @15 for_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ $default reduce using rule 234 (for_expr)
+
+ namespace_name go to state 83
+ for_expr go to state 826
+ non_empty_for_expr go to state 312
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 313
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 780
- 375 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 811
- static_class_constant go to state 442
+ 118 foreach_optional_arg: "=> (T_DOUBLE_ARROW)" foreach_variable .
+
+ $default reduce using rule 118 (foreach_optional_arg)
state 781
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name . $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
+ 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' . @20 foreach_statement
- $default reduce using rule 78 ($@24)
+ $default reduce using rule 71 (@20)
- $@24 go to state 812
+ @20 go to state 827
state 782
- 207 class_constant_declaration: T_CONST T_STRING '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 813
- static_class_constant go to state 442
+ 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' . @18 foreach_statement
+ $default reduce using rule 68 (@18)
-state 783
+ @18 go to state 828
- 204 class_variable_declaration: T_VARIABLE .
- 205 | T_VARIABLE . '=' static_scalar
- '=' shift, and go to state 814
+state 783
+
+ 128 declare_list: declare_list ',' "identifier (T_STRING)" '=' static_scalar .
- $default reduce using rule 204 (class_variable_declaration)
+ $default reduce using rule 128 (declare_list)
state 784
- 184 class_statement: variable_modifiers $@36 class_variable_declaration . ';'
- 202 class_variable_declaration: class_variable_declaration . ',' T_VARIABLE
- 203 | class_variable_declaration . ',' T_VARIABLE '=' static_scalar
+ 126 declare_statement: ':' inner_statement_list "enddeclare (T_ENDDECLARE)" . ';'
- ',' shift, and go to state 815
- ';' shift, and go to state 816
+ ';' shift, and go to state 829
state 785
- 187 class_statement: method_modifiers function is_reference . T_STRING $@37 '(' parameter_list ')' method_body
+ 132 switch_case_list: ':' ';' case_list . "endswitch (T_ENDSWITCH)" ';'
+ 135 case_list: case_list . "case (T_CASE)" expr case_separator @32 inner_statement_list
+ 137 | case_list . "default (T_DEFAULT)" case_separator @33 inner_statement_list
- T_STRING shift, and go to state 817
+ "endswitch (T_ENDSWITCH)" shift, and go to state 830
+ "case (T_CASE)" shift, and go to state 787
+ "default (T_DEFAULT)" shift, and go to state 788
state 786
- 206 class_constant_declaration: class_constant_declaration ',' T_STRING . '=' static_scalar
+ 131 switch_case_list: ':' case_list "endswitch (T_ENDSWITCH)" . ';'
- '=' shift, and go to state 818
+ ';' shift, and go to state 831
state 787
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 99 unticked_function_declaration_statement: function is_reference T_STRING $@29 '(' parameter_list ')' '{' inner_statement_list . '}'
-
- '}' shift, and go to state 819
-
- $default reduce using rule 26 ($@4)
-
- $@4 go to state 347
+ 135 case_list: case_list "case (T_CASE)" . expr case_separator @32 inner_statement_list
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 832
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 788
- 301 lexical_var_list: '&' . T_VARIABLE
+ 137 case_list: case_list "default (T_DEFAULT)" . case_separator @33 inner_statement_list
+
+ ':' shift, and go to state 833
+ ';' shift, and go to state 834
- T_VARIABLE shift, and go to state 820
+ case_separator go to state 835
state 789
- 300 lexical_var_list: T_VARIABLE .
+ 130 switch_case_list: '{' ';' case_list . '}'
+ 135 case_list: case_list . "case (T_CASE)" expr case_separator @32 inner_statement_list
+ 137 | case_list . "default (T_DEFAULT)" case_separator @33 inner_statement_list
- $default reduce using rule 300 (lexical_var_list)
+ "case (T_CASE)" shift, and go to state 787
+ "default (T_DEFAULT)" shift, and go to state 788
+ '}' shift, and go to state 836
state 790
- 297 lexical_vars: T_USE '(' lexical_var_list . ')'
- 298 lexical_var_list: lexical_var_list . ',' T_VARIABLE
- 299 | lexical_var_list . ',' '&' T_VARIABLE
+ 129 switch_case_list: '{' case_list '}' .
- ',' shift, and go to state 821
- ')' shift, and go to state 822
+ $default reduce using rule 129 (switch_case_list)
state 791
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 294 expr_without_variable: function is_reference '(' @50 parameter_list ')' lexical_vars '{' inner_statement_list . '}'
-
- '}' shift, and go to state 823
-
- $default reduce using rule 26 ($@4)
-
- $@4 go to state 347
+ 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar "=> (T_DOUBLE_ARROW)" . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 837
+ static_class_constant go to state 471
state 792
- 158 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE .
- 159 | non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE . '=' static_scalar
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 . fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
- '=' shift, and go to state 824
+ "identifier (T_STRING)" shift, and go to state 116
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
- $default reduce using rule 158 (non_empty_parameter_list)
+ namespace_name go to state 516
+ fully_qualified_class_name go to state 838
state 793
- 160 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type T_VARIABLE '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 825
- static_class_constant go to state 442
+ 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' lexical_vars . '{' inner_statement_list '}'
+
+ '{' shift, and go to state 839
state 794
- 155 non_empty_parameter_list: optional_class_type '&' T_VARIABLE '=' static_scalar .
+ 478 assignment_list_element: "list (T_LIST)" '(' @71 assignment_list ')' .
- $default reduce using rule 155 (non_empty_parameter_list)
+ $default reduce using rule 478 (assignment_list_element)
state 795
- 393 method_or_not: '(' $@64 function_call_parameter_list ')' .
+ 242 chaining_dereference: '[' dim_offset ']' .
- $default reduce using rule 393 (method_or_not)
+ $default reduce using rule 242 (chaining_dereference)
state 796
- 391 variable_property: T_OBJECT_OPERATOR object_property . $@63 method_or_not
+ 435 variable_property: "-> (T_OBJECT_OPERATOR)" object_property @67 . method_or_not
+
+ '(' shift, and go to state 695
- $default reduce using rule 390 ($@63)
+ $default reduce using rule 442 (method_or_not)
- $@63 go to state 826
+ array_method_dereference go to state 696
+ method go to state 697
+ method_or_not go to state 840
state 797
- 146 new_elseif_list: new_elseif_list T_ELSEIF . '(' expr ')' ':' $@35 inner_statement_list
+ 241 chaining_dereference: chaining_dereference '[' dim_offset . ']'
- '(' shift, and go to state 827
+ ']' shift, and go to state 841
state 798
- 150 new_else_single: T_ELSE . ':' inner_statement_list
+ 239 chaining_method_or_property: chaining_method_or_property . variable_property
+ 244 chaining_instance_call: chaining_dereference @39 chaining_method_or_property .
- ':' shift, and go to state 828
+ "-> (T_OBJECT_OPERATOR)" shift, and go to state 670
+
+ $default reduce using rule 244 (chaining_instance_call)
+
+ variable_property go to state 731
state 799
- 41 unticked_statement: T_IF '(' expr ')' ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single . T_ENDIF ';'
+ 101 unticked_class_declaration_statement: class_entry_type "identifier (T_STRING)" extends_from @30 implements_list '{' class_statement_list '}' .
- T_ENDIF shift, and go to state 829
+ $default reduce using rule 101 (unticked_class_declaration_statement)
state 800
- 143 elseif_list: elseif_list T_ELSEIF '(' . expr ')' $@34 statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 830
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 231 class_constant_declaration: "const (T_CONST)" "identifier (T_STRING)" . '=' static_scalar
+
+ '=' shift, and go to state 842
state 801
- 148 else_single: T_ELSE statement .
+ 191 trait_use_statement: "use (T_USE)" trait_list . trait_adaptations
+ 193 trait_list: trait_list . ',' fully_qualified_class_name
+
+ ',' shift, and go to state 843
+ ';' shift, and go to state 844
+ '{' shift, and go to state 845
- $default reduce using rule 148 (else_single)
+ trait_adaptations go to state 846
state 802
- 140 while_statement: ':' inner_statement_list T_ENDWHILE ';' .
+ 192 trait_list: fully_qualified_class_name .
- $default reduce using rule 140 (while_statement)
+ $default reduce using rule 192 (trait_list)
state 803
- 51 unticked_statement: T_FOR '(' for_expr ';' $@13 for_expr ';' $@14 for_expr ')' . $@15 for_statement
+ 186 class_statement: variable_modifiers @36 . class_variable_declaration ';'
- $default reduce using rule 50 ($@15)
+ "variable (T_VARIABLE)" shift, and go to state 847
- $@15 go to state 831
+ class_variable_declaration go to state 848
state 804
- 123 foreach_statement: ':' . inner_statement_list T_ENDFOREACH ';'
+ 190 class_statement: method_modifiers function . is_reference "identifier (T_STRING)" @37 '(' parameter_list ')' method_body
- $default reduce using rule 28 (inner_statement_list)
+ '&' shift, and go to state 231
+
+ $default reduce using rule 96 (is_reference)
- inner_statement_list go to state 832
+ is_reference go to state 849
state 805
- 122 foreach_statement: statement .
+ 219 non_empty_member_modifiers: non_empty_member_modifiers member_modifier .
- $default reduce using rule 122 (foreach_statement)
+ $default reduce using rule 219 (non_empty_member_modifiers)
state 806
- 72 unticked_statement: T_FOREACH '(' expr_without_variable T_AS $@19 variable foreach_optional_arg ')' $@20 foreach_statement .
+ 230 class_constant_declaration: class_constant_declaration ',' . "identifier (T_STRING)" '=' static_scalar
- $default reduce using rule 72 (unticked_statement)
+ "identifier (T_STRING)" shift, and go to state 850
state 807
- 69 unticked_statement: T_FOREACH '(' variable T_AS $@17 foreach_variable foreach_optional_arg ')' $@18 foreach_statement .
+ 187 class_statement: class_constant_declaration ';' .
- $default reduce using rule 69 (unticked_statement)
+ $default reduce using rule 187 (class_statement)
state 808
- 131 switch_case_list: ':' ';' case_list T_ENDSWITCH ';' .
+ 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' '{' . inner_statement_list '}'
- $default reduce using rule 131 (switch_case_list)
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 851
state 809
- 134 case_list: case_list T_CASE expr case_separator . $@32 inner_statement_list
+ 338 lexical_vars: "use (T_USE)" '(' . lexical_var_list ')'
- $default reduce using rule 133 ($@32)
+ '&' shift, and go to state 852
+ "variable (T_VARIABLE)" shift, and go to state 853
- $@32 go to state 833
+ lexical_var_list go to state 854
state 810
- 136 case_list: case_list T_DEFAULT case_separator $@33 . inner_statement_list
+ 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' lexical_vars '{' . inner_statement_list '}'
$default reduce using rule 28 (inner_statement_list)
- inner_statement_list go to state 834
+ inner_statement_list go to state 855
state 811
- 375 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar T_DOUBLE_ARROW static_scalar .
+ 159 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' . "variable (T_VARIABLE)"
+ 160 | non_empty_parameter_list ',' optional_class_type '&' . "variable (T_VARIABLE)" '=' static_scalar
- $default reduce using rule 375 (non_empty_static_array_pair_list)
+ "variable (T_VARIABLE)" shift, and go to state 856
state 812
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 . T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
+ 158 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" .
+ 161 | non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" . '=' static_scalar
- T_VARIABLE shift, and go to state 835
+ '=' shift, and go to state 857
+ $default reduce using rule 158 (non_empty_parameter_list)
-state 813
- 207 class_constant_declaration: T_CONST T_STRING '=' static_scalar .
+state 813
- $default reduce using rule 207 (class_constant_declaration)
+ 156 non_empty_parameter_list: optional_class_type '&' "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 858
+ static_class_constant go to state 471
state 814
- 205 class_variable_declaration: T_VARIABLE '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 836
- static_class_constant go to state 442
+ 157 non_empty_parameter_list: optional_class_type "variable (T_VARIABLE)" '=' static_scalar .
+
+ $default reduce using rule 157 (non_empty_parameter_list)
state 815
- 202 class_variable_declaration: class_variable_declaration ',' . T_VARIABLE
- 203 | class_variable_declaration ',' . T_VARIABLE '=' static_scalar
+ 439 method: '(' @68 function_call_parameter_list . ')'
- T_VARIABLE shift, and go to state 837
+ ')' shift, and go to state 859
state 816
- 184 class_statement: variable_modifiers $@36 class_variable_declaration ';' .
+ 436 array_method_dereference: array_method_dereference '[' dim_offset . ']'
- $default reduce using rule 184 (class_statement)
+ ']' shift, and go to state 860
state 817
- 187 class_statement: method_modifiers function is_reference T_STRING . $@37 '(' parameter_list ')' method_body
-
- $default reduce using rule 186 ($@37)
+ 437 array_method_dereference: method '[' dim_offset . ']'
- $@37 go to state 838
+ ']' shift, and go to state 861
state 818
- 206 class_constant_declaration: class_constant_declaration ',' T_STRING '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 839
- static_class_constant go to state 442
+ 432 variable_properties: variable_properties variable_property .
+
+ $default reduce using rule 432 (variable_properties)
state 819
- 99 unticked_function_declaration_statement: function is_reference T_STRING $@29 '(' parameter_list ')' '{' inner_statement_list '}' .
+ 374 dynamic_class_name_variable_property: "-> (T_OBJECT_OPERATOR)" object_property .
- $default reduce using rule 99 (unticked_function_declaration_statement)
+ $default reduce using rule 374 (dynamic_class_name_variable_property)
state 820
- 301 lexical_var_list: '&' T_VARIABLE .
+ 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list . new_else_single "endif (T_ENDIF)" ';'
+ 147 new_elseif_list: new_elseif_list . "elseif (T_ELSEIF)" '(' expr ')' ':' @35 inner_statement_list
+
+ "elseif (T_ELSEIF)" shift, and go to state 862
+ "else (T_ELSE)" shift, and go to state 863
- $default reduce using rule 301 (lexical_var_list)
+ $default reduce using rule 150 (new_else_single)
+
+ new_else_single go to state 864
state 821
- 298 lexical_var_list: lexical_var_list ',' . T_VARIABLE
- 299 | lexical_var_list ',' . '&' T_VARIABLE
+ 144 elseif_list: elseif_list "elseif (T_ELSEIF)" . '(' expr ')' @34 statement
- '&' shift, and go to state 840
- T_VARIABLE shift, and go to state 841
+ '(' shift, and go to state 865
state 822
- 297 lexical_vars: T_USE '(' lexical_var_list ')' .
-
- $default reduce using rule 297 (lexical_vars)
+ 149 else_single: "else (T_ELSE)" . statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "if (T_IF)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 32
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ T_INLINE_HTML shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "echo (T_ECHO)" shift, and go to state 37
+ "do (T_DO)" shift, and go to state 38
+ "while (T_WHILE)" shift, and go to state 39
+ "for (T_FOR)" shift, and go to state 40
+ "foreach (T_FOREACH)" shift, and go to state 41
+ "declare (T_DECLARE)" shift, and go to state 42
+ "switch (T_SWITCH)" shift, and go to state 43
+ "break (T_BREAK)" shift, and go to state 44
+ "continue (T_CONTINUE)" shift, and go to state 45
+ "goto (T_GOTO)" shift, and go to state 46
+ "function (T_FUNCTION)" shift, and go to state 47
+ "return (T_RETURN)" shift, and go to state 49
+ "try (T_TRY)" shift, and go to state 50
+ "throw (T_THROW)" shift, and go to state 51
+ "global (T_GLOBAL)" shift, and go to state 53
+ "static (T_STATIC)" shift, and go to state 56
+ "unset (T_UNSET)" shift, and go to state 57
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 78
+ '{' shift, and go to state 79
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ statement go to state 866
+ unticked_statement go to state 87
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 101
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 823
- 294 expr_without_variable: function is_reference '(' @50 parameter_list ')' lexical_vars '{' inner_statement_list '}' .
+ 38 unticked_statement: "if (T_IF)" '(' expr ')' @5 statement @6 elseif_list else_single .
- $default reduce using rule 294 (expr_without_variable)
+ $default reduce using rule 38 (unticked_statement)
state 824
- 159 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 842
- static_class_constant go to state 442
+ 47 unticked_statement: "do (T_DO)" @11 statement "while (T_WHILE)" '(' @12 expr ')' ';' .
+
+ $default reduce using rule 47 (unticked_statement)
state 825
- 160 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type T_VARIABLE '=' static_scalar .
+ 141 while_statement: ':' inner_statement_list "endwhile (T_ENDWHILE)" . ';'
- $default reduce using rule 160 (non_empty_parameter_list)
+ ';' shift, and go to state 867
state 826
- 391 variable_property: T_OBJECT_OPERATOR object_property $@63 . method_or_not
-
- '(' shift, and go to state 654
-
- $default reduce using rule 394 (method_or_not)
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 for_expr . ')' @15 for_statement
- method_or_not go to state 843
+ ')' shift, and go to state 868
state 827
- 146 new_elseif_list: new_elseif_list T_ELSEIF '(' . expr ')' ':' $@35 inner_statement_list
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_FUNCTION shift, and go to state 46
- T_STATIC shift, and go to state 112
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 844
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+ 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' @20 . foreach_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ ':' shift, and go to state 869
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "if (T_IF)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 32
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ T_INLINE_HTML shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "echo (T_ECHO)" shift, and go to state 37
+ "do (T_DO)" shift, and go to state 38
+ "while (T_WHILE)" shift, and go to state 39
+ "for (T_FOR)" shift, and go to state 40
+ "foreach (T_FOREACH)" shift, and go to state 41
+ "declare (T_DECLARE)" shift, and go to state 42
+ "switch (T_SWITCH)" shift, and go to state 43
+ "break (T_BREAK)" shift, and go to state 44
+ "continue (T_CONTINUE)" shift, and go to state 45
+ "goto (T_GOTO)" shift, and go to state 46
+ "function (T_FUNCTION)" shift, and go to state 47
+ "return (T_RETURN)" shift, and go to state 49
+ "try (T_TRY)" shift, and go to state 50
+ "throw (T_THROW)" shift, and go to state 51
+ "global (T_GLOBAL)" shift, and go to state 53
+ "static (T_STATIC)" shift, and go to state 56
+ "unset (T_UNSET)" shift, and go to state 57
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 78
+ '{' shift, and go to state 79
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ statement go to state 870
+ unticked_statement go to state 87
+ foreach_statement go to state 871
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 101
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 828
- 150 new_else_single: T_ELSE ':' . inner_statement_list
-
- $default reduce using rule 28 (inner_statement_list)
-
- inner_statement_list go to state 845
+ 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 . foreach_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ ':' shift, and go to state 869
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "if (T_IF)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 32
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ T_INLINE_HTML shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "echo (T_ECHO)" shift, and go to state 37
+ "do (T_DO)" shift, and go to state 38
+ "while (T_WHILE)" shift, and go to state 39
+ "for (T_FOR)" shift, and go to state 40
+ "foreach (T_FOREACH)" shift, and go to state 41
+ "declare (T_DECLARE)" shift, and go to state 42
+ "switch (T_SWITCH)" shift, and go to state 43
+ "break (T_BREAK)" shift, and go to state 44
+ "continue (T_CONTINUE)" shift, and go to state 45
+ "goto (T_GOTO)" shift, and go to state 46
+ "function (T_FUNCTION)" shift, and go to state 47
+ "return (T_RETURN)" shift, and go to state 49
+ "try (T_TRY)" shift, and go to state 50
+ "throw (T_THROW)" shift, and go to state 51
+ "global (T_GLOBAL)" shift, and go to state 53
+ "static (T_STATIC)" shift, and go to state 56
+ "unset (T_UNSET)" shift, and go to state 57
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 78
+ '{' shift, and go to state 79
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ statement go to state 870
+ unticked_statement go to state 87
+ foreach_statement go to state 872
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 101
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 829
- 41 unticked_statement: T_IF '(' expr ')' ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single T_ENDIF . ';'
+ 126 declare_statement: ':' inner_statement_list "enddeclare (T_ENDDECLARE)" ';' .
- ';' shift, and go to state 846
+ $default reduce using rule 126 (declare_statement)
state 830
- 143 elseif_list: elseif_list T_ELSEIF '(' expr . ')' $@34 statement
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ')' shift, and go to state 847
-
+ 132 switch_case_list: ':' ';' case_list "endswitch (T_ENDSWITCH)" . ';'
-state 831
+ ';' shift, and go to state 873
- 51 unticked_statement: T_FOR '(' for_expr ';' $@13 for_expr ';' $@14 for_expr ')' $@15 . for_statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- ':' shift, and go to state 848
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_IF shift, and go to state 28
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_INLINE_HTML shift, and go to state 34
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ECHO shift, and go to state 36
- T_DO shift, and go to state 37
- T_WHILE shift, and go to state 38
- T_FOR shift, and go to state 39
- T_FOREACH shift, and go to state 40
- T_DECLARE shift, and go to state 41
- T_SWITCH shift, and go to state 42
- T_BREAK shift, and go to state 43
- T_CONTINUE shift, and go to state 44
- T_GOTO shift, and go to state 45
- T_FUNCTION shift, and go to state 46
- T_RETURN shift, and go to state 48
- T_TRY shift, and go to state 49
- T_THROW shift, and go to state 50
- T_GLOBAL shift, and go to state 52
- T_STATIC shift, and go to state 55
- T_UNSET shift, and go to state 56
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 75
- '{' shift, and go to state 76
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- statement go to state 849
- unticked_statement go to state 84
- for_statement go to state 850
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 97
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
+state 831
-state 832
+ 131 switch_case_list: ':' case_list "endswitch (T_ENDSWITCH)" ';' .
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 123 foreach_statement: ':' inner_statement_list . T_ENDFOREACH ';'
+ $default reduce using rule 131 (switch_case_list)
- T_ENDFOREACH shift, and go to state 851
- $default reduce using rule 26 ($@4)
+state 832
- $@4 go to state 347
+ 135 case_list: case_list "case (T_CASE)" expr . case_separator @32 inner_statement_list
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ ':' shift, and go to state 833
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ';' shift, and go to state 834
+
+ case_separator go to state 874
state 833
- 134 case_list: case_list T_CASE expr case_separator $@32 . inner_statement_list
-
- $default reduce using rule 28 (inner_statement_list)
+ 138 case_separator: ':' .
- inner_statement_list go to state 852
+ $default reduce using rule 138 (case_separator)
state 834
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 136 case_list: case_list T_DEFAULT case_separator $@33 inner_statement_list .
-
- T_ENDSWITCH reduce using rule 136 (case_list)
- T_CASE reduce using rule 136 (case_list)
- T_DEFAULT reduce using rule 136 (case_list)
- '}' reduce using rule 136 (case_list)
- $default reduce using rule 26 ($@4)
+ 139 case_separator: ';' .
- $@4 go to state 347
+ $default reduce using rule 139 (case_separator)
state 835
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE . ')' $@25 '{' inner_statement_list '}' $@26 additional_catches
+ 137 case_list: case_list "default (T_DEFAULT)" case_separator . @33 inner_statement_list
- ')' shift, and go to state 853
+ $default reduce using rule 136 (@33)
+
+ @33 go to state 875
state 836
- 205 class_variable_declaration: T_VARIABLE '=' static_scalar .
+ 130 switch_case_list: '{' ';' case_list '}' .
- $default reduce using rule 205 (class_variable_declaration)
+ $default reduce using rule 130 (switch_case_list)
state 837
- 202 class_variable_declaration: class_variable_declaration ',' T_VARIABLE .
- 203 | class_variable_declaration ',' T_VARIABLE . '=' static_scalar
-
- '=' shift, and go to state 854
+ 419 non_empty_static_array_pair_list: non_empty_static_array_pair_list ',' static_scalar "=> (T_DOUBLE_ARROW)" static_scalar .
- $default reduce using rule 202 (class_variable_declaration)
+ $default reduce using rule 419 (non_empty_static_array_pair_list)
state 838
- 187 class_statement: method_modifiers function is_reference T_STRING $@37 . '(' parameter_list ')' method_body
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name . @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
- '(' shift, and go to state 855
+ $default reduce using rule 78 (@24)
+
+ @24 go to state 876
state 839
- 206 class_constant_declaration: class_constant_declaration ',' T_STRING '=' static_scalar .
+ 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' lexical_vars '{' . inner_statement_list '}'
- $default reduce using rule 206 (class_constant_declaration)
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 877
state 840
- 299 lexical_var_list: lexical_var_list ',' '&' . T_VARIABLE
+ 435 variable_property: "-> (T_OBJECT_OPERATOR)" object_property @67 method_or_not .
- T_VARIABLE shift, and go to state 856
+ $default reduce using rule 435 (variable_property)
state 841
- 298 lexical_var_list: lexical_var_list ',' T_VARIABLE .
+ 241 chaining_dereference: chaining_dereference '[' dim_offset ']' .
- $default reduce using rule 298 (lexical_var_list)
+ $default reduce using rule 241 (chaining_dereference)
state 842
- 159 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE '=' static_scalar .
-
- $default reduce using rule 159 (non_empty_parameter_list)
+ 231 class_constant_declaration: "const (T_CONST)" "identifier (T_STRING)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 878
+ static_class_constant go to state 471
state 843
- 391 variable_property: T_OBJECT_OPERATOR object_property $@63 method_or_not .
+ 193 trait_list: trait_list ',' . fully_qualified_class_name
- $default reduce using rule 391 (variable_property)
+ "identifier (T_STRING)" shift, and go to state 116
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+
+ namespace_name go to state 516
+ fully_qualified_class_name go to state 879
state 844
- 146 new_elseif_list: new_elseif_list T_ELSEIF '(' expr . ')' ':' $@35 inner_statement_list
- 240 expr_without_variable: expr . T_BOOLEAN_OR $@42 expr
- 242 | expr . T_BOOLEAN_AND $@43 expr
- 244 | expr . T_LOGICAL_OR $@44 expr
- 246 | expr . T_LOGICAL_AND $@45 expr
- 247 | expr . T_LOGICAL_XOR expr
- 248 | expr . '|' expr
- 249 | expr . '&' expr
- 250 | expr . '^' expr
- 251 | expr . '.' expr
- 252 | expr . '+' expr
- 253 | expr . '-' expr
- 254 | expr . '*' expr
- 255 | expr . '/' expr
- 256 | expr . '%' expr
- 257 | expr . T_SL expr
- 258 | expr . T_SR expr
- 263 | expr . T_IS_IDENTICAL expr
- 264 | expr . T_IS_NOT_IDENTICAL expr
- 265 | expr . T_IS_EQUAL expr
- 266 | expr . T_IS_NOT_EQUAL expr
- 267 | expr . '<' expr
- 268 | expr . T_IS_SMALLER_OR_EQUAL expr
- 269 | expr . '>' expr
- 270 | expr . T_IS_GREATER_OR_EQUAL expr
- 271 | expr . T_INSTANCEOF class_name_reference
- 275 | expr . '?' $@46 expr ':' $@47 expr
- 277 | expr . '?' ':' $@48 expr
-
- T_LOGICAL_OR shift, and go to state 222
- T_LOGICAL_XOR shift, and go to state 223
- T_LOGICAL_AND shift, and go to state 224
- '?' shift, and go to state 225
- T_BOOLEAN_OR shift, and go to state 226
- T_BOOLEAN_AND shift, and go to state 227
- '|' shift, and go to state 228
- '^' shift, and go to state 229
- '&' shift, and go to state 230
- T_IS_NOT_IDENTICAL shift, and go to state 231
- T_IS_IDENTICAL shift, and go to state 232
- T_IS_NOT_EQUAL shift, and go to state 233
- T_IS_EQUAL shift, and go to state 234
- '<' shift, and go to state 235
- '>' shift, and go to state 236
- T_IS_GREATER_OR_EQUAL shift, and go to state 237
- T_IS_SMALLER_OR_EQUAL shift, and go to state 238
- T_SR shift, and go to state 239
- T_SL shift, and go to state 240
- '+' shift, and go to state 241
- '-' shift, and go to state 242
- '.' shift, and go to state 243
- '*' shift, and go to state 244
- '/' shift, and go to state 245
- '%' shift, and go to state 246
- T_INSTANCEOF shift, and go to state 247
- ')' shift, and go to state 857
+ 194 trait_adaptations: ';' .
+
+ $default reduce using rule 194 (trait_adaptations)
state 845
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 150 new_else_single: T_ELSE ':' inner_statement_list .
+ 195 trait_adaptations: '{' . trait_adaptation_list '}'
+
+ "identifier (T_STRING)" shift, and go to state 880
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
- T_ENDIF reduce using rule 150 (new_else_single)
- $default reduce using rule 26 ($@4)
+ $default reduce using rule 196 (trait_adaptation_list)
- $@4 go to state 347
+ namespace_name go to state 516
+ trait_adaptation_list go to state 881
+ non_empty_trait_adaptation_list go to state 882
+ trait_adaptation_statement go to state 883
+ trait_precedence go to state 884
+ trait_method_reference go to state 885
+ trait_method_reference_fully_qualified go to state 886
+ trait_alias go to state 887
+ fully_qualified_class_name go to state 888
state 846
- 41 unticked_statement: T_IF '(' expr ')' ':' $@7 inner_statement_list $@8 new_elseif_list new_else_single T_ENDIF ';' .
+ 191 trait_use_statement: "use (T_USE)" trait_list trait_adaptations .
- $default reduce using rule 41 (unticked_statement)
+ $default reduce using rule 191 (trait_use_statement)
state 847
- 143 elseif_list: elseif_list T_ELSEIF '(' expr ')' . $@34 statement
+ 228 class_variable_declaration: "variable (T_VARIABLE)" .
+ 229 | "variable (T_VARIABLE)" . '=' static_scalar
- $default reduce using rule 142 ($@34)
+ '=' shift, and go to state 889
- $@34 go to state 858
+ $default reduce using rule 228 (class_variable_declaration)
state 848
- 121 for_statement: ':' . inner_statement_list T_ENDFOR ';'
-
- $default reduce using rule 28 (inner_statement_list)
+ 186 class_statement: variable_modifiers @36 class_variable_declaration . ';'
+ 226 class_variable_declaration: class_variable_declaration . ',' "variable (T_VARIABLE)"
+ 227 | class_variable_declaration . ',' "variable (T_VARIABLE)" '=' static_scalar
- inner_statement_list go to state 859
+ ',' shift, and go to state 890
+ ';' shift, and go to state 891
state 849
- 120 for_statement: statement .
+ 190 class_statement: method_modifiers function is_reference . "identifier (T_STRING)" @37 '(' parameter_list ')' method_body
- $default reduce using rule 120 (for_statement)
+ "identifier (T_STRING)" shift, and go to state 892
state 850
- 51 unticked_statement: T_FOR '(' for_expr ';' $@13 for_expr ';' $@14 for_expr ')' $@15 for_statement .
+ 230 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" . '=' static_scalar
- $default reduce using rule 51 (unticked_statement)
+ '=' shift, and go to state 893
state 851
- 123 foreach_statement: ':' inner_statement_list T_ENDFOREACH . ';'
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' '{' inner_statement_list . '}'
- ';' shift, and go to state 860
+ '}' shift, and go to state 894
+ $default reduce using rule 26 (@4)
-state 852
+ @4 go to state 366
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 134 case_list: case_list T_CASE expr case_separator $@32 inner_statement_list .
- T_ENDSWITCH reduce using rule 134 (case_list)
- T_CASE reduce using rule 134 (case_list)
- T_DEFAULT reduce using rule 134 (case_list)
- '}' reduce using rule 134 (case_list)
- $default reduce using rule 26 ($@4)
+state 852
- $@4 go to state 347
+ 342 lexical_var_list: '&' . "variable (T_VARIABLE)"
+ "variable (T_VARIABLE)" shift, and go to state 895
-state 853
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' . $@25 '{' inner_statement_list '}' $@26 additional_catches
+state 853
- $default reduce using rule 79 ($@25)
+ 341 lexical_var_list: "variable (T_VARIABLE)" .
- $@25 go to state 861
+ $default reduce using rule 341 (lexical_var_list)
state 854
- 203 class_variable_declaration: class_variable_declaration ',' T_VARIABLE '=' . static_scalar
-
- '+' shift, and go to state 432
- '-' shift, and go to state 433
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 111
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_STATIC shift, and go to state 112
- T_ARRAY shift, and go to state 434
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 435
- T_NAMESPACE shift, and go to state 436
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 437
-
- namespace_name go to state 438
- class_name go to state 439
- common_scalar go to state 440
- static_scalar go to state 862
- static_class_constant go to state 442
+ 338 lexical_vars: "use (T_USE)" '(' lexical_var_list . ')'
+ 339 lexical_var_list: lexical_var_list . ',' "variable (T_VARIABLE)"
+ 340 | lexical_var_list . ',' '&' "variable (T_VARIABLE)"
+
+ ',' shift, and go to state 896
+ ')' shift, and go to state 897
state 855
- 187 class_statement: method_modifiers function is_reference T_STRING $@37 '(' . parameter_list ')' method_body
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list . '}'
- T_STRING shift, and go to state 111
- T_ARRAY shift, and go to state 576
- T_NAMESPACE shift, and go to state 488
- T_NS_SEPARATOR shift, and go to state 489
+ '}' shift, and go to state 898
- ')' reduce using rule 152 (parameter_list)
- $default reduce using rule 161 (optional_class_type)
+ $default reduce using rule 26 (@4)
- namespace_name go to state 490
- parameter_list go to state 863
- non_empty_parameter_list go to state 578
- optional_class_type go to state 579
- fully_qualified_class_name go to state 580
+ @4 go to state 366
state 856
- 299 lexical_var_list: lexical_var_list ',' '&' T_VARIABLE .
+ 159 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" .
+ 160 | non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" . '=' static_scalar
- $default reduce using rule 299 (lexical_var_list)
+ '=' shift, and go to state 899
+ $default reduce using rule 159 (non_empty_parameter_list)
-state 857
- 146 new_elseif_list: new_elseif_list T_ELSEIF '(' expr ')' . ':' $@35 inner_statement_list
+state 857
- ':' shift, and go to state 864
+ 161 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 900
+ static_class_constant go to state 471
state 858
- 143 elseif_list: elseif_list T_ELSEIF '(' expr ')' $@34 . statement
-
- T_REQUIRE_ONCE shift, and go to state 5
- T_REQUIRE shift, and go to state 6
- T_EVAL shift, and go to state 7
- T_INCLUDE_ONCE shift, and go to state 8
- T_INCLUDE shift, and go to state 9
- T_PRINT shift, and go to state 10
- '+' shift, and go to state 11
- '-' shift, and go to state 12
- '!' shift, and go to state 13
- '~' shift, and go to state 14
- '@' shift, and go to state 15
- T_UNSET_CAST shift, and go to state 16
- T_BOOL_CAST shift, and go to state 17
- T_OBJECT_CAST shift, and go to state 18
- T_ARRAY_CAST shift, and go to state 19
- T_STRING_CAST shift, and go to state 20
- T_DOUBLE_CAST shift, and go to state 21
- T_INT_CAST shift, and go to state 22
- T_DEC shift, and go to state 23
- T_INC shift, and go to state 24
- T_CLONE shift, and go to state 25
- T_NEW shift, and go to state 26
- T_EXIT shift, and go to state 27
- T_IF shift, and go to state 28
- T_LNUMBER shift, and go to state 29
- T_DNUMBER shift, and go to state 30
- T_STRING shift, and go to state 31
- T_STRING_VARNAME shift, and go to state 32
- T_VARIABLE shift, and go to state 33
- T_INLINE_HTML shift, and go to state 34
- T_CONSTANT_ENCAPSED_STRING shift, and go to state 35
- T_ECHO shift, and go to state 36
- T_DO shift, and go to state 37
- T_WHILE shift, and go to state 38
- T_FOR shift, and go to state 39
- T_FOREACH shift, and go to state 40
- T_DECLARE shift, and go to state 41
- T_SWITCH shift, and go to state 42
- T_BREAK shift, and go to state 43
- T_CONTINUE shift, and go to state 44
- T_GOTO shift, and go to state 45
- T_FUNCTION shift, and go to state 46
- T_RETURN shift, and go to state 48
- T_TRY shift, and go to state 49
- T_THROW shift, and go to state 50
- T_GLOBAL shift, and go to state 52
- T_STATIC shift, and go to state 55
- T_UNSET shift, and go to state 56
- T_ISSET shift, and go to state 57
- T_EMPTY shift, and go to state 58
- T_LIST shift, and go to state 62
- T_ARRAY shift, and go to state 63
- T_CLASS_C shift, and go to state 64
- T_METHOD_C shift, and go to state 65
- T_FUNC_C shift, and go to state 66
- T_LINE shift, and go to state 67
- T_FILE shift, and go to state 68
- T_START_HEREDOC shift, and go to state 69
- T_NAMESPACE shift, and go to state 113
- T_NS_C shift, and go to state 71
- T_DIR shift, and go to state 72
- T_NS_SEPARATOR shift, and go to state 73
- '(' shift, and go to state 74
- ';' shift, and go to state 75
- '{' shift, and go to state 76
- '$' shift, and go to state 77
- '`' shift, and go to state 78
- '"' shift, and go to state 79
-
- namespace_name go to state 80
- statement go to state 865
- unticked_statement go to state 84
- expr_without_variable go to state 91
- function go to state 114
- function_call go to state 93
- class_name go to state 94
- common_scalar go to state 95
- scalar go to state 96
- expr go to state 97
- r_variable go to state 98
- rw_variable go to state 99
- variable go to state 100
- variable_without_objects go to state 101
- static_member go to state 102
- variable_class_name go to state 103
- base_variable_with_function_calls go to state 104
- base_variable go to state 105
- reference_variable go to state 106
- compound_variable go to state 107
- simple_indirect_reference go to state 108
- internal_functions_in_yacc go to state 109
- class_constant go to state 110
-
+ 156 non_empty_parameter_list: optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar .
-state 859
+ $default reduce using rule 156 (non_empty_parameter_list)
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 121 for_statement: ':' inner_statement_list . T_ENDFOR ';'
- T_ENDFOR shift, and go to state 866
+state 859
- $default reduce using rule 26 ($@4)
+ 439 method: '(' @68 function_call_parameter_list ')' .
- $@4 go to state 347
+ $default reduce using rule 439 (method)
state 860
- 123 foreach_statement: ':' inner_statement_list T_ENDFOREACH ';' .
+ 436 array_method_dereference: array_method_dereference '[' dim_offset ']' .
- $default reduce using rule 123 (foreach_statement)
+ $default reduce using rule 436 (array_method_dereference)
state 861
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 . '{' inner_statement_list '}' $@26 additional_catches
+ 437 array_method_dereference: method '[' dim_offset ']' .
- '{' shift, and go to state 867
+ $default reduce using rule 437 (array_method_dereference)
state 862
- 203 class_variable_declaration: class_variable_declaration ',' T_VARIABLE '=' static_scalar .
+ 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" . '(' expr ')' ':' @35 inner_statement_list
- $default reduce using rule 203 (class_variable_declaration)
+ '(' shift, and go to state 901
state 863
- 187 class_statement: method_modifiers function is_reference T_STRING $@37 '(' parameter_list . ')' method_body
+ 151 new_else_single: "else (T_ELSE)" . ':' inner_statement_list
- ')' shift, and go to state 868
+ ':' shift, and go to state 902
state 864
- 146 new_elseif_list: new_elseif_list T_ELSEIF '(' expr ')' ':' . $@35 inner_statement_list
-
- $default reduce using rule 145 ($@35)
+ 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single . "endif (T_ENDIF)" ';'
- $@35 go to state 869
+ "endif (T_ENDIF)" shift, and go to state 903
state 865
- 143 elseif_list: elseif_list T_ELSEIF '(' expr ')' $@34 statement .
-
- $default reduce using rule 143 (elseif_list)
+ 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' . expr ')' @34 statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 904
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
state 866
- 121 for_statement: ':' inner_statement_list T_ENDFOR . ';'
+ 149 else_single: "else (T_ELSE)" statement .
- ';' shift, and go to state 870
+ $default reduce using rule 149 (else_single)
state 867
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' . inner_statement_list '}' $@26 additional_catches
+ 141 while_statement: ':' inner_statement_list "endwhile (T_ENDWHILE)" ';' .
- $default reduce using rule 28 (inner_statement_list)
-
- inner_statement_list go to state 871
+ $default reduce using rule 141 (while_statement)
state 868
- 187 class_statement: method_modifiers function is_reference T_STRING $@37 '(' parameter_list ')' . method_body
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 for_expr ')' . @15 for_statement
- ';' shift, and go to state 872
- '{' shift, and go to state 873
+ $default reduce using rule 50 (@15)
- method_body go to state 874
+ @15 go to state 905
state 869
- 146 new_elseif_list: new_elseif_list T_ELSEIF '(' expr ')' ':' $@35 . inner_statement_list
+ 124 foreach_statement: ':' . inner_statement_list "endforeach (T_ENDFOREACH)" ';'
$default reduce using rule 28 (inner_statement_list)
- inner_statement_list go to state 875
+ inner_statement_list go to state 906
state 870
- 121 for_statement: ':' inner_statement_list T_ENDFOR ';' .
+ 123 foreach_statement: statement .
- $default reduce using rule 121 (for_statement)
+ $default reduce using rule 123 (foreach_statement)
state 871
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list . '}' $@26 additional_catches
-
- '}' shift, and go to state 876
-
- $default reduce using rule 26 ($@4)
+ 72 unticked_statement: "foreach (T_FOREACH)" '(' expr_without_variable "as (T_AS)" @19 variable foreach_optional_arg ')' @20 foreach_statement .
- $@4 go to state 347
+ $default reduce using rule 72 (unticked_statement)
state 872
- 188 method_body: ';' .
+ 69 unticked_statement: "foreach (T_FOREACH)" '(' variable "as (T_AS)" @17 foreach_variable foreach_optional_arg ')' @18 foreach_statement .
- $default reduce using rule 188 (method_body)
+ $default reduce using rule 69 (unticked_statement)
state 873
- 189 method_body: '{' . inner_statement_list '}'
+ 132 switch_case_list: ':' ';' case_list "endswitch (T_ENDSWITCH)" ';' .
- $default reduce using rule 28 (inner_statement_list)
-
- inner_statement_list go to state 877
+ $default reduce using rule 132 (switch_case_list)
state 874
- 187 class_statement: method_modifiers function is_reference T_STRING $@37 '(' parameter_list ')' method_body .
+ 135 case_list: case_list "case (T_CASE)" expr case_separator . @32 inner_statement_list
- $default reduce using rule 187 (class_statement)
+ $default reduce using rule 134 (@32)
+
+ @32 go to state 907
state 875
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 146 new_elseif_list: new_elseif_list T_ELSEIF '(' expr ')' ':' $@35 inner_statement_list .
+ 137 case_list: case_list "default (T_DEFAULT)" case_separator @33 . inner_statement_list
- T_ELSEIF reduce using rule 146 (new_elseif_list)
- T_ELSE reduce using rule 146 (new_elseif_list)
- T_ENDIF reduce using rule 146 (new_elseif_list)
- $default reduce using rule 26 ($@4)
+ $default reduce using rule 28 (inner_statement_list)
- $@4 go to state 347
+ inner_statement_list go to state 908
state 876
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' . $@26 additional_catches
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 . "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches
- $default reduce using rule 80 ($@26)
-
- $@26 go to state 878
+ "variable (T_VARIABLE)" shift, and go to state 909
state 877
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 189 method_body: '{' inner_statement_list . '}'
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list . '}'
- '}' shift, and go to state 879
+ '}' shift, and go to state 910
- $default reduce using rule 26 ($@4)
+ $default reduce using rule 26 (@4)
- $@4 go to state 347
+ @4 go to state 366
state 878
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 . additional_catches
-
- T_CATCH shift, and go to state 880
-
- $default reduce using rule 85 (additional_catches)
+ 231 class_constant_declaration: "const (T_CONST)" "identifier (T_STRING)" '=' static_scalar .
- additional_catches go to state 881
- non_empty_additional_catches go to state 882
- additional_catch go to state 883
+ $default reduce using rule 231 (class_constant_declaration)
state 879
- 189 method_body: '{' inner_statement_list '}' .
+ 193 trait_list: trait_list ',' fully_qualified_class_name .
- $default reduce using rule 189 (method_body)
+ $default reduce using rule 193 (trait_list)
state 880
- 90 additional_catch: T_CATCH . '(' fully_qualified_class_name @27 T_VARIABLE ')' $@28 '{' inner_statement_list '}'
+ 5 namespace_name: "identifier (T_STRING)" .
+ 205 trait_method_reference: "identifier (T_STRING)" .
- '(' shift, and go to state 884
+ "as (T_AS)" reduce using rule 205 (trait_method_reference)
+ $default reduce using rule 5 (namespace_name)
state 881
- 81 unticked_statement: T_TRY $@22 '{' inner_statement_list '}' T_CATCH '(' $@23 fully_qualified_class_name $@24 T_VARIABLE ')' $@25 '{' inner_statement_list '}' $@26 additional_catches .
+ 195 trait_adaptations: '{' trait_adaptation_list . '}'
- $default reduce using rule 81 (unticked_statement)
+ '}' shift, and go to state 911
state 882
+ 197 trait_adaptation_list: non_empty_trait_adaptation_list .
+ 199 non_empty_trait_adaptation_list: non_empty_trait_adaptation_list . trait_adaptation_statement
+
+ "identifier (T_STRING)" shift, and go to state 880
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+
+ $default reduce using rule 197 (trait_adaptation_list)
+
+ namespace_name go to state 516
+ trait_adaptation_statement go to state 912
+ trait_precedence go to state 884
+ trait_method_reference go to state 885
+ trait_method_reference_fully_qualified go to state 886
+ trait_alias go to state 887
+ fully_qualified_class_name go to state 888
+
+
+state 883
+
+ 198 non_empty_trait_adaptation_list: trait_adaptation_statement .
+
+ $default reduce using rule 198 (non_empty_trait_adaptation_list)
+
+
+state 884
+
+ 200 trait_adaptation_statement: trait_precedence . ';'
+
+ ';' shift, and go to state 913
+
+
+state 885
+
+ 208 trait_alias: trait_method_reference . "as (T_AS)" trait_modifiers "identifier (T_STRING)"
+ 209 | trait_method_reference . "as (T_AS)" member_modifier
+
+ "as (T_AS)" shift, and go to state 914
+
+
+state 886
+
+ 202 trait_precedence: trait_method_reference_fully_qualified . "insteadof (T_INSTEADOF)" trait_reference_list
+ 206 trait_method_reference: trait_method_reference_fully_qualified .
+
+ "insteadof (T_INSTEADOF)" shift, and go to state 915
+
+ $default reduce using rule 206 (trait_method_reference)
+
+
+state 887
+
+ 201 trait_adaptation_statement: trait_alias . ';'
+
+ ';' shift, and go to state 916
+
+
+state 888
+
+ 207 trait_method_reference_fully_qualified: fully_qualified_class_name . ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)"
+
+ ":: (T_PAAMAYIM_NEKUDOTAYIM)" shift, and go to state 917
+
+
+state 889
+
+ 229 class_variable_declaration: "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 918
+ static_class_constant go to state 471
+
+
+state 890
+
+ 226 class_variable_declaration: class_variable_declaration ',' . "variable (T_VARIABLE)"
+ 227 | class_variable_declaration ',' . "variable (T_VARIABLE)" '=' static_scalar
+
+ "variable (T_VARIABLE)" shift, and go to state 919
+
+
+state 891
+
+ 186 class_statement: variable_modifiers @36 class_variable_declaration ';' .
+
+ $default reduce using rule 186 (class_statement)
+
+
+state 892
+
+ 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" . @37 '(' parameter_list ')' method_body
+
+ $default reduce using rule 189 (@37)
+
+ @37 go to state 920
+
+
+state 893
+
+ 230 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 921
+ static_class_constant go to state 471
+
+
+state 894
+
+ 99 unticked_function_declaration_statement: function is_reference "identifier (T_STRING)" @29 '(' parameter_list ')' '{' inner_statement_list '}' .
+
+ $default reduce using rule 99 (unticked_function_declaration_statement)
+
+
+state 895
+
+ 342 lexical_var_list: '&' "variable (T_VARIABLE)" .
+
+ $default reduce using rule 342 (lexical_var_list)
+
+
+state 896
+
+ 339 lexical_var_list: lexical_var_list ',' . "variable (T_VARIABLE)"
+ 340 | lexical_var_list ',' . '&' "variable (T_VARIABLE)"
+
+ '&' shift, and go to state 922
+ "variable (T_VARIABLE)" shift, and go to state 923
+
+
+state 897
+
+ 338 lexical_vars: "use (T_USE)" '(' lexical_var_list ')' .
+
+ $default reduce using rule 338 (lexical_vars)
+
+
+state 898
+
+ 333 expr_without_variable: function is_reference '(' @53 parameter_list ')' lexical_vars '{' inner_statement_list '}' .
+
+ $default reduce using rule 333 (expr_without_variable)
+
+
+state 899
+
+ 160 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 924
+ static_class_constant go to state 471
+
+
+state 900
+
+ 161 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type "variable (T_VARIABLE)" '=' static_scalar .
+
+ $default reduce using rule 161 (non_empty_parameter_list)
+
+
+state 901
+
+ 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' . expr ')' ':' @35 inner_statement_list
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "function (T_FUNCTION)" shift, and go to state 47
+ "static (T_STATIC)" shift, and go to state 117
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 925
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
+
+
+state 902
+
+ 151 new_else_single: "else (T_ELSE)" ':' . inner_statement_list
+
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 926
+
+
+state 903
+
+ 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" . ';'
+
+ ';' shift, and go to state 927
+
+
+state 904
+
+ 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' expr . ')' @34 statement
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ')' shift, and go to state 928
+
+
+state 905
+
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 for_expr ')' @15 . for_statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ ':' shift, and go to state 929
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "if (T_IF)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 32
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ T_INLINE_HTML shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "echo (T_ECHO)" shift, and go to state 37
+ "do (T_DO)" shift, and go to state 38
+ "while (T_WHILE)" shift, and go to state 39
+ "for (T_FOR)" shift, and go to state 40
+ "foreach (T_FOREACH)" shift, and go to state 41
+ "declare (T_DECLARE)" shift, and go to state 42
+ "switch (T_SWITCH)" shift, and go to state 43
+ "break (T_BREAK)" shift, and go to state 44
+ "continue (T_CONTINUE)" shift, and go to state 45
+ "goto (T_GOTO)" shift, and go to state 46
+ "function (T_FUNCTION)" shift, and go to state 47
+ "return (T_RETURN)" shift, and go to state 49
+ "try (T_TRY)" shift, and go to state 50
+ "throw (T_THROW)" shift, and go to state 51
+ "global (T_GLOBAL)" shift, and go to state 53
+ "static (T_STATIC)" shift, and go to state 56
+ "unset (T_UNSET)" shift, and go to state 57
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 78
+ '{' shift, and go to state 79
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ statement go to state 930
+ unticked_statement go to state 87
+ for_statement go to state 931
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 101
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
+
+
+state 906
+
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 124 foreach_statement: ':' inner_statement_list . "endforeach (T_ENDFOREACH)" ';'
+
+ "endforeach (T_ENDFOREACH)" shift, and go to state 932
+
+ $default reduce using rule 26 (@4)
+
+ @4 go to state 366
+
+
+state 907
+
+ 135 case_list: case_list "case (T_CASE)" expr case_separator @32 . inner_statement_list
+
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 933
+
+
+state 908
+
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 137 case_list: case_list "default (T_DEFAULT)" case_separator @33 inner_statement_list .
+
+ "endswitch (T_ENDSWITCH)" reduce using rule 137 (case_list)
+ "case (T_CASE)" reduce using rule 137 (case_list)
+ "default (T_DEFAULT)" reduce using rule 137 (case_list)
+ '}' reduce using rule 137 (case_list)
+ $default reduce using rule 26 (@4)
+
+ @4 go to state 366
+
+
+state 909
+
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" . ')' @25 '{' inner_statement_list '}' @26 additional_catches
+
+ ')' shift, and go to state 934
+
+
+state 910
+
+ 335 expr_without_variable: "static (T_STATIC)" function is_reference '(' @54 parameter_list ')' lexical_vars '{' inner_statement_list '}' .
+
+ $default reduce using rule 335 (expr_without_variable)
+
+
+state 911
+
+ 195 trait_adaptations: '{' trait_adaptation_list '}' .
+
+ $default reduce using rule 195 (trait_adaptations)
+
+
+state 912
+
+ 199 non_empty_trait_adaptation_list: non_empty_trait_adaptation_list trait_adaptation_statement .
+
+ $default reduce using rule 199 (non_empty_trait_adaptation_list)
+
+
+state 913
+
+ 200 trait_adaptation_statement: trait_precedence ';' .
+
+ $default reduce using rule 200 (trait_adaptation_statement)
+
+
+state 914
+
+ 208 trait_alias: trait_method_reference "as (T_AS)" . trait_modifiers "identifier (T_STRING)"
+ 209 | trait_method_reference "as (T_AS)" . member_modifier
+
+ "public (T_PUBLIC)" shift, and go to state 740
+ "protected (T_PROTECTED)" shift, and go to state 741
+ "private (T_PRIVATE)" shift, and go to state 742
+ "final (T_FINAL)" shift, and go to state 743
+ "abstract (T_ABSTRACT)" shift, and go to state 744
+ "static (T_STATIC)" shift, and go to state 745
+
+ $default reduce using rule 210 (trait_modifiers)
+
+ trait_modifiers go to state 935
+ member_modifier go to state 936
+
+
+state 915
+
+ 202 trait_precedence: trait_method_reference_fully_qualified "insteadof (T_INSTEADOF)" . trait_reference_list
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+
+ namespace_name go to state 516
+ trait_reference_list go to state 937
+ fully_qualified_class_name go to state 938
+
+
+state 916
+
+ 201 trait_adaptation_statement: trait_alias ';' .
+
+ $default reduce using rule 201 (trait_adaptation_statement)
+
+
+state 917
+
+ 207 trait_method_reference_fully_qualified: fully_qualified_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" . "identifier (T_STRING)"
+
+ "identifier (T_STRING)" shift, and go to state 939
+
+
+state 918
+
+ 229 class_variable_declaration: "variable (T_VARIABLE)" '=' static_scalar .
+
+ $default reduce using rule 229 (class_variable_declaration)
+
+
+state 919
+
+ 226 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)" .
+ 227 | class_variable_declaration ',' "variable (T_VARIABLE)" . '=' static_scalar
+
+ '=' shift, and go to state 940
+
+ $default reduce using rule 226 (class_variable_declaration)
+
+
+state 920
+
+ 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 . '(' parameter_list ')' method_body
+
+ '(' shift, and go to state 941
+
+
+state 921
+
+ 230 class_constant_declaration: class_constant_declaration ',' "identifier (T_STRING)" '=' static_scalar .
+
+ $default reduce using rule 230 (class_constant_declaration)
+
+
+state 922
+
+ 340 lexical_var_list: lexical_var_list ',' '&' . "variable (T_VARIABLE)"
+
+ "variable (T_VARIABLE)" shift, and go to state 942
+
+
+state 923
+
+ 339 lexical_var_list: lexical_var_list ',' "variable (T_VARIABLE)" .
+
+ $default reduce using rule 339 (lexical_var_list)
+
+
+state 924
+
+ 160 non_empty_parameter_list: non_empty_parameter_list ',' optional_class_type '&' "variable (T_VARIABLE)" '=' static_scalar .
+
+ $default reduce using rule 160 (non_empty_parameter_list)
+
+
+state 925
+
+ 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr . ')' ':' @35 inner_statement_list
+ 275 expr_without_variable: expr . "|| (T_BOOLEAN_OR)" @44 expr
+ 277 | expr . "&& (T_BOOLEAN_AND)" @45 expr
+ 279 | expr . "or (T_LOGICAL_OR)" @46 expr
+ 281 | expr . "and (T_LOGICAL_AND)" @47 expr
+ 282 | expr . "xor (T_LOGICAL_XOR)" expr
+ 283 | expr . '|' expr
+ 284 | expr . '&' expr
+ 285 | expr . '^' expr
+ 286 | expr . '.' expr
+ 287 | expr . '+' expr
+ 288 | expr . '-' expr
+ 289 | expr . '*' expr
+ 290 | expr . '/' expr
+ 291 | expr . '%' expr
+ 292 | expr . "<< (T_SL)" expr
+ 293 | expr . ">> (T_SR)" expr
+ 298 | expr . "=== (T_IS_IDENTICAL)" expr
+ 299 | expr . "!== (T_IS_NOT_IDENTICAL)" expr
+ 300 | expr . "== (T_IS_EQUAL)" expr
+ 301 | expr . "!= (T_IS_NOT_EQUAL)" expr
+ 302 | expr . '<' expr
+ 303 | expr . "<= (T_IS_SMALLER_OR_EQUAL)" expr
+ 304 | expr . '>' expr
+ 305 | expr . ">= (T_IS_GREATER_OR_EQUAL)" expr
+ 306 | expr . "instanceof (T_INSTANCEOF)" class_name_reference
+ 313 | expr . '?' @49 expr ':' @50 expr
+ 315 | expr . '?' ':' @51 expr
+
+ "or (T_LOGICAL_OR)" shift, and go to state 235
+ "xor (T_LOGICAL_XOR)" shift, and go to state 236
+ "and (T_LOGICAL_AND)" shift, and go to state 237
+ '?' shift, and go to state 238
+ "|| (T_BOOLEAN_OR)" shift, and go to state 239
+ "&& (T_BOOLEAN_AND)" shift, and go to state 240
+ '|' shift, and go to state 241
+ '^' shift, and go to state 242
+ '&' shift, and go to state 243
+ "!== (T_IS_NOT_IDENTICAL)" shift, and go to state 244
+ "=== (T_IS_IDENTICAL)" shift, and go to state 245
+ "!= (T_IS_NOT_EQUAL)" shift, and go to state 246
+ "== (T_IS_EQUAL)" shift, and go to state 247
+ '<' shift, and go to state 248
+ '>' shift, and go to state 249
+ ">= (T_IS_GREATER_OR_EQUAL)" shift, and go to state 250
+ "<= (T_IS_SMALLER_OR_EQUAL)" shift, and go to state 251
+ ">> (T_SR)" shift, and go to state 252
+ "<< (T_SL)" shift, and go to state 253
+ '+' shift, and go to state 254
+ '-' shift, and go to state 255
+ '.' shift, and go to state 256
+ '*' shift, and go to state 257
+ '/' shift, and go to state 258
+ '%' shift, and go to state 259
+ "instanceof (T_INSTANCEOF)" shift, and go to state 260
+ ')' shift, and go to state 943
+
+
+state 926
+
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 151 new_else_single: "else (T_ELSE)" ':' inner_statement_list .
+
+ "endif (T_ENDIF)" reduce using rule 151 (new_else_single)
+ $default reduce using rule 26 (@4)
+
+ @4 go to state 366
+
+
+state 927
+
+ 41 unticked_statement: "if (T_IF)" '(' expr ')' ':' @7 inner_statement_list @8 new_elseif_list new_else_single "endif (T_ENDIF)" ';' .
+
+ $default reduce using rule 41 (unticked_statement)
+
+
+state 928
+
+ 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' expr ')' . @34 statement
+
+ $default reduce using rule 143 (@34)
+
+ @34 go to state 944
+
+
+state 929
+
+ 122 for_statement: ':' . inner_statement_list "endfor (T_ENDFOR)" ';'
+
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 945
+
+
+state 930
+
+ 121 for_statement: statement .
+
+ $default reduce using rule 121 (for_statement)
+
+
+state 931
+
+ 51 unticked_statement: "for (T_FOR)" '(' for_expr ';' @13 for_expr ';' @14 for_expr ')' @15 for_statement .
+
+ $default reduce using rule 51 (unticked_statement)
+
+
+state 932
+
+ 124 foreach_statement: ':' inner_statement_list "endforeach (T_ENDFOREACH)" . ';'
+
+ ';' shift, and go to state 946
+
+
+state 933
+
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 135 case_list: case_list "case (T_CASE)" expr case_separator @32 inner_statement_list .
+
+ "endswitch (T_ENDSWITCH)" reduce using rule 135 (case_list)
+ "case (T_CASE)" reduce using rule 135 (case_list)
+ "default (T_DEFAULT)" reduce using rule 135 (case_list)
+ '}' reduce using rule 135 (case_list)
+ $default reduce using rule 26 (@4)
+
+ @4 go to state 366
+
+
+state 934
+
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' . @25 '{' inner_statement_list '}' @26 additional_catches
+
+ $default reduce using rule 79 (@25)
+
+ @25 go to state 947
+
+
+state 935
+
+ 208 trait_alias: trait_method_reference "as (T_AS)" trait_modifiers . "identifier (T_STRING)"
+
+ "identifier (T_STRING)" shift, and go to state 948
+
+
+state 936
+
+ 209 trait_alias: trait_method_reference "as (T_AS)" member_modifier .
+ 211 trait_modifiers: member_modifier .
+
+ "identifier (T_STRING)" reduce using rule 211 (trait_modifiers)
+ $default reduce using rule 209 (trait_alias)
+
+
+state 937
+
+ 202 trait_precedence: trait_method_reference_fully_qualified "insteadof (T_INSTEADOF)" trait_reference_list .
+ 204 trait_reference_list: trait_reference_list . ',' fully_qualified_class_name
+
+ ',' shift, and go to state 949
+
+ $default reduce using rule 202 (trait_precedence)
+
+
+state 938
+
+ 203 trait_reference_list: fully_qualified_class_name .
+
+ $default reduce using rule 203 (trait_reference_list)
+
+
+state 939
+
+ 207 trait_method_reference_fully_qualified: fully_qualified_class_name ":: (T_PAAMAYIM_NEKUDOTAYIM)" "identifier (T_STRING)" .
+
+ $default reduce using rule 207 (trait_method_reference_fully_qualified)
+
+
+state 940
+
+ 227 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)" '=' . static_scalar
+
+ '+' shift, and go to state 459
+ '-' shift, and go to state 460
+ '[' shift, and go to state 461
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 116
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "static (T_STATIC)" shift, and go to state 138
+ "array (T_ARRAY)" shift, and go to state 462
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 463
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 464
+ "namespace (T_NAMESPACE)" shift, and go to state 465
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 466
+
+ namespace_name go to state 467
+ class_name go to state 468
+ common_scalar go to state 469
+ static_scalar go to state 950
+ static_class_constant go to state 471
+
+
+state 941
+
+ 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 '(' . parameter_list ')' method_body
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "array (T_ARRAY)" shift, and go to state 608
+ "callable (T_CALLABLE)" shift, and go to state 609
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+
+ ')' reduce using rule 153 (parameter_list)
+ $default reduce using rule 162 (optional_class_type)
+
+ namespace_name go to state 516
+ parameter_list go to state 951
+ non_empty_parameter_list go to state 611
+ optional_class_type go to state 612
+ fully_qualified_class_name go to state 613
+
+
+state 942
+
+ 340 lexical_var_list: lexical_var_list ',' '&' "variable (T_VARIABLE)" .
+
+ $default reduce using rule 340 (lexical_var_list)
+
+
+state 943
+
+ 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr ')' . ':' @35 inner_statement_list
+
+ ':' shift, and go to state 952
+
+
+state 944
+
+ 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' expr ')' @34 . statement
+
+ "require_once (T_REQUIRE_ONCE)" shift, and go to state 5
+ "require (T_REQUIRE)" shift, and go to state 6
+ "eval (T_EVAL)" shift, and go to state 7
+ "include_once (T_INCLUDE_ONCE)" shift, and go to state 8
+ "include (T_INCLUDE)" shift, and go to state 9
+ "print (T_PRINT)" shift, and go to state 10
+ '+' shift, and go to state 11
+ '-' shift, and go to state 12
+ '!' shift, and go to state 13
+ '~' shift, and go to state 14
+ '@' shift, and go to state 15
+ "(unset) (T_UNSET_CAST)" shift, and go to state 16
+ "(bool) (T_BOOL_CAST)" shift, and go to state 17
+ "(object) (T_OBJECT_CAST)" shift, and go to state 18
+ "(array) (T_ARRAY_CAST)" shift, and go to state 19
+ "(string) (T_STRING_CAST)" shift, and go to state 20
+ "(double) (T_DOUBLE_CAST)" shift, and go to state 21
+ "(int) (T_INT_CAST)" shift, and go to state 22
+ "-- (T_DEC)" shift, and go to state 23
+ "++ (T_INC)" shift, and go to state 24
+ '[' shift, and go to state 25
+ "clone (T_CLONE)" shift, and go to state 26
+ "new (T_NEW)" shift, and go to state 27
+ "exit (T_EXIT)" shift, and go to state 28
+ "if (T_IF)" shift, and go to state 29
+ "integer number (T_LNUMBER)" shift, and go to state 30
+ "floating-point number (T_DNUMBER)" shift, and go to state 31
+ "identifier (T_STRING)" shift, and go to state 32
+ "variable name (T_STRING_VARNAME)" shift, and go to state 33
+ "variable (T_VARIABLE)" shift, and go to state 34
+ T_INLINE_HTML shift, and go to state 35
+ "quoted-string (T_CONSTANT_ENCAPSED_STRING)" shift, and go to state 36
+ "echo (T_ECHO)" shift, and go to state 37
+ "do (T_DO)" shift, and go to state 38
+ "while (T_WHILE)" shift, and go to state 39
+ "for (T_FOR)" shift, and go to state 40
+ "foreach (T_FOREACH)" shift, and go to state 41
+ "declare (T_DECLARE)" shift, and go to state 42
+ "switch (T_SWITCH)" shift, and go to state 43
+ "break (T_BREAK)" shift, and go to state 44
+ "continue (T_CONTINUE)" shift, and go to state 45
+ "goto (T_GOTO)" shift, and go to state 46
+ "function (T_FUNCTION)" shift, and go to state 47
+ "return (T_RETURN)" shift, and go to state 49
+ "try (T_TRY)" shift, and go to state 50
+ "throw (T_THROW)" shift, and go to state 51
+ "global (T_GLOBAL)" shift, and go to state 53
+ "static (T_STATIC)" shift, and go to state 56
+ "unset (T_UNSET)" shift, and go to state 57
+ "isset (T_ISSET)" shift, and go to state 58
+ "empty (T_EMPTY)" shift, and go to state 59
+ "list (T_LIST)" shift, and go to state 64
+ "array (T_ARRAY)" shift, and go to state 65
+ "__CLASS__ (T_CLASS_C)" shift, and go to state 66
+ "__TRAIT__ (T_TRAIT_C)" shift, and go to state 67
+ "__METHOD__ (T_METHOD_C)" shift, and go to state 68
+ "__FUNCTION__ (T_FUNC_C)" shift, and go to state 69
+ "__LINE__ (T_LINE)" shift, and go to state 70
+ "__FILE__ (T_FILE)" shift, and go to state 71
+ "heredoc start (T_START_HEREDOC)" shift, and go to state 72
+ "namespace (T_NAMESPACE)" shift, and go to state 118
+ "__NAMESPACE__ (T_NS_C)" shift, and go to state 74
+ "__DIR__ (T_DIR)" shift, and go to state 75
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 76
+ '(' shift, and go to state 77
+ ';' shift, and go to state 78
+ '{' shift, and go to state 79
+ '$' shift, and go to state 80
+ '`' shift, and go to state 81
+ '"' shift, and go to state 82
+
+ namespace_name go to state 83
+ statement go to state 953
+ unticked_statement go to state 87
+ new_expr go to state 94
+ expr_without_variable go to state 95
+ function go to state 119
+ function_call go to state 97
+ class_name go to state 98
+ common_scalar go to state 99
+ scalar go to state 100
+ expr go to state 101
+ r_variable go to state 102
+ rw_variable go to state 103
+ variable go to state 104
+ variable_without_objects go to state 105
+ static_member go to state 106
+ variable_class_name go to state 107
+ array_function_dereference go to state 108
+ base_variable_with_function_calls go to state 109
+ base_variable go to state 110
+ reference_variable go to state 111
+ compound_variable go to state 112
+ simple_indirect_reference go to state 113
+ internal_functions_in_yacc go to state 114
+ class_constant go to state 115
+
+
+state 945
+
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 122 for_statement: ':' inner_statement_list . "endfor (T_ENDFOR)" ';'
+
+ "endfor (T_ENDFOR)" shift, and go to state 954
+
+ $default reduce using rule 26 (@4)
+
+ @4 go to state 366
+
+
+state 946
+
+ 124 foreach_statement: ':' inner_statement_list "endforeach (T_ENDFOREACH)" ';' .
+
+ $default reduce using rule 124 (foreach_statement)
+
+
+state 947
+
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 . '{' inner_statement_list '}' @26 additional_catches
+
+ '{' shift, and go to state 955
+
+
+state 948
+
+ 208 trait_alias: trait_method_reference "as (T_AS)" trait_modifiers "identifier (T_STRING)" .
+
+ $default reduce using rule 208 (trait_alias)
+
+
+state 949
+
+ 204 trait_reference_list: trait_reference_list ',' . fully_qualified_class_name
+
+ "identifier (T_STRING)" shift, and go to state 116
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
+
+ namespace_name go to state 516
+ fully_qualified_class_name go to state 956
+
+
+state 950
+
+ 227 class_variable_declaration: class_variable_declaration ',' "variable (T_VARIABLE)" '=' static_scalar .
+
+ $default reduce using rule 227 (class_variable_declaration)
+
+
+state 951
+
+ 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 '(' parameter_list . ')' method_body
+
+ ')' shift, and go to state 957
+
+
+state 952
+
+ 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr ')' ':' . @35 inner_statement_list
+
+ $default reduce using rule 146 (@35)
+
+ @35 go to state 958
+
+
+state 953
+
+ 144 elseif_list: elseif_list "elseif (T_ELSEIF)" '(' expr ')' @34 statement .
+
+ $default reduce using rule 144 (elseif_list)
+
+
+state 954
+
+ 122 for_statement: ':' inner_statement_list "endfor (T_ENDFOR)" . ';'
+
+ ';' shift, and go to state 959
+
+
+state 955
+
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' . inner_statement_list '}' @26 additional_catches
+
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 960
+
+
+state 956
+
+ 204 trait_reference_list: trait_reference_list ',' fully_qualified_class_name .
+
+ $default reduce using rule 204 (trait_reference_list)
+
+
+state 957
+
+ 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 '(' parameter_list ')' . method_body
+
+ ';' shift, and go to state 961
+ '{' shift, and go to state 962
+
+ method_body go to state 963
+
+
+state 958
+
+ 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr ')' ':' @35 . inner_statement_list
+
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 964
+
+
+state 959
+
+ 122 for_statement: ':' inner_statement_list "endfor (T_ENDFOR)" ';' .
+
+ $default reduce using rule 122 (for_statement)
+
+
+state 960
+
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list . '}' @26 additional_catches
+
+ '}' shift, and go to state 965
+
+ $default reduce using rule 26 (@4)
+
+ @4 go to state 366
+
+
+state 961
+
+ 212 method_body: ';' .
+
+ $default reduce using rule 212 (method_body)
+
+
+state 962
+
+ 213 method_body: '{' . inner_statement_list '}'
+
+ $default reduce using rule 28 (inner_statement_list)
+
+ inner_statement_list go to state 966
+
+
+state 963
+
+ 190 class_statement: method_modifiers function is_reference "identifier (T_STRING)" @37 '(' parameter_list ')' method_body .
+
+ $default reduce using rule 190 (class_statement)
+
+
+state 964
+
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 147 new_elseif_list: new_elseif_list "elseif (T_ELSEIF)" '(' expr ')' ':' @35 inner_statement_list .
+
+ "elseif (T_ELSEIF)" reduce using rule 147 (new_elseif_list)
+ "else (T_ELSE)" reduce using rule 147 (new_elseif_list)
+ "endif (T_ENDIF)" reduce using rule 147 (new_elseif_list)
+ $default reduce using rule 26 (@4)
+
+ @4 go to state 366
+
+
+state 965
+
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' . @26 additional_catches
+
+ $default reduce using rule 80 (@26)
+
+ @26 go to state 967
+
+
+state 966
+
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 213 method_body: '{' inner_statement_list . '}'
+
+ '}' shift, and go to state 968
+
+ $default reduce using rule 26 (@4)
+
+ @4 go to state 366
+
+
+state 967
+
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 . additional_catches
+
+ "catch (T_CATCH)" shift, and go to state 969
+
+ $default reduce using rule 85 (additional_catches)
+
+ additional_catches go to state 970
+ non_empty_additional_catches go to state 971
+ additional_catch go to state 972
+
+
+state 968
+
+ 213 method_body: '{' inner_statement_list '}' .
+
+ $default reduce using rule 213 (method_body)
+
+
+state 969
+
+ 90 additional_catch: "catch (T_CATCH)" . '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}'
+
+ '(' shift, and go to state 973
+
+
+state 970
+
+ 81 unticked_statement: "try (T_TRY)" @22 '{' inner_statement_list '}' "catch (T_CATCH)" '(' @23 fully_qualified_class_name @24 "variable (T_VARIABLE)" ')' @25 '{' inner_statement_list '}' @26 additional_catches .
+
+ $default reduce using rule 81 (unticked_statement)
+
+
+state 971
+
84 additional_catches: non_empty_additional_catches .
87 non_empty_additional_catches: non_empty_additional_catches . additional_catch
- T_CATCH shift, and go to state 880
+ "catch (T_CATCH)" shift, and go to state 969
$default reduce using rule 84 (additional_catches)
- additional_catch go to state 885
+ additional_catch go to state 974
-state 883
+state 972
86 non_empty_additional_catches: additional_catch .
$default reduce using rule 86 (non_empty_additional_catches)
-state 884
+state 973
- 90 additional_catch: T_CATCH '(' . fully_qualified_class_name @27 T_VARIABLE ')' $@28 '{' inner_statement_list '}'
+ 90 additional_catch: "catch (T_CATCH)" '(' . fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}'
- T_STRING shift, and go to state 111
- T_NAMESPACE shift, and go to state 488
- T_NS_SEPARATOR shift, and go to state 489
+ "identifier (T_STRING)" shift, and go to state 116
+ "namespace (T_NAMESPACE)" shift, and go to state 514
+ "\\ (T_NS_SEPARATOR)" shift, and go to state 515
- namespace_name go to state 490
- fully_qualified_class_name go to state 886
+ namespace_name go to state 516
+ fully_qualified_class_name go to state 975
-state 885
+state 974
87 non_empty_additional_catches: non_empty_additional_catches additional_catch .
$default reduce using rule 87 (non_empty_additional_catches)
-state 886
+state 975
- 90 additional_catch: T_CATCH '(' fully_qualified_class_name . @27 T_VARIABLE ')' $@28 '{' inner_statement_list '}'
+ 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name . @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}'
$default reduce using rule 88 (@27)
- @27 go to state 887
+ @27 go to state 976
-state 887
+state 976
- 90 additional_catch: T_CATCH '(' fully_qualified_class_name @27 . T_VARIABLE ')' $@28 '{' inner_statement_list '}'
+ 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 . "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}'
- T_VARIABLE shift, and go to state 888
+ "variable (T_VARIABLE)" shift, and go to state 977
-state 888
+state 977
- 90 additional_catch: T_CATCH '(' fully_qualified_class_name @27 T_VARIABLE . ')' $@28 '{' inner_statement_list '}'
+ 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" . ')' @28 '{' inner_statement_list '}'
- ')' shift, and go to state 889
+ ')' shift, and go to state 978
-state 889
+state 978
- 90 additional_catch: T_CATCH '(' fully_qualified_class_name @27 T_VARIABLE ')' . $@28 '{' inner_statement_list '}'
+ 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' . @28 '{' inner_statement_list '}'
- $default reduce using rule 89 ($@28)
+ $default reduce using rule 89 (@28)
- $@28 go to state 890
+ @28 go to state 979
-state 890
+state 979
- 90 additional_catch: T_CATCH '(' fully_qualified_class_name @27 T_VARIABLE ')' $@28 . '{' inner_statement_list '}'
+ 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 . '{' inner_statement_list '}'
- '{' shift, and go to state 891
+ '{' shift, and go to state 980
-state 891
+state 980
- 90 additional_catch: T_CATCH '(' fully_qualified_class_name @27 T_VARIABLE ')' $@28 '{' . inner_statement_list '}'
+ 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' . inner_statement_list '}'
$default reduce using rule 28 (inner_statement_list)
- inner_statement_list go to state 892
+ inner_statement_list go to state 981
-state 892
+state 981
- 27 inner_statement_list: inner_statement_list . $@4 inner_statement
- 90 additional_catch: T_CATCH '(' fully_qualified_class_name @27 T_VARIABLE ')' $@28 '{' inner_statement_list . '}'
+ 27 inner_statement_list: inner_statement_list . @4 inner_statement
+ 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list . '}'
- '}' shift, and go to state 893
+ '}' shift, and go to state 982
- $default reduce using rule 26 ($@4)
+ $default reduce using rule 26 (@4)
- $@4 go to state 347
+ @4 go to state 366
-state 893
+state 982
- 90 additional_catch: T_CATCH '(' fully_qualified_class_name @27 T_VARIABLE ')' $@28 '{' inner_statement_list '}' .
+ 90 additional_catch: "catch (T_CATCH)" '(' fully_qualified_class_name @27 "variable (T_VARIABLE)" ')' @28 '{' inner_statement_list '}' .
$default reduce using rule 90 (additional_catch)
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index 14cd47869..63bae36a6 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_parser.y 321634 2012-01-01 13:15:04Z felipe $ */
+/* $Id: zend_language_parser.y 322378 2012-01-17 08:09:13Z dmitry $ */
/*
* LALR shift/reduce conflicts and how they are resolved:
@@ -35,6 +35,9 @@
#include "zend_API.h"
#include "zend_constants.h"
+#define YYSIZE_T size_t
+#define yytnamerr zend_yytnamerr
+static YYSIZE_T zend_yytnamerr(char*, const char*);
#define YYERROR_VERBOSE
#define YYSTYPE znode
@@ -47,107 +50,163 @@
%}
%pure_parser
-%expect 2
+%expect 3
+%token END 0 "end of file"
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
+%token T_INCLUDE "include (T_INCLUDE)"
+%token T_INCLUDE_ONCE "include_once (T_INCLUDE_ONCE)"
+%token T_EVAL "eval (T_EVAL)"
+%token T_REQUIRE "require (T_REQUIRE)"
+%token T_REQUIRE_ONCE "require_once (T_REQUIRE_ONCE)"
%left ','
%left T_LOGICAL_OR
+%token T_LOGICAL_OR "or (T_LOGICAL_OR)"
%left T_LOGICAL_XOR
+%token T_LOGICAL_XOR "xor (T_LOGICAL_XOR)"
%left T_LOGICAL_AND
+%token T_LOGICAL_AND "and (T_LOGICAL_AND)"
%right T_PRINT
+%token T_PRINT "print (T_PRINT)"
%left '=' T_PLUS_EQUAL T_MINUS_EQUAL T_MUL_EQUAL T_DIV_EQUAL T_CONCAT_EQUAL T_MOD_EQUAL T_AND_EQUAL T_OR_EQUAL T_XOR_EQUAL T_SL_EQUAL T_SR_EQUAL
+%token T_PLUS_EQUAL "+= (T_PLUS_EQUAL)"
+%token T_MINUS_EQUAL "-= (T_MINUS_EQUAL)"
+%token T_MUL_EQUAL "*= (T_MUL_EQUAL)"
+%token T_DIV_EQUAL "/= (T_DIV_EQUAL)"
+%token T_CONCAT_EQUAL ".= (T_CONCAT_EQUAL)"
+%token T_MOD_EQUAL "%= (T_MOD_EQUAL)"
+%token T_AND_EQUAL "&= (T_AND_EQUAL)"
+%token T_OR_EQUAL "|= (T_OR_EQUAL)"
+%token T_XOR_EQUAL "^= (T_XOR_EQUAL)"
+%token T_SL_EQUAL "<<= (T_SL_EQUAL)"
+%token T_SR_EQUAL ">>= (T_SR_EQUAL)"
%left '?' ':'
%left T_BOOLEAN_OR
-%left T_BOOLEAN_AND
+%token T_BOOLEAN_OR "|| (T_BOOLEAN_OR)"
+%left T_BOOLEAN_AND
+%token T_BOOLEAN_AND "&& (T_BOOLEAN_AND)"
%left '|'
%left '^'
%left '&'
%nonassoc T_IS_EQUAL T_IS_NOT_EQUAL T_IS_IDENTICAL T_IS_NOT_IDENTICAL
+%token T_IS_EQUAL "== (T_IS_EQUAL)"
+%token T_IS_NOT_EQUAL "!= (T_IS_NOT_EQUAL)"
+%token T_IS_IDENTICAL "=== (T_IS_IDENTICAL)"
+%token T_IS_NOT_IDENTICAL "!== (T_IS_NOT_IDENTICAL)"
%nonassoc '<' T_IS_SMALLER_OR_EQUAL '>' T_IS_GREATER_OR_EQUAL
+%token T_IS_SMALLER_OR_EQUAL "<= (T_IS_SMALLER_OR_EQUAL)"
+%token T_IS_GREATER_OR_EQUAL ">= (T_IS_GREATER_OR_EQUAL)"
%left T_SL T_SR
+%token T_SL "<< (T_SL)"
+%token T_SR ">> (T_SR)"
%left '+' '-' '.'
%left '*' '/' '%'
%right '!'
%nonassoc T_INSTANCEOF
+%token T_INSTANCEOF "instanceof (T_INSTANCEOF)"
%right '~' T_INC T_DEC T_INT_CAST T_DOUBLE_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
+%token T_INC "++ (T_INC)"
+%token T_DEC "-- (T_DEC)"
+%token T_INT_CAST "(int) (T_INT_CAST)"
+%token T_DOUBLE_CAST "(double) (T_DOUBLE_CAST)"
+%token T_STRING_CAST "(string) (T_STRING_CAST)"
+%token T_ARRAY_CAST "(array) (T_ARRAY_CAST)"
+%token T_OBJECT_CAST "(object) (T_OBJECT_CAST)"
+%token T_BOOL_CAST "(bool) (T_BOOL_CAST)"
+%token T_UNSET_CAST "(unset) (T_UNSET_CAST)"
%right '['
%nonassoc T_NEW T_CLONE
-%token T_EXIT
-%token T_IF
+%token T_NEW "new (T_NEW)"
+%token T_CLONE "clone (T_CLONE)"
+%token T_EXIT "exit (T_EXIT)"
+%token T_IF "if (T_IF)"
%left T_ELSEIF
-%left T_ELSE
-%left T_ENDIF
-%token T_LNUMBER
-%token T_DNUMBER
-%token T_STRING
-%token T_STRING_VARNAME
-%token T_VARIABLE
-%token T_NUM_STRING
+%token T_ELSEIF "elseif (T_ELSEIF)"
+%left T_ELSE
+%token T_ELSE "else (T_ELSE)"
+%left T_ENDIF
+%token T_ENDIF "endif (T_ENDIF)"
+%token T_LNUMBER "integer number (T_LNUMBER)"
+%token T_DNUMBER "floating-point number (T_DNUMBER)"
+%token T_STRING "identifier (T_STRING)"
+%token T_STRING_VARNAME "variable name (T_STRING_VARNAME)"
+%token T_VARIABLE "variable (T_VARIABLE)"
+%token T_NUM_STRING "number (T_NUM_STRING)"
%token T_INLINE_HTML
%token T_CHARACTER
%token T_BAD_CHARACTER
-%token T_ENCAPSED_AND_WHITESPACE
-%token T_CONSTANT_ENCAPSED_STRING
-%token T_ECHO
-%token T_DO
-%token T_WHILE
-%token T_ENDWHILE
-%token T_FOR
-%token T_ENDFOR
-%token T_FOREACH
-%token T_ENDFOREACH
-%token T_DECLARE
-%token T_ENDDECLARE
-%token T_AS
-%token T_SWITCH
-%token T_ENDSWITCH
-%token T_CASE
-%token T_DEFAULT
-%token T_BREAK
-%token T_CONTINUE
-%token T_GOTO
-%token T_FUNCTION
-%token T_CONST
-%token T_RETURN
-%token T_TRY
-%token T_CATCH
-%token T_THROW
-%token T_USE
-%token T_GLOBAL
+%token T_ENCAPSED_AND_WHITESPACE "quoted-string and whitespace (T_ENCAPSED_AND_WHITESPACE)"
+%token T_CONSTANT_ENCAPSED_STRING "quoted-string (T_CONSTANT_ENCAPSED_STRING)"
+%token T_ECHO "echo (T_ECHO)"
+%token T_DO "do (T_DO)"
+%token T_WHILE "while (T_WHILE)"
+%token T_ENDWHILE "endwhile (T_ENDWHILE)"
+%token T_FOR "for (T_FOR)"
+%token T_ENDFOR "endfor (T_ENDFOR)"
+%token T_FOREACH "foreach (T_FOREACH)"
+%token T_ENDFOREACH "endforeach (T_ENDFOREACH)"
+%token T_DECLARE "declare (T_DECLARE)"
+%token T_ENDDECLARE "enddeclare (T_ENDDECLARE)"
+%token T_AS "as (T_AS)"
+%token T_SWITCH "switch (T_SWITCH)"
+%token T_ENDSWITCH "endswitch (T_ENDSWITCH)"
+%token T_CASE "case (T_CASE)"
+%token T_DEFAULT "default (T_DEFAULT)"
+%token T_BREAK "break (T_BREAK)"
+%token T_CONTINUE "continue (T_CONTINUE)"
+%token T_GOTO "goto (T_GOTO)"
+%token T_FUNCTION "function (T_FUNCTION)"
+%token T_CONST "const (T_CONST)"
+%token T_RETURN "return (T_RETURN)"
+%token T_TRY "try (T_TRY)"
+%token T_CATCH "catch (T_CATCH)"
+%token T_THROW "throw (T_THROW)"
+%token T_USE "use (T_USE)"
+%token T_INSTEADOF "insteadof (T_INSTEADOF)"
+%token T_GLOBAL "global (T_GLOBAL)"
%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC
-%token T_VAR
-%token T_UNSET
-%token T_ISSET
-%token T_EMPTY
-%token T_HALT_COMPILER
-%token T_CLASS
-%token T_INTERFACE
-%token T_EXTENDS
-%token T_IMPLEMENTS
-%token T_OBJECT_OPERATOR
-%token T_DOUBLE_ARROW
-%token T_LIST
-%token T_ARRAY
-%token T_CLASS_C
-%token T_METHOD_C
-%token T_FUNC_C
-%token T_LINE
-%token T_FILE
-%token T_COMMENT
-%token T_DOC_COMMENT
-%token T_OPEN_TAG
-%token T_OPEN_TAG_WITH_ECHO
-%token T_CLOSE_TAG
-%token T_WHITESPACE
-%token T_START_HEREDOC
-%token T_END_HEREDOC
-%token T_DOLLAR_OPEN_CURLY_BRACES
-%token T_CURLY_OPEN
-%token T_PAAMAYIM_NEKUDOTAYIM
-%token T_NAMESPACE
-%token T_NS_C
-%token T_DIR
-%token T_NS_SEPARATOR
+%token T_STATIC "static (T_STATIC)"
+%token T_ABSTRACT "abstract (T_ABSTRACT)"
+%token T_FINAL "final (T_FINAL)"
+%token T_PRIVATE "private (T_PRIVATE)"
+%token T_PROTECTED "protected (T_PROTECTED)"
+%token T_PUBLIC "public (T_PUBLIC)"
+%token T_VAR "var (T_VAR)"
+%token T_UNSET "unset (T_UNSET)"
+%token T_ISSET "isset (T_ISSET)"
+%token T_EMPTY "empty (T_EMPTY)"
+%token T_HALT_COMPILER "__halt_compiler (T_HALT_COMPILER)"
+%token T_CLASS "class (T_CLASS)"
+%token T_TRAIT "trait (T_TRAIT)"
+%token T_INTERFACE "interface (T_INTERFACE)"
+%token T_EXTENDS "extends (T_EXTENDS)"
+%token T_IMPLEMENTS "implements (T_IMPLEMENTS)"
+%token T_OBJECT_OPERATOR "-> (T_OBJECT_OPERATOR)"
+%token T_DOUBLE_ARROW "=> (T_DOUBLE_ARROW)"
+%token T_LIST "list (T_LIST)"
+%token T_ARRAY "array (T_ARRAY)"
+%token T_CALLABLE "callable (T_CALLABLE)"
+%token T_CLASS_C "__CLASS__ (T_CLASS_C)"
+%token T_TRAIT_C "__TRAIT__ (T_TRAIT_C)"
+%token T_METHOD_C "__METHOD__ (T_METHOD_C)"
+%token T_FUNC_C "__FUNCTION__ (T_FUNC_C)"
+%token T_LINE "__LINE__ (T_LINE)"
+%token T_FILE "__FILE__ (T_FILE)"
+%token T_COMMENT "comment (T_COMMENT)"
+%token T_DOC_COMMENT "doc comment (T_DOC_COMMENT)"
+%token T_OPEN_TAG "open tag (T_OPEN_TAG)"
+%token T_OPEN_TAG_WITH_ECHO "open tag with echo (T_OPEN_TAG_WITH_ECHO)"
+%token T_CLOSE_TAG "close tag (T_CLOSE_TAG)"
+%token T_WHITESPACE "whitespace (T_WHITESPACE)"
+%token T_START_HEREDOC "heredoc start (T_START_HEREDOC)"
+%token T_END_HEREDOC "heredoc end (T_END_HEREDOC)"
+%token T_DOLLAR_OPEN_CURLY_BRACES "${ (T_DOLLAR_OPEN_CURLY_BRACES)"
+%token T_CURLY_OPEN "{$ (T_CURLY_OPEN)"
+%token T_PAAMAYIM_NEKUDOTAYIM ":: (T_PAAMAYIM_NEKUDOTAYIM)"
+%token T_NAMESPACE "namespace (T_NAMESPACE)"
+%token T_NS_C "__NAMESPACE__ (T_NS_C)"
+%token T_DIR "__DIR__ (T_DIR)"
+%token T_NS_SEPARATOR "\\ (T_NS_SEPARATOR)"
%% /* Rules */
@@ -219,12 +278,12 @@ unticked_statement:
'{' inner_statement_list '}'
| T_IF '(' expr ')' { zend_do_if_cond(&$3, &$4 TSRMLS_CC); } statement { zend_do_if_after_statement(&$4, 1 TSRMLS_CC); } elseif_list else_single { zend_do_if_end(TSRMLS_C); }
| T_IF '(' expr ')' ':' { zend_do_if_cond(&$3, &$4 TSRMLS_CC); } inner_statement_list { zend_do_if_after_statement(&$4, 1 TSRMLS_CC); } new_elseif_list new_else_single T_ENDIF ';' { zend_do_if_end(TSRMLS_C); }
- | T_WHILE '(' { $1.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' { zend_do_while_cond(&$4, &$5 TSRMLS_CC); } while_statement { zend_do_while_end(&$1, &$5 TSRMLS_CC); }
- | T_DO { $1.u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(TSRMLS_C); } statement T_WHILE '(' { $5.u.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' ';' { zend_do_do_while_end(&$1, &$5, &$7 TSRMLS_CC); }
+ | T_WHILE '(' { $1.u.op.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' { zend_do_while_cond(&$4, &$5 TSRMLS_CC); } while_statement { zend_do_while_end(&$1, &$5 TSRMLS_CC); }
+ | T_DO { $1.u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_do_while_begin(TSRMLS_C); } statement T_WHILE '(' { $5.u.op.opline_num = get_next_op_number(CG(active_op_array)); } expr ')' ';' { zend_do_do_while_end(&$1, &$5, &$7 TSRMLS_CC); }
| T_FOR
'('
for_expr
- ';' { zend_do_free(&$3 TSRMLS_CC); $4.u.opline_num = get_next_op_number(CG(active_op_array)); }
+ ';' { zend_do_free(&$3 TSRMLS_CC); $4.u.op.opline_num = get_next_op_number(CG(active_op_array)); }
for_expr
';' { zend_do_extended_info(TSRMLS_C); zend_do_for_cond(&$6, &$7 TSRMLS_CC); }
for_expr
@@ -252,7 +311,7 @@ unticked_statement:
{ zend_do_foreach_begin(&$1, &$2, &$3, &$4, 0 TSRMLS_CC); }
variable foreach_optional_arg ')' { zend_check_writable_variable(&$6); zend_do_foreach_cont(&$1, &$2, &$4, &$6, &$7 TSRMLS_CC); }
foreach_statement { zend_do_foreach_end(&$1, &$4 TSRMLS_CC); }
- | T_DECLARE { $1.u.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); } '(' declare_list ')' declare_statement { zend_do_declare_end(&$1 TSRMLS_CC); }
+ | T_DECLARE { $1.u.op.opline_num = get_next_op_number(CG(active_op_array)); zend_do_declare_begin(TSRMLS_C); } '(' declare_list ')' declare_statement { zend_do_declare_end(&$1 TSRMLS_CC); }
| ';' /* empty statement */
| T_TRY { zend_do_try(&$1 TSRMLS_CC); } '{' inner_statement_list '}'
T_CATCH '(' { zend_initialize_try_catch_element(&$1 TSRMLS_CC); }
@@ -267,7 +326,7 @@ unticked_statement:
additional_catches:
non_empty_additional_catches { $$ = $1; }
- | /* empty */ { $$.u.opline_num = -1; }
+ | /* empty */ { $$.u.op.opline_num = -1; }
;
non_empty_additional_catches:
@@ -277,7 +336,7 @@ non_empty_additional_catches:
additional_catch:
- T_CATCH '(' fully_qualified_class_name { $$.u.opline_num = get_next_op_number(CG(active_op_array)); } T_VARIABLE ')' { zend_do_begin_catch(&$1, &$3, &$5, NULL TSRMLS_CC); } '{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
+ T_CATCH '(' fully_qualified_class_name { $$.u.op.opline_num = get_next_op_number(CG(active_op_array)); } T_VARIABLE ')' { zend_do_begin_catch(&$1, &$3, &$5, NULL TSRMLS_CC); } '{' inner_statement_list '}' { zend_do_end_catch(&$1 TSRMLS_CC); }
;
@@ -327,9 +386,10 @@ unticked_class_declaration_statement:
class_entry_type:
- T_CLASS { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type = 0; }
- | T_ABSTRACT T_CLASS { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
- | T_FINAL T_CLASS { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type = ZEND_ACC_FINAL_CLASS; }
+ T_CLASS { $$.u.op.opline_num = CG(zend_lineno); $$.EA = 0; }
+ | T_ABSTRACT T_CLASS { $$.u.op.opline_num = CG(zend_lineno); $$.EA = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
+ | T_TRAIT { $$.u.op.opline_num = CG(zend_lineno); $$.EA = ZEND_ACC_TRAIT; }
+ | T_FINAL T_CLASS { $$.u.op.opline_num = CG(zend_lineno); $$.EA = ZEND_ACC_FINAL_CLASS; }
;
extends_from:
@@ -338,7 +398,7 @@ extends_from:
;
interface_entry:
- T_INTERFACE { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type = ZEND_ACC_INTERFACE; }
+ T_INTERFACE { $$.u.op.opline_num = CG(zend_lineno); $$.EA = ZEND_ACC_INTERFACE; }
;
interface_extends_list:
@@ -364,7 +424,7 @@ foreach_optional_arg:
foreach_variable:
variable { zend_check_writable_variable(&$1); $$ = $1; }
- | '&' variable { zend_check_writable_variable(&$2); $$ = $2; $$.u.EA.type |= ZEND_PARSED_REFERENCE_VARIABLE; }
+ | '&' variable { zend_check_writable_variable(&$2); $$ = $2; $$.EA |= ZEND_PARSED_REFERENCE_VARIABLE; }
;
for_statement:
@@ -450,21 +510,22 @@ parameter_list:
non_empty_parameter_list:
- optional_class_type T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$2, 0 TSRMLS_CC); $$.op_type = IS_CONST; Z_LVAL($$.u.constant)=1; Z_TYPE($$.u.constant)=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, &$1, &$2, 0 TSRMLS_CC); }
- | optional_class_type '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$3, 0 TSRMLS_CC); $$.op_type = IS_CONST; Z_LVAL($$.u.constant)=1; Z_TYPE($$.u.constant)=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, &$1, &$3, 1 TSRMLS_CC); }
- | optional_class_type '&' T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$3, 0 TSRMLS_CC); $$.op_type = IS_CONST; Z_LVAL($$.u.constant)=1; Z_TYPE($$.u.constant)=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$5, &$1, &$3, 1 TSRMLS_CC); }
- | optional_class_type T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$2, 0 TSRMLS_CC); $$.op_type = IS_CONST; Z_LVAL($$.u.constant)=1; Z_TYPE($$.u.constant)=IS_LONG; INIT_PZVAL(&$$.u.constant); zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$4, &$1, &$2, 0 TSRMLS_CC); }
- | non_empty_parameter_list ',' optional_class_type T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$4, 0 TSRMLS_CC); $$=$1; Z_LVAL($$.u.constant)++; zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, &$3, &$4, 0 TSRMLS_CC); }
- | non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE { znode tmp; fetch_simple_variable(&tmp, &$5, 0 TSRMLS_CC); $$=$1; Z_LVAL($$.u.constant)++; zend_do_receive_arg(ZEND_RECV, &tmp, &$$, NULL, &$3, &$5, 1 TSRMLS_CC); }
- | non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$5, 0 TSRMLS_CC); $$=$1; Z_LVAL($$.u.constant)++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$7, &$3, &$5, 1 TSRMLS_CC); }
- | non_empty_parameter_list ',' optional_class_type T_VARIABLE '=' static_scalar { znode tmp; fetch_simple_variable(&tmp, &$4, 0 TSRMLS_CC); $$=$1; Z_LVAL($$.u.constant)++; zend_do_receive_arg(ZEND_RECV_INIT, &tmp, &$$, &$6, &$3, &$4, 0 TSRMLS_CC); }
+ optional_class_type T_VARIABLE { $$.op_type = IS_UNUSED; $$.u.op.num=1; zend_do_receive_arg(ZEND_RECV, &$2, &$$, NULL, &$1, 0 TSRMLS_CC); }
+ | optional_class_type '&' T_VARIABLE { $$.op_type = IS_UNUSED; $$.u.op.num=1; zend_do_receive_arg(ZEND_RECV, &$3, &$$, NULL, &$1, 1 TSRMLS_CC); }
+ | optional_class_type '&' T_VARIABLE '=' static_scalar { $$.op_type = IS_UNUSED; $$.u.op.num=1; zend_do_receive_arg(ZEND_RECV_INIT, &$3, &$$, &$5, &$1, 1 TSRMLS_CC); }
+ | optional_class_type T_VARIABLE '=' static_scalar { $$.op_type = IS_UNUSED; $$.u.op.num=1; zend_do_receive_arg(ZEND_RECV_INIT, &$2, &$$, &$4, &$1, 0 TSRMLS_CC); }
+ | non_empty_parameter_list ',' optional_class_type T_VARIABLE { $$=$1; $$.u.op.num++; zend_do_receive_arg(ZEND_RECV, &$4, &$$, NULL, &$3, 0 TSRMLS_CC); }
+ | non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE { $$=$1; $$.u.op.num++; zend_do_receive_arg(ZEND_RECV, &$5, &$$, NULL, &$3, 1 TSRMLS_CC); }
+ | non_empty_parameter_list ',' optional_class_type '&' T_VARIABLE '=' static_scalar { $$=$1; $$.u.op.num++; zend_do_receive_arg(ZEND_RECV_INIT, &$5, &$$, &$7, &$3, 1 TSRMLS_CC); }
+ | non_empty_parameter_list ',' optional_class_type T_VARIABLE '=' static_scalar { $$=$1; $$.u.op.num++; zend_do_receive_arg(ZEND_RECV_INIT, &$4, &$$, &$6, &$3, 0 TSRMLS_CC); }
;
optional_class_type:
/* empty */ { $$.op_type = IS_UNUSED; }
- | fully_qualified_class_name { $$ = $1; }
- | T_ARRAY { $$.op_type = IS_CONST; Z_TYPE($$.u.constant)=IS_NULL;}
+ | T_ARRAY { $$.op_type = IS_CONST; Z_TYPE($$.u.constant)=IS_ARRAY; }
+ | T_CALLABLE { $$.op_type = IS_CONST; Z_TYPE($$.u.constant)=IS_CALLABLE; }
+ | fully_qualified_class_name { $$ = $1; }
;
@@ -514,10 +575,67 @@ class_statement_list:
class_statement:
variable_modifiers { CG(access_type) = Z_LVAL($1.u.constant); } class_variable_declaration ';'
| class_constant_declaration ';'
+ | trait_use_statement
| method_modifiers function is_reference T_STRING { zend_do_begin_function_declaration(&$2, &$4, 1, $3.op_type, &$1 TSRMLS_CC); } '('
parameter_list ')' method_body { zend_do_abstract_method(&$4, &$1, &$9 TSRMLS_CC); zend_do_end_function_declaration(&$2 TSRMLS_CC); }
;
+trait_use_statement:
+ T_USE trait_list trait_adaptations
+;
+
+trait_list:
+ fully_qualified_class_name { zend_do_implements_trait(&$1 TSRMLS_CC); }
+ | trait_list ',' fully_qualified_class_name { zend_do_implements_trait(&$3 TSRMLS_CC); }
+;
+
+trait_adaptations:
+ ';'
+ | '{' trait_adaptation_list '}'
+;
+
+trait_adaptation_list:
+ /* empty */
+ | non_empty_trait_adaptation_list
+;
+
+non_empty_trait_adaptation_list:
+ trait_adaptation_statement
+ | non_empty_trait_adaptation_list trait_adaptation_statement
+;
+
+trait_adaptation_statement:
+ trait_precedence ';' { zend_add_trait_precedence(&$1 TSRMLS_CC); }
+ | trait_alias ';' { zend_add_trait_alias(&$1 TSRMLS_CC); }
+;
+
+trait_precedence:
+ trait_method_reference_fully_qualified T_INSTEADOF trait_reference_list { zend_prepare_trait_precedence(&$$, &$1, &$3 TSRMLS_CC); }
+;
+
+trait_reference_list:
+ fully_qualified_class_name { zend_resolve_class_name(&$1, ZEND_FETCH_CLASS_GLOBAL, 1 TSRMLS_CC); zend_init_list(&$$.u.op.ptr, Z_STRVAL($1.u.constant) TSRMLS_CC); }
+ | trait_reference_list ',' fully_qualified_class_name { zend_resolve_class_name(&$3, ZEND_FETCH_CLASS_GLOBAL, 1 TSRMLS_CC); zend_add_to_list(&$1.u.op.ptr, Z_STRVAL($3.u.constant) TSRMLS_CC); $$ = $1; }
+;
+
+trait_method_reference:
+ T_STRING { zend_prepare_reference(&$$, NULL, &$1 TSRMLS_CC); }
+ | trait_method_reference_fully_qualified { $$ = $1; }
+;
+
+trait_method_reference_fully_qualified:
+ fully_qualified_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING { zend_prepare_reference(&$$, &$1, &$3 TSRMLS_CC); }
+;
+
+trait_alias:
+ trait_method_reference T_AS trait_modifiers T_STRING { zend_prepare_trait_alias(&$$, &$1, &$3, &$4 TSRMLS_CC); }
+ | trait_method_reference T_AS member_modifier { zend_prepare_trait_alias(&$$, &$1, &$3, NULL TSRMLS_CC); }
+;
+
+trait_modifiers:
+ /* empty */ { Z_LVAL($$.u.constant) = 0x0; } /* No change of methods visibility */
+ | member_modifier { $$ = $1; } /* REM: Keep in mind, there are not only visibility modifiers */
+;
method_body:
';' /* abstract method */ { Z_LVAL($$.u.constant) = ZEND_ACC_ABSTRACT; }
@@ -576,12 +694,37 @@ non_empty_for_expr:
| expr { $$ = $1; }
;
+chaining_method_or_property:
+ chaining_method_or_property variable_property { $$.EA = $2.EA; }
+ | variable_property { $$.EA = $1.EA; }
+;
+
+chaining_dereference:
+ chaining_dereference '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
+ | '[' dim_offset ']' { zend_do_pop_object(&$1 TSRMLS_CC); fetch_array_dim(&$$, &$1, &$2 TSRMLS_CC); }
+;
+
+chaining_instance_call:
+ chaining_dereference { zend_do_push_object(&$1 TSRMLS_CC); } chaining_method_or_property { $$ = $3; }
+ | chaining_dereference { zend_do_push_object(&$1 TSRMLS_CC); $$ = $1; }
+ | chaining_method_or_property { $$ = $1; }
+;
+
+instance_call:
+ /* empty */ { $$ = $0; }
+ | { zend_do_push_object(&$0 TSRMLS_CC); zend_do_begin_variable_parse(TSRMLS_C); }
+ chaining_instance_call { zend_do_pop_object(&$$ TSRMLS_CC); zend_do_end_variable_parse(&$2, BP_VAR_R, 0 TSRMLS_CC); }
+;
+
+new_expr:
+ T_NEW class_name_reference { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$1, &$2 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$1, &$4 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+;
+
expr_without_variable:
T_LIST '(' { zend_do_list_init(TSRMLS_C); } assignment_list ')' '=' expr { zend_do_list_end(&$$, &$7 TSRMLS_CC); }
| variable '=' expr { zend_check_writable_variable(&$1); zend_do_assign(&$$, &$1, &$3 TSRMLS_CC); }
| variable '=' '&' variable { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$4, BP_VAR_W, 1 TSRMLS_CC); zend_do_end_variable_parse(&$1, BP_VAR_W, 0 TSRMLS_CC); zend_do_assign_ref(&$$, &$1, &$4 TSRMLS_CC); }
- | variable '=' '&' T_NEW class_name_reference { zend_error(E_DEPRECATED, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(&$1, BP_VAR_W, 0 TSRMLS_CC); $3.u.EA.type = ZEND_PARSED_NEW; zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
- | T_NEW class_name_reference { zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$1, &$2 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$$, &$1, &$4 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ | variable '=' '&' T_NEW class_name_reference { zend_error(E_DEPRECATED, "Assigning the return value of new by reference is deprecated"); zend_check_writable_variable(&$1); zend_do_extended_fcall_begin(TSRMLS_C); zend_do_begin_new_object(&$4, &$5 TSRMLS_CC); } ctor_arguments { zend_do_end_new_object(&$3, &$4, &$7 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); zend_do_end_variable_parse(&$1, BP_VAR_W, 0 TSRMLS_CC); $3.EA = ZEND_PARSED_NEW; zend_do_assign_ref(&$$, &$1, &$3 TSRMLS_CC); }
| T_CLONE expr { zend_do_clone(&$$, &$2 TSRMLS_CC); }
| variable T_PLUS_EQUAL expr { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_ADD, &$$, &$1, &$3 TSRMLS_CC); }
| variable T_MINUS_EQUAL expr { zend_check_writable_variable(&$1); zend_do_end_variable_parse(&$1, BP_VAR_RW, 0 TSRMLS_CC); zend_do_binary_assign_op(ZEND_ASSIGN_SUB, &$$, &$1, &$3 TSRMLS_CC); }
@@ -628,6 +771,8 @@ expr_without_variable:
| expr T_IS_GREATER_OR_EQUAL expr { zend_do_binary_op(ZEND_IS_SMALLER_OR_EQUAL, &$$, &$3, &$1 TSRMLS_CC); }
| expr T_INSTANCEOF class_name_reference { zend_do_instanceof(&$$, &$1, &$3, 0 TSRMLS_CC); }
| '(' expr ')' { $$ = $2; }
+ | new_expr { $$ = $1; }
+ | '(' new_expr ')' { $$ = $2; } instance_call { $$ = $5; }
| expr '?' { zend_do_begin_qm_op(&$1, &$2 TSRMLS_CC); }
expr ':' { zend_do_qm_true(&$4, &$2, &$5 TSRMLS_CC); }
expr { zend_do_qm_false(&$$, &$7, &$2, &$5 TSRMLS_CC); }
@@ -645,14 +790,17 @@ expr_without_variable:
| '@' { zend_do_begin_silence(&$1 TSRMLS_CC); } expr { zend_do_end_silence(&$1 TSRMLS_CC); $$ = $3; }
| scalar { $$ = $1; }
| T_ARRAY '(' array_pair_list ')' { $$ = $3; }
+ | '[' array_pair_list ']' { $$ = $2; }
| '`' backticks_expr '`' { zend_do_shell_exec(&$$, &$2 TSRMLS_CC); }
| T_PRINT expr { zend_do_print(&$$, &$2 TSRMLS_CC); }
- | function is_reference '(' { zend_do_begin_lambda_function_declaration(&$$, &$1, $2.op_type TSRMLS_CC); }
+ | function is_reference '(' { zend_do_begin_lambda_function_declaration(&$$, &$1, $2.op_type, 0 TSRMLS_CC); }
parameter_list ')' lexical_vars '{' inner_statement_list '}' { zend_do_end_function_declaration(&$1 TSRMLS_CC); $$ = $4; }
+ | T_STATIC function is_reference '(' { zend_do_begin_lambda_function_declaration(&$$, &$2, $3.op_type, 1 TSRMLS_CC); }
+ parameter_list ')' lexical_vars '{' inner_statement_list '}' { zend_do_end_function_declaration(&$2 TSRMLS_CC); $$ = $5; }
;
function:
- T_FUNCTION { $$.u.opline_num = CG(zend_lineno); }
+ T_FUNCTION { $$.u.op.opline_num = CG(zend_lineno); }
;
lexical_vars:
@@ -668,22 +816,22 @@ lexical_var_list:
;
function_call:
- namespace_name '(' { $2.u.opline_num = zend_do_begin_function_call(&$1, 1 TSRMLS_CC); }
+ namespace_name '(' { $2.u.op.opline_num = zend_do_begin_function_call(&$1, 1 TSRMLS_CC); }
function_call_parameter_list
- ')' { zend_do_end_function_call(&$1, &$$, &$4, 0, $2.u.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
- | T_NAMESPACE T_NS_SEPARATOR namespace_name '(' { $1.op_type = IS_CONST; ZVAL_EMPTY_STRING(&$1.u.constant); zend_do_build_namespace_name(&$1, &$1, &$3 TSRMLS_CC); $4.u.opline_num = zend_do_begin_function_call(&$1, 0 TSRMLS_CC); }
+ ')' { zend_do_end_function_call(&$1, &$$, &$4, 0, $2.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ | T_NAMESPACE T_NS_SEPARATOR namespace_name '(' { $1.op_type = IS_CONST; ZVAL_EMPTY_STRING(&$1.u.constant); zend_do_build_namespace_name(&$1, &$1, &$3 TSRMLS_CC); $4.u.op.opline_num = zend_do_begin_function_call(&$1, 0 TSRMLS_CC); }
function_call_parameter_list
- ')' { zend_do_end_function_call(&$1, &$$, &$6, 0, $4.u.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
- | T_NS_SEPARATOR namespace_name '(' { $3.u.opline_num = zend_do_begin_function_call(&$2, 0 TSRMLS_CC); }
+ ')' { zend_do_end_function_call(&$1, &$$, &$6, 0, $4.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ | T_NS_SEPARATOR namespace_name '(' { $3.u.op.opline_num = zend_do_begin_function_call(&$2, 0 TSRMLS_CC); }
function_call_parameter_list
- ')' { zend_do_end_function_call(&$2, &$$, &$5, 0, $3.u.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
- | class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { $4.u.opline_num = zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
+ ')' { zend_do_end_function_call(&$2, &$$, &$5, 0, $3.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+ | class_name T_PAAMAYIM_NEKUDOTAYIM variable_name '(' { $4.u.op.opline_num = zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
function_call_parameter_list
- ')' { zend_do_end_function_call($4.u.opline_num?NULL:&$3, &$$, &$6, $4.u.opline_num, $4.u.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
+ ')' { zend_do_end_function_call($4.u.op.opline_num?NULL:&$3, &$$, &$6, $4.u.op.opline_num, $4.u.op.opline_num TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
| class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' { zend_do_end_variable_parse(&$3, BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
function_call_parameter_list
')' { zend_do_end_function_call(NULL, &$$, &$6, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
- | variable_class_name T_PAAMAYIM_NEKUDOTAYIM T_STRING '(' { zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
+ | variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_name '(' { zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
function_call_parameter_list
')' { zend_do_end_function_call(NULL, &$$, &$6, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);}
| variable_class_name T_PAAMAYIM_NEKUDOTAYIM variable_without_objects '(' { zend_do_end_variable_parse(&$3, BP_VAR_R, 0 TSRMLS_CC); zend_do_begin_class_member_function_call(&$1, &$3 TSRMLS_CC); }
@@ -717,8 +865,8 @@ class_name_reference:
dynamic_class_name_reference:
base_variable T_OBJECT_OPERATOR { zend_do_push_object(&$1 TSRMLS_CC); }
- object_property { zend_do_push_object(&$4 TSRMLS_CC); zend_do_declare_implicit_property(TSRMLS_C); } dynamic_class_name_variable_properties
- { zend_do_pop_object(&$$ TSRMLS_CC); $$.u.EA.type = ZEND_PARSED_MEMBER; }
+ object_property { zend_do_push_object(&$4 TSRMLS_CC); } dynamic_class_name_variable_properties
+ { zend_do_pop_object(&$$ TSRMLS_CC); $$.EA = ZEND_PARSED_MEMBER; }
| base_variable { $$ = $1; }
;
@@ -730,7 +878,7 @@ dynamic_class_name_variable_properties:
dynamic_class_name_variable_property:
- T_OBJECT_OPERATOR object_property { zend_do_push_object(&$2 TSRMLS_CC); zend_do_declare_implicit_property(TSRMLS_C); }
+ T_OBJECT_OPERATOR object_property { zend_do_push_object(&$2 TSRMLS_CC); }
;
exit_expr:
@@ -759,7 +907,7 @@ common_scalar:
| T_LINE { $$ = $1; }
| T_FILE { $$ = $1; }
| T_DIR { $$ = $1; }
- | T_CLASS_C { $$ = $1; }
+ | T_TRAIT_C { $$ = $1; }
| T_METHOD_C { $$ = $1; }
| T_FUNC_C { $$ = $1; }
| T_NS_C { $$ = $1; }
@@ -776,7 +924,9 @@ static_scalar: /* compile-time evaluated scalars */
| '+' static_scalar { ZVAL_LONG(&$1.u.constant, 0); add_function(&$2.u.constant, &$1.u.constant, &$2.u.constant TSRMLS_CC); $$ = $2; }
| '-' static_scalar { ZVAL_LONG(&$1.u.constant, 0); sub_function(&$2.u.constant, &$1.u.constant, &$2.u.constant TSRMLS_CC); $$ = $2; }
| T_ARRAY '(' static_array_pair_list ')' { $$ = $3; Z_TYPE($$.u.constant) = IS_CONSTANT_ARRAY; }
+ | '[' static_array_pair_list ']' { $$ = $2; Z_TYPE($$.u.constant) = IS_CONSTANT_ARRAY; }
| static_class_constant { $$ = $1; }
+ | T_CLASS_C { $$ = $1; }
;
static_class_constant:
@@ -792,6 +942,7 @@ scalar:
| common_scalar { $$ = $1; }
| '"' encaps_list '"' { $$ = $2; }
| T_START_HEREDOC encaps_list T_END_HEREDOC { $$ = $2; CG(heredoc) = Z_STRVAL($1.u.constant); CG(heredoc_len) = Z_STRLEN($1.u.constant); }
+ | T_CLASS_C { if (Z_TYPE($1.u.constant) == IS_CONSTANT) {zend_do_fetch_constant(&$$, NULL, &$1, ZEND_RT, 1 TSRMLS_CC);} else {$$ = $1;} }
;
@@ -836,26 +987,35 @@ rw_variable:
variable:
base_variable_with_function_calls T_OBJECT_OPERATOR { zend_do_push_object(&$1 TSRMLS_CC); }
object_property { zend_do_push_object(&$4 TSRMLS_CC); } method_or_not variable_properties
- { zend_do_pop_object(&$$ TSRMLS_CC); $$.u.EA.type = $1.u.EA.type | ($7.u.EA.type ? $7.u.EA.type : $6.u.EA.type); }
+ { zend_do_pop_object(&$$ TSRMLS_CC); $$.EA = $1.EA | ($7.EA ? $7.EA : $6.EA); }
| base_variable_with_function_calls { $$ = $1; }
;
variable_properties:
- variable_properties variable_property { $$.u.EA.type = $2.u.EA.type; }
- | /* empty */ { $$.u.EA.type = 0; }
+ variable_properties variable_property { $$.EA = $2.EA; }
+ | /* empty */ { $$.EA = 0; }
;
variable_property:
- T_OBJECT_OPERATOR object_property { zend_do_push_object(&$2 TSRMLS_CC); } method_or_not { $$.u.EA.type = $4.u.EA.type; }
+ T_OBJECT_OPERATOR object_property { zend_do_push_object(&$2 TSRMLS_CC); } method_or_not { $$.EA = $4.EA; }
;
-method_or_not:
+array_method_dereference:
+ array_method_dereference '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
+ | method '[' dim_offset ']' { $1.EA = ZEND_PARSED_METHOD_CALL; fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
+;
+
+method:
'(' { zend_do_pop_object(&$1 TSRMLS_CC); zend_do_begin_method_call(&$1 TSRMLS_CC); }
function_call_parameter_list ')'
- { zend_do_end_function_call(&$1, &$$, &$3, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C);
- zend_do_push_object(&$$ TSRMLS_CC); $$.u.EA.type = ZEND_PARSED_METHOD_CALL; }
- | /* empty */ { zend_do_declare_implicit_property(TSRMLS_C); $$.u.EA.type = ZEND_PARSED_MEMBER; }
+ { zend_do_end_function_call(&$1, &$$, &$3, 1, 1 TSRMLS_CC); zend_do_extended_fcall_end(TSRMLS_C); }
+;
+
+method_or_not:
+ method { $$ = $1; $$.EA = ZEND_PARSED_METHOD_CALL; zend_do_push_object(&$$ TSRMLS_CC); }
+ | array_method_dereference { $$ = $1; zend_do_push_object(&$$ TSRMLS_CC); }
+ | /* empty */ { $$.EA = ZEND_PARSED_MEMBER; }
;
variable_without_objects:
@@ -873,16 +1033,23 @@ variable_class_name:
reference_variable { zend_do_end_variable_parse(&$1, BP_VAR_R, 0 TSRMLS_CC); $$=$1;; }
;
+array_function_dereference:
+ array_function_dereference '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$3 TSRMLS_CC); }
+ | function_call { zend_do_begin_variable_parse(TSRMLS_C); $1.EA = ZEND_PARSED_FUNCTION_CALL; }
+ '[' dim_offset ']' { fetch_array_dim(&$$, &$1, &$4 TSRMLS_CC); }
+;
+
base_variable_with_function_calls:
- base_variable { $$ = $1; }
- | function_call { zend_do_begin_variable_parse(TSRMLS_C); $$ = $1; $$.u.EA.type = ZEND_PARSED_FUNCTION_CALL; }
+ base_variable { $$ = $1; }
+ | array_function_dereference { $$ = $1; }
+ | function_call { zend_do_begin_variable_parse(TSRMLS_C); $$ = $1; $$.EA = ZEND_PARSED_FUNCTION_CALL; }
;
base_variable:
- reference_variable { $$ = $1; $$.u.EA.type = ZEND_PARSED_VARIABLE; }
- | simple_indirect_reference reference_variable { zend_do_indirect_references(&$$, &$1, &$2 TSRMLS_CC); $$.u.EA.type = ZEND_PARSED_VARIABLE; }
- | static_member { $$ = $1; $$.u.EA.type = ZEND_PARSED_STATIC_MEMBER; }
+ reference_variable { $$ = $1; $$.EA = ZEND_PARSED_VARIABLE; }
+ | simple_indirect_reference reference_variable { zend_do_indirect_references(&$$, &$1, &$2 TSRMLS_CC); $$.EA = ZEND_PARSED_VARIABLE; }
+ | static_member { $$ = $1; $$.EA = ZEND_PARSED_STATIC_MEMBER; }
;
reference_variable:
@@ -1001,6 +1168,74 @@ class_constant:
%%
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T zend_yytnamerr(char *yyres, const char *yystr)
+{
+ if (!yyres) {
+ return yystrlen(yystr);
+ }
+ {
+ TSRMLS_FETCH();
+ if (CG(parse_error) == 0) {
+ char buffer[120];
+ const unsigned char *end, *str, *tok1 = NULL, *tok2 = NULL;
+ unsigned int len = 0, toklen = 0, yystr_len;
+
+ CG(parse_error) = 1;
+
+ if (LANG_SCNG(yy_text)[0] == 0 &&
+ LANG_SCNG(yy_leng) == 1 &&
+ memcmp(yystr, ZEND_STRL("\"end of file\"")) == 0) {
+ yystpcpy(yyres, "end of file");
+ return sizeof("end of file")-1;
+ }
+
+ str = LANG_SCNG(yy_text);
+ end = memchr(str, '\n', LANG_SCNG(yy_leng));
+ yystr_len = yystrlen(yystr);
+
+ if ((tok1 = memchr(yystr, '(', yystr_len)) != NULL
+ && (tok2 = zend_memrchr(yystr, ')', yystr_len)) != NULL) {
+ toklen = (tok2 - tok1) + 1;
+ } else {
+ tok1 = tok2 = NULL;
+ toklen = 0;
+ }
+
+ if (end == NULL) {
+ len = LANG_SCNG(yy_leng) > 30 ? 30 : LANG_SCNG(yy_leng);
+ } else {
+ len = (end - str) > 30 ? 30 : (end - str);
+ }
+ if (toklen) {
+ snprintf(buffer, sizeof(buffer), "'%.*s' %.*s", len, str, toklen, tok1);
+ } else {
+ snprintf(buffer, sizeof(buffer), "'%.*s'", len, str);
+ }
+ yystpcpy(yyres, buffer);
+ return len + (toklen ? toklen + 1 : 0) + 2;
+ }
+ }
+ if (*yystr == '"') {
+ YYSIZE_T yyn = 0;
+ const char *yyp = yystr;
+
+ for (; *++yyp != '"'; ++yyn) {
+ yyres[yyn] = *yyp;
+ }
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ yystpcpy(yyres, yystr);
+ return strlen(yystr);
+}
+
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index babd52236..17beb6e61 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Sun Jan 1 17:48:17 2012 */
+/* Generated by re2c 0.13.5 on Mon Jan 16 14:45:55 2012 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
@@ -23,7 +23,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_scanner.c 321657 2012-01-01 22:52:23Z nlopess $ */
+/* $Id: zend_language_scanner.c 322380 2012-01-17 08:11:32Z dmitry $ */
#if 0
# define YYDEBUG(s, c) printf("state: %d char: %c\n", s, c)
@@ -122,6 +122,33 @@ do { \
BEGIN_EXTERN_C()
+static size_t encoding_filter_script_to_internal(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length TSRMLS_DC)
+{
+ const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(TSRMLS_C);
+ assert(internal_encoding && zend_multibyte_check_lexer_compatibility(internal_encoding));
+ return zend_multibyte_encoding_converter(to, to_length, from, from_length, internal_encoding, LANG_SCNG(script_encoding) TSRMLS_CC);
+}
+
+static size_t encoding_filter_script_to_intermediate(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length TSRMLS_DC)
+{
+ return zend_multibyte_encoding_converter(to, to_length, from, from_length, zend_multibyte_encoding_utf8, LANG_SCNG(script_encoding) TSRMLS_CC);
+}
+
+static size_t encoding_filter_intermediate_to_script(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length TSRMLS_DC)
+{
+ return zend_multibyte_encoding_converter(to, to_length, from, from_length,
+LANG_SCNG(script_encoding), zend_multibyte_encoding_utf8 TSRMLS_CC);
+}
+
+static size_t encoding_filter_intermediate_to_internal(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length TSRMLS_DC)
+{
+ const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(TSRMLS_C);
+ assert(internal_encoding && zend_multibyte_check_lexer_compatibility(internal_encoding));
+ return zend_multibyte_encoding_converter(to, to_length, from, from_length,
+internal_encoding, zend_multibyte_encoding_utf8 TSRMLS_CC);
+}
+
+
static void _yy_push_state(int new_state TSRMLS_DC)
{
zend_stack_push(&SCNG(state_stack), (void *) &YYGETCONDITION(), sizeof(int));
@@ -149,6 +176,7 @@ static void yy_scan_buffer(char *str, unsigned int len TSRMLS_DC)
void startup_scanner(TSRMLS_D)
{
+ CG(parse_error) = 0;
CG(heredoc) = NULL;
CG(heredoc_len) = 0;
CG(doc_comment) = NULL;
@@ -162,6 +190,7 @@ void shutdown_scanner(TSRMLS_D)
efree(CG(heredoc));
CG(heredoc_len)=0;
}
+ CG(parse_error) = 0;
zend_stack_destroy(&SCNG(state_stack));
RESET_DOC_COMMENT();
}
@@ -183,7 +212,6 @@ ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
lex_state->filename = zend_get_compiled_filename(TSRMLS_C);
lex_state->lineno = CG(zend_lineno);
-#ifdef ZEND_MULTIBYTE
lex_state->script_org = SCNG(script_org);
lex_state->script_org_size = SCNG(script_org_size);
lex_state->script_filtered = SCNG(script_filtered);
@@ -191,8 +219,6 @@ ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
lex_state->input_filter = SCNG(input_filter);
lex_state->output_filter = SCNG(output_filter);
lex_state->script_encoding = SCNG(script_encoding);
- lex_state->internal_encoding = SCNG(internal_encoding);
-#endif /* ZEND_MULTIBYTE */
}
ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
@@ -211,11 +237,7 @@ ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
YYSETCONDITION(lex_state->yy_state);
CG(zend_lineno) = lex_state->lineno;
zend_restore_compiled_filename(lex_state->filename TSRMLS_CC);
-#ifdef ZEND_MULTIBYTE
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- SCNG(script_org) = NULL;
- }
+
if (SCNG(script_filtered)) {
efree(SCNG(script_filtered));
SCNG(script_filtered) = NULL;
@@ -227,8 +249,6 @@ ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
SCNG(input_filter) = lex_state->input_filter;
SCNG(output_filter) = lex_state->output_filter;
SCNG(script_encoding) = lex_state->script_encoding;
- SCNG(internal_encoding) = lex_state->internal_encoding;
-#endif /* ZEND_MULTIBYTE */
if (CG(heredoc)) {
efree(CG(heredoc));
@@ -247,12 +267,214 @@ ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC)
}
}
+#define BOM_UTF32_BE "\x00\x00\xfe\xff"
+#define BOM_UTF32_LE "\xff\xfe\x00\x00"
+#define BOM_UTF16_BE "\xfe\xff"
+#define BOM_UTF16_LE "\xff\xfe"
+#define BOM_UTF8 "\xef\xbb\xbf"
+
+static const zend_encoding *zend_multibyte_detect_utf_encoding(const unsigned char *script, size_t script_size TSRMLS_DC)
+{
+ const unsigned char *p;
+ int wchar_size = 2;
+ int le = 0;
+
+ /* utf-16 or utf-32? */
+ p = script;
+ while ((p-script) < script_size) {
+ p = memchr(p, 0, script_size-(p-script)-2);
+ if (!p) {
+ break;
+ }
+ if (*(p+1) == '\0' && *(p+2) == '\0') {
+ wchar_size = 4;
+ break;
+ }
+
+ /* searching for UTF-32 specific byte orders, so this will do */
+ p += 4;
+ }
+
+ /* BE or LE? */
+ p = script;
+ while ((p-script) < script_size) {
+ if (*p == '\0' && *(p+wchar_size-1) != '\0') {
+ /* BE */
+ le = 0;
+ break;
+ } else if (*p != '\0' && *(p+wchar_size-1) == '\0') {
+ /* LE* */
+ le = 1;
+ break;
+ }
+ p += wchar_size;
+ }
+
+ if (wchar_size == 2) {
+ return le ? zend_multibyte_encoding_utf16le : zend_multibyte_encoding_utf16be;
+ } else {
+ return le ? zend_multibyte_encoding_utf32le : zend_multibyte_encoding_utf32be;
+ }
+
+ return NULL;
+}
+
+static const zend_encoding* zend_multibyte_detect_unicode(TSRMLS_D)
+{
+ const zend_encoding *script_encoding = NULL;
+ int bom_size;
+ unsigned char *pos1, *pos2;
+
+ if (LANG_SCNG(script_org_size) < sizeof(BOM_UTF32_LE)-1) {
+ return NULL;
+ }
+
+ /* check out BOM */
+ if (!memcmp(LANG_SCNG(script_org), BOM_UTF32_BE, sizeof(BOM_UTF32_BE)-1)) {
+ script_encoding = zend_multibyte_encoding_utf32be;
+ bom_size = sizeof(BOM_UTF32_BE)-1;
+ } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF32_LE, sizeof(BOM_UTF32_LE)-1)) {
+ script_encoding = zend_multibyte_encoding_utf32le;
+ bom_size = sizeof(BOM_UTF32_LE)-1;
+ } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF16_BE, sizeof(BOM_UTF16_BE)-1)) {
+ script_encoding = zend_multibyte_encoding_utf16be;
+ bom_size = sizeof(BOM_UTF16_BE)-1;
+ } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF16_LE, sizeof(BOM_UTF16_LE)-1)) {
+ script_encoding = zend_multibyte_encoding_utf16le;
+ bom_size = sizeof(BOM_UTF16_LE)-1;
+ } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF8, sizeof(BOM_UTF8)-1)) {
+ script_encoding = zend_multibyte_encoding_utf8;
+ bom_size = sizeof(BOM_UTF8)-1;
+ }
+
+ if (script_encoding) {
+ /* remove BOM */
+ LANG_SCNG(script_org) += bom_size;
+ LANG_SCNG(script_org_size) -= bom_size;
+
+ return script_encoding;
+ }
+
+ /* script contains NULL bytes -> auto-detection */
+ if ((pos1 = memchr(LANG_SCNG(script_org), 0, LANG_SCNG(script_org_size)))) {
+ /* check if the NULL byte is after the __HALT_COMPILER(); */
+ pos2 = LANG_SCNG(script_org);
+
+ while (pos1 - pos2 >= sizeof("__HALT_COMPILER();")-1) {
+ pos2 = memchr(pos2, '_', pos1 - pos2);
+ if (!pos2) break;
+ pos2++;
+ if (strncasecmp((char*)pos2, "_HALT_COMPILER", sizeof("_HALT_COMPILER")-1) == 0) {
+ pos2 += sizeof("_HALT_COMPILER")-1;
+ while (*pos2 == ' ' ||
+ *pos2 == '\t' ||
+ *pos2 == '\r' ||
+ *pos2 == '\n') {
+ pos2++;
+ }
+ if (*pos2 == '(') {
+ pos2++;
+ while (*pos2 == ' ' ||
+ *pos2 == '\t' ||
+ *pos2 == '\r' ||
+ *pos2 == '\n') {
+ pos2++;
+ }
+ if (*pos2 == ')') {
+ pos2++;
+ while (*pos2 == ' ' ||
+ *pos2 == '\t' ||
+ *pos2 == '\r' ||
+ *pos2 == '\n') {
+ pos2++;
+ }
+ if (*pos2 == ';') {
+ return NULL;
+ }
+ }
+ }
+ }
+ }
+ /* make best effort if BOM is missing */
+ return zend_multibyte_detect_utf_encoding(LANG_SCNG(script_org), LANG_SCNG(script_org_size) TSRMLS_CC);
+ }
+
+ return NULL;
+}
+
+static const zend_encoding* zend_multibyte_find_script_encoding(TSRMLS_D)
+{
+ const zend_encoding *script_encoding;
+
+ if (CG(detect_unicode)) {
+ /* check out bom(byte order mark) and see if containing wchars */
+ script_encoding = zend_multibyte_detect_unicode(TSRMLS_C);
+ if (script_encoding != NULL) {
+ /* bom or wchar detection is prior to 'script_encoding' option */
+ return script_encoding;
+ }
+ }
+
+ /* if no script_encoding specified, just leave alone */
+ if (!CG(script_encoding_list) || !CG(script_encoding_list_size)) {
+ return NULL;
+ }
+
+ /* if multiple encodings specified, detect automagically */
+ if (CG(script_encoding_list_size) > 1) {
+ return zend_multibyte_encoding_detector(LANG_SCNG(script_org), LANG_SCNG(script_org_size), CG(script_encoding_list), CG(script_encoding_list_size) TSRMLS_CC);
+ }
+
+ return CG(script_encoding_list)[0];
+}
+
+ZEND_API int zend_multibyte_set_filter(const zend_encoding *onetime_encoding TSRMLS_DC)
+{
+ const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(TSRMLS_C);
+ const zend_encoding *script_encoding = onetime_encoding ? onetime_encoding: zend_multibyte_find_script_encoding(TSRMLS_C);
+
+ if (!script_encoding) {
+ return FAILURE;
+ }
+
+ /* judge input/output filter */
+ LANG_SCNG(script_encoding) = script_encoding;
+ LANG_SCNG(input_filter) = NULL;
+ LANG_SCNG(output_filter) = NULL;
+
+ if (!internal_encoding || LANG_SCNG(script_encoding) == internal_encoding) {
+ if (!zend_multibyte_check_lexer_compatibility(LANG_SCNG(script_encoding))) {
+ /* and if not, work around w/ script_encoding -> utf-8 -> script_encoding conversion */
+ LANG_SCNG(input_filter) = encoding_filter_script_to_intermediate;
+ LANG_SCNG(output_filter) = encoding_filter_intermediate_to_script;
+ } else {
+ LANG_SCNG(input_filter) = NULL;
+ LANG_SCNG(output_filter) = NULL;
+ }
+ return SUCCESS;
+ }
+
+ if (zend_multibyte_check_lexer_compatibility(internal_encoding)) {
+ LANG_SCNG(input_filter) = encoding_filter_script_to_internal;
+ LANG_SCNG(output_filter) = NULL;
+ } else if (zend_multibyte_check_lexer_compatibility(LANG_SCNG(script_encoding))) {
+ LANG_SCNG(input_filter) = NULL;
+ LANG_SCNG(output_filter) = encoding_filter_script_to_internal;
+ } else {
+ /* both script and internal encodings are incompatible w/ flex */
+ LANG_SCNG(input_filter) = encoding_filter_script_to_intermediate;
+ LANG_SCNG(output_filter) = encoding_filter_intermediate_to_internal;
+ }
+
+ return 0;
+}
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
{
- char *file_path = NULL, *buf;
+ const char *file_path = NULL;
+ char *buf;
size_t size, offset = 0;
-
+
/* The shebang line was read, get the current position to obtain the buffer start */
if (CG(start_lineno) == 2 && file_handle->type == ZEND_HANDLE_FP && file_handle->handle.fp) {
if ((offset = ftell(file_handle->handle.fp)) == -1) {
@@ -277,32 +499,24 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
SCNG(yy_start) = NULL;
if (size != -1) {
-#ifdef ZEND_MULTIBYTE
- if (zend_multibyte_read_script((unsigned char *)buf, size TSRMLS_CC) != 0) {
- return FAILURE;
- }
-
- SCNG(yy_in) = NULL;
+ if (CG(multibyte)) {
+ SCNG(script_org) = (unsigned char*)buf;
+ SCNG(script_org_size) = size;
+ SCNG(script_filtered) = NULL;
- zend_multibyte_set_filter(NULL TSRMLS_CC);
+ zend_multibyte_set_filter(NULL TSRMLS_CC);
- if (!SCNG(input_filter)) {
- SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+1);
- memcpy(SCNG(script_filtered), SCNG(script_org), SCNG(script_org_size)+1);
- SCNG(script_filtered_size) = SCNG(script_org_size);
- } else {
- SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC);
- if (SCNG(script_filtered) == NULL) {
- zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected "
- "encoding \"%s\" to a compatible encoding", LANG_SCNG(script_encoding)->name);
+ if (SCNG(input_filter)) {
+ if ((size_t)-1 == SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected "
+ "encoding \"%s\" to a compatible encoding", zend_multibyte_get_encoding_name(LANG_SCNG(script_encoding)));
+ }
+ buf = (char*)SCNG(script_filtered);
+ size = SCNG(script_filtered_size);
}
}
- SCNG(yy_start) = SCNG(script_filtered) - offset;
- yy_scan_buffer((char *)SCNG(script_filtered), SCNG(script_filtered_size) TSRMLS_CC);
-#else /* !ZEND_MULTIBYTE */
- SCNG(yy_start) = buf - offset;
+ SCNG(yy_start) = (unsigned char *)buf - offset;
yy_scan_buffer(buf, size TSRMLS_CC);
-#endif /* ZEND_MULTIBYTE */
} else {
zend_error_noreturn(E_COMPILE_ERROR, "zend_stream_mmap() failed");
}
@@ -363,6 +577,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE TSRMLS_CC);
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
+ zend_init_compiler_context(TSRMLS_C);
compiler_result = zendparse(TSRMLS_C);
zend_do_return(&retval_znode, 0 TSRMLS_CC);
CG(in_compilation) = original_in_compilation;
@@ -430,32 +645,44 @@ zend_op_array *compile_filename(int type, zval *filename TSRMLS_DC)
ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_DC)
{
+ char *buf;
+ size_t size;
+
/* enforce two trailing NULLs for flex... */
- str->value.str.val = safe_erealloc(str->value.str.val, 1, str->value.str.len, ZEND_MMAP_AHEAD);
+ if (IS_INTERNED(str->value.str.val)) {
+ char *tmp = safe_emalloc(1, str->value.str.len, ZEND_MMAP_AHEAD);
+ memcpy(tmp, str->value.str.val, str->value.str.len + ZEND_MMAP_AHEAD);
+ str->value.str.val = tmp;
+ } else {
+ str->value.str.val = safe_erealloc(str->value.str.val, 1, str->value.str.len, ZEND_MMAP_AHEAD);
+ }
memset(str->value.str.val + str->value.str.len, 0, ZEND_MMAP_AHEAD);
- SCNG(yy_in)=NULL;
+ SCNG(yy_in) = NULL;
SCNG(yy_start) = NULL;
-#ifdef ZEND_MULTIBYTE
- SCNG(script_org) = (unsigned char *)estrdup(str->value.str.val);
- SCNG(script_org_size) = str->value.str.len;
+ buf = str->value.str.val;
+ size = str->value.str.len;
- zend_multibyte_set_filter(CG(internal_encoding) TSRMLS_CC);
+ if (CG(multibyte)) {
+ SCNG(script_org) = (unsigned char*)buf;
+ SCNG(script_org_size) = size;
+ SCNG(script_filtered) = NULL;
- if (!SCNG(input_filter)) {
- SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+1);
- memcpy(SCNG(script_filtered), SCNG(script_org), SCNG(script_org_size)+1);
- SCNG(script_filtered_size) = SCNG(script_org_size);
- } else {
- SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC);
+ zend_multibyte_set_filter(zend_multibyte_get_internal_encoding(TSRMLS_C) TSRMLS_CC);
+
+ if (SCNG(input_filter)) {
+ if ((size_t)-1 == SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected "
+ "encoding \"%s\" to a compatible encoding", zend_multibyte_get_encoding_name(LANG_SCNG(script_encoding)));
+ }
+ buf = (char*)SCNG(script_filtered);
+ size = SCNG(script_filtered_size);
+ }
}
- yy_scan_buffer((char *)SCNG(script_filtered), SCNG(script_filtered_size) TSRMLS_CC);
-#else /* !ZEND_MULTIBYTE */
- yy_scan_buffer(str->value.str.val, str->value.str.len TSRMLS_CC);
-#endif /* ZEND_MULTIBYTE */
+ yy_scan_buffer(buf, size TSRMLS_CC);
zend_set_compiled_filename(filename TSRMLS_CC);
CG(zend_lineno) = 1;
@@ -467,13 +694,12 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D)
{
size_t offset = SCNG(yy_cursor) - SCNG(yy_start);
-#ifdef ZEND_MULTIBYTE
if (SCNG(input_filter)) {
- size_t original_offset = offset, length = 0; do {
+ size_t original_offset = offset, length = 0;
+ do {
unsigned char *p = NULL;
- SCNG(input_filter)(&p, &length, SCNG(script_org), offset TSRMLS_CC);
- if (!p) {
- break;
+ if ((size_t)-1 == SCNG(input_filter)(&p, &length, SCNG(script_org), offset TSRMLS_CC)) {
+ return (size_t)-1;
}
efree(p);
if (length > original_offset) {
@@ -483,7 +709,6 @@ ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D)
}
} while (original_offset != length);
}
-#endif
return offset;
}
@@ -521,19 +746,14 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
init_op_array(op_array, ZEND_EVAL_CODE, INITIAL_OP_ARRAY_SIZE TSRMLS_CC);
CG(interactive) = orig_interactive;
CG(active_op_array) = op_array;
+ zend_init_compiler_context(TSRMLS_C);
BEGIN(ST_IN_SCRIPTING);
compiler_result = zendparse(TSRMLS_C);
-#ifdef ZEND_MULTIBYTE
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- SCNG(script_org) = NULL;
- }
if (SCNG(script_filtered)) {
efree(SCNG(script_filtered));
SCNG(script_filtered) = NULL;
}
-#endif /* ZEND_MULTIBYTE */
if (compiler_result==1) {
CG(active_op_array) = original_active_op_array;
@@ -573,16 +793,10 @@ int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlight
return FAILURE;
}
zend_highlight(syntax_highlighter_ini TSRMLS_CC);
-#ifdef ZEND_MULTIBYTE
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- SCNG(script_org) = NULL;
- }
if (SCNG(script_filtered)) {
efree(SCNG(script_filtered));
SCNG(script_filtered) = NULL;
}
-#endif /* ZEND_MULTIBYTE */
zend_destroy_file_handle(&file_handle TSRMLS_CC);
zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
return SUCCESS;
@@ -602,122 +816,44 @@ int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_
}
BEGIN(INITIAL);
zend_highlight(syntax_highlighter_ini TSRMLS_CC);
-#ifdef ZEND_MULTIBYTE
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- SCNG(script_org) = NULL;
- }
if (SCNG(script_filtered)) {
efree(SCNG(script_filtered));
SCNG(script_filtered) = NULL;
}
-#endif /* ZEND_MULTIBYTE */
zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
zval_dtor(str);
return SUCCESS;
}
-END_EXTERN_C()
-#ifdef ZEND_MULTIBYTE
-
-BEGIN_EXTERN_C()
-ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter, zend_encoding *old_encoding TSRMLS_DC)
+ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter, const zend_encoding *old_encoding TSRMLS_DC)
{
- size_t original_offset, offset, free_flag, new_len, length;
- unsigned char *p;
-
- /* calculate current position */
- offset = original_offset = YYCURSOR - SCNG(yy_start);
- if (old_input_filter && offset > 0) {
- zend_encoding *new_encoding = SCNG(script_encoding);
- zend_encoding_filter new_filter = SCNG(input_filter);
- SCNG(script_encoding) = old_encoding;
- SCNG(input_filter) = old_input_filter;
- offset = zend_get_scanned_file_offset(TSRMLS_C);
- SCNG(script_encoding) = new_encoding;
- SCNG(input_filter) = new_filter;
- }
+ size_t length;
+ unsigned char *new_yy_start;
/* convert and set */
if (!SCNG(input_filter)) {
- length = SCNG(script_org_size) - offset;
- p = SCNG(script_org) + offset;
- free_flag = 0;
+ if (SCNG(script_filtered)) {
+ efree(SCNG(script_filtered));
+ SCNG(script_filtered) = NULL;
+ }
+ SCNG(script_filtered_size) = 0;
+ length = SCNG(script_org_size);
+ new_yy_start = SCNG(script_org);
} else {
- SCNG(input_filter)(&p, &length, SCNG(script_org) + offset, SCNG(script_org_size) - offset TSRMLS_CC);
- free_flag = 1;
- }
-
- new_len = original_offset + length;
-
- if (new_len > YYLIMIT - SCNG(yy_start)) {
- unsigned char *new_yy_start = erealloc(SCNG(yy_start), new_len);
- SCNG(yy_cursor) = new_yy_start + (SCNG(yy_cursor) - SCNG(yy_start));
- SCNG(yy_marker) = new_yy_start + (SCNG(yy_marker) - SCNG(yy_start));
- SCNG(yy_text) = new_yy_start + (SCNG(yy_text) - SCNG(yy_start));
- SCNG(yy_start) = new_yy_start;
- SCNG(script_filtered) = new_yy_start;
- SCNG(script_filtered_size) = new_len;
- }
-
- SCNG(yy_limit) = SCNG(yy_start) + new_len;
- memmove(SCNG(yy_start) + original_offset, p, length);
-
- if (free_flag) {
- efree(p);
- }
-}
-
-
-ZEND_API int zend_multibyte_yyinput(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC)
-{
- size_t n;
-
- if (CG(interactive) == 0) {
- if (zend_stream_fixup(file_handle, &buf, &len TSRMLS_CC) == FAILURE) {
- return FAILURE;
+ if ((size_t)-1 == SCNG(input_filter)(&new_yy_start, &length, SCNG(script_org), SCNG(script_org_size) TSRMLS_CC)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected "
+ "encoding \"%s\" to a compatible encoding", zend_multibyte_get_encoding_name(LANG_SCNG(script_encoding)));
}
- n = len;
- return n;
- }
-
- /* interactive */
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- }
- if (SCNG(script_filtered)) {
- efree(SCNG(script_filtered));
- }
- SCNG(script_org) = NULL;
- SCNG(script_org_size) = 0;
-
- /* TODO: support widechars */
- if (zend_stream_fixup(file_handle, &buf, &len TSRMLS_CC) == FAILURE) {
- return FAILURE;
+ SCNG(script_filtered) = new_yy_start;
+ SCNG(script_filtered_size) = length;
}
- n = len;
-
- SCNG(script_org_size) = n;
- SCNG(script_org) = (unsigned char*)emalloc(SCNG(script_org_size) + 1);
- memcpy(SCNG(script_org), buf, n);
- return n;
-}
-
-
-ZEND_API int zend_multibyte_read_script(unsigned char *buf, size_t n TSRMLS_DC)
-{
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- SCNG(script_org) = NULL;
- }
- SCNG(script_org_size) = n;
-
- SCNG(script_org) = (unsigned char*)emalloc(SCNG(script_org_size) + 1);
- memcpy(SCNG(script_org), buf, n);
- *(SCNG(script_org)+SCNG(script_org_size)) = '\0';
+ SCNG(yy_cursor) = new_yy_start + (SCNG(yy_cursor) - SCNG(yy_start));
+ SCNG(yy_marker) = new_yy_start + (SCNG(yy_marker) - SCNG(yy_start));
+ SCNG(yy_text) = new_yy_start + (SCNG(yy_text) - SCNG(yy_start));
+ SCNG(yy_limit) = new_yy_start + (SCNG(yy_limit) - SCNG(yy_start));
- return 0;
+ SCNG(yy_start) = new_yy_start;
}
@@ -730,11 +866,6 @@ ZEND_API int zend_multibyte_read_script(unsigned char *buf, size_t n TSRMLS_DC)
zendlval->value.str.val = (char *) estrndup(yytext, yyleng); \
zendlval->value.str.len = yyleng; \
}
-#else /* ZEND_MULTIBYTE */
-# define zend_copy_value(zendlval, yytext, yyleng) \
- zendlval->value.str.val = (char *)estrndup(yytext, yyleng); \
- zendlval->value.str.len = yyleng;
-#endif /* ZEND_MULTIBYTE */
static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quote_type TSRMLS_DC)
{
@@ -775,6 +906,10 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
*t++ = '\v';
zendlval->value.str.len--;
break;
+ case 'e':
+ *t++ = '\e';
+ zendlval->value.str.len--;
+ break;
case '"':
case '`':
if (*s != quote_type) {
@@ -838,7 +973,6 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
s++;
}
*t = 0;
-#ifdef ZEND_MULTIBYTE
if (SCNG(output_filter)) {
size_t sz = 0;
s = zendlval->value.str.val;
@@ -846,7 +980,6 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
zendlval->value.str.len = sz;
efree(s);
}
-#endif /* ZEND_MULTIBYTE */
}
@@ -858,7 +991,7 @@ restart:
yymore_restart:
-#line 862 "Zend/zend_language_scanner.c"
+#line 995 "Zend/zend_language_scanner.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -957,7 +1090,7 @@ yyc_INITIAL:
yy3:
YYDEBUG(3, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1586 "Zend/zend_language_scanner.l"
+#line 1775 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -973,7 +1106,7 @@ inline_char_handler:
if (YYCURSOR < YYLIMIT) {
switch (*YYCURSOR) {
case '?':
- if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3)) { /* Assume [ \t\n\r] follows "php" */
+ if (CG(short_tags) || !strncasecmp((char*)YYCURSOR + 1, "php", 3) || (*(YYCURSOR + 1) == '=')) { /* Assume [ \t\n\r] follows "php" */
break;
}
continue;
@@ -1001,7 +1134,6 @@ inline_char_handler:
inline_html:
yyleng = YYCURSOR - SCNG(yy_text);
-#ifdef ZEND_MULTIBYTE
if (SCNG(output_filter)) {
int readsize;
size_t sz = 0;
@@ -1014,15 +1146,11 @@ inline_html:
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
}
-#else /* !ZEND_MULTIBYTE */
- zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
- zendlval->value.str.len = yyleng;
-#endif
zendlval->type = IS_STRING;
HANDLE_NEWLINES(yytext, yyleng);
return T_INLINE_HTML;
}
-#line 1026 "Zend/zend_language_scanner.c"
+#line 1154 "Zend/zend_language_scanner.c"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1040,7 +1168,7 @@ yy5:
yy6:
YYDEBUG(6, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1574 "Zend/zend_language_scanner.l"
+#line 1763 "Zend/zend_language_scanner.l"
{
if (CG(short_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1052,14 +1180,14 @@ yy6:
goto inline_char_handler;
}
}
-#line 1056 "Zend/zend_language_scanner.c"
+#line 1184 "Zend/zend_language_scanner.c"
yy7:
YYDEBUG(7, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '=') goto yy43;
YYDEBUG(8, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1551 "Zend/zend_language_scanner.l"
+#line 1740 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1071,7 +1199,7 @@ yy7:
goto inline_char_handler;
}
}
-#line 1075 "Zend/zend_language_scanner.c"
+#line 1203 "Zend/zend_language_scanner.c"
yy9:
YYDEBUG(9, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1257,9 +1385,9 @@ yy35:
++YYCURSOR;
YYDEBUG(38, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1507 "Zend/zend_language_scanner.l"
+#line 1700 "Zend/zend_language_scanner.l"
{
- YYCTYPE *bracket = zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
+ YYCTYPE *bracket = (YYCTYPE*)zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
if (bracket != SCNG(yy_text)) {
/* Handle previously scanned HTML, as possible <script> tags found are assumed to not be PHP's */
@@ -1274,7 +1402,7 @@ yy35:
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
}
-#line 1278 "Zend/zend_language_scanner.c"
+#line 1406 "Zend/zend_language_scanner.c"
yy39:
YYDEBUG(39, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1301,7 +1429,7 @@ yy43:
++YYCURSOR;
YYDEBUG(44, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1525 "Zend/zend_language_scanner.l"
+#line 1718 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1313,25 +1441,21 @@ yy43:
goto inline_char_handler;
}
}
-#line 1317 "Zend/zend_language_scanner.c"
+#line 1445 "Zend/zend_language_scanner.c"
yy45:
YYDEBUG(45, *YYCURSOR);
++YYCURSOR;
YYDEBUG(46, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1538 "Zend/zend_language_scanner.l"
+#line 1731 "Zend/zend_language_scanner.l"
{
- if (CG(short_tags)) {
- zendlval->value.str.val = yytext; /* no copying - intentional */
- zendlval->value.str.len = yyleng;
- zendlval->type = IS_STRING;
- BEGIN(ST_IN_SCRIPTING);
- return T_OPEN_TAG_WITH_ECHO;
- } else {
- goto inline_char_handler;
- }
+ zendlval->value.str.val = yytext; /* no copying - intentional */
+ zendlval->value.str.len = yyleng;
+ zendlval->type = IS_STRING;
+ BEGIN(ST_IN_SCRIPTING);
+ return T_OPEN_TAG_WITH_ECHO;
}
-#line 1335 "Zend/zend_language_scanner.c"
+#line 1459 "Zend/zend_language_scanner.c"
yy47:
YYDEBUG(47, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1358,7 +1482,7 @@ yy50:
yy51:
YYDEBUG(51, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1564 "Zend/zend_language_scanner.l"
+#line 1753 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -1367,7 +1491,7 @@ yy51:
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
}
-#line 1371 "Zend/zend_language_scanner.c"
+#line 1495 "Zend/zend_language_scanner.c"
yy52:
YYDEBUG(52, *YYCURSOR);
++YYCURSOR;
@@ -1438,7 +1562,7 @@ yyc_ST_BACKQUOTE:
yy56:
YYDEBUG(56, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2044 "Zend/zend_language_scanner.l"
+#line 2226 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -1479,7 +1603,7 @@ yy56:
zend_scan_escape_string(zendlval, yytext, yyleng, '`' TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1483 "Zend/zend_language_scanner.c"
+#line 1607 "Zend/zend_language_scanner.c"
yy57:
YYDEBUG(57, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1490,12 +1614,12 @@ yy58:
++YYCURSOR;
YYDEBUG(59, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1988 "Zend/zend_language_scanner.l"
+#line 2170 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
return '`';
}
-#line 1499 "Zend/zend_language_scanner.c"
+#line 1623 "Zend/zend_language_scanner.c"
yy60:
YYDEBUG(60, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1505,14 +1629,14 @@ yy61:
++YYCURSOR;
YYDEBUG(62, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1975 "Zend/zend_language_scanner.l"
+#line 2157 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 1516 "Zend/zend_language_scanner.c"
+#line 1640 "Zend/zend_language_scanner.c"
yy63:
YYDEBUG(63, *YYCURSOR);
yyaccept = 0;
@@ -1528,24 +1652,24 @@ yy63:
yy65:
YYDEBUG(65, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1673 "Zend/zend_language_scanner.l"
+#line 1857 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1538 "Zend/zend_language_scanner.c"
+#line 1662 "Zend/zend_language_scanner.c"
yy66:
YYDEBUG(66, *YYCURSOR);
++YYCURSOR;
YYDEBUG(67, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1300 "Zend/zend_language_scanner.l"
+#line 1442 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 1549 "Zend/zend_language_scanner.c"
+#line 1673 "Zend/zend_language_scanner.c"
yy68:
YYDEBUG(68, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1559,7 +1683,7 @@ yy70:
++YYCURSOR;
YYDEBUG(71, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1665 "Zend/zend_language_scanner.l"
+#line 1849 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -1567,7 +1691,7 @@ yy70:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1571 "Zend/zend_language_scanner.c"
+#line 1695 "Zend/zend_language_scanner.c"
yy72:
YYDEBUG(72, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1585,7 +1709,7 @@ yy73:
++YYCURSOR;
YYDEBUG(74, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1655 "Zend/zend_language_scanner.l"
+#line 1839 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -1593,7 +1717,7 @@ yy73:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1597 "Zend/zend_language_scanner.c"
+#line 1721 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_DOUBLE_QUOTES:
@@ -1661,7 +1785,7 @@ yy77:
yy78:
YYDEBUG(78, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1994 "Zend/zend_language_scanner.l"
+#line 2176 "Zend/zend_language_scanner.l"
{
if (GET_DOUBLE_QUOTES_SCANNED_LENGTH()) {
YYCURSOR += GET_DOUBLE_QUOTES_SCANNED_LENGTH() - 1;
@@ -1710,7 +1834,7 @@ double_quotes_scan_done:
zend_scan_escape_string(zendlval, yytext, yyleng, '"' TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1714 "Zend/zend_language_scanner.c"
+#line 1838 "Zend/zend_language_scanner.c"
yy79:
YYDEBUG(79, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1721,12 +1845,12 @@ yy80:
++YYCURSOR;
YYDEBUG(81, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1983 "Zend/zend_language_scanner.l"
+#line 2165 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
return '"';
}
-#line 1730 "Zend/zend_language_scanner.c"
+#line 1854 "Zend/zend_language_scanner.c"
yy82:
YYDEBUG(82, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1736,14 +1860,14 @@ yy83:
++YYCURSOR;
YYDEBUG(84, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1975 "Zend/zend_language_scanner.l"
+#line 2157 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 1747 "Zend/zend_language_scanner.c"
+#line 1871 "Zend/zend_language_scanner.c"
yy85:
YYDEBUG(85, *YYCURSOR);
yyaccept = 0;
@@ -1759,24 +1883,24 @@ yy85:
yy87:
YYDEBUG(87, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1673 "Zend/zend_language_scanner.l"
+#line 1857 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1769 "Zend/zend_language_scanner.c"
+#line 1893 "Zend/zend_language_scanner.c"
yy88:
YYDEBUG(88, *YYCURSOR);
++YYCURSOR;
YYDEBUG(89, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1300 "Zend/zend_language_scanner.l"
+#line 1442 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 1780 "Zend/zend_language_scanner.c"
+#line 1904 "Zend/zend_language_scanner.c"
yy90:
YYDEBUG(90, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1790,7 +1914,7 @@ yy92:
++YYCURSOR;
YYDEBUG(93, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1665 "Zend/zend_language_scanner.l"
+#line 1849 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -1798,7 +1922,7 @@ yy92:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1802 "Zend/zend_language_scanner.c"
+#line 1926 "Zend/zend_language_scanner.c"
yy94:
YYDEBUG(94, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1816,7 +1940,7 @@ yy95:
++YYCURSOR;
YYDEBUG(96, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1655 "Zend/zend_language_scanner.l"
+#line 1839 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -1824,7 +1948,7 @@ yy95:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1828 "Zend/zend_language_scanner.c"
+#line 1952 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_END_HEREDOC:
@@ -1835,7 +1959,7 @@ yyc_ST_END_HEREDOC:
++YYCURSOR;
YYDEBUG(100, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1962 "Zend/zend_language_scanner.l"
+#line 2144 "Zend/zend_language_scanner.l"
{
YYCURSOR += CG(heredoc_len) - 1;
yyleng = CG(heredoc_len);
@@ -1847,7 +1971,7 @@ yyc_ST_END_HEREDOC:
BEGIN(ST_IN_SCRIPTING);
return T_END_HEREDOC;
}
-#line 1851 "Zend/zend_language_scanner.c"
+#line 1975 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_HEREDOC:
{
@@ -1909,7 +2033,7 @@ yy103:
yy104:
YYDEBUG(104, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2086 "Zend/zend_language_scanner.l"
+#line 2268 "Zend/zend_language_scanner.l"
{
int newline = 0;
@@ -1980,7 +2104,7 @@ heredoc_scan_done:
zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0 TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1984 "Zend/zend_language_scanner.c"
+#line 2108 "Zend/zend_language_scanner.c"
yy105:
YYDEBUG(105, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1995,14 +2119,14 @@ yy107:
++YYCURSOR;
YYDEBUG(108, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1975 "Zend/zend_language_scanner.l"
+#line 2157 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 2006 "Zend/zend_language_scanner.c"
+#line 2130 "Zend/zend_language_scanner.c"
yy109:
YYDEBUG(109, *YYCURSOR);
yyaccept = 0;
@@ -2018,24 +2142,24 @@ yy109:
yy111:
YYDEBUG(111, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1673 "Zend/zend_language_scanner.l"
+#line 1857 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2028 "Zend/zend_language_scanner.c"
+#line 2152 "Zend/zend_language_scanner.c"
yy112:
YYDEBUG(112, *YYCURSOR);
++YYCURSOR;
YYDEBUG(113, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1300 "Zend/zend_language_scanner.l"
+#line 1442 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 2039 "Zend/zend_language_scanner.c"
+#line 2163 "Zend/zend_language_scanner.c"
yy114:
YYDEBUG(114, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2049,7 +2173,7 @@ yy116:
++YYCURSOR;
YYDEBUG(117, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1665 "Zend/zend_language_scanner.l"
+#line 1849 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -2057,7 +2181,7 @@ yy116:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2061 "Zend/zend_language_scanner.c"
+#line 2185 "Zend/zend_language_scanner.c"
yy118:
YYDEBUG(118, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2075,7 +2199,7 @@ yy119:
++YYCURSOR;
YYDEBUG(120, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1655 "Zend/zend_language_scanner.l"
+#line 1839 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -2083,7 +2207,7 @@ yy119:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2087 "Zend/zend_language_scanner.c"
+#line 2211 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_IN_SCRIPTING:
@@ -2095,32 +2219,32 @@ yyc_ST_IN_SCRIPTING:
0, 0, 0, 0, 0, 0, 0, 0,
192, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
- 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 56, 0, 0, 0, 0, 0, 0,
- 0, 40, 40, 40, 40, 40, 40, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 0, 0, 0, 0, 8,
- 0, 40, 40, 40, 40, 40, 40, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 0, 0, 0, 0, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 8,
+ 60, 60, 44, 44, 44, 44, 44, 44,
+ 44, 44, 0, 0, 0, 0, 0, 0,
+ 0, 36, 36, 36, 36, 36, 36, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 0, 0, 0, 0, 4,
+ 0, 36, 36, 36, 36, 36, 36, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 0, 0, 0, 0, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4,
};
YYDEBUG(121, *YYCURSOR);
YYFILL(16);
@@ -2248,48 +2372,48 @@ yy123:
YYDEBUG(-1, yych);
switch ((yych = *YYCURSOR)) {
case 'C':
- case 'c': goto yy701;
+ case 'c': goto yy726;
case 'L':
- case 'l': goto yy702;
+ case 'l': goto yy727;
case 'M':
- case 'm': goto yy703;
+ case 'm': goto yy728;
case 'N':
- case 'n': goto yy704;
+ case 'n': goto yy729;
case 'V':
- case 'v': goto yy705;
+ case 'v': goto yy730;
case 'X':
- case 'x': goto yy706;
+ case 'x': goto yy731;
default: goto yy186;
}
yy124:
YYDEBUG(124, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1696 "Zend/zend_language_scanner.l"
+#line 1880 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 2274 "Zend/zend_language_scanner.c"
+#line 2398 "Zend/zend_language_scanner.c"
yy125:
YYDEBUG(125, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'O') {
if (yych <= 'H') {
- if (yych == 'E') goto yy683;
+ if (yych == 'E') goto yy708;
goto yy186;
} else {
- if (yych <= 'I') goto yy684;
+ if (yych <= 'I') goto yy709;
if (yych <= 'N') goto yy186;
- goto yy685;
+ goto yy710;
}
} else {
if (yych <= 'h') {
- if (yych == 'e') goto yy683;
+ if (yych == 'e') goto yy708;
goto yy186;
} else {
- if (yych <= 'i') goto yy684;
- if (yych == 'o') goto yy685;
+ if (yych <= 'i') goto yy709;
+ if (yych == 'o') goto yy710;
goto yy186;
}
}
@@ -2298,20 +2422,20 @@ yy126:
yych = *++YYCURSOR;
if (yych <= 'U') {
if (yych <= 'N') {
- if (yych == 'I') goto yy662;
+ if (yych == 'I') goto yy687;
goto yy186;
} else {
- if (yych <= 'O') goto yy663;
+ if (yych <= 'O') goto yy688;
if (yych <= 'T') goto yy186;
- goto yy664;
+ goto yy689;
}
} else {
if (yych <= 'n') {
- if (yych == 'i') goto yy662;
+ if (yych == 'i') goto yy687;
goto yy186;
} else {
- if (yych <= 'o') goto yy663;
- if (yych == 'u') goto yy664;
+ if (yych <= 'o') goto yy688;
+ if (yych == 'u') goto yy689;
goto yy186;
}
}
@@ -2320,42 +2444,42 @@ yy127:
yych = *++YYCURSOR;
if (yych <= 'O') {
if (yych <= 'K') {
- if (yych == 'A') goto yy634;
+ if (yych == 'A') goto yy652;
goto yy186;
} else {
- if (yych <= 'L') goto yy635;
+ if (yych <= 'L') goto yy653;
if (yych <= 'N') goto yy186;
- goto yy636;
+ goto yy654;
}
} else {
if (yych <= 'k') {
- if (yych == 'a') goto yy634;
+ if (yych == 'a') goto yy652;
goto yy186;
} else {
- if (yych <= 'l') goto yy635;
- if (yych == 'o') goto yy636;
+ if (yych <= 'l') goto yy653;
+ if (yych == 'o') goto yy654;
goto yy186;
}
}
yy128:
YYDEBUG(128, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy616;
- if (yych == 'e') goto yy616;
+ if (yych == 'E') goto yy634;
+ if (yych == 'e') goto yy634;
goto yy186;
yy129:
YYDEBUG(129, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'R') {
- if (yych == 'H') goto yy608;
+ if (yych == 'H') goto yy622;
if (yych <= 'Q') goto yy186;
- goto yy609;
+ goto yy623;
} else {
if (yych <= 'h') {
if (yych <= 'g') goto yy186;
- goto yy608;
+ goto yy622;
} else {
- if (yych == 'r') goto yy609;
+ if (yych == 'r') goto yy623;
goto yy186;
}
}
@@ -2364,53 +2488,53 @@ yy130:
yych = *++YYCURSOR;
if (yych <= 'S') {
if (yych <= 'L') {
- if (yych == 'F') goto yy561;
+ if (yych == 'F') goto yy569;
goto yy186;
} else {
- if (yych <= 'M') goto yy563;
- if (yych <= 'N') goto yy564;
+ if (yych <= 'M') goto yy571;
+ if (yych <= 'N') goto yy572;
if (yych <= 'R') goto yy186;
- goto yy565;
+ goto yy573;
}
} else {
if (yych <= 'm') {
- if (yych == 'f') goto yy561;
+ if (yych == 'f') goto yy569;
if (yych <= 'l') goto yy186;
- goto yy563;
+ goto yy571;
} else {
- if (yych <= 'n') goto yy564;
- if (yych == 's') goto yy565;
+ if (yych <= 'n') goto yy572;
+ if (yych == 's') goto yy573;
goto yy186;
}
}
yy131:
YYDEBUG(131, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy556;
- if (yych == 'h') goto yy556;
+ if (yych == 'H') goto yy564;
+ if (yych == 'h') goto yy564;
goto yy186;
yy132:
YYDEBUG(132, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'S') {
if (yych <= 'M') {
- if (yych == 'B') goto yy538;
+ if (yych == 'B') goto yy546;
goto yy186;
} else {
- if (yych <= 'N') goto yy539;
+ if (yych <= 'N') goto yy547;
if (yych <= 'Q') goto yy186;
- if (yych <= 'R') goto yy540;
- goto yy541;
+ if (yych <= 'R') goto yy548;
+ goto yy549;
}
} else {
if (yych <= 'n') {
- if (yych == 'b') goto yy538;
+ if (yych == 'b') goto yy546;
if (yych <= 'm') goto yy186;
- goto yy539;
+ goto yy547;
} else {
if (yych <= 'q') goto yy186;
- if (yych <= 'r') goto yy540;
- if (yych <= 's') goto yy541;
+ if (yych <= 'r') goto yy548;
+ if (yych <= 's') goto yy549;
goto yy186;
}
}
@@ -2418,15 +2542,15 @@ yy133:
YYDEBUG(133, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'W') {
- if (yych == 'T') goto yy526;
+ if (yych == 'T') goto yy534;
if (yych <= 'V') goto yy186;
- goto yy527;
+ goto yy535;
} else {
if (yych <= 't') {
if (yych <= 's') goto yy186;
- goto yy526;
+ goto yy534;
} else {
- if (yych == 'w') goto yy527;
+ if (yych == 'w') goto yy535;
goto yy186;
}
}
@@ -2437,18 +2561,18 @@ yy134:
if (yych <= ';') {
if (yych <= '"') {
if (yych <= '!') goto yy186;
- goto yy518;
+ goto yy526;
} else {
- if (yych == '\'') goto yy519;
+ if (yych == '\'') goto yy527;
goto yy186;
}
} else {
if (yych <= 'R') {
- if (yych <= '<') goto yy517;
+ if (yych <= '<') goto yy525;
if (yych <= 'Q') goto yy186;
- goto yy520;
+ goto yy528;
} else {
- if (yych == 'r') goto yy520;
+ if (yych == 'r') goto yy528;
goto yy186;
}
}
@@ -2456,15 +2580,15 @@ yy135:
YYDEBUG(135, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'O') {
- if (yych == 'L') goto yy507;
+ if (yych == 'L') goto yy515;
if (yych <= 'N') goto yy186;
- goto yy508;
+ goto yy516;
} else {
if (yych <= 'l') {
if (yych <= 'k') goto yy186;
- goto yy507;
+ goto yy515;
} else {
- if (yych == 'o') goto yy508;
+ if (yych == 'o') goto yy516;
goto yy186;
}
}
@@ -2472,15 +2596,15 @@ yy136:
YYDEBUG(136, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'U') {
- if (yych == 'R') goto yy483;
+ if (yych == 'R') goto yy491;
if (yych <= 'T') goto yy186;
- goto yy484;
+ goto yy492;
} else {
if (yych <= 'r') {
if (yych <= 'q') goto yy186;
- goto yy483;
+ goto yy491;
} else {
- if (yych == 'u') goto yy484;
+ if (yych == 'u') goto yy492;
goto yy186;
}
}
@@ -2488,28 +2612,28 @@ yy137:
YYDEBUG(137, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '<') {
- if (yych == '-') goto yy479;
+ if (yych == '-') goto yy487;
} else {
- if (yych <= '=') goto yy477;
- if (yych <= '>') goto yy481;
+ if (yych <= '=') goto yy485;
+ if (yych <= '>') goto yy489;
}
yy138:
YYDEBUG(138, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1289 "Zend/zend_language_scanner.l"
+#line 1431 "Zend/zend_language_scanner.l"
{
return yytext[0];
}
-#line 2504 "Zend/zend_language_scanner.c"
+#line 2628 "Zend/zend_language_scanner.c"
yy139:
YYDEBUG(139, *YYCURSOR);
++YYCURSOR;
yych = *YYCURSOR;
- goto yy476;
+ goto yy484;
yy140:
YYDEBUG(140, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1024 "Zend/zend_language_scanner.l"
+#line 1162 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -2517,43 +2641,43 @@ yy140:
HANDLE_NEWLINES(yytext, yyleng);
return T_WHITESPACE;
}
-#line 2521 "Zend/zend_language_scanner.c"
+#line 2645 "Zend/zend_language_scanner.c"
yy141:
YYDEBUG(141, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == ':') goto yy473;
+ if (yych == ':') goto yy481;
goto yy138;
yy142:
YYDEBUG(142, *YYCURSOR);
++YYCURSOR;
YYDEBUG(143, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1053 "Zend/zend_language_scanner.l"
+#line 1191 "Zend/zend_language_scanner.l"
{
return T_NS_SEPARATOR;
}
-#line 2536 "Zend/zend_language_scanner.c"
+#line 2660 "Zend/zend_language_scanner.c"
yy144:
YYDEBUG(144, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'E') {
- if (yych == 'A') goto yy461;
+ if (yych == 'A') goto yy469;
if (yych <= 'D') goto yy186;
- goto yy462;
+ goto yy470;
} else {
if (yych <= 'a') {
if (yych <= '`') goto yy186;
- goto yy461;
+ goto yy469;
} else {
- if (yych == 'e') goto yy462;
+ if (yych == 'e') goto yy470;
goto yy186;
}
}
yy145:
YYDEBUG(145, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy458;
- if (yych == 'a') goto yy458;
+ if (yych == 'A') goto yy466;
+ if (yych == 'a') goto yy466;
goto yy186;
yy146:
YYDEBUG(146, *YYCURSOR);
@@ -2562,47 +2686,47 @@ yy146:
if (yych <= 'S') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == '\t') goto yy379;
+ if (yych == '\t') goto yy391;
if (yych <= 0x1F) goto yy138;
- goto yy379;
+ goto yy391;
} else {
if (yych <= '@') goto yy138;
if (yych == 'C') goto yy138;
- goto yy379;
+ goto yy391;
}
} else {
if (yych <= 'I') {
- if (yych == 'F') goto yy379;
+ if (yych == 'F') goto yy391;
if (yych <= 'H') goto yy138;
- goto yy379;
+ goto yy391;
} else {
- if (yych == 'O') goto yy379;
+ if (yych == 'O') goto yy391;
if (yych <= 'Q') goto yy138;
- goto yy379;
+ goto yy391;
}
}
} else {
if (yych <= 'f') {
if (yych <= 'b') {
- if (yych == 'U') goto yy379;
+ if (yych == 'U') goto yy391;
if (yych <= '`') goto yy138;
- goto yy379;
+ goto yy391;
} else {
- if (yych == 'd') goto yy379;
+ if (yych == 'd') goto yy391;
if (yych <= 'e') goto yy138;
- goto yy379;
+ goto yy391;
}
} else {
if (yych <= 'o') {
- if (yych == 'i') goto yy379;
+ if (yych == 'i') goto yy391;
if (yych <= 'n') goto yy138;
- goto yy379;
+ goto yy391;
} else {
if (yych <= 's') {
if (yych <= 'q') goto yy138;
- goto yy379;
+ goto yy391;
} else {
- if (yych == 'u') goto yy379;
+ if (yych == 'u') goto yy391;
goto yy138;
}
}
@@ -2612,139 +2736,139 @@ yy147:
YYDEBUG(147, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'S') {
- if (yych == 'N') goto yy370;
+ if (yych == 'N') goto yy382;
if (yych <= 'R') goto yy186;
- goto yy371;
+ goto yy383;
} else {
if (yych <= 'n') {
if (yych <= 'm') goto yy186;
- goto yy370;
+ goto yy382;
} else {
- if (yych == 's') goto yy371;
+ if (yych == 's') goto yy383;
goto yy186;
}
}
yy148:
YYDEBUG(148, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '_') goto yy296;
+ if (yych == '_') goto yy300;
goto yy186;
yy149:
YYDEBUG(149, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '<') goto yy138;
- if (yych <= '=') goto yy290;
- if (yych <= '>') goto yy292;
+ if (yych <= '=') goto yy294;
+ if (yych <= '>') goto yy296;
goto yy138;
yy150:
YYDEBUG(150, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy286;
- if (yych == 'i') goto yy286;
+ if (yych == 'I') goto yy290;
+ if (yych == 'i') goto yy290;
goto yy186;
yy151:
YYDEBUG(151, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '+') goto yy284;
- if (yych == '=') goto yy282;
+ if (yych == '+') goto yy288;
+ if (yych == '=') goto yy286;
goto yy138;
yy152:
YYDEBUG(152, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '=') goto yy279;
+ if (yych == '=') goto yy283;
goto yy138;
yy153:
YYDEBUG(153, *YYCURSOR);
yyaccept = 1;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ';') {
- if (yych == '/') goto yy251;
+ if (yych == '/') goto yy255;
goto yy138;
} else {
- if (yych <= '<') goto yy249;
- if (yych <= '=') goto yy252;
- if (yych <= '>') goto yy254;
+ if (yych <= '<') goto yy253;
+ if (yych <= '=') goto yy256;
+ if (yych <= '>') goto yy258;
goto yy138;
}
yy154:
YYDEBUG(154, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '<') goto yy138;
- if (yych <= '=') goto yy245;
- if (yych <= '>') goto yy243;
+ if (yych <= '=') goto yy249;
+ if (yych <= '>') goto yy247;
goto yy138;
yy155:
YYDEBUG(155, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '=') goto yy241;
+ if (yych == '=') goto yy245;
goto yy138;
yy156:
YYDEBUG(156, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '.') {
- if (yych == '*') goto yy233;
+ if (yych == '*') goto yy237;
goto yy138;
} else {
- if (yych <= '/') goto yy235;
- if (yych == '=') goto yy236;
+ if (yych <= '/') goto yy239;
+ if (yych == '=') goto yy240;
goto yy138;
}
yy157:
YYDEBUG(157, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '/') goto yy138;
- if (yych <= '9') goto yy229;
- if (yych == '=') goto yy231;
+ if (yych <= '9') goto yy233;
+ if (yych == '=') goto yy235;
goto yy138;
yy158:
YYDEBUG(158, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '<') goto yy138;
- if (yych <= '=') goto yy225;
- if (yych <= '>') goto yy223;
+ if (yych <= '=') goto yy229;
+ if (yych <= '>') goto yy227;
goto yy138;
yy159:
YYDEBUG(159, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '&') goto yy219;
- if (yych == '=') goto yy221;
+ if (yych == '&') goto yy223;
+ if (yych == '=') goto yy225;
goto yy138;
yy160:
YYDEBUG(160, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '=') goto yy217;
- if (yych == '|') goto yy215;
+ if (yych == '=') goto yy221;
+ if (yych == '|') goto yy219;
goto yy138;
yy161:
YYDEBUG(161, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '=') goto yy213;
+ if (yych == '=') goto yy217;
goto yy138;
yy162:
YYDEBUG(162, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy211;
- if (yych == 'r') goto yy211;
+ if (yych == 'R') goto yy215;
+ if (yych == 'r') goto yy215;
goto yy186;
yy163:
YYDEBUG(163, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy208;
- if (yych == 'o') goto yy208;
+ if (yych == 'O') goto yy212;
+ if (yych == 'o') goto yy212;
goto yy186;
yy164:
YYDEBUG(164, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= '_') {
if (yych <= '@') goto yy138;
- if (yych <= 'Z') goto yy205;
+ if (yych <= 'Z') goto yy209;
if (yych <= '^') goto yy138;
- goto yy205;
+ goto yy209;
} else {
if (yych <= '`') goto yy138;
- if (yych <= 'z') goto yy205;
+ if (yych <= 'z') goto yy209;
if (yych <= '~') goto yy138;
- goto yy205;
+ goto yy209;
}
yy165:
YYDEBUG(165, *YYCURSOR);
@@ -2753,25 +2877,25 @@ yy165:
yy166:
YYDEBUG(166, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '>') goto yy201;
+ if (yych == '>') goto yy205;
goto yy138;
yy167:
YYDEBUG(167, *YYCURSOR);
++YYCURSOR;
YYDEBUG(168, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1294 "Zend/zend_language_scanner.l"
+#line 1436 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
return '{';
}
-#line 2769 "Zend/zend_language_scanner.c"
+#line 2893 "Zend/zend_language_scanner.c"
yy169:
YYDEBUG(169, *YYCURSOR);
++YYCURSOR;
YYDEBUG(170, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1306 "Zend/zend_language_scanner.l"
+#line 1448 "Zend/zend_language_scanner.l"
{
RESET_DOC_COMMENT();
if (!zend_stack_is_empty(&SCNG(state_stack))) {
@@ -2779,30 +2903,35 @@ yy169:
}
return '}';
}
-#line 2783 "Zend/zend_language_scanner.c"
+#line 2907 "Zend/zend_language_scanner.c"
yy171:
YYDEBUG(171, *YYCURSOR);
yyaccept = 2;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 'E') {
- if (yych <= '/') {
+ if (yych <= '9') {
if (yych == '.') goto yy187;
+ if (yych >= '0') goto yy190;
} else {
- if (yych <= '9') goto yy190;
+ if (yych == 'B') goto yy198;
if (yych >= 'E') goto yy192;
}
} else {
- if (yych <= 'd') {
+ if (yych <= 'b') {
if (yych == 'X') goto yy197;
+ if (yych >= 'b') goto yy198;
} else {
- if (yych <= 'e') goto yy192;
- if (yych == 'x') goto yy197;
+ if (yych <= 'e') {
+ if (yych >= 'e') goto yy192;
+ } else {
+ if (yych == 'x') goto yy197;
+ }
}
}
yy172:
YYDEBUG(172, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1332 "Zend/zend_language_scanner.l"
+#line 1494 "Zend/zend_language_scanner.l"
{
if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */
zendlval->value.lval = strtol(yytext, NULL, 0);
@@ -2823,7 +2952,7 @@ yy172:
zendlval->type = IS_LONG;
return T_LNUMBER;
}
-#line 2827 "Zend/zend_language_scanner.c"
+#line 2956 "Zend/zend_language_scanner.c"
yy173:
YYDEBUG(173, *YYCURSOR);
yyaccept = 2;
@@ -2851,7 +2980,7 @@ yy175:
yy176:
YYDEBUG(176, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1703 "Zend/zend_language_scanner.l"
+#line 1887 "Zend/zend_language_scanner.l"
{
while (YYCURSOR < YYLIMIT) {
switch (*YYCURSOR++) {
@@ -2885,14 +3014,14 @@ yy176:
return T_COMMENT;
}
-#line 2889 "Zend/zend_language_scanner.c"
+#line 3018 "Zend/zend_language_scanner.c"
yy177:
YYDEBUG(177, *YYCURSOR);
++YYCURSOR;
yy178:
YYDEBUG(178, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1794 "Zend/zend_language_scanner.l"
+#line 1978 "Zend/zend_language_scanner.l"
{
register char *s, *t;
char *end;
@@ -2951,7 +3080,6 @@ yy178:
}
*t = 0;
-#ifdef ZEND_MULTIBYTE
if (SCNG(output_filter)) {
size_t sz = 0;
s = zendlval->value.str.val;
@@ -2959,17 +3087,16 @@ yy178:
zendlval->value.str.len = sz;
efree(s);
}
-#endif /* ZEND_MULTIBYTE */
return T_CONSTANT_ENCAPSED_STRING;
}
-#line 2966 "Zend/zend_language_scanner.c"
+#line 3093 "Zend/zend_language_scanner.c"
yy179:
YYDEBUG(179, *YYCURSOR);
++YYCURSOR;
yy180:
YYDEBUG(180, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1865 "Zend/zend_language_scanner.l"
+#line 2047 "Zend/zend_language_scanner.l"
{
int bprefix = (yytext[0] != '"') ? 1 : 0;
@@ -3010,24 +3137,24 @@ yy180:
BEGIN(ST_DOUBLE_QUOTES);
return '"';
}
-#line 3014 "Zend/zend_language_scanner.c"
+#line 3141 "Zend/zend_language_scanner.c"
yy181:
YYDEBUG(181, *YYCURSOR);
++YYCURSOR;
YYDEBUG(182, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1956 "Zend/zend_language_scanner.l"
+#line 2138 "Zend/zend_language_scanner.l"
{
BEGIN(ST_BACKQUOTE);
return '`';
}
-#line 3025 "Zend/zend_language_scanner.c"
+#line 3152 "Zend/zend_language_scanner.c"
yy183:
YYDEBUG(183, *YYCURSOR);
++YYCURSOR;
YYDEBUG(184, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2214 "Zend/zend_language_scanner.l"
+#line 2396 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -3036,7 +3163,7 @@ yy183:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 3040 "Zend/zend_language_scanner.c"
+#line 3167 "Zend/zend_language_scanner.c"
yy185:
YYDEBUG(185, *YYCURSOR);
++YYCURSOR;
@@ -3044,7 +3171,7 @@ yy185:
yych = *YYCURSOR;
yy186:
YYDEBUG(186, *YYCURSOR);
- if (yybm[0+yych] & 8) {
+ if (yybm[0+yych] & 4) {
goto yy185;
}
goto yy124;
@@ -3055,7 +3182,7 @@ yy187:
YYFILL(3);
yych = *YYCURSOR;
YYDEBUG(188, *YYCURSOR);
- if (yybm[0+yych] & 16) {
+ if (yybm[0+yych] & 8) {
goto yy187;
}
if (yych == 'E') goto yy192;
@@ -3063,13 +3190,13 @@ yy187:
yy189:
YYDEBUG(189, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1393 "Zend/zend_language_scanner.l"
+#line 1555 "Zend/zend_language_scanner.l"
{
zendlval->value.dval = zend_strtod(yytext, NULL);
zendlval->type = IS_DOUBLE;
return T_DNUMBER;
}
-#line 3073 "Zend/zend_language_scanner.c"
+#line 3200 "Zend/zend_language_scanner.c"
yy190:
YYDEBUG(190, *YYCURSOR);
yyaccept = 2;
@@ -3116,10 +3243,10 @@ yy193:
if (yyaccept <= 3) {
goto yy189;
} else {
- goto yy234;
+ goto yy238;
}
} else {
- goto yy250;
+ goto yy254;
}
}
yy194:
@@ -3140,21 +3267,61 @@ yy197:
YYDEBUG(197, *YYCURSOR);
yych = *++YYCURSOR;
if (yybm[0+yych] & 32) {
- goto yy198;
+ goto yy202;
}
goto yy193;
yy198:
YYDEBUG(198, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yybm[0+yych] & 16) {
+ goto yy199;
+ }
+ goto yy193;
+yy199:
+ YYDEBUG(199, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(199, *YYCURSOR);
+ YYDEBUG(200, *YYCURSOR);
+ if (yybm[0+yych] & 16) {
+ goto yy199;
+ }
+ YYDEBUG(201, *YYCURSOR);
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1473 "Zend/zend_language_scanner.l"
+ {
+ char *bin = yytext + 2; /* Skip "0b" */
+ int len = yyleng - 2;
+
+ /* Skip any leading 0s */
+ while (*bin == '0') {
+ ++bin;
+ --len;
+ }
+
+ if (len < SIZEOF_LONG * 8) {
+ zendlval->value.lval = strtol(bin, NULL, 2);
+ zendlval->type = IS_LONG;
+ return T_LNUMBER;
+ } else {
+ zendlval->value.dval = zend_bin_strtod(bin, NULL);
+ zendlval->type = IS_DOUBLE;
+ return T_DNUMBER;
+ }
+}
+#line 3313 "Zend/zend_language_scanner.c"
+yy202:
+ YYDEBUG(202, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ YYDEBUG(203, *YYCURSOR);
if (yybm[0+yych] & 32) {
- goto yy198;
+ goto yy202;
}
- YYDEBUG(200, *YYCURSOR);
+ YYDEBUG(204, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1353 "Zend/zend_language_scanner.l"
+#line 1515 "Zend/zend_language_scanner.l"
{
char *hex = yytext + 2; /* Skip "0x" */
int len = yyleng - 2;
@@ -3175,16 +3342,16 @@ yy198:
return T_DNUMBER;
}
}
-#line 3179 "Zend/zend_language_scanner.c"
-yy201:
- YYDEBUG(201, *YYCURSOR);
+#line 3346 "Zend/zend_language_scanner.c"
+yy205:
+ YYDEBUG(205, *YYCURSOR);
++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy203;
- if (yych == '\r') goto yy204;
-yy202:
- YYDEBUG(202, *YYCURSOR);
+ if ((yych = *YYCURSOR) == '\n') goto yy207;
+ if (yych == '\r') goto yy208;
+yy206:
+ YYDEBUG(206, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1771 "Zend/zend_language_scanner.l"
+#line 1955 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -3192,137 +3359,137 @@ yy202:
BEGIN(INITIAL);
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
}
-#line 3196 "Zend/zend_language_scanner.c"
-yy203:
- YYDEBUG(203, *YYCURSOR);
+#line 3363 "Zend/zend_language_scanner.c"
+yy207:
+ YYDEBUG(207, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy202;
-yy204:
- YYDEBUG(204, *YYCURSOR);
+ goto yy206;
+yy208:
+ YYDEBUG(208, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '\n') goto yy203;
- goto yy202;
-yy205:
- YYDEBUG(205, *YYCURSOR);
+ if (yych == '\n') goto yy207;
+ goto yy206;
+yy209:
+ YYDEBUG(209, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(206, *YYCURSOR);
+ YYDEBUG(210, *YYCURSOR);
if (yych <= '^') {
if (yych <= '9') {
- if (yych >= '0') goto yy205;
+ if (yych >= '0') goto yy209;
} else {
- if (yych <= '@') goto yy207;
- if (yych <= 'Z') goto yy205;
+ if (yych <= '@') goto yy211;
+ if (yych <= 'Z') goto yy209;
}
} else {
if (yych <= '`') {
- if (yych <= '_') goto yy205;
+ if (yych <= '_') goto yy209;
} else {
- if (yych <= 'z') goto yy205;
- if (yych >= 0x7F) goto yy205;
+ if (yych <= 'z') goto yy209;
+ if (yych >= 0x7F) goto yy209;
}
}
-yy207:
- YYDEBUG(207, *YYCURSOR);
+yy211:
+ YYDEBUG(211, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1673 "Zend/zend_language_scanner.l"
+#line 1857 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 3236 "Zend/zend_language_scanner.c"
-yy208:
- YYDEBUG(208, *YYCURSOR);
+#line 3403 "Zend/zend_language_scanner.c"
+yy212:
+ YYDEBUG(212, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy209;
+ if (yych == 'R') goto yy213;
if (yych != 'r') goto yy186;
-yy209:
- YYDEBUG(209, *YYCURSOR);
+yy213:
+ YYDEBUG(213, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(210, *YYCURSOR);
+ YYDEBUG(214, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1277 "Zend/zend_language_scanner.l"
+#line 1419 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_XOR;
}
-#line 3254 "Zend/zend_language_scanner.c"
-yy211:
- YYDEBUG(211, *YYCURSOR);
+#line 3421 "Zend/zend_language_scanner.c"
+yy215:
+ YYDEBUG(215, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(212, *YYCURSOR);
+ YYDEBUG(216, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1269 "Zend/zend_language_scanner.l"
+#line 1411 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_OR;
}
-#line 3267 "Zend/zend_language_scanner.c"
-yy213:
- YYDEBUG(213, *YYCURSOR);
+#line 3434 "Zend/zend_language_scanner.c"
+yy217:
+ YYDEBUG(217, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(214, *YYCURSOR);
+ YYDEBUG(218, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1257 "Zend/zend_language_scanner.l"
+#line 1399 "Zend/zend_language_scanner.l"
{
return T_XOR_EQUAL;
}
-#line 3277 "Zend/zend_language_scanner.c"
-yy215:
- YYDEBUG(215, *YYCURSOR);
+#line 3444 "Zend/zend_language_scanner.c"
+yy219:
+ YYDEBUG(219, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(216, *YYCURSOR);
+ YYDEBUG(220, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1261 "Zend/zend_language_scanner.l"
+#line 1403 "Zend/zend_language_scanner.l"
{
return T_BOOLEAN_OR;
}
-#line 3287 "Zend/zend_language_scanner.c"
-yy217:
- YYDEBUG(217, *YYCURSOR);
+#line 3454 "Zend/zend_language_scanner.c"
+yy221:
+ YYDEBUG(221, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(218, *YYCURSOR);
+ YYDEBUG(222, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1253 "Zend/zend_language_scanner.l"
+#line 1395 "Zend/zend_language_scanner.l"
{
return T_OR_EQUAL;
}
-#line 3297 "Zend/zend_language_scanner.c"
-yy219:
- YYDEBUG(219, *YYCURSOR);
+#line 3464 "Zend/zend_language_scanner.c"
+yy223:
+ YYDEBUG(223, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(220, *YYCURSOR);
+ YYDEBUG(224, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1265 "Zend/zend_language_scanner.l"
+#line 1407 "Zend/zend_language_scanner.l"
{
return T_BOOLEAN_AND;
}
-#line 3307 "Zend/zend_language_scanner.c"
-yy221:
- YYDEBUG(221, *YYCURSOR);
+#line 3474 "Zend/zend_language_scanner.c"
+yy225:
+ YYDEBUG(225, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(222, *YYCURSOR);
+ YYDEBUG(226, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1249 "Zend/zend_language_scanner.l"
+#line 1391 "Zend/zend_language_scanner.l"
{
return T_AND_EQUAL;
}
-#line 3317 "Zend/zend_language_scanner.c"
-yy223:
- YYDEBUG(223, *YYCURSOR);
+#line 3484 "Zend/zend_language_scanner.c"
+yy227:
+ YYDEBUG(227, *YYCURSOR);
++YYCURSOR;
- if ((yych = *YYCURSOR) == '\n') goto yy227;
- if (yych == '\r') goto yy228;
-yy224:
- YYDEBUG(224, *YYCURSOR);
+ if ((yych = *YYCURSOR) == '\n') goto yy231;
+ if (yych == '\r') goto yy232;
+yy228:
+ YYDEBUG(228, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1780 "Zend/zend_language_scanner.l"
+#line 1964 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
BEGIN(INITIAL);
@@ -3335,61 +3502,61 @@ yy224:
return yytext[0];
}
}
-#line 3339 "Zend/zend_language_scanner.c"
-yy225:
- YYDEBUG(225, *YYCURSOR);
+#line 3506 "Zend/zend_language_scanner.c"
+yy229:
+ YYDEBUG(229, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(226, *YYCURSOR);
+ YYDEBUG(230, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1237 "Zend/zend_language_scanner.l"
+#line 1379 "Zend/zend_language_scanner.l"
{
return T_MOD_EQUAL;
}
-#line 3349 "Zend/zend_language_scanner.c"
-yy227:
- YYDEBUG(227, *YYCURSOR);
+#line 3516 "Zend/zend_language_scanner.c"
+yy231:
+ YYDEBUG(231, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy224;
-yy228:
- YYDEBUG(228, *YYCURSOR);
+ goto yy228;
+yy232:
+ YYDEBUG(232, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '\n') goto yy227;
- goto yy224;
-yy229:
- YYDEBUG(229, *YYCURSOR);
+ if (yych == '\n') goto yy231;
+ goto yy228;
+yy233:
+ YYDEBUG(233, *YYCURSOR);
yyaccept = 3;
YYMARKER = ++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(230, *YYCURSOR);
+ YYDEBUG(234, *YYCURSOR);
if (yych <= 'D') {
if (yych <= '/') goto yy189;
- if (yych <= '9') goto yy229;
+ if (yych <= '9') goto yy233;
goto yy189;
} else {
if (yych <= 'E') goto yy192;
if (yych == 'e') goto yy192;
goto yy189;
}
-yy231:
- YYDEBUG(231, *YYCURSOR);
+yy235:
+ YYDEBUG(235, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(232, *YYCURSOR);
+ YYDEBUG(236, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1233 "Zend/zend_language_scanner.l"
+#line 1375 "Zend/zend_language_scanner.l"
{
return T_CONCAT_EQUAL;
}
-#line 3384 "Zend/zend_language_scanner.c"
-yy233:
- YYDEBUG(233, *YYCURSOR);
+#line 3551 "Zend/zend_language_scanner.c"
+yy237:
+ YYDEBUG(237, *YYCURSOR);
yyaccept = 4;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '*') goto yy238;
-yy234:
- YYDEBUG(234, *YYCURSOR);
+ if (yych == '*') goto yy242;
+yy238:
+ YYDEBUG(238, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1737 "Zend/zend_language_scanner.l"
+#line 1921 "Zend/zend_language_scanner.l"
{
int doc_com;
@@ -3423,281 +3590,281 @@ yy234:
return T_COMMENT;
}
-#line 3427 "Zend/zend_language_scanner.c"
-yy235:
- YYDEBUG(235, *YYCURSOR);
+#line 3594 "Zend/zend_language_scanner.c"
+yy239:
+ YYDEBUG(239, *YYCURSOR);
yych = *++YYCURSOR;
goto yy176;
-yy236:
- YYDEBUG(236, *YYCURSOR);
+yy240:
+ YYDEBUG(240, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(237, *YYCURSOR);
+ YYDEBUG(241, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1229 "Zend/zend_language_scanner.l"
+#line 1371 "Zend/zend_language_scanner.l"
{
return T_DIV_EQUAL;
}
-#line 3441 "Zend/zend_language_scanner.c"
-yy238:
- YYDEBUG(238, *YYCURSOR);
+#line 3608 "Zend/zend_language_scanner.c"
+yy242:
+ YYDEBUG(242, *YYCURSOR);
yych = *++YYCURSOR;
if (yybm[0+yych] & 64) {
- goto yy239;
+ goto yy243;
}
goto yy193;
-yy239:
- YYDEBUG(239, *YYCURSOR);
+yy243:
+ YYDEBUG(243, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(240, *YYCURSOR);
+ YYDEBUG(244, *YYCURSOR);
if (yybm[0+yych] & 64) {
- goto yy239;
+ goto yy243;
}
- goto yy234;
-yy241:
- YYDEBUG(241, *YYCURSOR);
+ goto yy238;
+yy245:
+ YYDEBUG(245, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(242, *YYCURSOR);
+ YYDEBUG(246, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1225 "Zend/zend_language_scanner.l"
+#line 1367 "Zend/zend_language_scanner.l"
{
return T_MUL_EQUAL;
}
-#line 3468 "Zend/zend_language_scanner.c"
-yy243:
- YYDEBUG(243, *YYCURSOR);
+#line 3635 "Zend/zend_language_scanner.c"
+yy247:
+ YYDEBUG(247, *YYCURSOR);
++YYCURSOR;
- if ((yych = *YYCURSOR) == '=') goto yy247;
- YYDEBUG(244, *YYCURSOR);
+ if ((yych = *YYCURSOR) == '=') goto yy251;
+ YYDEBUG(248, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1285 "Zend/zend_language_scanner.l"
+#line 1427 "Zend/zend_language_scanner.l"
{
return T_SR;
}
-#line 3479 "Zend/zend_language_scanner.c"
-yy245:
- YYDEBUG(245, *YYCURSOR);
+#line 3646 "Zend/zend_language_scanner.c"
+yy249:
+ YYDEBUG(249, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(246, *YYCURSOR);
+ YYDEBUG(250, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1213 "Zend/zend_language_scanner.l"
+#line 1355 "Zend/zend_language_scanner.l"
{
return T_IS_GREATER_OR_EQUAL;
}
-#line 3489 "Zend/zend_language_scanner.c"
-yy247:
- YYDEBUG(247, *YYCURSOR);
+#line 3656 "Zend/zend_language_scanner.c"
+yy251:
+ YYDEBUG(251, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(248, *YYCURSOR);
+ YYDEBUG(252, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1245 "Zend/zend_language_scanner.l"
+#line 1387 "Zend/zend_language_scanner.l"
{
return T_SR_EQUAL;
}
-#line 3499 "Zend/zend_language_scanner.c"
-yy249:
- YYDEBUG(249, *YYCURSOR);
+#line 3666 "Zend/zend_language_scanner.c"
+yy253:
+ YYDEBUG(253, *YYCURSOR);
yyaccept = 5;
yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ';') goto yy250;
- if (yych <= '<') goto yy265;
- if (yych <= '=') goto yy263;
-yy250:
- YYDEBUG(250, *YYCURSOR);
+ if (yych <= ';') goto yy254;
+ if (yych <= '<') goto yy269;
+ if (yych <= '=') goto yy267;
+yy254:
+ YYDEBUG(254, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1281 "Zend/zend_language_scanner.l"
+#line 1423 "Zend/zend_language_scanner.l"
{
return T_SL;
}
-#line 3514 "Zend/zend_language_scanner.c"
-yy251:
- YYDEBUG(251, *YYCURSOR);
+#line 3681 "Zend/zend_language_scanner.c"
+yy255:
+ YYDEBUG(255, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy256;
- if (yych == 's') goto yy256;
+ if (yych == 'S') goto yy260;
+ if (yych == 's') goto yy260;
goto yy193;
-yy252:
- YYDEBUG(252, *YYCURSOR);
+yy256:
+ YYDEBUG(256, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(253, *YYCURSOR);
+ YYDEBUG(257, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1209 "Zend/zend_language_scanner.l"
+#line 1351 "Zend/zend_language_scanner.l"
{
return T_IS_SMALLER_OR_EQUAL;
}
-#line 3530 "Zend/zend_language_scanner.c"
-yy254:
- YYDEBUG(254, *YYCURSOR);
+#line 3697 "Zend/zend_language_scanner.c"
+yy258:
+ YYDEBUG(258, *YYCURSOR);
++YYCURSOR;
-yy255:
- YYDEBUG(255, *YYCURSOR);
+yy259:
+ YYDEBUG(259, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1205 "Zend/zend_language_scanner.l"
+#line 1347 "Zend/zend_language_scanner.l"
{
return T_IS_NOT_EQUAL;
}
-#line 3541 "Zend/zend_language_scanner.c"
-yy256:
- YYDEBUG(256, *YYCURSOR);
+#line 3708 "Zend/zend_language_scanner.c"
+yy260:
+ YYDEBUG(260, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy257;
+ if (yych == 'C') goto yy261;
if (yych != 'c') goto yy193;
-yy257:
- YYDEBUG(257, *YYCURSOR);
+yy261:
+ YYDEBUG(261, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy258;
+ if (yych == 'R') goto yy262;
if (yych != 'r') goto yy193;
-yy258:
- YYDEBUG(258, *YYCURSOR);
+yy262:
+ YYDEBUG(262, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy259;
+ if (yych == 'I') goto yy263;
if (yych != 'i') goto yy193;
-yy259:
- YYDEBUG(259, *YYCURSOR);
+yy263:
+ YYDEBUG(263, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'P') goto yy260;
+ if (yych == 'P') goto yy264;
if (yych != 'p') goto yy193;
-yy260:
- YYDEBUG(260, *YYCURSOR);
+yy264:
+ YYDEBUG(264, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy261;
+ if (yych == 'T') goto yy265;
if (yych != 't') goto yy193;
-yy261:
- YYDEBUG(261, *YYCURSOR);
+yy265:
+ YYDEBUG(265, *YYCURSOR);
++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
- YYDEBUG(262, *YYCURSOR);
+ YYDEBUG(266, *YYCURSOR);
if (yych <= '\r') {
if (yych <= 0x08) goto yy193;
- if (yych <= '\n') goto yy261;
+ if (yych <= '\n') goto yy265;
if (yych <= '\f') goto yy193;
- goto yy261;
+ goto yy265;
} else {
if (yych <= ' ') {
if (yych <= 0x1F) goto yy193;
- goto yy261;
+ goto yy265;
} else {
- if (yych == '>') goto yy201;
+ if (yych == '>') goto yy205;
goto yy193;
}
}
-yy263:
- YYDEBUG(263, *YYCURSOR);
+yy267:
+ YYDEBUG(267, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(264, *YYCURSOR);
+ YYDEBUG(268, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1241 "Zend/zend_language_scanner.l"
+#line 1383 "Zend/zend_language_scanner.l"
{
return T_SL_EQUAL;
}
-#line 3596 "Zend/zend_language_scanner.c"
-yy265:
- YYDEBUG(265, *YYCURSOR);
+#line 3763 "Zend/zend_language_scanner.c"
+yy269:
+ YYDEBUG(269, *YYCURSOR);
++YYCURSOR;
YYFILL(2);
yych = *YYCURSOR;
- YYDEBUG(266, *YYCURSOR);
+ YYDEBUG(270, *YYCURSOR);
if (yybm[0+yych] & 128) {
- goto yy265;
+ goto yy269;
}
if (yych <= 'Z') {
if (yych <= '&') {
- if (yych == '"') goto yy270;
+ if (yych == '"') goto yy274;
goto yy193;
} else {
- if (yych <= '\'') goto yy269;
+ if (yych <= '\'') goto yy273;
if (yych <= '@') goto yy193;
}
} else {
if (yych <= '`') {
if (yych != '_') goto yy193;
} else {
- if (yych <= 'z') goto yy267;
+ if (yych <= 'z') goto yy271;
if (yych <= '~') goto yy193;
}
}
-yy267:
- YYDEBUG(267, *YYCURSOR);
+yy271:
+ YYDEBUG(271, *YYCURSOR);
++YYCURSOR;
YYFILL(2);
yych = *YYCURSOR;
- YYDEBUG(268, *YYCURSOR);
+ YYDEBUG(272, *YYCURSOR);
if (yych <= '@') {
if (yych <= '\f') {
- if (yych == '\n') goto yy274;
+ if (yych == '\n') goto yy278;
goto yy193;
} else {
- if (yych <= '\r') goto yy276;
+ if (yych <= '\r') goto yy280;
if (yych <= '/') goto yy193;
- if (yych <= '9') goto yy267;
+ if (yych <= '9') goto yy271;
goto yy193;
}
} else {
if (yych <= '_') {
- if (yych <= 'Z') goto yy267;
+ if (yych <= 'Z') goto yy271;
if (yych <= '^') goto yy193;
- goto yy267;
+ goto yy271;
} else {
if (yych <= '`') goto yy193;
- if (yych <= 'z') goto yy267;
+ if (yych <= 'z') goto yy271;
if (yych <= '~') goto yy193;
- goto yy267;
+ goto yy271;
}
}
-yy269:
- YYDEBUG(269, *YYCURSOR);
+yy273:
+ YYDEBUG(273, *YYCURSOR);
yych = *++YYCURSOR;
if (yych == '\'') goto yy193;
- if (yych <= '/') goto yy278;
+ if (yych <= '/') goto yy282;
if (yych <= '9') goto yy193;
- goto yy278;
-yy270:
- YYDEBUG(270, *YYCURSOR);
+ goto yy282;
+yy274:
+ YYDEBUG(274, *YYCURSOR);
yych = *++YYCURSOR;
if (yych == '"') goto yy193;
- if (yych <= '/') goto yy272;
+ if (yych <= '/') goto yy276;
if (yych <= '9') goto yy193;
- goto yy272;
-yy271:
- YYDEBUG(271, *YYCURSOR);
+ goto yy276;
+yy275:
+ YYDEBUG(275, *YYCURSOR);
++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
-yy272:
- YYDEBUG(272, *YYCURSOR);
+yy276:
+ YYDEBUG(276, *YYCURSOR);
if (yych <= 'Z') {
if (yych <= '/') {
if (yych != '"') goto yy193;
} else {
- if (yych <= '9') goto yy271;
+ if (yych <= '9') goto yy275;
if (yych <= '@') goto yy193;
- goto yy271;
+ goto yy275;
}
} else {
if (yych <= '`') {
- if (yych == '_') goto yy271;
+ if (yych == '_') goto yy275;
goto yy193;
} else {
- if (yych <= 'z') goto yy271;
+ if (yych <= 'z') goto yy275;
if (yych <= '~') goto yy193;
- goto yy271;
+ goto yy275;
}
}
-yy273:
- YYDEBUG(273, *YYCURSOR);
+yy277:
+ YYDEBUG(277, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '\n') goto yy274;
- if (yych == '\r') goto yy276;
+ if (yych == '\n') goto yy278;
+ if (yych == '\r') goto yy280;
goto yy193;
-yy274:
- YYDEBUG(274, *YYCURSOR);
+yy278:
+ YYDEBUG(278, *YYCURSOR);
++YYCURSOR;
-yy275:
- YYDEBUG(275, *YYCURSOR);
+yy279:
+ YYDEBUG(279, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1907 "Zend/zend_language_scanner.l"
+#line 2089 "Zend/zend_language_scanner.l"
{
char *s;
int bprefix = (yytext[0] != '<') ? 1 : 0;
@@ -3745,217 +3912,200 @@ yy275:
return T_START_HEREDOC;
}
-#line 3749 "Zend/zend_language_scanner.c"
-yy276:
- YYDEBUG(276, *YYCURSOR);
+#line 3916 "Zend/zend_language_scanner.c"
+yy280:
+ YYDEBUG(280, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '\n') goto yy274;
- goto yy275;
-yy277:
- YYDEBUG(277, *YYCURSOR);
+ if (yych == '\n') goto yy278;
+ goto yy279;
+yy281:
+ YYDEBUG(281, *YYCURSOR);
++YYCURSOR;
YYFILL(3);
yych = *YYCURSOR;
-yy278:
- YYDEBUG(278, *YYCURSOR);
+yy282:
+ YYDEBUG(282, *YYCURSOR);
if (yych <= 'Z') {
if (yych <= '/') {
- if (yych == '\'') goto yy273;
+ if (yych == '\'') goto yy277;
goto yy193;
} else {
- if (yych <= '9') goto yy277;
+ if (yych <= '9') goto yy281;
if (yych <= '@') goto yy193;
- goto yy277;
+ goto yy281;
}
} else {
if (yych <= '`') {
- if (yych == '_') goto yy277;
+ if (yych == '_') goto yy281;
goto yy193;
} else {
- if (yych <= 'z') goto yy277;
+ if (yych <= 'z') goto yy281;
if (yych <= '~') goto yy193;
- goto yy277;
+ goto yy281;
}
}
-yy279:
- YYDEBUG(279, *YYCURSOR);
+yy283:
+ YYDEBUG(283, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '=') goto yy255;
- YYDEBUG(280, *YYCURSOR);
+ if (yych != '=') goto yy259;
+ YYDEBUG(284, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(281, *YYCURSOR);
+ YYDEBUG(285, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1197 "Zend/zend_language_scanner.l"
+#line 1339 "Zend/zend_language_scanner.l"
{
return T_IS_NOT_IDENTICAL;
}
-#line 3793 "Zend/zend_language_scanner.c"
-yy282:
- YYDEBUG(282, *YYCURSOR);
+#line 3960 "Zend/zend_language_scanner.c"
+yy286:
+ YYDEBUG(286, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(283, *YYCURSOR);
+ YYDEBUG(287, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1217 "Zend/zend_language_scanner.l"
+#line 1359 "Zend/zend_language_scanner.l"
{
return T_PLUS_EQUAL;
}
-#line 3803 "Zend/zend_language_scanner.c"
-yy284:
- YYDEBUG(284, *YYCURSOR);
+#line 3970 "Zend/zend_language_scanner.c"
+yy288:
+ YYDEBUG(288, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(285, *YYCURSOR);
+ YYDEBUG(289, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1185 "Zend/zend_language_scanner.l"
+#line 1327 "Zend/zend_language_scanner.l"
{
return T_INC;
}
-#line 3813 "Zend/zend_language_scanner.c"
-yy286:
- YYDEBUG(286, *YYCURSOR);
+#line 3980 "Zend/zend_language_scanner.c"
+yy290:
+ YYDEBUG(290, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy287;
+ if (yych == 'S') goto yy291;
if (yych != 's') goto yy186;
-yy287:
- YYDEBUG(287, *YYCURSOR);
+yy291:
+ YYDEBUG(291, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy288;
+ if (yych == 'T') goto yy292;
if (yych != 't') goto yy186;
-yy288:
- YYDEBUG(288, *YYCURSOR);
+yy292:
+ YYDEBUG(292, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(289, *YYCURSOR);
+ YYDEBUG(293, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1177 "Zend/zend_language_scanner.l"
+#line 1315 "Zend/zend_language_scanner.l"
{
return T_LIST;
}
-#line 3836 "Zend/zend_language_scanner.c"
-yy290:
- YYDEBUG(290, *YYCURSOR);
+#line 4003 "Zend/zend_language_scanner.c"
+yy294:
+ YYDEBUG(294, *YYCURSOR);
++YYCURSOR;
- if ((yych = *YYCURSOR) == '=') goto yy294;
- YYDEBUG(291, *YYCURSOR);
+ if ((yych = *YYCURSOR) == '=') goto yy298;
+ YYDEBUG(295, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1201 "Zend/zend_language_scanner.l"
+#line 1343 "Zend/zend_language_scanner.l"
{
return T_IS_EQUAL;
}
-#line 3847 "Zend/zend_language_scanner.c"
-yy292:
- YYDEBUG(292, *YYCURSOR);
+#line 4014 "Zend/zend_language_scanner.c"
+yy296:
+ YYDEBUG(296, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(293, *YYCURSOR);
+ YYDEBUG(297, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1173 "Zend/zend_language_scanner.l"
+#line 1311 "Zend/zend_language_scanner.l"
{
return T_DOUBLE_ARROW;
}
-#line 3857 "Zend/zend_language_scanner.c"
-yy294:
- YYDEBUG(294, *YYCURSOR);
+#line 4024 "Zend/zend_language_scanner.c"
+yy298:
+ YYDEBUG(298, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(295, *YYCURSOR);
+ YYDEBUG(299, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1193 "Zend/zend_language_scanner.l"
+#line 1335 "Zend/zend_language_scanner.l"
{
return T_IS_IDENTICAL;
}
-#line 3867 "Zend/zend_language_scanner.c"
-yy296:
- YYDEBUG(296, *YYCURSOR);
+#line 4034 "Zend/zend_language_scanner.c"
+yy300:
+ YYDEBUG(300, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(-1, yych);
switch (yych) {
case 'C':
- case 'c': goto yy298;
+ case 'c': goto yy302;
case 'D':
- case 'd': goto yy302;
+ case 'd': goto yy307;
case 'F':
- case 'f': goto yy299;
+ case 'f': goto yy304;
case 'H':
- case 'h': goto yy297;
+ case 'h': goto yy301;
case 'L':
- case 'l': goto yy301;
+ case 'l': goto yy306;
case 'M':
- case 'm': goto yy300;
+ case 'm': goto yy305;
case 'N':
- case 'n': goto yy303;
+ case 'n': goto yy308;
+ case 'T':
+ case 't': goto yy303;
default: goto yy186;
}
-yy297:
- YYDEBUG(297, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy357;
- if (yych == 'a') goto yy357;
- goto yy186;
-yy298:
- YYDEBUG(298, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'L') goto yy350;
- if (yych == 'l') goto yy350;
- goto yy186;
-yy299:
- YYDEBUG(299, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych <= 'U') {
- if (yych == 'I') goto yy334;
- if (yych <= 'T') goto yy186;
- goto yy335;
- } else {
- if (yych <= 'i') {
- if (yych <= 'h') goto yy186;
- goto yy334;
- } else {
- if (yych == 'u') goto yy335;
- goto yy186;
- }
- }
-yy300:
- YYDEBUG(300, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy326;
- if (yych == 'e') goto yy326;
- goto yy186;
yy301:
YYDEBUG(301, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy320;
- if (yych == 'i') goto yy320;
+ if (yych == 'A') goto yy369;
+ if (yych == 'a') goto yy369;
goto yy186;
yy302:
YYDEBUG(302, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy315;
- if (yych == 'i') goto yy315;
+ if (yych == 'L') goto yy362;
+ if (yych == 'l') goto yy362;
goto yy186;
yy303:
YYDEBUG(303, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy304;
- if (yych != 'a') goto yy186;
+ if (yych == 'R') goto yy355;
+ if (yych == 'r') goto yy355;
+ goto yy186;
yy304:
YYDEBUG(304, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'M') goto yy305;
- if (yych != 'm') goto yy186;
+ if (yych <= 'U') {
+ if (yych == 'I') goto yy339;
+ if (yych <= 'T') goto yy186;
+ goto yy340;
+ } else {
+ if (yych <= 'i') {
+ if (yych <= 'h') goto yy186;
+ goto yy339;
+ } else {
+ if (yych == 'u') goto yy340;
+ goto yy186;
+ }
+ }
yy305:
YYDEBUG(305, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy306;
- if (yych != 'e') goto yy186;
+ if (yych == 'E') goto yy331;
+ if (yych == 'e') goto yy331;
+ goto yy186;
yy306:
YYDEBUG(306, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy307;
- if (yych != 's') goto yy186;
+ if (yych == 'I') goto yy325;
+ if (yych == 'i') goto yy325;
+ goto yy186;
yy307:
YYDEBUG(307, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'P') goto yy308;
- if (yych != 'p') goto yy186;
+ if (yych == 'I') goto yy320;
+ if (yych == 'i') goto yy320;
+ goto yy186;
yy308:
YYDEBUG(308, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3964,8 +4114,8 @@ yy308:
yy309:
YYDEBUG(309, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy310;
- if (yych != 'c') goto yy186;
+ if (yych == 'M') goto yy310;
+ if (yych != 'm') goto yy186;
yy310:
YYDEBUG(310, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3974,18 +4124,43 @@ yy310:
yy311:
YYDEBUG(311, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych == 'S') goto yy312;
+ if (yych != 's') goto yy186;
+yy312:
YYDEBUG(312, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych != '_') goto yy186;
+ if (yych == 'P') goto yy313;
+ if (yych != 'p') goto yy186;
+yy313:
YYDEBUG(313, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'A') goto yy314;
+ if (yych != 'a') goto yy186;
+yy314:
+ YYDEBUG(314, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'C') goto yy315;
+ if (yych != 'c') goto yy186;
+yy315:
+ YYDEBUG(315, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy316;
+ if (yych != 'e') goto yy186;
+yy316:
+ YYDEBUG(316, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy186;
+ YYDEBUG(317, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy186;
+ YYDEBUG(318, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(314, *YYCURSOR);
+ YYDEBUG(319, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1497 "Zend/zend_language_scanner.l"
+#line 1690 "Zend/zend_language_scanner.l"
{
if (CG(current_namespace)) {
*zendlval = *CG(current_namespace);
@@ -3995,27 +4170,27 @@ yy311:
}
return T_NS_C;
}
-#line 3999 "Zend/zend_language_scanner.c"
-yy315:
- YYDEBUG(315, *YYCURSOR);
+#line 4174 "Zend/zend_language_scanner.c"
+yy320:
+ YYDEBUG(320, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy316;
+ if (yych == 'R') goto yy321;
if (yych != 'r') goto yy186;
-yy316:
- YYDEBUG(316, *YYCURSOR);
+yy321:
+ YYDEBUG(321, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(317, *YYCURSOR);
+ YYDEBUG(322, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(318, *YYCURSOR);
+ YYDEBUG(323, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(319, *YYCURSOR);
+ YYDEBUG(324, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1470 "Zend/zend_language_scanner.l"
+#line 1663 "Zend/zend_language_scanner.l"
{
char *filename = zend_get_compiled_filename(TSRMLS_C);
const size_t filename_len = strlen(filename);
@@ -4042,76 +4217,76 @@ yy316:
zendlval->type = IS_STRING;
return T_DIR;
}
-#line 4046 "Zend/zend_language_scanner.c"
-yy320:
- YYDEBUG(320, *YYCURSOR);
+#line 4221 "Zend/zend_language_scanner.c"
+yy325:
+ YYDEBUG(325, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy321;
+ if (yych == 'N') goto yy326;
if (yych != 'n') goto yy186;
-yy321:
- YYDEBUG(321, *YYCURSOR);
+yy326:
+ YYDEBUG(326, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy322;
+ if (yych == 'E') goto yy327;
if (yych != 'e') goto yy186;
-yy322:
- YYDEBUG(322, *YYCURSOR);
+yy327:
+ YYDEBUG(327, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(323, *YYCURSOR);
+ YYDEBUG(328, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(324, *YYCURSOR);
+ YYDEBUG(329, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(325, *YYCURSOR);
+ YYDEBUG(330, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1452 "Zend/zend_language_scanner.l"
+#line 1645 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = CG(zend_lineno);
zendlval->type = IS_LONG;
return T_LINE;
}
-#line 4077 "Zend/zend_language_scanner.c"
-yy326:
- YYDEBUG(326, *YYCURSOR);
+#line 4252 "Zend/zend_language_scanner.c"
+yy331:
+ YYDEBUG(331, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy327;
+ if (yych == 'T') goto yy332;
if (yych != 't') goto yy186;
-yy327:
- YYDEBUG(327, *YYCURSOR);
+yy332:
+ YYDEBUG(332, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy328;
+ if (yych == 'H') goto yy333;
if (yych != 'h') goto yy186;
-yy328:
- YYDEBUG(328, *YYCURSOR);
+yy333:
+ YYDEBUG(333, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy329;
+ if (yych == 'O') goto yy334;
if (yych != 'o') goto yy186;
-yy329:
- YYDEBUG(329, *YYCURSOR);
+yy334:
+ YYDEBUG(334, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'D') goto yy330;
+ if (yych == 'D') goto yy335;
if (yych != 'd') goto yy186;
-yy330:
- YYDEBUG(330, *YYCURSOR);
+yy335:
+ YYDEBUG(335, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(331, *YYCURSOR);
+ YYDEBUG(336, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(332, *YYCURSOR);
+ YYDEBUG(337, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(333, *YYCURSOR);
+ YYDEBUG(338, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1431 "Zend/zend_language_scanner.l"
+#line 1624 "Zend/zend_language_scanner.l"
{
- char *class_name = CG(active_class_entry) ? CG(active_class_entry)->name : NULL;
- char *func_name = CG(active_op_array)? CG(active_op_array)->function_name : NULL;
+ const char *class_name = CG(active_class_entry) ? CG(active_class_entry)->name : NULL;
+ const char *func_name = CG(active_op_array)? CG(active_op_array)->function_name : NULL;
size_t len = 0;
if (class_name) {
@@ -4121,7 +4296,7 @@ yy330:
len += strlen(func_name);
}
- zendlval->value.str.len = zend_spprintf(&zendlval->value.str.val, 0, "%s%s%s",
+ zendlval->value.str.len = zend_spprintf(&zendlval->value.str.val, 0, "%s%s%s",
class_name ? class_name : "",
class_name && func_name ? "::" : "",
func_name ? func_name : ""
@@ -4129,60 +4304,60 @@ yy330:
zendlval->type = IS_STRING;
return T_METHOD_C;
}
-#line 4133 "Zend/zend_language_scanner.c"
-yy334:
- YYDEBUG(334, *YYCURSOR);
+#line 4308 "Zend/zend_language_scanner.c"
+yy339:
+ YYDEBUG(339, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy345;
- if (yych == 'l') goto yy345;
+ if (yych == 'L') goto yy350;
+ if (yych == 'l') goto yy350;
goto yy186;
-yy335:
- YYDEBUG(335, *YYCURSOR);
+yy340:
+ YYDEBUG(340, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy336;
+ if (yych == 'N') goto yy341;
if (yych != 'n') goto yy186;
-yy336:
- YYDEBUG(336, *YYCURSOR);
+yy341:
+ YYDEBUG(341, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy337;
+ if (yych == 'C') goto yy342;
if (yych != 'c') goto yy186;
-yy337:
- YYDEBUG(337, *YYCURSOR);
+yy342:
+ YYDEBUG(342, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy338;
+ if (yych == 'T') goto yy343;
if (yych != 't') goto yy186;
-yy338:
- YYDEBUG(338, *YYCURSOR);
+yy343:
+ YYDEBUG(343, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy339;
+ if (yych == 'I') goto yy344;
if (yych != 'i') goto yy186;
-yy339:
- YYDEBUG(339, *YYCURSOR);
+yy344:
+ YYDEBUG(344, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy340;
+ if (yych == 'O') goto yy345;
if (yych != 'o') goto yy186;
-yy340:
- YYDEBUG(340, *YYCURSOR);
+yy345:
+ YYDEBUG(345, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy341;
+ if (yych == 'N') goto yy346;
if (yych != 'n') goto yy186;
-yy341:
- YYDEBUG(341, *YYCURSOR);
+yy346:
+ YYDEBUG(346, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(342, *YYCURSOR);
+ YYDEBUG(347, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(343, *YYCURSOR);
+ YYDEBUG(348, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(344, *YYCURSOR);
+ YYDEBUG(349, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1415 "Zend/zend_language_scanner.l"
+#line 1608 "Zend/zend_language_scanner.l"
{
- char *func_name = NULL;
+ const char *func_name = NULL;
if (CG(active_op_array)) {
func_name = CG(active_op_array)->function_name;
@@ -4196,27 +4371,27 @@ yy341:
zendlval->type = IS_STRING;
return T_FUNC_C;
}
-#line 4200 "Zend/zend_language_scanner.c"
-yy345:
- YYDEBUG(345, *YYCURSOR);
+#line 4375 "Zend/zend_language_scanner.c"
+yy350:
+ YYDEBUG(350, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy346;
+ if (yych == 'E') goto yy351;
if (yych != 'e') goto yy186;
-yy346:
- YYDEBUG(346, *YYCURSOR);
+yy351:
+ YYDEBUG(351, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(347, *YYCURSOR);
+ YYDEBUG(352, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(348, *YYCURSOR);
+ YYDEBUG(353, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(349, *YYCURSOR);
+ YYDEBUG(354, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1458 "Zend/zend_language_scanner.l"
+#line 1651 "Zend/zend_language_scanner.l"
{
char *filename = zend_get_compiled_filename(TSRMLS_C);
@@ -4228,1045 +4403,1044 @@ yy346:
zendlval->type = IS_STRING;
return T_FILE;
}
-#line 4232 "Zend/zend_language_scanner.c"
-yy350:
- YYDEBUG(350, *YYCURSOR);
+#line 4407 "Zend/zend_language_scanner.c"
+yy355:
+ YYDEBUG(355, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy351;
+ if (yych == 'A') goto yy356;
if (yych != 'a') goto yy186;
-yy351:
- YYDEBUG(351, *YYCURSOR);
+yy356:
+ YYDEBUG(356, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy352;
- if (yych != 's') goto yy186;
-yy352:
- YYDEBUG(352, *YYCURSOR);
+ if (yych == 'I') goto yy357;
+ if (yych != 'i') goto yy186;
+yy357:
+ YYDEBUG(357, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy353;
- if (yych != 's') goto yy186;
-yy353:
- YYDEBUG(353, *YYCURSOR);
+ if (yych == 'T') goto yy358;
+ if (yych != 't') goto yy186;
+yy358:
+ YYDEBUG(358, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(354, *YYCURSOR);
+ YYDEBUG(359, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(355, *YYCURSOR);
+ YYDEBUG(360, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(356, *YYCURSOR);
+ YYDEBUG(361, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1399 "Zend/zend_language_scanner.l"
+#line 1588 "Zend/zend_language_scanner.l"
{
- char *class_name = NULL;
-
- if (CG(active_class_entry)) {
- class_name = CG(active_class_entry)->name;
+ const char *trait_name = NULL;
+
+ if (CG(active_class_entry)
+ && (ZEND_ACC_TRAIT ==
+ (CG(active_class_entry)->ce_flags & ZEND_ACC_TRAIT))) {
+ trait_name = CG(active_class_entry)->name;
}
-
- if (!class_name) {
- class_name = "";
+
+ if (!trait_name) {
+ trait_name = "";
}
- zendlval->value.str.len = strlen(class_name);
- zendlval->value.str.val = estrndup(class_name, zendlval->value.str.len);
+
+ zendlval->value.str.len = strlen(trait_name);
+ zendlval->value.str.val = estrndup(trait_name, zendlval->value.str.len);
zendlval->type = IS_STRING;
+
+ return T_TRAIT_C;
+}
+#line 4457 "Zend/zend_language_scanner.c"
+yy362:
+ YYDEBUG(362, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'A') goto yy363;
+ if (yych != 'a') goto yy186;
+yy363:
+ YYDEBUG(363, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'S') goto yy364;
+ if (yych != 's') goto yy186;
+yy364:
+ YYDEBUG(364, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'S') goto yy365;
+ if (yych != 's') goto yy186;
+yy365:
+ YYDEBUG(365, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy186;
+ YYDEBUG(366, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych != '_') goto yy186;
+ YYDEBUG(367, *YYCURSOR);
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy185;
+ }
+ YYDEBUG(368, *YYCURSOR);
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1561 "Zend/zend_language_scanner.l"
+ {
+ const char *class_name = NULL;
+
+ if (CG(active_class_entry)
+ && (ZEND_ACC_TRAIT ==
+ (CG(active_class_entry)->ce_flags & ZEND_ACC_TRAIT))) {
+ /* We create a special __CLASS__ constant that is going to be resolved
+ at run-time */
+ zendlval->value.str.len = sizeof("__CLASS__")-1;
+ zendlval->value.str.val = estrndup("__CLASS__", zendlval->value.str.len);
+ zendlval->type = IS_CONSTANT;
+ } else {
+ if (CG(active_class_entry)) {
+ class_name = CG(active_class_entry)->name;
+ }
+
+ if (!class_name) {
+ class_name = "";
+ }
+
+ zendlval->value.str.len = strlen(class_name);
+ zendlval->value.str.val = estrndup(class_name, zendlval->value.str.len);
+ zendlval->type = IS_STRING;
+ }
return T_CLASS_C;
}
-#line 4278 "Zend/zend_language_scanner.c"
-yy357:
- YYDEBUG(357, *YYCURSOR);
+#line 4514 "Zend/zend_language_scanner.c"
+yy369:
+ YYDEBUG(369, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy358;
+ if (yych == 'L') goto yy370;
if (yych != 'l') goto yy186;
-yy358:
- YYDEBUG(358, *YYCURSOR);
+yy370:
+ YYDEBUG(370, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy359;
+ if (yych == 'T') goto yy371;
if (yych != 't') goto yy186;
-yy359:
- YYDEBUG(359, *YYCURSOR);
+yy371:
+ YYDEBUG(371, *YYCURSOR);
yych = *++YYCURSOR;
if (yych != '_') goto yy186;
- YYDEBUG(360, *YYCURSOR);
+ YYDEBUG(372, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy361;
+ if (yych == 'C') goto yy373;
if (yych != 'c') goto yy186;
-yy361:
- YYDEBUG(361, *YYCURSOR);
+yy373:
+ YYDEBUG(373, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy362;
+ if (yych == 'O') goto yy374;
if (yych != 'o') goto yy186;
-yy362:
- YYDEBUG(362, *YYCURSOR);
+yy374:
+ YYDEBUG(374, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'M') goto yy363;
+ if (yych == 'M') goto yy375;
if (yych != 'm') goto yy186;
-yy363:
- YYDEBUG(363, *YYCURSOR);
+yy375:
+ YYDEBUG(375, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'P') goto yy364;
+ if (yych == 'P') goto yy376;
if (yych != 'p') goto yy186;
-yy364:
- YYDEBUG(364, *YYCURSOR);
+yy376:
+ YYDEBUG(376, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy365;
+ if (yych == 'I') goto yy377;
if (yych != 'i') goto yy186;
-yy365:
- YYDEBUG(365, *YYCURSOR);
+yy377:
+ YYDEBUG(377, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy366;
+ if (yych == 'L') goto yy378;
if (yych != 'l') goto yy186;
-yy366:
- YYDEBUG(366, *YYCURSOR);
+yy378:
+ YYDEBUG(378, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy367;
+ if (yych == 'E') goto yy379;
if (yych != 'e') goto yy186;
-yy367:
- YYDEBUG(367, *YYCURSOR);
+yy379:
+ YYDEBUG(379, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy368;
+ if (yych == 'R') goto yy380;
if (yych != 'r') goto yy186;
-yy368:
- YYDEBUG(368, *YYCURSOR);
+yy380:
+ YYDEBUG(380, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(369, *YYCURSOR);
+ YYDEBUG(381, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1141 "Zend/zend_language_scanner.l"
+#line 1279 "Zend/zend_language_scanner.l"
{
return T_HALT_COMPILER;
}
-#line 4344 "Zend/zend_language_scanner.c"
-yy370:
- YYDEBUG(370, *YYCURSOR);
+#line 4580 "Zend/zend_language_scanner.c"
+yy382:
+ YYDEBUG(382, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy374;
- if (yych == 's') goto yy374;
+ if (yych == 'S') goto yy386;
+ if (yych == 's') goto yy386;
goto yy186;
-yy371:
- YYDEBUG(371, *YYCURSOR);
+yy383:
+ YYDEBUG(383, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy372;
+ if (yych == 'E') goto yy384;
if (yych != 'e') goto yy186;
-yy372:
- YYDEBUG(372, *YYCURSOR);
+yy384:
+ YYDEBUG(384, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(373, *YYCURSOR);
+ YYDEBUG(385, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1125 "Zend/zend_language_scanner.l"
+#line 1259 "Zend/zend_language_scanner.l"
{
return T_USE;
}
-#line 4368 "Zend/zend_language_scanner.c"
-yy374:
- YYDEBUG(374, *YYCURSOR);
+#line 4604 "Zend/zend_language_scanner.c"
+yy386:
+ YYDEBUG(386, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy375;
+ if (yych == 'E') goto yy387;
if (yych != 'e') goto yy186;
-yy375:
- YYDEBUG(375, *YYCURSOR);
+yy387:
+ YYDEBUG(387, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy376;
+ if (yych == 'T') goto yy388;
if (yych != 't') goto yy186;
-yy376:
- YYDEBUG(376, *YYCURSOR);
+yy388:
+ YYDEBUG(388, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(377, *YYCURSOR);
+ YYDEBUG(389, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1169 "Zend/zend_language_scanner.l"
+#line 1307 "Zend/zend_language_scanner.l"
{
return T_UNSET;
}
-#line 4391 "Zend/zend_language_scanner.c"
-yy378:
- YYDEBUG(378, *YYCURSOR);
+#line 4627 "Zend/zend_language_scanner.c"
+yy390:
+ YYDEBUG(390, *YYCURSOR);
++YYCURSOR;
YYFILL(7);
yych = *YYCURSOR;
-yy379:
- YYDEBUG(379, *YYCURSOR);
+yy391:
+ YYDEBUG(391, *YYCURSOR);
if (yych <= 'S') {
if (yych <= 'D') {
if (yych <= ' ') {
- if (yych == '\t') goto yy378;
+ if (yych == '\t') goto yy390;
if (yych <= 0x1F) goto yy193;
- goto yy378;
+ goto yy390;
} else {
if (yych <= 'A') {
if (yych <= '@') goto yy193;
- goto yy383;
+ goto yy395;
} else {
- if (yych <= 'B') goto yy381;
+ if (yych <= 'B') goto yy393;
if (yych <= 'C') goto yy193;
- goto yy386;
+ goto yy398;
}
}
} else {
if (yych <= 'I') {
- if (yych == 'F') goto yy387;
+ if (yych == 'F') goto yy399;
if (yych <= 'H') goto yy193;
- goto yy388;
+ goto yy400;
} else {
if (yych <= 'O') {
if (yych <= 'N') goto yy193;
- goto yy382;
+ goto yy394;
} else {
if (yych <= 'Q') goto yy193;
- if (yych <= 'R') goto yy385;
- goto yy384;
+ if (yych <= 'R') goto yy397;
+ goto yy396;
}
}
}
} else {
if (yych <= 'f') {
if (yych <= 'a') {
- if (yych == 'U') goto yy380;
+ if (yych == 'U') goto yy392;
if (yych <= '`') goto yy193;
- goto yy383;
+ goto yy395;
} else {
if (yych <= 'c') {
- if (yych <= 'b') goto yy381;
+ if (yych <= 'b') goto yy393;
goto yy193;
} else {
- if (yych <= 'd') goto yy386;
+ if (yych <= 'd') goto yy398;
if (yych <= 'e') goto yy193;
- goto yy387;
+ goto yy399;
}
}
} else {
if (yych <= 'q') {
if (yych <= 'i') {
if (yych <= 'h') goto yy193;
- goto yy388;
+ goto yy400;
} else {
- if (yych == 'o') goto yy382;
+ if (yych == 'o') goto yy394;
goto yy193;
}
} else {
if (yych <= 's') {
- if (yych <= 'r') goto yy385;
- goto yy384;
+ if (yych <= 'r') goto yy397;
+ goto yy396;
} else {
if (yych != 'u') goto yy193;
}
}
}
}
-yy380:
- YYDEBUG(380, *YYCURSOR);
+yy392:
+ YYDEBUG(392, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy451;
- if (yych == 'n') goto yy451;
+ if (yych == 'N') goto yy459;
+ if (yych == 'n') goto yy459;
goto yy193;
-yy381:
- YYDEBUG(381, *YYCURSOR);
+yy393:
+ YYDEBUG(393, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'O') {
- if (yych == 'I') goto yy434;
+ if (yych == 'I') goto yy446;
if (yych <= 'N') goto yy193;
- goto yy435;
+ goto yy447;
} else {
if (yych <= 'i') {
if (yych <= 'h') goto yy193;
- goto yy434;
+ goto yy446;
} else {
- if (yych == 'o') goto yy435;
+ if (yych == 'o') goto yy447;
goto yy193;
}
}
-yy382:
- YYDEBUG(382, *YYCURSOR);
+yy394:
+ YYDEBUG(394, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'B') goto yy426;
- if (yych == 'b') goto yy426;
+ if (yych == 'B') goto yy438;
+ if (yych == 'b') goto yy438;
goto yy193;
-yy383:
- YYDEBUG(383, *YYCURSOR);
+yy395:
+ YYDEBUG(395, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy419;
- if (yych == 'r') goto yy419;
+ if (yych == 'R') goto yy431;
+ if (yych == 'r') goto yy431;
goto yy193;
-yy384:
- YYDEBUG(384, *YYCURSOR);
+yy396:
+ YYDEBUG(396, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy411;
- if (yych == 't') goto yy411;
+ if (yych == 'T') goto yy423;
+ if (yych == 't') goto yy423;
goto yy193;
-yy385:
- YYDEBUG(385, *YYCURSOR);
+yy397:
+ YYDEBUG(397, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy409;
- if (yych == 'e') goto yy409;
+ if (yych == 'E') goto yy421;
+ if (yych == 'e') goto yy421;
goto yy193;
-yy386:
- YYDEBUG(386, *YYCURSOR);
+yy398:
+ YYDEBUG(398, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy405;
- if (yych == 'o') goto yy405;
+ if (yych == 'O') goto yy417;
+ if (yych == 'o') goto yy417;
goto yy193;
-yy387:
- YYDEBUG(387, *YYCURSOR);
+yy399:
+ YYDEBUG(399, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy398;
- if (yych == 'l') goto yy398;
+ if (yych == 'L') goto yy410;
+ if (yych == 'l') goto yy410;
goto yy193;
-yy388:
- YYDEBUG(388, *YYCURSOR);
+yy400:
+ YYDEBUG(400, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy389;
+ if (yych == 'N') goto yy401;
if (yych != 'n') goto yy193;
-yy389:
- YYDEBUG(389, *YYCURSOR);
+yy401:
+ YYDEBUG(401, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy390;
+ if (yych == 'T') goto yy402;
if (yych != 't') goto yy193;
-yy390:
- YYDEBUG(390, *YYCURSOR);
+yy402:
+ YYDEBUG(402, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy391;
- if (yych != 'e') goto yy393;
-yy391:
- YYDEBUG(391, *YYCURSOR);
+ if (yych == 'E') goto yy403;
+ if (yych != 'e') goto yy405;
+yy403:
+ YYDEBUG(403, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'G') goto yy396;
- if (yych == 'g') goto yy396;
+ if (yych == 'G') goto yy408;
+ if (yych == 'g') goto yy408;
goto yy193;
-yy392:
- YYDEBUG(392, *YYCURSOR);
+yy404:
+ YYDEBUG(404, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy393:
- YYDEBUG(393, *YYCURSOR);
+yy405:
+ YYDEBUG(405, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy392;
+ if (yych == '\t') goto yy404;
goto yy193;
} else {
- if (yych <= ' ') goto yy392;
+ if (yych <= ' ') goto yy404;
if (yych != ')') goto yy193;
}
- YYDEBUG(394, *YYCURSOR);
+ YYDEBUG(406, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(395, *YYCURSOR);
+ YYDEBUG(407, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1069 "Zend/zend_language_scanner.l"
+#line 1207 "Zend/zend_language_scanner.l"
{
return T_INT_CAST;
}
-#line 4567 "Zend/zend_language_scanner.c"
-yy396:
- YYDEBUG(396, *YYCURSOR);
+#line 4803 "Zend/zend_language_scanner.c"
+yy408:
+ YYDEBUG(408, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy397;
+ if (yych == 'E') goto yy409;
if (yych != 'e') goto yy193;
-yy397:
- YYDEBUG(397, *YYCURSOR);
+yy409:
+ YYDEBUG(409, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy392;
- if (yych == 'r') goto yy392;
+ if (yych == 'R') goto yy404;
+ if (yych == 'r') goto yy404;
goto yy193;
-yy398:
- YYDEBUG(398, *YYCURSOR);
+yy410:
+ YYDEBUG(410, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy399;
+ if (yych == 'O') goto yy411;
if (yych != 'o') goto yy193;
-yy399:
- YYDEBUG(399, *YYCURSOR);
+yy411:
+ YYDEBUG(411, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy400;
+ if (yych == 'A') goto yy412;
if (yych != 'a') goto yy193;
-yy400:
- YYDEBUG(400, *YYCURSOR);
+yy412:
+ YYDEBUG(412, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy401;
+ if (yych == 'T') goto yy413;
if (yych != 't') goto yy193;
-yy401:
- YYDEBUG(401, *YYCURSOR);
+yy413:
+ YYDEBUG(413, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(402, *YYCURSOR);
+ YYDEBUG(414, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy401;
+ if (yych == '\t') goto yy413;
goto yy193;
} else {
- if (yych <= ' ') goto yy401;
+ if (yych <= ' ') goto yy413;
if (yych != ')') goto yy193;
}
- YYDEBUG(403, *YYCURSOR);
+ YYDEBUG(415, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(404, *YYCURSOR);
+ YYDEBUG(416, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1073 "Zend/zend_language_scanner.l"
+#line 1211 "Zend/zend_language_scanner.l"
{
return T_DOUBLE_CAST;
}
-#line 4615 "Zend/zend_language_scanner.c"
-yy405:
- YYDEBUG(405, *YYCURSOR);
+#line 4851 "Zend/zend_language_scanner.c"
+yy417:
+ YYDEBUG(417, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'U') goto yy406;
+ if (yych == 'U') goto yy418;
if (yych != 'u') goto yy193;
-yy406:
- YYDEBUG(406, *YYCURSOR);
+yy418:
+ YYDEBUG(418, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'B') goto yy407;
+ if (yych == 'B') goto yy419;
if (yych != 'b') goto yy193;
-yy407:
- YYDEBUG(407, *YYCURSOR);
+yy419:
+ YYDEBUG(419, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy408;
+ if (yych == 'L') goto yy420;
if (yych != 'l') goto yy193;
-yy408:
- YYDEBUG(408, *YYCURSOR);
+yy420:
+ YYDEBUG(420, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy401;
- if (yych == 'e') goto yy401;
+ if (yych == 'E') goto yy413;
+ if (yych == 'e') goto yy413;
goto yy193;
-yy409:
- YYDEBUG(409, *YYCURSOR);
+yy421:
+ YYDEBUG(421, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy410;
+ if (yych == 'A') goto yy422;
if (yych != 'a') goto yy193;
-yy410:
- YYDEBUG(410, *YYCURSOR);
+yy422:
+ YYDEBUG(422, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy401;
- if (yych == 'l') goto yy401;
+ if (yych == 'L') goto yy413;
+ if (yych == 'l') goto yy413;
goto yy193;
-yy411:
- YYDEBUG(411, *YYCURSOR);
+yy423:
+ YYDEBUG(423, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy412;
+ if (yych == 'R') goto yy424;
if (yych != 'r') goto yy193;
-yy412:
- YYDEBUG(412, *YYCURSOR);
+yy424:
+ YYDEBUG(424, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy413;
+ if (yych == 'I') goto yy425;
if (yych != 'i') goto yy193;
-yy413:
- YYDEBUG(413, *YYCURSOR);
+yy425:
+ YYDEBUG(425, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy414;
+ if (yych == 'N') goto yy426;
if (yych != 'n') goto yy193;
-yy414:
- YYDEBUG(414, *YYCURSOR);
+yy426:
+ YYDEBUG(426, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'G') goto yy415;
+ if (yych == 'G') goto yy427;
if (yych != 'g') goto yy193;
-yy415:
- YYDEBUG(415, *YYCURSOR);
+yy427:
+ YYDEBUG(427, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(416, *YYCURSOR);
+ YYDEBUG(428, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy415;
+ if (yych == '\t') goto yy427;
goto yy193;
} else {
- if (yych <= ' ') goto yy415;
+ if (yych <= ' ') goto yy427;
if (yych != ')') goto yy193;
}
- YYDEBUG(417, *YYCURSOR);
+ YYDEBUG(429, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(418, *YYCURSOR);
+ YYDEBUG(430, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1077 "Zend/zend_language_scanner.l"
+#line 1215 "Zend/zend_language_scanner.l"
{
return T_STRING_CAST;
}
-#line 4689 "Zend/zend_language_scanner.c"
-yy419:
- YYDEBUG(419, *YYCURSOR);
+#line 4925 "Zend/zend_language_scanner.c"
+yy431:
+ YYDEBUG(431, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy420;
+ if (yych == 'R') goto yy432;
if (yych != 'r') goto yy193;
-yy420:
- YYDEBUG(420, *YYCURSOR);
+yy432:
+ YYDEBUG(432, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy421;
+ if (yych == 'A') goto yy433;
if (yych != 'a') goto yy193;
-yy421:
- YYDEBUG(421, *YYCURSOR);
+yy433:
+ YYDEBUG(433, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'Y') goto yy422;
+ if (yych == 'Y') goto yy434;
if (yych != 'y') goto yy193;
-yy422:
- YYDEBUG(422, *YYCURSOR);
+yy434:
+ YYDEBUG(434, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(423, *YYCURSOR);
+ YYDEBUG(435, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy422;
+ if (yych == '\t') goto yy434;
goto yy193;
} else {
- if (yych <= ' ') goto yy422;
+ if (yych <= ' ') goto yy434;
if (yych != ')') goto yy193;
}
- YYDEBUG(424, *YYCURSOR);
+ YYDEBUG(436, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(425, *YYCURSOR);
+ YYDEBUG(437, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1085 "Zend/zend_language_scanner.l"
+#line 1219 "Zend/zend_language_scanner.l"
{
return T_ARRAY_CAST;
}
-#line 4726 "Zend/zend_language_scanner.c"
-yy426:
- YYDEBUG(426, *YYCURSOR);
+#line 4962 "Zend/zend_language_scanner.c"
+yy438:
+ YYDEBUG(438, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'J') goto yy427;
+ if (yych == 'J') goto yy439;
if (yych != 'j') goto yy193;
-yy427:
- YYDEBUG(427, *YYCURSOR);
+yy439:
+ YYDEBUG(439, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy428;
+ if (yych == 'E') goto yy440;
if (yych != 'e') goto yy193;
-yy428:
- YYDEBUG(428, *YYCURSOR);
+yy440:
+ YYDEBUG(440, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy429;
+ if (yych == 'C') goto yy441;
if (yych != 'c') goto yy193;
-yy429:
- YYDEBUG(429, *YYCURSOR);
+yy441:
+ YYDEBUG(441, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy430;
+ if (yych == 'T') goto yy442;
if (yych != 't') goto yy193;
-yy430:
- YYDEBUG(430, *YYCURSOR);
+yy442:
+ YYDEBUG(442, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(431, *YYCURSOR);
+ YYDEBUG(443, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy430;
+ if (yych == '\t') goto yy442;
goto yy193;
} else {
- if (yych <= ' ') goto yy430;
+ if (yych <= ' ') goto yy442;
if (yych != ')') goto yy193;
}
- YYDEBUG(432, *YYCURSOR);
+ YYDEBUG(444, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(433, *YYCURSOR);
+ YYDEBUG(445, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1089 "Zend/zend_language_scanner.l"
+#line 1223 "Zend/zend_language_scanner.l"
{
return T_OBJECT_CAST;
}
-#line 4768 "Zend/zend_language_scanner.c"
-yy434:
- YYDEBUG(434, *YYCURSOR);
+#line 5004 "Zend/zend_language_scanner.c"
+yy446:
+ YYDEBUG(446, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy444;
- if (yych == 'n') goto yy444;
+ if (yych == 'N') goto yy456;
+ if (yych == 'n') goto yy456;
goto yy193;
-yy435:
- YYDEBUG(435, *YYCURSOR);
+yy447:
+ YYDEBUG(447, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy436;
+ if (yych == 'O') goto yy448;
if (yych != 'o') goto yy193;
-yy436:
- YYDEBUG(436, *YYCURSOR);
+yy448:
+ YYDEBUG(448, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy437;
+ if (yych == 'L') goto yy449;
if (yych != 'l') goto yy193;
-yy437:
- YYDEBUG(437, *YYCURSOR);
+yy449:
+ YYDEBUG(449, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy442;
- if (yych == 'e') goto yy442;
- goto yy439;
-yy438:
- YYDEBUG(438, *YYCURSOR);
+ if (yych == 'E') goto yy454;
+ if (yych == 'e') goto yy454;
+ goto yy451;
+yy450:
+ YYDEBUG(450, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy439:
- YYDEBUG(439, *YYCURSOR);
+yy451:
+ YYDEBUG(451, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy438;
+ if (yych == '\t') goto yy450;
goto yy193;
} else {
- if (yych <= ' ') goto yy438;
+ if (yych <= ' ') goto yy450;
if (yych != ')') goto yy193;
}
- YYDEBUG(440, *YYCURSOR);
+ YYDEBUG(452, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(441, *YYCURSOR);
+ YYDEBUG(453, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1093 "Zend/zend_language_scanner.l"
+#line 1227 "Zend/zend_language_scanner.l"
{
return T_BOOL_CAST;
}
-#line 4813 "Zend/zend_language_scanner.c"
-yy442:
- YYDEBUG(442, *YYCURSOR);
+#line 5049 "Zend/zend_language_scanner.c"
+yy454:
+ YYDEBUG(454, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy443;
+ if (yych == 'A') goto yy455;
if (yych != 'a') goto yy193;
-yy443:
- YYDEBUG(443, *YYCURSOR);
+yy455:
+ YYDEBUG(455, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy438;
- if (yych == 'n') goto yy438;
+ if (yych == 'N') goto yy450;
+ if (yych == 'n') goto yy450;
goto yy193;
-yy444:
- YYDEBUG(444, *YYCURSOR);
+yy456:
+ YYDEBUG(456, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy445;
+ if (yych == 'A') goto yy457;
if (yych != 'a') goto yy193;
-yy445:
- YYDEBUG(445, *YYCURSOR);
+yy457:
+ YYDEBUG(457, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy446;
+ if (yych == 'R') goto yy458;
if (yych != 'r') goto yy193;
-yy446:
- YYDEBUG(446, *YYCURSOR);
+yy458:
+ YYDEBUG(458, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'Y') goto yy447;
- if (yych != 'y') goto yy193;
-yy447:
- YYDEBUG(447, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(448, *YYCURSOR);
- if (yych <= 0x1F) {
- if (yych == '\t') goto yy447;
- goto yy193;
- } else {
- if (yych <= ' ') goto yy447;
- if (yych != ')') goto yy193;
- }
- YYDEBUG(449, *YYCURSOR);
- ++YYCURSOR;
- YYDEBUG(450, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1081 "Zend/zend_language_scanner.l"
- {
- return T_STRING_CAST;
-}
-#line 4861 "Zend/zend_language_scanner.c"
-yy451:
- YYDEBUG(451, *YYCURSOR);
+ if (yych == 'Y') goto yy427;
+ if (yych == 'y') goto yy427;
+ goto yy193;
+yy459:
+ YYDEBUG(459, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy452;
+ if (yych == 'S') goto yy460;
if (yych != 's') goto yy193;
-yy452:
- YYDEBUG(452, *YYCURSOR);
+yy460:
+ YYDEBUG(460, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy453;
+ if (yych == 'E') goto yy461;
if (yych != 'e') goto yy193;
-yy453:
- YYDEBUG(453, *YYCURSOR);
+yy461:
+ YYDEBUG(461, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy454;
+ if (yych == 'T') goto yy462;
if (yych != 't') goto yy193;
-yy454:
- YYDEBUG(454, *YYCURSOR);
+yy462:
+ YYDEBUG(462, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(455, *YYCURSOR);
+ YYDEBUG(463, *YYCURSOR);
if (yych <= 0x1F) {
- if (yych == '\t') goto yy454;
+ if (yych == '\t') goto yy462;
goto yy193;
} else {
- if (yych <= ' ') goto yy454;
+ if (yych <= ' ') goto yy462;
if (yych != ')') goto yy193;
}
- YYDEBUG(456, *YYCURSOR);
+ YYDEBUG(464, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(457, *YYCURSOR);
+ YYDEBUG(465, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1097 "Zend/zend_language_scanner.l"
+#line 1231 "Zend/zend_language_scanner.l"
{
return T_UNSET_CAST;
}
-#line 4898 "Zend/zend_language_scanner.c"
-yy458:
- YYDEBUG(458, *YYCURSOR);
+#line 5113 "Zend/zend_language_scanner.c"
+yy466:
+ YYDEBUG(466, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy459;
+ if (yych == 'R') goto yy467;
if (yych != 'r') goto yy186;
-yy459:
- YYDEBUG(459, *YYCURSOR);
+yy467:
+ YYDEBUG(467, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(460, *YYCURSOR);
+ YYDEBUG(468, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1065 "Zend/zend_language_scanner.l"
+#line 1203 "Zend/zend_language_scanner.l"
{
return T_VAR;
}
-#line 4916 "Zend/zend_language_scanner.c"
-yy461:
- YYDEBUG(461, *YYCURSOR);
+#line 5131 "Zend/zend_language_scanner.c"
+yy469:
+ YYDEBUG(469, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'M') goto yy465;
- if (yych == 'm') goto yy465;
+ if (yych == 'M') goto yy473;
+ if (yych == 'm') goto yy473;
goto yy186;
-yy462:
- YYDEBUG(462, *YYCURSOR);
+yy470:
+ YYDEBUG(470, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'W') goto yy463;
+ if (yych == 'W') goto yy471;
if (yych != 'w') goto yy186;
-yy463:
- YYDEBUG(463, *YYCURSOR);
+yy471:
+ YYDEBUG(471, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(464, *YYCURSOR);
+ YYDEBUG(472, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1057 "Zend/zend_language_scanner.l"
+#line 1195 "Zend/zend_language_scanner.l"
{
return T_NEW;
}
-#line 4940 "Zend/zend_language_scanner.c"
-yy465:
- YYDEBUG(465, *YYCURSOR);
+#line 5155 "Zend/zend_language_scanner.c"
+yy473:
+ YYDEBUG(473, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy466;
+ if (yych == 'E') goto yy474;
if (yych != 'e') goto yy186;
-yy466:
- YYDEBUG(466, *YYCURSOR);
+yy474:
+ YYDEBUG(474, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy467;
+ if (yych == 'S') goto yy475;
if (yych != 's') goto yy186;
-yy467:
- YYDEBUG(467, *YYCURSOR);
+yy475:
+ YYDEBUG(475, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'P') goto yy468;
+ if (yych == 'P') goto yy476;
if (yych != 'p') goto yy186;
-yy468:
- YYDEBUG(468, *YYCURSOR);
+yy476:
+ YYDEBUG(476, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy469;
+ if (yych == 'A') goto yy477;
if (yych != 'a') goto yy186;
-yy469:
- YYDEBUG(469, *YYCURSOR);
+yy477:
+ YYDEBUG(477, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy470;
+ if (yych == 'C') goto yy478;
if (yych != 'c') goto yy186;
-yy470:
- YYDEBUG(470, *YYCURSOR);
+yy478:
+ YYDEBUG(478, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy471;
+ if (yych == 'E') goto yy479;
if (yych != 'e') goto yy186;
-yy471:
- YYDEBUG(471, *YYCURSOR);
+yy479:
+ YYDEBUG(479, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(472, *YYCURSOR);
+ YYDEBUG(480, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1121 "Zend/zend_language_scanner.l"
+#line 1255 "Zend/zend_language_scanner.l"
{
return T_NAMESPACE;
}
-#line 4983 "Zend/zend_language_scanner.c"
-yy473:
- YYDEBUG(473, *YYCURSOR);
+#line 5198 "Zend/zend_language_scanner.c"
+yy481:
+ YYDEBUG(481, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(474, *YYCURSOR);
+ YYDEBUG(482, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1049 "Zend/zend_language_scanner.l"
+#line 1187 "Zend/zend_language_scanner.l"
{
return T_PAAMAYIM_NEKUDOTAYIM;
}
-#line 4993 "Zend/zend_language_scanner.c"
-yy475:
- YYDEBUG(475, *YYCURSOR);
+#line 5208 "Zend/zend_language_scanner.c"
+yy483:
+ YYDEBUG(483, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy476:
- YYDEBUG(476, *YYCURSOR);
+yy484:
+ YYDEBUG(484, *YYCURSOR);
if (yych <= '\f') {
if (yych <= 0x08) goto yy140;
- if (yych <= '\n') goto yy475;
+ if (yych <= '\n') goto yy483;
goto yy140;
} else {
- if (yych <= '\r') goto yy475;
- if (yych == ' ') goto yy475;
+ if (yych <= '\r') goto yy483;
+ if (yych == ' ') goto yy483;
goto yy140;
}
-yy477:
- YYDEBUG(477, *YYCURSOR);
+yy485:
+ YYDEBUG(485, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(478, *YYCURSOR);
+ YYDEBUG(486, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1221 "Zend/zend_language_scanner.l"
+#line 1363 "Zend/zend_language_scanner.l"
{
return T_MINUS_EQUAL;
}
-#line 5019 "Zend/zend_language_scanner.c"
-yy479:
- YYDEBUG(479, *YYCURSOR);
+#line 5234 "Zend/zend_language_scanner.c"
+yy487:
+ YYDEBUG(487, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(480, *YYCURSOR);
+ YYDEBUG(488, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1189 "Zend/zend_language_scanner.l"
+#line 1331 "Zend/zend_language_scanner.l"
{
return T_DEC;
}
-#line 5029 "Zend/zend_language_scanner.c"
-yy481:
- YYDEBUG(481, *YYCURSOR);
+#line 5244 "Zend/zend_language_scanner.c"
+yy489:
+ YYDEBUG(489, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(482, *YYCURSOR);
+ YYDEBUG(490, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1019 "Zend/zend_language_scanner.l"
+#line 1157 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
return T_OBJECT_OPERATOR;
}
-#line 5040 "Zend/zend_language_scanner.c"
-yy483:
- YYDEBUG(483, *YYCURSOR);
+#line 5255 "Zend/zend_language_scanner.c"
+yy491:
+ YYDEBUG(491, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'O') {
- if (yych == 'I') goto yy490;
+ if (yych == 'I') goto yy498;
if (yych <= 'N') goto yy186;
- goto yy491;
+ goto yy499;
} else {
if (yych <= 'i') {
if (yych <= 'h') goto yy186;
- goto yy490;
+ goto yy498;
} else {
- if (yych == 'o') goto yy491;
+ if (yych == 'o') goto yy499;
goto yy186;
}
}
-yy484:
- YYDEBUG(484, *YYCURSOR);
+yy492:
+ YYDEBUG(492, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'B') goto yy485;
+ if (yych == 'B') goto yy493;
if (yych != 'b') goto yy186;
-yy485:
- YYDEBUG(485, *YYCURSOR);
+yy493:
+ YYDEBUG(493, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy486;
+ if (yych == 'L') goto yy494;
if (yych != 'l') goto yy186;
-yy486:
- YYDEBUG(486, *YYCURSOR);
+yy494:
+ YYDEBUG(494, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy487;
+ if (yych == 'I') goto yy495;
if (yych != 'i') goto yy186;
-yy487:
- YYDEBUG(487, *YYCURSOR);
+yy495:
+ YYDEBUG(495, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy488;
+ if (yych == 'C') goto yy496;
if (yych != 'c') goto yy186;
-yy488:
- YYDEBUG(488, *YYCURSOR);
+yy496:
+ YYDEBUG(496, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(489, *YYCURSOR);
+ YYDEBUG(497, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1165 "Zend/zend_language_scanner.l"
+#line 1303 "Zend/zend_language_scanner.l"
{
return T_PUBLIC;
}
-#line 5089 "Zend/zend_language_scanner.c"
-yy490:
- YYDEBUG(490, *YYCURSOR);
+#line 5304 "Zend/zend_language_scanner.c"
+yy498:
+ YYDEBUG(498, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'V') {
- if (yych == 'N') goto yy499;
+ if (yych == 'N') goto yy507;
if (yych <= 'U') goto yy186;
- goto yy500;
+ goto yy508;
} else {
if (yych <= 'n') {
if (yych <= 'm') goto yy186;
- goto yy499;
+ goto yy507;
} else {
- if (yych == 'v') goto yy500;
+ if (yych == 'v') goto yy508;
goto yy186;
}
}
-yy491:
- YYDEBUG(491, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'T') goto yy492;
- if (yych != 't') goto yy186;
-yy492:
- YYDEBUG(492, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy493;
- if (yych != 'e') goto yy186;
-yy493:
- YYDEBUG(493, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'C') goto yy494;
- if (yych != 'c') goto yy186;
-yy494:
- YYDEBUG(494, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'T') goto yy495;
- if (yych != 't') goto yy186;
-yy495:
- YYDEBUG(495, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy496;
- if (yych != 'e') goto yy186;
-yy496:
- YYDEBUG(496, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'D') goto yy497;
- if (yych != 'd') goto yy186;
-yy497:
- YYDEBUG(497, *YYCURSOR);
- ++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
- goto yy185;
- }
- YYDEBUG(498, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1161 "Zend/zend_language_scanner.l"
- {
- return T_PROTECTED;
-}
-#line 5148 "Zend/zend_language_scanner.c"
yy499:
YYDEBUG(499, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy505;
- if (yych == 't') goto yy505;
- goto yy186;
+ if (yych == 'T') goto yy500;
+ if (yych != 't') goto yy186;
yy500:
YYDEBUG(500, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy501;
- if (yych != 'a') goto yy186;
+ if (yych == 'E') goto yy501;
+ if (yych != 'e') goto yy186;
yy501:
YYDEBUG(501, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy502;
- if (yych != 't') goto yy186;
+ if (yych == 'C') goto yy502;
+ if (yych != 'c') goto yy186;
yy502:
YYDEBUG(502, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy503;
- if (yych != 'e') goto yy186;
+ if (yych == 'T') goto yy503;
+ if (yych != 't') goto yy186;
yy503:
YYDEBUG(503, *YYCURSOR);
- ++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
- goto yy185;
- }
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy504;
+ if (yych != 'e') goto yy186;
+yy504:
YYDEBUG(504, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1157 "Zend/zend_language_scanner.l"
- {
- return T_PRIVATE;
-}
-#line 5182 "Zend/zend_language_scanner.c"
+ yych = *++YYCURSOR;
+ if (yych == 'D') goto yy505;
+ if (yych != 'd') goto yy186;
yy505:
YYDEBUG(505, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
YYDEBUG(506, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 999 "Zend/zend_language_scanner.l"
+#line 1299 "Zend/zend_language_scanner.l"
{
- return T_PRINT;
+ return T_PROTECTED;
}
-#line 5195 "Zend/zend_language_scanner.c"
+#line 5363 "Zend/zend_language_scanner.c"
yy507:
YYDEBUG(507, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy512;
- if (yych == 'o') goto yy512;
+ if (yych == 'T') goto yy513;
+ if (yych == 't') goto yy513;
goto yy186;
yy508:
YYDEBUG(508, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy509;
- if (yych != 't') goto yy186;
+ if (yych == 'A') goto yy509;
+ if (yych != 'a') goto yy186;
yy509:
YYDEBUG(509, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy510;
- if (yych != 'o') goto yy186;
+ if (yych == 'T') goto yy510;
+ if (yych != 't') goto yy186;
yy510:
YYDEBUG(510, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy511;
+ if (yych != 'e') goto yy186;
+yy511:
+ YYDEBUG(511, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(511, *YYCURSOR);
+ YYDEBUG(512, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 991 "Zend/zend_language_scanner.l"
+#line 1295 "Zend/zend_language_scanner.l"
{
- return T_GOTO;
+ return T_PRIVATE;
}
-#line 5224 "Zend/zend_language_scanner.c"
-yy512:
- YYDEBUG(512, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'B') goto yy513;
- if (yych != 'b') goto yy186;
+#line 5397 "Zend/zend_language_scanner.c"
yy513:
YYDEBUG(513, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy514;
- if (yych != 'a') goto yy186;
-yy514:
- YYDEBUG(514, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'L') goto yy515;
- if (yych != 'l') goto yy186;
-yy515:
- YYDEBUG(515, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(516, *YYCURSOR);
+ YYDEBUG(514, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1129 "Zend/zend_language_scanner.l"
+#line 1133 "Zend/zend_language_scanner.l"
{
- return T_GLOBAL;
+ return T_PRINT;
}
-#line 5252 "Zend/zend_language_scanner.c"
+#line 5410 "Zend/zend_language_scanner.c"
+yy515:
+ YYDEBUG(515, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'O') goto yy520;
+ if (yych == 'o') goto yy520;
+ goto yy186;
+yy516:
+ YYDEBUG(516, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy517;
+ if (yych != 't') goto yy186;
yy517:
YYDEBUG(517, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '<') goto yy525;
- goto yy193;
+ if (yych == 'O') goto yy518;
+ if (yych != 'o') goto yy186;
yy518:
YYDEBUG(518, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy180;
-yy519:
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy185;
+ }
YYDEBUG(519, *YYCURSOR);
- yych = *++YYCURSOR;
- goto yy178;
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1125 "Zend/zend_language_scanner.l"
+ {
+ return T_GOTO;
+}
+#line 5439 "Zend/zend_language_scanner.c"
yy520:
YYDEBUG(520, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy521;
- if (yych != 'e') goto yy186;
+ if (yych == 'B') goto yy521;
+ if (yych != 'b') goto yy186;
yy521:
YYDEBUG(521, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5275,1545 +5449,1709 @@ yy521:
yy522:
YYDEBUG(522, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'K') goto yy523;
- if (yych != 'k') goto yy186;
+ if (yych == 'L') goto yy523;
+ if (yych != 'l') goto yy186;
yy523:
YYDEBUG(523, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
YYDEBUG(524, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 983 "Zend/zend_language_scanner.l"
+#line 1267 "Zend/zend_language_scanner.l"
{
- return T_BREAK;
+ return T_GLOBAL;
}
-#line 5293 "Zend/zend_language_scanner.c"
+#line 5467 "Zend/zend_language_scanner.c"
yy525:
YYDEBUG(525, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == '<') goto yy265;
+ if (yych == '<') goto yy533;
goto yy193;
yy526:
YYDEBUG(526, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy533;
- if (yych == 'a') goto yy533;
- goto yy186;
+ goto yy180;
yy527:
YYDEBUG(527, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy528;
- if (yych != 'i') goto yy186;
+ goto yy178;
yy528:
YYDEBUG(528, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy529;
- if (yych != 't') goto yy186;
+ if (yych == 'E') goto yy529;
+ if (yych != 'e') goto yy186;
yy529:
YYDEBUG(529, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy530;
- if (yych != 'c') goto yy186;
+ if (yych == 'A') goto yy530;
+ if (yych != 'a') goto yy186;
yy530:
YYDEBUG(530, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy531;
- if (yych != 'h') goto yy186;
+ if (yych == 'K') goto yy531;
+ if (yych != 'k') goto yy186;
yy531:
YYDEBUG(531, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
YYDEBUG(532, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 967 "Zend/zend_language_scanner.l"
+#line 1117 "Zend/zend_language_scanner.l"
{
- return T_SWITCH;
+ return T_BREAK;
}
-#line 5337 "Zend/zend_language_scanner.c"
+#line 5508 "Zend/zend_language_scanner.c"
yy533:
YYDEBUG(533, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy534;
- if (yych != 't') goto yy186;
+ if (yych == '<') goto yy269;
+ goto yy193;
yy534:
YYDEBUG(534, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy535;
- if (yych != 'i') goto yy186;
+ if (yych == 'A') goto yy541;
+ if (yych == 'a') goto yy541;
+ goto yy186;
yy535:
YYDEBUG(535, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy536;
- if (yych != 'c') goto yy186;
+ if (yych == 'I') goto yy536;
+ if (yych != 'i') goto yy186;
yy536:
YYDEBUG(536, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy537;
+ if (yych != 't') goto yy186;
+yy537:
+ YYDEBUG(537, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'C') goto yy538;
+ if (yych != 'c') goto yy186;
+yy538:
+ YYDEBUG(538, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'H') goto yy539;
+ if (yych != 'h') goto yy186;
+yy539:
+ YYDEBUG(539, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(537, *YYCURSOR);
+ YYDEBUG(540, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1145 "Zend/zend_language_scanner.l"
+#line 1101 "Zend/zend_language_scanner.l"
+ {
+ return T_SWITCH;
+}
+#line 5552 "Zend/zend_language_scanner.c"
+yy541:
+ YYDEBUG(541, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy542;
+ if (yych != 't') goto yy186;
+yy542:
+ YYDEBUG(542, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'I') goto yy543;
+ if (yych != 'i') goto yy186;
+yy543:
+ YYDEBUG(543, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'C') goto yy544;
+ if (yych != 'c') goto yy186;
+yy544:
+ YYDEBUG(544, *YYCURSOR);
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy185;
+ }
+ YYDEBUG(545, *YYCURSOR);
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1283 "Zend/zend_language_scanner.l"
{
return T_STATIC;
}
-#line 5365 "Zend/zend_language_scanner.c"
-yy538:
- YYDEBUG(538, *YYCURSOR);
+#line 5580 "Zend/zend_language_scanner.c"
+yy546:
+ YYDEBUG(546, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy549;
- if (yych == 's') goto yy549;
+ if (yych == 'S') goto yy557;
+ if (yych == 's') goto yy557;
goto yy186;
-yy539:
- YYDEBUG(539, *YYCURSOR);
+yy547:
+ YYDEBUG(547, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'D') goto yy547;
- if (yych == 'd') goto yy547;
+ if (yych == 'D') goto yy555;
+ if (yych == 'd') goto yy555;
goto yy186;
-yy540:
- YYDEBUG(540, *YYCURSOR);
+yy548:
+ YYDEBUG(548, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy543;
- if (yych == 'r') goto yy543;
+ if (yych == 'R') goto yy551;
+ if (yych == 'r') goto yy551;
goto yy186;
-yy541:
- YYDEBUG(541, *YYCURSOR);
+yy549:
+ YYDEBUG(549, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(542, *YYCURSOR);
+ YYDEBUG(550, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 963 "Zend/zend_language_scanner.l"
+#line 1097 "Zend/zend_language_scanner.l"
{
return T_AS;
}
-#line 5396 "Zend/zend_language_scanner.c"
-yy543:
- YYDEBUG(543, *YYCURSOR);
+#line 5611 "Zend/zend_language_scanner.c"
+yy551:
+ YYDEBUG(551, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy544;
+ if (yych == 'A') goto yy552;
if (yych != 'a') goto yy186;
-yy544:
- YYDEBUG(544, *YYCURSOR);
+yy552:
+ YYDEBUG(552, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'Y') goto yy545;
+ if (yych == 'Y') goto yy553;
if (yych != 'y') goto yy186;
-yy545:
- YYDEBUG(545, *YYCURSOR);
+yy553:
+ YYDEBUG(553, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(546, *YYCURSOR);
+ YYDEBUG(554, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1181 "Zend/zend_language_scanner.l"
+#line 1319 "Zend/zend_language_scanner.l"
{
return T_ARRAY;
}
-#line 5419 "Zend/zend_language_scanner.c"
-yy547:
- YYDEBUG(547, *YYCURSOR);
+#line 5634 "Zend/zend_language_scanner.c"
+yy555:
+ YYDEBUG(555, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(548, *YYCURSOR);
+ YYDEBUG(556, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1273 "Zend/zend_language_scanner.l"
+#line 1415 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_AND;
}
-#line 5432 "Zend/zend_language_scanner.c"
-yy549:
- YYDEBUG(549, *YYCURSOR);
+#line 5647 "Zend/zend_language_scanner.c"
+yy557:
+ YYDEBUG(557, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy550;
+ if (yych == 'T') goto yy558;
if (yych != 't') goto yy186;
-yy550:
- YYDEBUG(550, *YYCURSOR);
+yy558:
+ YYDEBUG(558, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy551;
+ if (yych == 'R') goto yy559;
if (yych != 'r') goto yy186;
-yy551:
- YYDEBUG(551, *YYCURSOR);
+yy559:
+ YYDEBUG(559, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy552;
+ if (yych == 'A') goto yy560;
if (yych != 'a') goto yy186;
-yy552:
- YYDEBUG(552, *YYCURSOR);
+yy560:
+ YYDEBUG(560, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy553;
+ if (yych == 'C') goto yy561;
if (yych != 'c') goto yy186;
-yy553:
- YYDEBUG(553, *YYCURSOR);
+yy561:
+ YYDEBUG(561, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy554;
+ if (yych == 'T') goto yy562;
if (yych != 't') goto yy186;
-yy554:
- YYDEBUG(554, *YYCURSOR);
+yy562:
+ YYDEBUG(562, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(555, *YYCURSOR);
+ YYDEBUG(563, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1149 "Zend/zend_language_scanner.l"
+#line 1287 "Zend/zend_language_scanner.l"
{
return T_ABSTRACT;
}
-#line 5470 "Zend/zend_language_scanner.c"
-yy556:
- YYDEBUG(556, *YYCURSOR);
+#line 5685 "Zend/zend_language_scanner.c"
+yy564:
+ YYDEBUG(564, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy557;
+ if (yych == 'I') goto yy565;
if (yych != 'i') goto yy186;
-yy557:
- YYDEBUG(557, *YYCURSOR);
+yy565:
+ YYDEBUG(565, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy558;
+ if (yych == 'L') goto yy566;
if (yych != 'l') goto yy186;
-yy558:
- YYDEBUG(558, *YYCURSOR);
+yy566:
+ YYDEBUG(566, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy559;
+ if (yych == 'E') goto yy567;
if (yych != 'e') goto yy186;
-yy559:
- YYDEBUG(559, *YYCURSOR);
+yy567:
+ YYDEBUG(567, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(560, *YYCURSOR);
+ YYDEBUG(568, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 923 "Zend/zend_language_scanner.l"
+#line 1057 "Zend/zend_language_scanner.l"
{
return T_WHILE;
}
-#line 5498 "Zend/zend_language_scanner.c"
-yy561:
- YYDEBUG(561, *YYCURSOR);
+#line 5713 "Zend/zend_language_scanner.c"
+yy569:
+ YYDEBUG(569, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(562, *YYCURSOR);
+ YYDEBUG(570, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 907 "Zend/zend_language_scanner.l"
+#line 1041 "Zend/zend_language_scanner.l"
{
return T_IF;
}
-#line 5511 "Zend/zend_language_scanner.c"
-yy563:
- YYDEBUG(563, *YYCURSOR);
+#line 5726 "Zend/zend_language_scanner.c"
+yy571:
+ YYDEBUG(571, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'P') goto yy599;
- if (yych == 'p') goto yy599;
+ if (yych == 'P') goto yy613;
+ if (yych == 'p') goto yy613;
goto yy186;
-yy564:
- YYDEBUG(564, *YYCURSOR);
+yy572:
+ YYDEBUG(572, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'T') {
if (yych <= 'C') {
if (yych <= 'B') goto yy186;
- goto yy572;
+ goto yy580;
} else {
if (yych <= 'R') goto yy186;
- if (yych <= 'S') goto yy570;
- goto yy571;
+ if (yych <= 'S') goto yy578;
+ goto yy579;
}
} else {
if (yych <= 'r') {
- if (yych == 'c') goto yy572;
+ if (yych == 'c') goto yy580;
goto yy186;
} else {
- if (yych <= 's') goto yy570;
- if (yych <= 't') goto yy571;
+ if (yych <= 's') goto yy578;
+ if (yych <= 't') goto yy579;
goto yy186;
}
}
-yy565:
- YYDEBUG(565, *YYCURSOR);
+yy573:
+ YYDEBUG(573, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy566;
+ if (yych == 'S') goto yy574;
if (yych != 's') goto yy186;
-yy566:
- YYDEBUG(566, *YYCURSOR);
+yy574:
+ YYDEBUG(574, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy567;
+ if (yych == 'E') goto yy575;
if (yych != 'e') goto yy186;
-yy567:
- YYDEBUG(567, *YYCURSOR);
+yy575:
+ YYDEBUG(575, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy568;
+ if (yych == 'T') goto yy576;
if (yych != 't') goto yy186;
-yy568:
- YYDEBUG(568, *YYCURSOR);
+yy576:
+ YYDEBUG(576, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(569, *YYCURSOR);
+ YYDEBUG(577, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1133 "Zend/zend_language_scanner.l"
+#line 1271 "Zend/zend_language_scanner.l"
{
return T_ISSET;
}
-#line 5567 "Zend/zend_language_scanner.c"
-yy570:
- YYDEBUG(570, *YYCURSOR);
+#line 5782 "Zend/zend_language_scanner.c"
+yy578:
+ YYDEBUG(578, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy591;
- if (yych == 't') goto yy591;
+ if (yych == 'T') goto yy599;
+ if (yych == 't') goto yy599;
goto yy186;
-yy571:
- YYDEBUG(571, *YYCURSOR);
+yy579:
+ YYDEBUG(579, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy584;
- if (yych == 'e') goto yy584;
+ if (yych == 'E') goto yy592;
+ if (yych == 'e') goto yy592;
goto yy186;
-yy572:
- YYDEBUG(572, *YYCURSOR);
+yy580:
+ YYDEBUG(580, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy573;
+ if (yych == 'L') goto yy581;
if (yych != 'l') goto yy186;
-yy573:
- YYDEBUG(573, *YYCURSOR);
+yy581:
+ YYDEBUG(581, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'U') goto yy574;
+ if (yych == 'U') goto yy582;
if (yych != 'u') goto yy186;
-yy574:
- YYDEBUG(574, *YYCURSOR);
+yy582:
+ YYDEBUG(582, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'D') goto yy575;
+ if (yych == 'D') goto yy583;
if (yych != 'd') goto yy186;
-yy575:
- YYDEBUG(575, *YYCURSOR);
+yy583:
+ YYDEBUG(583, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy576;
+ if (yych == 'E') goto yy584;
if (yych != 'e') goto yy186;
-yy576:
- YYDEBUG(576, *YYCURSOR);
+yy584:
+ YYDEBUG(584, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '^') {
if (yych <= '9') {
if (yych >= '0') goto yy185;
} else {
- if (yych <= '@') goto yy577;
+ if (yych <= '@') goto yy585;
if (yych <= 'Z') goto yy185;
}
} else {
if (yych <= '`') {
- if (yych <= '_') goto yy578;
+ if (yych <= '_') goto yy586;
} else {
if (yych <= 'z') goto yy185;
if (yych >= 0x7F) goto yy185;
}
}
-yy577:
- YYDEBUG(577, *YYCURSOR);
+yy585:
+ YYDEBUG(585, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1105 "Zend/zend_language_scanner.l"
+#line 1239 "Zend/zend_language_scanner.l"
{
return T_INCLUDE;
}
-#line 5625 "Zend/zend_language_scanner.c"
-yy578:
- YYDEBUG(578, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'O') goto yy579;
- if (yych != 'o') goto yy186;
-yy579:
- YYDEBUG(579, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy580;
- if (yych != 'n') goto yy186;
-yy580:
- YYDEBUG(580, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'C') goto yy581;
- if (yych != 'c') goto yy186;
-yy581:
- YYDEBUG(581, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'E') goto yy582;
- if (yych != 'e') goto yy186;
-yy582:
- YYDEBUG(582, *YYCURSOR);
- ++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
- goto yy185;
- }
- YYDEBUG(583, *YYCURSOR);
- yyleng = YYCURSOR - SCNG(yy_text);
-#line 1109 "Zend/zend_language_scanner.l"
- {
- return T_INCLUDE_ONCE;
-}
-#line 5658 "Zend/zend_language_scanner.c"
-yy584:
- YYDEBUG(584, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'R') goto yy585;
- if (yych != 'r') goto yy186;
-yy585:
- YYDEBUG(585, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'F') goto yy586;
- if (yych != 'f') goto yy186;
+#line 5840 "Zend/zend_language_scanner.c"
yy586:
YYDEBUG(586, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy587;
- if (yych != 'a') goto yy186;
+ if (yych == 'O') goto yy587;
+ if (yych != 'o') goto yy186;
yy587:
YYDEBUG(587, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy588;
- if (yych != 'c') goto yy186;
+ if (yych == 'N') goto yy588;
+ if (yych != 'n') goto yy186;
yy588:
YYDEBUG(588, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy589;
- if (yych != 'e') goto yy186;
+ if (yych == 'C') goto yy589;
+ if (yych != 'c') goto yy186;
yy589:
YYDEBUG(589, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy590;
+ if (yych != 'e') goto yy186;
+yy590:
+ YYDEBUG(590, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(590, *YYCURSOR);
+ YYDEBUG(591, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1007 "Zend/zend_language_scanner.l"
+#line 1243 "Zend/zend_language_scanner.l"
{
- return T_INTERFACE;
+ return T_INCLUDE_ONCE;
}
-#line 5696 "Zend/zend_language_scanner.c"
-yy591:
- YYDEBUG(591, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'A') goto yy592;
- if (yych != 'a') goto yy186;
+#line 5873 "Zend/zend_language_scanner.c"
yy592:
YYDEBUG(592, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy593;
- if (yych != 'n') goto yy186;
+ if (yych == 'R') goto yy593;
+ if (yych != 'r') goto yy186;
yy593:
YYDEBUG(593, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy594;
- if (yych != 'c') goto yy186;
+ if (yych == 'F') goto yy594;
+ if (yych != 'f') goto yy186;
yy594:
YYDEBUG(594, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy595;
- if (yych != 'e') goto yy186;
+ if (yych == 'A') goto yy595;
+ if (yych != 'a') goto yy186;
yy595:
YYDEBUG(595, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy596;
- if (yych != 'o') goto yy186;
+ if (yych == 'C') goto yy596;
+ if (yych != 'c') goto yy186;
yy596:
YYDEBUG(596, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'F') goto yy597;
- if (yych != 'f') goto yy186;
+ if (yych == 'E') goto yy597;
+ if (yych != 'e') goto yy186;
yy597:
YYDEBUG(597, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
YYDEBUG(598, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 959 "Zend/zend_language_scanner.l"
+#line 1141 "Zend/zend_language_scanner.l"
{
- return T_INSTANCEOF;
+ return T_INTERFACE;
}
-#line 5739 "Zend/zend_language_scanner.c"
+#line 5911 "Zend/zend_language_scanner.c"
yy599:
YYDEBUG(599, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy600;
- if (yych != 'l') goto yy186;
+ if (yych <= 'E') {
+ if (yych == 'A') goto yy600;
+ if (yych <= 'D') goto yy186;
+ goto yy601;
+ } else {
+ if (yych <= 'a') {
+ if (yych <= '`') goto yy186;
+ } else {
+ if (yych == 'e') goto yy601;
+ goto yy186;
+ }
+ }
yy600:
YYDEBUG(600, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy601;
- if (yych != 'e') goto yy186;
+ if (yych == 'N') goto yy607;
+ if (yych == 'n') goto yy607;
+ goto yy186;
yy601:
YYDEBUG(601, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'M') goto yy602;
- if (yych != 'm') goto yy186;
+ if (yych == 'A') goto yy602;
+ if (yych != 'a') goto yy186;
yy602:
YYDEBUG(602, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy603;
- if (yych != 'e') goto yy186;
+ if (yych == 'D') goto yy603;
+ if (yych != 'd') goto yy186;
yy603:
YYDEBUG(603, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy604;
- if (yych != 'n') goto yy186;
+ if (yych == 'O') goto yy604;
+ if (yych != 'o') goto yy186;
yy604:
YYDEBUG(604, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy605;
- if (yych != 't') goto yy186;
+ if (yych == 'F') goto yy605;
+ if (yych != 'f') goto yy186;
yy605:
YYDEBUG(605, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'S') goto yy606;
- if (yych != 's') goto yy186;
-yy606:
- YYDEBUG(606, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(607, *YYCURSOR);
+ YYDEBUG(606, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1015 "Zend/zend_language_scanner.l"
+#line 1263 "Zend/zend_language_scanner.l"
{
- return T_IMPLEMENTS;
+ return T_INSTEADOF;
}
-#line 5787 "Zend/zend_language_scanner.c"
+#line 5965 "Zend/zend_language_scanner.c"
+yy607:
+ YYDEBUG(607, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'C') goto yy608;
+ if (yych != 'c') goto yy186;
yy608:
YYDEBUG(608, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy612;
- if (yych == 'r') goto yy612;
- goto yy186;
+ if (yych == 'E') goto yy609;
+ if (yych != 'e') goto yy186;
yy609:
YYDEBUG(609, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'Y') goto yy610;
- if (yych != 'y') goto yy186;
+ if (yych == 'O') goto yy610;
+ if (yych != 'o') goto yy186;
yy610:
YYDEBUG(610, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'F') goto yy611;
+ if (yych != 'f') goto yy186;
+yy611:
+ YYDEBUG(611, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(611, *YYCURSOR);
+ YYDEBUG(612, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 895 "Zend/zend_language_scanner.l"
+#line 1093 "Zend/zend_language_scanner.l"
{
- return T_TRY;
+ return T_INSTANCEOF;
}
-#line 5811 "Zend/zend_language_scanner.c"
-yy612:
- YYDEBUG(612, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'O') goto yy613;
- if (yych != 'o') goto yy186;
+#line 5998 "Zend/zend_language_scanner.c"
yy613:
YYDEBUG(613, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'W') goto yy614;
- if (yych != 'w') goto yy186;
+ if (yych == 'L') goto yy614;
+ if (yych != 'l') goto yy186;
yy614:
YYDEBUG(614, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy615;
+ if (yych != 'e') goto yy186;
+yy615:
+ YYDEBUG(615, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'M') goto yy616;
+ if (yych != 'm') goto yy186;
+yy616:
+ YYDEBUG(616, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy617;
+ if (yych != 'e') goto yy186;
+yy617:
+ YYDEBUG(617, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'N') goto yy618;
+ if (yych != 'n') goto yy186;
+yy618:
+ YYDEBUG(618, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy619;
+ if (yych != 't') goto yy186;
+yy619:
+ YYDEBUG(619, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'S') goto yy620;
+ if (yych != 's') goto yy186;
+yy620:
+ YYDEBUG(620, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(615, *YYCURSOR);
+ YYDEBUG(621, *YYCURSOR);
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1153 "Zend/zend_language_scanner.l"
+ {
+ return T_IMPLEMENTS;
+}
+#line 6046 "Zend/zend_language_scanner.c"
+yy622:
+ YYDEBUG(622, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'R') goto yy630;
+ if (yych == 'r') goto yy630;
+ goto yy186;
+yy623:
+ YYDEBUG(623, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych <= 'Y') {
+ if (yych == 'A') goto yy626;
+ if (yych <= 'X') goto yy186;
+ } else {
+ if (yych <= 'a') {
+ if (yych <= '`') goto yy186;
+ goto yy626;
+ } else {
+ if (yych != 'y') goto yy186;
+ }
+ }
+ YYDEBUG(624, *YYCURSOR);
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy185;
+ }
+ YYDEBUG(625, *YYCURSOR);
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1029 "Zend/zend_language_scanner.l"
+ {
+ return T_TRY;
+}
+#line 6078 "Zend/zend_language_scanner.c"
+yy626:
+ YYDEBUG(626, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'I') goto yy627;
+ if (yych != 'i') goto yy186;
+yy627:
+ YYDEBUG(627, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'T') goto yy628;
+ if (yych != 't') goto yy186;
+yy628:
+ YYDEBUG(628, *YYCURSOR);
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy185;
+ }
+ YYDEBUG(629, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 903 "Zend/zend_language_scanner.l"
+#line 1145 "Zend/zend_language_scanner.l"
+ {
+ return T_TRAIT;
+}
+#line 6101 "Zend/zend_language_scanner.c"
+yy630:
+ YYDEBUG(630, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'O') goto yy631;
+ if (yych != 'o') goto yy186;
+yy631:
+ YYDEBUG(631, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'W') goto yy632;
+ if (yych != 'w') goto yy186;
+yy632:
+ YYDEBUG(632, *YYCURSOR);
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy185;
+ }
+ YYDEBUG(633, *YYCURSOR);
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1037 "Zend/zend_language_scanner.l"
{
return T_THROW;
}
-#line 5834 "Zend/zend_language_scanner.c"
-yy616:
- YYDEBUG(616, *YYCURSOR);
+#line 6124 "Zend/zend_language_scanner.c"
+yy634:
+ YYDEBUG(634, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'T') {
- if (yych == 'Q') goto yy618;
+ if (yych == 'Q') goto yy636;
if (yych <= 'S') goto yy186;
} else {
if (yych <= 'q') {
if (yych <= 'p') goto yy186;
- goto yy618;
+ goto yy636;
} else {
if (yych != 't') goto yy186;
}
}
- YYDEBUG(617, *YYCURSOR);
+ YYDEBUG(635, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'U') goto yy630;
- if (yych == 'u') goto yy630;
+ if (yych == 'U') goto yy648;
+ if (yych == 'u') goto yy648;
goto yy186;
-yy618:
- YYDEBUG(618, *YYCURSOR);
+yy636:
+ YYDEBUG(636, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'U') goto yy619;
+ if (yych == 'U') goto yy637;
if (yych != 'u') goto yy186;
-yy619:
- YYDEBUG(619, *YYCURSOR);
+yy637:
+ YYDEBUG(637, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy620;
+ if (yych == 'I') goto yy638;
if (yych != 'i') goto yy186;
-yy620:
- YYDEBUG(620, *YYCURSOR);
+yy638:
+ YYDEBUG(638, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy621;
+ if (yych == 'R') goto yy639;
if (yych != 'r') goto yy186;
-yy621:
- YYDEBUG(621, *YYCURSOR);
+yy639:
+ YYDEBUG(639, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy622;
+ if (yych == 'E') goto yy640;
if (yych != 'e') goto yy186;
-yy622:
- YYDEBUG(622, *YYCURSOR);
+yy640:
+ YYDEBUG(640, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '^') {
if (yych <= '9') {
if (yych >= '0') goto yy185;
} else {
- if (yych <= '@') goto yy623;
+ if (yych <= '@') goto yy641;
if (yych <= 'Z') goto yy185;
}
} else {
if (yych <= '`') {
- if (yych <= '_') goto yy624;
+ if (yych <= '_') goto yy642;
} else {
if (yych <= 'z') goto yy185;
if (yych >= 0x7F) goto yy185;
}
}
-yy623:
- YYDEBUG(623, *YYCURSOR);
+yy641:
+ YYDEBUG(641, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1113 "Zend/zend_language_scanner.l"
+#line 1247 "Zend/zend_language_scanner.l"
{
return T_REQUIRE;
}
-#line 5899 "Zend/zend_language_scanner.c"
-yy624:
- YYDEBUG(624, *YYCURSOR);
+#line 6189 "Zend/zend_language_scanner.c"
+yy642:
+ YYDEBUG(642, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy625;
+ if (yych == 'O') goto yy643;
if (yych != 'o') goto yy186;
-yy625:
- YYDEBUG(625, *YYCURSOR);
+yy643:
+ YYDEBUG(643, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy626;
+ if (yych == 'N') goto yy644;
if (yych != 'n') goto yy186;
-yy626:
- YYDEBUG(626, *YYCURSOR);
+yy644:
+ YYDEBUG(644, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy627;
+ if (yych == 'C') goto yy645;
if (yych != 'c') goto yy186;
-yy627:
- YYDEBUG(627, *YYCURSOR);
+yy645:
+ YYDEBUG(645, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy628;
+ if (yych == 'E') goto yy646;
if (yych != 'e') goto yy186;
-yy628:
- YYDEBUG(628, *YYCURSOR);
+yy646:
+ YYDEBUG(646, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(629, *YYCURSOR);
+ YYDEBUG(647, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1117 "Zend/zend_language_scanner.l"
+#line 1251 "Zend/zend_language_scanner.l"
{
return T_REQUIRE_ONCE;
}
-#line 5932 "Zend/zend_language_scanner.c"
-yy630:
- YYDEBUG(630, *YYCURSOR);
+#line 6222 "Zend/zend_language_scanner.c"
+yy648:
+ YYDEBUG(648, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy631;
+ if (yych == 'R') goto yy649;
if (yych != 'r') goto yy186;
-yy631:
- YYDEBUG(631, *YYCURSOR);
+yy649:
+ YYDEBUG(649, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy632;
+ if (yych == 'N') goto yy650;
if (yych != 'n') goto yy186;
-yy632:
- YYDEBUG(632, *YYCURSOR);
+yy650:
+ YYDEBUG(650, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(633, *YYCURSOR);
+ YYDEBUG(651, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 891 "Zend/zend_language_scanner.l"
+#line 1025 "Zend/zend_language_scanner.l"
{
return T_RETURN;
}
-#line 5955 "Zend/zend_language_scanner.c"
-yy634:
- YYDEBUG(634, *YYCURSOR);
+#line 6245 "Zend/zend_language_scanner.c"
+yy652:
+ YYDEBUG(652, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'T') {
- if (yych <= 'R') goto yy186;
- if (yych <= 'S') goto yy656;
- goto yy655;
+ if (yych <= 'L') {
+ if (yych <= 'K') goto yy186;
+ goto yy675;
+ } else {
+ if (yych <= 'R') goto yy186;
+ if (yych <= 'S') goto yy674;
+ goto yy673;
+ }
} else {
- if (yych <= 'r') goto yy186;
- if (yych <= 's') goto yy656;
- if (yych <= 't') goto yy655;
- goto yy186;
+ if (yych <= 'r') {
+ if (yych == 'l') goto yy675;
+ goto yy186;
+ } else {
+ if (yych <= 's') goto yy674;
+ if (yych <= 't') goto yy673;
+ goto yy186;
+ }
}
-yy635:
- YYDEBUG(635, *YYCURSOR);
+yy653:
+ YYDEBUG(653, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'O') {
- if (yych == 'A') goto yy647;
+ if (yych == 'A') goto yy665;
if (yych <= 'N') goto yy186;
- goto yy648;
+ goto yy666;
} else {
if (yych <= 'a') {
if (yych <= '`') goto yy186;
- goto yy647;
+ goto yy665;
} else {
- if (yych == 'o') goto yy648;
+ if (yych == 'o') goto yy666;
goto yy186;
}
}
-yy636:
- YYDEBUG(636, *YYCURSOR);
+yy654:
+ YYDEBUG(654, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy637;
+ if (yych == 'N') goto yy655;
if (yych != 'n') goto yy186;
-yy637:
- YYDEBUG(637, *YYCURSOR);
+yy655:
+ YYDEBUG(655, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'T') {
if (yych <= 'R') goto yy186;
- if (yych >= 'T') goto yy639;
+ if (yych >= 'T') goto yy657;
} else {
if (yych <= 'r') goto yy186;
- if (yych <= 's') goto yy638;
- if (yych <= 't') goto yy639;
+ if (yych <= 's') goto yy656;
+ if (yych <= 't') goto yy657;
goto yy186;
}
-yy638:
- YYDEBUG(638, *YYCURSOR);
+yy656:
+ YYDEBUG(656, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy645;
- if (yych == 't') goto yy645;
+ if (yych == 'T') goto yy663;
+ if (yych == 't') goto yy663;
goto yy186;
-yy639:
- YYDEBUG(639, *YYCURSOR);
+yy657:
+ YYDEBUG(657, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy640;
+ if (yych == 'I') goto yy658;
if (yych != 'i') goto yy186;
-yy640:
- YYDEBUG(640, *YYCURSOR);
+yy658:
+ YYDEBUG(658, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy641;
+ if (yych == 'N') goto yy659;
if (yych != 'n') goto yy186;
-yy641:
- YYDEBUG(641, *YYCURSOR);
+yy659:
+ YYDEBUG(659, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'U') goto yy642;
+ if (yych == 'U') goto yy660;
if (yych != 'u') goto yy186;
-yy642:
- YYDEBUG(642, *YYCURSOR);
+yy660:
+ YYDEBUG(660, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy643;
+ if (yych == 'E') goto yy661;
if (yych != 'e') goto yy186;
-yy643:
- YYDEBUG(643, *YYCURSOR);
+yy661:
+ YYDEBUG(661, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(644, *YYCURSOR);
+ YYDEBUG(662, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 987 "Zend/zend_language_scanner.l"
+#line 1121 "Zend/zend_language_scanner.l"
{
return T_CONTINUE;
}
-#line 6040 "Zend/zend_language_scanner.c"
-yy645:
- YYDEBUG(645, *YYCURSOR);
+#line 6339 "Zend/zend_language_scanner.c"
+yy663:
+ YYDEBUG(663, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(646, *YYCURSOR);
+ YYDEBUG(664, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 887 "Zend/zend_language_scanner.l"
+#line 1021 "Zend/zend_language_scanner.l"
{
return T_CONST;
}
-#line 6053 "Zend/zend_language_scanner.c"
-yy647:
- YYDEBUG(647, *YYCURSOR);
+#line 6352 "Zend/zend_language_scanner.c"
+yy665:
+ YYDEBUG(665, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy652;
- if (yych == 's') goto yy652;
+ if (yych == 'S') goto yy670;
+ if (yych == 's') goto yy670;
goto yy186;
-yy648:
- YYDEBUG(648, *YYCURSOR);
+yy666:
+ YYDEBUG(666, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy649;
+ if (yych == 'N') goto yy667;
if (yych != 'n') goto yy186;
-yy649:
- YYDEBUG(649, *YYCURSOR);
+yy667:
+ YYDEBUG(667, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy650;
+ if (yych == 'E') goto yy668;
if (yych != 'e') goto yy186;
-yy650:
- YYDEBUG(650, *YYCURSOR);
+yy668:
+ YYDEBUG(668, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(651, *YYCURSOR);
+ YYDEBUG(669, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1061 "Zend/zend_language_scanner.l"
+#line 1199 "Zend/zend_language_scanner.l"
{
return T_CLONE;
}
-#line 6082 "Zend/zend_language_scanner.c"
-yy652:
- YYDEBUG(652, *YYCURSOR);
+#line 6381 "Zend/zend_language_scanner.c"
+yy670:
+ YYDEBUG(670, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy653;
+ if (yych == 'S') goto yy671;
if (yych != 's') goto yy186;
-yy653:
- YYDEBUG(653, *YYCURSOR);
+yy671:
+ YYDEBUG(671, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(654, *YYCURSOR);
+ YYDEBUG(672, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1003 "Zend/zend_language_scanner.l"
+#line 1137 "Zend/zend_language_scanner.l"
{
return T_CLASS;
}
-#line 6100 "Zend/zend_language_scanner.c"
-yy655:
- YYDEBUG(655, *YYCURSOR);
+#line 6399 "Zend/zend_language_scanner.c"
+yy673:
+ YYDEBUG(673, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy659;
- if (yych == 'c') goto yy659;
+ if (yych == 'C') goto yy684;
+ if (yych == 'c') goto yy684;
goto yy186;
-yy656:
- YYDEBUG(656, *YYCURSOR);
+yy674:
+ YYDEBUG(674, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'E') goto yy682;
+ if (yych == 'e') goto yy682;
+ goto yy186;
+yy675:
+ YYDEBUG(675, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'L') goto yy676;
+ if (yych != 'l') goto yy186;
+yy676:
+ YYDEBUG(676, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'A') goto yy677;
+ if (yych != 'a') goto yy186;
+yy677:
+ YYDEBUG(677, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'B') goto yy678;
+ if (yych != 'b') goto yy186;
+yy678:
+ YYDEBUG(678, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yych == 'L') goto yy679;
+ if (yych != 'l') goto yy186;
+yy679:
+ YYDEBUG(679, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy657;
+ if (yych == 'E') goto yy680;
if (yych != 'e') goto yy186;
-yy657:
- YYDEBUG(657, *YYCURSOR);
+yy680:
+ YYDEBUG(680, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(658, *YYCURSOR);
+ YYDEBUG(681, *YYCURSOR);
+ yyleng = YYCURSOR - SCNG(yy_text);
+#line 1323 "Zend/zend_language_scanner.l"
+ {
+ return T_CALLABLE;
+}
+#line 6449 "Zend/zend_language_scanner.c"
+yy682:
+ YYDEBUG(682, *YYCURSOR);
+ ++YYCURSOR;
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
+ goto yy185;
+ }
+ YYDEBUG(683, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 975 "Zend/zend_language_scanner.l"
+#line 1109 "Zend/zend_language_scanner.l"
{
return T_CASE;
}
-#line 6124 "Zend/zend_language_scanner.c"
-yy659:
- YYDEBUG(659, *YYCURSOR);
+#line 6462 "Zend/zend_language_scanner.c"
+yy684:
+ YYDEBUG(684, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy660;
+ if (yych == 'H') goto yy685;
if (yych != 'h') goto yy186;
-yy660:
- YYDEBUG(660, *YYCURSOR);
+yy685:
+ YYDEBUG(685, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(661, *YYCURSOR);
+ YYDEBUG(686, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 899 "Zend/zend_language_scanner.l"
+#line 1033 "Zend/zend_language_scanner.l"
{
return T_CATCH;
}
-#line 6142 "Zend/zend_language_scanner.c"
-yy662:
- YYDEBUG(662, *YYCURSOR);
+#line 6480 "Zend/zend_language_scanner.c"
+yy687:
+ YYDEBUG(687, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy679;
- if (yych == 'n') goto yy679;
+ if (yych == 'N') goto yy704;
+ if (yych == 'n') goto yy704;
goto yy186;
-yy663:
- YYDEBUG(663, *YYCURSOR);
+yy688:
+ YYDEBUG(688, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy672;
- if (yych == 'r') goto yy672;
+ if (yych == 'R') goto yy697;
+ if (yych == 'r') goto yy697;
goto yy186;
-yy664:
- YYDEBUG(664, *YYCURSOR);
+yy689:
+ YYDEBUG(689, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy665;
+ if (yych == 'N') goto yy690;
if (yych != 'n') goto yy186;
-yy665:
- YYDEBUG(665, *YYCURSOR);
+yy690:
+ YYDEBUG(690, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy666;
+ if (yych == 'C') goto yy691;
if (yych != 'c') goto yy186;
-yy666:
- YYDEBUG(666, *YYCURSOR);
+yy691:
+ YYDEBUG(691, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy667;
+ if (yych == 'T') goto yy692;
if (yych != 't') goto yy186;
-yy667:
- YYDEBUG(667, *YYCURSOR);
+yy692:
+ YYDEBUG(692, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy668;
+ if (yych == 'I') goto yy693;
if (yych != 'i') goto yy186;
-yy668:
- YYDEBUG(668, *YYCURSOR);
+yy693:
+ YYDEBUG(693, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy669;
+ if (yych == 'O') goto yy694;
if (yych != 'o') goto yy186;
-yy669:
- YYDEBUG(669, *YYCURSOR);
+yy694:
+ YYDEBUG(694, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy670;
+ if (yych == 'N') goto yy695;
if (yych != 'n') goto yy186;
-yy670:
- YYDEBUG(670, *YYCURSOR);
+yy695:
+ YYDEBUG(695, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(671, *YYCURSOR);
+ YYDEBUG(696, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 883 "Zend/zend_language_scanner.l"
+#line 1017 "Zend/zend_language_scanner.l"
{
return T_FUNCTION;
}
-#line 6197 "Zend/zend_language_scanner.c"
-yy672:
- YYDEBUG(672, *YYCURSOR);
+#line 6535 "Zend/zend_language_scanner.c"
+yy697:
+ YYDEBUG(697, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '^') {
if (yych <= '@') {
- if (yych <= '/') goto yy673;
+ if (yych <= '/') goto yy698;
if (yych <= '9') goto yy185;
} else {
- if (yych == 'E') goto yy674;
+ if (yych == 'E') goto yy699;
if (yych <= 'Z') goto yy185;
}
} else {
if (yych <= 'd') {
if (yych != '`') goto yy185;
} else {
- if (yych <= 'e') goto yy674;
+ if (yych <= 'e') goto yy699;
if (yych <= 'z') goto yy185;
if (yych >= 0x7F) goto yy185;
}
}
-yy673:
- YYDEBUG(673, *YYCURSOR);
+yy698:
+ YYDEBUG(698, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 935 "Zend/zend_language_scanner.l"
+#line 1069 "Zend/zend_language_scanner.l"
{
return T_FOR;
}
-#line 6225 "Zend/zend_language_scanner.c"
-yy674:
- YYDEBUG(674, *YYCURSOR);
+#line 6563 "Zend/zend_language_scanner.c"
+yy699:
+ YYDEBUG(699, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy675;
+ if (yych == 'A') goto yy700;
if (yych != 'a') goto yy186;
-yy675:
- YYDEBUG(675, *YYCURSOR);
+yy700:
+ YYDEBUG(700, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy676;
+ if (yych == 'C') goto yy701;
if (yych != 'c') goto yy186;
-yy676:
- YYDEBUG(676, *YYCURSOR);
+yy701:
+ YYDEBUG(701, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy677;
+ if (yych == 'H') goto yy702;
if (yych != 'h') goto yy186;
-yy677:
- YYDEBUG(677, *YYCURSOR);
+yy702:
+ YYDEBUG(702, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(678, *YYCURSOR);
+ YYDEBUG(703, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 943 "Zend/zend_language_scanner.l"
+#line 1077 "Zend/zend_language_scanner.l"
{
return T_FOREACH;
}
-#line 6253 "Zend/zend_language_scanner.c"
-yy679:
- YYDEBUG(679, *YYCURSOR);
+#line 6591 "Zend/zend_language_scanner.c"
+yy704:
+ YYDEBUG(704, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy680;
+ if (yych == 'A') goto yy705;
if (yych != 'a') goto yy186;
-yy680:
- YYDEBUG(680, *YYCURSOR);
+yy705:
+ YYDEBUG(705, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy681;
+ if (yych == 'L') goto yy706;
if (yych != 'l') goto yy186;
-yy681:
- YYDEBUG(681, *YYCURSOR);
+yy706:
+ YYDEBUG(706, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(682, *YYCURSOR);
+ YYDEBUG(707, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1153 "Zend/zend_language_scanner.l"
+#line 1291 "Zend/zend_language_scanner.l"
{
return T_FINAL;
}
-#line 6276 "Zend/zend_language_scanner.c"
-yy683:
- YYDEBUG(683, *YYCURSOR);
+#line 6614 "Zend/zend_language_scanner.c"
+yy708:
+ YYDEBUG(708, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'F') {
- if (yych == 'C') goto yy689;
+ if (yych == 'C') goto yy714;
if (yych <= 'E') goto yy186;
- goto yy690;
+ goto yy715;
} else {
if (yych <= 'c') {
if (yych <= 'b') goto yy186;
- goto yy689;
+ goto yy714;
} else {
- if (yych == 'f') goto yy690;
+ if (yych == 'f') goto yy715;
goto yy186;
}
}
-yy684:
- YYDEBUG(684, *YYCURSOR);
+yy709:
+ YYDEBUG(709, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy687;
- if (yych == 'e') goto yy687;
+ if (yych == 'E') goto yy712;
+ if (yych == 'e') goto yy712;
goto yy186;
-yy685:
- YYDEBUG(685, *YYCURSOR);
+yy710:
+ YYDEBUG(710, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(686, *YYCURSOR);
+ YYDEBUG(711, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 931 "Zend/zend_language_scanner.l"
+#line 1065 "Zend/zend_language_scanner.l"
{
return T_DO;
}
-#line 6311 "Zend/zend_language_scanner.c"
-yy687:
- YYDEBUG(687, *YYCURSOR);
+#line 6649 "Zend/zend_language_scanner.c"
+yy712:
+ YYDEBUG(712, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(688, *YYCURSOR);
+ YYDEBUG(713, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 879 "Zend/zend_language_scanner.l"
+#line 1013 "Zend/zend_language_scanner.l"
{
return T_EXIT;
}
-#line 6324 "Zend/zend_language_scanner.c"
-yy689:
- YYDEBUG(689, *YYCURSOR);
+#line 6662 "Zend/zend_language_scanner.c"
+yy714:
+ YYDEBUG(714, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy696;
- if (yych == 'l') goto yy696;
+ if (yych == 'L') goto yy721;
+ if (yych == 'l') goto yy721;
goto yy186;
-yy690:
- YYDEBUG(690, *YYCURSOR);
+yy715:
+ YYDEBUG(715, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy691;
+ if (yych == 'A') goto yy716;
if (yych != 'a') goto yy186;
-yy691:
- YYDEBUG(691, *YYCURSOR);
+yy716:
+ YYDEBUG(716, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'U') goto yy692;
+ if (yych == 'U') goto yy717;
if (yych != 'u') goto yy186;
-yy692:
- YYDEBUG(692, *YYCURSOR);
+yy717:
+ YYDEBUG(717, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy693;
+ if (yych == 'L') goto yy718;
if (yych != 'l') goto yy186;
-yy693:
- YYDEBUG(693, *YYCURSOR);
+yy718:
+ YYDEBUG(718, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy694;
+ if (yych == 'T') goto yy719;
if (yych != 't') goto yy186;
-yy694:
- YYDEBUG(694, *YYCURSOR);
+yy719:
+ YYDEBUG(719, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(695, *YYCURSOR);
+ YYDEBUG(720, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 979 "Zend/zend_language_scanner.l"
+#line 1113 "Zend/zend_language_scanner.l"
{
return T_DEFAULT;
}
-#line 6363 "Zend/zend_language_scanner.c"
-yy696:
- YYDEBUG(696, *YYCURSOR);
+#line 6701 "Zend/zend_language_scanner.c"
+yy721:
+ YYDEBUG(721, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy697;
+ if (yych == 'A') goto yy722;
if (yych != 'a') goto yy186;
-yy697:
- YYDEBUG(697, *YYCURSOR);
+yy722:
+ YYDEBUG(722, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy698;
+ if (yych == 'R') goto yy723;
if (yych != 'r') goto yy186;
-yy698:
- YYDEBUG(698, *YYCURSOR);
+yy723:
+ YYDEBUG(723, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy699;
+ if (yych == 'E') goto yy724;
if (yych != 'e') goto yy186;
-yy699:
- YYDEBUG(699, *YYCURSOR);
+yy724:
+ YYDEBUG(724, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(700, *YYCURSOR);
+ YYDEBUG(725, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 951 "Zend/zend_language_scanner.l"
+#line 1085 "Zend/zend_language_scanner.l"
{
return T_DECLARE;
}
-#line 6391 "Zend/zend_language_scanner.c"
-yy701:
- YYDEBUG(701, *YYCURSOR);
+#line 6729 "Zend/zend_language_scanner.c"
+yy726:
+ YYDEBUG(726, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy763;
- if (yych == 'h') goto yy763;
+ if (yych == 'H') goto yy788;
+ if (yych == 'h') goto yy788;
goto yy186;
-yy702:
- YYDEBUG(702, *YYCURSOR);
+yy727:
+ YYDEBUG(727, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy757;
- if (yych == 's') goto yy757;
+ if (yych == 'S') goto yy782;
+ if (yych == 's') goto yy782;
goto yy186;
-yy703:
- YYDEBUG(703, *YYCURSOR);
+yy728:
+ YYDEBUG(728, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'P') goto yy753;
- if (yych == 'p') goto yy753;
+ if (yych == 'P') goto yy778;
+ if (yych == 'p') goto yy778;
goto yy186;
-yy704:
- YYDEBUG(704, *YYCURSOR);
+yy729:
+ YYDEBUG(729, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'D') goto yy719;
- if (yych == 'd') goto yy719;
+ if (yych == 'D') goto yy744;
+ if (yych == 'd') goto yy744;
goto yy186;
-yy705:
- YYDEBUG(705, *YYCURSOR);
+yy730:
+ YYDEBUG(730, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy716;
- if (yych == 'a') goto yy716;
+ if (yych == 'A') goto yy741;
+ if (yych == 'a') goto yy741;
goto yy186;
-yy706:
- YYDEBUG(706, *YYCURSOR);
+yy731:
+ YYDEBUG(731, *YYCURSOR);
yych = *++YYCURSOR;
if (yych <= 'T') {
- if (yych == 'I') goto yy707;
+ if (yych == 'I') goto yy732;
if (yych <= 'S') goto yy186;
- goto yy708;
+ goto yy733;
} else {
if (yych <= 'i') {
if (yych <= 'h') goto yy186;
} else {
- if (yych == 't') goto yy708;
+ if (yych == 't') goto yy733;
goto yy186;
}
}
-yy707:
- YYDEBUG(707, *YYCURSOR);
+yy732:
+ YYDEBUG(732, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy714;
- if (yych == 't') goto yy714;
+ if (yych == 'T') goto yy739;
+ if (yych == 't') goto yy739;
goto yy186;
-yy708:
- YYDEBUG(708, *YYCURSOR);
+yy733:
+ YYDEBUG(733, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy709;
+ if (yych == 'E') goto yy734;
if (yych != 'e') goto yy186;
-yy709:
- YYDEBUG(709, *YYCURSOR);
+yy734:
+ YYDEBUG(734, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'N') goto yy710;
+ if (yych == 'N') goto yy735;
if (yych != 'n') goto yy186;
-yy710:
- YYDEBUG(710, *YYCURSOR);
+yy735:
+ YYDEBUG(735, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'D') goto yy711;
+ if (yych == 'D') goto yy736;
if (yych != 'd') goto yy186;
-yy711:
- YYDEBUG(711, *YYCURSOR);
+yy736:
+ YYDEBUG(736, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'S') goto yy712;
+ if (yych == 'S') goto yy737;
if (yych != 's') goto yy186;
-yy712:
- YYDEBUG(712, *YYCURSOR);
+yy737:
+ YYDEBUG(737, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(713, *YYCURSOR);
+ YYDEBUG(738, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1011 "Zend/zend_language_scanner.l"
+#line 1149 "Zend/zend_language_scanner.l"
{
return T_EXTENDS;
}
-#line 6475 "Zend/zend_language_scanner.c"
-yy714:
- YYDEBUG(714, *YYCURSOR);
+#line 6813 "Zend/zend_language_scanner.c"
+yy739:
+ YYDEBUG(739, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(715, *YYCURSOR);
+ YYDEBUG(740, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 875 "Zend/zend_language_scanner.l"
+#line 1009 "Zend/zend_language_scanner.l"
{
return T_EXIT;
}
-#line 6488 "Zend/zend_language_scanner.c"
-yy716:
- YYDEBUG(716, *YYCURSOR);
+#line 6826 "Zend/zend_language_scanner.c"
+yy741:
+ YYDEBUG(741, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy717;
+ if (yych == 'L') goto yy742;
if (yych != 'l') goto yy186;
-yy717:
- YYDEBUG(717, *YYCURSOR);
+yy742:
+ YYDEBUG(742, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(718, *YYCURSOR);
+ YYDEBUG(743, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1101 "Zend/zend_language_scanner.l"
+#line 1235 "Zend/zend_language_scanner.l"
{
return T_EVAL;
}
-#line 6506 "Zend/zend_language_scanner.c"
-yy719:
- YYDEBUG(719, *YYCURSOR);
+#line 6844 "Zend/zend_language_scanner.c"
+yy744:
+ YYDEBUG(744, *YYCURSOR);
yych = *++YYCURSOR;
YYDEBUG(-1, yych);
switch (yych) {
case 'D':
- case 'd': goto yy720;
+ case 'd': goto yy745;
case 'F':
- case 'f': goto yy721;
+ case 'f': goto yy746;
case 'I':
- case 'i': goto yy722;
+ case 'i': goto yy747;
case 'S':
- case 's': goto yy723;
+ case 's': goto yy748;
case 'W':
- case 'w': goto yy724;
+ case 'w': goto yy749;
default: goto yy186;
}
-yy720:
- YYDEBUG(720, *YYCURSOR);
+yy745:
+ YYDEBUG(745, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy746;
- if (yych == 'e') goto yy746;
+ if (yych == 'E') goto yy771;
+ if (yych == 'e') goto yy771;
goto yy186;
-yy721:
- YYDEBUG(721, *YYCURSOR);
+yy746:
+ YYDEBUG(746, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy738;
- if (yych == 'o') goto yy738;
+ if (yych == 'O') goto yy763;
+ if (yych == 'o') goto yy763;
goto yy186;
-yy722:
- YYDEBUG(722, *YYCURSOR);
+yy747:
+ YYDEBUG(747, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'F') goto yy736;
- if (yych == 'f') goto yy736;
+ if (yych == 'F') goto yy761;
+ if (yych == 'f') goto yy761;
goto yy186;
-yy723:
- YYDEBUG(723, *YYCURSOR);
+yy748:
+ YYDEBUG(748, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'W') goto yy730;
- if (yych == 'w') goto yy730;
+ if (yych == 'W') goto yy755;
+ if (yych == 'w') goto yy755;
goto yy186;
-yy724:
- YYDEBUG(724, *YYCURSOR);
+yy749:
+ YYDEBUG(749, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy725;
+ if (yych == 'H') goto yy750;
if (yych != 'h') goto yy186;
-yy725:
- YYDEBUG(725, *YYCURSOR);
+yy750:
+ YYDEBUG(750, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy726;
+ if (yych == 'I') goto yy751;
if (yych != 'i') goto yy186;
-yy726:
- YYDEBUG(726, *YYCURSOR);
+yy751:
+ YYDEBUG(751, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy727;
+ if (yych == 'L') goto yy752;
if (yych != 'l') goto yy186;
-yy727:
- YYDEBUG(727, *YYCURSOR);
+yy752:
+ YYDEBUG(752, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy728;
+ if (yych == 'E') goto yy753;
if (yych != 'e') goto yy186;
-yy728:
- YYDEBUG(728, *YYCURSOR);
+yy753:
+ YYDEBUG(753, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(729, *YYCURSOR);
+ YYDEBUG(754, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 927 "Zend/zend_language_scanner.l"
+#line 1061 "Zend/zend_language_scanner.l"
{
return T_ENDWHILE;
}
-#line 6580 "Zend/zend_language_scanner.c"
-yy730:
- YYDEBUG(730, *YYCURSOR);
+#line 6918 "Zend/zend_language_scanner.c"
+yy755:
+ YYDEBUG(755, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'I') goto yy731;
+ if (yych == 'I') goto yy756;
if (yych != 'i') goto yy186;
-yy731:
- YYDEBUG(731, *YYCURSOR);
+yy756:
+ YYDEBUG(756, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy732;
+ if (yych == 'T') goto yy757;
if (yych != 't') goto yy186;
-yy732:
- YYDEBUG(732, *YYCURSOR);
+yy757:
+ YYDEBUG(757, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy733;
+ if (yych == 'C') goto yy758;
if (yych != 'c') goto yy186;
-yy733:
- YYDEBUG(733, *YYCURSOR);
+yy758:
+ YYDEBUG(758, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy734;
+ if (yych == 'H') goto yy759;
if (yych != 'h') goto yy186;
-yy734:
- YYDEBUG(734, *YYCURSOR);
+yy759:
+ YYDEBUG(759, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(735, *YYCURSOR);
+ YYDEBUG(760, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 971 "Zend/zend_language_scanner.l"
+#line 1105 "Zend/zend_language_scanner.l"
{
return T_ENDSWITCH;
}
-#line 6613 "Zend/zend_language_scanner.c"
-yy736:
- YYDEBUG(736, *YYCURSOR);
+#line 6951 "Zend/zend_language_scanner.c"
+yy761:
+ YYDEBUG(761, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(737, *YYCURSOR);
+ YYDEBUG(762, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 915 "Zend/zend_language_scanner.l"
+#line 1049 "Zend/zend_language_scanner.l"
{
return T_ENDIF;
}
-#line 6626 "Zend/zend_language_scanner.c"
-yy738:
- YYDEBUG(738, *YYCURSOR);
+#line 6964 "Zend/zend_language_scanner.c"
+yy763:
+ YYDEBUG(763, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy739;
+ if (yych == 'R') goto yy764;
if (yych != 'r') goto yy186;
-yy739:
- YYDEBUG(739, *YYCURSOR);
+yy764:
+ YYDEBUG(764, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '^') {
if (yych <= '@') {
- if (yych <= '/') goto yy740;
+ if (yych <= '/') goto yy765;
if (yych <= '9') goto yy185;
} else {
- if (yych == 'E') goto yy741;
+ if (yych == 'E') goto yy766;
if (yych <= 'Z') goto yy185;
}
} else {
if (yych <= 'd') {
if (yych != '`') goto yy185;
} else {
- if (yych <= 'e') goto yy741;
+ if (yych <= 'e') goto yy766;
if (yych <= 'z') goto yy185;
if (yych >= 0x7F) goto yy185;
}
}
-yy740:
- YYDEBUG(740, *YYCURSOR);
+yy765:
+ YYDEBUG(765, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 939 "Zend/zend_language_scanner.l"
+#line 1073 "Zend/zend_language_scanner.l"
{
return T_ENDFOR;
}
-#line 6659 "Zend/zend_language_scanner.c"
-yy741:
- YYDEBUG(741, *YYCURSOR);
+#line 6997 "Zend/zend_language_scanner.c"
+yy766:
+ YYDEBUG(766, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy742;
+ if (yych == 'A') goto yy767;
if (yych != 'a') goto yy186;
-yy742:
- YYDEBUG(742, *YYCURSOR);
+yy767:
+ YYDEBUG(767, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy743;
+ if (yych == 'C') goto yy768;
if (yych != 'c') goto yy186;
-yy743:
- YYDEBUG(743, *YYCURSOR);
+yy768:
+ YYDEBUG(768, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'H') goto yy744;
+ if (yych == 'H') goto yy769;
if (yych != 'h') goto yy186;
-yy744:
- YYDEBUG(744, *YYCURSOR);
+yy769:
+ YYDEBUG(769, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(745, *YYCURSOR);
+ YYDEBUG(770, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 947 "Zend/zend_language_scanner.l"
+#line 1081 "Zend/zend_language_scanner.l"
{
return T_ENDFOREACH;
}
-#line 6687 "Zend/zend_language_scanner.c"
-yy746:
- YYDEBUG(746, *YYCURSOR);
+#line 7025 "Zend/zend_language_scanner.c"
+yy771:
+ YYDEBUG(771, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'C') goto yy747;
+ if (yych == 'C') goto yy772;
if (yych != 'c') goto yy186;
-yy747:
- YYDEBUG(747, *YYCURSOR);
+yy772:
+ YYDEBUG(772, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'L') goto yy748;
+ if (yych == 'L') goto yy773;
if (yych != 'l') goto yy186;
-yy748:
- YYDEBUG(748, *YYCURSOR);
+yy773:
+ YYDEBUG(773, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'A') goto yy749;
+ if (yych == 'A') goto yy774;
if (yych != 'a') goto yy186;
-yy749:
- YYDEBUG(749, *YYCURSOR);
+yy774:
+ YYDEBUG(774, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'R') goto yy750;
+ if (yych == 'R') goto yy775;
if (yych != 'r') goto yy186;
-yy750:
- YYDEBUG(750, *YYCURSOR);
+yy775:
+ YYDEBUG(775, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy751;
+ if (yych == 'E') goto yy776;
if (yych != 'e') goto yy186;
-yy751:
- YYDEBUG(751, *YYCURSOR);
+yy776:
+ YYDEBUG(776, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(752, *YYCURSOR);
+ YYDEBUG(777, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 955 "Zend/zend_language_scanner.l"
+#line 1089 "Zend/zend_language_scanner.l"
{
return T_ENDDECLARE;
}
-#line 6725 "Zend/zend_language_scanner.c"
-yy753:
- YYDEBUG(753, *YYCURSOR);
+#line 7063 "Zend/zend_language_scanner.c"
+yy778:
+ YYDEBUG(778, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'T') goto yy754;
+ if (yych == 'T') goto yy779;
if (yych != 't') goto yy186;
-yy754:
- YYDEBUG(754, *YYCURSOR);
+yy779:
+ YYDEBUG(779, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'Y') goto yy755;
+ if (yych == 'Y') goto yy780;
if (yych != 'y') goto yy186;
-yy755:
- YYDEBUG(755, *YYCURSOR);
+yy780:
+ YYDEBUG(780, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(756, *YYCURSOR);
+ YYDEBUG(781, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1137 "Zend/zend_language_scanner.l"
+#line 1275 "Zend/zend_language_scanner.l"
{
return T_EMPTY;
}
-#line 6748 "Zend/zend_language_scanner.c"
-yy757:
- YYDEBUG(757, *YYCURSOR);
+#line 7086 "Zend/zend_language_scanner.c"
+yy782:
+ YYDEBUG(782, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'E') goto yy758;
+ if (yych == 'E') goto yy783;
if (yych != 'e') goto yy186;
-yy758:
- YYDEBUG(758, *YYCURSOR);
+yy783:
+ YYDEBUG(783, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '^') {
if (yych <= '@') {
- if (yych <= '/') goto yy759;
+ if (yych <= '/') goto yy784;
if (yych <= '9') goto yy185;
} else {
- if (yych == 'I') goto yy760;
+ if (yych == 'I') goto yy785;
if (yych <= 'Z') goto yy185;
}
} else {
if (yych <= 'h') {
if (yych != '`') goto yy185;
} else {
- if (yych <= 'i') goto yy760;
+ if (yych <= 'i') goto yy785;
if (yych <= 'z') goto yy185;
if (yych >= 0x7F) goto yy185;
}
}
-yy759:
- YYDEBUG(759, *YYCURSOR);
+yy784:
+ YYDEBUG(784, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 919 "Zend/zend_language_scanner.l"
+#line 1053 "Zend/zend_language_scanner.l"
{
return T_ELSE;
}
-#line 6781 "Zend/zend_language_scanner.c"
-yy760:
- YYDEBUG(760, *YYCURSOR);
+#line 7119 "Zend/zend_language_scanner.c"
+yy785:
+ YYDEBUG(785, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'F') goto yy761;
+ if (yych == 'F') goto yy786;
if (yych != 'f') goto yy186;
-yy761:
- YYDEBUG(761, *YYCURSOR);
+yy786:
+ YYDEBUG(786, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(762, *YYCURSOR);
+ YYDEBUG(787, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 911 "Zend/zend_language_scanner.l"
+#line 1045 "Zend/zend_language_scanner.l"
{
return T_ELSEIF;
}
-#line 6799 "Zend/zend_language_scanner.c"
-yy763:
- YYDEBUG(763, *YYCURSOR);
+#line 7137 "Zend/zend_language_scanner.c"
+yy788:
+ YYDEBUG(788, *YYCURSOR);
yych = *++YYCURSOR;
- if (yych == 'O') goto yy764;
+ if (yych == 'O') goto yy789;
if (yych != 'o') goto yy186;
-yy764:
- YYDEBUG(764, *YYCURSOR);
+yy789:
+ YYDEBUG(789, *YYCURSOR);
++YYCURSOR;
- if (yybm[0+(yych = *YYCURSOR)] & 8) {
+ if (yybm[0+(yych = *YYCURSOR)] & 4) {
goto yy185;
}
- YYDEBUG(765, *YYCURSOR);
+ YYDEBUG(790, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 995 "Zend/zend_language_scanner.l"
+#line 1129 "Zend/zend_language_scanner.l"
{
return T_ECHO;
}
-#line 6817 "Zend/zend_language_scanner.c"
+#line 7155 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_LOOKING_FOR_PROPERTY:
@@ -6852,41 +7190,41 @@ yyc_ST_LOOKING_FOR_PROPERTY:
64, 64, 64, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 64, 64, 64,
};
- YYDEBUG(766, *YYCURSOR);
+ YYDEBUG(791, *YYCURSOR);
YYFILL(2);
yych = *YYCURSOR;
if (yych <= '-') {
if (yych <= '\r') {
- if (yych <= 0x08) goto yy774;
- if (yych <= '\n') goto yy768;
- if (yych <= '\f') goto yy774;
+ if (yych <= 0x08) goto yy799;
+ if (yych <= '\n') goto yy793;
+ if (yych <= '\f') goto yy799;
} else {
- if (yych == ' ') goto yy768;
- if (yych <= ',') goto yy774;
- goto yy770;
+ if (yych == ' ') goto yy793;
+ if (yych <= ',') goto yy799;
+ goto yy795;
}
} else {
if (yych <= '_') {
- if (yych <= '@') goto yy774;
- if (yych <= 'Z') goto yy772;
- if (yych <= '^') goto yy774;
- goto yy772;
+ if (yych <= '@') goto yy799;
+ if (yych <= 'Z') goto yy797;
+ if (yych <= '^') goto yy799;
+ goto yy797;
} else {
- if (yych <= '`') goto yy774;
- if (yych <= 'z') goto yy772;
- if (yych <= '~') goto yy774;
- goto yy772;
+ if (yych <= '`') goto yy799;
+ if (yych <= 'z') goto yy797;
+ if (yych <= '~') goto yy799;
+ goto yy797;
}
}
-yy768:
- YYDEBUG(768, *YYCURSOR);
+yy793:
+ YYDEBUG(793, *YYCURSOR);
++YYCURSOR;
yych = *YYCURSOR;
- goto yy780;
-yy769:
- YYDEBUG(769, *YYCURSOR);
+ goto yy805;
+yy794:
+ YYDEBUG(794, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1024 "Zend/zend_language_scanner.l"
+#line 1162 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -6894,73 +7232,73 @@ yy769:
HANDLE_NEWLINES(yytext, yyleng);
return T_WHITESPACE;
}
-#line 6898 "Zend/zend_language_scanner.c"
-yy770:
- YYDEBUG(770, *YYCURSOR);
+#line 7236 "Zend/zend_language_scanner.c"
+yy795:
+ YYDEBUG(795, *YYCURSOR);
++YYCURSOR;
- if ((yych = *YYCURSOR) == '>') goto yy777;
-yy771:
- YYDEBUG(771, *YYCURSOR);
+ if ((yych = *YYCURSOR) == '>') goto yy802;
+yy796:
+ YYDEBUG(796, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1043 "Zend/zend_language_scanner.l"
+#line 1181 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state(TSRMLS_C);
goto restart;
}
-#line 6912 "Zend/zend_language_scanner.c"
-yy772:
- YYDEBUG(772, *YYCURSOR);
+#line 7250 "Zend/zend_language_scanner.c"
+yy797:
+ YYDEBUG(797, *YYCURSOR);
++YYCURSOR;
yych = *YYCURSOR;
- goto yy776;
-yy773:
- YYDEBUG(773, *YYCURSOR);
+ goto yy801;
+yy798:
+ YYDEBUG(798, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1036 "Zend/zend_language_scanner.l"
+#line 1174 "Zend/zend_language_scanner.l"
{
yy_pop_state(TSRMLS_C);
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 6928 "Zend/zend_language_scanner.c"
-yy774:
- YYDEBUG(774, *YYCURSOR);
+#line 7266 "Zend/zend_language_scanner.c"
+yy799:
+ YYDEBUG(799, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy771;
-yy775:
- YYDEBUG(775, *YYCURSOR);
+ goto yy796;
+yy800:
+ YYDEBUG(800, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy776:
- YYDEBUG(776, *YYCURSOR);
+yy801:
+ YYDEBUG(801, *YYCURSOR);
if (yybm[0+yych] & 64) {
- goto yy775;
+ goto yy800;
}
- goto yy773;
-yy777:
- YYDEBUG(777, *YYCURSOR);
+ goto yy798;
+yy802:
+ YYDEBUG(802, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(778, *YYCURSOR);
+ YYDEBUG(803, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1032 "Zend/zend_language_scanner.l"
+#line 1170 "Zend/zend_language_scanner.l"
{
return T_OBJECT_OPERATOR;
}
-#line 6953 "Zend/zend_language_scanner.c"
-yy779:
- YYDEBUG(779, *YYCURSOR);
+#line 7291 "Zend/zend_language_scanner.c"
+yy804:
+ YYDEBUG(804, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy780:
- YYDEBUG(780, *YYCURSOR);
+yy805:
+ YYDEBUG(805, *YYCURSOR);
if (yybm[0+yych] & 128) {
- goto yy779;
+ goto yy804;
}
- goto yy769;
+ goto yy794;
}
/* *********************************** */
yyc_ST_LOOKING_FOR_VARNAME:
@@ -6999,27 +7337,27 @@ yyc_ST_LOOKING_FOR_VARNAME:
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
};
- YYDEBUG(781, *YYCURSOR);
+ YYDEBUG(806, *YYCURSOR);
YYFILL(2);
yych = *YYCURSOR;
if (yych <= '_') {
- if (yych <= '@') goto yy785;
- if (yych <= 'Z') goto yy783;
- if (yych <= '^') goto yy785;
+ if (yych <= '@') goto yy810;
+ if (yych <= 'Z') goto yy808;
+ if (yych <= '^') goto yy810;
} else {
- if (yych <= '`') goto yy785;
- if (yych <= 'z') goto yy783;
- if (yych <= '~') goto yy785;
+ if (yych <= '`') goto yy810;
+ if (yych <= 'z') goto yy808;
+ if (yych <= '~') goto yy810;
}
-yy783:
- YYDEBUG(783, *YYCURSOR);
+yy808:
+ YYDEBUG(808, *YYCURSOR);
++YYCURSOR;
yych = *YYCURSOR;
- goto yy788;
-yy784:
- YYDEBUG(784, *YYCURSOR);
+ goto yy813;
+yy809:
+ YYDEBUG(809, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1315 "Zend/zend_language_scanner.l"
+#line 1457 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
@@ -7027,42 +7365,42 @@ yy784:
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
return T_STRING_VARNAME;
}
-#line 7031 "Zend/zend_language_scanner.c"
-yy785:
- YYDEBUG(785, *YYCURSOR);
+#line 7369 "Zend/zend_language_scanner.c"
+yy810:
+ YYDEBUG(810, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(786, *YYCURSOR);
+ YYDEBUG(811, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1324 "Zend/zend_language_scanner.l"
+#line 1466 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state(TSRMLS_C);
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
goto restart;
}
-#line 7044 "Zend/zend_language_scanner.c"
-yy787:
- YYDEBUG(787, *YYCURSOR);
+#line 7382 "Zend/zend_language_scanner.c"
+yy812:
+ YYDEBUG(812, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy788:
- YYDEBUG(788, *YYCURSOR);
+yy813:
+ YYDEBUG(813, *YYCURSOR);
if (yybm[0+yych] & 128) {
- goto yy787;
+ goto yy812;
}
- goto yy784;
+ goto yy809;
}
/* *********************************** */
yyc_ST_NOWDOC:
- YYDEBUG(789, *YYCURSOR);
+ YYDEBUG(814, *YYCURSOR);
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(791, *YYCURSOR);
+ YYDEBUG(816, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(792, *YYCURSOR);
+ YYDEBUG(817, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2158 "Zend/zend_language_scanner.l"
+#line 2340 "Zend/zend_language_scanner.l"
{
int newline = 0;
@@ -7117,7 +7455,7 @@ nowdoc_scan_done:
HANDLE_NEWLINES(yytext, yyleng - newline);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 7121 "Zend/zend_language_scanner.c"
+#line 7459 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_VAR_OFFSET:
{
@@ -7128,96 +7466,103 @@ yyc_ST_VAR_OFFSET:
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
- 224, 224, 224, 224, 224, 224, 224, 224,
- 224, 224, 0, 0, 0, 0, 0, 0,
- 0, 160, 160, 160, 160, 160, 160, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 0, 0, 0, 0, 32,
- 0, 160, 160, 160, 160, 160, 160, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 0, 0, 0, 0, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32,
+ 240, 240, 112, 112, 112, 112, 112, 112,
+ 112, 112, 0, 0, 0, 0, 0, 0,
+ 0, 80, 80, 80, 80, 80, 80, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 0, 0, 0, 0, 16,
+ 0, 80, 80, 80, 80, 80, 80, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 0, 0, 0, 0, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16,
};
- YYDEBUG(793, *YYCURSOR);
+ YYDEBUG(818, *YYCURSOR);
YYFILL(3);
yych = *YYCURSOR;
if (yych <= '/') {
if (yych <= ' ') {
if (yych <= '\f') {
- if (yych <= 0x08) goto yy807;
- if (yych <= '\n') goto yy803;
- goto yy807;
+ if (yych <= 0x08) goto yy832;
+ if (yych <= '\n') goto yy828;
+ goto yy832;
} else {
- if (yych <= '\r') goto yy803;
- if (yych <= 0x1F) goto yy807;
- goto yy803;
+ if (yych <= '\r') goto yy828;
+ if (yych <= 0x1F) goto yy832;
+ goto yy828;
}
} else {
if (yych <= '$') {
- if (yych <= '"') goto yy802;
- if (yych <= '#') goto yy803;
- goto yy798;
+ if (yych <= '"') goto yy827;
+ if (yych <= '#') goto yy828;
+ goto yy823;
} else {
- if (yych == '\'') goto yy803;
- goto yy802;
+ if (yych == '\'') goto yy828;
+ goto yy827;
}
}
} else {
if (yych <= '\\') {
if (yych <= '@') {
- if (yych <= '0') goto yy795;
- if (yych <= '9') goto yy797;
- goto yy802;
+ if (yych <= '0') goto yy820;
+ if (yych <= '9') goto yy822;
+ goto yy827;
} else {
- if (yych <= 'Z') goto yy805;
- if (yych <= '[') goto yy802;
- goto yy803;
+ if (yych <= 'Z') goto yy830;
+ if (yych <= '[') goto yy827;
+ goto yy828;
}
} else {
if (yych <= '_') {
- if (yych <= ']') goto yy800;
- if (yych <= '^') goto yy802;
- goto yy805;
+ if (yych <= ']') goto yy825;
+ if (yych <= '^') goto yy827;
+ goto yy830;
} else {
- if (yych <= '`') goto yy802;
- if (yych <= 'z') goto yy805;
- if (yych <= '~') goto yy802;
- goto yy805;
+ if (yych <= '`') goto yy827;
+ if (yych <= 'z') goto yy830;
+ if (yych <= '~') goto yy827;
+ goto yy830;
}
}
}
-yy795:
- YYDEBUG(795, *YYCURSOR);
+yy820:
+ YYDEBUG(820, *YYCURSOR);
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= 'W') {
- if (yych <= '/') goto yy796;
- if (yych <= '9') goto yy818;
+ if (yych <= '9') {
+ if (yych >= '0') goto yy844;
+ } else {
+ if (yych == 'B') goto yy841;
+ }
} else {
- if (yych <= 'X') goto yy816;
- if (yych == 'x') goto yy816;
+ if (yych <= 'b') {
+ if (yych <= 'X') goto yy843;
+ if (yych >= 'b') goto yy841;
+ } else {
+ if (yych == 'x') goto yy843;
+ }
}
-yy796:
- YYDEBUG(796, *YYCURSOR);
+yy821:
+ YYDEBUG(821, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1374 "Zend/zend_language_scanner.l"
+#line 1536 "Zend/zend_language_scanner.l"
{ /* Offset could be treated as a long */
if (yyleng < MAX_LENGTH_OF_LONG - 1 || (yyleng == MAX_LENGTH_OF_LONG - 1 && strcmp(yytext, long_min_digits) < 0)) {
zendlval->value.lval = strtol(yytext, NULL, 10);
@@ -7229,81 +7574,81 @@ yy796:
}
return T_NUM_STRING;
}
-#line 7233 "Zend/zend_language_scanner.c"
-yy797:
- YYDEBUG(797, *YYCURSOR);
+#line 7578 "Zend/zend_language_scanner.c"
+yy822:
+ YYDEBUG(822, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy815;
-yy798:
- YYDEBUG(798, *YYCURSOR);
+ goto yy840;
+yy823:
+ YYDEBUG(823, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) <= '_') {
- if (yych <= '@') goto yy799;
- if (yych <= 'Z') goto yy811;
- if (yych >= '_') goto yy811;
+ if (yych <= '@') goto yy824;
+ if (yych <= 'Z') goto yy836;
+ if (yych >= '_') goto yy836;
} else {
- if (yych <= '`') goto yy799;
- if (yych <= 'z') goto yy811;
- if (yych >= 0x7F) goto yy811;
+ if (yych <= '`') goto yy824;
+ if (yych <= 'z') goto yy836;
+ if (yych >= 0x7F) goto yy836;
}
-yy799:
- YYDEBUG(799, *YYCURSOR);
+yy824:
+ YYDEBUG(824, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1684 "Zend/zend_language_scanner.l"
+#line 1868 "Zend/zend_language_scanner.l"
{
/* Only '[' can be valid, but returning other tokens will allow a more explicit parse error */
return yytext[0];
}
-#line 7258 "Zend/zend_language_scanner.c"
-yy800:
- YYDEBUG(800, *YYCURSOR);
+#line 7603 "Zend/zend_language_scanner.c"
+yy825:
+ YYDEBUG(825, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(801, *YYCURSOR);
+ YYDEBUG(826, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1679 "Zend/zend_language_scanner.l"
+#line 1863 "Zend/zend_language_scanner.l"
{
yy_pop_state(TSRMLS_C);
return ']';
}
-#line 7269 "Zend/zend_language_scanner.c"
-yy802:
- YYDEBUG(802, *YYCURSOR);
+#line 7614 "Zend/zend_language_scanner.c"
+yy827:
+ YYDEBUG(827, *YYCURSOR);
yych = *++YYCURSOR;
- goto yy799;
-yy803:
- YYDEBUG(803, *YYCURSOR);
+ goto yy824;
+yy828:
+ YYDEBUG(828, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(804, *YYCURSOR);
+ YYDEBUG(829, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1689 "Zend/zend_language_scanner.l"
+#line 1873 "Zend/zend_language_scanner.l"
{
/* Invalid rule to return a more explicit parse error with proper line number */
yyless(0);
yy_pop_state(TSRMLS_C);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 7286 "Zend/zend_language_scanner.c"
-yy805:
- YYDEBUG(805, *YYCURSOR);
+#line 7631 "Zend/zend_language_scanner.c"
+yy830:
+ YYDEBUG(830, *YYCURSOR);
++YYCURSOR;
yych = *YYCURSOR;
- goto yy810;
-yy806:
- YYDEBUG(806, *YYCURSOR);
+ goto yy835;
+yy831:
+ YYDEBUG(831, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1696 "Zend/zend_language_scanner.l"
+#line 1880 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 7301 "Zend/zend_language_scanner.c"
-yy807:
- YYDEBUG(807, *YYCURSOR);
+#line 7646 "Zend/zend_language_scanner.c"
+yy832:
+ YYDEBUG(832, *YYCURSOR);
++YYCURSOR;
- YYDEBUG(808, *YYCURSOR);
+ YYDEBUG(833, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2214 "Zend/zend_language_scanner.l"
+#line 2396 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -7312,100 +7657,118 @@ yy807:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 7316 "Zend/zend_language_scanner.c"
-yy809:
- YYDEBUG(809, *YYCURSOR);
+#line 7661 "Zend/zend_language_scanner.c"
+yy834:
+ YYDEBUG(834, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy810:
- YYDEBUG(810, *YYCURSOR);
- if (yybm[0+yych] & 32) {
- goto yy809;
+yy835:
+ YYDEBUG(835, *YYCURSOR);
+ if (yybm[0+yych] & 16) {
+ goto yy834;
}
- goto yy806;
-yy811:
- YYDEBUG(811, *YYCURSOR);
+ goto yy831;
+yy836:
+ YYDEBUG(836, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(812, *YYCURSOR);
+ YYDEBUG(837, *YYCURSOR);
if (yych <= '^') {
if (yych <= '9') {
- if (yych >= '0') goto yy811;
+ if (yych >= '0') goto yy836;
} else {
- if (yych <= '@') goto yy813;
- if (yych <= 'Z') goto yy811;
+ if (yych <= '@') goto yy838;
+ if (yych <= 'Z') goto yy836;
}
} else {
if (yych <= '`') {
- if (yych <= '_') goto yy811;
+ if (yych <= '_') goto yy836;
} else {
- if (yych <= 'z') goto yy811;
- if (yych >= 0x7F) goto yy811;
+ if (yych <= 'z') goto yy836;
+ if (yych >= 0x7F) goto yy836;
}
}
-yy813:
- YYDEBUG(813, *YYCURSOR);
+yy838:
+ YYDEBUG(838, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1673 "Zend/zend_language_scanner.l"
+#line 1857 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 7358 "Zend/zend_language_scanner.c"
-yy814:
- YYDEBUG(814, *YYCURSOR);
+#line 7703 "Zend/zend_language_scanner.c"
+yy839:
+ YYDEBUG(839, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
-yy815:
- YYDEBUG(815, *YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy814;
+yy840:
+ YYDEBUG(840, *YYCURSOR);
+ if (yybm[0+yych] & 32) {
+ goto yy839;
}
- goto yy796;
-yy816:
- YYDEBUG(816, *YYCURSOR);
+ goto yy821;
+yy841:
+ YYDEBUG(841, *YYCURSOR);
yych = *++YYCURSOR;
if (yybm[0+yych] & 128) {
- goto yy821;
+ goto yy849;
}
- YYDEBUG(817, *YYCURSOR);
+yy842:
+ YYDEBUG(842, *YYCURSOR);
YYCURSOR = YYMARKER;
- goto yy796;
-yy818:
- YYDEBUG(818, *YYCURSOR);
+ goto yy821;
+yy843:
+ YYDEBUG(843, *YYCURSOR);
+ yych = *++YYCURSOR;
+ if (yybm[0+yych] & 64) {
+ goto yy847;
+ }
+ goto yy842;
+yy844:
+ YYDEBUG(844, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(819, *YYCURSOR);
- if (yych <= '/') goto yy820;
- if (yych <= '9') goto yy818;
-yy820:
- YYDEBUG(820, *YYCURSOR);
+ YYDEBUG(845, *YYCURSOR);
+ if (yych <= '/') goto yy846;
+ if (yych <= '9') goto yy844;
+yy846:
+ YYDEBUG(846, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1386 "Zend/zend_language_scanner.l"
+#line 1548 "Zend/zend_language_scanner.l"
{ /* Offset must be treated as a string */
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
return T_NUM_STRING;
}
-#line 7397 "Zend/zend_language_scanner.c"
-yy821:
- YYDEBUG(821, *YYCURSOR);
+#line 7750 "Zend/zend_language_scanner.c"
+yy847:
+ YYDEBUG(847, *YYCURSOR);
++YYCURSOR;
YYFILL(1);
yych = *YYCURSOR;
- YYDEBUG(822, *YYCURSOR);
+ YYDEBUG(848, *YYCURSOR);
+ if (yybm[0+yych] & 64) {
+ goto yy847;
+ }
+ goto yy846;
+yy849:
+ YYDEBUG(849, *YYCURSOR);
+ ++YYCURSOR;
+ YYFILL(1);
+ yych = *YYCURSOR;
+ YYDEBUG(850, *YYCURSOR);
if (yybm[0+yych] & 128) {
- goto yy821;
+ goto yy849;
}
- goto yy820;
+ goto yy846;
}
}
-#line 2223 "Zend/zend_language_scanner.l"
+#line 2405 "Zend/zend_language_scanner.l"
}
diff --git a/Zend/zend_language_scanner.h b/Zend/zend_language_scanner.h
index 7e3beefe4..b217d17d9 100644
--- a/Zend/zend_language_scanner.h
+++ b/Zend/zend_language_scanner.h
@@ -36,7 +36,6 @@ typedef struct _zend_lex_state {
uint lineno;
char *filename;
-#ifdef ZEND_MULTIBYTE
/* original (unfiltered) script */
unsigned char *script_org;
size_t script_org_size;
@@ -48,9 +47,7 @@ typedef struct _zend_lex_state {
/* input/ouput filters */
zend_encoding_filter input_filter;
zend_encoding_filter output_filter;
- zend_encoding *script_encoding;
- zend_encoding *internal_encoding;
-#endif /* ZEND_MULTIBYTE */
+ const zend_encoding *script_encoding;
} zend_lex_state;
@@ -59,6 +56,8 @@ int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2);
ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC);
ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC);
ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_DC);
+ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter, const zend_encoding *old_encoding TSRMLS_DC);
+ZEND_API int zend_multibyte_set_filter(const zend_encoding *onetime_encoding TSRMLS_DC);
END_EXTERN_C()
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 3d616aad2..ca6281fa2 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_scanner.l 321655 2012-01-01 22:45:58Z nlopess $ */
+/* $Id: zend_language_scanner.l 322378 2012-01-17 08:09:13Z dmitry $ */
#if 0
# define YYDEBUG(s, c) printf("state: %d char: %c\n", s, c)
@@ -120,6 +120,33 @@ do { \
BEGIN_EXTERN_C()
+static size_t encoding_filter_script_to_internal(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length TSRMLS_DC)
+{
+ const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(TSRMLS_C);
+ assert(internal_encoding && zend_multibyte_check_lexer_compatibility(internal_encoding));
+ return zend_multibyte_encoding_converter(to, to_length, from, from_length, internal_encoding, LANG_SCNG(script_encoding) TSRMLS_CC);
+}
+
+static size_t encoding_filter_script_to_intermediate(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length TSRMLS_DC)
+{
+ return zend_multibyte_encoding_converter(to, to_length, from, from_length, zend_multibyte_encoding_utf8, LANG_SCNG(script_encoding) TSRMLS_CC);
+}
+
+static size_t encoding_filter_intermediate_to_script(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length TSRMLS_DC)
+{
+ return zend_multibyte_encoding_converter(to, to_length, from, from_length,
+LANG_SCNG(script_encoding), zend_multibyte_encoding_utf8 TSRMLS_CC);
+}
+
+static size_t encoding_filter_intermediate_to_internal(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length TSRMLS_DC)
+{
+ const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(TSRMLS_C);
+ assert(internal_encoding && zend_multibyte_check_lexer_compatibility(internal_encoding));
+ return zend_multibyte_encoding_converter(to, to_length, from, from_length,
+internal_encoding, zend_multibyte_encoding_utf8 TSRMLS_CC);
+}
+
+
static void _yy_push_state(int new_state TSRMLS_DC)
{
zend_stack_push(&SCNG(state_stack), (void *) &YYGETCONDITION(), sizeof(int));
@@ -147,6 +174,7 @@ static void yy_scan_buffer(char *str, unsigned int len TSRMLS_DC)
void startup_scanner(TSRMLS_D)
{
+ CG(parse_error) = 0;
CG(heredoc) = NULL;
CG(heredoc_len) = 0;
CG(doc_comment) = NULL;
@@ -160,6 +188,7 @@ void shutdown_scanner(TSRMLS_D)
efree(CG(heredoc));
CG(heredoc_len)=0;
}
+ CG(parse_error) = 0;
zend_stack_destroy(&SCNG(state_stack));
RESET_DOC_COMMENT();
}
@@ -181,7 +210,6 @@ ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
lex_state->filename = zend_get_compiled_filename(TSRMLS_C);
lex_state->lineno = CG(zend_lineno);
-#ifdef ZEND_MULTIBYTE
lex_state->script_org = SCNG(script_org);
lex_state->script_org_size = SCNG(script_org_size);
lex_state->script_filtered = SCNG(script_filtered);
@@ -189,8 +217,6 @@ ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
lex_state->input_filter = SCNG(input_filter);
lex_state->output_filter = SCNG(output_filter);
lex_state->script_encoding = SCNG(script_encoding);
- lex_state->internal_encoding = SCNG(internal_encoding);
-#endif /* ZEND_MULTIBYTE */
}
ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
@@ -209,11 +235,7 @@ ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
YYSETCONDITION(lex_state->yy_state);
CG(zend_lineno) = lex_state->lineno;
zend_restore_compiled_filename(lex_state->filename TSRMLS_CC);
-#ifdef ZEND_MULTIBYTE
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- SCNG(script_org) = NULL;
- }
+
if (SCNG(script_filtered)) {
efree(SCNG(script_filtered));
SCNG(script_filtered) = NULL;
@@ -225,8 +247,6 @@ ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC)
SCNG(input_filter) = lex_state->input_filter;
SCNG(output_filter) = lex_state->output_filter;
SCNG(script_encoding) = lex_state->script_encoding;
- SCNG(internal_encoding) = lex_state->internal_encoding;
-#endif /* ZEND_MULTIBYTE */
if (CG(heredoc)) {
efree(CG(heredoc));
@@ -245,12 +265,214 @@ ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC)
}
}
+#define BOM_UTF32_BE "\x00\x00\xfe\xff"
+#define BOM_UTF32_LE "\xff\xfe\x00\x00"
+#define BOM_UTF16_BE "\xfe\xff"
+#define BOM_UTF16_LE "\xff\xfe"
+#define BOM_UTF8 "\xef\xbb\xbf"
+
+static const zend_encoding *zend_multibyte_detect_utf_encoding(const unsigned char *script, size_t script_size TSRMLS_DC)
+{
+ const unsigned char *p;
+ int wchar_size = 2;
+ int le = 0;
+
+ /* utf-16 or utf-32? */
+ p = script;
+ while ((p-script) < script_size) {
+ p = memchr(p, 0, script_size-(p-script)-2);
+ if (!p) {
+ break;
+ }
+ if (*(p+1) == '\0' && *(p+2) == '\0') {
+ wchar_size = 4;
+ break;
+ }
+
+ /* searching for UTF-32 specific byte orders, so this will do */
+ p += 4;
+ }
+
+ /* BE or LE? */
+ p = script;
+ while ((p-script) < script_size) {
+ if (*p == '\0' && *(p+wchar_size-1) != '\0') {
+ /* BE */
+ le = 0;
+ break;
+ } else if (*p != '\0' && *(p+wchar_size-1) == '\0') {
+ /* LE* */
+ le = 1;
+ break;
+ }
+ p += wchar_size;
+ }
+
+ if (wchar_size == 2) {
+ return le ? zend_multibyte_encoding_utf16le : zend_multibyte_encoding_utf16be;
+ } else {
+ return le ? zend_multibyte_encoding_utf32le : zend_multibyte_encoding_utf32be;
+ }
+
+ return NULL;
+}
+
+static const zend_encoding* zend_multibyte_detect_unicode(TSRMLS_D)
+{
+ const zend_encoding *script_encoding = NULL;
+ int bom_size;
+ unsigned char *pos1, *pos2;
+
+ if (LANG_SCNG(script_org_size) < sizeof(BOM_UTF32_LE)-1) {
+ return NULL;
+ }
+
+ /* check out BOM */
+ if (!memcmp(LANG_SCNG(script_org), BOM_UTF32_BE, sizeof(BOM_UTF32_BE)-1)) {
+ script_encoding = zend_multibyte_encoding_utf32be;
+ bom_size = sizeof(BOM_UTF32_BE)-1;
+ } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF32_LE, sizeof(BOM_UTF32_LE)-1)) {
+ script_encoding = zend_multibyte_encoding_utf32le;
+ bom_size = sizeof(BOM_UTF32_LE)-1;
+ } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF16_BE, sizeof(BOM_UTF16_BE)-1)) {
+ script_encoding = zend_multibyte_encoding_utf16be;
+ bom_size = sizeof(BOM_UTF16_BE)-1;
+ } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF16_LE, sizeof(BOM_UTF16_LE)-1)) {
+ script_encoding = zend_multibyte_encoding_utf16le;
+ bom_size = sizeof(BOM_UTF16_LE)-1;
+ } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF8, sizeof(BOM_UTF8)-1)) {
+ script_encoding = zend_multibyte_encoding_utf8;
+ bom_size = sizeof(BOM_UTF8)-1;
+ }
+
+ if (script_encoding) {
+ /* remove BOM */
+ LANG_SCNG(script_org) += bom_size;
+ LANG_SCNG(script_org_size) -= bom_size;
+
+ return script_encoding;
+ }
+
+ /* script contains NULL bytes -> auto-detection */
+ if ((pos1 = memchr(LANG_SCNG(script_org), 0, LANG_SCNG(script_org_size)))) {
+ /* check if the NULL byte is after the __HALT_COMPILER(); */
+ pos2 = LANG_SCNG(script_org);
+
+ while (pos1 - pos2 >= sizeof("__HALT_COMPILER();")-1) {
+ pos2 = memchr(pos2, '_', pos1 - pos2);
+ if (!pos2) break;
+ pos2++;
+ if (strncasecmp((char*)pos2, "_HALT_COMPILER", sizeof("_HALT_COMPILER")-1) == 0) {
+ pos2 += sizeof("_HALT_COMPILER")-1;
+ while (*pos2 == ' ' ||
+ *pos2 == '\t' ||
+ *pos2 == '\r' ||
+ *pos2 == '\n') {
+ pos2++;
+ }
+ if (*pos2 == '(') {
+ pos2++;
+ while (*pos2 == ' ' ||
+ *pos2 == '\t' ||
+ *pos2 == '\r' ||
+ *pos2 == '\n') {
+ pos2++;
+ }
+ if (*pos2 == ')') {
+ pos2++;
+ while (*pos2 == ' ' ||
+ *pos2 == '\t' ||
+ *pos2 == '\r' ||
+ *pos2 == '\n') {
+ pos2++;
+ }
+ if (*pos2 == ';') {
+ return NULL;
+ }
+ }
+ }
+ }
+ }
+ /* make best effort if BOM is missing */
+ return zend_multibyte_detect_utf_encoding(LANG_SCNG(script_org), LANG_SCNG(script_org_size) TSRMLS_CC);
+ }
+
+ return NULL;
+}
+
+static const zend_encoding* zend_multibyte_find_script_encoding(TSRMLS_D)
+{
+ const zend_encoding *script_encoding;
+
+ if (CG(detect_unicode)) {
+ /* check out bom(byte order mark) and see if containing wchars */
+ script_encoding = zend_multibyte_detect_unicode(TSRMLS_C);
+ if (script_encoding != NULL) {
+ /* bom or wchar detection is prior to 'script_encoding' option */
+ return script_encoding;
+ }
+ }
+
+ /* if no script_encoding specified, just leave alone */
+ if (!CG(script_encoding_list) || !CG(script_encoding_list_size)) {
+ return NULL;
+ }
+
+ /* if multiple encodings specified, detect automagically */
+ if (CG(script_encoding_list_size) > 1) {
+ return zend_multibyte_encoding_detector(LANG_SCNG(script_org), LANG_SCNG(script_org_size), CG(script_encoding_list), CG(script_encoding_list_size) TSRMLS_CC);
+ }
+
+ return CG(script_encoding_list)[0];
+}
+
+ZEND_API int zend_multibyte_set_filter(const zend_encoding *onetime_encoding TSRMLS_DC)
+{
+ const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(TSRMLS_C);
+ const zend_encoding *script_encoding = onetime_encoding ? onetime_encoding: zend_multibyte_find_script_encoding(TSRMLS_C);
+
+ if (!script_encoding) {
+ return FAILURE;
+ }
+
+ /* judge input/output filter */
+ LANG_SCNG(script_encoding) = script_encoding;
+ LANG_SCNG(input_filter) = NULL;
+ LANG_SCNG(output_filter) = NULL;
+
+ if (!internal_encoding || LANG_SCNG(script_encoding) == internal_encoding) {
+ if (!zend_multibyte_check_lexer_compatibility(LANG_SCNG(script_encoding))) {
+ /* and if not, work around w/ script_encoding -> utf-8 -> script_encoding conversion */
+ LANG_SCNG(input_filter) = encoding_filter_script_to_intermediate;
+ LANG_SCNG(output_filter) = encoding_filter_intermediate_to_script;
+ } else {
+ LANG_SCNG(input_filter) = NULL;
+ LANG_SCNG(output_filter) = NULL;
+ }
+ return SUCCESS;
+ }
+
+ if (zend_multibyte_check_lexer_compatibility(internal_encoding)) {
+ LANG_SCNG(input_filter) = encoding_filter_script_to_internal;
+ LANG_SCNG(output_filter) = NULL;
+ } else if (zend_multibyte_check_lexer_compatibility(LANG_SCNG(script_encoding))) {
+ LANG_SCNG(input_filter) = NULL;
+ LANG_SCNG(output_filter) = encoding_filter_script_to_internal;
+ } else {
+ /* both script and internal encodings are incompatible w/ flex */
+ LANG_SCNG(input_filter) = encoding_filter_script_to_intermediate;
+ LANG_SCNG(output_filter) = encoding_filter_intermediate_to_internal;
+ }
+
+ return 0;
+}
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
{
- char *file_path = NULL, *buf;
+ const char *file_path = NULL;
+ char *buf;
size_t size, offset = 0;
-
+
/* The shebang line was read, get the current position to obtain the buffer start */
if (CG(start_lineno) == 2 && file_handle->type == ZEND_HANDLE_FP && file_handle->handle.fp) {
if ((offset = ftell(file_handle->handle.fp)) == -1) {
@@ -275,32 +497,24 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
SCNG(yy_start) = NULL;
if (size != -1) {
-#ifdef ZEND_MULTIBYTE
- if (zend_multibyte_read_script((unsigned char *)buf, size TSRMLS_CC) != 0) {
- return FAILURE;
- }
-
- SCNG(yy_in) = NULL;
+ if (CG(multibyte)) {
+ SCNG(script_org) = (unsigned char*)buf;
+ SCNG(script_org_size) = size;
+ SCNG(script_filtered) = NULL;
- zend_multibyte_set_filter(NULL TSRMLS_CC);
+ zend_multibyte_set_filter(NULL TSRMLS_CC);
- if (!SCNG(input_filter)) {
- SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+1);
- memcpy(SCNG(script_filtered), SCNG(script_org), SCNG(script_org_size)+1);
- SCNG(script_filtered_size) = SCNG(script_org_size);
- } else {
- SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC);
- if (SCNG(script_filtered) == NULL) {
- zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected "
- "encoding \"%s\" to a compatible encoding", LANG_SCNG(script_encoding)->name);
+ if (SCNG(input_filter)) {
+ if ((size_t)-1 == SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected "
+ "encoding \"%s\" to a compatible encoding", zend_multibyte_get_encoding_name(LANG_SCNG(script_encoding)));
+ }
+ buf = (char*)SCNG(script_filtered);
+ size = SCNG(script_filtered_size);
}
}
- SCNG(yy_start) = SCNG(script_filtered) - offset;
- yy_scan_buffer((char *)SCNG(script_filtered), SCNG(script_filtered_size) TSRMLS_CC);
-#else /* !ZEND_MULTIBYTE */
- SCNG(yy_start) = buf - offset;
+ SCNG(yy_start) = (unsigned char *)buf - offset;
yy_scan_buffer(buf, size TSRMLS_CC);
-#endif /* ZEND_MULTIBYTE */
} else {
zend_error_noreturn(E_COMPILE_ERROR, "zend_stream_mmap() failed");
}
@@ -361,6 +575,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE TSRMLS_CC);
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
+ zend_init_compiler_context(TSRMLS_C);
compiler_result = zendparse(TSRMLS_C);
zend_do_return(&retval_znode, 0 TSRMLS_CC);
CG(in_compilation) = original_in_compilation;
@@ -428,32 +643,44 @@ zend_op_array *compile_filename(int type, zval *filename TSRMLS_DC)
ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_DC)
{
+ char *buf;
+ size_t size;
+
/* enforce two trailing NULLs for flex... */
- str->value.str.val = safe_erealloc(str->value.str.val, 1, str->value.str.len, ZEND_MMAP_AHEAD);
+ if (IS_INTERNED(str->value.str.val)) {
+ char *tmp = safe_emalloc(1, str->value.str.len, ZEND_MMAP_AHEAD);
+ memcpy(tmp, str->value.str.val, str->value.str.len + ZEND_MMAP_AHEAD);
+ str->value.str.val = tmp;
+ } else {
+ str->value.str.val = safe_erealloc(str->value.str.val, 1, str->value.str.len, ZEND_MMAP_AHEAD);
+ }
memset(str->value.str.val + str->value.str.len, 0, ZEND_MMAP_AHEAD);
- SCNG(yy_in)=NULL;
+ SCNG(yy_in) = NULL;
SCNG(yy_start) = NULL;
-#ifdef ZEND_MULTIBYTE
- SCNG(script_org) = (unsigned char *)estrdup(str->value.str.val);
- SCNG(script_org_size) = str->value.str.len;
+ buf = str->value.str.val;
+ size = str->value.str.len;
- zend_multibyte_set_filter(CG(internal_encoding) TSRMLS_CC);
+ if (CG(multibyte)) {
+ SCNG(script_org) = (unsigned char*)buf;
+ SCNG(script_org_size) = size;
+ SCNG(script_filtered) = NULL;
- if (!SCNG(input_filter)) {
- SCNG(script_filtered) = (unsigned char*)emalloc(SCNG(script_org_size)+1);
- memcpy(SCNG(script_filtered), SCNG(script_org), SCNG(script_org_size)+1);
- SCNG(script_filtered_size) = SCNG(script_org_size);
- } else {
- SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC);
+ zend_multibyte_set_filter(zend_multibyte_get_internal_encoding(TSRMLS_C) TSRMLS_CC);
+
+ if (SCNG(input_filter)) {
+ if ((size_t)-1 == SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected "
+ "encoding \"%s\" to a compatible encoding", zend_multibyte_get_encoding_name(LANG_SCNG(script_encoding)));
+ }
+ buf = (char*)SCNG(script_filtered);
+ size = SCNG(script_filtered_size);
+ }
}
- yy_scan_buffer((char *)SCNG(script_filtered), SCNG(script_filtered_size) TSRMLS_CC);
-#else /* !ZEND_MULTIBYTE */
- yy_scan_buffer(str->value.str.val, str->value.str.len TSRMLS_CC);
-#endif /* ZEND_MULTIBYTE */
+ yy_scan_buffer(buf, size TSRMLS_CC);
zend_set_compiled_filename(filename TSRMLS_CC);
CG(zend_lineno) = 1;
@@ -465,13 +692,12 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D)
{
size_t offset = SCNG(yy_cursor) - SCNG(yy_start);
-#ifdef ZEND_MULTIBYTE
if (SCNG(input_filter)) {
- size_t original_offset = offset, length = 0; do {
+ size_t original_offset = offset, length = 0;
+ do {
unsigned char *p = NULL;
- SCNG(input_filter)(&p, &length, SCNG(script_org), offset TSRMLS_CC);
- if (!p) {
- break;
+ if ((size_t)-1 == SCNG(input_filter)(&p, &length, SCNG(script_org), offset TSRMLS_CC)) {
+ return (size_t)-1;
}
efree(p);
if (length > original_offset) {
@@ -481,7 +707,6 @@ ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D)
}
} while (original_offset != length);
}
-#endif
return offset;
}
@@ -519,19 +744,14 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
init_op_array(op_array, ZEND_EVAL_CODE, INITIAL_OP_ARRAY_SIZE TSRMLS_CC);
CG(interactive) = orig_interactive;
CG(active_op_array) = op_array;
+ zend_init_compiler_context(TSRMLS_C);
BEGIN(ST_IN_SCRIPTING);
compiler_result = zendparse(TSRMLS_C);
-#ifdef ZEND_MULTIBYTE
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- SCNG(script_org) = NULL;
- }
if (SCNG(script_filtered)) {
efree(SCNG(script_filtered));
SCNG(script_filtered) = NULL;
}
-#endif /* ZEND_MULTIBYTE */
if (compiler_result==1) {
CG(active_op_array) = original_active_op_array;
@@ -571,16 +791,10 @@ int highlight_file(char *filename, zend_syntax_highlighter_ini *syntax_highlight
return FAILURE;
}
zend_highlight(syntax_highlighter_ini TSRMLS_CC);
-#ifdef ZEND_MULTIBYTE
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- SCNG(script_org) = NULL;
- }
if (SCNG(script_filtered)) {
efree(SCNG(script_filtered));
SCNG(script_filtered) = NULL;
}
-#endif /* ZEND_MULTIBYTE */
zend_destroy_file_handle(&file_handle TSRMLS_CC);
zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
return SUCCESS;
@@ -600,122 +814,44 @@ int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_
}
BEGIN(INITIAL);
zend_highlight(syntax_highlighter_ini TSRMLS_CC);
-#ifdef ZEND_MULTIBYTE
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- SCNG(script_org) = NULL;
- }
if (SCNG(script_filtered)) {
efree(SCNG(script_filtered));
SCNG(script_filtered) = NULL;
}
-#endif /* ZEND_MULTIBYTE */
zend_restore_lexical_state(&original_lex_state TSRMLS_CC);
zval_dtor(str);
return SUCCESS;
}
-END_EXTERN_C()
-
-#ifdef ZEND_MULTIBYTE
-BEGIN_EXTERN_C()
-ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter, zend_encoding *old_encoding TSRMLS_DC)
+ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter, const zend_encoding *old_encoding TSRMLS_DC)
{
- size_t original_offset, offset, free_flag, new_len, length;
- unsigned char *p;
-
- /* calculate current position */
- offset = original_offset = YYCURSOR - SCNG(yy_start);
- if (old_input_filter && offset > 0) {
- zend_encoding *new_encoding = SCNG(script_encoding);
- zend_encoding_filter new_filter = SCNG(input_filter);
- SCNG(script_encoding) = old_encoding;
- SCNG(input_filter) = old_input_filter;
- offset = zend_get_scanned_file_offset(TSRMLS_C);
- SCNG(script_encoding) = new_encoding;
- SCNG(input_filter) = new_filter;
- }
+ size_t length;
+ unsigned char *new_yy_start;
/* convert and set */
if (!SCNG(input_filter)) {
- length = SCNG(script_org_size) - offset;
- p = SCNG(script_org) + offset;
- free_flag = 0;
+ if (SCNG(script_filtered)) {
+ efree(SCNG(script_filtered));
+ SCNG(script_filtered) = NULL;
+ }
+ SCNG(script_filtered_size) = 0;
+ length = SCNG(script_org_size);
+ new_yy_start = SCNG(script_org);
} else {
- SCNG(input_filter)(&p, &length, SCNG(script_org) + offset, SCNG(script_org_size) - offset TSRMLS_CC);
- free_flag = 1;
- }
-
- new_len = original_offset + length;
-
- if (new_len > YYLIMIT - SCNG(yy_start)) {
- unsigned char *new_yy_start = erealloc(SCNG(yy_start), new_len);
- SCNG(yy_cursor) = new_yy_start + (SCNG(yy_cursor) - SCNG(yy_start));
- SCNG(yy_marker) = new_yy_start + (SCNG(yy_marker) - SCNG(yy_start));
- SCNG(yy_text) = new_yy_start + (SCNG(yy_text) - SCNG(yy_start));
- SCNG(yy_start) = new_yy_start;
- SCNG(script_filtered) = new_yy_start;
- SCNG(script_filtered_size) = new_len;
- }
-
- SCNG(yy_limit) = SCNG(yy_start) + new_len;
- memmove(SCNG(yy_start) + original_offset, p, length);
-
- if (free_flag) {
- efree(p);
- }
-}
-
-
-ZEND_API int zend_multibyte_yyinput(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC)
-{
- size_t n;
-
- if (CG(interactive) == 0) {
- if (zend_stream_fixup(file_handle, &buf, &len TSRMLS_CC) == FAILURE) {
- return FAILURE;
+ if ((size_t)-1 == SCNG(input_filter)(&new_yy_start, &length, SCNG(script_org), SCNG(script_org_size) TSRMLS_CC)) {
+ zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected "
+ "encoding \"%s\" to a compatible encoding", zend_multibyte_get_encoding_name(LANG_SCNG(script_encoding)));
}
- n = len;
- return n;
- }
-
- /* interactive */
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- }
- if (SCNG(script_filtered)) {
- efree(SCNG(script_filtered));
- }
- SCNG(script_org) = NULL;
- SCNG(script_org_size) = 0;
-
- /* TODO: support widechars */
- if (zend_stream_fixup(file_handle, &buf, &len TSRMLS_CC) == FAILURE) {
- return FAILURE;
+ SCNG(script_filtered) = new_yy_start;
+ SCNG(script_filtered_size) = length;
}
- n = len;
-
- SCNG(script_org_size) = n;
- SCNG(script_org) = (unsigned char*)emalloc(SCNG(script_org_size) + 1);
- memcpy(SCNG(script_org), buf, n);
- return n;
-}
-
-
-ZEND_API int zend_multibyte_read_script(unsigned char *buf, size_t n TSRMLS_DC)
-{
- if (SCNG(script_org)) {
- efree(SCNG(script_org));
- SCNG(script_org) = NULL;
- }
- SCNG(script_org_size) = n;
-
- SCNG(script_org) = (unsigned char*)emalloc(SCNG(script_org_size) + 1);
- memcpy(SCNG(script_org), buf, n);
- *(SCNG(script_org)+SCNG(script_org_size)) = '\0';
+ SCNG(yy_cursor) = new_yy_start + (SCNG(yy_cursor) - SCNG(yy_start));
+ SCNG(yy_marker) = new_yy_start + (SCNG(yy_marker) - SCNG(yy_start));
+ SCNG(yy_text) = new_yy_start + (SCNG(yy_text) - SCNG(yy_start));
+ SCNG(yy_limit) = new_yy_start + (SCNG(yy_limit) - SCNG(yy_start));
- return 0;
+ SCNG(yy_start) = new_yy_start;
}
@@ -728,11 +864,6 @@ ZEND_API int zend_multibyte_read_script(unsigned char *buf, size_t n TSRMLS_DC)
zendlval->value.str.val = (char *) estrndup(yytext, yyleng); \
zendlval->value.str.len = yyleng; \
}
-#else /* ZEND_MULTIBYTE */
-# define zend_copy_value(zendlval, yytext, yyleng) \
- zendlval->value.str.val = (char *)estrndup(yytext, yyleng); \
- zendlval->value.str.len = yyleng;
-#endif /* ZEND_MULTIBYTE */
static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quote_type TSRMLS_DC)
{
@@ -773,6 +904,10 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
*t++ = '\v';
zendlval->value.str.len--;
break;
+ case 'e':
+ *t++ = '\e';
+ zendlval->value.str.len--;
+ break;
case '"':
case '`':
if (*s != quote_type) {
@@ -836,7 +971,6 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
s++;
}
*t = 0;
-#ifdef ZEND_MULTIBYTE
if (SCNG(output_filter)) {
size_t sz = 0;
s = zendlval->value.str.val;
@@ -844,7 +978,6 @@ static void zend_scan_escape_string(zval *zendlval, char *str, int len, char quo
zendlval->value.str.len = sz;
efree(s);
}
-#endif /* ZEND_MULTIBYTE */
}
@@ -861,6 +994,7 @@ LNUM [0-9]+
DNUM ([0-9]*"."[0-9]+)|([0-9]+"."[0-9]*)
EXPONENT_DNUM (({LNUM}|{DNUM})[eE][+-]?{LNUM})
HNUM "0x"[0-9a-fA-F]+
+BNUM "0b"[01]+
LABEL [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*
WHITESPACE [ \n\r\t]+
TABS_AND_SPACES [ \t]*
@@ -1008,6 +1142,10 @@ NEWLINE ("\r"|"\n"|"\r\n")
return T_INTERFACE;
}
+<ST_IN_SCRIPTING>"trait" {
+ return T_TRAIT;
+}
+
<ST_IN_SCRIPTING>"extends" {
return T_EXTENDS;
}
@@ -1074,11 +1212,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
return T_DOUBLE_CAST;
}
-<ST_IN_SCRIPTING>"("{TABS_AND_SPACES}"string"{TABS_AND_SPACES}")" {
- return T_STRING_CAST;
-}
-
-<ST_IN_SCRIPTING>"("{TABS_AND_SPACES}"binary"{TABS_AND_SPACES}")" {
+<ST_IN_SCRIPTING>"("{TABS_AND_SPACES}("string"|"binary"){TABS_AND_SPACES}")" {
return T_STRING_CAST;
}
@@ -1126,6 +1260,10 @@ NEWLINE ("\r"|"\n"|"\r\n")
return T_USE;
}
+<ST_IN_SCRIPTING>"insteadof" {
+ return T_INSTEADOF;
+}
+
<ST_IN_SCRIPTING>"global" {
return T_GLOBAL;
}
@@ -1182,6 +1320,10 @@ NEWLINE ("\r"|"\n"|"\r\n")
return T_ARRAY;
}
+<ST_IN_SCRIPTING>"callable" {
+ return T_CALLABLE;
+}
+
<ST_IN_SCRIPTING>"++" {
return T_INC;
}
@@ -1328,6 +1470,26 @@ NEWLINE ("\r"|"\n"|"\r\n")
goto restart;
}
+<ST_IN_SCRIPTING>{BNUM} {
+ char *bin = yytext + 2; /* Skip "0b" */
+ int len = yyleng - 2;
+
+ /* Skip any leading 0s */
+ while (*bin == '0') {
+ ++bin;
+ --len;
+ }
+
+ if (len < SIZEOF_LONG * 8) {
+ zendlval->value.lval = strtol(bin, NULL, 2);
+ zendlval->type = IS_LONG;
+ return T_LNUMBER;
+ } else {
+ zendlval->value.dval = zend_bin_strtod(bin, NULL);
+ zendlval->type = IS_DOUBLE;
+ return T_DNUMBER;
+ }
+}
<ST_IN_SCRIPTING>{LNUM} {
if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */
@@ -1383,7 +1545,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
return T_NUM_STRING;
}
-<ST_VAR_OFFSET>{LNUM}|{HNUM} { /* Offset must be treated as a string */
+<ST_VAR_OFFSET>{LNUM}|{HNUM}|{BNUM} { /* Offset must be treated as a string */
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
@@ -1397,23 +1559,54 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
<ST_IN_SCRIPTING>"__CLASS__" {
- char *class_name = NULL;
-
- if (CG(active_class_entry)) {
- class_name = CG(active_class_entry)->name;
+ const char *class_name = NULL;
+
+ if (CG(active_class_entry)
+ && (ZEND_ACC_TRAIT ==
+ (CG(active_class_entry)->ce_flags & ZEND_ACC_TRAIT))) {
+ /* We create a special __CLASS__ constant that is going to be resolved
+ at run-time */
+ zendlval->value.str.len = sizeof("__CLASS__")-1;
+ zendlval->value.str.val = estrndup("__CLASS__", zendlval->value.str.len);
+ zendlval->type = IS_CONSTANT;
+ } else {
+ if (CG(active_class_entry)) {
+ class_name = CG(active_class_entry)->name;
+ }
+
+ if (!class_name) {
+ class_name = "";
+ }
+
+ zendlval->value.str.len = strlen(class_name);
+ zendlval->value.str.val = estrndup(class_name, zendlval->value.str.len);
+ zendlval->type = IS_STRING;
}
+ return T_CLASS_C;
+}
- if (!class_name) {
- class_name = "";
+<ST_IN_SCRIPTING>"__TRAIT__" {
+ const char *trait_name = NULL;
+
+ if (CG(active_class_entry)
+ && (ZEND_ACC_TRAIT ==
+ (CG(active_class_entry)->ce_flags & ZEND_ACC_TRAIT))) {
+ trait_name = CG(active_class_entry)->name;
+ }
+
+ if (!trait_name) {
+ trait_name = "";
}
- zendlval->value.str.len = strlen(class_name);
- zendlval->value.str.val = estrndup(class_name, zendlval->value.str.len);
+
+ zendlval->value.str.len = strlen(trait_name);
+ zendlval->value.str.val = estrndup(trait_name, zendlval->value.str.len);
zendlval->type = IS_STRING;
- return T_CLASS_C;
+
+ return T_TRAIT_C;
}
<ST_IN_SCRIPTING>"__FUNCTION__" {
- char *func_name = NULL;
+ const char *func_name = NULL;
if (CG(active_op_array)) {
func_name = CG(active_op_array)->function_name;
@@ -1429,8 +1622,8 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
<ST_IN_SCRIPTING>"__METHOD__" {
- char *class_name = CG(active_class_entry) ? CG(active_class_entry)->name : NULL;
- char *func_name = CG(active_op_array)? CG(active_op_array)->function_name : NULL;
+ const char *class_name = CG(active_class_entry) ? CG(active_class_entry)->name : NULL;
+ const char *func_name = CG(active_op_array)? CG(active_op_array)->function_name : NULL;
size_t len = 0;
if (class_name) {
@@ -1440,7 +1633,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
len += strlen(func_name);
}
- zendlval->value.str.len = zend_spprintf(&zendlval->value.str.val, 0, "%s%s%s",
+ zendlval->value.str.len = zend_spprintf(&zendlval->value.str.val, 0, "%s%s%s",
class_name ? class_name : "",
class_name && func_name ? "::" : "",
func_name ? func_name : ""
@@ -1505,7 +1698,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
<INITIAL>"<script"{WHITESPACE}+"language"{WHITESPACE}*"="{WHITESPACE}*("php"|"\"php\""|"'php'"){WHITESPACE}*">" {
- YYCTYPE *bracket = zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
+ YYCTYPE *bracket = (YYCTYPE*)zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
if (bracket != SCNG(yy_text)) {
/* Handle previously scanned HTML, as possible <script> tags found are assumed to not be PHP's */
@@ -1536,15 +1729,11 @@ NEWLINE ("\r"|"\n"|"\r\n")
<INITIAL>"<?=" {
- if (CG(short_tags)) {
- zendlval->value.str.val = yytext; /* no copying - intentional */
- zendlval->value.str.len = yyleng;
- zendlval->type = IS_STRING;
- BEGIN(ST_IN_SCRIPTING);
- return T_OPEN_TAG_WITH_ECHO;
- } else {
- goto inline_char_handler;
- }
+ zendlval->value.str.val = yytext; /* no copying - intentional */
+ zendlval->value.str.len = yyleng;
+ zendlval->type = IS_STRING;
+ BEGIN(ST_IN_SCRIPTING);
+ return T_OPEN_TAG_WITH_ECHO;
}
@@ -1598,7 +1787,7 @@ inline_char_handler:
if (YYCURSOR < YYLIMIT) {
switch (*YYCURSOR) {
case '?':
- if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3)) { /* Assume [ \t\n\r] follows "php" */
+ if (CG(short_tags) || !strncasecmp((char*)YYCURSOR + 1, "php", 3) || (*(YYCURSOR + 1) == '=')) { /* Assume [ \t\n\r] follows "php" */
break;
}
continue;
@@ -1626,7 +1815,6 @@ inline_char_handler:
inline_html:
yyleng = YYCURSOR - SCNG(yy_text);
-#ifdef ZEND_MULTIBYTE
if (SCNG(output_filter)) {
int readsize;
size_t sz = 0;
@@ -1639,10 +1827,6 @@ inline_html:
zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
}
-#else /* !ZEND_MULTIBYTE */
- zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
- zendlval->value.str.len = yyleng;
-#endif
zendlval->type = IS_STRING;
HANDLE_NEWLINES(yytext, yyleng);
return T_INLINE_HTML;
@@ -1849,7 +2033,6 @@ inline_html:
}
*t = 0;
-#ifdef ZEND_MULTIBYTE
if (SCNG(output_filter)) {
size_t sz = 0;
s = zendlval->value.str.val;
@@ -1857,7 +2040,6 @@ inline_html:
zendlval->value.str.len = sz;
efree(s);
}
-#endif /* ZEND_MULTIBYTE */
return T_CONSTANT_ENCAPSED_STRING;
}
diff --git a/Zend/zend_language_scanner_defs.h b/Zend/zend_language_scanner_defs.h
index c66be4716..0a72f090a 100644
--- a/Zend/zend_language_scanner_defs.h
+++ b/Zend/zend_language_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon Jan 3 05:56:03 2011 */
+/* Generated by re2c 0.13.5 on Mon Jan 16 14:45:55 2012 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {
diff --git a/Zend/zend_list.c b/Zend/zend_list.c
index 369244843..0e4b8f077 100644
--- a/Zend/zend_list.c
+++ b/Zend/zend_list.c
@@ -32,11 +32,10 @@ ZEND_API int le_index_ptr;
static HashTable list_destructors;
-ZEND_API int zend_list_insert(void *ptr, int type)
+ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC)
{
int index;
zend_rsrc_list_entry le;
- TSRMLS_FETCH();
le.ptr=ptr;
le.type=type;
@@ -92,11 +91,11 @@ ZEND_API int _zend_list_addref(int id TSRMLS_DC)
}
-ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type)
+ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type TSRMLS_DC)
{
int rsrc_id;
- rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type);
+ rsrc_id = zend_list_insert(rsrc_pointer, rsrc_type TSRMLS_CC);
if (rsrc_result) {
rsrc_result->value.lval = rsrc_id;
@@ -107,15 +106,15 @@ ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int r
}
-ZEND_API void *zend_fetch_resource(zval **passed_id TSRMLS_DC, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...)
+ZEND_API void *zend_fetch_resource(zval **passed_id TSRMLS_DC, int default_id, const char *resource_type_name, int *found_resource_type, int num_resource_types, ...)
{
int id;
int actual_resource_type;
void *resource;
va_list resource_types;
int i;
- char *space;
- char *class_name;
+ const char *space;
+ const char *class_name;
if (default_id==-1) { /* use id */
if (!passed_id) {
@@ -290,7 +289,7 @@ ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void
}
-ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number)
+ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, const char *type_name, int module_number)
{
zend_rsrc_list_dtors_entry lde;
@@ -349,7 +348,7 @@ void zend_destroy_rsrc_list_dtors(void)
}
-char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC)
+const char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC)
{
zend_rsrc_list_dtors_entry *lde;
int rsrc_type;
diff --git a/Zend/zend_list.h b/Zend/zend_list.h
index 20354b8f1..abeeb9c57 100644
--- a/Zend/zend_list.h
+++ b/Zend/zend_list.h
@@ -48,7 +48,7 @@ typedef struct _zend_rsrc_list_dtors_entry {
rsrc_dtor_func_t list_dtor_ex;
rsrc_dtor_func_t plist_dtor_ex;
- char *type_name;
+ const char *type_name;
int module_number;
int resource_id;
@@ -58,7 +58,7 @@ typedef struct _zend_rsrc_list_dtors_entry {
#define register_list_destructors(ld, pld) zend_register_list_destructors((void (*)(void *))ld, (void (*)(void *))pld, module_number);
ZEND_API int zend_register_list_destructors(void (*ld)(void *), void (*pld)(void *), int module_number);
-ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, char *type_name, int module_number);
+ZEND_API int zend_register_list_destructors_ex(rsrc_dtor_func_t ld, rsrc_dtor_func_t pld, const char *type_name, int module_number);
void list_entry_destructor(void *ptr);
void plist_entry_destructor(void *ptr);
@@ -70,7 +70,7 @@ void zend_destroy_rsrc_list(HashTable *ht TSRMLS_DC);
int zend_init_rsrc_list_dtors(void);
void zend_destroy_rsrc_list_dtors(void);
-ZEND_API int zend_list_insert(void *ptr, int type);
+ZEND_API int zend_list_insert(void *ptr, int type TSRMLS_DC);
ZEND_API int _zend_list_addref(int id TSRMLS_DC);
ZEND_API int _zend_list_delete(int id TSRMLS_DC);
ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC);
@@ -79,10 +79,10 @@ ZEND_API void *_zend_list_find(int id, int *type TSRMLS_DC);
#define zend_list_delete(id) _zend_list_delete(id TSRMLS_CC)
#define zend_list_find(id, type) _zend_list_find(id, type TSRMLS_CC)
-ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type);
-ZEND_API void *zend_fetch_resource(zval **passed_id TSRMLS_DC, int default_id, char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
+ZEND_API int zend_register_resource(zval *rsrc_result, void *rsrc_pointer, int rsrc_type TSRMLS_DC);
+ZEND_API void *zend_fetch_resource(zval **passed_id TSRMLS_DC, int default_id, const char *resource_type_name, int *found_resource_type, int num_resource_types, ...);
-ZEND_API char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC);
+ZEND_API const char *zend_rsrc_list_get_rsrc_type(int resource TSRMLS_DC);
ZEND_API int zend_fetch_list_dtor_id(char *type_name);
extern ZEND_API int le_index_ptr; /* list entry type for index pointers */
@@ -107,7 +107,7 @@ extern ZEND_API int le_index_ptr; /* list entry type for index pointers */
(rsrc = (rsrc_type) zend_fetch_resource(passed_id TSRMLS_CC, default_id, resource_type_name, NULL, 2, resource_type1, resource_type2))
#define ZEND_REGISTER_RESOURCE(rsrc_result, rsrc_pointer, rsrc_type) \
- zend_register_resource(rsrc_result, rsrc_pointer, rsrc_type);
+ zend_register_resource(rsrc_result, rsrc_pointer, rsrc_type TSRMLS_CC);
#define ZEND_GET_RESOURCE_TYPE_ID(le_id, le_type_name) \
if (le_id == 0) { \
diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h
index 96048bf76..de0036b87 100644
--- a/Zend/zend_modules.h
+++ b/Zend/zend_modules.h
@@ -33,7 +33,7 @@
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module TSRMLS_DC
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module TSRMLS_CC
-#define ZEND_MODULE_API_NO 20090626
+#define ZEND_MODULE_API_NO 20100525
#ifdef ZTS
#define USING_ZTS 1
#else
@@ -98,7 +98,7 @@ struct _zend_module_entry {
unsigned char type;
void *handle;
int module_number;
- char *build_id;
+ const char *build_id;
};
#define MODULE_DEP_REQUIRED 1
diff --git a/Zend/zend_multibyte.c b/Zend/zend_multibyte.c
index 8404bd241..99f3b8273 100644
--- a/Zend/zend_multibyte.c
+++ b/Zend/zend_multibyte.c
@@ -23,1152 +23,188 @@
#include "zend_compile.h"
#include "zend_operators.h"
#include "zend_multibyte.h"
+#include "zend_ini.h"
-#ifdef ZEND_MULTIBYTE
-static size_t zend_multibyte_encoding_filter(unsigned char **to, size_t *to_length, const char *to_encoding, const unsigned char *from, size_t from_length, const char *from_encoding TSRMLS_DC);
-size_t sjis_input_filter(unsigned char **buf, size_t *length, const unsigned char *sjis, size_t sjis_length TSRMLS_DC);
-size_t sjis_output_filter(unsigned char **buf, size_t *length, const unsigned char *sjis, size_t sjis_length TSRMLS_DC);
-static char* zend_multibyte_assemble_encoding_list(zend_encoding **encoding_list, size_t encoding_list_size);
-static int zend_multibyte_parse_encoding_list(const char *encoding_list,
-size_t encoding_list_size, zend_encoding ***result, size_t *result_size);
-static zend_encoding *zend_multibyte_find_script_encoding(zend_encoding *onetime_encoding TSRMLS_DC);
-static zend_encoding *zend_multibyte_detect_unicode(TSRMLS_D);
-static zend_encoding *zend_multibyte_detect_utf_encoding(const unsigned char *script, size_t script_size TSRMLS_DC);
-
-/*
- * encodings
- */
-static const char *ucs2_aliases[] = {"ISO-10646-UCS-2", "UCS2" , "UNICODE", NULL};
-static zend_encoding encoding_ucs2 = {
- NULL,
- NULL,
- "UCS-2",
- (const char *(*)[])&ucs2_aliases,
- 0
-};
-
-static zend_encoding encoding_ucs2be = {
- NULL,
- NULL,
- "UCS-2BE",
- NULL,
- 0
-};
-
-static zend_encoding encoding_ucs2le = {
- NULL,
- NULL,
- "UCS-2LE",
- NULL,
- 0
-};
-
-static const char *ucs4_aliases[] = {"ISO-10646-UCS-4", "UCS4", NULL};
-static zend_encoding encoding_ucs4 = {
- NULL,
- NULL,
- "UCS-4",
- (const char *(*)[])&ucs4_aliases,
- 0
-};
-
-static zend_encoding encoding_ucs4be = {
- NULL,
- NULL,
- "UCS-4BE",
- NULL,
- 0
-};
-
-static zend_encoding encoding_ucs4le = {
- NULL,
- NULL,
- "UCS-4LE",
- NULL,
- 0
-};
-
-static const char *utf32_aliases[] = {"utf32", NULL};
-static zend_encoding encoding_utf32 = {
- NULL,
- NULL,
- "UTF-32",
- (const char *(*)[])&utf32_aliases,
- 0
-};
-
-static zend_encoding encoding_utf32be = {
- NULL,
- NULL,
- "UTF-32BE",
- NULL,
- 0
-};
-
-static zend_encoding encoding_utf32le = {
- NULL,
- NULL,
- "UTF-32LE",
- NULL,
- 0
-};
-
-static const char *utf16_aliases[] = {"utf16", NULL};
-static zend_encoding encoding_utf16 = {
- NULL,
- NULL,
- "UTF-16",
- (const char *(*)[])&utf16_aliases,
- 0
-};
-
-static zend_encoding encoding_utf16be = {
- NULL,
- NULL,
- "UTF-16BE",
- NULL,
- 0
-};
-
-static zend_encoding encoding_utf16le = {
- NULL,
- NULL,
- "UTF-16LE",
- NULL,
- 0
-};
-
-static const char *utf8_aliases[] = {"utf8", NULL};
-static zend_encoding encoding_utf8 = {
- NULL,
- NULL,
- "UTF-8",
- (const char *(*)[])&utf8_aliases,
- 1
-};
-
-static const char *ascii_aliases[] = {"ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "US-ASCII", "ISO646-US", "us", "IBM367", "cp367", "csASCII", NULL};
-static zend_encoding encoding_ascii = {
- NULL,
- NULL,
- "ASCII",
- (const char *(*)[])&ascii_aliases,
- 1
-};
-
-static const char *euc_jp_aliases[] = {"EUC", "EUC_JP", "eucJP", "x-euc-jp", NULL};
-static zend_encoding encoding_euc_jp = {
- NULL,
- NULL,
- "EUC-JP",
- (const char *(*)[])&euc_jp_aliases,
- 1
-};
-
-static const char *sjis_aliases[] = {"x-sjis", "SJIS", "SHIFT-JIS", NULL};
-static zend_encoding encoding_sjis = {
- sjis_input_filter,
- sjis_output_filter,
- "Shift_JIS",
- (const char *(*)[])&sjis_aliases,
- 0
-};
-
-static const char *eucjp_win_aliases[] = {"eucJP-open", NULL};
-static zend_encoding encoding_eucjp_win = {
- NULL,
- NULL,
- "eucJP-win",
- (const char *(*)[])&eucjp_win_aliases,
- 1
-};
-
-static const char *sjis_win_aliases[] = {"SJIS-open", "MS_Kanji", "Windows-31J", "CP932", NULL};
-static zend_encoding encoding_sjis_win = {
- /* sjis-filters does not care about diffs of Shift_JIS and CP932 */
- sjis_input_filter,
- sjis_output_filter,
- "SJIS-win",
- (const char *(*)[])&sjis_win_aliases,
- 0
-};
-
-static const char *jis_aliases[] = {"ISO-2022-JP", NULL};
-static zend_encoding encoding_jis = {
- NULL,
- NULL,
- "JIS",
- (const char *(*)[])&jis_aliases,
- 0
-};
-
-static const char *euc_cn_aliases[] = {"CN-GB", "EUC_CN", "eucCN", "x-euc-cn", "gb2312", NULL};
-static zend_encoding encoding_euc_cn = {
- NULL,
- NULL,
- "EUC-CN",
- (const char *(*)[])&euc_cn_aliases,
- 1
-};
-
-static const char *cp936_aliases[] = {"CP-936", NULL};
-static zend_encoding encoding_cp936 = {
- NULL,
- NULL,
- "CP936",
- (const char *(*)[])&cp936_aliases,
- 0
-};
-
-static const char *hz_aliases[] = {"HZ-GB-2312", NULL};
-static zend_encoding encoding_hz = {
- NULL,
- NULL,
- "HZ",
- (const char *(*)[])&hz_aliases,
- 0
-};
-
-static const char *euc_tw_aliases[] = {"EUC_TW", "eucTW", "x-euc-tw", NULL};
-static zend_encoding encoding_euc_tw = {
- NULL,
- NULL,
- "EUC-TW",
- (const char *(*)[])&euc_tw_aliases,
- 1
-};
-
-static const char *big5_aliases[] = {"BIG5", "CN-BIG5", "BIG-FIVE", "BIGFIVE", "CP950", NULL};
-static zend_encoding encoding_big5 = {
- NULL,
- NULL,
- "BIG-5",
- (const char *(*)[])&big5_aliases,
- 0
-};
-
-static const char *euc_kr_aliases[] = {"EUC_KR", "eucKR", "x-euc-kr", NULL};
-static zend_encoding encoding_euc_kr = {
- NULL,
- NULL,
- "EUC-KR",
- (const char *(*)[])&euc_kr_aliases,
- 1
-};
-
-static const char *uhc_aliases[] = {"CP949", NULL};
-static zend_encoding encoding_uhc = {
- NULL,
- NULL,
- "UHC",
- (const char *(*)[])&uhc_aliases,
- 1
-};
-
-static zend_encoding encoding_2022kr = {
- NULL,
- NULL,
- "ISO-2022-KR",
- NULL,
- 0
-};
-
-static const char *cp1252_aliases[] = {"cp1252", NULL};
-static zend_encoding encoding_cp1252 = {
- NULL,
- NULL,
- "Windows-1252",
- (const char *(*)[])&cp1252_aliases,
- 1
-};
-
-static const char *iso_8859_1_aliases[] = {"ISO_8859-1", "latin1", NULL};
-static zend_encoding encoding_8859_1 = {
- NULL,
- NULL,
- "ISO-8859-1",
- (const char *(*)[])&iso_8859_1_aliases,
- 1
-};
-
-static const char *iso_8859_2_aliases[] = {"ISO_8859-2", "latin2", NULL};
-static zend_encoding encoding_8859_2 = {
- NULL,
- NULL,
- "ISO-8859-2",
- (const char *(*)[])&iso_8859_2_aliases,
- 1
-};
-
-static const char *iso_8859_3_aliases[] = {"ISO_8859-3", "latin3", NULL};
-static zend_encoding encoding_8859_3 = {
- NULL,
- NULL,
- "ISO-8859-3",
- (const char *(*)[])&iso_8859_3_aliases,
- 1
-};
-
-static const char *iso_8859_4_aliases[] = {"ISO_8859-4", "latin4", NULL};
-static zend_encoding encoding_8859_4 = {
- NULL,
- NULL,
- "ISO-8859-4",
- (const char *(*)[])&iso_8859_4_aliases,
- 1
-};
-
-static const char *iso_8859_5_aliases[] = {"ISO_8859-5", "cyrillic", NULL};
-static zend_encoding encoding_8859_5 = {
- NULL,
- NULL,
- "ISO-8859-5",
- (const char *(*)[])&iso_8859_5_aliases,
- 1
-};
-
-static const char *iso_8859_6_aliases[] = {"ISO_8859-6", "arabic", NULL};
-static zend_encoding encoding_8859_6 = {
- NULL,
- NULL,
- "ISO-8859-6",
- (const char *(*)[])&iso_8859_6_aliases,
- 1
-};
-
-static const char *iso_8859_7_aliases[] = {"ISO_8859-7", "greek", NULL};
-static zend_encoding encoding_8859_7 = {
- NULL,
- NULL,
- "ISO-8859-7",
- (const char *(*)[])&iso_8859_7_aliases,
- 1
-};
-
-static const char *iso_8859_8_aliases[] = {"ISO_8859-8", "hebrew", NULL};
-static zend_encoding encoding_8859_8 = {
- NULL,
- NULL,
- "ISO-8859-8",
- (const char *(*)[])&iso_8859_8_aliases,
- 1
-};
-
-static const char *iso_8859_9_aliases[] = {"ISO_8859-9", "latin5", NULL};
-static zend_encoding encoding_8859_9 = {
- NULL,
- NULL,
- "ISO-8859-9",
- (const char *(*)[])&iso_8859_9_aliases,
- 1
-};
-
-static const char *iso_8859_10_aliases[] = {"ISO_8859-10", "latin6", NULL};
-static zend_encoding encoding_8859_10 = {
- NULL,
- NULL,
- "ISO-8859-10",
- (const char *(*)[])&iso_8859_10_aliases,
- 1
-};
-
-static const char *iso_8859_13_aliases[] = {"ISO_8859-13", NULL};
-static zend_encoding encoding_8859_13 = {
- NULL,
- NULL,
- "ISO-8859-13",
- (const char *(*)[])&iso_8859_13_aliases,
- 1
-};
-
-static const char *iso_8859_14_aliases[] = {"ISO_8859-14", "latin8", NULL};
-static zend_encoding encoding_8859_14 = {
- NULL,
- NULL,
- "ISO-8859-14",
- (const char *(*)[])&iso_8859_14_aliases,
- 1
-};
-
-static const char *iso_8859_15_aliases[] = {"ISO_8859-15", NULL};
-static zend_encoding encoding_8859_15 = {
- NULL,
- NULL,
- "ISO-8859-15",
- (const char *(*)[])&iso_8859_15_aliases,
- 1
-};
-
-static const char *cp1251_aliases[] = {"CP1251", "CP-1251", "WINDOWS-1251", NULL};
-static zend_encoding encoding_cp1251 = {
- NULL,
- NULL,
- "Windows-1251",
- (const char *(*)[])&cp1251_aliases,
- 1
-};
-
-static const char *cp866_aliases[] = {"CP866", "CP-866", "IBM-866", NULL};
-static zend_encoding encoding_cp866 = {
- NULL,
- NULL,
- "CP866",
- (const char *(*)[])&cp866_aliases,
- 1
-};
-
-static const char *koi8r_aliases[] = {"KOI8-R", "KOI8R", NULL};
-static zend_encoding encoding_koi8r = {
- NULL,
- NULL,
- "KOI8-R",
- (const char *(*)[])&koi8r_aliases,
- 1
-};
-
-static const char *koi8u_aliases[] = {"KOI8-U", "KOI8U", NULL};
-static zend_encoding encoding_koi8u = {
- NULL,
- NULL,
- "KOI8-U",
- (const char *(*)[])&koi8u_aliases,
- 1
-};
-
-static const char *cp1254_aliases[] = {"cp1254", NULL};
-static zend_encoding encoding_cp1254 = {
- NULL,
- NULL,
- "Windows-1254",
- (const char *(*)[])&cp1254_aliases,
- 1
-};
-
-static const char *armscii8_aliases[] = { "ArmSCII8", "ARMSCII-8", "ARMSCII8", NULL};
-static zend_encoding encoding_armscii8 = {
- NULL,
- NULL,
- "ArmSCII-8",
- (const char *(*)[])&armscii8_aliases,
- 1
-};
-
-static const char *cp850_aliases[] = {"IBM850", NULL};
-static zend_encoding encoding_cp850 = {
- NULL,
- NULL,
- "CP850",
- (const char *(*)[])&cp850_aliases,
- 1
-};
-
-static zend_encoding *zend_encoding_table[] = {
- &encoding_ucs4,
- &encoding_ucs4be,
- &encoding_ucs4le,
- &encoding_ucs2,
- &encoding_ucs2be,
- &encoding_ucs2le,
- &encoding_utf32,
- &encoding_utf32be,
- &encoding_utf32le,
- &encoding_utf16,
- &encoding_utf16be,
- &encoding_utf16le,
- &encoding_utf8,
- &encoding_ascii,
- &encoding_euc_jp,
- &encoding_sjis,
- &encoding_eucjp_win,
- &encoding_sjis_win,
- &encoding_jis,
- &encoding_cp1252,
- &encoding_8859_1,
- &encoding_8859_2,
- &encoding_8859_3,
- &encoding_8859_4,
- &encoding_8859_5,
- &encoding_8859_6,
- &encoding_8859_7,
- &encoding_8859_8,
- &encoding_8859_9,
- &encoding_8859_10,
- &encoding_8859_13,
- &encoding_8859_14,
- &encoding_8859_15,
- &encoding_euc_cn,
- &encoding_cp936,
- &encoding_hz,
- &encoding_euc_tw,
- &encoding_big5,
- &encoding_euc_kr,
- &encoding_uhc,
- &encoding_2022kr,
- &encoding_cp1251,
- &encoding_cp866,
- &encoding_koi8r,
- &encoding_koi8u,
- &encoding_armscii8,
- &encoding_cp1254,
- &encoding_cp850,
- NULL
-};
-
-
-
-ZEND_API int zend_multibyte_set_script_encoding(const char *encoding_list,
-size_t encoding_list_size TSRMLS_DC)
+static const zend_encoding *dummy_encoding_fetcher(const char *encoding_name TSRMLS_DC)
{
- if (CG(script_encoding_list)) {
- efree(CG(script_encoding_list));
- CG(script_encoding_list) = NULL;
- }
- CG(script_encoding_list_size) = 0;
-
- if (!encoding_list) {
- return 0;
- }
-
- zend_multibyte_parse_encoding_list(encoding_list, encoding_list_size, &(CG(script_encoding_list)), &(CG(script_encoding_list_size)));
-
- return 0;
-}
-
-
-ZEND_API int zend_multibyte_set_internal_encoding(const char *encoding_name TSRMLS_DC)
-{
- CG(internal_encoding) = zend_multibyte_fetch_encoding(encoding_name);
- return 0;
+ return NULL;
}
-ZEND_API int zend_multibyte_set_functions(zend_encoding_detector encoding_detector, zend_encoding_converter encoding_converter, zend_encoding_oddlen encoding_oddlen TSRMLS_DC)
+static const char *dummy_encoding_name_getter(const zend_encoding *encoding)
{
- CG(encoding_detector) = encoding_detector;
- CG(encoding_converter) = encoding_converter;
- CG(encoding_oddlen) = encoding_oddlen;
- return 0;
+ return (const char*)encoding;
}
-
-ZEND_API int zend_multibyte_set_filter(zend_encoding *onetime_encoding TSRMLS_DC)
+static int dummy_encoding_lexer_compatibility_checker(const zend_encoding *encoding)
{
- LANG_SCNG(script_encoding) = zend_multibyte_find_script_encoding(onetime_encoding TSRMLS_CC);
- LANG_SCNG(internal_encoding) = CG(internal_encoding);
-
- /* judge input/output filter */
- LANG_SCNG(input_filter) = NULL;
- LANG_SCNG(output_filter) = NULL;
-
- if (!LANG_SCNG(script_encoding)) {
- return 0;
- }
-
- if (!LANG_SCNG(internal_encoding) || LANG_SCNG(script_encoding) == LANG_SCNG(internal_encoding)) {
- /* if encoding specfic filters exist, use them */
- if (LANG_SCNG(script_encoding)->input_filter && LANG_SCNG(script_encoding)->output_filter) {
- LANG_SCNG(input_filter) = LANG_SCNG(script_encoding)->input_filter;
- LANG_SCNG(output_filter) = LANG_SCNG(script_encoding)->output_filter;
- return 0;
- }
-
- if (!LANG_SCNG(script_encoding)->compatible) {
- /* and if not, work around w/ script_encoding -> utf-8 -> script_encoding conversion */
- LANG_SCNG(internal_encoding) = LANG_SCNG(script_encoding);
- LANG_SCNG(input_filter) = zend_multibyte_script_encoding_filter;
- LANG_SCNG(output_filter) = zend_multibyte_internal_encoding_filter;
- return 0;
- } else {
- /* nothing to do in this case */
- return 0;
- }
- }
-
- /* LANG_SCNG(internal_encoding) cannot be NULL here */
- if (LANG_SCNG(internal_encoding)->compatible) {
- LANG_SCNG(input_filter) = zend_multibyte_script_encoding_filter;
- return 0;
- } else if (LANG_SCNG(script_encoding)->compatible) {
- LANG_SCNG(output_filter) = zend_multibyte_internal_encoding_filter;
- return 0;
- }
-
- /* both script and internal encodings are incompatible w/ flex */
- LANG_SCNG(input_filter) = zend_multibyte_script_encoding_filter;
- LANG_SCNG(output_filter) = zend_multibyte_internal_encoding_filter;
-
return 0;
}
-
-ZEND_API zend_encoding* zend_multibyte_fetch_encoding(const char *encoding_name)
+static const zend_encoding *dummy_encoding_detector(const unsigned char *string, size_t length, const zend_encoding **list, size_t list_size TSRMLS_DC)
{
- int i, j;
- zend_encoding *encoding;
-
- if (!encoding_name) {
- return NULL;
- }
-
- for (i = 0; (encoding = zend_encoding_table[i]) != NULL; i++) {
- if (zend_binary_strcasecmp(encoding->name, strlen(encoding->name), encoding_name, strlen(encoding_name)) == 0) {
- return encoding;
- }
- }
-
- for (i = 0; (encoding = zend_encoding_table[i]) != NULL; i++) {
- if (encoding->aliases != NULL) {
- for (j = 0; (*encoding->aliases)[j] != NULL; j++) {
- if (zend_binary_strcasecmp((*encoding->aliases)[j], strlen((*encoding->aliases)[j]), encoding_name, strlen(encoding_name)) == 0) {
- return encoding;
- }
- }
- }
- }
-
return NULL;
}
-
-ZEND_API size_t zend_multibyte_script_encoding_filter(unsigned char **to, size_t
-*to_length, const unsigned char *from, size_t from_length TSRMLS_DC)
+static size_t dummy_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const zend_encoding *encoding_to, const zend_encoding *encoding_from TSRMLS_DC)
{
- const char *name;
-
- if (LANG_SCNG(internal_encoding) == NULL || LANG_SCNG(internal_encoding)->compatible == 0) {
- name = "UTF-8";
- } else {
- name = LANG_SCNG(internal_encoding)->name;
- }
-
- return zend_multibyte_encoding_filter(to, to_length, name, from, from_length, LANG_SCNG(script_encoding)->name TSRMLS_CC);
+ return (size_t)-1;
}
-ZEND_API size_t zend_multibyte_internal_encoding_filter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length TSRMLS_DC)
+static int dummy_encoding_list_parser(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, int persistent TSRMLS_DC)
{
- const char *name;
-
- if (LANG_SCNG(script_encoding)->compatible == 0) {
- name = "UTF-8";
- } else {
- name = LANG_SCNG(script_encoding)->name;
- }
-
- return zend_multibyte_encoding_filter(to, to_length, LANG_SCNG(internal_encoding)->name, from, from_length, name TSRMLS_CC);
+ *return_list = pemalloc(0, persistent);
+ return_size = 0;
+ return SUCCESS;
}
-static size_t zend_multibyte_encoding_filter(unsigned char **to, size_t *to_length, const char *to_encoding, const unsigned char *from, size_t from_length, const char *from_encoding TSRMLS_DC)
+static const zend_encoding *dummy_internal_encoding_getter(TSRMLS_D)
{
- size_t oddlen;
-
- if (!CG(encoding_converter)) {
- return 0;
- }
-
- if (CG(encoding_oddlen)) {
- oddlen = CG(encoding_oddlen)(from, from_length, from_encoding TSRMLS_CC);
- if (oddlen > 0) {
- from_length -= oddlen;
- }
- }
-
- if (CG(encoding_converter)(to, to_length, from, from_length, to_encoding, from_encoding TSRMLS_CC) != 0) {
- return 0;
- }
-
- return from_length;
+ return NULL;
}
-
-/*
- * Shift_JIS Input/Output Filter
- */
-static const unsigned char table_sjis[] = { /* 0x80-0x9f,0xE0-0xEF */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 0, 0, 0
-};
-
-size_t sjis_input_filter(unsigned char **buf, size_t *length, const unsigned char *sjis, size_t sjis_length TSRMLS_DC)
+static int dummy_internal_encoding_setter(const zend_encoding *encoding TSRMLS_DC)
{
- const unsigned char *p;
- unsigned char *q;
- unsigned char c1, c2;
-
- *buf = (unsigned char*)emalloc(sjis_length * 3 / 2 + 1);
- if (!*buf)
- return 0;
- *length = 0;
-
- p = sjis;
- q = *buf;
-
- /* convert [SJIS -> EUC-JP] (for lex scan) -- some other better ways? */
- while (*p && (p - sjis) < sjis_length) {
- if (!(*p & 0x80)) {
- *q++ = *p++;
- continue;
- }
-
- /* handling 8 bit code */
- if (table_sjis[*p] == 1) {
- /* 1 byte kana */
- *q++ = 0x8e;
- *q++ = *p++;
- continue;
- }
-
- if (!*(p+1)) {
- *q++ = *p++;
- break;
- }
-
- if (table_sjis[*p] == 2) {
- /* 2 byte kanji code */
- c1 = *p++;
- if (!*p || (p - sjis) >= sjis_length) {
- break;
- }
- c2 = *p++;
- c1 -= (c1 <= 0x9f) ? 0x71 : 0xb1;
- c1 = (c1 << 1) + 1;
- if (c2 >= 0x9e) {
- c2 -= 0x7e;
- c1++;
- } else if (c2 > 0x7f) {
- c2 -= 0x20;
- } else {
- c2 -= 0x1f;
- }
-
- c1 |= 0x80;
- c2 |= 0x80;
-
- *q++ = c1;
- *q++ = c2;
- } else {
- /*
- * for user defined chars (ATTENTION)
- *
- * THESE ARE NOT CODE FOR CONVERSION! :-P
- * (using *ILLEGALLY* 3byte EUC-JP space)
- *
- * we cannot perfectly (== 1 to 1) convert these chars to EUC-JP.
- * so, these code are for perfect RESTORING in sjis_output_filter()
- */
- c1 = *p++;
- if (!*p || (p - sjis) >= sjis_length) {
- break;
- }
- c2 = *p++;
- *q++ = 0x8f;
- /*
- * MAP TO (EUC-JP):
- * type A: 0xeba1 - 0xf4fe
- * type B: 0xf5a1 - 0xfefe
- * type C: 0xa1a1 - 0xa6fe
- */
- c1 -= (c1 > 0xf9) ? (0x79+0x71) : (0x0a+0xb1);
- c1 = (c1 << 1) + 1;
- if (c2 >= 0x9e) {
- c2 -= 0x7e;
- c1++;
- } else if (c2 > 0x7f) {
- c2 -= 0x20;
- } else {
- c2 -= 0x1f;
- }
-
- c1 |= 0x80;
- c2 |= 0x80;
-
- *q++ = c1;
- *q++ = c2;
- }
- }
- *q = '\0';
- *length = q - *buf;
-
- return *length;
+ return FAILURE;
}
-static const unsigned char table_eucjp[] = { /* 0xA1-0xFE */
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1
+static zend_multibyte_functions multibyte_functions = {
+ NULL,
+ dummy_encoding_fetcher,
+ dummy_encoding_name_getter,
+ dummy_encoding_lexer_compatibility_checker,
+ dummy_encoding_detector,
+ dummy_encoding_converter,
+ dummy_encoding_list_parser,
+ dummy_internal_encoding_getter,
+ dummy_internal_encoding_setter
};
-size_t sjis_output_filter(unsigned char **sjis, size_t *sjis_length, const unsigned char *buf, size_t length TSRMLS_DC)
-{
- unsigned char c1, c2;
- unsigned char *p;
- const unsigned char *q;
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf32be = (const zend_encoding*)"UTF-32BE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf32le = (const zend_encoding*)"UTF-32LE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf16be = (const zend_encoding*)"UTF-16BE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf16le = (const zend_encoding*)"UTF-32LE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf8 = (const zend_encoding*)"UTF-8";
- if (!sjis || !sjis_length) {
- return 0;
+ZEND_API int zend_multibyte_set_functions(const zend_multibyte_functions *functions TSRMLS_DC)
+{
+ zend_multibyte_encoding_utf32be = functions->encoding_fetcher("UTF-32BE" TSRMLS_CC);
+ if (!zend_multibyte_encoding_utf32be) {
+ return FAILURE;
}
-
- /* always Shift_JIS <= EUC-JP */
- *sjis = (unsigned char*)emalloc(length+1);
- if (!sjis) {
- return 0;
+ zend_multibyte_encoding_utf32le = functions->encoding_fetcher("UTF-32LE" TSRMLS_CC);
+ if (!zend_multibyte_encoding_utf32le) {
+ return FAILURE;
+ }
+ zend_multibyte_encoding_utf16be = functions->encoding_fetcher("UTF-16BE" TSRMLS_CC);
+ if (!zend_multibyte_encoding_utf16be) {
+ return FAILURE;
+ }
+ zend_multibyte_encoding_utf16le = functions->encoding_fetcher("UTF-16LE" TSRMLS_CC);
+ if (!zend_multibyte_encoding_utf16le) {
+ return FAILURE;
+ }
+ zend_multibyte_encoding_utf8 = functions->encoding_fetcher("UTF-8" TSRMLS_CC);
+ if (!zend_multibyte_encoding_utf8) {
+ return FAILURE;
}
- p = *sjis;
- q = buf;
-
- /* restore converted strings [EUC-JP -> Shift_JIS] */
- while (*q && (q - buf) < length) {
- if (!(*q & 0x80)) {
- *p++ = *q++;
- continue;
- }
-
- /* hankaku kana */
- if (*q == 0x8e) {
- q++;
- if (*q) {
- *p++ = *q++;
- }
- continue;
- }
-
- /* 2 byte kanji code */
- if (table_eucjp[*q] == 2) {
- c1 = (*q++ & ~0x80) & 0xff;
- if (*q) {
- c2 = (*q++ & ~0x80) & 0xff;
- } else {
- q--;
- break;
- }
-
- c2 += (c1 & 0x01) ? 0x1f : 0x7d;
- if (c2 >= 0x7f) {
- c2++;
- }
- c1 = ((c1 - 0x21) >> 1) + 0x81;
- if (c1 > 0x9f) {
- c1 += 0x40;
- }
-
- *p++ = c1;
- *p++ = c2;
- continue;
- }
- if (*q == 0x8f) {
- q++;
- if (*q) {
- c1 = (*q++ & ~0x80) & 0xff;
- } else {
- q--;
- break;
- }
- if (*q) {
- c2 = (*q++ & ~0x80) & 0xff;
- } else {
- q -= 2;
- break;
- }
-
- c2 += (c1 & 0x01) ? 0x1f : 0x7d;
- if (c2 >= 0x7f) {
- c2++;
- }
- c1 = ((c1 - 0x21) >> 1) + 0x81;
- if (c1 > 0x9f) {
- c1 += 0x40;
- }
-
- if (c1 >= 0x81 && c1 <= 0x9f) {
- c1 += 0x79;
- } else {
- c1 += 0x0a;
- }
-
- *p++ = c1;
- *p++ = c2;
- continue;
- }
+ multibyte_functions = *functions;
- /* some other chars (may not happen) */
- *p++ = *q++;
+ /* As zend_multibyte_set_functions() gets called after ini settings were
+ * populated, we need to reinitialize script_encoding here.
+ */
+ {
+ const char *value = zend_ini_string("zend.script_encoding", sizeof("zend.script_encoding"), 0);
+ zend_multibyte_set_script_encoding_by_string(value, strlen(value) TSRMLS_CC);
}
- *p = '\0';
- *sjis_length = p - *sjis;
-
- return q-buf; /* return length we actually read */
+ return SUCCESS;
}
-
-static char *zend_multibyte_assemble_encoding_list(zend_encoding **encoding_list, size_t encoding_list_size)
+ZEND_API const zend_multibyte_functions *zend_multibyte_get_functions(TSRMLS_D)
{
- int i, list_size = 0;
- const char *name;
- char *list = NULL;
-
- if (!encoding_list || !encoding_list_size) {
- return NULL;
- }
-
- for (i = 0; i < encoding_list_size; i++) {
- name = (*(encoding_list+i))->name;
- if (name) {
- list_size += strlen(name) + 1;
- if (!list) {
- list = (char*)emalloc(list_size);
- if (!list) {
- return NULL;
- }
- *list = '\0';
- } else {
- list = (char*)erealloc(list, list_size);
- if (!list) {
- return NULL;
- }
- strcat(list, ",");
- }
- strcat(list, name);
- }
- }
- return list;
+ return multibyte_functions.provider_name ? &multibyte_functions: NULL;
}
-
-static int zend_multibyte_parse_encoding_list(const char *encoding_list,
-size_t encoding_list_size, zend_encoding ***result, size_t *result_size)
+ZEND_API const zend_encoding *zend_multibyte_fetch_encoding(const char *name TSRMLS_DC)
{
- int n, size;
- char *p, *p1, *p2, *endp, *tmpstr;
- zend_encoding **list, **entry, *encoding;
-
- list = NULL;
- if (encoding_list == NULL || encoding_list_size <= 0) {
- return -1;
- } else {
- /* copy the encoding_list string for work */
- tmpstr = (char *)estrndup(encoding_list, encoding_list_size);
- if (tmpstr == NULL) {
- return -1;
- }
- /* count the number of listed encoding names */
- endp = tmpstr + encoding_list_size;
- n = 1;
- p1 = tmpstr;
- while ((p2 = zend_memnstr(p1, ",", 1, endp)) != NULL) {
- p1 = p2 + 1;
- n++;
- }
- size = n;
- /* make list */
- list = (zend_encoding**)ecalloc(size, sizeof(zend_encoding*));
- if (list != NULL) {
- entry = list;
- n = 0;
- p1 = tmpstr;
- do {
- p2 = p = zend_memnstr(p1, ",", 1, endp);
- if (p == NULL) {
- p = endp;
- }
- *p = '\0';
- /* trim spaces */
- while (p1 < p && (*p1 == ' ' || *p1 == '\t')) {
- p1++;
- }
- p--;
- while (p > p1 && (*p == ' ' || *p == '\t')) {
- *p = '\0';
- p--;
- }
- /* convert to the encoding number and check encoding */
- encoding = zend_multibyte_fetch_encoding(p1);
- if (encoding)
- {
- *entry++ = encoding;
- n++;
- }
- p1 = p2 + 1;
- } while (n < size && p2 != NULL);
- *result = list;
- *result_size = n;
- }
- efree(tmpstr);
- }
-
- if (list == NULL) {
- return -1;
- }
-
- return 0;
+ return multibyte_functions.encoding_fetcher(name TSRMLS_CC);
}
-
-static zend_encoding* zend_multibyte_find_script_encoding(zend_encoding *onetime_encoding TSRMLS_DC)
+ZEND_API const char *zend_multibyte_get_encoding_name(const zend_encoding *encoding)
{
- zend_encoding *script_encoding;
- char *name, *list;
-
- /* onetime_encoding is prior to everything */
- if (onetime_encoding != NULL) {
- return onetime_encoding;
- }
-
- if (CG(detect_unicode)) {
- /* check out bom(byte order mark) and see if containing wchars */
- script_encoding = zend_multibyte_detect_unicode(TSRMLS_C);
- if (script_encoding != NULL) {
- /* bom or wchar detection is prior to 'script_encoding' option */
- return script_encoding;
- }
- }
-
- /* if no script_encoding specified, just leave alone */
- if (!CG(script_encoding_list) || !CG(script_encoding_list_size)) {
- return NULL;
- }
-
- /* if multiple encodings specified, detect automagically */
- if (CG(script_encoding_list_size) > 1 && CG(encoding_detector)) {
- list = zend_multibyte_assemble_encoding_list(CG(script_encoding_list),
- CG(script_encoding_list_size));
- name = CG(encoding_detector)(LANG_SCNG(script_org),
- LANG_SCNG(script_org_size), list TSRMLS_CC);
- if (list) {
- efree(list);
- }
- if (name) {
- script_encoding = zend_multibyte_fetch_encoding(name);
- efree(name);
- } else {
- script_encoding = NULL;
- }
- return script_encoding;
- }
-
- return *(CG(script_encoding_list));
+ return multibyte_functions.encoding_name_getter(encoding);
}
+ZEND_API int zend_multibyte_check_lexer_compatibility(const zend_encoding *encoding)
+{
+ return multibyte_functions.lexer_compatibility_checker(encoding);
+}
-static zend_encoding* zend_multibyte_detect_unicode(TSRMLS_D)
+ZEND_API const zend_encoding *zend_multibyte_encoding_detector(const unsigned char *string, size_t length, const zend_encoding **list, size_t list_size TSRMLS_DC)
{
- zend_encoding *script_encoding = NULL;
- int bom_size;
- unsigned char *script;
+ return multibyte_functions.encoding_detector(string, length, list, list_size TSRMLS_CC);
+}
- if (LANG_SCNG(script_org_size) < sizeof(BOM_UTF32_LE)-1) {
- return NULL;
- }
+ZEND_API size_t zend_multibyte_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const zend_encoding *encoding_to, const zend_encoding *encoding_from TSRMLS_DC)
+{
+ return multibyte_functions.encoding_converter(to, to_length, from, from_length, encoding_to, encoding_from TSRMLS_CC);
+}
- /* check out BOM */
- if (!memcmp(LANG_SCNG(script_org), BOM_UTF32_BE, sizeof(BOM_UTF32_BE)-1)) {
- script_encoding = &encoding_utf32be;
- bom_size = sizeof(BOM_UTF32_BE)-1;
- } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF32_LE, sizeof(BOM_UTF32_LE)-1)) {
- script_encoding = &encoding_utf32le;
- bom_size = sizeof(BOM_UTF32_LE)-1;
- } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF16_BE, sizeof(BOM_UTF16_BE)-1)) {
- script_encoding = &encoding_utf16be;
- bom_size = sizeof(BOM_UTF16_BE)-1;
- } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF16_LE, sizeof(BOM_UTF16_LE)-1)) {
- script_encoding = &encoding_utf16le;
- bom_size = sizeof(BOM_UTF16_LE)-1;
- } else if (!memcmp(LANG_SCNG(script_org), BOM_UTF8, sizeof(BOM_UTF8)-1)) {
- script_encoding = &encoding_utf8;
- bom_size = sizeof(BOM_UTF8)-1;
- }
+ZEND_API int zend_multibyte_parse_encoding_list(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, int persistent TSRMLS_DC)
+{
+ return multibyte_functions.encoding_list_parser(encoding_list, encoding_list_len, return_list, return_size, persistent TSRMLS_CC);
+}
- if (script_encoding) {
- /* remove BOM */
- script = (unsigned char*)emalloc(LANG_SCNG(script_org_size)+1-bom_size);
- memcpy(script, LANG_SCNG(script_org)+bom_size, LANG_SCNG(script_org_size)+1-bom_size);
- efree(LANG_SCNG(script_org));
- LANG_SCNG(script_org) = script;
- LANG_SCNG(script_org_size) -= bom_size;
+ZEND_API const zend_encoding *zend_multibyte_get_internal_encoding(TSRMLS_D)
+{
+ return multibyte_functions.internal_encoding_getter(TSRMLS_C);
+}
- return script_encoding;
- }
+ZEND_API const zend_encoding *zend_multibyte_get_script_encoding(TSRMLS_D)
+{
+ return LANG_SCNG(script_encoding);
+}
- /* script contains NULL bytes -> auto-detection */
- if (memchr(LANG_SCNG(script_org), 0, LANG_SCNG(script_org_size))) {
- /* make best effort if BOM is missing */
- return zend_multibyte_detect_utf_encoding(LANG_SCNG(script_org), LANG_SCNG(script_org_size) TSRMLS_CC);
+ZEND_API int zend_multibyte_set_script_encoding(const zend_encoding **encoding_list, size_t encoding_list_size TSRMLS_DC)
+{
+ if (CG(script_encoding_list)) {
+ efree(CG(script_encoding_list));
}
+ CG(script_encoding_list) = encoding_list;
+ CG(script_encoding_list_size) = encoding_list_size;
+ return SUCCESS;
+}
- return NULL;
+ZEND_API int zend_multibyte_set_internal_encoding(const zend_encoding *encoding TSRMLS_DC)
+{
+ return multibyte_functions.internal_encoding_setter(encoding TSRMLS_CC);
}
-static zend_encoding *zend_multibyte_detect_utf_encoding(const unsigned char *script, size_t script_size TSRMLS_DC)
+ZEND_API int zend_multibyte_set_script_encoding_by_string(const char *new_value, size_t new_value_length TSRMLS_DC)
{
- const unsigned char *p;
- int wchar_size = 2;
- int le = 0;
+ const zend_encoding **list = 0;
+ size_t size = 0;
- /* utf-16 or utf-32? */
- p = script;
- while ((p-script) < script_size) {
- p = memchr(p, 0, script_size-(p-script)-2);
- if (!p) {
- break;
- }
- if (*(p+1) == '\0' && *(p+2) == '\0') {
- wchar_size = 4;
- break;
- }
+ if (!new_value) {
+ zend_multibyte_set_script_encoding(NULL, 0 TSRMLS_CC);
+ return SUCCESS;
+ }
- /* searching for UTF-32 specific byte orders, so this will do */
- p += 4;
+ if (FAILURE == zend_multibyte_parse_encoding_list(new_value, new_value_length, &list, &size, 1 TSRMLS_CC)) {
+ return FAILURE;
}
- /* BE or LE? */
- p = script;
- while ((p-script) < script_size) {
- if (*p == '\0' && *(p+wchar_size-1) != '\0') {
- /* BE */
- le = 0;
- break;
- } else if (*p != '\0' && *(p+wchar_size-1) == '\0') {
- /* LE* */
- le = 1;
- break;
- }
- p += wchar_size;
+ if (size == 0) {
+ pefree(list, 1);
+ return FAILURE;
}
- if (wchar_size == 2) {
- return le ? &encoding_utf16le : &encoding_utf16be;
- } else {
- return le ? &encoding_utf32le : &encoding_utf32be;
+ if (FAILURE == zend_multibyte_set_script_encoding(list, size TSRMLS_CC)) {
+ return FAILURE;
}
- return NULL;
+ return SUCCESS;
}
-#endif /* ZEND_MULTIBYTE */
/*
* Local variables:
diff --git a/Zend/zend_multibyte.h b/Zend/zend_multibyte.h
index 6641ba8e5..04d317d25 100644
--- a/Zend/zend_multibyte.h
+++ b/Zend/zend_multibyte.h
@@ -22,52 +22,60 @@
#ifndef ZEND_MULTIBYTE_H
#define ZEND_MULTIBYTE_H
-#ifdef ZEND_MULTIBYTE
-
-#define BOM_UTF32_BE "\x00\x00\xfe\xff"
-#define BOM_UTF32_LE "\xff\xfe\x00\x00"
-#define BOM_UTF16_BE "\xfe\xff"
-#define BOM_UTF16_LE "\xff\xfe"
-#define BOM_UTF8 "\xef\xbb\xbf"
+typedef struct _zend_encoding zend_encoding;
typedef size_t (*zend_encoding_filter)(unsigned char **str, size_t *str_length, const unsigned char *buf, size_t length TSRMLS_DC);
-typedef char* (*zend_encoding_detector)(const unsigned char *string, size_t length, char *list TSRMLS_DC);
-
-typedef int (*zend_encoding_converter)(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const char *encoding_to, const char *encoding_from TSRMLS_DC);
-
-typedef size_t (*zend_encoding_oddlen)(const unsigned char *string, size_t length, const char *encoding TSRMLS_DC);
-
-typedef struct _zend_encoding {
- zend_encoding_filter input_filter; /* escape input filter */
- zend_encoding_filter output_filter; /* escape output filter */
- const char *name; /* encoding name */
- const char *(*aliases)[]; /* encoding name aliases */
- zend_bool compatible; /* flex compatible or not */
-} zend_encoding;
+typedef const zend_encoding* (*zend_encoding_fetcher)(const char *encoding_name TSRMLS_DC);
+typedef const char* (*zend_encoding_name_getter)(const zend_encoding *encoding);
+typedef int (*zend_encoding_lexer_compatibility_checker)(const zend_encoding *encoding);
+typedef const zend_encoding *(*zend_encoding_detector)(const unsigned char *string, size_t length, const zend_encoding **list, size_t list_size TSRMLS_DC);
+typedef size_t (*zend_encoding_converter)(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const zend_encoding *encoding_to, const zend_encoding *encoding_from TSRMLS_DC);
+typedef int (*zend_encoding_list_parser)(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, int persistent TSRMLS_DC);
+typedef const zend_encoding *(*zend_encoding_internal_encoding_getter)(TSRMLS_D);
+typedef int (*zend_encoding_internal_encoding_setter)(const zend_encoding *encoding TSRMLS_DC);
+typedef struct _zend_multibyte_functions {
+ const char *provider_name;
+ zend_encoding_fetcher encoding_fetcher;
+ zend_encoding_name_getter encoding_name_getter;
+ zend_encoding_lexer_compatibility_checker lexer_compatibility_checker;
+ zend_encoding_detector encoding_detector;
+ zend_encoding_converter encoding_converter;
+ zend_encoding_list_parser encoding_list_parser;
+ zend_encoding_internal_encoding_getter internal_encoding_getter;
+ zend_encoding_internal_encoding_setter internal_encoding_setter;
+} zend_multibyte_functions;
/*
* zend multibyte APIs
*/
BEGIN_EXTERN_C()
-ZEND_API int zend_multibyte_set_script_encoding(const char *encoding_list,
-size_t encoding_list_size TSRMLS_DC);
-ZEND_API int zend_multibyte_set_internal_encoding(const char *encoding_name TSRMLS_DC);
-ZEND_API int zend_multibyte_set_functions(zend_encoding_detector encoding_detector, zend_encoding_converter encoding_converter, zend_encoding_oddlen encoding_oddlen TSRMLS_DC);
-ZEND_API int zend_multibyte_set_filter(zend_encoding *onetime_encoding TSRMLS_DC);
-ZEND_API zend_encoding* zend_multibyte_fetch_encoding(const char *encoding_name);
-ZEND_API size_t zend_multibyte_script_encoding_filter(unsigned char **to, size_t
-*to_length, const unsigned char *from, size_t from_length TSRMLS_DC);
-ZEND_API size_t zend_multibyte_internal_encoding_filter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length TSRMLS_DC);
-/* in zend_language_scanner.l */
-ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter, zend_encoding *old_encoding TSRMLS_DC);
-ZEND_API int zend_multibyte_yyinput(zend_file_handle *file_handle, char *buf, size_t len TSRMLS_DC);
-ZEND_API int zend_multibyte_read_script(unsigned char *buf, size_t n TSRMLS_DC);
-END_EXTERN_C()
+ZEND_API extern const zend_encoding *zend_multibyte_encoding_utf32be;
+ZEND_API extern const zend_encoding *zend_multibyte_encoding_utf32le;
+ZEND_API extern const zend_encoding *zend_multibyte_encoding_utf16be;
+ZEND_API extern const zend_encoding *zend_multibyte_encoding_utf16le;
+ZEND_API extern const zend_encoding *zend_multibyte_encoding_utf8;
-#endif /* ZEND_MULTIBYTE */
+/* multibyte utility functions */
+ZEND_API int zend_multibyte_set_functions(const zend_multibyte_functions *functions TSRMLS_DC);
+ZEND_API const zend_multibyte_functions *zend_multibyte_get_functions(TSRMLS_D);
+
+ZEND_API const zend_encoding *zend_multibyte_fetch_encoding(const char *name TSRMLS_DC);
+ZEND_API const char *zend_multibyte_get_encoding_name(const zend_encoding *encoding);
+ZEND_API int zend_multibyte_check_lexer_compatibility(const zend_encoding *encoding);
+ZEND_API const zend_encoding *zend_multibyte_encoding_detector(const unsigned char *string, size_t length, const zend_encoding **list, size_t list_size TSRMLS_DC);
+ZEND_API size_t zend_multibyte_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const zend_encoding *encoding_to, const zend_encoding *encoding_from TSRMLS_DC);
+ZEND_API int zend_multibyte_parse_encoding_list(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, int persistent TSRMLS_DC);
+
+ZEND_API const zend_encoding *zend_multibyte_get_internal_encoding(TSRMLS_D);
+ZEND_API const zend_encoding *zend_multibyte_get_script_encoding(TSRMLS_D);
+ZEND_API int zend_multibyte_set_script_encoding(const zend_encoding **encoding_list, size_t encoding_list_size TSRMLS_DC);
+ZEND_API int zend_multibyte_set_internal_encoding(const zend_encoding *encoding TSRMLS_DC);
+ZEND_API int zend_multibyte_set_script_encoding_by_string(const char *new_value, size_t new_value_length TSRMLS_DC);
+
+END_EXTERN_C()
#endif /* ZEND_MULTIBYTE_H */
diff --git a/Zend/zend_multiply.h b/Zend/zend_multiply.h
index 4bafad2b9..ee4319dac 100644
--- a/Zend/zend_multiply.h
+++ b/Zend/zend_multiply.h
@@ -31,6 +31,18 @@
else (lval) = __tmpvar; \
} while (0)
+#elif defined(__x86_64__) && defined(__GNUC__)
+
+#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \
+ long __tmpvar; \
+ __asm__ ("imulq %3,%0\n" \
+ "adcq $0,%1" \
+ : "=r"(__tmpvar),"=r"(usedval) \
+ : "0"(a), "r"(b), "1"(0)); \
+ if (usedval) (dval) = (double) (a) * (double) (b); \
+ else (lval) = __tmpvar; \
+} while (0)
+
#elif SIZEOF_LONG == 4 && defined(HAVE_ZEND_LONG64)
#define ZEND_SIGNED_MULTIPLY_LONG(a, b, lval, dval, usedval) do { \
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 71acc7c05..8fad5ff6e 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -32,7 +32,8 @@
#define DEBUG_OBJECT_HANDLERS 0
-#define Z_OBJ_P(zval_p) zend_objects_get_address(zval_p TSRMLS_CC)
+#define Z_OBJ_P(zval_p) \
+ ((zend_object*)(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(zval_p)].bucket.obj.object))
/*
__X accessors explanation:
@@ -51,14 +52,78 @@
called, we cal __call handler.
*/
+ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */
+{
+ if (!zobj->properties) {
+ HashPosition pos;
+ zend_property_info *prop_info;
+ zend_class_entry *ce = zobj->ce;
+
+ ALLOC_HASHTABLE(zobj->properties);
+ zend_hash_init(zobj->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
+ if (ce->default_properties_count) {
+ for (zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos);
+ zend_hash_get_current_data_ex(&ce->properties_info, (void**)&prop_info, &pos) == SUCCESS;
+ zend_hash_move_forward_ex(&ce->properties_info, &pos)) {
+ if (/*prop_info->ce == ce &&*/
+ (prop_info->flags & ZEND_ACC_STATIC) == 0 &&
+ prop_info->offset >= 0 &&
+ zobj->properties_table[prop_info->offset]) {
+ zend_hash_quick_add(zobj->properties, prop_info->name, prop_info->name_length+1, prop_info->h, (void**)&zobj->properties_table[prop_info->offset], sizeof(zval*), (void**)&zobj->properties_table[prop_info->offset]);
+ }
+ }
+ while (ce->parent && ce->parent->default_properties_count) {
+ ce = ce->parent;
+ for (zend_hash_internal_pointer_reset_ex(&ce->properties_info, &pos);
+ zend_hash_get_current_data_ex(&ce->properties_info, (void**)&prop_info, &pos) == SUCCESS;
+ zend_hash_move_forward_ex(&ce->properties_info, &pos)) {
+ if (prop_info->ce == ce &&
+ (prop_info->flags & ZEND_ACC_STATIC) == 0 &&
+ (prop_info->flags & ZEND_ACC_PRIVATE) != 0 &&
+ prop_info->offset >= 0 &&
+ zobj->properties_table[prop_info->offset]) {
+ zend_hash_quick_add(zobj->properties, prop_info->name, prop_info->name_length+1, prop_info->h, (void**)&zobj->properties_table[prop_info->offset], sizeof(zval*), (void**)&zobj->properties_table[prop_info->offset]);
+ }
+ }
+ }
+ }
+ }
+}
+/* }}} */
+
ZEND_API HashTable *zend_std_get_properties(zval *object TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zobj = Z_OBJ_P(object);
+ if (!zobj->properties) {
+ rebuild_object_properties(zobj);
+ }
return zobj->properties;
}
/* }}} */
+ZEND_API HashTable *zend_std_get_gc(zval *object, zval ***table, int *n TSRMLS_DC) /* {{{ */
+{
+ if (Z_OBJ_HANDLER_P(object, get_properties) != zend_std_get_properties) {
+ *table = NULL;
+ *n = 0;
+ return Z_OBJ_HANDLER_P(object, get_properties)(object TSRMLS_CC);
+ } else {
+ zend_object *zobj = Z_OBJ_P(object);
+
+ if (zobj->properties) {
+ *table = NULL;
+ *n = 0;
+ return zobj->properties;
+ } else {
+ *table = zobj->properties_table;
+ *n = zobj->ce->default_properties_count;
+ return NULL;
+ }
+ }
+}
+/* }}} */
+
ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp TSRMLS_DC) /* {{{ */
{
*is_temp = 0;
@@ -158,7 +223,7 @@ static zval *zend_std_call_issetter(zval *object, zval *member TSRMLS_DC) /* {{{
}
/* }}} */
-static int zend_verify_property_access(zend_property_info *property_info, zend_class_entry *ce TSRMLS_DC) /* {{{ */
+static zend_always_inline int zend_verify_property_access(zend_property_info *property_info, zend_class_entry *ce TSRMLS_DC) /* {{{ */
{
switch (property_info->flags & ZEND_ACC_PPP_MASK) {
case ZEND_ACC_PUBLIC:
@@ -177,7 +242,7 @@ static int zend_verify_property_access(zend_property_info *property_info, zend_c
}
/* }}} */
-static inline zend_bool is_derived_class(zend_class_entry *child_class, zend_class_entry *parent_class) /* {{{ */
+static zend_always_inline zend_bool is_derived_class(zend_class_entry *child_class, zend_class_entry *parent_class) /* {{{ */
{
child_class = child_class->parent;
while (child_class) {
@@ -191,40 +256,48 @@ static inline zend_bool is_derived_class(zend_class_entry *child_class, zend_cla
}
/* }}} */
-ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zval *member, int silent TSRMLS_DC) /* {{{ */
+static zend_always_inline struct _zend_property_info *zend_get_property_info_quick(zend_class_entry *ce, zval *member, int silent, const zend_literal *key TSRMLS_DC) /* {{{ */
{
- zend_property_info *property_info = NULL;
+ zend_property_info *property_info;
zend_property_info *scope_property_info;
zend_bool denied_access = 0;
ulong h;
- if (Z_STRVAL_P(member)[0] == '\0') {
+ if (key && (property_info = CACHED_POLYMORPHIC_PTR(key->cache_slot, ce)) != NULL) {
+ return property_info;
+ }
+
+ if (UNEXPECTED(Z_STRVAL_P(member)[0] == '\0')) {
if (!silent) {
if (Z_STRLEN_P(member) == 0) {
- zend_error(E_ERROR, "Cannot access empty property");
+ zend_error_noreturn(E_ERROR, "Cannot access empty property");
} else {
- zend_error(E_ERROR, "Cannot access property started with '\\0'");
+ zend_error_noreturn(E_ERROR, "Cannot access property started with '\\0'");
}
}
return NULL;
}
- h = zend_get_hash_value(Z_STRVAL_P(member), Z_STRLEN_P(member) + 1);
+ property_info = NULL;
+ h = key ? key->hash_value : zend_get_hash_value(Z_STRVAL_P(member), Z_STRLEN_P(member) + 1);
if (zend_hash_quick_find(&ce->properties_info, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, h, (void **) &property_info)==SUCCESS) {
- if(property_info->flags & ZEND_ACC_SHADOW) {
+ if (UNEXPECTED((property_info->flags & ZEND_ACC_SHADOW) != 0)) {
/* if it's a shadow - go to access it's private */
property_info = NULL;
} else {
- if (zend_verify_property_access(property_info, ce TSRMLS_CC)) {
- if (property_info->flags & ZEND_ACC_CHANGED
- && !(property_info->flags & ZEND_ACC_PRIVATE)) {
+ if (EXPECTED(zend_verify_property_access(property_info, ce TSRMLS_CC) != 0)) {
+ if (EXPECTED((property_info->flags & ZEND_ACC_CHANGED) != 0)
+ && EXPECTED(!(property_info->flags & ZEND_ACC_PRIVATE))) {
/* We still need to make sure that we're not in a context
* where the right property is a different 'statically linked' private
* continue checking below...
*/
} else {
- if (!silent && (property_info->flags & ZEND_ACC_STATIC)) {
+ if (UNEXPECTED((property_info->flags & ZEND_ACC_STATIC) != 0) && !silent) {
zend_error(E_STRICT, "Accessing static property %s::$%s as non static", ce->name, Z_STRVAL_P(member));
}
+ if (key) {
+ CACHE_POLYMORPHIC_PTR(key->cache_slot, ce, property_info);
+ }
return property_info;
}
} else {
@@ -234,20 +307,26 @@ ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce
}
}
if (EG(scope) != ce
- && is_derived_class(ce, EG(scope))
&& EG(scope)
+ && is_derived_class(ce, EG(scope))
&& zend_hash_quick_find(&EG(scope)->properties_info, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, h, (void **) &scope_property_info)==SUCCESS
&& scope_property_info->flags & ZEND_ACC_PRIVATE) {
+ if (key) {
+ CACHE_POLYMORPHIC_PTR(key->cache_slot, ce, scope_property_info);
+ }
return scope_property_info;
} else if (property_info) {
- if (denied_access) {
+ if (UNEXPECTED(denied_access != 0)) {
/* Information was available, but we were denied access. Error out. */
- if (silent) {
- return NULL;
+ if (!silent) {
+ zend_error_noreturn(E_ERROR, "Cannot access %s property %s::$%s", zend_visibility_string(property_info->flags), ce->name, Z_STRVAL_P(member));
}
- zend_error(E_ERROR, "Cannot access %s property %s::$%s", zend_visibility_string(property_info->flags), ce->name, Z_STRVAL_P(member));
+ return NULL;
} else {
/* fall through, return property_info... */
+ if (key) {
+ CACHE_POLYMORPHIC_PTR(key->cache_slot, ce, property_info);
+ }
}
} else {
EG(std_property_info).flags = ZEND_ACC_PUBLIC;
@@ -255,21 +334,28 @@ ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce
EG(std_property_info).name_length = Z_STRLEN_P(member);
EG(std_property_info).h = h;
EG(std_property_info).ce = ce;
+ EG(std_property_info).offset = -1;
property_info = &EG(std_property_info);
}
return property_info;
}
/* }}} */
-ZEND_API int zend_check_property_access(zend_object *zobj, char *prop_info_name, int prop_info_name_len TSRMLS_DC) /* {{{ */
+ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zval *member, int silent TSRMLS_DC) /* {{{ */
+{
+ return zend_get_property_info_quick(ce, member, silent, NULL TSRMLS_CC);
+}
+/* }}} */
+
+ZEND_API int zend_check_property_access(zend_object *zobj, const char *prop_info_name, int prop_info_name_len TSRMLS_DC) /* {{{ */
{
zend_property_info *property_info;
- char *class_name, *prop_name;
+ const char *class_name, *prop_name;
zval member;
zend_unmangle_property_name(prop_info_name, prop_info_name_len, &class_name, &prop_name);
ZVAL_STRING(&member, prop_name, 0);
- property_info = zend_get_property_info(zobj->ce, &member, 1 TSRMLS_CC);
+ property_info = zend_get_property_info_quick(zobj->ce, &member, 1, NULL TSRMLS_CC);
if (!property_info) {
return FAILURE;
}
@@ -311,7 +397,7 @@ static int zend_get_property_guard(zend_object *zobj, zend_property_info *proper
}
/* }}} */
-zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /* {{{ */
+zval *zend_std_read_property(zval *object, zval *member, int type, const zend_literal *key TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zval *tmp_member = NULL;
@@ -323,13 +409,14 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /*
silent = (type == BP_VAR_IS);
zobj = Z_OBJ_P(object);
- if (Z_TYPE_P(member) != IS_STRING) {
- ALLOC_ZVAL(tmp_member);
+ if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) {
+ ALLOC_ZVAL(tmp_member);
*tmp_member = *member;
INIT_PZVAL(tmp_member);
zval_copy_ctor(tmp_member);
convert_to_string(tmp_member);
member = tmp_member;
+ key = NULL;
}
#if DEBUG_OBJECT_HANDLERS
@@ -337,9 +424,16 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /*
#endif
/* make zend_get_property_info silent if we have getter - we may want to use it */
- property_info = zend_get_property_info(zobj->ce, member, (zobj->ce->__get != NULL) TSRMLS_CC);
-
- if (!property_info || zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &retval) == FAILURE) {
+ property_info = zend_get_property_info_quick(zobj->ce, member, (zobj->ce->__get != NULL), key TSRMLS_CC);
+
+ if (UNEXPECTED(!property_info) ||
+ ((EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
+ property_info->offset >= 0) ?
+ (zobj->properties ?
+ ((retval = (zval**)zobj->properties_table[property_info->offset]) == NULL) :
+ (*(retval = &zobj->properties_table[property_info->offset]) == NULL)) :
+ (UNEXPECTED(!zobj->properties) ||
+ UNEXPECTED(zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &retval) == FAILURE)))) {
zend_guard *guard = NULL;
if (zobj->ce->__get &&
@@ -367,7 +461,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /*
Z_UNSET_ISREF_P(rv);
Z_SET_REFCOUNT_P(rv, 0);
}
- if (Z_TYPE_P(rv) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(rv) != IS_OBJECT)) {
zend_error(E_NOTICE, "Indirect modification of overloaded property %s::$%s has no effect", zobj->ce->name, Z_STRVAL_P(member));
}
}
@@ -395,7 +489,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /*
retval = &EG(uninitialized_zval_ptr);
}
}
- if (tmp_member) {
+ if (UNEXPECTED(tmp_member != NULL)) {
Z_ADDREF_PP(retval);
zval_ptr_dtor(&tmp_member);
Z_DELREF_PP(retval);
@@ -404,7 +498,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) /*
}
/* }}} */
-static void zend_std_write_property(zval *object, zval *member, zval *value TSRMLS_DC) /* {{{ */
+ZEND_API void zend_std_write_property(zval *object, zval *member, zval *value, const zend_literal *key TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zval *tmp_member = NULL;
@@ -413,20 +507,28 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
zobj = Z_OBJ_P(object);
- if (Z_TYPE_P(member) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) {
ALLOC_ZVAL(tmp_member);
*tmp_member = *member;
INIT_PZVAL(tmp_member);
zval_copy_ctor(tmp_member);
convert_to_string(tmp_member);
member = tmp_member;
+ key = NULL;
}
- property_info = zend_get_property_info(zobj->ce, member, (zobj->ce->__set != NULL) TSRMLS_CC);
+ property_info = zend_get_property_info_quick(zobj->ce, member, (zobj->ce->__set != NULL), key TSRMLS_CC);
- if (property_info && zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &variable_ptr) == SUCCESS) {
+ if (EXPECTED(property_info != NULL) &&
+ ((EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
+ property_info->offset >= 0) ?
+ (zobj->properties ?
+ ((variable_ptr = (zval**)zobj->properties_table[property_info->offset]) != NULL) :
+ (*(variable_ptr = &zobj->properties_table[property_info->offset]) != NULL)) :
+ (EXPECTED(zobj->properties != NULL) &&
+ EXPECTED(zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &variable_ptr) == SUCCESS)))) {
/* if we already have this value there, we don't actually need to do anything */
- if (*variable_ptr != value) {
+ if (EXPECTED(*variable_ptr != value)) {
/* if we are assigning reference, we shouldn't move it, but instead assign variable
to the same pointer */
if (PZVAL_IS_REF(*variable_ptr)) {
@@ -467,15 +569,27 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
}
guard->in_set = 0;
zval_ptr_dtor(&object);
- } else if (property_info) {
- zval **foo;
-
+ } else if (EXPECTED(property_info != NULL)) {
/* if we assign referenced variable, we should separate it */
Z_ADDREF_P(value);
if (PZVAL_IS_REF(value)) {
SEPARATE_ZVAL(&value);
}
- zend_hash_quick_update(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, &value, sizeof(zval *), (void **) &foo);
+ if (EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
+ property_info->offset >= 0) {
+ if (!zobj->properties) {
+ zobj->properties_table[property_info->offset] = value;
+ } else if (zobj->properties_table[property_info->offset]) {
+ *(zval**)zobj->properties_table[property_info->offset] = value;
+ } else {
+ zend_hash_quick_update(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, &value, sizeof(zval *), (void**)&zobj->properties_table[property_info->offset]);
+ }
+ } else {
+ if (!zobj->properties) {
+ rebuild_object_properties(zobj);
+ }
+ zend_hash_quick_update(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, &value, sizeof(zval *), NULL);
+ }
} else if (zobj->ce->__set && guard && guard->in_set == 1) {
if (Z_STRVAL_P(member)[0] == '\0') {
if (Z_STRLEN_P(member) == 0) {
@@ -487,7 +601,7 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
}
}
- if (tmp_member) {
+ if (UNEXPECTED(tmp_member != NULL)) {
zval_ptr_dtor(&tmp_member);
}
}
@@ -498,7 +612,7 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC) /*
zend_class_entry *ce = Z_OBJCE_P(object);
zval *retval;
- if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
+ if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC) != 0)) {
if(offset == NULL) {
/* [] construct */
ALLOC_INIT_ZVAL(offset);
@@ -509,9 +623,9 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC) /*
zval_ptr_dtor(&offset);
- if (!retval) {
- if (!EG(exception)) {
- zend_error(E_ERROR, "Undefined offset for object of type %s used as array", ce->name);
+ if (UNEXPECTED(!retval)) {
+ if (UNEXPECTED(!EG(exception))) {
+ zend_error_noreturn(E_ERROR, "Undefined offset for object of type %s used as array", ce->name);
}
return 0;
}
@@ -521,7 +635,7 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC) /*
return retval;
} else {
- zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot use object of type %s as array", ce->name);
return 0;
}
}
@@ -531,7 +645,7 @@ static void zend_std_write_dimension(zval *object, zval *offset, zval *value TSR
{
zend_class_entry *ce = Z_OBJCE_P(object);
- if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
+ if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC) != 0)) {
if (!offset) {
ALLOC_INIT_ZVAL(offset);
} else {
@@ -540,7 +654,7 @@ static void zend_std_write_dimension(zval *object, zval *offset, zval *value TSR
zend_call_method_with_2_params(&object, ce, NULL, "offsetset", NULL, offset, value);
zval_ptr_dtor(&offset);
} else {
- zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot use object of type %s as array", ce->name);
}
}
/* }}} */
@@ -551,13 +665,13 @@ static int zend_std_has_dimension(zval *object, zval *offset, int check_empty TS
zval *retval;
int result;
- if (instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC)) {
+ if (EXPECTED(instanceof_function_ex(ce, zend_ce_arrayaccess, 1 TSRMLS_CC) != 0)) {
SEPARATE_ARG_IF_REF(offset);
zend_call_method_with_1_params(&object, ce, NULL, "offsetexists", &retval, offset);
- if (retval) {
+ if (EXPECTED(retval != NULL)) {
result = i_zend_is_true(retval);
zval_ptr_dtor(&retval);
- if (check_empty && result && !EG(exception)) {
+ if (check_empty && result && EXPECTED(!EG(exception))) {
zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, offset);
if (retval) {
result = i_zend_is_true(retval);
@@ -569,14 +683,14 @@ static int zend_std_has_dimension(zval *object, zval *offset, int check_empty TS
}
zval_ptr_dtor(&offset);
} else {
- zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot use object of type %s as array", ce->name);
return 0;
}
return result;
}
/* }}} */
-static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC) /* {{{ */
+static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member, const zend_literal *key TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zval tmp_member;
@@ -585,20 +699,28 @@ static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC
zobj = Z_OBJ_P(object);
- if (Z_TYPE_P(member) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) {
tmp_member = *member;
zval_copy_ctor(&tmp_member);
convert_to_string(&tmp_member);
member = &tmp_member;
+ key = NULL;
}
#if DEBUG_OBJECT_HANDLERS
fprintf(stderr, "Ptr object #%d property: %s\n", Z_OBJ_HANDLE_P(object), Z_STRVAL_P(member));
#endif
- property_info = zend_get_property_info(zobj->ce, member, (zobj->ce->__get != NULL) TSRMLS_CC);
+ property_info = zend_get_property_info_quick(zobj->ce, member, (zobj->ce->__get != NULL), key TSRMLS_CC);
- if (!property_info || zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &retval) == FAILURE) {
+ if (UNEXPECTED(!property_info) ||
+ ((EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
+ property_info->offset >= 0) ?
+ (zobj->properties ?
+ ((retval = (zval**)zobj->properties_table[property_info->offset]) == NULL) :
+ (*(retval = &zobj->properties_table[property_info->offset]) == NULL)) :
+ (UNEXPECTED(!zobj->properties) ||
+ UNEXPECTED(zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &retval) == FAILURE)))) {
zval *new_zval;
zend_guard *guard;
@@ -610,20 +732,37 @@ static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC
/* zend_error(E_NOTICE, "Undefined property: %s", Z_STRVAL_P(member)); */
Z_ADDREF_P(new_zval);
- zend_hash_quick_update(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, &new_zval, sizeof(zval *), (void **) &retval);
+ if (EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
+ property_info->offset >= 0) {
+ if (!zobj->properties) {
+ zobj->properties_table[property_info->offset] = new_zval;
+ retval = &zobj->properties_table[property_info->offset];
+ } else if (zobj->properties_table[property_info->offset]) {
+ *(zval**)zobj->properties_table[property_info->offset] = new_zval;
+ retval = (zval**)zobj->properties_table[property_info->offset];
+ } else {
+ zend_hash_quick_update(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, &new_zval, sizeof(zval *), (void**)&zobj->properties_table[property_info->offset]);
+ retval = (zval**)zobj->properties_table[property_info->offset];
+ }
+ } else {
+ if (!zobj->properties) {
+ rebuild_object_properties(zobj);
+ }
+ zend_hash_quick_update(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, &new_zval, sizeof(zval *), (void **) &retval);
+ }
} else {
/* we do have getter - fail and let it try again with usual get/set */
retval = NULL;
}
}
- if (member == &tmp_member) {
+ if (UNEXPECTED(member == &tmp_member)) {
zval_dtor(member);
}
return retval;
}
/* }}} */
-static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{ */
+static void zend_std_unset_property(zval *object, zval *member, const zend_literal *key TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zval *tmp_member = NULL;
@@ -631,18 +770,28 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{
zobj = Z_OBJ_P(object);
- if (Z_TYPE_P(member) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) {
ALLOC_ZVAL(tmp_member);
*tmp_member = *member;
INIT_PZVAL(tmp_member);
zval_copy_ctor(tmp_member);
convert_to_string(tmp_member);
member = tmp_member;
+ key = NULL;
}
- property_info = zend_get_property_info(zobj->ce, member, (zobj->ce->__unset != NULL) TSRMLS_CC);
-
- if (!property_info || zend_hash_quick_del(zobj->properties, property_info->name, property_info->name_length+1, property_info->h) == FAILURE) {
+ property_info = zend_get_property_info_quick(zobj->ce, member, (zobj->ce->__unset != NULL), key TSRMLS_CC);
+
+ if (EXPECTED(property_info != NULL) &&
+ EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
+ !zobj->properties &&
+ property_info->offset >= 0 &&
+ EXPECTED(zobj->properties_table[property_info->offset] != NULL)) {
+ zval_ptr_dtor(&zobj->properties_table[property_info->offset]);
+ zobj->properties_table[property_info->offset] = NULL;
+ } else if (UNEXPECTED(!property_info) ||
+ !zobj->properties ||
+ UNEXPECTED(zend_hash_quick_del(zobj->properties, property_info->name, property_info->name_length+1, property_info->h) == FAILURE)) {
zend_guard *guard = NULL;
if (zobj->ce->__unset &&
@@ -666,9 +815,13 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{
}
}
}
+ } else if (EXPECTED(property_info != NULL) &&
+ EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
+ property_info->offset >= 0) {
+ zobj->properties_table[property_info->offset] = NULL;
}
- if (tmp_member) {
+ if (UNEXPECTED(tmp_member != NULL)) {
zval_ptr_dtor(&tmp_member);
}
}
@@ -683,7 +836,7 @@ static void zend_std_unset_dimension(zval *object, zval *offset TSRMLS_DC) /* {{
zend_call_method_with_1_params(&object, ce, NULL, "offsetunset", NULL, offset);
zval_ptr_dtor(&offset);
} else {
- zend_error(E_ERROR, "Cannot use object of type %s as array", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot use object of type %s as array", ce->name);
}
}
/* }}} */
@@ -699,9 +852,9 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */
INIT_PZVAL(method_args_ptr);
array_init_size(method_args_ptr, ZEND_NUM_ARGS());
- if (zend_copy_parameters_array(ZEND_NUM_ARGS(), method_args_ptr TSRMLS_CC) == FAILURE) {
+ if (UNEXPECTED(zend_copy_parameters_array(ZEND_NUM_ARGS(), method_args_ptr TSRMLS_CC) == FAILURE)) {
zval_dtor(method_args_ptr);
- zend_error(E_ERROR, "Cannot get arguments for __call");
+ zend_error_noreturn(E_ERROR, "Cannot get arguments for __call");
RETURN_FALSE;
}
@@ -737,7 +890,7 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */
* Returns the function address that should be called, or NULL
* if no such function exists.
*/
-static inline zend_function *zend_check_private_int(zend_function *fbc, zend_class_entry *ce, char *function_name_strval, int function_name_strlen TSRMLS_DC) /* {{{ */
+static inline zend_function *zend_check_private_int(zend_function *fbc, zend_class_entry *ce, char *function_name_strval, int function_name_strlen, ulong hash_value TSRMLS_DC) /* {{{ */
{
if (!ce) {
return 0;
@@ -759,7 +912,7 @@ static inline zend_function *zend_check_private_int(zend_function *fbc, zend_cla
ce = ce->parent;
while (ce) {
if (ce == EG(scope)) {
- if (zend_hash_find(&ce->function_table, function_name_strval, function_name_strlen+1, (void **) &fbc)==SUCCESS
+ if (zend_hash_quick_find(&ce->function_table, function_name_strval, function_name_strlen+1, hash_value, (void **) &fbc)==SUCCESS
&& fbc->op_array.fn_flags & ZEND_ACC_PRIVATE
&& fbc->common.scope == EG(scope)) {
return fbc;
@@ -774,7 +927,7 @@ static inline zend_function *zend_check_private_int(zend_function *fbc, zend_cla
ZEND_API int zend_check_private(zend_function *fbc, zend_class_entry *ce, char *function_name_strval, int function_name_strlen TSRMLS_DC) /* {{{ */
{
- return zend_check_private_int(fbc, ce, function_name_strval, function_name_strlen TSRMLS_CC) != NULL;
+ return zend_check_private_int(fbc, ce, function_name_strval, function_name_strlen, zend_hash_func(function_name_strval, function_name_strlen+1) TSRMLS_CC) != NULL;
}
/* }}} */
@@ -817,35 +970,41 @@ static inline union _zend_function *zend_get_user_call_function(zend_class_entry
{
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
call_user_call->type = ZEND_INTERNAL_FUNCTION;
- call_user_call->module = ce->module;
+ call_user_call->module = (ce->type == ZEND_INTERNAL_CLASS) ? ce->info.internal.module : NULL;
call_user_call->handler = zend_std_call_user_call;
call_user_call->arg_info = NULL;
call_user_call->num_args = 0;
call_user_call->scope = ce;
call_user_call->fn_flags = ZEND_ACC_CALL_VIA_HANDLER;
call_user_call->function_name = estrndup(method_name, method_len);
- call_user_call->pass_rest_by_reference = 0;
- call_user_call->return_reference = ZEND_RETURN_VALUE;
return (union _zend_function *)call_user_call;
}
/* }}} */
-static union _zend_function *zend_std_get_method(zval **object_ptr, char *method_name, int method_len TSRMLS_DC) /* {{{ */
+static union _zend_function *zend_std_get_method(zval **object_ptr, char *method_name, int method_len, const zend_literal *key TSRMLS_DC) /* {{{ */
{
- zend_object *zobj;
zend_function *fbc;
- char *lc_method_name;
zval *object = *object_ptr;
+ zend_object *zobj = Z_OBJ_P(object);
+ ulong hash_value;
+ char *lc_method_name;
ALLOCA_FLAG(use_heap)
- lc_method_name = do_alloca(method_len+1, use_heap);
- /* Create a zend_copy_str_tolower(dest, src, src_length); */
- zend_str_tolower_copy(lc_method_name, method_name, method_len);
+ if (EXPECTED(key != NULL)) {
+ lc_method_name = Z_STRVAL(key->constant);
+ hash_value = key->hash_value;
+ } else {
+ lc_method_name = do_alloca(method_len+1, use_heap);
+ /* Create a zend_copy_str_tolower(dest, src, src_length); */
+ zend_str_tolower_copy(lc_method_name, method_name, method_len);
+ hash_value = zend_hash_func(lc_method_name, method_len+1);
+ }
- zobj = Z_OBJ_P(object);
- if (zend_hash_find(&zobj->ce->function_table, lc_method_name, method_len+1, (void **)&fbc) == FAILURE) {
- free_alloca(lc_method_name, use_heap);
+ if (UNEXPECTED(zend_hash_quick_find(&zobj->ce->function_table, lc_method_name, method_len+1, hash_value, (void **)&fbc) == FAILURE)) {
+ if (UNEXPECTED(!key)) {
+ free_alloca(lc_method_name, use_heap);
+ }
if (zobj->ce->__call) {
return zend_get_user_call_function(zobj->ce, method_name, method_len);
} else {
@@ -860,14 +1019,14 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
/* Ensure that if we're calling a private function, we're allowed to do so.
* If we're not and __call() handler exists, invoke it, otherwise error out.
*/
- updated_fbc = zend_check_private_int(fbc, Z_OBJ_HANDLER_P(object, get_class_entry)(object TSRMLS_CC), lc_method_name, method_len TSRMLS_CC);
- if (updated_fbc) {
+ updated_fbc = zend_check_private_int(fbc, Z_OBJ_HANDLER_P(object, get_class_entry)(object TSRMLS_CC), lc_method_name, method_len, hash_value TSRMLS_CC);
+ if (EXPECTED(updated_fbc != NULL)) {
fbc = updated_fbc;
} else {
if (zobj->ce->__call) {
fbc = zend_get_user_call_function(zobj->ce, method_name, method_len);
} else {
- zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), method_name, EG(scope) ? EG(scope)->name : "");
+ zend_error_noreturn(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), method_name, EG(scope) ? EG(scope)->name : "");
}
}
} else {
@@ -879,7 +1038,7 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
fbc->op_array.fn_flags & ZEND_ACC_CHANGED) {
zend_function *priv_fbc;
- if (zend_hash_find(&EG(scope)->function_table, lc_method_name, method_len+1, (void **) &priv_fbc)==SUCCESS
+ if (zend_hash_quick_find(&EG(scope)->function_table, lc_method_name, method_len+1, hash_value, (void **) &priv_fbc)==SUCCESS
&& priv_fbc->common.fn_flags & ZEND_ACC_PRIVATE
&& priv_fbc->common.scope == EG(scope)) {
fbc = priv_fbc;
@@ -889,17 +1048,19 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
/* Ensure that if we're calling a protected function, we're allowed to do so.
* If we're not and __call() handler exists, invoke it, otherwise error out.
*/
- if (!zend_check_protected(zend_get_function_root_class(fbc), EG(scope))) {
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), EG(scope)))) {
if (zobj->ce->__call) {
fbc = zend_get_user_call_function(zobj->ce, method_name, method_len);
} else {
- zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), method_name, EG(scope) ? EG(scope)->name : "");
+ zend_error_noreturn(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), method_name, EG(scope) ? EG(scope)->name : "");
}
}
}
}
- free_alloca(lc_method_name, use_heap);
+ if (UNEXPECTED(!key)) {
+ free_alloca(lc_method_name, use_heap);
+ }
return fbc;
}
/* }}} */
@@ -915,9 +1076,9 @@ ZEND_API void zend_std_callstatic_user_call(INTERNAL_FUNCTION_PARAMETERS) /* {{{
INIT_PZVAL(method_args_ptr);
array_init_size(method_args_ptr, ZEND_NUM_ARGS());
- if (zend_copy_parameters_array(ZEND_NUM_ARGS(), method_args_ptr TSRMLS_CC) == FAILURE) {
+ if (UNEXPECTED(zend_copy_parameters_array(ZEND_NUM_ARGS(), method_args_ptr TSRMLS_CC) == FAILURE)) {
zval_dtor(method_args_ptr);
- zend_error(E_ERROR, "Cannot get arguments for " ZEND_CALLSTATIC_FUNC_NAME);
+ zend_error_noreturn(E_ERROR, "Cannot get arguments for " ZEND_CALLSTATIC_FUNC_NAME);
RETURN_FALSE;
}
@@ -952,15 +1113,13 @@ static inline union _zend_function *zend_get_user_callstatic_function(zend_class
{
zend_internal_function *callstatic_user_call = emalloc(sizeof(zend_internal_function));
callstatic_user_call->type = ZEND_INTERNAL_FUNCTION;
- callstatic_user_call->module = ce->module;
+ callstatic_user_call->module = (ce->type == ZEND_INTERNAL_CLASS) ? ce->info.internal.module : NULL;
callstatic_user_call->handler = zend_std_callstatic_user_call;
callstatic_user_call->arg_info = NULL;
callstatic_user_call->num_args = 0;
callstatic_user_call->scope = ce;
callstatic_user_call->fn_flags = ZEND_ACC_STATIC | ZEND_ACC_PUBLIC | ZEND_ACC_CALL_VIA_HANDLER;
callstatic_user_call->function_name = estrndup(method_name, method_len);
- callstatic_user_call->pass_rest_by_reference = 0;
- callstatic_user_call->return_reference = ZEND_RETURN_VALUE;
return (zend_function *)callstatic_user_call;
}
@@ -968,13 +1127,23 @@ static inline union _zend_function *zend_get_user_callstatic_function(zend_class
/* This is not (yet?) in the API, but it belongs in the built-in objects callbacks */
-ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *function_name_strval, int function_name_strlen TSRMLS_DC) /* {{{ */
+ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, const char *function_name_strval, int function_name_strlen, const zend_literal *key TSRMLS_DC) /* {{{ */
{
zend_function *fbc = NULL;
char *lc_class_name, *lc_function_name = NULL;
-
- lc_function_name = zend_str_tolower_dup(function_name_strval, function_name_strlen);
+ ulong hash_value;
+ ALLOCA_FLAG(use_heap)
+ if (EXPECTED(key != NULL)) {
+ lc_function_name = Z_STRVAL(key->constant);
+ hash_value = key->hash_value;
+ } else {
+ lc_function_name = do_alloca(function_name_strlen+1, use_heap);
+ /* Create a zend_copy_str_tolower(dest, src, src_length); */
+ zend_str_tolower_copy(lc_function_name, function_name_strval, function_name_strlen);
+ hash_value = zend_hash_func(lc_function_name, function_name_strlen+1);
+ }
+
if (function_name_strlen == ce->name_length && ce->constructor) {
lc_class_name = zend_str_tolower_dup(ce->name, ce->name_length);
/* Only change the method to the constructor if the constructor isn't called __construct
@@ -985,8 +1154,11 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
}
efree(lc_class_name);
}
- if (!fbc && zend_hash_find(&ce->function_table, lc_function_name, function_name_strlen+1, (void **) &fbc)==FAILURE) {
- efree(lc_function_name);
+ if (EXPECTED(!fbc) &&
+ UNEXPECTED(zend_hash_quick_find(&ce->function_table, lc_function_name, function_name_strlen+1, hash_value, (void **) &fbc)==FAILURE)) {
+ if (UNEXPECTED(!key)) {
+ free_alloca(lc_function_name, use_heap);
+ }
if (ce->__call &&
EG(This) &&
@@ -999,13 +1171,12 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
return NULL;
}
}
- efree(lc_function_name);
#if MBO_0
/* right now this function is used for non static method lookup too */
/* Is the function static */
- if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
- zend_error(E_ERROR, "Cannot call non static method %s::%s() without object", ZEND_FN_SCOPE_NAME(fbc), fbc->common.function_name);
+ if (UNEXPECTED(!(fbc->common.fn_flags & ZEND_ACC_STATIC))) {
+ zend_error_noreturn(E_ERROR, "Cannot call non static method %s::%s() without object", ZEND_FN_SCOPE_NAME(fbc), fbc->common.function_name);
}
#endif
if (fbc->op_array.fn_flags & ZEND_ACC_PUBLIC) {
@@ -1015,76 +1186,88 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- updated_fbc = zend_check_private_int(fbc, EG(scope), function_name_strval, function_name_strlen TSRMLS_CC);
- if (updated_fbc) {
+ updated_fbc = zend_check_private_int(fbc, EG(scope), lc_function_name, function_name_strlen, hash_value TSRMLS_CC);
+ if (EXPECTED(updated_fbc != NULL)) {
fbc = updated_fbc;
} else {
if (ce->__callstatic) {
- return zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen);
+ fbc = zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen);
+ } else {
+ zend_error_noreturn(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), function_name_strval, EG(scope) ? EG(scope)->name : "");
}
- zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), function_name_strval, EG(scope) ? EG(scope)->name : "");
}
} else if ((fbc->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (!zend_check_protected(zend_get_function_root_class(fbc), EG(scope))) {
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(fbc), EG(scope)))) {
if (ce->__callstatic) {
- return zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen);
+ fbc = zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen);
+ } else {
+ zend_error_noreturn(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), function_name_strval, EG(scope) ? EG(scope)->name : "");
}
- zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), function_name_strval, EG(scope) ? EG(scope)->name : "");
}
}
+ if (UNEXPECTED(!key)) {
+ free_alloca(lc_function_name, use_heap);
+ }
+
return fbc;
}
/* }}} */
-ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, char *property_name, int property_name_len, zend_bool silent TSRMLS_DC) /* {{{ */
+ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *property_name, int property_name_len, zend_bool silent, const zend_literal *key TSRMLS_DC) /* {{{ */
{
- zval **retval = NULL;
- zend_class_entry *tmp_ce = ce;
zend_property_info *property_info;
- zend_property_info std_property_info;
-
- if (zend_hash_find(&ce->properties_info, property_name, property_name_len+1, (void **) &property_info)==FAILURE) {
- std_property_info.flags = ZEND_ACC_PUBLIC;
- std_property_info.name = property_name;
- std_property_info.name_length = property_name_len;
- std_property_info.h = zend_get_hash_value(std_property_info.name, std_property_info.name_length+1);
- std_property_info.ce = ce;
- property_info = &std_property_info;
- }
+ ulong hash_value;
+
+ if (UNEXPECTED(!key) ||
+ (property_info = CACHED_POLYMORPHIC_PTR(key->cache_slot, ce)) == NULL) {
+ if (EXPECTED(key != NULL)) {
+ hash_value = key->hash_value;
+ } else {
+ hash_value = zend_hash_func(property_name, property_name_len+1);
+ }
+
+ if (UNEXPECTED(zend_hash_quick_find(&ce->properties_info, property_name, property_name_len+1, hash_value, (void **) &property_info)==FAILURE)) {
+ if (!silent) {
+ zend_error_noreturn(E_ERROR, "Access to undeclared static property: %s::$%s", ce->name, property_name);
+ }
+ return NULL;
+ }
#if DEBUG_OBJECT_HANDLERS
- zend_printf("Access type for %s::%s is %s\n", ce->name, property_name, zend_visibility_string(property_info->flags));
+ zend_printf("Access type for %s::%s is %s\n", ce->name, property_name, zend_visibility_string(property_info->flags));
#endif
- if (!zend_verify_property_access(property_info, ce TSRMLS_CC)) {
- if (!silent) {
- zend_error(E_ERROR, "Cannot access %s property %s::$%s", zend_visibility_string(property_info->flags), ce->name, property_name);
+ if (UNEXPECTED(!zend_verify_property_access(property_info, ce TSRMLS_CC))) {
+ if (!silent) {
+ zend_error_noreturn(E_ERROR, "Cannot access %s property %s::$%s", zend_visibility_string(property_info->flags), ce->name, property_name);
+ }
+ return NULL;
}
- return NULL;
- }
- zend_update_class_constants(tmp_ce TSRMLS_CC);
+ if (UNEXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0)) {
+ if (!silent) {
+ zend_error_noreturn(E_ERROR, "Access to undeclared static property: %s::$%s", ce->name, property_name);
+ }
+ return NULL;
+ }
- zend_hash_quick_find(CE_STATIC_MEMBERS(tmp_ce), property_info->name, property_info->name_length+1, property_info->h, (void **) &retval);
+ zend_update_class_constants(ce TSRMLS_CC);
- if (!retval) {
- if (silent) {
- return NULL;
- } else {
- zend_error(E_ERROR, "Access to undeclared static property: %s::$%s", ce->name, property_name);
+ if (EXPECTED(key != NULL)) {
+ CACHE_POLYMORPHIC_PTR(key->cache_slot, ce, property_info);
}
}
- return retval;
+ return &CE_STATIC_MEMBERS(ce)[property_info->offset];
}
/* }}} */
-ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, char *property_name, int property_name_len TSRMLS_DC) /* {{{ */
+ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, const char *property_name, int property_name_len, const zend_literal *key TSRMLS_DC) /* {{{ */
{
- zend_error(E_ERROR, "Attempt to unset static property %s::$%s", ce->name, property_name);
+ zend_error_noreturn(E_ERROR, "Attempt to unset static property %s::$%s", ce->name, property_name);
return 0;
}
/* }}} */
@@ -1100,11 +1283,11 @@ ZEND_API union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC)
} else if (constructor->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (constructor->common.scope != EG(scope)) {
+ if (UNEXPECTED(constructor->common.scope != EG(scope))) {
if (EG(scope)) {
- zend_error(E_ERROR, "Call to private %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope)->name);
+ zend_error_noreturn(E_ERROR, "Call to private %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope)->name);
} else {
- zend_error(E_ERROR, "Call to private %s::%s() from invalid context", constructor->common.scope->name, constructor->common.function_name);
+ zend_error_noreturn(E_ERROR, "Call to private %s::%s() from invalid context", constructor->common.scope->name, constructor->common.function_name);
}
}
} else if ((constructor->common.fn_flags & ZEND_ACC_PROTECTED)) {
@@ -1112,11 +1295,11 @@ ZEND_API union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC)
* Constructors only have prototype if they are defined by an interface but
* it is the compilers responsibility to take care of the prototype.
*/
- if (!zend_check_protected(zend_get_function_root_class(constructor), EG(scope))) {
+ if (UNEXPECTED(!zend_check_protected(zend_get_function_root_class(constructor), EG(scope)))) {
if (EG(scope)) {
- zend_error(E_ERROR, "Call to protected %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope)->name);
+ zend_error_noreturn(E_ERROR, "Call to protected %s::%s() from context '%s'", constructor->common.scope->name, constructor->common.function_name, EG(scope)->name);
} else {
- zend_error(E_ERROR, "Call to protected %s::%s() from invalid context", constructor->common.scope->name, constructor->common.function_name);
+ zend_error_noreturn(E_ERROR, "Call to protected %s::%s() from invalid context", constructor->common.scope->name, constructor->common.function_name);
}
}
}
@@ -1138,36 +1321,77 @@ static int zend_std_compare_objects(zval *o1, zval *o2 TSRMLS_DC) /* {{{ */
if (zobj1->ce != zobj2->ce) {
return 1; /* different classes */
}
- return zend_compare_symbol_tables_i(zobj1->properties, zobj2->properties TSRMLS_CC);
+ if (!zobj1->properties && !zobj2->properties) {
+ int i;
+ for (i = 0; i < zobj1->ce->default_properties_count; i++) {
+ if (zobj1->properties_table[i]) {
+ if (zobj2->properties_table[i]) {
+ zval result;
+
+ if (compare_function(&result, zobj1->properties_table[i], zobj2->properties_table[i] TSRMLS_CC)==FAILURE) {
+ return 1;
+ }
+ if (Z_LVAL(result) != 0) {
+ return Z_LVAL(result);
+ }
+ } else {
+ return 1;
+ }
+ } else {
+ if (zobj2->properties_table[i]) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+ }
+ return 0;
+ } else {
+ if (!zobj1->properties) {
+ rebuild_object_properties(zobj1);
+ }
+ if (!zobj2->properties) {
+ rebuild_object_properties(zobj2);
+ }
+ return zend_compare_symbol_tables_i(zobj1->properties, zobj2->properties TSRMLS_CC);
+ }
}
/* }}} */
-static int zend_std_has_property(zval *object, zval *member, int has_set_exists TSRMLS_DC) /* {{{ */
+static int zend_std_has_property(zval *object, zval *member, int has_set_exists, const zend_literal *key TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
int result;
- zval **value;
+ zval **value = NULL;
zval *tmp_member = NULL;
zend_property_info *property_info;
zobj = Z_OBJ_P(object);
- if (Z_TYPE_P(member) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(member) != IS_STRING)) {
ALLOC_ZVAL(tmp_member);
*tmp_member = *member;
INIT_PZVAL(tmp_member);
zval_copy_ctor(tmp_member);
convert_to_string(tmp_member);
member = tmp_member;
+ key = NULL;
}
#if DEBUG_OBJECT_HANDLERS
fprintf(stderr, "Read object #%d property: %s\n", Z_OBJ_HANDLE_P(object), Z_STRVAL_P(member));
#endif
- property_info = zend_get_property_info(zobj->ce, member, 1 TSRMLS_CC);
+ property_info = zend_get_property_info_quick(zobj->ce, member, 1, key TSRMLS_CC);
- if (!property_info || zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &value) == FAILURE) {
+ if (UNEXPECTED(!property_info) ||
+ ((EXPECTED((property_info->flags & ZEND_ACC_STATIC) == 0) &&
+ property_info->offset >= 0) ?
+ (zobj->properties ?
+ ((value = (zval**)zobj->properties_table[property_info->offset]) == NULL) :
+ (*(value = &zobj->properties_table[property_info->offset]) == NULL)) :
+ (UNEXPECTED(!zobj->properties) ||
+ UNEXPECTED(zend_hash_quick_find(zobj->properties, property_info->name, property_info->name_length+1, property_info->h, (void **) &value) == FAILURE)))) {
zend_guard *guard;
result = 0;
@@ -1188,7 +1412,7 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists
result = zend_is_true(rv);
zval_ptr_dtor(&rv);
if (has_set_exists && result) {
- if (!EG(exception) && zobj->ce->__get && !guard->in_get) {
+ if (EXPECTED(!EG(exception)) && zobj->ce->__get && !guard->in_get) {
guard->in_get = 1;
rv = zend_std_call_getter(object, member TSRMLS_CC);
guard->in_get = 0;
@@ -1221,7 +1445,7 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists
}
}
- if (tmp_member) {
+ if (UNEXPECTED(tmp_member != NULL)) {
zval_ptr_dtor(&tmp_member);
}
return result;
@@ -1237,7 +1461,7 @@ zend_class_entry *zend_std_object_get_class(const zval *object TSRMLS_DC) /* {{{
}
/* }}} */
-int zend_std_object_get_class_name(const zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) /* {{{ */
+int zend_std_object_get_class_name(const zval *object, const char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC) /* {{{ */
{
zend_object *zobj;
zend_class_entry *ce;
@@ -1268,14 +1492,14 @@ ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int ty
ce = Z_OBJCE_P(readobj);
if (ce->__tostring &&
(zend_call_method_with_0_params(&readobj, ce, &ce->__tostring, "__tostring", &retval) || EG(exception))) {
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
if (retval) {
zval_ptr_dtor(&retval);
}
- zend_error(E_ERROR, "Method %s::__toString() must not throw an exception", ce->name);
+ zend_error_noreturn(E_ERROR, "Method %s::__toString() must not throw an exception", ce->name);
return FAILURE;
}
- if (Z_TYPE_P(retval) == IS_STRING) {
+ if (EXPECTED(Z_TYPE_P(retval) == IS_STRING)) {
INIT_PZVAL(writeobj);
if (readobj == writeobj) {
zval_dtor(readobj);
@@ -1382,6 +1606,7 @@ ZEND_API zend_object_handlers std_object_handlers = {
NULL, /* count_elements */
NULL, /* get_debug_info */
zend_std_get_closure, /* get_closure */
+ zend_std_get_gc, /* get_gc */
};
/*
diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h
index 73c835f79..06f3dbbe3 100644
--- a/Zend/zend_object_handlers.h
+++ b/Zend/zend_object_handlers.h
@@ -24,13 +24,14 @@
union _zend_function;
struct _zend_property_info;
+struct _zend_literal;
/* The following rule applies to read_property() and read_dimension() implementations:
If you return a zval which is not otherwise referenced by the extension or the engine's
symbol table, its reference count should be 0.
*/
/* Used to fetch property from the object, read-only */
-typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, int type TSRMLS_DC);
+typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, int type, const struct _zend_literal *key TSRMLS_DC);
/* Used to fetch dimension from the object, read-only */
typedef zval *(*zend_object_read_dimension_t)(zval *object, zval *offset, int type TSRMLS_DC);
@@ -42,14 +43,14 @@ typedef zval *(*zend_object_read_dimension_t)(zval *object, zval *offset, int ty
any changes. You should NOT modify the reference count of the value passed to you.
*/
/* Used to set property of the object */
-typedef void (*zend_object_write_property_t)(zval *object, zval *member, zval *value TSRMLS_DC);
+typedef void (*zend_object_write_property_t)(zval *object, zval *member, zval *value, const struct _zend_literal *key TSRMLS_DC);
/* Used to set dimension of the object */
typedef void (*zend_object_write_dimension_t)(zval *object, zval *offset, zval *value TSRMLS_DC);
/* Used to create pointer to the property of the object, for future direct r/w access */
-typedef zval **(*zend_object_get_property_ptr_ptr_t)(zval *object, zval *member TSRMLS_DC);
+typedef zval **(*zend_object_get_property_ptr_ptr_t)(zval *object, zval *member, const struct _zend_literal *key TSRMLS_DC);
/* Used to set object value. Can be used to override assignments and scalar
write ops (like ++, +=) on the object */
@@ -66,13 +67,13 @@ typedef zval* (*zend_object_get_t)(zval *object TSRMLS_DC);
* 1 (set) whether property exists and is true
* 2 (exists) whether property exists
*/
-typedef int (*zend_object_has_property_t)(zval *object, zval *member, int has_set_exists TSRMLS_DC);
+typedef int (*zend_object_has_property_t)(zval *object, zval *member, int has_set_exists, const struct _zend_literal *key TSRMLS_DC);
/* Used to check if a dimension of the object exists */
typedef int (*zend_object_has_dimension_t)(zval *object, zval *member, int check_empty TSRMLS_DC);
/* Used to remove a property of the object */
-typedef void (*zend_object_unset_property_t)(zval *object, zval *member TSRMLS_DC);
+typedef void (*zend_object_unset_property_t)(zval *object, zval *member, const struct _zend_literal *key TSRMLS_DC);
/* Used to remove a dimension of the object */
typedef void (*zend_object_unset_dimension_t)(zval *object, zval *offset TSRMLS_DC);
@@ -86,8 +87,8 @@ typedef HashTable *(*zend_object_get_debug_info_t)(zval *object, int *is_temp TS
/* args on stack! */
/* Andi - EX(fbc) (function being called) needs to be initialized already in the INIT fcall opcode so that the parameters can be parsed the right way. We need to add another callback for this.
*/
-typedef int (*zend_object_call_method_t)(char *method, INTERNAL_FUNCTION_PARAMETERS);
-typedef union _zend_function *(*zend_object_get_method_t)(zval **object_ptr, char *method, int method_len TSRMLS_DC);
+typedef int (*zend_object_call_method_t)(const char *method, INTERNAL_FUNCTION_PARAMETERS);
+typedef union _zend_function *(*zend_object_get_method_t)(zval **object_ptr, char *method, int method_len, const struct _zend_literal *key TSRMLS_DC);
typedef union _zend_function *(*zend_object_get_constructor_t)(zval *object TSRMLS_DC);
/* Object maintenance/destruction */
@@ -97,7 +98,7 @@ typedef void (*zend_object_delete_obj_t)(zval *object TSRMLS_DC);
typedef zend_object_value (*zend_object_clone_obj_t)(zval *object TSRMLS_DC);
typedef zend_class_entry *(*zend_object_get_class_entry_t)(const zval *object TSRMLS_DC);
-typedef int (*zend_object_get_class_name_t)(const zval *object, char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC);
+typedef int (*zend_object_get_class_name_t)(const zval *object, const char **class_name, zend_uint *class_name_len, int parent TSRMLS_DC);
typedef int (*zend_object_compare_t)(zval *object1, zval *object2 TSRMLS_DC);
/* Cast an object to some other type
@@ -110,6 +111,8 @@ typedef int (*zend_object_count_elements_t)(zval *object, long *count TSRMLS_DC)
typedef int (*zend_object_get_closure_t)(zval *obj, zend_class_entry **ce_ptr, union _zend_function **fptr_ptr, zval **zobj_ptr TSRMLS_DC);
+typedef HashTable *(*zend_object_get_gc_t)(zval *object, zval ***table, int *n TSRMLS_DC);
+
struct _zend_object_handlers {
/* general object functions */
zend_object_add_ref_t add_ref;
@@ -138,19 +141,22 @@ struct _zend_object_handlers {
zend_object_count_elements_t count_elements;
zend_object_get_debug_info_t get_debug_info;
zend_object_get_closure_t get_closure;
+ zend_object_get_gc_t get_gc;
};
extern ZEND_API zend_object_handlers std_object_handlers;
BEGIN_EXTERN_C()
-ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, char *function_name_strval, int function_name_strlen TSRMLS_DC);
-ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, char *property_name, int property_name_len, zend_bool silent TSRMLS_DC);
-ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, char *property_name, int property_name_len TSRMLS_DC);
+ZEND_API union _zend_function *zend_std_get_static_method(zend_class_entry *ce, const char *function_name_strval, int function_name_strlen, const struct _zend_literal *key TSRMLS_DC);
+ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *property_name, int property_name_len, zend_bool silent, const struct _zend_literal *key TSRMLS_DC);
+ZEND_API zend_bool zend_std_unset_static_property(zend_class_entry *ce, const char *property_name, int property_name_len, const struct _zend_literal *key TSRMLS_DC);
ZEND_API union _zend_function *zend_std_get_constructor(zval *object TSRMLS_DC);
ZEND_API struct _zend_property_info *zend_get_property_info(zend_class_entry *ce, zval *member, int silent TSRMLS_DC);
ZEND_API HashTable *zend_std_get_properties(zval *object TSRMLS_DC);
ZEND_API HashTable *zend_std_get_debug_info(zval *object, int *is_temp TSRMLS_DC);
ZEND_API int zend_std_cast_object_tostring(zval *readobj, zval *writeobj, int type TSRMLS_DC);
+ZEND_API void zend_std_write_property(zval *object, zval *member, zval *value, const struct _zend_literal *key TSRMLS_DC);
+ZEND_API void rebuild_object_properties(zend_object *zobj);
#define IS_ZEND_STD_OBJECT(z) (Z_TYPE(z) == IS_OBJECT && (Z_OBJ_HT((z))->get_class_entry != NULL))
@@ -160,7 +166,7 @@ ZEND_API int zend_check_private(union _zend_function *fbc, zend_class_entry *ce,
ZEND_API int zend_check_protected(zend_class_entry *ce, zend_class_entry *scope);
-ZEND_API int zend_check_property_access(zend_object *zobj, char *prop_info_name, int prop_info_name_len TSRMLS_DC);
+ZEND_API int zend_check_property_access(zend_object *zobj, const char *prop_info_name, int prop_info_name_len TSRMLS_DC);
ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS);
END_EXTERN_C()
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c
index f069c393d..cd8791ac6 100644
--- a/Zend/zend_objects.c
+++ b/Zend/zend_objects.c
@@ -28,10 +28,9 @@
ZEND_API void zend_object_std_init(zend_object *object, zend_class_entry *ce TSRMLS_DC)
{
- ALLOC_HASHTABLE(object->properties);
- zend_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
-
object->ce = ce;
+ object->properties = NULL;
+ object->properties_table = NULL;
object->guards = NULL;
}
@@ -44,6 +43,18 @@ ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
if (object->properties) {
zend_hash_destroy(object->properties);
FREE_HASHTABLE(object->properties);
+ if (object->properties_table) {
+ efree(object->properties_table);
+ }
+ } else if (object->properties_table) {
+ int i;
+
+ for (i = 0; i < object->ce->default_properties_count; i++) {
+ if (object->properties_table[i]) {
+ zval_ptr_dtor(&object->properties_table[i]);
+ }
+ }
+ efree(object->properties_table);
}
}
@@ -133,9 +144,11 @@ ZEND_API zend_object_value zend_objects_new(zend_object **object, zend_class_ent
*object = emalloc(sizeof(zend_object));
(*object)->ce = class_type;
+ (*object)->properties = NULL;
+ (*object)->properties_table = NULL;
+ (*object)->guards = NULL;
retval.handle = zend_objects_store_put(*object, (zend_objects_store_dtor_t) zend_objects_destroy_object, (zend_objects_free_object_storage_t) zend_objects_free_object_storage, NULL TSRMLS_CC);
retval.handlers = &std_object_handlers;
- (*object)->guards = NULL;
return retval;
}
@@ -146,7 +159,47 @@ ZEND_API zend_object *zend_objects_get_address(const zval *zobject TSRMLS_DC)
ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_value new_obj_val, zend_object *old_object, zend_object_handle handle TSRMLS_DC)
{
- zend_hash_copy(new_object->properties, old_object->properties, zval_copy_property_ctor(old_object->ce), (void *) NULL /* Not used anymore */, sizeof(zval *));
+ int i;
+
+ if (old_object->properties_table) {
+ if (!new_object->properties_table) {
+ new_object->properties_table = emalloc(sizeof(zval*) * old_object->ce->default_properties_count);
+ memset(new_object->properties_table, 0, sizeof(zval*) * old_object->ce->default_properties_count);
+ }
+ for (i = 0; i < old_object->ce->default_properties_count; i++) {
+ if (!new_object->properties) {
+ if (new_object->properties_table[i]) {
+ zval_ptr_dtor(&new_object->properties_table[i]);
+ }
+ }
+ if (!old_object->properties) {
+ new_object->properties_table[i] = old_object->properties_table[i];
+ if (new_object->properties_table[i]) {
+ Z_ADDREF_P(new_object->properties_table[i]);
+ }
+ }
+ }
+ }
+ if (old_object->properties) {
+ if (!new_object->properties) {
+ ALLOC_HASHTABLE(new_object->properties);
+ zend_hash_init(new_object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
+ }
+ zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, sizeof(zval *));
+ if (old_object->properties_table) {
+ HashPosition pos;
+ zend_property_info *prop_info;
+ for (zend_hash_internal_pointer_reset_ex(&old_object->ce->properties_info, &pos);
+ zend_hash_get_current_data_ex(&old_object->ce->properties_info, (void**)&prop_info, &pos) == SUCCESS;
+ zend_hash_move_forward_ex(&old_object->ce->properties_info, &pos)) {
+ if ((prop_info->flags & ZEND_ACC_STATIC) == 0) {
+ if (zend_hash_quick_find(new_object->properties, prop_info->name, prop_info->name_length+1, prop_info->h, (void**)&new_object->properties_table[prop_info->offset]) == FAILURE) {
+ new_object->properties_table[prop_info->offset] = NULL;
+ }
+ }
+ }
+ }
+ }
if (old_object->ce->clone) {
zval *new_obj;
@@ -174,9 +227,6 @@ ZEND_API zend_object_value zend_objects_clone_obj(zval *zobject TSRMLS_DC)
old_object = zend_objects_get_address(zobject TSRMLS_CC);
new_obj_val = zend_objects_new(&new_object, old_object->ce TSRMLS_CC);
- ALLOC_HASHTABLE(new_object->properties);
- zend_hash_init(new_object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
-
zend_objects_clone_members(new_object, new_obj_val, old_object, handle TSRMLS_CC);
return new_obj_val;
diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c
index 45627e5ff..dbd234440 100644
--- a/Zend/zend_objects_API.c
+++ b/Zend/zend_objects_API.c
@@ -314,6 +314,10 @@ typedef struct _zend_proxy_object {
static zend_object_handlers zend_object_proxy_handlers;
+ZEND_API void zend_objects_proxy_destroy(zend_object *object, zend_object_handle handle TSRMLS_DC)
+{
+}
+
ZEND_API void zend_objects_proxy_free_storage(zend_proxy_object *object TSRMLS_DC)
{
zval_ptr_dtor(&object->object);
@@ -336,13 +340,14 @@ ZEND_API zval *zend_object_create_proxy(zval *object, zval *member TSRMLS_DC)
zval *retval;
pobj->object = object;
- pobj->property = member;
- zval_add_ref(&pobj->property);
zval_add_ref(&pobj->object);
+ ALLOC_ZVAL(pobj->property);
+ INIT_PZVAL_COPY(pobj->property, member);
+ zval_copy_ctor(pobj->property);
MAKE_STD_ZVAL(retval);
Z_TYPE_P(retval) = IS_OBJECT;
- Z_OBJ_HANDLE_P(retval) = zend_objects_store_put(pobj, NULL, (zend_objects_free_object_storage_t) zend_objects_proxy_free_storage, (zend_objects_store_clone_t) zend_objects_proxy_clone TSRMLS_CC);
+ Z_OBJ_HANDLE_P(retval) = zend_objects_store_put(pobj, (zend_objects_store_dtor_t)zend_objects_proxy_destroy, (zend_objects_free_object_storage_t) zend_objects_proxy_free_storage, (zend_objects_store_clone_t) zend_objects_proxy_clone TSRMLS_CC);
Z_OBJ_HT_P(retval) = &zend_object_proxy_handlers;
return retval;
@@ -353,7 +358,7 @@ ZEND_API void zend_object_proxy_set(zval **property, zval *value TSRMLS_DC)
zend_proxy_object *probj = zend_object_store_get_object(*property TSRMLS_CC);
if (Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->write_property) {
- Z_OBJ_HT_P(probj->object)->write_property(probj->object, probj->property, value TSRMLS_CC);
+ Z_OBJ_HT_P(probj->object)->write_property(probj->object, probj->property, value, 0 TSRMLS_CC);
} else {
zend_error(E_WARNING, "Cannot write property of object - no write handler defined");
}
@@ -364,7 +369,7 @@ ZEND_API zval* zend_object_proxy_get(zval *property TSRMLS_DC)
zend_proxy_object *probj = zend_object_store_get_object(property TSRMLS_CC);
if (Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->read_property) {
- return Z_OBJ_HT_P(probj->object)->read_property(probj->object, probj->property, BP_VAR_R TSRMLS_CC);
+ return Z_OBJ_HT_P(probj->object)->read_property(probj->object, probj->property, BP_VAR_R, 0 TSRMLS_CC);
} else {
zend_error(E_WARNING, "Cannot read property of object - no read handler defined");
}
diff --git a/Zend/zend_objects_API.h b/Zend/zend_objects_API.h
index a9f952e55..4b78dcfc3 100644
--- a/Zend/zend_objects_API.h
+++ b/Zend/zend_objects_API.h
@@ -68,7 +68,7 @@ ZEND_API void zend_objects_store_add_ref(zval *object TSRMLS_DC);
ZEND_API void zend_objects_store_del_ref(zval *object TSRMLS_DC);
ZEND_API void zend_objects_store_add_ref_by_handle(zend_object_handle handle TSRMLS_DC);
ZEND_API void zend_objects_store_del_ref_by_handle_ex(zend_object_handle handle, const zend_object_handlers *handlers TSRMLS_DC);
-static inline void zend_objects_store_del_ref_by_handle(zend_object_handle handle TSRMLS_DC) {
+static zend_always_inline void zend_objects_store_del_ref_by_handle(zend_object_handle handle TSRMLS_DC) {
zend_objects_store_del_ref_by_handle_ex(handle, NULL TSRMLS_CC);
}
ZEND_API zend_uint zend_objects_store_get_refcount(zval *object TSRMLS_DC);
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index e5313079f..6e1d40a97 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -43,31 +43,28 @@ static void zend_extension_op_array_dtor_handler(zend_extension *extension, zend
}
}
-static void op_array_alloc_ops(zend_op_array *op_array)
+static void op_array_alloc_ops(zend_op_array *op_array, zend_uint size)
{
- op_array->opcodes = erealloc(op_array->opcodes, (op_array->size)*sizeof(zend_op));
+ op_array->opcodes = erealloc(op_array->opcodes, size * sizeof(zend_op));
}
void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_size TSRMLS_DC)
{
op_array->type = type;
- op_array->backpatch_count = 0;
if (CG(interactive)) {
/* We must avoid a realloc() on the op_array in interactive mode, since pointers to constants
* will become invalid
*/
- initial_ops_size = 8192;
+ initial_ops_size = INITIAL_INTERACTIVE_OP_ARRAY_SIZE;
}
op_array->refcount = (zend_uint *) emalloc(sizeof(zend_uint));
*op_array->refcount = 1;
- op_array->size = initial_ops_size;
op_array->last = 0;
op_array->opcodes = NULL;
- op_array_alloc_ops(op_array);
+ op_array_alloc_ops(op_array, initial_ops_size);
- op_array->size_var = 0; /* FIXME:??? */
op_array->last_var = 0;
op_array->vars = NULL;
@@ -87,22 +84,22 @@ void init_op_array(zend_op_array *op_array, zend_uchar type, int initial_ops_siz
op_array->brk_cont_array = NULL;
op_array->try_catch_array = NULL;
op_array->last_brk_cont = 0;
- op_array->current_brk_cont = -1;
op_array->static_variables = NULL;
op_array->last_try_catch = 0;
- op_array->return_reference = 0;
- op_array->done_pass_two = 0;
-
op_array->this_var = -1;
- op_array->start_op = NULL;
-
op_array->fn_flags = CG(interactive)?ZEND_ACC_INTERACTIVE:0;
op_array->early_binding = -1;
+ op_array->last_literal = 0;
+ op_array->literals = NULL;
+
+ op_array->run_time_cache = NULL;
+ op_array->last_cache_slot = 0;
+
memset(op_array->reserved, 0, ZEND_MAX_RESERVED_RESOURCES * sizeof(void*));
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_ctor_handler, op_array TSRMLS_CC);
@@ -152,29 +149,118 @@ ZEND_API int zend_cleanup_function_data_full(zend_function *function TSRMLS_DC)
return 0;
}
-ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC)
+static inline void cleanup_user_class_data(zend_class_entry *ce TSRMLS_DC)
{
- if ((*pce)->type == ZEND_USER_CLASS) {
- /* Clean all parts that can contain run-time data */
- /* Note that only run-time accessed data need to be cleaned up, pre-defined data can
- not contain objects and thus are not probelmatic */
- zend_hash_apply(&(*pce)->function_table, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
- if ((*pce)->static_members) {
- zend_hash_clean((*pce)->static_members);
- (*pce)->static_members = NULL;
+ /* Clean all parts that can contain run-time data */
+ /* Note that only run-time accessed data need to be cleaned up, pre-defined data can
+ not contain objects and thus are not probelmatic */
+ if (ce->ce_flags & ZEND_HAS_STATIC_IN_METHODS) {
+ zend_hash_apply(&ce->function_table, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
+ }
+ if (ce->static_members_table) {
+ int i;
+
+ for (i = 0; i < ce->default_static_members_count; i++) {
+ if (ce->static_members_table[i]) {
+ zval_ptr_dtor(&ce->static_members_table[i]);
+ ce->static_members_table[i] = NULL;
+ }
}
- } else if (CE_STATIC_MEMBERS(*pce)) {
- zend_hash_destroy(CE_STATIC_MEMBERS(*pce));
- FREE_HASHTABLE(CE_STATIC_MEMBERS(*pce));
+ ce->static_members_table = NULL;
+ }
+}
+
+static inline void cleanup_internal_class_data(zend_class_entry *ce TSRMLS_DC)
+{
+ if (CE_STATIC_MEMBERS(ce)) {
+ int i;
+
+ for (i = 0; i < ce->default_static_members_count; i++) {
+ zval_ptr_dtor(&CE_STATIC_MEMBERS(ce)[i]);
+ }
+ efree(CE_STATIC_MEMBERS(ce));
#ifdef ZTS
- CG(static_members)[(zend_intptr_t)((*pce)->static_members)] = NULL;
+ CG(static_members_table)[(zend_intptr_t)(ce->static_members_table)] = NULL;
#else
- (*pce)->static_members = NULL;
+ ce->static_members_table = NULL;
#endif
}
+}
+
+ZEND_API void zend_cleanup_internal_class_data(zend_class_entry *ce TSRMLS_DC)
+{
+ cleanup_internal_class_data(ce TSRMLS_CC);
+}
+
+ZEND_API int zend_cleanup_user_class_data(zend_class_entry **pce TSRMLS_DC)
+{
+ if ((*pce)->type == ZEND_USER_CLASS) {
+ cleanup_user_class_data(*pce TSRMLS_CC);
+ return ZEND_HASH_APPLY_KEEP;
+ } else {
+ return ZEND_HASH_APPLY_STOP;
+ }
+}
+
+ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC)
+{
+ if ((*pce)->type == ZEND_USER_CLASS) {
+ cleanup_user_class_data(*pce TSRMLS_CC);
+ } else {
+ cleanup_internal_class_data(*pce TSRMLS_CC);
+ }
return 0;
}
+void _destroy_zend_class_traits_info(zend_class_entry *ce)
+{
+ if (ce->num_traits > 0 && ce->traits) {
+ efree(ce->traits);
+ }
+
+ if (ce->trait_aliases) {
+ size_t i = 0;
+ while (ce->trait_aliases[i]) {
+ if (ce->trait_aliases[i]->trait_method) {
+ if (ce->trait_aliases[i]->trait_method->method_name) {
+ efree((char*)ce->trait_aliases[i]->trait_method->method_name);
+ }
+ if (ce->trait_aliases[i]->trait_method->class_name) {
+ efree((char*)ce->trait_aliases[i]->trait_method->class_name);
+ }
+ efree(ce->trait_aliases[i]->trait_method);
+ }
+
+ if (ce->trait_aliases[i]->alias) {
+ efree((char*)ce->trait_aliases[i]->alias);
+ }
+
+ efree(ce->trait_aliases[i]);
+ i++;
+ }
+
+ efree(ce->trait_aliases);
+ }
+
+ if (ce->trait_precedences) {
+ size_t i = 0;
+
+ while (ce->trait_precedences[i]) {
+ efree((char*)ce->trait_precedences[i]->trait_method->method_name);
+ efree((char*)ce->trait_precedences[i]->trait_method->class_name);
+ efree(ce->trait_precedences[i]->trait_method);
+
+ if (ce->trait_precedences[i]->exclude_from_classes) {
+ efree(ce->trait_precedences[i]->exclude_from_classes);
+ }
+
+ efree(ce->trait_precedences[i]);
+ i++;
+ }
+ efree(ce->trait_precedences);
+ }
+}
+
ZEND_API void destroy_zend_class(zend_class_entry **pce)
{
zend_class_entry *ce = *pce;
@@ -184,33 +270,67 @@ ZEND_API void destroy_zend_class(zend_class_entry **pce)
}
switch (ce->type) {
case ZEND_USER_CLASS:
- zend_hash_destroy(&ce->default_properties);
+ if (ce->default_properties_table) {
+ int i;
+
+ for (i = 0; i < ce->default_properties_count; i++) {
+ if (ce->default_properties_table[i]) {
+ zval_ptr_dtor(&ce->default_properties_table[i]);
+ }
+ }
+ efree(ce->default_properties_table);
+ }
+ if (ce->default_static_members_table) {
+ int i;
+
+ for (i = 0; i < ce->default_static_members_count; i++) {
+ if (ce->default_static_members_table[i]) {
+ zval_ptr_dtor(&ce->default_static_members_table[i]);
+ }
+ }
+ efree(ce->default_static_members_table);
+ }
zend_hash_destroy(&ce->properties_info);
- zend_hash_destroy(&ce->default_static_members);
- efree(ce->name);
+ str_efree(ce->name);
zend_hash_destroy(&ce->function_table);
zend_hash_destroy(&ce->constants_table);
if (ce->num_interfaces > 0 && ce->interfaces) {
efree(ce->interfaces);
}
- if (ce->doc_comment) {
- efree(ce->doc_comment);
+ if (ce->info.user.doc_comment) {
+ efree((char*)ce->info.user.doc_comment);
}
+
+ _destroy_zend_class_traits_info(ce);
+
efree(ce);
break;
case ZEND_INTERNAL_CLASS:
- zend_hash_destroy(&ce->default_properties);
+ if (ce->default_properties_table) {
+ int i;
+
+ for (i = 0; i < ce->default_properties_count; i++) {
+ if (ce->default_properties_table[i]) {
+ zval_internal_ptr_dtor(&ce->default_properties_table[i]);
+ }
+ }
+ free(ce->default_properties_table);
+ }
+ if (ce->default_static_members_table) {
+ int i;
+
+ for (i = 0; i < ce->default_static_members_count; i++) {
+ zval_internal_ptr_dtor(&ce->default_static_members_table[i]);
+ }
+ free(ce->default_static_members_table);
+ }
zend_hash_destroy(&ce->properties_info);
- zend_hash_destroy(&ce->default_static_members);
- free(ce->name);
+ str_free(ce->name);
zend_hash_destroy(&ce->function_table);
zend_hash_destroy(&ce->constants_table);
if (ce->num_interfaces > 0) {
free(ce->interfaces);
}
- if (ce->doc_comment) {
- free(ce->doc_comment);
- }
free(ce);
break;
}
@@ -223,8 +343,8 @@ void zend_class_add_ref(zend_class_entry **ce)
ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC)
{
- zend_op *opline = op_array->opcodes;
- zend_op *end = op_array->opcodes+op_array->last;
+ zend_literal *literal = op_array->literals;
+ zend_literal *end;
zend_uint i;
if (op_array->static_variables) {
@@ -232,6 +352,10 @@ ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC)
FREE_HASHTABLE(op_array->static_variables);
}
+ if (op_array->run_time_cache) {
+ efree(op_array->run_time_cache);
+ }
+
if (--(*op_array->refcount)>0) {
return;
}
@@ -242,33 +366,26 @@ ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC)
i = op_array->last_var;
while (i > 0) {
i--;
- efree(op_array->vars[i].name);
+ str_efree(op_array->vars[i].name);
}
efree(op_array->vars);
}
- while (opline<end) {
- if (opline->op1.op_type==IS_CONST) {
-#if DEBUG_ZEND>2
- printf("Reducing refcount for %x 1=>0 (destroying)\n", &opline->op1.u.constant);
-#endif
- zval_dtor(&opline->op1.u.constant);
+ if (literal) {
+ end = literal + op_array->last_literal;
+ while (literal < end) {
+ zval_dtor(&literal->constant);
+ literal++;
}
- if (opline->op2.op_type==IS_CONST) {
-#if DEBUG_ZEND>2
- printf("Reducing refcount for %x 1=>0 (destroying)\n", &opline->op2.u.constant);
-#endif
- zval_dtor(&opline->op2.u.constant);
- }
- opline++;
+ efree(op_array->literals);
}
efree(op_array->opcodes);
if (op_array->function_name) {
- efree(op_array->function_name);
+ efree((char*)op_array->function_name);
}
if (op_array->doc_comment) {
- efree(op_array->doc_comment);
+ efree((char*)op_array->doc_comment);
}
if (op_array->brk_cont_array) {
efree(op_array->brk_cont_array);
@@ -276,14 +393,14 @@ ZEND_API void destroy_op_array(zend_op_array *op_array TSRMLS_DC)
if (op_array->try_catch_array) {
efree(op_array->try_catch_array);
}
- if (op_array->done_pass_two) {
+ if (op_array->fn_flags & ZEND_ACC_DONE_PASS_TWO) {
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_dtor_handler, op_array TSRMLS_CC);
}
if (op_array->arg_info) {
for (i=0; i<op_array->num_args; i++) {
- efree((char*)op_array->arg_info[i].name);
+ str_efree(op_array->arg_info[i].name);
if (op_array->arg_info[i].class_name) {
- efree((char*)op_array->arg_info[i].class_name);
+ str_efree(op_array->arg_info[i].class_name);
}
}
efree(op_array->arg_info);
@@ -302,15 +419,15 @@ zend_op *get_next_op(zend_op_array *op_array TSRMLS_DC)
zend_uint next_op_num = op_array->last++;
zend_op *next_op;
- if (next_op_num >= op_array->size) {
+ if (next_op_num >= CG(context).opcodes_size) {
if (op_array->fn_flags & ZEND_ACC_INTERACTIVE) {
/* we messed up */
zend_printf("Ran out of opcode space!\n"
"You should probably consider writing this huge script into a file!\n");
zend_bailout();
}
- op_array->size *= 4;
- op_array_alloc_ops(op_array);
+ CG(context).opcodes_size *= 4;
+ op_array_alloc_ops(op_array, CG(context).opcodes_size);
}
next_op = &(op_array->opcodes[next_op_num]);
@@ -376,44 +493,51 @@ ZEND_API int pass_two(zend_op_array *op_array TSRMLS_DC)
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_op_array_handler, op_array TSRMLS_CC);
}
- if (!(op_array->fn_flags & ZEND_ACC_INTERACTIVE) && op_array->size != op_array->last) {
+ if (!(op_array->fn_flags & ZEND_ACC_INTERACTIVE) && CG(context).vars_size != op_array->last_var) {
+ op_array->vars = (zend_compiled_variable *) erealloc(op_array->vars, sizeof(zend_compiled_variable)*op_array->last_var);
+ CG(context).vars_size = op_array->last_var;
+ }
+ if (!(op_array->fn_flags & ZEND_ACC_INTERACTIVE) && CG(context).opcodes_size != op_array->last) {
op_array->opcodes = (zend_op *) erealloc(op_array->opcodes, sizeof(zend_op)*op_array->last);
- op_array->size = op_array->last;
+ CG(context).opcodes_size = op_array->last;
+ }
+ if (!(op_array->fn_flags & ZEND_ACC_INTERACTIVE) && CG(context).literals_size != op_array->last_literal) {
+ op_array->literals = (zend_literal*)erealloc(op_array->literals, sizeof(zend_literal) * op_array->last_literal);
+ CG(context).literals_size = op_array->last_literal;
}
opline = op_array->opcodes;
end = opline + op_array->last;
while (opline < end) {
- if (opline->op1.op_type == IS_CONST) {
- Z_SET_ISREF(opline->op1.u.constant);
- Z_SET_REFCOUNT(opline->op1.u.constant, 2); /* Make sure is_ref won't be reset */
+ if (opline->op1_type == IS_CONST) {
+ opline->op1.zv = &op_array->literals[opline->op1.constant].constant;
}
- if (opline->op2.op_type == IS_CONST) {
- Z_SET_ISREF(opline->op2.u.constant);
- Z_SET_REFCOUNT(opline->op2.u.constant, 2);
+ if (opline->op2_type == IS_CONST) {
+ opline->op2.zv = &op_array->literals[opline->op2.constant].constant;
}
switch (opline->opcode) {
case ZEND_GOTO:
- if (Z_TYPE(opline->op2.u.constant) != IS_LONG) {
+ if (Z_TYPE_P(opline->op2.zv) != IS_LONG) {
zend_resolve_goto_label(op_array, opline, 1 TSRMLS_CC);
}
/* break omitted intentionally */
case ZEND_JMP:
- opline->op1.u.jmp_addr = &op_array->opcodes[opline->op1.u.opline_num];
+ opline->op1.jmp_addr = &op_array->opcodes[opline->op1.opline_num];
break;
case ZEND_JMPZ:
case ZEND_JMPNZ:
case ZEND_JMPZ_EX:
case ZEND_JMPNZ_EX:
case ZEND_JMP_SET:
- opline->op2.u.jmp_addr = &op_array->opcodes[opline->op2.u.opline_num];
+ case ZEND_JMP_SET_VAR:
+ opline->op2.jmp_addr = &op_array->opcodes[opline->op2.opline_num];
break;
}
ZEND_VM_SET_OPCODE_HANDLER(opline);
opline++;
}
-
- op_array->done_pass_two = 1;
+
+ op_array->fn_flags |= ZEND_ACC_DONE_PASS_TWO;
return 0;
}
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 077b5e9d7..1be07a226 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -27,13 +27,10 @@
#include "zend_globals.h"
#include "zend_list.h"
#include "zend_API.h"
-#include "zend_multiply.h"
#include "zend_strtod.h"
#include "zend_exceptions.h"
#include "zend_closures.h"
-#define LONG_SIGN_MASK (1L << (8*sizeof(long)-1))
-
#if ZEND_USE_TOLOWER_L
#include <locale.h>
static _locale_t current_locale = NULL;
@@ -1199,11 +1196,18 @@ ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
/* must support result==op1 */
ZEND_API int add_char_to_string(zval *result, const zval *op1, const zval *op2) /* {{{ */
{
- Z_STRLEN_P(result) = Z_STRLEN_P(op1) + 1;
- Z_STRVAL_P(result) = (char *) erealloc(Z_STRVAL_P(op1), Z_STRLEN_P(result)+1);
- Z_STRVAL_P(result)[Z_STRLEN_P(result) - 1] = (char) Z_LVAL_P(op2);
- Z_STRVAL_P(result)[Z_STRLEN_P(result)] = 0;
- Z_TYPE_P(result) = IS_STRING;
+ int length = Z_STRLEN_P(op1) + 1;
+ char *buf;
+
+ if (IS_INTERNED(Z_STRVAL_P(op1))) {
+ buf = (char *) emalloc(length + 1);
+ memcpy(buf, Z_STRVAL_P(op1), Z_STRLEN_P(op1));
+ } else {
+ buf = (char *) erealloc(Z_STRVAL_P(op1), length + 1);
+ }
+ buf[length - 1] = (char) Z_LVAL_P(op2);
+ buf[length] = 0;
+ ZVAL_STRINGL(result, buf, length, 0);
return SUCCESS;
}
/* }}} */
@@ -1212,12 +1216,17 @@ ZEND_API int add_char_to_string(zval *result, const zval *op1, const zval *op2)
ZEND_API int add_string_to_string(zval *result, const zval *op1, const zval *op2) /* {{{ */
{
int length = Z_STRLEN_P(op1) + Z_STRLEN_P(op2);
+ char *buf;
- Z_STRVAL_P(result) = (char *) erealloc(Z_STRVAL_P(op1), length+1);
- memcpy(Z_STRVAL_P(result)+Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2));
- Z_STRVAL_P(result)[length] = 0;
- Z_STRLEN_P(result) = length;
- Z_TYPE_P(result) = IS_STRING;
+ if (IS_INTERNED(Z_STRVAL_P(op1))) {
+ buf = (char *) emalloc(length+1);
+ memcpy(buf, Z_STRVAL_P(op1), Z_STRLEN_P(op1));
+ } else {
+ buf = (char *) erealloc(Z_STRVAL_P(op1), length+1);
+ }
+ memcpy(buf + Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2));
+ buf[length] = 0;
+ ZVAL_STRINGL(result, buf, length, 0);
return SUCCESS;
}
/* }}} */
@@ -1246,7 +1255,7 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{
if (use_copy2) {
op2 = &op2_copy;
}
- if (result==op1) { /* special case, perform operations on result */
+ if (result==op1 && !IS_INTERNED(Z_STRVAL_P(op1))) { /* special case, perform operations on result */
uint res_len = Z_STRLEN_P(op1) + Z_STRLEN_P(op2);
if (Z_STRLEN_P(result) < 0 || (int) (Z_STRLEN_P(op1) + Z_STRLEN_P(op2)) < 0) {
@@ -1261,12 +1270,13 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{
Z_STRVAL_P(result)[res_len]=0;
Z_STRLEN_P(result) = res_len;
} else {
- Z_STRLEN_P(result) = Z_STRLEN_P(op1) + Z_STRLEN_P(op2);
- Z_STRVAL_P(result) = (char *) emalloc(Z_STRLEN_P(result) + 1);
- memcpy(Z_STRVAL_P(result), Z_STRVAL_P(op1), Z_STRLEN_P(op1));
- memcpy(Z_STRVAL_P(result)+Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2));
- Z_STRVAL_P(result)[Z_STRLEN_P(result)] = 0;
- Z_TYPE_P(result) = IS_STRING;
+ int length = Z_STRLEN_P(op1) + Z_STRLEN_P(op2);
+ char *buf = (char *) emalloc(length + 1);
+
+ memcpy(buf, Z_STRVAL_P(op1), Z_STRLEN_P(op1));
+ memcpy(buf + Z_STRLEN_P(op1), Z_STRVAL_P(op2), Z_STRLEN_P(op2));
+ buf[length] = 0;
+ ZVAL_STRINGL(result, buf, length, 0);
}
if (use_copy1) {
zval_dtor(op1);
@@ -1278,7 +1288,7 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{
}
/* }}} */
-ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
+ZEND_API int string_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
int use_copy1 = 0, use_copy2 = 0;
@@ -1297,7 +1307,11 @@ ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_D
op2 = &op2_copy;
}
- ZVAL_LONG(result, zend_binary_zval_strcmp(op1, op2));
+ if (case_insensitive) {
+ ZVAL_LONG(result, zend_binary_zval_strcasecmp(op1, op2));
+ } else {
+ ZVAL_LONG(result, zend_binary_zval_strcmp(op1, op2));
+ }
if (use_copy1) {
zval_dtor(op1);
@@ -1309,6 +1323,18 @@ ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_D
}
/* }}} */
+ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
+{
+ return string_compare_function_ex(result, op1, op2, 0 TSRMLS_CC);
+}
+/* }}} */
+
+ZEND_API int string_case_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
+{
+ return string_compare_function_ex(result, op1, op2, 1 TSRMLS_CC);
+}
+/* }}} */
+
#if HAVE_STRCOLL
ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
@@ -1397,8 +1423,12 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {
return SUCCESS;
case TYPE_PAIR(IS_DOUBLE, IS_DOUBLE):
- Z_DVAL_P(result) = Z_DVAL_P(op1) - Z_DVAL_P(op2);
- ZVAL_LONG(result, ZEND_NORMALIZE_BOOL(Z_DVAL_P(result)));
+ if (Z_DVAL_P(op1) == Z_DVAL_P(op2)) {
+ ZVAL_LONG(result, 0);
+ } else {
+ Z_DVAL_P(result) = Z_DVAL_P(op1) - Z_DVAL_P(op2);
+ ZVAL_LONG(result, ZEND_NORMALIZE_BOOL(Z_DVAL_P(result)));
+ }
return SUCCESS;
case TYPE_PAIR(IS_ARRAY, IS_ARRAY):
@@ -1690,6 +1720,12 @@ static void increment_string(zval *str) /* {{{ */
return;
}
+ if (IS_INTERNED(s)) {
+ s = (char*) emalloc(Z_STRLEN_P(str) + 1);
+ memcpy(s, Z_STRVAL_P(str), Z_STRLEN_P(str) + 1);
+ Z_STRVAL_P(str) = s;
+ }
+
while (pos >= 0) {
ch = s[pos];
if (ch >= 'a' && ch <= 'z') {
@@ -1775,7 +1811,7 @@ ZEND_API int increment_function(zval *op1) /* {{{ */
switch (is_numeric_string(Z_STRVAL_P(op1), Z_STRLEN_P(op1), &lval, &dval, 0)) {
case IS_LONG:
- efree(Z_STRVAL_P(op1));
+ str_efree(Z_STRVAL_P(op1));
if (lval == LONG_MAX) {
/* switch to double */
double d = (double)lval;
@@ -1785,7 +1821,7 @@ ZEND_API int increment_function(zval *op1) /* {{{ */
}
break;
case IS_DOUBLE:
- efree(Z_STRVAL_P(op1));
+ str_efree(Z_STRVAL_P(op1));
ZVAL_DOUBLE(op1, dval+1);
break;
default:
@@ -1901,6 +1937,9 @@ ZEND_API int zend_binary_strcmp(const char *s1, uint len1, const char *s2, uint
{
int retval;
+ if (s1 == s2) {
+ return 0;
+ }
retval = memcmp(s1, s2, MIN(len1, len2));
if (!retval) {
return (len1 - len2);
@@ -1914,6 +1953,9 @@ ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const char *s2, uint
{
int retval;
+ if (s1 == s2) {
+ return 0;
+ }
retval = memcmp(s1, s2, MIN(length, MIN(len1, len2)));
if (!retval) {
return (MIN(length, len1) - MIN(length, len2));
@@ -1928,8 +1970,11 @@ ZEND_API int zend_binary_strcasecmp(const char *s1, uint len1, const char *s2, u
int len;
int c1, c2;
- len = MIN(len1, len2);
+ if (s1 == s2) {
+ return 0;
+ }
+ len = MIN(len1, len2);
while (len--) {
c1 = zend_tolower((int)*(unsigned char *)s1++);
c2 = zend_tolower((int)*(unsigned char *)s2++);
@@ -1947,8 +1992,10 @@ ZEND_API int zend_binary_strncasecmp(const char *s1, uint len1, const char *s2,
int len;
int c1, c2;
+ if (s1 == s2) {
+ return 0;
+ }
len = MIN(length, MIN(len1, len2));
-
while (len--) {
c1 = zend_tolower((int)*(unsigned char *)s1++);
c2 = zend_tolower((int)*(unsigned char *)s2++);
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index abf9444ae..ff785ad6a 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -31,11 +31,14 @@
#endif
#include "zend_strtod.h"
+#include "zend_multiply.h"
#if 0&&HAVE_BCMATH
#include "ext/bcmath/libbcmath/src/bcmath.h"
#endif
+#define LONG_SIGN_MASK (1L << (8*sizeof(long)-1))
+
BEGIN_EXTERN_C()
ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
@@ -167,7 +170,7 @@ check_digits:
}
} else if (!(digits < SIZEOF_LONG * 2 || (digits == SIZEOF_LONG * 2 && ptr[-digits] <= '7'))) {
if (dval) {
- local_dval = zend_hex_strtod(str, (char **)&ptr);
+ local_dval = zend_hex_strtod(str, &ptr);
}
type = IS_DOUBLE;
}
@@ -178,7 +181,7 @@ process_double:
/* If there's a dval, do the conversion; else continue checking
* the digits if we need to check for a full match */
if (dval) {
- local_dval = zend_strtod(str, (char **)&ptr);
+ local_dval = zend_strtod(str, &ptr);
} else if (allow_errors != 1 && dp_or_e != -1) {
dp_or_e = (*ptr++ == '.') ? 1 : 2;
goto check_digits;
@@ -256,17 +259,17 @@ zend_memnstr(char *haystack, char *needle, int needle_len, char *end)
return NULL;
}
-static inline void *zend_memrchr(const void *s, int c, size_t n)
+static inline const void *zend_memrchr(const void *s, int c, size_t n)
{
- register unsigned char *e;
+ register const unsigned char *e;
if (n <= 0) {
return NULL;
}
- for (e = (unsigned char *)s + n - 1; e >= (unsigned char *)s; e--) {
- if (*e == (unsigned char)c) {
- return (void *)e;
+ for (e = (const unsigned char *)s + n - 1; e >= (const unsigned char *)s; e--) {
+ if (*e == (const unsigned char)c) {
+ return (const void *)e;
}
}
@@ -298,7 +301,9 @@ ZEND_API double zend_string_to_double(const char *number, zend_uint length);
ZEND_API int zval_is_true(zval *op);
ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
+ZEND_API int string_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive TSRMLS_DC);
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
+ZEND_API int string_case_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
#if HAVE_STRCOLL
ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
#endif
@@ -448,6 +453,424 @@ ZEND_API void zend_update_current_locale(void);
#define zend_update_current_locale()
#endif
+static zend_always_inline int fast_increment_function(zval *op1)
+{
+ if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
+#if defined(__GNUC__) && defined(__i386__)
+ __asm__(
+ "incl (%0)\n\t"
+ "jno 0f\n\t"
+ "movl $0x0, (%0)\n\t"
+ "movl $0x41e00000, 0x4(%0)\n\t"
+ "movb $0x2,0xc(%0)\n"
+ "0:"
+ :
+ : "r"(op1));
+#elif defined(__GNUC__) && defined(__x86_64__)
+ __asm__(
+ "incq (%0)\n\t"
+ "jno 0f\n\t"
+ "movl $0x0, (%0)\n\t"
+ "movl $0x43e00000, 0x4(%0)\n\t"
+ "movb $0x2,0x14(%0)\n"
+ "0:"
+ :
+ : "r"(op1));
+#else
+ if (UNEXPECTED(Z_LVAL_P(op1) == LONG_MAX)) {
+ /* switch to double */
+ Z_DVAL_P(op1) = (double)LONG_MAX + 1.0;
+ Z_TYPE_P(op1) = IS_DOUBLE;
+ } else {
+ Z_LVAL_P(op1)++;
+ }
+#endif
+ return SUCCESS;
+ }
+ return increment_function(op1);
+}
+
+static zend_always_inline int fast_decrement_function(zval *op1)
+{
+ if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
+#if defined(__GNUC__) && defined(__i386__)
+ __asm__(
+ "decl (%0)\n\t"
+ "jno 0f\n\t"
+ "movl $0x00200000, (%0)\n\t"
+ "movl $0xc1e00000, 0x4(%0)\n\t"
+ "movb $0x2,0xc(%0)\n"
+ "0:"
+ :
+ : "r"(op1));
+#elif defined(__GNUC__) && defined(__x86_64__)
+ __asm__(
+ "decq (%0)\n\t"
+ "jno 0f\n\t"
+ "movl $0x00000000, (%0)\n\t"
+ "movl $0xc3e00000, 0x4(%0)\n\t"
+ "movb $0x2,0x14(%0)\n"
+ "0:"
+ :
+ : "r"(op1));
+#else
+ if (UNEXPECTED(Z_LVAL_P(op1) == LONG_MIN)) {
+ /* switch to double */
+ Z_DVAL_P(op1) = (double)LONG_MIN - 1.0;
+ Z_TYPE_P(op1) = IS_DOUBLE;
+ } else {
+ Z_LVAL_P(op1)--;
+ }
+#endif
+ return SUCCESS;
+ }
+ return decrement_function(op1);
+}
+
+static zend_always_inline int fast_add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+{
+ if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+#if defined(__GNUC__) && defined(__i386__)
+ __asm__(
+ "movl (%1), %%eax\n\t"
+ "addl (%2), %%eax\n\t"
+ "jo 0f\n\t"
+ "movl %%eax, (%0)\n\t"
+ "movb $0x1,0xc(%0)\n\t"
+ "jmp 1f\n"
+ "0:\n\t"
+ "fildl (%1)\n\t"
+ "fildl (%2)\n\t"
+ "faddp %%st, %%st(1)\n\t"
+ "movb $0x2,0xc(%0)\n\t"
+ "fstpl (%0)\n"
+ "1:"
+ :
+ : "r"(result),
+ "r"(op1),
+ "r"(op2)
+ : "eax");
+#elif defined(__GNUC__) && defined(__x86_64__)
+ __asm__(
+ "movq (%1), %%rax\n\t"
+ "addq (%2), %%rax\n\t"
+ "jo 0f\n\t"
+ "movq %%rax, (%0)\n\t"
+ "movb $0x1,0x14(%0)\n\t"
+ "jmp 1f\n"
+ "0:\n\t"
+ "fildq (%1)\n\t"
+ "fildq (%2)\n\t"
+ "faddp %%st, %%st(1)\n\t"
+ "movb $0x2,0x14(%0)\n\t"
+ "fstpl (%0)\n"
+ "1:"
+ :
+ : "r"(result),
+ "r"(op1),
+ "r"(op2)
+ : "rax");
+#else
+ Z_LVAL_P(result) = Z_LVAL_P(op1) + Z_LVAL_P(op2);
+
+ if (UNEXPECTED((Z_LVAL_P(op1) & LONG_SIGN_MASK) == (Z_LVAL_P(op2) & LONG_SIGN_MASK)
+ && (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (Z_LVAL_P(result) & LONG_SIGN_MASK))) {
+ Z_DVAL_P(result) = (double) Z_LVAL_P(op1) + (double) Z_LVAL_P(op2);
+ Z_TYPE_P(result) = IS_DOUBLE;
+ } else {
+ Z_TYPE_P(result) = IS_LONG;
+ }
+#endif
+ return SUCCESS;
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ Z_DVAL_P(result) = ((double)Z_LVAL_P(op1)) + Z_DVAL_P(op2);
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ }
+ } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ Z_DVAL_P(result) = Z_DVAL_P(op1) + Z_DVAL_P(op2);
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ Z_DVAL_P(result) = Z_DVAL_P(op1) + ((double)Z_LVAL_P(op2));
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ }
+ }
+ return add_function(result, op1, op2 TSRMLS_CC);
+}
+
+static zend_always_inline int fast_sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+{
+ if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+#if defined(__GNUC__) && defined(__i386__)
+ __asm__(
+ "movl (%1), %%eax\n\t"
+ "subl (%2), %%eax\n\t"
+ "jo 0f\n\t"
+ "movl %%eax, (%0)\n\t"
+ "movb $0x1,0xc(%0)\n\t"
+ "jmp 1f\n"
+ "0:\n\t"
+ "fildl (%2)\n\t"
+ "fildl (%1)\n\t"
+#if defined(__clang__) && (__clang_major__ < 2 || (__clang_major__ == 2 && __clang_minor__ < 10))
+ "fsubp %%st(1), %%st\n\t" /* LLVM bug #9164 */
+#else
+ "fsubp %%st, %%st(1)\n\t"
+#endif
+ "movb $0x2,0xc(%0)\n\t"
+ "fstpl (%0)\n"
+ "1:"
+ :
+ : "r"(result),
+ "r"(op1),
+ "r"(op2)
+ : "eax");
+#elif defined(__GNUC__) && defined(__x86_64__)
+ __asm__(
+ "movq (%1), %%rax\n\t"
+ "subq (%2), %%rax\n\t"
+ "jo 0f\n\t"
+ "movq %%rax, (%0)\n\t"
+ "movb $0x1,0x14(%0)\n\t"
+ "jmp 1f\n"
+ "0:\n\t"
+ "fildq (%2)\n\t"
+ "fildq (%1)\n\t"
+#if defined(__clang__) && (__clang_major__ < 2 || (__clang_major__ == 2 && __clang_minor__ < 10))
+ "fsubp %%st(1), %%st\n\t" /* LLVM bug #9164 */
+#else
+ "fsubp %%st, %%st(1)\n\t"
+#endif
+ "movb $0x2,0x14(%0)\n\t"
+ "fstpl (%0)\n"
+ "1:"
+ :
+ : "r"(result),
+ "r"(op1),
+ "r"(op2)
+ : "rax");
+#else
+ Z_LVAL_P(result) = Z_LVAL_P(op1) - Z_LVAL_P(op2);
+
+ if (UNEXPECTED((Z_LVAL_P(op1) & LONG_SIGN_MASK) != (Z_LVAL_P(op2) & LONG_SIGN_MASK)
+ && (Z_LVAL_P(op1) & LONG_SIGN_MASK) != (Z_LVAL_P(result) & LONG_SIGN_MASK))) {
+ Z_DVAL_P(result) = (double) Z_LVAL_P(op1) - (double) Z_LVAL_P(op2);
+ Z_TYPE_P(result) = IS_DOUBLE;
+ } else {
+ Z_TYPE_P(result) = IS_LONG;
+ }
+#endif
+ return SUCCESS;
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ Z_DVAL_P(result) = ((double)Z_LVAL_P(op1)) - Z_DVAL_P(op2);
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ }
+ } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ Z_DVAL_P(result) = Z_DVAL_P(op1) - Z_DVAL_P(op2);
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ Z_DVAL_P(result) = Z_DVAL_P(op1) - ((double)Z_LVAL_P(op2));
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ }
+ }
+ return sub_function(result, op1, op2 TSRMLS_CC);
+}
+
+static zend_always_inline int fast_mul_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+{
+ if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ long overflow;
+
+ ZEND_SIGNED_MULTIPLY_LONG(Z_LVAL_P(op1), Z_LVAL_P(op2), Z_LVAL_P(result), Z_DVAL_P(result), overflow);
+ Z_TYPE_P(result) = overflow ? IS_DOUBLE : IS_LONG;
+ return SUCCESS;
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ Z_DVAL_P(result) = ((double)Z_LVAL_P(op1)) * Z_DVAL_P(op2);
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ }
+ } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ Z_DVAL_P(result) = Z_DVAL_P(op1) * Z_DVAL_P(op2);
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ Z_DVAL_P(result) = Z_DVAL_P(op1) * ((double)Z_LVAL_P(op2));
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ }
+ }
+ return mul_function(result, op1, op2 TSRMLS_CC);
+}
+
+static zend_always_inline int fast_div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+{
+ if (EXPECTED(Z_TYPE_P(op1) == IS_LONG) && 0) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
+ zend_error(E_WARNING, "Division by zero");
+ Z_LVAL_P(result) = 0;
+ Z_TYPE_P(result) = IS_BOOL;
+ return FAILURE;
+ } else if (UNEXPECTED(Z_LVAL_P(op2) == -1 && Z_LVAL_P(op1) == LONG_MIN)) {
+ /* Prevent overflow error/crash */
+ Z_DVAL_P(result) = (double) LONG_MIN / -1;
+ Z_TYPE_P(result) = IS_DOUBLE;
+ } else if (EXPECTED(Z_LVAL_P(op1) % Z_LVAL_P(op2) == 0)) {
+ /* integer */
+ Z_LVAL_P(result) = Z_LVAL_P(op1) / Z_LVAL_P(op2);
+ Z_TYPE_P(result) = IS_LONG;
+ } else {
+ Z_DVAL_P(result) = ((double) Z_LVAL_P(op1)) / ((double)Z_LVAL_P(op2));
+ Z_TYPE_P(result) = IS_DOUBLE;
+ }
+ return SUCCESS;
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ if (UNEXPECTED(Z_DVAL_P(op2) == 0)) {
+ zend_error(E_WARNING, "Division by zero");
+ Z_LVAL_P(result) = 0;
+ Z_TYPE_P(result) = IS_BOOL;
+ return FAILURE;
+ }
+ Z_DVAL_P(result) = ((double)Z_LVAL_P(op1)) / Z_DVAL_P(op2);
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ }
+ } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE) && 0) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ if (UNEXPECTED(Z_DVAL_P(op2) == 0)) {
+ zend_error(E_WARNING, "Division by zero");
+ Z_LVAL_P(result) = 0;
+ Z_TYPE_P(result) = IS_BOOL;
+ return FAILURE;
+ }
+ Z_DVAL_P(result) = Z_DVAL_P(op1) / Z_DVAL_P(op2);
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
+ zend_error(E_WARNING, "Division by zero");
+ Z_LVAL_P(result) = 0;
+ Z_TYPE_P(result) = IS_BOOL;
+ return FAILURE;
+ }
+ Z_DVAL_P(result) = Z_DVAL_P(op1) / ((double)Z_LVAL_P(op2));
+ Z_TYPE_P(result) = IS_DOUBLE;
+ return SUCCESS;
+ }
+ }
+ return div_function(result, op1, op2 TSRMLS_CC);
+}
+
+static zend_always_inline int fast_mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+{
+ if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
+ zend_error(E_WARNING, "Division by zero");
+ Z_LVAL_P(result) = 0;
+ Z_TYPE_P(result) = IS_BOOL;
+ return FAILURE;
+ } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
+ /* Prevent overflow error/crash if op1==LONG_MIN */
+ Z_LVAL_P(result) = 0;
+ Z_TYPE_P(result) = IS_LONG;
+ return SUCCESS;
+ }
+ Z_LVAL_P(result) = Z_LVAL_P(op1) % Z_LVAL_P(op2);
+ Z_TYPE_P(result) = IS_LONG;
+ return SUCCESS;
+ }
+ }
+ return mod_function(result, op1, op2 TSRMLS_CC);
+}
+
+static zend_always_inline int fast_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+{
+ if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ return Z_LVAL_P(op1) == Z_LVAL_P(op2);
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ return ((double)Z_LVAL_P(op1)) == Z_DVAL_P(op2);
+ }
+ } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ return Z_DVAL_P(op1) == Z_DVAL_P(op2);
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ return Z_DVAL_P(op1) == ((double)Z_LVAL_P(op2));
+ }
+ }
+ compare_function(result, op1, op2 TSRMLS_CC);
+ return Z_LVAL_P(result) == 0;
+}
+
+static zend_always_inline int fast_not_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+{
+ if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ return Z_LVAL_P(op1) != Z_LVAL_P(op2);
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ return ((double)Z_LVAL_P(op1)) != Z_DVAL_P(op2);
+ }
+ } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ return Z_DVAL_P(op1) != Z_DVAL_P(op2);
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ return Z_DVAL_P(op1) != ((double)Z_LVAL_P(op2));
+ }
+ }
+ compare_function(result, op1, op2 TSRMLS_CC);
+ return Z_LVAL_P(result) != 0;
+}
+
+static zend_always_inline int fast_is_smaller_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+{
+ if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ return Z_LVAL_P(op1) < Z_LVAL_P(op2);
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ return ((double)Z_LVAL_P(op1)) < Z_DVAL_P(op2);
+ }
+ } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ return Z_DVAL_P(op1) < Z_DVAL_P(op2);
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ return Z_DVAL_P(op1) < ((double)Z_LVAL_P(op2));
+ }
+ }
+ compare_function(result, op1, op2 TSRMLS_CC);
+ return Z_LVAL_P(result) < 0;
+}
+
+static zend_always_inline int fast_is_smaller_or_equal_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
+{
+ if (EXPECTED(Z_TYPE_P(op1) == IS_LONG)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ return Z_LVAL_P(op1) <= Z_LVAL_P(op2);
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ return ((double)Z_LVAL_P(op1)) <= Z_DVAL_P(op2);
+ }
+ } else if (EXPECTED(Z_TYPE_P(op1) == IS_DOUBLE)) {
+ if (EXPECTED(Z_TYPE_P(op2) == IS_DOUBLE)) {
+ return Z_DVAL_P(op1) <= Z_DVAL_P(op2);
+ } else if (EXPECTED(Z_TYPE_P(op2) == IS_LONG)) {
+ return Z_DVAL_P(op1) <= ((double)Z_LVAL_P(op2));
+ }
+ }
+ compare_function(result, op1, op2 TSRMLS_CC);
+ return Z_LVAL_P(result) <= 0;
+}
+
#endif
/*
diff --git a/Zend/zend_ptr_stack.c b/Zend/zend_ptr_stack.c
index eaf482879..781b7dd70 100644
--- a/Zend/zend_ptr_stack.c
+++ b/Zend/zend_ptr_stack.c
@@ -27,9 +27,8 @@
ZEND_API void zend_ptr_stack_init_ex(zend_ptr_stack *stack, zend_bool persistent)
{
- stack->top_element = stack->elements = (void **) pemalloc(sizeof(void *)*PTR_STACK_BLOCK_SIZE, persistent);
- stack->max = PTR_STACK_BLOCK_SIZE;
- stack->top = 0;
+ stack->top_element = stack->elements = NULL;
+ stack->top = stack->max = 0;
stack->persistent = persistent;
}
diff --git a/Zend/zend_ptr_stack.h b/Zend/zend_ptr_stack.h
index 8b1a5b91f..59c321bcf 100644
--- a/Zend/zend_ptr_stack.h
+++ b/Zend/zend_ptr_stack.h
@@ -46,15 +46,16 @@ END_EXTERN_C()
#define ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, count) \
if (stack->top+count > stack->max) { \
/* we need to allocate more memory */ \
- stack->max *= 2; \
- stack->max += count; \
+ do { \
+ stack->max += PTR_STACK_BLOCK_SIZE; \
+ } while (stack->top+count > stack->max); \
stack->elements = (void **) perealloc(stack->elements, (sizeof(void *) * (stack->max)), stack->persistent); \
stack->top_element = stack->elements+stack->top; \
}
/* Not doing this with a macro because of the loop unrolling in the element assignment.
Just using a macro for 3 in the body for readability sake. */
-static inline void zend_ptr_stack_3_push(zend_ptr_stack *stack, void *a, void *b, void *c)
+static zend_always_inline void zend_ptr_stack_3_push(zend_ptr_stack *stack, void *a, void *b, void *c)
{
#define ZEND_PTR_STACK_NUM_ARGS 3
@@ -68,7 +69,7 @@ static inline void zend_ptr_stack_3_push(zend_ptr_stack *stack, void *a, void *b
#undef ZEND_PTR_STACK_NUM_ARGS
}
-static inline void zend_ptr_stack_2_push(zend_ptr_stack *stack, void *a, void *b)
+static zend_always_inline void zend_ptr_stack_2_push(zend_ptr_stack *stack, void *a, void *b)
{
#define ZEND_PTR_STACK_NUM_ARGS 2
@@ -81,7 +82,7 @@ static inline void zend_ptr_stack_2_push(zend_ptr_stack *stack, void *a, void *b
#undef ZEND_PTR_STACK_NUM_ARGS
}
-static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void **b, void **c)
+static zend_always_inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void **b, void **c)
{
*a = *(--stack->top_element);
*b = *(--stack->top_element);
@@ -89,14 +90,14 @@ static inline void zend_ptr_stack_3_pop(zend_ptr_stack *stack, void **a, void **
stack->top -= 3;
}
-static inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, void **a, void **b)
+static zend_always_inline void zend_ptr_stack_2_pop(zend_ptr_stack *stack, void **a, void **b)
{
*a = *(--stack->top_element);
*b = *(--stack->top_element);
stack->top -= 2;
}
-static inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr)
+static zend_always_inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr)
{
ZEND_PTR_STACK_RESIZE_IF_NEEDED(stack, 1)
@@ -104,7 +105,7 @@ static inline void zend_ptr_stack_push(zend_ptr_stack *stack, void *ptr)
*(stack->top_element++) = ptr;
}
-static inline void *zend_ptr_stack_pop(zend_ptr_stack *stack)
+static zend_always_inline void *zend_ptr_stack_pop(zend_ptr_stack *stack)
{
stack->top--;
return *(--stack->top_element);
diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c
new file mode 100644
index 000000000..7a6ea9ab9
--- /dev/null
+++ b/Zend/zend_signal.c
@@ -0,0 +1,414 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Signal Handling |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2008 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Lucas Nealan <lucas@php.net> |
+ | Arnaud Le Blanc <lbarnaud@php.net> |
+ +----------------------------------------------------------------------+
+
+ This software was contributed to PHP by Facebook Inc. in 2008.
+
+ Future revisions and derivatives of this source code must acknowledge
+ Facebook Inc. as the original contributor of this module by leaving
+ this note intact in the source code.
+
+ All other licensing and usage conditions are those of the PHP Group.
+*/
+
+ /* $Id: zend_signal.c 320281 2011-12-02 12:14:16Z dmitry $ */
+
+#define _GNU_SOURCE
+#include <string.h>
+
+#include "zend.h"
+#include "zend_globals.h"
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef ZEND_SIGNALS
+
+#include "zend_signal.h"
+
+#ifdef ZTS
+ZEND_API int zend_signal_globals_id;
+#else
+zend_signal_globals_t zend_signal_globals;
+#endif
+
+static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context TSRMLS_DC);
+static int zend_signal_register(int signo, void (*handler)(int, siginfo_t*, void*) TSRMLS_DC);
+
+#ifdef __CYGWIN__
+#define TIMEOUT_SIG SIGALRM
+#else
+#define TIMEOUT_SIG SIGPROF
+#endif
+
+static int zend_sigs[] = { TIMEOUT_SIG, SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGUSR1, SIGUSR2 };
+
+#define SA_FLAGS_MASK ~(SA_NODEFER | SA_RESETHAND)
+
+/* True globals, written only at process startup */
+static zend_signal_entry_t global_orig_handlers[NSIG];
+static sigset_t global_sigmask;
+
+/* {{{ zend_signal_handler_defer
+ * Blocks signals if in critical section */
+void zend_signal_handler_defer(int signo, siginfo_t *siginfo, void *context)
+{
+ int errno_save = errno;
+ zend_signal_queue_t *queue, *qtmp;
+ TSRMLS_FETCH();
+
+ if (SIGG(active)) {
+ if (SIGG(depth) == 0) { /* try to handle signal */
+ if (SIGG(blocked) != -1) { /* inverse */
+ SIGG(blocked) = -1; /* signal is not blocked */
+ }
+ if (SIGG(running) == 0) {
+ SIGG(running) = 1;
+ zend_signal_handler(signo, siginfo, context TSRMLS_CC);
+
+ queue = SIGG(phead);
+ SIGG(phead) = NULL;
+
+ while (queue) {
+ zend_signal_handler(queue->zend_signal.signo, queue->zend_signal.siginfo, queue->zend_signal.context TSRMLS_CC);
+ qtmp = queue->next;
+ queue->next = SIGG(pavail);
+ queue->zend_signal.signo = 0;
+ SIGG(pavail) = queue;
+ queue = qtmp;
+ }
+ SIGG(running) = 0;
+ }
+ } else { /* delay signal handling */
+ SIGG(blocked) = 0; /* signal is blocked */
+
+ if ((queue = SIGG(pavail))) { /* if none available it's simply forgotton */
+ SIGG(pavail) = queue->next;
+ queue->zend_signal.signo = signo;
+ queue->zend_signal.siginfo = siginfo;
+ queue->zend_signal.context = context;
+ queue->next = NULL;
+
+ if (SIGG(phead) && SIGG(ptail)) {
+ SIGG(ptail)->next = queue;
+ } else {
+ SIGG(phead) = queue;
+ }
+ SIGG(ptail) = queue;
+ }
+#if ZEND_DEBUG
+ else { /* this may not be safe to do, but could work and be useful */
+ zend_output_debug_string(0, "zend_signal: not enough queue storage, lost signal (%d)", signo);
+ }
+#endif
+ }
+ } else {
+ /* need to just run handler if we're inactive and getting a signal */
+ zend_signal_handler(signo, siginfo, context TSRMLS_CC);
+ }
+
+ errno = errno_save;
+} /* }}} */
+
+/* {{{ zend_signal_handler_unblock
+ * Handle deferred signal from HANDLE_UNBLOCK_ALARMS */
+ZEND_API void zend_signal_handler_unblock(TSRMLS_D)
+{
+ zend_signal_queue_t *queue;
+ zend_signal_t zend_signal;
+
+ if (SIGG(active)) {
+ SIGNAL_BEGIN_CRITICAL(); /* procmask to protect handler_defer as if it were called by the kernel */
+ queue = SIGG(phead);
+ SIGG(phead) = queue->next;
+ zend_signal = queue->zend_signal;
+ queue->next = SIGG(pavail);
+ queue->zend_signal.signo = 0;
+ SIGG(pavail) = queue;
+
+ zend_signal_handler_defer(zend_signal.signo, zend_signal.siginfo, zend_signal.context);
+ SIGNAL_END_CRITICAL();
+ }
+}
+/* }}} */
+
+/* {{{ zend_signal_handler
+ * Call the previously registered handler for a signal
+ */
+static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context TSRMLS_DC)
+{
+ int errno_save = errno;
+ struct sigaction sa = {{0}};
+ sigset_t sigset;
+ zend_signal_entry_t p_sig = SIGG(handlers)[signo-1];
+
+ if (p_sig.handler == SIG_DFL) { /* raise default handler */
+ if (sigaction(signo, NULL, &sa) == 0) {
+ sa.sa_handler = SIG_DFL;
+ sigemptyset(&sa.sa_mask);
+
+ sigemptyset(&sigset);
+ sigaddset(&sigset, signo);
+
+ if (sigaction(signo, &sa, NULL) == 0) {
+ /* throw away any blocked signals */
+ sigprocmask(SIG_UNBLOCK, &sigset, NULL);
+ raise(signo);
+ }
+ }
+ } else if (p_sig.handler != SIG_IGN) { /* ignore SIG_IGN */
+ if (p_sig.flags & SA_SIGINFO) {
+ if (p_sig.flags & SA_RESETHAND) {
+ SIGG(handlers)[signo-1].flags = 0;
+ SIGG(handlers)[signo-1].handler = SIG_DFL;
+ }
+ (*(void (*)(int, siginfo_t*, void*))p_sig.handler)(signo, siginfo, context);
+ } else {
+ (*(void (*)(int))p_sig.handler)(signo);
+ }
+ }
+
+ errno = errno_save;
+} /* }}} */
+
+/* {{{ zend_sigaction
+ * Register a signal handler that will be deferred in critical sections */
+ZEND_API int zend_sigaction(int signo, const struct sigaction *act, struct sigaction *oldact TSRMLS_DC)
+{
+ struct sigaction sa = {{0}};
+ sigset_t sigset;
+
+ if (oldact != NULL) {
+ oldact->sa_flags = SIGG(handlers)[signo-1].flags;
+ oldact->sa_handler = (void *) SIGG(handlers)[signo-1].handler;
+ oldact->sa_mask = global_sigmask;
+ }
+ if (act != NULL) {
+ SIGG(handlers)[signo-1].flags = act->sa_flags;
+ if (act->sa_flags & SA_SIGINFO) {
+ SIGG(handlers)[signo-1].handler = (void *) act->sa_sigaction;
+ } else {
+ SIGG(handlers)[signo-1].handler = (void *) act->sa_handler;
+ }
+
+ sa.sa_flags = SA_SIGINFO | (act->sa_flags & SA_FLAGS_MASK);
+ sa.sa_sigaction = zend_signal_handler_defer;
+ sa.sa_mask = global_sigmask;
+
+ if (sigaction(signo, &sa, NULL) < 0) {
+ zend_error(E_WARNING, "Error installing signal handler for %d", signo);
+ }
+
+ /* unsure this signal is not blocked */
+ sigemptyset(&sigset);
+ sigaddset(&sigset, signo);
+ zend_sigprocmask(SIG_UNBLOCK, &sigset, NULL);
+ }
+
+ return SUCCESS;
+}
+/* }}} */
+
+/* {{{ zend_signal
+ * Register a signal handler that will be deferred in critical sections */
+ZEND_API int zend_signal(int signo, void (*handler)(int) TSRMLS_DC)
+{
+ struct sigaction sa = {{0}};
+
+ sa.sa_flags = 0;
+ sa.sa_handler = handler;
+ sa.sa_mask = global_sigmask;
+
+ return zend_sigaction(signo, &sa, NULL TSRMLS_CC);
+}
+/* }}} */
+
+/* {{{ zend_signal_register
+ * Set a handler for a signal we want to defer.
+ * Previously set handler must have been saved before.
+ */
+static int zend_signal_register(int signo, void (*handler)(int, siginfo_t*, void*) TSRMLS_DC)
+{
+ struct sigaction sa = {{0}};
+
+ if (sigaction(signo, NULL, &sa) == 0) {
+ if ((sa.sa_flags & SA_SIGINFO) && sa.sa_sigaction == handler) {
+ return FAILURE;
+ }
+
+ SIGG(handlers)[signo-1].flags = sa.sa_flags;
+ if (sa.sa_flags & SA_SIGINFO) {
+ SIGG(handlers)[signo-1].handler = (void *)sa.sa_sigaction;
+ } else {
+ SIGG(handlers)[signo-1].handler = (void *)sa.sa_handler;
+ }
+
+ sa.sa_flags = SA_SIGINFO; /* we'll use a siginfo handler */
+ sa.sa_sigaction = handler;
+ sa.sa_mask = global_sigmask;
+
+ if (sigaction(signo, &sa, NULL) < 0) {
+ zend_error(E_WARNING, "Error installing signal handler for %d", signo);
+ }
+
+ return SUCCESS;
+ }
+ return FAILURE;
+} /* }}} */
+
+/* {{{ zend_signal_activate
+ * Install our signal handlers, per request */
+void zend_signal_activate(TSRMLS_D)
+{
+ int x;
+
+ memcpy(&SIGG(handlers), &global_orig_handlers, sizeof(global_orig_handlers));
+
+ for (x=0; x < sizeof(zend_sigs) / sizeof(*zend_sigs); x++) {
+ zend_signal_register(zend_sigs[x], zend_signal_handler_defer TSRMLS_CC);
+ }
+
+ SIGG(active) = 1;
+ SIGG(depth) = 0;
+} /* }}} */
+
+/* {{{ zend_signal_deactivate
+ * */
+void zend_signal_deactivate(TSRMLS_D)
+{
+ int x;
+ struct sigaction sa = {{0}};
+
+ if (SIGG(check)) {
+ if (SIGG(depth) != 0) {
+ zend_error(E_CORE_WARNING, "zend_signal: shutdown with non-zero blocking depth (%d)", SIGG(depth));
+ }
+ /* did anyone steal our installed handler */
+ for (x=0; x < sizeof(zend_sigs) / sizeof(*zend_sigs); x++) {
+ sigaction(zend_sigs[x], NULL, &sa);
+ if (sa.sa_sigaction != zend_signal_handler_defer) {
+ zend_error(E_CORE_WARNING, "zend_signal: handler was replaced for signal (%d) after startup", zend_sigs[x]);
+ }
+ }
+ }
+
+ SIGNAL_BEGIN_CRITICAL();
+ SIGG(active) = 0;
+ SIGG(running) = 0;
+ SIGG(blocked) = -1;
+ SIGG(depth) = 0;
+ SIGNAL_END_CRITICAL();
+}
+/* }}} */
+
+static void zend_signal_globals_ctor(zend_signal_globals_t *zend_signal_globals TSRMLS_DC)
+{
+ size_t x;
+
+ memset(zend_signal_globals, 0, sizeof(*zend_signal_globals));
+ zend_signal_globals->blocked = -1;
+
+ for (x = 0; x < sizeof(zend_signal_globals->pstorage) / sizeof(*zend_signal_globals->pstorage); ++x) {
+ zend_signal_queue_t *queue = &zend_signal_globals->pstorage[x];
+ queue->zend_signal.signo = 0;
+ queue->next = zend_signal_globals->pavail;
+ zend_signal_globals->pavail = queue;
+ }
+}
+
+static void zend_signal_globals_dtor(zend_signal_globals_t *zend_signal_globals TSRMLS_DC)
+{
+ zend_signal_globals->blocked = -1;
+}
+
+/* {{{ zend_signal_startup
+ * alloc zend signal globals */
+void zend_signal_startup()
+{
+ int signo;
+ struct sigaction sa = {{0}};
+
+#ifdef ZTS
+ ts_allocate_id(&zend_signal_globals_id, sizeof(zend_signal_globals_t), (ts_allocate_ctor) zend_signal_globals_ctor, (ts_allocate_dtor) zend_signal_globals_dtor);
+#else
+ zend_signal_globals_ctor(&zend_signal_globals);
+#endif
+
+ /* Used to block signals during execution of signal handlers */
+ sigfillset(&global_sigmask);
+ sigdelset(&global_sigmask, SIGILL);
+ sigdelset(&global_sigmask, SIGABRT);
+ sigdelset(&global_sigmask, SIGFPE);
+ sigdelset(&global_sigmask, SIGKILL);
+ sigdelset(&global_sigmask, SIGSEGV);
+ sigdelset(&global_sigmask, SIGCONT);
+ sigdelset(&global_sigmask, SIGSTOP);
+ sigdelset(&global_sigmask, SIGTSTP);
+ sigdelset(&global_sigmask, SIGTTIN);
+ sigdelset(&global_sigmask, SIGTTOU);
+#ifdef SIGBUS
+ sigdelset(&global_sigmask, SIGBUS);
+#endif
+#ifdef SIGSYS
+ sigdelset(&global_sigmask, SIGSYS);
+#endif
+#ifdef SIGTRAP
+ sigdelset(&global_sigmask, SIGTRAP);
+#endif
+
+ /* Save previously registered signal handlers into orig_handlers */
+ memset(&global_orig_handlers, 0, sizeof(global_orig_handlers));
+ for (signo = 1; signo < NSIG; ++signo) {
+ if (sigaction(signo, NULL, &sa) == 0) {
+ global_orig_handlers[signo-1].flags = sa.sa_flags;
+ if (sa.sa_flags & SA_SIGINFO) {
+ global_orig_handlers[signo-1].handler = (void *) sa.sa_sigaction;
+ } else {
+ global_orig_handlers[signo-1].handler = (void *) sa.sa_handler;
+ }
+ }
+ }
+}
+/* }}} */
+
+/* {{{ zend_signal_shutdown
+ * called by zend_shutdown */
+void zend_signal_shutdown(TSRMLS_D)
+{
+#ifndef ZTS
+ zend_signal_globals_dtor(&zend_signal_globals);
+#endif
+}
+/* }}} */
+
+
+#endif /* ZEND_SIGNALS */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ * vim600: fdm=marker
+ * vim: noet sw=4 ts=4
+ */
diff --git a/Zend/zend_signal.h b/Zend/zend_signal.h
new file mode 100644
index 000000000..1c263c78a
--- /dev/null
+++ b/Zend/zend_signal.h
@@ -0,0 +1,108 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Signal Handling |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2008 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.php.net/license/3_01.txt |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Lucas Nealan <lucas@php.net> |
+ | Arnaud Le Blanc <lbarnaud@php.net> |
+ +----------------------------------------------------------------------+
+
+ */
+
+/* $Id: zend_signal.h 321753 2012-01-04 08:25:06Z laruence $ */
+
+#ifndef ZEND_SIGNAL_H
+#define ZEND_SIGNAL_H
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
+#ifndef NSIG
+#define NSIG 65
+#endif
+
+#ifndef ZEND_SIGNAL_QUEUE_SIZE
+#define ZEND_SIGNAL_QUEUE_SIZE 32
+#endif
+
+/* Signal structs */
+typedef struct _zend_signal_entry_t {
+ int flags; /* sigaction style flags */
+ void* handler; /* signal handler or context */
+} zend_signal_entry_t;
+
+typedef struct _zend_signal_t {
+ int signo;
+ siginfo_t *siginfo;
+ void* context;
+} zend_signal_t;
+
+typedef struct _zend_signal_queue_t {
+ zend_signal_t zend_signal;
+ struct _zend_signal_queue_t *next;
+} zend_signal_queue_t;
+
+/* Signal Globals */
+typedef struct _zend_signal_globals_t {
+ int depth;
+ int blocked; /* 0==TRUE, -1==FALSE */
+ int running; /* in signal handler execution */
+ int active; /* internal signal handling is enabled */
+ int initialized; /* memory initialized */
+ zend_bool check; /* check for replaced handlers on shutdown */
+ zend_signal_entry_t handlers[NSIG];
+ zend_signal_queue_t pstorage[ZEND_SIGNAL_QUEUE_SIZE], *phead, *ptail, *pavail; /* pending queue */
+} zend_signal_globals_t;
+
+#ifdef ZTS
+# define SIGG(v) TSRMG(zend_signal_globals_id, zend_signal_globals_t *, v)
+BEGIN_EXTERN_C()
+ZEND_API extern int zend_signal_globals_id;
+END_EXTERN_C()
+# define ZEND_SIGNAL_BLOCK_INTERRUPUTIONS() if (EXPECTED(zend_signal_globals_id)) { SIGG(depth)++; }
+# define ZEND_SIGNAL_UNBLOCK_INTERRUPTIONS() if (EXPECTED(zend_signal_globals_id) && UNEXPECTED((--SIGG(depth))==SIGG(blocked))) { zend_signal_handler_unblock(TSRMLS_C); }
+#else /* ZTS */
+# define SIGG(v) (zend_signal_globals.v)
+extern ZEND_API zend_signal_globals_t zend_signal_globals;
+# define ZEND_SIGNAL_BLOCK_INTERRUPUTIONS() SIGG(depth)++;
+# define ZEND_SIGNAL_UNBLOCK_INTERRUPTIONS() if (UNEXPECTED((--SIGG(depth))==SIGG(blocked))) { zend_signal_handler_unblock(TSRMLS_C); }
+#endif /* not ZTS */
+
+# define SIGNAL_BEGIN_CRITICAL() sigset_t oldmask; \
+ zend_sigprocmask(SIG_BLOCK, &global_sigmask, &oldmask);
+# define SIGNAL_END_CRITICAL() zend_sigprocmask(SIG_SETMASK, &oldmask, NULL);
+
+void zend_signal_handler_defer(int signo, siginfo_t *siginfo, void *context);
+ZEND_API void zend_signal_handler_unblock();
+void zend_signal_activate(TSRMLS_D);
+void zend_signal_deactivate(TSRMLS_D);
+void zend_signal_startup();
+void zend_signal_shutdown(TSRMLS_D);
+ZEND_API int zend_signal(int signo, void (*handler)(int) TSRMLS_DC);
+ZEND_API int zend_sigaction(int signo, const struct sigaction *act, struct sigaction *oldact TSRMLS_DC);
+
+#ifdef ZTS
+#define zend_sigprocmask(signo, set, oldset) tsrm_sigmask((signo), (set), (oldset))
+#else
+#define zend_sigprocmask(signo, set, oldset) sigprocmask((signo), (set), (oldset))
+#endif
+
+#endif /* ZEND_SIGNAL_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/Zend/zend_stack.c b/Zend/zend_stack.c
index 2add76d54..f4c0df187 100644
--- a/Zend/zend_stack.c
+++ b/Zend/zend_stack.c
@@ -25,13 +25,9 @@
ZEND_API int zend_stack_init(zend_stack *stack)
{
stack->top = 0;
- stack->elements = (void **) emalloc(sizeof(void **) * STACK_BLOCK_SIZE);
- if (!stack->elements) {
- return FAILURE;
- } else {
- stack->max = STACK_BLOCK_SIZE;
- return SUCCESS;
- }
+ stack->max = 0;
+ stack->elements = NULL;
+ return SUCCESS;
}
ZEND_API int zend_stack_push(zend_stack *stack, const void *element, int size)
@@ -100,8 +96,8 @@ ZEND_API int zend_stack_destroy(zend_stack *stack)
for (i = 0; i < stack->top; i++) {
efree(stack->elements[i]);
}
-
efree(stack->elements);
+ stack->elements = NULL;
}
return SUCCESS;
diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c
index 422244098..9a0bf26a6 100644
--- a/Zend/zend_stream.c
+++ b/Zend/zend_stream.c
@@ -134,7 +134,7 @@ ZEND_API int zend_stream_open(const char *filename, zend_file_handle *handle TSR
handle->type = ZEND_HANDLE_FP;
handle->opened_path = NULL;
handle->handle.fp = zend_fopen(filename, &handle->opened_path TSRMLS_CC);
- handle->filename = (char *)filename;
+ handle->filename = filename;
handle->free_filename = 0;
memset(&handle->handle.stream.mmap, 0, sizeof(zend_mmap));
@@ -284,7 +284,6 @@ ZEND_API int zend_stream_fixup(zend_file_handle *file_handle, char **buf, size_t
if (ZEND_MMAP_AHEAD) {
memset(file_handle->handle.stream.mmap.buf + file_handle->handle.stream.mmap.len, 0, ZEND_MMAP_AHEAD);
}
-
#if HAVE_MMAP
return_mapped:
#endif
@@ -328,7 +327,7 @@ ZEND_API void zend_file_handle_dtor(zend_file_handle *fh TSRMLS_DC) /* {{{ */
fh->opened_path = NULL;
}
if (fh->free_filename && fh->filename) {
- efree(fh->filename);
+ efree((char*)fh->filename);
fh->filename = NULL;
}
}
diff --git a/Zend/zend_stream.h b/Zend/zend_stream.h
index 79fcad7a9..069d2df09 100644
--- a/Zend/zend_stream.h
+++ b/Zend/zend_stream.h
@@ -61,7 +61,7 @@ typedef struct _zend_stream {
typedef struct _zend_file_handle {
zend_stream_type type;
- char *filename;
+ const char *filename;
char *opened_path;
union {
int fd;
diff --git a/Zend/zend_string.c b/Zend/zend_string.c
new file mode 100644
index 000000000..8e9009f9f
--- /dev/null
+++ b/Zend/zend_string.c
@@ -0,0 +1,233 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id: $ */
+
+#include "zend.h"
+#include "zend_globals.h"
+
+#ifndef ZEND_DEBUG_INTERNED_STRINGS
+# define ZEND_DEBUG_INTERNED_STRINGS 0
+#endif
+
+#if ZEND_DEBUG_INTERNED_STRINGS
+# include <sys/mman.h>
+#endif
+
+ZEND_API const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC);
+ZEND_API void (*zend_interned_strings_snapshot)(TSRMLS_D);
+ZEND_API void (*zend_interned_strings_restore)(TSRMLS_D);
+
+static const char *zend_new_interned_string_int(const char *str, int len, int free_src TSRMLS_DC);
+static void zend_interned_strings_snapshot_int(TSRMLS_D);
+static void zend_interned_strings_restore_int(TSRMLS_D);
+
+void zend_interned_strings_init(TSRMLS_D)
+{
+#ifndef ZTS
+ size_t size = 1024 * 1024;
+
+#if ZEND_DEBUG_INTERNED_STRINGS
+ CG(interned_strings_start) = valloc(size);
+#else
+ CG(interned_strings_start) = malloc(size);
+#endif
+
+ CG(interned_strings_top) = CG(interned_strings_start);
+ CG(interned_strings_snapshot_top) = CG(interned_strings_start);
+ CG(interned_strings_end) = CG(interned_strings_start) + size;
+
+ zend_hash_init(&CG(interned_strings), 0, NULL, NULL, 1);
+
+ CG(interned_strings).nTableMask = CG(interned_strings).nTableSize - 1;
+ CG(interned_strings).arBuckets = (Bucket **) pecalloc(CG(interned_strings).nTableSize, sizeof(Bucket *), CG(interned_strings).persistent);
+
+#if ZEND_DEBUG_INTERNED_STRINGS
+ mprotect(CG(interned_strings_start), CG(interned_strings_end) - CG(interned_strings_start), PROT_READ);
+#endif
+
+#endif
+
+ zend_new_interned_string = zend_new_interned_string_int;
+ zend_interned_strings_snapshot = zend_interned_strings_snapshot_int;
+ zend_interned_strings_restore = zend_interned_strings_restore_int;
+}
+
+void zend_interned_strings_dtor(TSRMLS_D)
+{
+#ifndef ZTS
+#if ZEND_DEBUG_INTERNED_STRINGS
+ mprotect(CG(interned_strings_start), CG(interned_strings_end) - CG(interned_strings_start), PROT_WRITE | PROT_READ);
+#endif
+ free(CG(interned_strings).arBuckets);
+ free(CG(interned_strings_start));
+#endif
+}
+
+static const char *zend_new_interned_string_int(const char *arKey, int nKeyLength, int free_src TSRMLS_DC)
+{
+#ifndef ZTS
+ ulong h;
+ uint nIndex;
+ Bucket *p;
+
+ if (IS_INTERNED(arKey)) {
+ return arKey;
+ }
+
+ h = zend_inline_hash_func(arKey, nKeyLength);
+ nIndex = h & CG(interned_strings).nTableMask;
+ p = CG(interned_strings).arBuckets[nIndex];
+ while (p != NULL) {
+ if ((p->h == h) && (p->nKeyLength == nKeyLength)) {
+ if (!memcmp(p->arKey, arKey, nKeyLength)) {
+ if (free_src) {
+ efree((void *)arKey);
+ }
+ return p->arKey;
+ }
+ }
+ p = p->pNext;
+ }
+
+ if (CG(interned_strings_top) + ZEND_MM_ALIGNED_SIZE(sizeof(Bucket) + nKeyLength) >=
+ CG(interned_strings_end)) {
+ /* no memory */
+ return arKey;
+ }
+
+ p = (Bucket *) CG(interned_strings_top);
+ CG(interned_strings_top) += ZEND_MM_ALIGNED_SIZE(sizeof(Bucket) + nKeyLength);
+
+#if ZEND_DEBUG_INTERNED_STRINGS
+ mprotect(CG(interned_strings_start), CG(interned_strings_end) - CG(interned_strings_start), PROT_READ | PROT_WRITE);
+#endif
+
+ p->arKey = (char*)(p+1);
+ memcpy((char*)p->arKey, arKey, nKeyLength);
+ if (free_src) {
+ efree((void *)arKey);
+ }
+ p->nKeyLength = nKeyLength;
+ p->h = h;
+ p->pData = &p->pDataPtr;
+ p->pDataPtr = p;
+
+ p->pNext = CG(interned_strings).arBuckets[nIndex];
+ p->pLast = NULL;
+ if (p->pNext) {
+ p->pNext->pLast = p;
+ }
+
+ HANDLE_BLOCK_INTERRUPTIONS();
+
+ p->pListLast = CG(interned_strings).pListTail;
+ CG(interned_strings).pListTail = p;
+ p->pListNext = NULL;
+ if (p->pListLast != NULL) {
+ p->pListLast->pListNext = p;
+ }
+ if (!CG(interned_strings).pListHead) {
+ CG(interned_strings).pListHead = p;
+ }
+
+ CG(interned_strings).arBuckets[nIndex] = p;
+
+ HANDLE_UNBLOCK_INTERRUPTIONS();
+
+ CG(interned_strings).nNumOfElements++;
+
+ if (CG(interned_strings).nNumOfElements > CG(interned_strings).nTableSize) {
+ if ((CG(interned_strings).nTableSize << 1) > 0) { /* Let's double the table size */
+ Bucket **t = (Bucket **) perealloc_recoverable(CG(interned_strings).arBuckets, (CG(interned_strings).nTableSize << 1) * sizeof(Bucket *), CG(interned_strings).persistent);
+
+ if (t) {
+ HANDLE_BLOCK_INTERRUPTIONS();
+ CG(interned_strings).arBuckets = t;
+ CG(interned_strings).nTableSize = (CG(interned_strings).nTableSize << 1);
+ CG(interned_strings).nTableMask = CG(interned_strings).nTableSize - 1;
+ zend_hash_rehash(&CG(interned_strings));
+ HANDLE_UNBLOCK_INTERRUPTIONS();
+ }
+ }
+ }
+
+#if ZEND_DEBUG_INTERNED_STRINGS
+ mprotect(CG(interned_strings_start), CG(interned_strings_end) - CG(interned_strings_start), PROT_READ);
+#endif
+
+ return p->arKey;
+#else
+ return arKey;
+#endif
+}
+
+static void zend_interned_strings_snapshot_int(TSRMLS_D)
+{
+ CG(interned_strings_snapshot_top) = CG(interned_strings_top);
+}
+
+static void zend_interned_strings_restore_int(TSRMLS_D)
+{
+#ifndef ZTS
+ Bucket *p;
+ int i;
+#endif
+
+ CG(interned_strings_top) = CG(interned_strings_snapshot_top);
+
+#ifndef ZTS
+#if ZEND_DEBUG_INTERNED_STRINGS
+ mprotect(CG(interned_strings_start), CG(interned_strings_end) - CG(interned_strings_start), PROT_WRITE | PROT_READ);
+#endif
+
+ for (i = 0; i < CG(interned_strings).nTableSize; i++) {
+ p = CG(interned_strings).arBuckets[i];
+ while (p && p->arKey > CG(interned_strings_top)) {
+ CG(interned_strings).nNumOfElements--;
+ if (p->pListLast != NULL) {
+ p->pListLast->pListNext = p->pListNext;
+ } else {
+ CG(interned_strings).pListHead = p->pListNext;
+ }
+ if (p->pListNext != NULL) {
+ p->pListNext->pListLast = p->pListLast;
+ } else {
+ CG(interned_strings).pListTail = p->pListLast;
+ }
+ p = p->pNext;
+ }
+ if (p) {
+ p->pLast = NULL;
+ }
+ CG(interned_strings).arBuckets[i] = p;
+ }
+
+#if ZEND_DEBUG_INTERNED_STRINGS
+ mprotect(CG(interned_strings_start), CG(interned_strings_end) - CG(interned_strings_start), PROT_READ);
+#endif
+#endif
+}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/Zend/zend_string.h b/Zend/zend_string.h
new file mode 100644
index 000000000..a61d2fb30
--- /dev/null
+++ b/Zend/zend_string.h
@@ -0,0 +1,71 @@
+/*
+ +----------------------------------------------------------------------+
+ | Zend Engine |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1998-2012 Zend Technologies Ltd. (http://www.zend.com) |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.00 of the Zend license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available through the world-wide-web at the following url: |
+ | http://www.zend.com/license/2_00.txt. |
+ | If you did not receive a copy of the Zend license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@zend.com so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Dmitry Stogov <dmitry@zend.com> |
+ +----------------------------------------------------------------------+
+*/
+
+/* $Id: $ */
+
+#ifndef ZEND_STRING_H
+#define ZEND_STRING_H
+
+#include "zend.h"
+
+ZEND_API extern const char *(*zend_new_interned_string)(const char *str, int len, int free_src TSRMLS_DC);
+ZEND_API extern void (*zend_interned_strings_snapshot)(TSRMLS_D);
+ZEND_API extern void (*zend_interned_strings_restore)(TSRMLS_D);
+
+void zend_interned_strings_init(TSRMLS_D);
+void zend_interned_strings_dtor(TSRMLS_D);
+
+#ifndef ZTS
+
+#define IS_INTERNED(s) \
+ (((s) >= CG(interned_strings_start)) && ((s) < CG(interned_strings_end)))
+
+#else
+
+#define IS_INTERNED(s) \
+ (0)
+
+#endif
+
+#define INTERNED_LEN(s) \
+ (((Bucket*)(((char*)(s))-sizeof(Bucket)))->nKeyLength)
+
+#define INTERNED_HASH(s) \
+ (((Bucket*)(((char*)(s))-sizeof(Bucket)))->h)
+
+#define str_efree(s) do { \
+ if (!IS_INTERNED(s)) { \
+ efree((char*)s); \
+ } \
+ } while (0)
+
+#define str_free(s) do { \
+ if (!IS_INTERNED(s)) { \
+ free((char*)s); \
+ } \
+ } while (0)
+
+#endif /* ZEND_STRING_H */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ */
diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c
index 6cfcbc608..678f60a67 100644
--- a/Zend/zend_strtod.c
+++ b/Zend/zend_strtod.c
@@ -2037,11 +2037,7 @@ ret1:
return s0;
}
-/* F* VC6 */
-#if _MSC_VER <= 1300
-# pragma optimize( "", off )
-#endif
-ZEND_API double zend_strtod (CONST char *s00, char **se)
+ZEND_API double zend_strtod (CONST char *s00, CONST char **se)
{
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
@@ -2574,7 +2570,7 @@ retfree:
Bfree(delta);
ret:
if (se)
- *se = (char *)s;
+ *se = s;
result = sign ? -value(rv) : value(rv);
_THREAD_PRIVATE_MUTEX_LOCK(pow5mult_mutex);
@@ -2588,13 +2584,18 @@ ret:
return result;
}
-ZEND_API double zend_hex_strtod(const char *str, char **endptr)
+ZEND_API double zend_hex_strtod(const char *str, const char **endptr)
{
const char *s = str;
char c;
int any = 0;
double value = 0;
+ if (strlen(str) < 2) {
+ *endptr = str;
+ return 0.0;
+ }
+
if (*s == '0' && (s[1] == 'x' || s[1] == 'X')) {
s += 2;
}
@@ -2615,19 +2616,24 @@ ZEND_API double zend_hex_strtod(const char *str, char **endptr)
}
if (endptr != NULL) {
- *endptr = (char *)(any ? s - 1 : str);
+ *endptr = any ? s - 1 : str;
}
return value;
}
-ZEND_API double zend_oct_strtod(const char *str, char **endptr)
+ZEND_API double zend_oct_strtod(const char *str, const char **endptr)
{
const char *s = str;
char c;
double value = 0;
int any = 0;
+ if (strlen(str) < 1) {
+ *endptr = str;
+ return 0.0;
+ }
+
/* skip leading zero */
s++;
@@ -2643,6 +2649,49 @@ ZEND_API double zend_oct_strtod(const char *str, char **endptr)
}
if (endptr != NULL) {
+ *endptr = any ? s - 1 : str;
+ }
+
+ return value;
+}
+
+ZEND_API double zend_bin_strtod(const char *str, const char **endptr)
+{
+ const char *s = str;
+ char c;
+ double value = 0;
+ int any = 0;
+
+ if (strlen(str) < 2) {
+ *endptr = str;
+ return 0.0;
+ }
+
+ if ('0' == *s && ('b' == s[1] || 'B' == s[1])) {
+ s += 2;
+ }
+
+ while ((c = *s++)) {
+ /*
+ * Verify the validity of the current character as a base-2 digit. In
+ * the event that an invalid digit is found, halt the conversion and
+ * return the portion which has been converted thus far.
+ */
+ if ('0' == c || '1' == c)
+ value = value * 2 + c - '0';
+ else
+ break;
+
+ any = 1;
+ }
+
+ /*
+ * As with many strtoX implementations, should the subject sequence be
+ * empty or not well-formed, no conversion is performed and the original
+ * value of str is stored in *endptr, provided that endptr is not a null
+ * pointer.
+ */
+ if (NULL != endptr) {
*endptr = (char *)(any ? s - 1 : str);
}
diff --git a/Zend/zend_strtod.h b/Zend/zend_strtod.h
index fb4e2162e..abf164407 100644
--- a/Zend/zend_strtod.h
+++ b/Zend/zend_strtod.h
@@ -27,9 +27,10 @@
BEGIN_EXTERN_C()
ZEND_API void zend_freedtoa(char *s);
ZEND_API char * zend_dtoa(double _d, int mode, int ndigits, int *decpt, int *sign, char **rve);
-ZEND_API double zend_strtod(const char *s00, char **se);
-ZEND_API double zend_hex_strtod(const char *str, char **endptr);
-ZEND_API double zend_oct_strtod(const char *str, char **endptr);
+ZEND_API double zend_strtod(const char *s00, const char **se);
+ZEND_API double zend_hex_strtod(const char *str, const char **endptr);
+ZEND_API double zend_oct_strtod(const char *str, const char **endptr);
+ZEND_API double zend_bin_strtod(const char *str, const char **endptr);
ZEND_API int zend_startup_strtod(void);
ZEND_API int zend_shutdown_strtod(void);
END_EXTERN_C()
diff --git a/Zend/zend_types.h b/Zend/zend_types.h
index 5afbd0b66..6532ab160 100644
--- a/Zend/zend_types.h
+++ b/Zend/zend_types.h
@@ -55,7 +55,7 @@ typedef struct _zend_object_handlers zend_object_handlers;
typedef struct _zend_object_value {
zend_object_handle handle;
- zend_object_handlers *handlers;
+ const zend_object_handlers *handlers;
} zend_object_value;
#endif /* ZEND_TYPES_H */
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index f69700baa..a4fda446c 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -77,7 +77,7 @@ ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC)
case IS_STRING:
case IS_CONSTANT:
CHECK_ZVAL_STRING_REL(zvalue);
- free(zvalue->value.str.val);
+ str_free(zvalue->value.str.val);
break;
case IS_ARRAY:
case IS_CONSTANT_ARRAY:
@@ -117,7 +117,9 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
case IS_CONSTANT:
case IS_STRING:
CHECK_ZVAL_STRING_REL(zvalue);
- zvalue->value.str.val = (char *) estrndup_rel(zvalue->value.str.val, zvalue->value.str.len);
+ if (!IS_INTERNED(zvalue->value.str.val)) {
+ zvalue->value.str.val = (char *) estrndup_rel(zvalue->value.str.val, zvalue->value.str.len);
+ }
break;
case IS_ARRAY:
case IS_CONSTANT_ARRAY: {
@@ -159,17 +161,6 @@ ZEND_API void _zval_dtor_wrapper(zval *zvalue)
zval_dtor(zvalue);
}
-ZEND_API void zval_property_ctor(zval **p) /* {{{ */
-{
- zval *orig_ptr = *p;
-
- ALLOC_ZVAL(*p);
- **p = *orig_ptr;
- zval_copy_ctor(*p);
- Z_SET_REFCOUNT_PP(p, 1);
- Z_UNSET_ISREF_PP(p);
-}
-/* }}} */
#if ZEND_DEBUG
ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue)
@@ -196,6 +187,51 @@ ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zval_ptr)
}
#endif
+ZEND_API int zval_copy_static_var(zval **p TSRMLS_DC, int num_args, va_list args, zend_hash_key *key) /* {{{ */
+{
+ HashTable *target = va_arg(args, HashTable*);
+ zend_bool is_ref;
+ zval *tmp;
+
+ if (Z_TYPE_PP(p) & (IS_LEXICAL_VAR|IS_LEXICAL_REF)) {
+ is_ref = Z_TYPE_PP(p) & IS_LEXICAL_REF;
+
+ if (!EG(active_symbol_table)) {
+ zend_rebuild_symbol_table(TSRMLS_C);
+ }
+ if (zend_hash_quick_find(EG(active_symbol_table), key->arKey, key->nKeyLength, key->h, (void **) &p) == FAILURE) {
+ if (is_ref) {
+ ALLOC_INIT_ZVAL(tmp);
+ Z_SET_ISREF_P(tmp);
+ zend_hash_quick_add(EG(active_symbol_table), key->arKey, key->nKeyLength, key->h, &tmp, sizeof(zval*), (void**)&p);
+ } else {
+ tmp = EG(uninitialized_zval_ptr);
+ zend_error(E_NOTICE,"Undefined variable: %s", key->arKey);
+ }
+ } else {
+ if (is_ref) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(p);
+ tmp = *p;
+ } else if (Z_ISREF_PP(p)) {
+ ALLOC_INIT_ZVAL(tmp);
+ ZVAL_COPY_VALUE(tmp, *p);
+ zval_copy_ctor(tmp);
+ Z_SET_REFCOUNT_P(tmp, 0);
+ Z_UNSET_ISREF_P(tmp);
+ } else {
+ tmp = *p;
+ }
+ }
+ } else {
+ tmp = *p;
+ }
+ if (zend_hash_quick_add(target, key->arKey, key->nKeyLength, key->h, &tmp, sizeof(zval*), NULL) == SUCCESS) {
+ Z_ADDREF_P(tmp);
+ }
+ return ZEND_HASH_APPLY_KEEP;
+}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h
index 2453fe0c3..1c52e3db2 100644
--- a/Zend/zend_variables.h
+++ b/Zend/zend_variables.h
@@ -27,7 +27,7 @@ BEGIN_EXTERN_C()
ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC);
-static inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
+static zend_always_inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
{
if (zvalue->type <= IS_BOOL) {
return;
@@ -37,7 +37,7 @@ static inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
-static inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
+static zend_always_inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
{
if (zvalue->type <= IS_BOOL) {
return;
@@ -45,6 +45,7 @@ static inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
_zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
}
+ZEND_API int zval_copy_static_var(zval **p TSRMLS_DC, int num_args, va_list args, zend_hash_key *key);
ZEND_API int zend_print_variable(zval *var);
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
@@ -76,17 +77,6 @@ ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zvalue);
ZEND_API void zval_add_ref(zval **p);
-ZEND_API void zval_property_ctor(zval **);
-
-#ifdef ZTS
-# define zval_shared_property_ctor zval_property_ctor
-#else
-# define zval_shared_property_ctor zval_add_ref
-#endif
-
-#define zval_copy_property_ctor(ce) ((copy_ctor_func_t) (((ce)->type == ZEND_INTERNAL_CLASS) ? zval_shared_property_ctor : zval_add_ref))
-
-
END_EXTERN_C()
#define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 1a4f630ce..ca0697806 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -27,299 +27,332 @@
ZEND_VM_HANDLER(1, ZEND_ADD, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- add_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(2, ZEND_SUB, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(3, ZEND_MUL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(4, ZEND_DIV, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- div_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(5, ZEND_MOD, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(6, ZEND_SL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(7, ZEND_SR, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(8, ZEND_CONCAT, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(15, ZEND_IS_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(16, ZEND_IS_NOT_IDENTICAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(17, ZEND_IS_EQUAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC));
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(18, ZEND_IS_NOT_EQUAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC));
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(19, ZEND_IS_SMALLER, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC));
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(20, ZEND_IS_SMALLER_OR_EQUAL, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
GET_OP1_ZVAL_PTR(BP_VAR_R),
- GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC));
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(9, ZEND_BW_OR, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(10, ZEND_BW_AND, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(11, ZEND_BW_XOR, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(14, ZEND_BOOL_XOR, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(12, ZEND_BW_NOT, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_not_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ bitwise_not_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(13, ZEND_BOOL_NOT, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- boolean_not_function(&EX_T(opline->result.u.var).tmp_var,
+ SAVE_OPLINE();
+ boolean_not_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP1();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMP|VAR|UNUSED|CV, int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC))
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data1;
- zval **object_ptr = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_W);
+ zval **object_ptr = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
zval *object;
zval *property = GET_OP2_ZVAL_PTR(BP_VAR_R);
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (OP1_TYPE == IS_VAR && !object_ptr) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
FREE_OP2();
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -330,16 +363,16 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMP|VAR
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -349,7 +382,7 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMP|VAR
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -371,22 +404,22 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMP|VAR
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -401,17 +434,19 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMP|VAR
FREE_OP1_VAR_PTR();
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HELPER_EX(zend_binary_assign_op_helper, VAR|UNUSED|CV, CONST|TMP|VAR|UNUSED|CV, int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC))
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, binary_op);
@@ -419,21 +454,19 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_helper, VAR|UNUSED|CV, CONST|TMP|VAR|UNU
case ZEND_ASSIGN_DIM: {
zval **container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && !container) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (OP1_TYPE == IS_VAR && !OP1_FREE) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_binary_assign_op_obj_helper, binary_op, binary_op);
} else {
- zend_op *op_data = opline+1;
zval *dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, IS_OP2_TMP_FREE(), BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, OP2_TYPE, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
@@ -444,23 +477,28 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_helper, VAR|UNUSED|CV, CONST|TMP|VAR|UNU
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
FREE_OP2();
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -472,17 +510,22 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_helper, VAR|UNUSED|CV, CONST|TMP|VAR|UNU
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
FREE_OP2();
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
+ FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+ FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
}
- FREE_OP1_VAR_PTR();
ZEND_VM_NEXT_OPCODE();
}
@@ -543,29 +586,35 @@ ZEND_VM_HANDLER(33, ZEND_ASSIGN_BW_XOR, VAR|UNUSED|CV, CONST|TMP|VAR|UNUSED|CV)
ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|CV, incdec_t incdec_op)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **object_ptr = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_W);
+ zval **object_ptr;
zval *object;
- zval *property = GET_OP2_ZVAL_PTR(BP_VAR_R);
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (OP1_TYPE == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
+ property = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
FREE_OP2();
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -576,13 +625,13 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -591,9 +640,9 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -607,14 +656,14 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -625,6 +674,7 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|
FREE_OP2();
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -640,26 +690,32 @@ ZEND_VM_HANDLER(133, ZEND_PRE_DEC_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|CV, incdec_t incdec_op)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **object_ptr = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_W);
+ zval **object_ptr;
zval *object;
- zval *property = GET_OP2_ZVAL_PTR(BP_VAR_R);
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (OP1_TYPE == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
+ property = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
FREE_OP2();
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -670,12 +726,12 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -685,10 +741,10 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -698,20 +754,19 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -721,6 +776,7 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR
FREE_OP2();
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -736,171 +792,197 @@ ZEND_VM_HANDLER(135, ZEND_POST_DEC_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
ZEND_VM_HANDLER(34, ZEND_PRE_INC, VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
+ zval **var_ptr;
+
+ SAVE_OPLINE();
+ var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && !var_ptr) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (OP1_TYPE == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- increment_function(val);
+ fast_increment_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- increment_function(*var_ptr);
+ fast_increment_function(*var_ptr);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(35, ZEND_PRE_DEC, VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
+ zval **var_ptr;
+
+ SAVE_OPLINE();
+ var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && !var_ptr) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (OP1_TYPE == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- decrement_function(val);
+ fast_decrement_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- decrement_function(*var_ptr);
+ fast_decrement_function(*var_ptr);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(36, ZEND_POST_INC, VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
+ zval **var_ptr, *retval;
+
+ SAVE_OPLINE();
+ var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && !var_ptr) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (OP1_TYPE == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).tmp_var = *EG(uninitialized_zval_ptr);
- }
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ ZVAL_NULL(&EX_T(opline->result.var).tmp_var);
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
- EX_T(opline->result.u.var).tmp_var = **var_ptr;
- zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
+ retval = &EX_T(opline->result.var).tmp_var;
+ ZVAL_COPY_VALUE(retval, *var_ptr);
+ zendi_zval_copy_ctor(*retval);
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- increment_function(val);
+ fast_increment_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- increment_function(*var_ptr);
+ fast_increment_function(*var_ptr);
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(37, ZEND_POST_DEC, VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
+ zval **var_ptr, *retval;
+
+ SAVE_OPLINE();
+ var_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && !var_ptr) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (OP1_TYPE == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).tmp_var = *EG(uninitialized_zval_ptr);
- }
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ ZVAL_NULL(&EX_T(opline->result.var).tmp_var);
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
- EX_T(opline->result.u.var).tmp_var = **var_ptr;
- zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
+ retval = &EX_T(opline->result.var).tmp_var;
+ ZVAL_COPY_VALUE(retval, *var_ptr);
+ zendi_zval_copy_ctor(*retval);
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- decrement_function(val);
+ fast_decrement_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- decrement_function(*var_ptr);
+ fast_decrement_function(*var_ptr);
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(40, ZEND_ECHO, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval z_copy;
- zval *z = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *z;
+
+ SAVE_OPLINE();
+ z = GET_OP1_ZVAL_PTR(BP_VAR_R);
if (OP1_TYPE != IS_CONST &&
- Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL) {
+ UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) &&
+ Z_OBJ_HT_P(z)->get_method != NULL) {
if (OP1_TYPE == IS_TMP_VAR) {
INIT_PZVAL(z);
}
@@ -915,46 +997,72 @@ ZEND_VM_HANDLER(40, ZEND_ECHO, CONST|TMP|VAR|CV, ANY)
}
FREE_OP1();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(41, ZEND_PRINT, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
-
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG;
+ USE_OPLINE
+ ZVAL_LONG(&EX_T(opline->result.var).tmp_var, 1);
ZEND_VM_DISPATCH_TO_HANDLER(ZEND_ECHO);
}
-ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMP|VAR|CV, ANY, int type)
+ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMP|VAR|CV, UNUSED|CONST|VAR, int type)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *varname = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *varname;
zval **retval;
zval tmp_varname;
HashTable *target_symbol_table;
+ ulong hash_value;
- if (OP1_TYPE != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
- tmp_varname = *varname;
+ SAVE_OPLINE();
+ varname = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
+ if (OP1_TYPE != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
convert_to_string(&tmp_varname);
varname = &tmp_varname;
}
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
+ if (OP2_TYPE != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (OP2_TYPE == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((OP1_TYPE == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
FREE_OP1();
} else {
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
/*
if (!target_symbol_table) {
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
*/
- if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) {
+ if (OP1_TYPE == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
switch (type) {
case BP_VAR_R:
case BP_VAR_UNSET:
@@ -966,17 +1074,14 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMP|VAR|CV, ANY, int type
case BP_VAR_RW:
zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
/* break missing intentionally */
- case BP_VAR_W: {
- zval *new_zval = &EG(uninitialized_zval);
-
- Z_ADDREF_P(new_zval);
- zend_hash_update(target_symbol_table, varname->value.str.val, varname->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval);
- }
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
break;
EMPTY_SWITCH_DEFAULT_CASE()
}
}
- switch (opline->op2.u.EA.type) {
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
case ZEND_FETCH_GLOBAL:
if (OP1_TYPE != IS_TMP_VAR) {
FREE_OP1();
@@ -990,7 +1095,7 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMP|VAR|CV, ANY, int type
break;
case ZEND_FETCH_GLOBAL_LOCK:
if (OP1_TYPE == IS_VAR && !free_op1.var) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
break;
}
@@ -998,261 +1103,248 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMP|VAR|CV, ANY, int type
if (OP1_TYPE != IS_CONST && varname == &tmp_varname) {
- zval_dtor(varname);
+ zval_dtor(&tmp_varname);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
- }
- PZVAL_LOCK(*retval);
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_IS:
- AI_SET_PTR(EX_T(opline->result.u.var).var, *retval);
- break;
- case BP_VAR_UNSET: {
- zend_free_op free_res;
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
- EX_T(opline->result.u.var).var.ptr_ptr = retval;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- }
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
- FREE_OP_VAR_PTR(free_res);
- break;
- default:
- EX_T(opline->result.u.var).var.ptr_ptr = retval;
- break;
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
}
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
}
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(80, ZEND_FETCH_R, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(80, ZEND_FETCH_R, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
{
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_R);
}
-ZEND_VM_HANDLER(83, ZEND_FETCH_W, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(83, ZEND_FETCH_W, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
{
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_W);
}
-ZEND_VM_HANDLER(86, ZEND_FETCH_RW, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(86, ZEND_FETCH_RW, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
{
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_RW);
}
-ZEND_VM_HANDLER(92, ZEND_FETCH_FUNC_ARG, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(92, ZEND_FETCH_FUNC_ARG, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
{
+ USE_OPLINE
+
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type,
- ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), EX(opline)->extended_value)?BP_VAR_W:BP_VAR_R);
+ ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R);
}
-ZEND_VM_HANDLER(95, ZEND_FETCH_UNSET, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(95, ZEND_FETCH_UNSET, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
{
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_UNSET);
}
-ZEND_VM_HANDLER(89, ZEND_FETCH_IS, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(89, ZEND_FETCH_IS, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
{
ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_var_address_helper, type, BP_VAR_IS);
}
ZEND_VM_HANDLER(81, ZEND_FETCH_DIM_R, VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
zval **container;
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK &&
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
OP1_TYPE != IS_CV &&
- EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_R);
- if (OP1_TYPE == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, IS_OP2_TMP_FREE(), BP_VAR_R TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC);
FREE_OP2();
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(84, ZEND_FETCH_DIM_W, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
- zval **container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && !container) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, IS_OP2_TMP_FREE(), BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_W TSRMLS_CC);
FREE_OP2();
- if (OP1_TYPE == IS_VAR && OP1_FREE &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
FREE_OP1_VAR_PTR();
/* We are going to assign the result by reference */
- if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ if (UNEXPECTED(opline->extended_value != 0)) {
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ if (retval_ptr) {
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(87, ZEND_FETCH_DIM_RW, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
- zval **container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW);
- if (OP1_TYPE == IS_VAR && !container) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, IS_OP2_TMP_FREE(), BP_VAR_RW TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_RW TSRMLS_CC);
FREE_OP2();
- if (OP1_TYPE == IS_VAR && OP1_FREE &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(90, ZEND_FETCH_DIM_IS, VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
- zval **container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_IS);
+ zval **container;
- if (OP1_TYPE == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, IS_OP2_TMP_FREE(), BP_VAR_IS TSRMLS_CC);
+ SAVE_OPLINE();
+ container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_IS);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_IS TSRMLS_CC);
FREE_OP2();
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
zval **container;
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ SAVE_OPLINE();
+
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && !container) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, IS_OP2_TMP_FREE(), BP_VAR_W TSRMLS_CC);
- if (OP1_TYPE == IS_VAR && OP1_FREE &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_W TSRMLS_CC);
+ if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
} else {
if (OP2_TYPE == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_R);
- if (OP1_TYPE == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, IS_OP2_TMP_FREE(), BP_VAR_R TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC);
}
FREE_OP2();
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(96, ZEND_FETCH_DIM_UNSET, VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_UNSET);
- zval *dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = GET_OP1_ZVAL_PTR_PTR(BP_VAR_UNSET);
- /* Not needed in DIM_UNSET
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- */
if (OP1_TYPE == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
}
- if (OP1_TYPE == IS_VAR && !container) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, IS_OP2_TMP_FREE(), BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_UNSET TSRMLS_CC);
FREE_OP2();
- if (OP1_TYPE == IS_VAR && OP1_FREE &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
FREE_OP1_VAR_PTR();
- if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
+ if (UNEXPECTED(EX_T(opline->result.var).var.ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot unset string offsets");
} else {
zend_free_op free_res;
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*retval_ptr, &free_res);
+ if (retval_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*retval_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
- ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HELPER_EX(zend_fetch_property_address_read_helper, VAR|UNUSED|CV, CONST|TMP|VAR|CV, int type)
+ZEND_VM_HELPER(zend_fetch_property_address_read_helper, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *container = GET_OP1_OBJ_ZVAL_PTR(type);
+ zval *container;
zend_free_op free_op2;
- zval *offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_R);
+ offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
FREE_OP2();
} else {
zval *retval;
@@ -1262,18 +1354,10 @@ ZEND_VM_HELPER_EX(zend_fetch_property_address_read_helper, VAR|UNUSED|CV, CONST|
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (IS_OP2_TMP_FREE()) {
zval_ptr_dtor(&offset);
@@ -1283,138 +1367,184 @@ ZEND_VM_HELPER_EX(zend_fetch_property_address_read_helper, VAR|UNUSED|CV, CONST|
}
FREE_OP1();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(82, ZEND_FETCH_OBJ_R, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_property_address_read_helper, type, BP_VAR_R);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_property_address_read_helper);
}
ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = GET_OP2_ZVAL_PTR(BP_VAR_R);
+
if (OP1_TYPE == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (IS_OP2_TMP_FREE()) {
MAKE_REAL_ZVAL_PTR(property);
}
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && !container) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (IS_OP2_TMP_FREE()) {
zval_ptr_dtor(&property);
} else {
FREE_OP2();
}
- if (OP1_TYPE == IS_VAR && OP1_FREE &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
FREE_OP1_VAR_PTR();
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
-
+
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = GET_OP2_ZVAL_PTR(BP_VAR_R);
- zval **container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_RW);
if (IS_OP2_TMP_FREE()) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (OP1_TYPE == IS_VAR && !container) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (IS_OP2_TMP_FREE()) {
zval_ptr_dtor(&property);
} else {
FREE_OP2();
}
- if (OP1_TYPE == IS_VAR && OP1_FREE &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(91, ZEND_FETCH_OBJ_IS, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
{
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_property_address_read_helper, type, BP_VAR_IS);
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *container;
+ zend_free_op free_op2;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_IS);
+ offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ FREE_OP2();
+ } else {
+ zval *retval;
+
+ if (IS_OP2_TMP_FREE()) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (IS_OP2_TMP_FREE()) {
+ zval_ptr_dtor(&offset);
+ } else {
+ FREE_OP2();
+ }
+ }
+
+ FREE_OP1();
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1, free_op2;
- zval *property = GET_OP2_ZVAL_PTR(BP_VAR_R);
- zval **container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_W);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_W);
if (IS_OP2_TMP_FREE()) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (OP1_TYPE == IS_VAR && !container) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (IS_OP2_TMP_FREE()) {
zval_ptr_dtor(&property);
} else {
FREE_OP2();
}
- if (OP1_TYPE == IS_VAR && OP1_FREE &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- ZEND_VM_DISPATCH_TO_HELPER_EX(zend_fetch_property_address_read_helper, type, BP_VAR_R);
+ ZEND_VM_DISPATCH_TO_HELPER(zend_fetch_property_address_read_helper);
}
}
ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_res;
- zval **container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_R);
- zval *property = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
+ property = GET_OP2_ZVAL_PTR(BP_VAR_R);
if (OP1_TYPE == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -1424,71 +1554,72 @@ ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
if (IS_OP2_TMP_FREE()) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (OP1_TYPE == IS_VAR && !container) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (IS_OP2_TMP_FREE()) {
zval_ptr_dtor(&property);
} else {
FREE_OP2();
}
- if (OP1_TYPE == IS_VAR && OP1_FREE &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (OP1_TYPE == IS_VAR && OP1_FREE && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
FREE_OP1_VAR_PTR();
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(98, ZEND_FETCH_DIM_TMP_VAR, CONST|TMP, CONST)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *container = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *container;
- if (Z_TYPE_P(container) != IS_ARRAY) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
} else {
zend_free_op free_op2;
- zval *dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ zval *value = *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), GET_OP2_ZVAL_PTR(BP_VAR_R), OP2_TYPE, BP_VAR_R TSRMLS_CC);
- AI_SET_PTR(EX_T(opline->result.u.var).var, *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, BP_VAR_R TSRMLS_CC));
- SELECTIVE_PZVAL_LOCK(EX_T(opline->result.u.var).var.ptr, &opline->result);
+ PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
FREE_OP2();
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **object_ptr = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_W);
- zval *property_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_W);
+ property_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
if (IS_OP2_TMP_FREE()) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (OP1_TYPE == IS_VAR && !object_ptr) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (IS_OP2_TMP_FREE()) {
zval_ptr_dtor(&property_name);
} else {
@@ -1496,18 +1627,21 @@ ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
}
FREE_OP1_VAR_PTR();
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(147, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
+ zval **object_ptr;
+
+ SAVE_OPLINE();
+ object_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && !object_ptr) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (Z_TYPE_PP(object_ptr) == IS_OBJECT) {
@@ -1517,7 +1651,7 @@ ZEND_VM_HANDLER(147, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
if (IS_OP2_TMP_FREE()) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (IS_OP2_TMP_FREE()) {
zval_ptr_dtor(&property_name);
} else {
@@ -1529,28 +1663,44 @@ ZEND_VM_HANDLER(147, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
zval *dim = GET_OP2_ZVAL_PTR(BP_VAR_R);
zval **variable_ptr_ptr;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, IS_OP2_TMP_FREE(), BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), object_ptr, dim, OP2_TYPE, BP_VAR_W TSRMLS_CC);
FREE_OP2();
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- if (!variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
+ if (UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T((opline+1)->op2.var), value, (opline+1)->op1_type TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T((opline+1)->op2.var).str_offset.str)+EX_T((opline+1)->op2.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_TMP_FREE(free_op_data1)) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if ((opline+1)->op1_type == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if ((opline+1)->op1_type == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
FREE_OP_VAR_PTR(free_op_data2);
@@ -1558,34 +1708,55 @@ ZEND_VM_HANDLER(147, ZEND_ASSIGN_DIM, VAR|CV, CONST|TMP|VAR|UNUSED|CV)
}
FREE_OP1_VAR_PTR();
/* assign_dim has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(38, ZEND_ASSIGN, VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *value = GET_OP2_ZVAL_PTR(BP_VAR_R);
- zval **variable_ptr_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
-
- if (OP1_TYPE == IS_VAR && !variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(opline->op1.u.var), value, OP2_TYPE TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(opline->op1.u.var).str_offset.str)+EX_T(opline->op1.u.var).str_offset.offset, 1, 1);
+ zval *value;
+ zval **variable_ptr_ptr;
+
+ SAVE_OPLINE();
+ value = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ variable_ptr_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
+
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T(opline->op1.var), value, OP2_TYPE TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T(opline->op1.var).str_offset.str)+EX_T(opline->op1.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (OP1_TYPE == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_OP2_TMP_FREE()) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_OP2_TMP_FREE() TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if (OP2_TYPE == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if (OP2_TYPE == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
@@ -1594,40 +1765,44 @@ ZEND_VM_HANDLER(38, ZEND_ASSIGN, VAR|CV, CONST|TMP|VAR|CV)
/* zend_assign_to_variable() always takes care of op2, never free it! */
FREE_OP2_IF_VAR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
zval **variable_ptr_ptr;
- zval **value_ptr_ptr = GET_OP2_ZVAL_PTR_PTR(BP_VAR_W);
+ zval **value_ptr_ptr;
+
+ SAVE_OPLINE();
+ value_ptr_ptr = GET_OP2_ZVAL_PTR_PTR(BP_VAR_W);
if (OP2_TYPE == IS_VAR &&
value_ptr_ptr &&
!Z_ISREF_PP(value_ptr_ptr) &&
opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !EX_T(opline->op2.u.var).var.fcall_returned_reference) {
+ !EX_T(opline->op2.var).var.fcall_returned_reference) {
if (free_op2.var == NULL) {
PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
}
zend_error(E_STRICT, "Only variables should be assigned by reference");
if (UNEXPECTED(EG(exception) != NULL)) {
FREE_OP2_VAR_PTR();
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
ZEND_VM_DISPATCH_TO_HANDLER(ZEND_ASSIGN);
} else if (OP2_TYPE == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
PZVAL_LOCK(*value_ptr_ptr);
}
- if (OP1_TYPE == IS_VAR && EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr)) {
zend_error_noreturn(E_ERROR, "Cannot assign by reference to overloaded object");
}
variable_ptr_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
- if ((OP2_TYPE == IS_VAR && !value_ptr_ptr) ||
- (OP1_TYPE == IS_VAR && !variable_ptr_ptr)) {
+ if ((OP2_TYPE == IS_VAR && UNEXPECTED(value_ptr_ptr == NULL)) ||
+ (OP1_TYPE == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL))) {
zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
}
zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
@@ -1636,47 +1811,53 @@ ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV)
Z_DELREF_PP(variable_ptr_ptr);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *variable_ptr_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*variable_ptr_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *variable_ptr_ptr);
}
FREE_OP1_VAR_PTR();
FREE_OP2_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(42, ZEND_JMP, ANY, ANY)
{
+ USE_OPLINE
+
#if DEBUG_ZEND>=2
- printf("Jumping to %d\n", EX(opline)->op1.u.opline_num);
+ printf("Jumping to %d\n", opline->op1.opline_num);
#endif
- ZEND_VM_SET_OPCODE(EX(opline)->op1.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
ZEND_VM_CONTINUE(); /* CHECK_ME */
}
ZEND_VM_HANDLER(43, ZEND_JMPZ, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *val;
int ret;
- if (OP1_TYPE == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
+ if (OP1_TYPE == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
ret = i_zend_is_true(val);
FREE_OP1();
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (!ret) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
@@ -1685,25 +1866,28 @@ ZEND_VM_HANDLER(43, ZEND_JMPZ, CONST|TMP|VAR|CV, ANY)
ZEND_VM_HANDLER(44, ZEND_JMPNZ, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *val;
int ret;
- if (OP1_TYPE == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
+ if (OP1_TYPE == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
ret = i_zend_is_true(val);
FREE_OP1();
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (ret) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
@@ -1712,18 +1896,21 @@ ZEND_VM_HANDLER(44, ZEND_JMPNZ, CONST|TMP|VAR|CV, ANY)
ZEND_VM_HANDLER(45, ZEND_JMPZNZ, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *val;
int retval;
- if (OP1_TYPE == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
+ if (OP1_TYPE == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
FREE_OP1();
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (EXPECTED(retval != 0)) {
@@ -1734,36 +1921,39 @@ ZEND_VM_HANDLER(45, ZEND_JMPZNZ, CONST|TMP|VAR|CV, ANY)
ZEND_VM_CONTINUE(); /* CHECK_ME */
} else {
#if DEBUG_ZEND>=2
- printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp on false to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.u.opline_num]);
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
ZEND_VM_CONTINUE(); /* CHECK_ME */
}
}
ZEND_VM_HANDLER(46, ZEND_JMPZ_EX, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *val;
int retval;
- if (OP1_TYPE == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
+ if (OP1_TYPE == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
FREE_OP1();
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
if (!retval) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
ZEND_VM_NEXT_OPCODE();
@@ -1771,55 +1961,71 @@ ZEND_VM_HANDLER(46, ZEND_JMPZ_EX, CONST|TMP|VAR|CV, ANY)
ZEND_VM_HANDLER(47, ZEND_JMPNZ_EX, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *val;
int retval;
- if (OP1_TYPE == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
+ if (OP1_TYPE == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
FREE_OP1();
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
if (retval) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(70, ZEND_FREE, TMP, ANY)
+ZEND_VM_HANDLER(70, ZEND_FREE, TMP|VAR, ANY)
{
- zendi_zval_dtor(EX_T(EX(opline)->op1.u.var).tmp_var);
+ USE_OPLINE
+
+ SAVE_OPLINE();
+ if (OP1_TYPE == IS_TMP_VAR) {
+ zendi_zval_dtor(EX_T(opline->op1.var).tmp_var);
+ } else {
+ zval_ptr_dtor(&EX_T(opline->op1.var).var.ptr);
+ }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(53, ZEND_INIT_STRING, ANY, ANY)
{
- zval *tmp = &EX_T(EX(opline)->result.u.var).tmp_var;
+ USE_OPLINE
+ zval *tmp = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
tmp->value.str.val = emalloc(1);
tmp->value.str.val[0] = 0;
tmp->value.str.len = 0;
Z_SET_REFCOUNT_P(tmp, 1);
tmp->type = IS_STRING;
Z_UNSET_ISREF_P(tmp);
+ /*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(54, ZEND_ADD_CHAR, TMP|UNUSED, CONST)
{
- zend_op *opline = EX(opline);
- zval *str = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+ zval *str = &EX_T(opline->result.var).tmp_var;
+
+ SAVE_OPLINE();
if (OP1_TYPE == IS_UNUSED) {
/* Initialize for erealloc in add_char_to_string */
@@ -1830,16 +2036,19 @@ ZEND_VM_HANDLER(54, ZEND_ADD_CHAR, TMP|UNUSED, CONST)
INIT_PZVAL(str);
}
- add_char_to_string(str, str, &opline->op2.u.constant);
+ add_char_to_string(str, str, opline->op2.zv);
/* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
+ /*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(55, ZEND_ADD_STRING, TMP|UNUSED, CONST)
{
- zend_op *opline = EX(opline);
- zval *str = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+ zval *str = &EX_T(opline->result.var).tmp_var;
+
+ SAVE_OPLINE();
if (OP1_TYPE == IS_UNUSED) {
/* Initialize for erealloc in add_string_to_string */
@@ -1850,21 +2059,25 @@ ZEND_VM_HANDLER(55, ZEND_ADD_STRING, TMP|UNUSED, CONST)
INIT_PZVAL(str);
}
- add_string_to_string(str, str, &opline->op2.u.constant);
+ add_string_to_string(str, str, opline->op2.zv);
/* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
+ /*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(56, ZEND_ADD_VAR, TMP|UNUSED, TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *str = &EX_T(opline->result.u.var).tmp_var;
- zval *var = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ zval *str = &EX_T(opline->result.var).tmp_var;
+ zval *var;
zval var_copy;
int use_copy = 0;
+ SAVE_OPLINE();
+ var = GET_OP2_ZVAL_PTR(BP_VAR_R);
+
if (OP1_TYPE == IS_UNUSED) {
/* Initialize for erealloc in add_string_to_string */
Z_STRVAL_P(str) = NULL;
@@ -1894,47 +2107,60 @@ ZEND_VM_HANDLER(56, ZEND_ADD_VAR, TMP|UNUSED, TMP|VAR|CV)
*/
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(109, ZEND_FETCH_CLASS, ANY, CONST|TMP|VAR|UNUSED|CV)
{
- zend_op *opline = EX(opline);
-
+ USE_OPLINE
+ SAVE_OPLINE();
+ EG(exception) = NULL;
if (OP2_TYPE == IS_UNUSED) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
zend_free_op free_op2;
zval *class_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
- if (OP2_TYPE != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) {
- EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name);
+ if (OP2_TYPE == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX_T(opline->result.var).class_entry = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ EX_T(opline->result.var).class_entry = zend_fetch_class_by_name(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->op2.literal + 1, opline->extended_value TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, EX_T(opline->result.var).class_entry);
+ }
+ } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
+ EX_T(opline->result.var).class_entry = Z_OBJCE_P(class_name);
} else if (Z_TYPE_P(class_name) == IS_STRING) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
} else {
zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
}
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, TMP|VAR|UNUSED|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op1, free_op2;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
function_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (OP2_TYPE != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
@@ -1943,25 +2169,36 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, TMP|VAR|UNUSED|CV, CONST|TMP|VAR|CV)
EX(object) = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_R);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
+
+ if (OP2_TYPE != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((OP2_TYPE == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (OP2_TYPE == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
}
-
- EX(called_scope) = Z_OBJCE_P(EX(object));
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
-
+
if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
EX(object) = NULL;
- } else {
+ } else {
if (!PZVAL_IS_REF(EX(object))) {
Z_ADDREF_P(EX(object)); /* For $this pointer */
} else {
@@ -1976,45 +2213,61 @@ ZEND_VM_HANDLER(112, ZEND_INIT_METHOD_CALL, TMP|VAR|UNUSED|CV, CONST|TMP|VAR|CV)
FREE_OP2();
FREE_OP1_IF_VAR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMP|VAR|UNUSED|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
zend_class_entry *ce;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (OP1_TYPE == IS_CONST) {
/* no function found. try a static method in class */
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
EX(called_scope) = ce;
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
-
- if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
+ ce = EX_T(opline->op1.var).class_entry;
+
+ if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
EX(called_scope) = EG(called_scope);
} else {
EX(called_scope) = ce;
}
}
- if(OP2_TYPE != IS_UNUSED) {
+
+ if (OP1_TYPE == IS_CONST &&
+ OP2_TYPE == IS_CONST &&
+ CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (OP1_TYPE != IS_CONST &&
+ OP2_TYPE == IS_CONST &&
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
+ /* do nothing */
+ } else if (OP2_TYPE != IS_UNUSED) {
char *function_name_strval = NULL;
int function_name_strlen = 0;
zend_free_op free_op2;
if (OP2_TYPE == IS_CONST) {
- function_name_strval = Z_STRVAL(opline->op2.u.constant);
- function_name_strlen = Z_STRLEN(opline->op2.u.constant);
+ function_name_strval = Z_STRVAL_P(opline->op2.zv);
+ function_name_strlen = Z_STRLEN_P(opline->op2.zv);
} else {
function_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
- if (Z_TYPE_P(function_name) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
@@ -2026,22 +2279,28 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMP|VAR|UNUS
if (ce->get_static_method) {
EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
} else {
- EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+ EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen, ((OP2_TYPE == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
}
- if (!EX(fbc)) {
+ if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
+ if (OP2_TYPE == IS_CONST && EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
+ if (OP1_TYPE == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
+ }
+ }
}
-
if (OP2_TYPE != IS_CONST) {
FREE_OP2();
}
} else {
- if(!ce->constructor) {
+ if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
}
EX(fbc) = ce->constructor;
}
@@ -2054,18 +2313,12 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMP|VAR|UNUS
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- int severity;
- char *verb;
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- severity = E_STRICT;
- verb = "should not";
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
} else {
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- severity = E_ERROR;
- verb = "cannot";
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
}
- zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
-
}
if ((EX(object) = EG(This))) {
Z_ADDREF_P(EX(object));
@@ -2073,28 +2326,56 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMP|VAR|UNUS
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
- char *function_name_strval, *lcname;
- int function_name_strlen;
- zend_free_op free_op2;
-
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (OP2_TYPE == IS_CONST) {
- if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
+ function_name = (zval*)(opline->op2.literal+1);
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (UNEXPECTED(zend_hash_quick_find(EG(function_table), Z_STRVAL_P(function_name), Z_STRLEN_P(function_name)+1, Z_HASH_P(function_name), (void **) &EX(fbc)) == FAILURE)) {
+ SAVE_OPLINE();
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
}
+ EX(object) = NULL;
+ /*CHECK_EXCEPTION();*/
+ ZEND_VM_NEXT_OPCODE();
} else {
+ char *function_name_strval, *lcname;
+ int function_name_strlen;
+ zend_free_op free_op2;
+
+ SAVE_OPLINE();
function_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
- if (OP2_TYPE != IS_CONST && OP2_TYPE != IS_TMP_VAR &&
- Z_TYPE_P(function_name) == IS_OBJECT &&
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ function_name_strval = Z_STRVAL_P(function_name);
+ function_name_strlen = Z_STRLEN_P(function_name);
+ if (function_name_strval[0] == '\\') {
+ function_name_strlen -= 1;
+ lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
+ } else {
+ lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
+ }
+ if (UNEXPECTED(zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
+ }
+ efree(lcname);
+ FREE_OP2();
+ EX(object) = NULL;
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else if (OP2_TYPE != IS_CONST && OP2_TYPE != IS_TMP_VAR &&
+ EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
Z_OBJ_HANDLER_P(function_name, get_closure) &&
Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
if (EX(object)) {
@@ -2107,46 +2388,96 @@ ZEND_VM_HANDLER(59, ZEND_INIT_FCALL_BY_NAME, ANY, CONST|TMP|VAR|CV)
} else {
FREE_OP2();
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
- }
+ } else if (OP2_TYPE != IS_CONST &&
+ EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
+ zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
+ zend_class_entry *ce;
+ zval **method = NULL;
+ zval **obj = NULL;
+
+ zend_hash_index_find(Z_ARRVAL_P(function_name), 0, (void **) &obj);
+ zend_hash_index_find(Z_ARRVAL_P(function_name), 1, (void **) &method);
+
+ if (Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_OBJECT) {
+ zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
+ }
- if (Z_TYPE_P(function_name) != IS_STRING) {
- zend_error_noreturn(E_ERROR, "Function name must be a string");
- }
- function_name_strval = Z_STRVAL_P(function_name);
- function_name_strlen = Z_STRLEN_P(function_name);
- if (function_name_strval[0] == '\\') {
+ if (Z_TYPE_PP(method) != IS_STRING) {
+ zend_error_noreturn(E_ERROR, "Second array member is not a valid method");
+ }
+
+ if (Z_TYPE_PP(obj) == IS_STRING) {
+ ce = zend_fetch_class_by_name(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj), NULL, 0 TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_PP(obj));
+ }
+ EX(called_scope) = ce;
+ EX(object) = NULL;
- function_name_strlen -= 1;
- lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
+ if (ce->get_static_method) {
+ EX(fbc) = ce->get_static_method(ce, Z_STRVAL_PP(method), Z_STRLEN_PP(method) TSRMLS_CC);
+ } else {
+ EX(fbc) = zend_std_get_static_method(ce, Z_STRVAL_PP(method), Z_STRLEN_PP(method), NULL TSRMLS_CC);
+ }
+ } else {
+ EX(object) = *obj;
+ ce = EX(called_scope) = Z_OBJCE_PP(obj);
+
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), Z_STRVAL_PP(method), Z_STRLEN_PP(method), NULL TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), Z_STRVAL_PP(method));
+ }
+
+ if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(object) = NULL;
+ } else {
+ if (!PZVAL_IS_REF(EX(object))) {
+ Z_ADDREF_P(EX(object)); /* For $this pointer */
+ } else {
+ zval *this_ptr;
+ ALLOC_ZVAL(this_ptr);
+ INIT_PZVAL_COPY(this_ptr, EX(object));
+ zval_copy_ctor(this_ptr);
+ EX(object) = this_ptr;
+ }
+ }
+ }
+
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, Z_STRVAL_PP(method));
+ }
+ FREE_OP2();
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
} else {
- lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
- }
- if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
+ zend_error_noreturn(E_ERROR, "Function name must be a string");
}
- efree(lcname);
- FREE_OP2();
}
-
- EX(object) = NULL;
- ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(69, ZEND_INIT_NS_FCALL_BY_NAME, ANY, CONST)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline + 1;
+ USE_OPLINE
+ zend_literal *func_name;
- ZEND_VM_INC_OPCODE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc))==FAILURE) {
- char *short_name = Z_STRVAL(opline->op1.u.constant)+Z_LVAL(op_data->op1.u.constant);
- if (zend_hash_quick_find(EG(function_table), short_name, Z_STRLEN(opline->op1.u.constant)-Z_LVAL(op_data->op1.u.constant)+1, op_data->extended_value, (void **) &EX(fbc))==FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
+ func_name = opline->op2.literal + 1;
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (zend_hash_quick_find(EG(function_table), Z_STRVAL(func_name->constant), Z_STRLEN(func_name->constant)+1, func_name->hash_value, (void **) &EX(fbc))==FAILURE) {
+ func_name++;
+ if (UNEXPECTED(zend_hash_quick_find(EG(function_table), Z_STRVAL(func_name->constant), Z_STRLEN(func_name->constant)+1, func_name->hash_value, (void **) &EX(fbc))==FAILURE)) {
+ SAVE_OPLINE();
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
}
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
}
EX(object) = NULL;
@@ -2161,8 +2492,8 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
EG(current_execute_data) = EX(prev_execute_data);
EG(opline_ptr) = NULL;
if (!EG(active_symbol_table)) {
- zval ***cv = EX(CVs);
- zval ***end = cv + EX(op_array)->last_var;
+ zval ***cv = EX_CVs();
+ zval ***end = cv + op_array->last_var;
while (cv != end) {
if (*cv) {
zval_ptr_dtor(*cv);
@@ -2170,43 +2501,49 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
cv++;
}
}
-
+
if ((op_array->fn_flags & ZEND_ACC_CLOSURE) && op_array->prototype) {
zval_ptr_dtor((zval**)&op_array->prototype);
}
nested = EX(nested);
-
+
zend_vm_stack_free(execute_data TSRMLS_CC);
if (nested) {
execute_data = EG(current_execute_data);
+ }
+ if (nested) {
+ USE_OPLINE
- if (EX(call_opline)->opcode == ZEND_INCLUDE_OR_EVAL) {
+ LOAD_REGS();
+ LOAD_OPLINE();
+ if (UNEXPECTED(opline->opcode == ZEND_INCLUDE_OR_EVAL)) {
EX(function_state).function = (zend_function *) EX(op_array);
EX(function_state).arguments = NULL;
EX(object) = EX(current_object);
- if (RETURN_VALUE_USED(EX(call_opline))) {
- if (!EX_T(EX(call_opline)->result.u.var).var.ptr) { /* there was no return statement */
- ALLOC_ZVAL(EX_T(EX(call_opline)->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(EX(call_opline)->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(EX(call_opline)->result.u.var).var.ptr) = 1;
- Z_TYPE_P(EX_T(EX(call_opline)->result.u.var).var.ptr) = IS_BOOL;
- }
- }
-
EG(opline_ptr) = &EX(opline);
EG(active_op_array) = EX(op_array);
EG(return_value_ptr_ptr) = EX(original_return_value);
destroy_op_array(op_array TSRMLS_CC);
efree(op_array);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
+ HANDLE_EXCEPTION_LEAVE();
+ } else if (RETURN_VALUE_USED(opline)) {
+ if (!EX_T(opline->result.var).var.ptr) { /* there was no return statement */
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, 1);
+ INIT_PZVAL(retval);
+ EX_T(opline->result.var).var.ptr = retval;
+ }
}
- EX(opline)++;
+ ZEND_VM_INC_OPCODE();
ZEND_VM_LEAVE();
} else {
@@ -2230,7 +2567,7 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
EX(function_state).arguments = NULL;
if (EG(This)) {
- if (EG(exception) && IS_CTOR_CALL(EX(called_scope))) {
+ if (UNEXPECTED(EG(exception) != NULL) && IS_CTOR_CALL(EX(called_scope))) {
if (IS_CTOR_USED(EX(called_scope))) {
Z_DELREF_P(EG(This));
}
@@ -2249,14 +2586,15 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
zend_vm_stack_clear_multiple(TSRMLS_C);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
- if (RETURN_VALUE_USED(EX(call_opline)) && EX_T(EX(call_opline)->result.u.var).var.ptr) {
- zval_ptr_dtor(&EX_T(EX(call_opline)->result.u.var).var.ptr);
+ if (RETURN_VALUE_USED(opline) && EX_T(opline->result.var).var.ptr) {
+ zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
}
+ HANDLE_EXCEPTION_LEAVE();
}
- EX(opline)++;
+ ZEND_VM_INC_OPCODE();
ZEND_VM_LEAVE();
}
}
@@ -2265,89 +2603,99 @@ ZEND_VM_HELPER(zend_leave_helper, ANY, ANY)
ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_bool should_change_scope = 0;
+ zend_function *fbc = EX(function_state).function;
- if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) {
- if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) {
- zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
+ SAVE_OPLINE();
+ if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) {
+ zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", fbc->common.scope->name, fbc->common.function_name);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
- if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) {
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
- EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "",
- EX(function_state).function->common.scope ? "::" : "",
- EX(function_state).function->common.function_name);
+ fbc->common.scope ? fbc->common.scope->name : "",
+ fbc->common.scope ? "::" : "",
+ fbc->common.function_name);
}
}
- if (EX(function_state).function->common.scope &&
- !(EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC) &&
+ if (fbc->common.scope &&
+ !(fbc->common.fn_flags & ZEND_ACC_STATIC) &&
!EX(object)) {
- if (EX(function_state).function->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
/* FIXME: output identifiers properly */
- zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically", fbc->common.scope->name, fbc->common.function_name);
} else {
/* FIXME: output identifiers properly */
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically", fbc->common.scope->name, fbc->common.function_name);
}
}
- if (EX(function_state).function->type == ZEND_USER_FUNCTION ||
- EX(function_state).function->common.scope) {
+ if (fbc->type == ZEND_USER_FUNCTION || fbc->common.scope) {
should_change_scope = 1;
EX(current_this) = EG(This);
EX(current_scope) = EG(scope);
EX(current_called_scope) = EG(called_scope);
EG(This) = EX(object);
- EG(scope) = (EX(function_state).function->type == ZEND_USER_FUNCTION || !EX(object)) ? EX(function_state).function->common.scope : NULL;
+ EG(scope) = (fbc->type == ZEND_USER_FUNCTION || !EX(object)) ? fbc->common.scope : NULL;
EG(called_scope) = EX(called_scope);
}
zend_arg_types_stack_3_pop(&EG(arg_types_stack), &EX(called_scope), &EX(current_object), &EX(fbc));
EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
+ LOAD_OPLINE();
+
+ if (fbc->type == ZEND_INTERNAL_FUNCTION) {
+ temp_variable *ret = &EX_T(opline->result.var);
- if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
- ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference;
+ MAKE_STD_ZVAL(ret->var.ptr);
+ ZVAL_NULL(ret->var.ptr);
+ ret->var.ptr_ptr = &ret->var.ptr;
+ ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
- if (EX(function_state).function->common.arg_info) {
+ if (fbc->common.arg_info) {
zend_uint i=0;
zval **p = (zval**)EX(function_state).arguments;
ulong arg_count = opline->extended_value;
while (arg_count>0) {
- zend_verify_arg_type(EX(function_state).function, ++i, *(p-arg_count), 0 TSRMLS_CC);
+ zend_verify_arg_type(fbc, ++i, *(p-arg_count), 0 TSRMLS_CC);
arg_count--;
}
}
+
if (!zend_execute_internal) {
/* saves one function call if zend_execute_internal is not used */
- ((zend_internal_function *) EX(function_state).function)->handler(opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(function_state).function->common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
+ fbc->internal_function.handler(opline->extended_value, ret->var.ptr, (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) ? &ret->var.ptr : NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
} else {
zend_execute_internal(EXECUTE_DATA, RETURN_VALUE_USED(opline) TSRMLS_CC);
}
if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ zval_ptr_dtor(&ret->var.ptr);
}
- } else if (EX(function_state).function->type == ZEND_USER_FUNCTION) {
+ } else if (fbc->type == ZEND_USER_FUNCTION) {
EX(original_return_value) = EG(return_value_ptr_ptr);
EG(active_symbol_table) = NULL;
- EG(active_op_array) = &EX(function_state).function->op_array;
+ EG(active_op_array) = &fbc->op_array;
EG(return_value_ptr_ptr) = NULL;
- if (RETURN_VALUE_USED(opline)) {
- EG(return_value_ptr_ptr) = &EX_T(opline->result.u.var).var.ptr;
- EX_T(opline->result.u.var).var.ptr = NULL;
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference;
+ if (RETURN_VALUE_USED(opline)) {
+ temp_variable *ret = &EX_T(opline->result.var);
+
+ ret->var.ptr = NULL;
+ EG(return_value_ptr_ptr) = &ret->var.ptr;
+ ret->var.ptr_ptr = &ret->var.ptr;
+ ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
}
- if (zend_execute == execute && !EG(exception)) {
- EX(call_opline) = opline;
- ZEND_VM_ENTER();
+ if (EXPECTED(zend_execute == execute)) {
+ if (EXPECTED(EG(exception) == NULL)) {
+ ZEND_VM_ENTER();
+ }
} else {
zend_execute(EG(active_op_array) TSRMLS_CC);
}
@@ -2368,27 +2716,28 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
}
EG(active_symbol_table) = EX(symbol_table);
} else { /* ZEND_OVERLOADED_FUNCTION */
- ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
+ MAKE_STD_ZVAL(EX_T(opline->result.var).var.ptr);
+ ZVAL_NULL(EX_T(opline->result.var).var.ptr);
/* Not sure what should be done here if it's a static method */
- if (EX(object)) {
- Z_OBJ_HT_P(EX(object))->call_method(EX(function_state).function->common.function_name, opline->extended_value, EX_T(opline->result.u.var).var.ptr, &EX_T(opline->result.u.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
+ if (EXPECTED(EX(object) != NULL)) {
+ Z_OBJ_HT_P(EX(object))->call_method(fbc->common.function_name, opline->extended_value, EX_T(opline->result.var).var.ptr, &EX_T(opline->result.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
} else {
zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
}
- if (EX(function_state).function->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
- efree(EX(function_state).function->common.function_name);
+ if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
+ efree((char*)fbc->common.function_name);
}
- efree(EX(function_state).function);
+ efree(fbc);
if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
} else {
- Z_UNSET_ISREF_P(EX_T(opline->result.u.var).var.ptr);
- Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1);
- EX_T(opline->result.u.var).var.fcall_returned_reference = 0;
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
+ Z_UNSET_ISREF_P(EX_T(opline->result.var).var.ptr);
+ Z_SET_REFCOUNT_P(EX_T(opline->result.var).var.ptr, 1);
+ EX_T(opline->result.var).var.fcall_returned_reference = 0;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
}
@@ -2397,7 +2746,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
if (should_change_scope) {
if (EG(This)) {
- if (EG(exception) && IS_CTOR_CALL(EX(called_scope))) {
+ if (UNEXPECTED(EG(exception) != NULL) && IS_CTOR_CALL(EX(called_scope))) {
if (IS_CTOR_USED(EX(called_scope))) {
Z_DELREF_P(EG(This));
}
@@ -2417,11 +2766,12 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
zend_vm_stack_clear_multiple(TSRMLS_C);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
- if (RETURN_VALUE_USED(opline) && EX_T(opline->result.u.var).var.ptr) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ if (RETURN_VALUE_USED(opline) && EX_T(opline->result.var).var.ptr) {
+ zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
}
+ HANDLE_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
@@ -2435,14 +2785,19 @@ ZEND_VM_HANDLER(61, ZEND_DO_FCALL_BY_NAME, ANY, ANY)
ZEND_VM_HANDLER(60, ZEND_DO_FCALL, CONST, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval *fname = GET_OP1_ZVAL_PTR(BP_VAR_R);
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- if (zend_hash_quick_find(EG(function_table), fname->value.str.val, fname->value.str.len+1, Z_LVAL(opline->op2.u.constant), (void **) &EX(function_state).function)==FAILURE) {
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ EX(function_state).function = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else if (UNEXPECTED(zend_hash_quick_find(EG(function_table), Z_STRVAL_P(fname), Z_STRLEN_P(fname)+1, Z_HASH_P(fname), (void **) &EX(function_state).function)==FAILURE)) {
+ SAVE_OPLINE();
zend_error_noreturn(E_ERROR, "Call to undefined function %s()", fname->value.str.val);
+ } else {
+ CACHE_PTR(opline->op1.literal->cache_slot, EX(function_state).function);
}
EX(object) = NULL;
@@ -2453,34 +2808,100 @@ ZEND_VM_HANDLER(60, ZEND_DO_FCALL, CONST, ANY)
ZEND_VM_HANDLER(62, ZEND_RETURN, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ zval *retval_ptr;
+ zend_free_op free_op1;
+
+ SAVE_OPLINE();
+ retval_ptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
+ if (!EG(return_value_ptr_ptr)) {
+ if (OP1_TYPE == IS_TMP_VAR) {
+ FREE_OP1();
+ }
+ } else if (!IS_OP1_TMP_FREE()) { /* Not a temp var */
+ if (OP1_TYPE == IS_CONST ||
+ (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ zval_copy_ctor(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else if ((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
+ retval_ptr == &EG(uninitialized_zval)) {
+ zval *ret;
+
+ ALLOC_INIT_ZVAL(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else {
+ *EG(return_value_ptr_ptr) = retval_ptr;
+ Z_ADDREF_P(retval_ptr);
+ }
+ } else {
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ *EG(return_value_ptr_ptr) = ret;
+ }
+ FREE_OP1_IF_VAR();
+ ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
+}
+
+ZEND_VM_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY)
+{
+ USE_OPLINE
zval *retval_ptr;
zval **retval_ptr_ptr;
zend_free_op free_op1;
- if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) {
+ SAVE_OPLINE();
+ do {
if (OP1_TYPE == IS_CONST || OP1_TYPE == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
- ZEND_VM_C_GOTO(return_by_value);
+
+ retval_ptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ if (!EG(return_value_ptr_ptr)) {
+ if (OP1_TYPE == IS_TMP_VAR) {
+ FREE_OP1();
+ }
+ } else if (!IS_OP1_TMP_FREE()) { /* Not a temp var */
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ zval_copy_ctor(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else {
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ *EG(return_value_ptr_ptr) = ret;
+ }
+ break;
}
retval_ptr_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && !retval_ptr_ptr) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(retval_ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
}
if (OP1_TYPE == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) {
if (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- EX_T(opline->op1.u.var).var.fcall_returned_reference) {
- } else if (EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
- if (OP1_TYPE == IS_VAR && !OP1_FREE) {
- PZVAL_LOCK(*retval_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
- }
+ EX_T(opline->op1.var).var.fcall_returned_reference) {
+ } else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
zend_error(E_NOTICE, "Only variable references should be returned by reference");
- ZEND_VM_C_GOTO(return_by_value);
+ if (EG(return_value_ptr_ptr)) {
+ retval_ptr = *retval_ptr_ptr;
+ *EG(return_value_ptr_ptr) = retval_ptr;
+ Z_ADDREF_P(retval_ptr);
+ }
+ break;
}
}
@@ -2488,59 +2909,25 @@ ZEND_VM_HANDLER(62, ZEND_RETURN, CONST|TMP|VAR|CV, ANY)
SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
Z_ADDREF_PP(retval_ptr_ptr);
- (*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr);
+ *EG(return_value_ptr_ptr) = *retval_ptr_ptr;
}
- } else {
-ZEND_VM_C_LABEL(return_by_value):
-
- retval_ptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
-
- if (!EG(return_value_ptr_ptr)) {
- if (OP1_TYPE == IS_TMP_VAR) {
- FREE_OP1();
- }
- } else if (!IS_OP1_TMP_FREE()) { /* Not a temp var */
- if (OP1_TYPE == IS_CONST ||
- EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
- (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
- zval *ret;
+ } while (0);
- ALLOC_ZVAL(ret);
- INIT_PZVAL_COPY(ret, retval_ptr);
- zval_copy_ctor(ret);
- *EG(return_value_ptr_ptr) = ret;
- } else if ((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
- retval_ptr == &EG(uninitialized_zval)) {
- zval *ret;
-
- ALLOC_INIT_ZVAL(ret);
- *EG(return_value_ptr_ptr) = ret;
- } else {
- *EG(return_value_ptr_ptr) = retval_ptr;
- Z_ADDREF_P(retval_ptr);
- }
- } else {
- zval *ret;
-
- ALLOC_ZVAL(ret);
- INIT_PZVAL_COPY(ret, retval_ptr);
- *EG(return_value_ptr_ptr) = ret;
- }
- }
FREE_OP1_IF_VAR();
ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper);
}
ZEND_VM_HANDLER(108, ZEND_THROW, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *value;
zval *exception;
zend_free_op free_op1;
+ SAVE_OPLINE();
value = GET_OP1_ZVAL_PTR(BP_VAR_R);
- if (OP1_TYPE == IS_CONST || Z_TYPE_P(value) != IS_OBJECT) {
+ if (OP1_TYPE == IS_CONST || UNEXPECTED(Z_TYPE_P(value) != IS_OBJECT)) {
zend_error_noreturn(E_ERROR, "Can only throw objects");
}
zend_exception_save(TSRMLS_C);
@@ -2554,53 +2941,76 @@ ZEND_VM_HANDLER(108, ZEND_THROW, CONST|TMP|VAR|CV, ANY)
zend_throw_exception_object(exception TSRMLS_CC);
zend_exception_restore(TSRMLS_C);
FREE_OP1_IF_VAR();
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
-ZEND_VM_HANDLER(107, ZEND_CATCH, ANY, CV)
+ZEND_VM_HANDLER(107, ZEND_CATCH, CONST, CV)
{
- zend_op *opline = EX(opline);
- zend_class_entry *ce;
+ USE_OPLINE
+ zend_class_entry *ce, *catch_ce;
+ zval *exception;
+ SAVE_OPLINE();
/* Check whether an exception has been thrown, if not, jump over code */
zend_exception_restore(TSRMLS_C);
if (EG(exception) == NULL) {
ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
ZEND_VM_CONTINUE(); /* CHECK_ME */
}
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ catch_ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ catch_ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC);
+ CACHE_PTR(opline->op1.literal->cache_slot, catch_ce);
+ }
ce = Z_OBJCE_P(EG(exception));
- if (ce != EX_T(opline->op1.u.var).class_entry) {
- if (!instanceof_function(ce, EX_T(opline->op1.u.var).class_entry TSRMLS_CC)) {
- if (opline->op1.u.EA.type) {
+
+#ifdef HAVE_DTRACE
+ if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
+ DTRACE_EXCEPTION_CAUGHT(ce->name);
+ }
+#endif /* HAVE_DTRACE */
+
+ if (ce != catch_ce) {
+ if (!instanceof_function(ce, catch_ce TSRMLS_CC)) {
+ if (opline->result.num) {
zend_throw_exception_internal(NULL TSRMLS_CC);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
ZEND_VM_CONTINUE(); /* CHECK_ME */
}
}
+ exception = EG(exception);
if (!EG(active_symbol_table)) {
- if (EX(CVs)[opline->op2.u.var]) {
- zval_ptr_dtor(EX(CVs)[opline->op2.u.var]);
+ if (EX_CV(opline->op2.var)) {
+ zval_ptr_dtor(EX_CV(opline->op2.var));
}
- EX(CVs)[opline->op2.u.var] = (zval**)EX(CVs) + (EX(op_array)->last_var + opline->op2.u.var);
- *EX(CVs)[opline->op2.u.var] = EG(exception);
+ EX_CV(opline->op2.var) = (zval**)EX_CVs() + (EX(op_array)->last_var + opline->op2.var);
+ *EX_CV(opline->op2.var) = EG(exception);
} else {
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op2.u.var);
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op2.var);
zend_hash_quick_update(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value,
- &EG(exception), sizeof(zval *), (void**)&EX(CVs)[opline->op2.u.var]);
+ &EG(exception), sizeof(zval *), (void**)&EX_CV(opline->op2.var));
+ }
+ if (UNEXPECTED(EG(exception) != exception)) {
+ Z_ADDREF_P(EG(exception));
+ HANDLE_EXCEPTION();
+ } else {
+ EG(exception) = NULL;
+ ZEND_VM_NEXT_OPCODE();
}
- EG(exception) = NULL;
- ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(65, ZEND_SEND_VAL, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(65, ZEND_SEND_VAL, CONST|TMP, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ SAVE_OPLINE();
if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
- && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
- zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.u.opline_num);
+ && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
+ zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.opline_num);
}
{
zval *valptr;
@@ -2617,12 +3027,13 @@ ZEND_VM_HANDLER(65, ZEND_SEND_VAL, CONST|TMP|VAR|CV, ANY)
zend_vm_stack_push(valptr TSRMLS_CC);
FREE_OP1_IF_VAR();
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HELPER(zend_send_by_var_helper, VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *varptr;
zend_free_op free_op1;
varptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
@@ -2635,7 +3046,7 @@ ZEND_VM_HELPER(zend_send_by_var_helper, VAR|CV, ANY)
zval *original_var = varptr;
ALLOC_ZVAL(varptr);
- *varptr = *original_var;
+ ZVAL_COPY_VALUE(varptr, original_var);
Z_UNSET_ISREF_P(varptr);
Z_SET_REFCOUNT_P(varptr, 0);
zval_copy_ctor(varptr);
@@ -2644,34 +3055,36 @@ ZEND_VM_HELPER(zend_send_by_var_helper, VAR|CV, ANY)
zend_vm_stack_push(varptr TSRMLS_CC);
FREE_OP1(); /* for string offsets */
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval *varptr;
+ SAVE_OPLINE();
if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { /* Had function_ptr at compile_time */
if (!(opline->extended_value & ZEND_ARG_SEND_BY_REF)) {
ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
}
- } else if (!ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ } else if (!ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
}
if (OP1_TYPE == IS_VAR &&
(opline->extended_value & ZEND_ARG_SEND_FUNCTION) &&
- EX_T(opline->op1.u.var).var.fcall_returned_reference &&
- EX_T(opline->op1.u.var).var.ptr) {
- varptr = EX_T(opline->op1.u.var).var.ptr;
+ EX_T(opline->op1.var).var.fcall_returned_reference &&
+ EX_T(opline->op1.var).var.ptr) {
+ varptr = EX_T(opline->op1.var).var.ptr;
PZVAL_UNLOCK_EX(varptr, &free_op1, 0);
} else {
varptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
}
if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) ||
- EX_T(opline->op1.u.var).var.fcall_returned_reference) &&
+ EX_T(opline->op1.var).var.fcall_returned_reference) &&
varptr != &EG(uninitialized_zval) &&
(PZVAL_IS_REF(varptr) ||
(Z_REFCOUNT_P(varptr) == 1 && (OP1_TYPE == IS_CV || free_op1.var)))) {
@@ -2683,7 +3096,7 @@ ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR|CV, ANY)
if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
!(opline->extended_value & ZEND_ARG_SEND_SILENT) :
- !ARG_MAY_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ !ARG_MAY_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
zend_error(E_STRICT, "Only variables should be passed by reference");
}
ALLOC_ZVAL(valptr);
@@ -2694,28 +3107,32 @@ ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR|CV, ANY)
zend_vm_stack_push(valptr TSRMLS_CC);
}
FREE_OP1_IF_VAR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval **varptr_ptr;
zval *varptr;
+
+ SAVE_OPLINE();
varptr_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
- if (OP1_TYPE == IS_VAR && !varptr_ptr) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(varptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
}
- if (OP1_TYPE == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(*varptr_ptr == &EG(error_zval))) {
ALLOC_INIT_ZVAL(varptr);
zend_vm_stack_push(varptr TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
- if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
}
@@ -2725,68 +3142,77 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
zend_vm_stack_push(varptr TSRMLS_CC);
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(66, ZEND_SEND_VAR, VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
if ((opline->extended_value == ZEND_DO_FCALL_BY_NAME)
- && ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ && ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
ZEND_VM_DISPATCH_TO_HANDLER(ZEND_SEND_REF);
}
+ SAVE_OPLINE();
ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
}
ZEND_VM_HANDLER(63, ZEND_RECV, ANY, ANY)
{
- zend_op *opline = EX(opline);
- zend_uint arg_num = Z_LVAL(opline->op1.u.constant);
+ USE_OPLINE
+ zend_uint arg_num = opline->op1.num;
zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
- if (param == NULL) {
- char *space;
- char *class_name = get_active_class_name(&space TSRMLS_CC);
- zend_execute_data *ptr = EX(prev_execute_data);
-
+ SAVE_OPLINE();
+ if (UNEXPECTED(param == NULL)) {
if (zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, NULL, opline->extended_value TSRMLS_CC)) {
+ const char *space;
+ const char *class_name;
+ zend_execute_data *ptr;
+
+ if (EG(active_op_array)->scope) {
+ class_name = EG(active_op_array)->scope->name;
+ space = "::";
+ } else {
+ class_name = space = "";
+ }
+ ptr = EX(prev_execute_data);
+
if(ptr && ptr->op_array) {
- zend_error(E_WARNING, "Missing argument %ld for %s%s%s(), called in %s on line %d and defined", opline->op1.u.constant.value.lval, class_name, space, get_active_function_name(TSRMLS_C), ptr->op_array->filename, ptr->opline->lineno);
+ zend_error(E_WARNING, "Missing argument %u for %s%s%s(), called in %s on line %d and defined", opline->op1.num, class_name, space, get_active_function_name(TSRMLS_C), ptr->op_array->filename, ptr->opline->lineno);
} else {
- zend_error(E_WARNING, "Missing argument %ld for %s%s%s()", opline->op1.u.constant.value.lval, class_name, space, get_active_function_name(TSRMLS_C));
+ zend_error(E_WARNING, "Missing argument %u for %s%s%s()", opline->op1.num, class_name, space, get_active_function_name(TSRMLS_C));
}
}
- if (opline->result.op_type == IS_VAR) {
- PZVAL_UNLOCK_FREE(*EX_T(opline->result.u.var).var.ptr_ptr);
- }
} else {
- zend_free_op free_res;
zval **var_ptr;
zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, *param, opline->extended_value TSRMLS_CC);
- var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W);
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->result.var TSRMLS_CC);
Z_DELREF_PP(var_ptr);
*var_ptr = *param;
Z_ADDREF_PP(var_ptr);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(64, ZEND_RECV_INIT, ANY, CONST)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *assignment_value;
- zend_uint arg_num = Z_LVAL(opline->op1.u.constant);
- zend_free_op free_res;
+ zend_uint arg_num = opline->op1.num;
zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
zval **var_ptr;
+ SAVE_OPLINE();
if (param == NULL) {
ALLOC_ZVAL(assignment_value);
- *assignment_value = opline->op2.u.constant;
- if ((Z_TYPE(opline->op2.u.constant) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT || Z_TYPE(opline->op2.u.constant)==IS_CONSTANT_ARRAY) {
+ *assignment_value = *opline->op2.zv;
+ if ((Z_TYPE_P(assignment_value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT ||
+ Z_TYPE_P(assignment_value)==IS_CONSTANT_ARRAY) {
Z_SET_REFCOUNT_P(assignment_value, 1);
zval_update_constant(&assignment_value, 0 TSRMLS_CC);
} else {
@@ -2799,46 +3225,49 @@ ZEND_VM_HANDLER(64, ZEND_RECV_INIT, ANY, CONST)
}
zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC);
- var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W);
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->result.var TSRMLS_CC);
Z_DELREF_PP(var_ptr);
*var_ptr = assignment_value;
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(52, ZEND_BOOL, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
+ zval *retval = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
/* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(GET_OP1_ZVAL_PTR(BP_VAR_R));
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ ZVAL_BOOL(retval, i_zend_is_true(GET_OP1_ZVAL_PTR(BP_VAR_R)));
FREE_OP1();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(50, ZEND_BRK, ANY, CONST|TMP|VAR|CV)
+ZEND_VM_HANDLER(50, ZEND_BRK, ANY, CONST)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op2;
+ USE_OPLINE
zend_brk_cont_element *el;
- el = zend_brk_cont(GET_OP2_ZVAL_PTR(BP_VAR_R), opline->op1.u.opline_num,
- EX(op_array), EX(Ts) TSRMLS_CC);
+ SAVE_OPLINE();
+ el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
+ EX(op_array), EX_Ts() TSRMLS_CC);
FREE_OP2();
ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
}
-ZEND_VM_HANDLER(51, ZEND_CONT, ANY, CONST|TMP|VAR|CV)
+ZEND_VM_HANDLER(51, ZEND_CONT, ANY, CONST)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op2;
+ USE_OPLINE
zend_brk_cont_element *el;
- el = zend_brk_cont(GET_OP2_ZVAL_PTR(BP_VAR_R), opline->op1.u.opline_num,
- EX(op_array), EX(Ts) TSRMLS_CC);
+ SAVE_OPLINE();
+ el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
+ EX(op_array), EX_Ts() TSRMLS_CC);
FREE_OP2();
ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
}
@@ -2846,102 +3275,91 @@ ZEND_VM_HANDLER(51, ZEND_CONT, ANY, CONST|TMP|VAR|CV)
ZEND_VM_HANDLER(100, ZEND_GOTO, ANY, CONST)
{
zend_op *brk_opline;
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_brk_cont_element *el;
- el = zend_brk_cont(&opline->op2.u.constant, opline->extended_value,
- EX(op_array), EX(Ts) TSRMLS_CC);
+ SAVE_OPLINE();
+ el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->extended_value,
+ EX(op_array), EX_Ts() TSRMLS_CC);
brk_opline = EX(op_array)->opcodes + el->brk;
switch (brk_opline->opcode) {
case ZEND_SWITCH_FREE:
- if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
- zend_switch_free(&EX_T(brk_opline->op1.u.var), brk_opline->extended_value TSRMLS_CC);
+ if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
+ zval_ptr_dtor(&EX_T(brk_opline->op1.var).var.ptr);
}
break;
case ZEND_FREE:
- if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
- zendi_zval_dtor(EX_T(brk_opline->op1.u.var).tmp_var);
+ if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
+ zendi_zval_dtor(EX_T(brk_opline->op1.var).tmp_var);
}
break;
}
- ZEND_VM_JMP(opline->op1.u.jmp_addr);
+ ZEND_VM_JMP(opline->op1.jmp_addr);
}
ZEND_VM_HANDLER(48, ZEND_CASE, CONST|TMP|VAR|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op1, free_op2;
+ SAVE_OPLINE();
if (OP1_TYPE==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
GET_OP1_ZVAL_PTR(BP_VAR_R),
GET_OP2_ZVAL_PTR(BP_VAR_R) TSRMLS_CC);
FREE_OP2();
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
- FREE_OP1();
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(49, ZEND_SWITCH_FREE, VAR, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zend_switch_free(&EX_T(opline->op1.u.var), opline->extended_value TSRMLS_CC);
+ SAVE_OPLINE();
+ zval_ptr_dtor(&EX_T(opline->op1.var).var.ptr);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(68, ZEND_NEW, ANY, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *object_zval;
zend_function *constructor;
- if (EX_T(opline->op1.u.var).class_entry->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
- char *class_type;
-
- if (EX_T(opline->op1.u.var).class_entry->ce_flags & ZEND_ACC_INTERFACE) {
- class_type = "interface";
+ SAVE_OPLINE();
+ if (UNEXPECTED((EX_T(opline->op1.var).class_entry->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) != 0)) {
+ if (EX_T(opline->op1.var).class_entry->ce_flags & ZEND_ACC_INTERFACE) {
+ zend_error_noreturn(E_ERROR, "Cannot instantiate interface %s", EX_T(opline->op1.var).class_entry->name);
+ } else if ((EX_T(opline->op1.var).class_entry->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
+ zend_error_noreturn(E_ERROR, "Cannot instantiate trait %s", EX_T(opline->op1.var).class_entry->name);
} else {
- class_type = "abstract class";
+ zend_error_noreturn(E_ERROR, "Cannot instantiate abstract class %s", EX_T(opline->op1.var).class_entry->name);
}
- zend_error_noreturn(E_ERROR, "Cannot instantiate %s %s", class_type, EX_T(opline->op1.u.var).class_entry->name);
}
ALLOC_ZVAL(object_zval);
- object_init_ex(object_zval, EX_T(opline->op1.u.var).class_entry);
+ object_init_ex(object_zval, EX_T(opline->op1.var).class_entry);
INIT_PZVAL(object_zval);
constructor = Z_OBJ_HT_P(object_zval)->get_constructor(object_zval TSRMLS_CC);
if (constructor == NULL) {
if (RETURN_VALUE_USED(opline)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, object_zval);
+ AI_SET_PTR(&EX_T(opline->result.var), object_zval);
} else {
zval_ptr_dtor(&object_zval);
}
- ZEND_VM_JMP(EX(op_array)->opcodes + opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes + opline->op2.opline_num);
} else {
if (RETURN_VALUE_USED(opline)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, object_zval);
PZVAL_LOCK(object_zval);
+ AI_SET_PTR(&EX_T(opline->result.var), object_zval);
}
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), ENCODE_CTOR(EX(called_scope), RETURN_VALUE_USED(opline)));
@@ -2949,31 +3367,34 @@ ZEND_VM_HANDLER(68, ZEND_NEW, ANY, ANY)
/* We are not handling overloaded classes right now */
EX(object) = object_zval;
EX(fbc) = constructor;
- EX(called_scope) = EX_T(opline->op1.u.var).class_entry;
+ EX(called_scope) = EX_T(opline->op1.var).class_entry;
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
ZEND_VM_HANDLER(110, ZEND_CLONE, CONST|TMP|VAR|UNUSED|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *obj = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_R);
+ zval *obj;
zend_class_entry *ce;
zend_function *clone;
zend_object_clone_obj_t clone_call;
+ SAVE_OPLINE();
+ obj = GET_OP1_OBJ_ZVAL_PTR(BP_VAR_R);
+
if (OP1_TYPE == IS_CONST ||
- (OP1_TYPE == IS_VAR && !obj) ||
- Z_TYPE_P(obj) != IS_OBJECT) {
+ UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT)) {
zend_error_noreturn(E_ERROR, "__clone method called on non-object");
}
ce = Z_OBJCE_P(obj);
clone = ce ? ce->clone : NULL;
clone_call = Z_OBJ_HT_P(obj)->clone_obj;
- if (!clone_call) {
+ if (UNEXPECTED(clone_call == NULL)) {
if (ce) {
zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name);
} else {
@@ -2985,55 +3406,71 @@ ZEND_VM_HANDLER(110, ZEND_CLONE, CONST|TMP|VAR|UNUSED|CV, ANY)
if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (ce != EG(scope)) {
+ if (UNEXPECTED(ce != EG(scope))) {
zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (!zend_check_protected(clone->common.scope, EG(scope))) {
+ if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
}
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- if (!EG(exception)) {
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- Z_OBJVAL_P(EX_T(opline->result.u.var).var.ptr) = clone_call(obj TSRMLS_CC);
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_OBJECT;
- Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1);
- Z_SET_ISREF_P(EX_T(opline->result.u.var).var.ptr);
- if (!RETURN_VALUE_USED(opline) || EG(exception)) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ if (EXPECTED(EG(exception) == NULL)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ Z_OBJVAL_P(retval) = clone_call(obj TSRMLS_CC);
+ Z_TYPE_P(retval) = IS_OBJECT;
+ Z_SET_REFCOUNT_P(retval, 1);
+ Z_SET_ISREF_P(retval);
+ if (!RETURN_VALUE_USED(opline) || UNEXPECTED(EG(exception) != NULL)) {
+ zval_ptr_dtor(&retval);
+ } else {
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
}
FREE_OP1_IF_VAR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(99, ZEND_FETCH_CONSTANT, VAR|CONST|UNUSED, CONST)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ SAVE_OPLINE();
if (OP1_TYPE == IS_UNUSED) {
- /* namespaced constant */
- if (!zend_get_constant_ex(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant), &EX_T(opline->result.u.var).tmp_var, NULL, opline->extended_value TSRMLS_CC)) {
+ zend_constant *c;
+ zval *retval;
+
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ c = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if ((c = zend_quick_get_constant(opline->op2.literal + 1, opline->extended_value TSRMLS_CC)) == NULL) {
if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
- char *actual = (char *)zend_memrchr(Z_STRVAL(opline->op2.u.constant), '\\', Z_STRLEN(opline->op2.u.constant));
+ char *actual = (char *)zend_memrchr(Z_STRVAL_P(opline->op2.zv), '\\', Z_STRLEN_P(opline->op2.zv));
if(!actual) {
- actual = Z_STRVAL(opline->op2.u.constant);
+ actual = Z_STRVAL_P(opline->op2.zv);
} else {
actual++;
}
/* non-qualified constant - allow text substitution */
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", actual, actual);
- ZVAL_STRINGL(&EX_T(opline->result.u.var).tmp_var, actual, Z_STRLEN(opline->op2.u.constant)-(actual - Z_STRVAL(opline->op2.u.constant)), 1);
+ ZVAL_STRINGL(&EX_T(opline->result.var).tmp_var, actual, Z_STRLEN_P(opline->op2.zv)-(actual - Z_STRVAL_P(opline->op2.zv)), 1);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
} else {
- zend_error_noreturn(E_ERROR, "Undefined constant '%s'",
- Z_STRVAL(opline->op2.u.constant), Z_STRVAL(opline->op2.u.constant));
+ zend_error_noreturn(E_ERROR, "Undefined constant '%s'", Z_STRVAL_P(opline->op2.zv));
}
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, c);
}
+ retval = &EX_T(opline->result.var).tmp_var;
+ ZVAL_COPY_VALUE(retval, &c->value);
+ zval_copy_ctor(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
/* class constant */
@@ -3041,16 +3478,32 @@ ZEND_VM_HANDLER(99, ZEND_FETCH_CONSTANT, VAR|CONST|UNUSED, CONST)
zval **value;
if (OP1_TYPE == IS_CONST) {
-
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant));
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ value = CACHED_PTR(opline->op2.literal->cache_slot);
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(opline->op2.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
+ if ((value = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce)) != NULL) {
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
}
- if (zend_hash_find(&ce->constants_table, Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void **) &value) == SUCCESS) {
+ if (EXPECTED(zend_hash_quick_find(&ce->constants_table, Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv)+1, Z_HASH_P(opline->op2.zv), (void **) &value) == SUCCESS)) {
if (Z_TYPE_PP(value) == IS_CONSTANT_ARRAY ||
(Z_TYPE_PP(value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
zend_class_entry *old_scope = EG(scope);
@@ -3059,52 +3512,47 @@ ZEND_VM_HANDLER(99, ZEND_FETCH_CONSTANT, VAR|CONST|UNUSED, CONST)
zval_update_constant(value, (void *) 1 TSRMLS_CC);
EG(scope) = old_scope;
}
- EX_T(opline->result.u.var).tmp_var = **value;
- zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
+ if (OP1_TYPE == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, value);
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, value);
+ }
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
} else {
- zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant));
+ zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(opline->op2.zv));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
ZEND_VM_HANDLER(72, ZEND_ADD_ARRAY_ELEMENT, CONST|TMP|VAR|CV, CONST|TMP|VAR|UNUSED|CV)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op1, free_op2;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+ zend_free_op free_op1;
zval *expr_ptr;
- zval *offset=GET_OP2_ZVAL_PTR(BP_VAR_R);
-#if !defined(ZEND_VM_SPEC) || OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
- if (opline->extended_value) {
- expr_ptr_ptr=GET_OP1_ZVAL_PTR_PTR(BP_VAR_W);
+ if (OP1_TYPE == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
expr_ptr=GET_OP1_ZVAL_PTR(BP_VAR_R);
- }
-#else
- expr_ptr=GET_OP1_ZVAL_PTR(BP_VAR_R);
-#endif
-
- if (IS_OP1_TMP_FREE()) { /* temporary variable */
- zval *new_expr;
+ if (IS_OP1_TMP_FREE()) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if !defined(ZEND_VM_SPEC) || OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (OP1_TYPE == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (OP1_TYPE == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -3115,20 +3563,37 @@ ZEND_VM_HANDLER(72, ZEND_ADD_ARRAY_ELEMENT, CONST|TMP|VAR|CV, CONST|TMP|VAR|UNUS
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (OP2_TYPE != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ ZEND_VM_C_GOTO(num_index);
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+ZEND_VM_C_LABEL(num_index):
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (OP2_TYPE == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, ZEND_VM_C_GOTO(num_index));
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -3138,21 +3603,22 @@ ZEND_VM_HANDLER(72, ZEND_ADD_ARRAY_ELEMENT, CONST|TMP|VAR|CV, CONST|TMP|VAR|UNUS
}
FREE_OP2();
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) && opline->extended_value) {
FREE_OP1_VAR_PTR();
} else {
FREE_OP1_IF_VAR();
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(71, ZEND_INIT_ARRAY, CONST|TMP|VAR|UNUSED|CV, CONST|TMP|VAR|UNUSED|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (OP1_TYPE == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if !defined(ZEND_VM_SPEC) || OP1_TYPE != IS_UNUSED
@@ -3164,13 +3630,16 @@ ZEND_VM_HANDLER(71, ZEND_INIT_ARRAY, CONST|TMP|VAR|UNUSED|CV, CONST|TMP|VAR|UNUS
ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *expr = GET_OP1_ZVAL_PTR(BP_VAR_R);
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *expr;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+
+ SAVE_OPLINE();
+ expr = GET_OP1_ZVAL_PTR(BP_VAR_R);
if (opline->extended_value != IS_STRING) {
- *result = *expr;
+ ZVAL_COPY_VALUE(result, expr);
if (!IS_OP1_TMP_FREE()) {
zendi_zval_copy_ctor(*result);
}
@@ -3194,12 +3663,12 @@ ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY)
zend_make_printable_zval(expr, &var_copy, &use_copy);
if (use_copy) {
- *result = var_copy;
+ ZVAL_COPY_VALUE(result, &var_copy);
if (IS_OP1_TMP_FREE()) {
FREE_OP1();
}
} else {
- *result = *expr;
+ ZVAL_COPY_VALUE(result, expr);
if (!IS_OP1_TMP_FREE()) {
zendi_zval_copy_ctor(*result);
}
@@ -3214,36 +3683,37 @@ ZEND_VM_HANDLER(21, ZEND_CAST, CONST|TMP|VAR|CV, ANY)
break;
}
FREE_OP1_IF_VAR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_op_array *new_op_array=NULL;
- int return_value_used;
zend_free_op free_op1;
- zval *inc_filename = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *inc_filename;
zval tmp_inc_filename;
zend_bool failure_retval=0;
+ SAVE_OPLINE();
+ inc_filename = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
if (inc_filename->type!=IS_STRING) {
- tmp_inc_filename = *inc_filename;
+ ZVAL_COPY_VALUE(&tmp_inc_filename, inc_filename);
zval_copy_ctor(&tmp_inc_filename);
convert_to_string(&tmp_inc_filename);
inc_filename = &tmp_inc_filename;
}
- return_value_used = RETURN_VALUE_USED(opline);
-
- if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
- if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
+ if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
+ if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
}
} else {
- switch (Z_LVAL(opline->op2.u.constant)) {
+ switch (opline->extended_value) {
case ZEND_INCLUDE_ONCE:
case ZEND_REQUIRE_ONCE: {
zend_file_handle file_handle;
@@ -3265,14 +3735,14 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
}
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
- new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
+ new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
zend_destroy_file_handle(&file_handle TSRMLS_CC);
} else {
zend_file_handle_dtor(&file_handle TSRMLS_CC);
failure_retval=1;
}
} else {
- if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
+ if (opline->extended_value == ZEND_INCLUDE_ONCE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
@@ -3285,7 +3755,7 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
break;
case ZEND_INCLUDE:
case ZEND_REQUIRE:
- new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
+ new_op_array = compile_filename(opline->extended_value, inc_filename TSRMLS_CC);
break;
case ZEND_EVAL: {
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
@@ -3301,12 +3771,18 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
zval_dtor(&tmp_inc_filename);
}
FREE_OP1();
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- if (new_op_array && !EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ } else if (EXPECTED(new_op_array != NULL)) {
EX(original_return_value) = EG(return_value_ptr_ptr);
- EG(return_value_ptr_ptr) = return_value_used ? EX_T(opline->result.u.var).var.ptr_ptr : NULL;
EG(active_op_array) = new_op_array;
- EX_T(opline->result.u.var).var.ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ EX_T(opline->result.var).var.ptr = NULL;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ EG(return_value_ptr_ptr) = EX_T(opline->result.var).var.ptr_ptr;
+ } else {
+ EG(return_value_ptr_ptr) = NULL;
+ }
EX(current_object) = EX(object);
@@ -3317,8 +3793,7 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
zend_rebuild_symbol_table(TSRMLS_C);
}
- if (zend_execute == execute) {
- EX(call_opline) = opline;
+ if (EXPECTED(zend_execute == execute)) {
ZEND_VM_ENTER();
} else {
zend_execute(new_op_array TSRMLS_CC);
@@ -3327,75 +3802,64 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMP|VAR|CV, ANY)
EX(function_state).function = (zend_function *) EX(op_array);
EX(object) = EX(current_object);
- if (return_value_used) {
- if (!EX_T(opline->result.u.var).var.ptr) { /* there was no return statement */
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = 1;
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
- }
- }
-
EG(opline_ptr) = &EX(opline);
EG(active_op_array) = EX(op_array);
EG(return_value_ptr_ptr) = EX(original_return_value);
destroy_op_array(new_op_array TSRMLS_CC);
efree(new_op_array);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
+ HANDLE_EXCEPTION();
+ } else if (RETURN_VALUE_USED(opline)) {
+ if (!EX_T(opline->result.var).var.ptr) { /* there was no return statement */
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, 1);
+ INIT_PZVAL(retval);
+ EX_T(opline->result.var).var.ptr = retval;
+ }
}
- } else {
- if (return_value_used) {
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_ZVAL(*EX_T(opline->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = failure_retval;
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
- }
+
+ } else if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, failure_retval);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval tmp, *varname;
HashTable *target_symbol_table;
zend_free_op free_op1;
- if (OP1_TYPE == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
+ SAVE_OPLINE();
+ if (OP1_TYPE == IS_CV &&
+ OP2_TYPE == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
if (EG(active_symbol_table)) {
- zend_execute_data *ex = EX(prev_execute_data);
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
-
- if (zend_hash_quick_del(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value) == SUCCESS) {
- while (ex && ex->symbol_table == EG(active_symbol_table)) {
- int i;
-
- if (ex->op_array) {
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == cv->hash_value &&
- ex->op_array->vars[i].name_len == cv->name_len &&
- !memcmp(ex->op_array->vars[i].name, cv->name, cv->name_len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
- ex = ex->prev_execute_data;
- }
- }
- EX(CVs)[opline->op1.u.var] = NULL;
- } else if (EX(CVs)[opline->op1.u.var]) {
- zval_ptr_dtor(EX(CVs)[opline->op1.u.var]);
- EX(CVs)[opline->op1.u.var] = NULL;
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
varname = GET_OP1_ZVAL_PTR(BP_VAR_R);
- if (Z_TYPE_P(varname) != IS_STRING) {
- tmp = *varname;
+ if (OP1_TYPE != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
zval_copy_ctor(&tmp);
convert_to_string(&tmp);
varname = &tmp;
@@ -3403,49 +3867,47 @@ ZEND_VM_HANDLER(74, ZEND_UNSET_VAR, CONST|TMP|VAR|CV, ANY)
Z_ADDREF_P(varname);
}
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname) TSRMLS_CC);
+ if (OP2_TYPE != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (OP2_TYPE == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((OP1_TYPE == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
- if (zend_hash_quick_del(target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value) == SUCCESS) {
- zend_execute_data *ex = EXECUTE_DATA;
-
- do {
- int i;
-
- if (ex->op_array) {
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == varname->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, varname->value.str.val, varname->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
- ex = ex->prev_execute_data;
- } while (ex && ex->symbol_table == target_symbol_table);
- }
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(EXECUTE_DATA, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
- if (varname == &tmp) {
+ if (OP1_TYPE != IS_CONST && varname == &tmp) {
zval_dtor(&tmp);
} else if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) {
zval_ptr_dtor(&varname);
}
FREE_OP1();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
if (OP1_TYPE == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
@@ -3458,37 +3920,39 @@ ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ ZEND_VM_C_GOTO(num_index_dim);
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (OP2_TYPE == IS_CV || OP2_TYPE == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = EXECUTE_DATA; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (OP2_TYPE == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, ZEND_VM_C_GOTO(num_index_dim));
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (OP2_TYPE == IS_CV || OP2_TYPE == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+ZEND_VM_C_LABEL(num_index_dim):
+ zend_hash_index_del(ht, hval);
if (OP2_TYPE == IS_CV || OP2_TYPE == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -3504,7 +3968,7 @@ ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (IS_OP2_TMP_FREE()) {
@@ -3529,15 +3993,20 @@ ZEND_VM_HANDLER(75, ZEND_UNSET_DIM, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
- zval *offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
+ offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
if (OP1_TYPE != IS_VAR || container) {
if (OP1_TYPE == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -3548,7 +4017,7 @@ ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -3565,12 +4034,13 @@ ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval *array_ptr, **array_ptr_ptr;
HashTable *fe_ht;
@@ -3578,14 +4048,18 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
zend_class_entry *ce = NULL;
zend_bool is_empty = 0;
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
+ SAVE_OPLINE();
+
+ if ((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
+ (opline->extended_value & ZEND_FE_RESET_VARIABLE)) {
array_ptr_ptr = GET_OP1_ZVAL_PTR_PTR(BP_VAR_R);
if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) {
- ALLOC_INIT_ZVAL(array_ptr);
+ MAKE_STD_ZVAL(array_ptr);
+ ZVAL_NULL(array_ptr);
} else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) {
if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) {
zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class");
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
ce = Z_OBJCE_PP(array_ptr_ptr);
@@ -3623,7 +4097,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
if (!ce || !ce->get_iterator) {
Z_ADDREF_P(array_ptr);
}
- } else if (OP1_TYPE == IS_CONST ||
+ } else if (OP1_TYPE == IS_CONST ||
((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
!Z_ISREF_P(array_ptr) &&
Z_REFCOUNT_P(array_ptr) > 1)) {
@@ -3641,50 +4115,35 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
if (ce && ce->get_iterator) {
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
- if (iter && !EG(exception)) {
+ if (iter && EXPECTED(EG(exception) == NULL)) {
array_ptr = zend_iterator_wrap(iter TSRMLS_CC);
} else {
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- FREE_OP1_VAR_PTR();
- } else {
- FREE_OP1_IF_VAR();
- }
+ FREE_OP1_IF_VAR();
if (!EG(exception)) {
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name);
}
zend_throw_exception_internal(NULL TSRMLS_CC);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
}
- AI_SET_PTR(EX_T(opline->result.u.var).var, array_ptr);
- PZVAL_LOCK(array_ptr);
+ EX_T(opline->result.var).fe.ptr = array_ptr;
if (iter) {
iter->index = 0;
if (iter->funcs->rewind) {
iter->funcs->rewind(iter TSRMLS_CC);
- if (EG(exception)) {
- Z_DELREF_P(array_ptr);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array_ptr);
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- FREE_OP1_VAR_PTR();
- } else {
- FREE_OP1_IF_VAR();
- }
- ZEND_VM_NEXT_OPCODE();
+ FREE_OP1_IF_VAR();
+ HANDLE_EXCEPTION();
}
}
is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS;
- if (EG(exception)) {
- Z_DELREF_P(array_ptr);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array_ptr);
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- FREE_OP1_VAR_PTR();
- } else {
- FREE_OP1_IF_VAR();
- }
- ZEND_VM_NEXT_OPCODE();
+ FREE_OP1_IF_VAR();
+ HANDLE_EXCEPTION();
}
iter->index = -1; /* will be set to 0 before using next handler */
} else if ((fe_ht = HASH_OF(array_ptr)) != NULL) {
@@ -3707,29 +4166,26 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
}
}
is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS;
- zend_hash_get_pointer(fe_ht, &EX_T(opline->result.u.var).fe.fe_pos);
+ zend_hash_get_pointer(fe_ht, &EX_T(opline->result.var).fe.fe_pos);
} else {
zend_error(E_WARNING, "Invalid argument supplied for foreach()");
is_empty = 1;
}
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- FREE_OP1_VAR_PTR();
- } else {
- FREE_OP1_IF_VAR();
- }
+ FREE_OP1_IF_VAR();
if (is_empty) {
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
} else {
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *array = EX_T(opline->op1.u.var).var.ptr;
+ zval *array = EX_T(opline->op1.var).fe.ptr;
zval **value;
char *str_key;
uint str_key_len;
@@ -3739,22 +4195,24 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
int key_type = 0;
zend_bool use_key = (zend_bool)(opline->extended_value & ZEND_FE_FETCH_WITH_KEY);
+ SAVE_OPLINE();
+
switch (zend_iterator_unwrap(array, &iter TSRMLS_CC)) {
default:
case ZEND_ITER_INVALID:
zend_error(E_WARNING, "Invalid argument supplied for foreach()");
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
case ZEND_ITER_PLAIN_OBJECT: {
- char *class_name, *prop_name;
+ const char *class_name, *prop_name;
zend_object *zobj = zend_objects_get_address(array TSRMLS_CC);
- fe_ht = HASH_OF(array);
- zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos);
+ fe_ht = Z_OBJPROP_P(array);
+ zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
do {
if (zend_hash_get_current_data(fe_ht, (void **) &value)==FAILURE) {
/* reached end of iteration */
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
@@ -3762,7 +4220,7 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
} while (key_type == HASH_KEY_NON_EXISTANT ||
(key_type != HASH_KEY_IS_LONG &&
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) != SUCCESS));
- zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos);
+ zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
if (use_key && key_type != HASH_KEY_IS_LONG) {
zend_unmangle_property_name(str_key, str_key_len-1, &class_name, &prop_name);
str_key_len = strlen(prop_name);
@@ -3773,17 +4231,17 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
}
case ZEND_ITER_PLAIN_ARRAY:
- fe_ht = HASH_OF(array);
- zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos);
+ fe_ht = Z_ARRVAL_P(array);
+ zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
if (zend_hash_get_current_data(fe_ht, (void **) &value)==FAILURE) {
/* reached end of iteration */
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
if (use_key) {
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 1, NULL);
}
zend_hash_move_forward(fe_ht);
- zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos);
+ zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
break;
case ZEND_ITER_OBJECT:
@@ -3792,39 +4250,35 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
/* This could cause an endless loop if index becomes zero again.
* In case that ever happens we need an additional flag. */
iter->funcs->move_forward(iter TSRMLS_CC);
- if (EG(exception)) {
- Z_DELREF_P(array);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
}
/* If index is zero we come from FE_RESET and checked valid() already. */
if (!iter || (iter->index > 0 && iter->funcs->valid(iter TSRMLS_CC) == FAILURE)) {
/* reached end of iteration */
- if (EG(exception)) {
- Z_DELREF_P(array);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
iter->funcs->get_current_data(iter, &value TSRMLS_CC);
- if (EG(exception)) {
- Z_DELREF_P(array);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
if (!value) {
/* failure in get_current_data */
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
if (use_key) {
if (iter->funcs->get_current_key) {
key_type = iter->funcs->get_current_key(iter, &str_key, &str_key_len, &int_key TSRMLS_CC);
- if (EG(exception)) {
- Z_DELREF_P(array);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
} else {
key_type = HASH_KEY_IS_LONG;
@@ -3837,20 +4291,19 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
if (opline->extended_value & ZEND_FE_FETCH_BYREF) {
SEPARATE_ZVAL_IF_NOT_REF(value);
Z_SET_ISREF_PP(value);
- EX_T(opline->result.u.var).var.ptr_ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = value;
Z_ADDREF_PP(value);
} else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *value);
PZVAL_LOCK(*value);
+ AI_SET_PTR(&EX_T(opline->result.var), *value);
}
if (use_key) {
- zend_op *op_data = opline+1;
- zval *key = &EX_T(op_data->result.u.var).tmp_var;
+ zval *key = &EX_T((opline+1)->result.var).tmp_var;
switch (key_type) {
case HASH_KEY_IS_STRING:
- Z_STRVAL_P(key) = str_key;
+ Z_STRVAL_P(key) = (char*)str_key;
Z_STRLEN_P(key) = str_key_len-1;
Z_TYPE_P(key) = IS_STRING;
break;
@@ -3865,26 +4318,30 @@ ZEND_VM_HANDLER(78, ZEND_FE_FETCH, VAR, ANY)
}
}
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMP|VAR|CV, ANY)
+ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval **value;
zend_bool isset = 1;
- if (OP1_TYPE == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
- if (EX(CVs)[opline->op1.u.var]) {
- value = EX(CVs)[opline->op1.u.var];
+ SAVE_OPLINE();
+ if (OP1_TYPE == IS_CV &&
+ OP2_TYPE == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
} else if (EG(active_symbol_table)) {
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
isset = 0;
}
- } else {
+ } else {
isset = 0;
}
} else {
@@ -3892,183 +4349,202 @@ ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMP|VAR|CV, ANY)
zend_free_op free_op1;
zval tmp, *varname = GET_OP1_ZVAL_PTR(BP_VAR_IS);
- if (Z_TYPE_P(varname) != IS_STRING) {
- tmp = *varname;
+ if (OP1_TYPE != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
zval_copy_ctor(&tmp);
convert_to_string(&tmp);
varname = &tmp;
}
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- value = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1 TSRMLS_CC);
+ if (OP2_TYPE != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (OP2_TYPE == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((OP1_TYPE == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
if (!value) {
isset = 0;
}
} else {
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
isset = 0;
}
}
- if (varname == &tmp) {
+ if (OP1_TYPE != IS_CONST && varname == &tmp) {
zval_dtor(&tmp);
}
FREE_OP1();
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
- } else {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = isset;
- }
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
- } else {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
- }
- break;
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HELPER_EX(zend_isset_isempty_dim_prop_obj_handler, VAR|UNUSED|CV, CONST|TMP|VAR|CV, int prop_dim)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op1;
- zval **container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_IS);
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (OP1_TYPE != IS_VAR || container) {
- zend_free_op free_op2;
- zval *offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
-
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ SAVE_OPLINE();
+ container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_IS);
- ht = Z_ARRVAL_PP(container);
+ offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- break;
- }
+ ht = Z_ARRVAL_PP(container);
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ ZEND_VM_C_GOTO(num_index_prop);
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+ZEND_VM_C_LABEL(num_index_prop):
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (OP2_TYPE == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, ZEND_VM_C_GOTO(num_index_prop));
}
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
} else {
- result = 1;
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
- FREE_OP2();
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (IS_OP2_TMP_FREE()) {
- MAKE_REAL_ZVAL_PTR(offset);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ }
+ FREE_OP2();
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (IS_OP2_TMP_FREE()) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((OP2_TYPE == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (IS_OP2_TMP_FREE()) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
- FREE_OP2();
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (IS_OP2_TMP_FREE()) {
+ zval_ptr_dtor(&offset);
+ } else {
+ FREE_OP2();
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
- FREE_OP2();
- } else {
- FREE_OP2();
}
+ FREE_OP2();
+ } else {
+ FREE_OP2();
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
FREE_OP1_VAR_PTR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -4085,7 +4561,9 @@ ZEND_VM_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, VAR|UNUSED|CV, CONST|TMP|VAR|C
ZEND_VM_HANDLER(79, ZEND_EXIT, CONST|TMP|VAR|UNUSED|CV, ANY)
{
#if !defined(ZEND_VM_SPEC) || (OP1_TYPE != IS_UNUSED)
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ SAVE_OPLINE();
if (OP1_TYPE != IS_UNUSED) {
zend_free_op free_op1;
zval *ptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
@@ -4099,169 +4577,301 @@ ZEND_VM_HANDLER(79, ZEND_EXIT, CONST|TMP|VAR|UNUSED|CV, ANY)
}
#endif
zend_bailout();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
ZEND_VM_HANDLER(57, ZEND_BEGIN_SILENCE, ANY, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = EG(error_reporting);
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG; /* shouldn't be necessary */
+ SAVE_OPLINE();
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = EG(error_reporting);
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_LONG; /* shouldn't be necessary */
if (EX(old_error_reporting) == NULL) {
- EX(old_error_reporting) = &EX_T(opline->result.u.var).tmp_var;
+ EX(old_error_reporting) = &EX_T(opline->result.var).tmp_var;
}
if (EG(error_reporting)) {
- zend_alter_ini_entry_ex("error_reporting", sizeof("error_reporting"), "0", 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME, 1 TSRMLS_CC);
+ do {
+ EG(error_reporting) = 0;
+ if (!EG(error_reporting_ini_entry)) {
+ if (UNEXPECTED(zend_hash_find(EG(ini_directives), "error_reporting", sizeof("error_reporting"), (void **) &EG(error_reporting_ini_entry)) == FAILURE)) {
+ break;
+ }
+ }
+ if (!EG(error_reporting_ini_entry)->modified) {
+ if (!EG(modified_ini_directives)) {
+ ALLOC_HASHTABLE(EG(modified_ini_directives));
+ zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
+ }
+ if (EXPECTED(zend_hash_add(EG(modified_ini_directives), "error_reporting", sizeof("error_reporting"), &EG(error_reporting_ini_entry), sizeof(zend_ini_entry*), NULL) == SUCCESS)) {
+ EG(error_reporting_ini_entry)->orig_value = EG(error_reporting_ini_entry)->value;
+ EG(error_reporting_ini_entry)->orig_value_length = EG(error_reporting_ini_entry)->value_length;
+ EG(error_reporting_ini_entry)->orig_modifiable = EG(error_reporting_ini_entry)->modifiable;
+ EG(error_reporting_ini_entry)->modified = 1;
+ }
+ } else if (EG(error_reporting_ini_entry)->value != EG(error_reporting_ini_entry)->orig_value) {
+ efree(EG(error_reporting_ini_entry)->value);
+ }
+ EG(error_reporting_ini_entry)->value = estrndup("0", sizeof("0")-1);
+ EG(error_reporting_ini_entry)->value_length = sizeof("0")-1;
+ } while (0);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(142, ZEND_RAISE_ABSTRACT_ERROR, ANY, ANY)
{
+ SAVE_OPLINE();
zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EG(scope)->name, EX(op_array)->function_name);
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
ZEND_VM_HANDLER(58, ZEND_END_SILENCE, TMP, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval restored_error_reporting;
- if (!EG(error_reporting) && Z_LVAL(EX_T(opline->op1.u.var).tmp_var) != 0) {
+ SAVE_OPLINE();
+ if (!EG(error_reporting) && Z_LVAL(EX_T(opline->op1.var).tmp_var) != 0) {
Z_TYPE(restored_error_reporting) = IS_LONG;
- Z_LVAL(restored_error_reporting) = Z_LVAL(EX_T(opline->op1.u.var).tmp_var);
+ Z_LVAL(restored_error_reporting) = Z_LVAL(EX_T(opline->op1.var).tmp_var);
+ EG(error_reporting) = Z_LVAL(restored_error_reporting);
convert_to_string(&restored_error_reporting);
- zend_alter_ini_entry_ex("error_reporting", sizeof("error_reporting"), Z_STRVAL(restored_error_reporting), Z_STRLEN(restored_error_reporting), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME, 1 TSRMLS_CC);
- zendi_zval_dtor(restored_error_reporting);
+ if (EXPECTED(EG(error_reporting_ini_entry) != NULL)) {
+ if (EXPECTED(EG(error_reporting_ini_entry)->modified &&
+ EG(error_reporting_ini_entry)->value != EG(error_reporting_ini_entry)->orig_value)) {
+ efree(EG(error_reporting_ini_entry)->value);
+ }
+ EG(error_reporting_ini_entry)->value = Z_STRVAL(restored_error_reporting);
+ EG(error_reporting_ini_entry)->value_length = Z_STRLEN(restored_error_reporting);
+ } else {
+ zendi_zval_dtor(restored_error_reporting);
+ }
}
- if (EX(old_error_reporting) == &EX_T(opline->op1.u.var).tmp_var) {
+ if (EX(old_error_reporting) == &EX_T(opline->op1.var).tmp_var) {
EX(old_error_reporting) = NULL;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(152, ZEND_JMP_SET, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *value = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *value;
+
+ SAVE_OPLINE();
+ value = GET_OP1_ZVAL_PTR(BP_VAR_R);
if (i_zend_is_true(value)) {
- EX_T(opline->result.u.var).tmp_var = *value;
- zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
- FREE_OP1();
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
+ if (!IS_OP1_TMP_FREE()) {
+ zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
+ }
+ FREE_OP1_IF_VAR();
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_JMP(opline->op2.u.jmp_addr);
+ ZEND_VM_JMP(opline->op2.jmp_addr);
}
FREE_OP1();
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_HANDLER(158, ZEND_JMP_SET_VAR, CONST|TMP|VAR|CV, ANY)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *value, *ret;
+
+ SAVE_OPLINE();
+ value = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
+ if (i_zend_is_true(value)) {
+ if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) {
+ Z_ADDREF_P(value);
+ EX_T(opline->result.var).var.ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ } else {
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, value);
+ EX_T(opline->result.var).var.ptr = ret;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ if (!IS_OP1_TMP_FREE()) {
+ zval_copy_ctor(EX_T(opline->result.var).var.ptr);
+ }
+ }
+ FREE_OP1_IF_VAR();
+#if DEBUG_ZEND>=2
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
+#endif
+ ZEND_VM_JMP(opline->op2.jmp_addr);
+ }
+
+ FREE_OP1();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(22, ZEND_QM_ASSIGN, CONST|TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *value = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *value;
+
+ SAVE_OPLINE();
+ value = GET_OP1_ZVAL_PTR(BP_VAR_R);
- EX_T(opline->result.u.var).tmp_var = *value;
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
if (!IS_OP1_TMP_FREE()) {
- zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
+ }
+ FREE_OP1_IF_VAR();
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_HANDLER(157, ZEND_QM_ASSIGN_VAR, CONST|TMP|VAR|CV, ANY)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *value, *ret;
+
+ SAVE_OPLINE();
+ value = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
+ if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) {
+ Z_ADDREF_P(value);
+ EX_T(opline->result.var).var.ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ } else {
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, value);
+ EX_T(opline->result.var).var.ptr = ret;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ if (!IS_OP1_TMP_FREE()) {
+ zval_copy_ctor(EX_T(opline->result.var).var.ptr);
+ }
}
+
FREE_OP1_IF_VAR();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(101, ZEND_EXT_STMT, ANY, ANY)
{
+ SAVE_OPLINE();
if (!EG(no_extensions)) {
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_statement_handler, EX(op_array) TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(102, ZEND_EXT_FCALL_BEGIN, ANY, ANY)
{
+ SAVE_OPLINE();
if (!EG(no_extensions)) {
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_begin_handler, EX(op_array) TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(103, ZEND_EXT_FCALL_END, ANY, ANY)
{
+ SAVE_OPLINE();
if (!EG(no_extensions)) {
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_end_handler, EX(op_array) TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(139, ZEND_DECLARE_CLASS, ANY, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- EX_T(opline->result.u.var).class_entry = do_bind_class(opline, EG(class_table), 0 TSRMLS_CC);
+ SAVE_OPLINE();
+ EX_T(opline->result.var).class_entry = do_bind_class(EX(op_array), opline, EG(class_table), 0 TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(140, ZEND_DECLARE_INHERITED_CLASS, ANY, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- EX_T(opline->result.u.var).class_entry = do_bind_inherited_class(opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC);
+ SAVE_OPLINE();
+ EX_T(opline->result.var).class_entry = do_bind_inherited_class(EX(op_array), opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(145, ZEND_DECLARE_INHERITED_CLASS_DELAYED, ANY, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_class_entry **pce, **pce_orig;
- if (zend_hash_find(EG(class_table), Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void**)&pce) == FAILURE ||
- (zend_hash_find(EG(class_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), (void**)&pce_orig) == SUCCESS &&
+ SAVE_OPLINE();
+ if (zend_hash_quick_find(EG(class_table), Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv)+1, Z_HASH_P(opline->op2.zv), (void**)&pce) == FAILURE ||
+ (zend_hash_quick_find(EG(class_table), Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), Z_HASH_P(opline->op1.zv), (void**)&pce_orig) == SUCCESS &&
*pce != *pce_orig)) {
- do_bind_inherited_class(opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC);
+ do_bind_inherited_class(EX(op_array), opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(141, ZEND_DECLARE_FUNCTION, ANY, ANY)
{
- do_bind_function(EX(opline), EG(function_table), 0);
+ USE_OPLINE
+
+ SAVE_OPLINE();
+ do_bind_function(EX(op_array), opline, EG(function_table), 0);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(105, ZEND_TICKS, CONST, ANY)
+ZEND_VM_HANDLER(105, ZEND_TICKS, ANY, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (++EG(ticks_count)>=Z_LVAL(opline->op1.u.constant)) {
+ SAVE_OPLINE();
+ if (++EG(ticks_count)>=opline->extended_value) {
EG(ticks_count)=0;
if (zend_ticks_function) {
- zend_ticks_function(Z_LVAL(opline->op1.u.constant));
+ zend_ticks_function(opline->extended_value);
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(138, ZEND_INSTANCEOF, TMP|VAR|CV, ANY)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *expr = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ zval *expr;
zend_bool result;
+ SAVE_OPLINE();
+ expr = GET_OP1_ZVAL_PTR(BP_VAR_R);
+
if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->get_class_entry) {
- result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.u.var).class_entry TSRMLS_CC);
+ result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.var).class_entry TSRMLS_CC);
} else {
result = 0;
}
- ZVAL_BOOL(&EX_T(opline->result.u.var).tmp_var, result);
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, result);
FREE_OP1();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -4277,17 +4887,69 @@ ZEND_VM_HANDLER(0, ZEND_NOP, ANY, ANY)
ZEND_VM_HANDLER(144, ZEND_ADD_INTERFACE, ANY, CONST)
{
- zend_op *opline = EX(opline);
- zend_class_entry *ce = EX_T(opline->op1.u.var).class_entry;
- zend_class_entry *iface = zend_fetch_class(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant), opline->extended_value TSRMLS_CC);
+ USE_OPLINE
+ zend_class_entry *ce = EX_T(opline->op1.var).class_entry;
+ zend_class_entry *iface;
- if (iface) {
- if (!(iface->ce_flags & ZEND_ACC_INTERFACE)) {
- zend_error_noreturn(E_ERROR, "%s cannot implement %s - it is not an interface", ce->name, iface->name);
+ SAVE_OPLINE();
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ iface = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ iface = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(iface == NULL)) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
- zend_do_implement_interface(ce, iface TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
}
+ if (UNEXPECTED((iface->ce_flags & ZEND_ACC_INTERFACE) == 0)) {
+ zend_error_noreturn(E_ERROR, "%s cannot implement %s - it is not an interface", ce->name, iface->name);
+ }
+ zend_do_implement_interface(ce, iface TSRMLS_CC);
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_HANDLER(154, ZEND_ADD_TRAIT, ANY, ANY)
+{
+ USE_OPLINE
+ zend_class_entry *ce = EX_T(opline->op1.var).class_entry;
+ zend_class_entry *trait;
+
+ SAVE_OPLINE();
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ trait = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ trait = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv),
+ Z_STRLEN_P(opline->op2.zv),
+ opline->op2.literal + 1,
+ opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(trait == NULL)) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+ if (!((trait->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT)) {
+ zend_error_noreturn(E_ERROR, "%s cannot use %s - it is not a trait", ce->name, trait->name);
+ }
+ CACHE_PTR(opline->op2.literal->cache_slot, trait);
+ }
+
+ zend_do_implement_trait(ce, trait TSRMLS_CC);
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_HANDLER(155, ZEND_BIND_TRAITS, ANY, ANY)
+{
+ USE_OPLINE
+ zend_class_entry *ce = EX_T(opline->op1.var).class_entry;
+
+ SAVE_OPLINE();
+ zend_do_bind_traits(ce TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -4295,11 +4957,11 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
{
zend_uint op_num = EG(opline_before_exception)-EG(active_op_array)->opcodes;
int i;
- zend_uint catch_op_num;
+ zend_uint catch_op_num = 0;
int catched = 0;
zval restored_error_reporting;
-
- void **stack_frame = (void**)(((char*)EX(Ts)) +
+
+ void **stack_frame = (void**)(((char*)EX_Ts()) +
(ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * EX(op_array)->T));
while (zend_vm_stack_top(TSRMLS_C) != stack_frame) {
@@ -4311,9 +4973,7 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
if (EG(active_op_array)->try_catch_array[i].try_op > op_num) {
/* further blocks will not be relevant... */
break;
- }
- if (op_num >= EG(active_op_array)->try_catch_array[i].try_op
- && op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
+ } else if (op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
catch_op_num = EX(op_array)->try_catch_array[i].catch_op;
catched = 1;
}
@@ -4349,13 +5009,13 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
switch (brk_opline->opcode) {
case ZEND_SWITCH_FREE:
- if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
- zend_switch_free(&EX_T(brk_opline->op1.u.var), brk_opline->extended_value TSRMLS_CC);
+ if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
+ zval_ptr_dtor(&EX_T(brk_opline->op1.var).var.ptr);
}
break;
case ZEND_FREE:
- if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
- zendi_zval_dtor(EX_T(brk_opline->op1.u.var).tmp_var);
+ if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
+ zendi_zval_dtor(EX_T(brk_opline->op1.var).tmp_var);
}
break;
}
@@ -4383,13 +5043,22 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
ZEND_VM_HANDLER(146, ZEND_VERIFY_ABSTRACT_CLASS, ANY, ANY)
{
- zend_verify_abstract_class(EX_T(EX(opline)->op1.u.var).class_entry TSRMLS_CC);
+ USE_OPLINE
+
+ SAVE_OPLINE();
+ zend_verify_abstract_class(EX_T(opline->op1.var).class_entry TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
ZEND_VM_HANDLER(150, ZEND_USER_OPCODE, ANY, ANY)
{
- int ret = zend_user_opcode_handlers[EX(opline)->opcode](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL);
+ USE_OPLINE
+ int ret;
+
+ SAVE_OPLINE();
+ ret = zend_user_opcode_handlers[opline->opcode](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL);
+ LOAD_OPLINE();
switch (ret) {
case ZEND_USER_OPCODE_CONTINUE:
@@ -4401,24 +5070,29 @@ ZEND_VM_HANDLER(150, ZEND_USER_OPCODE, ANY, ANY)
case ZEND_USER_OPCODE_LEAVE:
ZEND_VM_LEAVE();
case ZEND_USER_OPCODE_DISPATCH:
- ZEND_VM_DISPATCH(EX(opline)->opcode, EX(opline));
+ ZEND_VM_DISPATCH(opline->opcode, opline);
default:
- ZEND_VM_DISPATCH((zend_uchar)(ret & 0xff), EX(opline));
+ ZEND_VM_DISPATCH((zend_uchar)(ret & 0xff), opline);
}
}
ZEND_VM_HANDLER(143, ZEND_DECLARE_CONST, CONST, CONST)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *name = GET_OP1_ZVAL_PTR(BP_VAR_R);
- zval *val = GET_OP2_ZVAL_PTR(BP_VAR_R);
+ zval *name;
+ zval *val;
zend_constant c;
+ SAVE_OPLINE();
+ name = GET_OP1_ZVAL_PTR(BP_VAR_R);
+ val = GET_OP2_ZVAL_PTR(BP_VAR_R);
+
if ((Z_TYPE_P(val) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT || Z_TYPE_P(val) == IS_CONSTANT_ARRAY) {
- zval tmp = *val;
+ zval tmp;
zval *tmp_ptr = &tmp;
+ ZVAL_COPY_VALUE(&tmp, val);
if (Z_TYPE_P(val) == IS_CONSTANT_ARRAY) {
zval_copy_ctor(&tmp);
}
@@ -4426,11 +5100,11 @@ ZEND_VM_HANDLER(143, ZEND_DECLARE_CONST, CONST, CONST)
zval_update_constant(&tmp_ptr, NULL TSRMLS_CC);
c.value = *tmp_ptr;
} else {
- c.value = *val;
+ INIT_PZVAL_COPY(&c.value, val);
zval_copy_ctor(&c.value);
}
c.flags = CONST_CS; /* non persistent, case sensetive */
- c.name = zend_strndup(Z_STRVAL_P(name), Z_STRLEN_P(name));
+ c.name = IS_INTERNED(Z_STRVAL_P(name)) ? Z_STRVAL_P(name) : zend_strndup(Z_STRVAL_P(name), Z_STRLEN_P(name));
c.name_len = Z_STRLEN_P(name)+1;
c.module_number = PHP_USER_CONSTANT;
@@ -4439,21 +5113,46 @@ ZEND_VM_HANDLER(143, ZEND_DECLARE_CONST, CONST, CONST)
FREE_OP1();
FREE_OP2();
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, CONST)
+ZEND_VM_HANDLER(153, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, UNUSED)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_function *op_array;
- if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), Z_LVAL(opline->op2.u.constant), (void *) &op_array) == FAILURE ||
- op_array->type != ZEND_USER_FUNCTION) {
+ SAVE_OPLINE();
+
+ if (UNEXPECTED(zend_hash_quick_find(EG(function_table), Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), Z_HASH_P(opline->op1.zv), (void *) &op_array) == FAILURE) ||
+ UNEXPECTED(op_array->type != ZEND_USER_FUNCTION)) {
zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
}
- zend_create_closure(&EX_T(opline->result.u.var).tmp_var, op_array TSRMLS_CC);
+ zend_create_closure(&EX_T(opline->result.var).tmp_var, op_array, EG(scope), EG(This) TSRMLS_CC);
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+ZEND_VM_HANDLER(156, ZEND_SEPARATE, VAR, UNUSED)
+{
+ USE_OPLINE
+ zval *var_ptr, *new_zv;
+ SAVE_OPLINE();
+ var_ptr = EX_T(opline->op1.var).var.ptr;
+ if (Z_TYPE_P(var_ptr) != IS_OBJECT &&
+ !PZVAL_IS_REF(var_ptr) &&
+ Z_REFCOUNT_P(var_ptr) > 1) {
+
+ Z_DELREF_P(var_ptr);
+ ALLOC_ZVAL(new_zv);
+ INIT_PZVAL_COPY(new_zv, var_ptr);
+ var_ptr = new_zv;
+ zval_copy_ctor(var_ptr);
+ EX_T(opline->op1.var).var.ptr = var_ptr;
+ }
ZEND_VM_NEXT_OPCODE();
}
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index d2c96a458..94c34a555 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -21,26 +21,327 @@
#ifdef ZEND_WIN32
# pragma warning(once : 4101)
#endif
-static user_opcode_handler_t zend_user_opcode_handlers[256] = {(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL};
-
-static zend_uchar zend_user_opcodes[256] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255};
+static user_opcode_handler_t zend_user_opcode_handlers[256] = {
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL,
+ (user_opcode_handler_t)NULL
+};
+
+static zend_uchar zend_user_opcodes[256] = {0,
+ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
+ 17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,
+ 33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,
+ 49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,
+ 65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,
+ 81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,
+ 97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,
+ 113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,
+ 129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,
+ 145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,
+ 161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,
+ 177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,
+ 193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,
+ 209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,
+ 225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,
+ 241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
+};
static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op);
-#define ZEND_VM_CONTINUE() return 0
-#define ZEND_VM_RETURN() return 1
-#define ZEND_VM_ENTER() return 2
-#define ZEND_VM_LEAVE() return 3
+#undef OPLINE
+#undef DCL_OPLINE
+#undef USE_OPLINE
+#undef LOAD_OPLINE
+#undef SAVE_OPLINE
+#define OPLINE EX(opline)
+#define DCL_OPLINE
+#define USE_OPLINE zend_op *opline = EX(opline);
+#define LOAD_OPLINE()
+#define SAVE_OPLINE()
+#undef CHECK_EXCEPTION
+#undef HANDLE_EXCEPTION
+#undef HANDLE_EXCEPTION_LEAVE
+#define CHECK_EXCEPTION() LOAD_OPLINE()
+#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()
+#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()
+#define LOAD_REGS()
+#define ZEND_VM_CONTINUE() return 0
+#define ZEND_VM_RETURN() return 1
+#define ZEND_VM_ENTER() return 2
+#define ZEND_VM_LEAVE() return 3
#define ZEND_VM_DISPATCH(opcode, opline) return zend_vm_get_opcode_handler(opcode, opline)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
#define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL execute_data TSRMLS_CC
#undef EX
#define EX(element) execute_data->element
+#undef EX_CV
+#define EX_CV(var) EX(CVs)[var]
+#undef EX_CVs
+#define EX_CVs() EX(CVs)
+#undef EX_T
+#define EX_T(offset) (*(temp_variable *)((char *) EX(Ts) + offset))
+#undef EX_Ts
+#define EX_Ts() EX(Ts)
+
ZEND_API void execute(zend_op_array *op_array TSRMLS_DC)
{
+ DCL_OPLINE
zend_execute_data *execute_data;
zend_bool nested = 0;
zend_bool original_in_execution = EG(in_execution);
@@ -73,29 +374,31 @@ zend_vm_enter:
EX(nested) = nested;
nested = 1;
- if (op_array->start_op) {
- ZEND_VM_SET_OPCODE(op_array->start_op);
- } else {
- ZEND_VM_SET_OPCODE(op_array->opcodes);
+ LOAD_REGS();
+
+ if (!op_array->run_time_cache && op_array->last_cache_slot) {
+ op_array->run_time_cache = ecalloc(op_array->last_cache_slot, sizeof(void*));
}
if (op_array->this_var != -1 && EG(This)) {
Z_ADDREF_P(EG(This)); /* For $this pointer */
if (!EG(active_symbol_table)) {
- EX(CVs)[op_array->this_var] = (zval**)EX(CVs) + (op_array->last_var + op_array->this_var);
- *EX(CVs)[op_array->this_var] = EG(This);
+ EX_CV(op_array->this_var) = (zval**)EX_CVs() + (op_array->last_var + op_array->this_var);
+ *EX_CV(op_array->this_var) = EG(This);
} else {
- if (zend_hash_add(EG(active_symbol_table), "this", sizeof("this"), &EG(This), sizeof(zval *), (void**)&EX(CVs)[op_array->this_var])==FAILURE) {
+ if (zend_hash_add(EG(active_symbol_table), "this", sizeof("this"), &EG(This), sizeof(zval *), (void**)&EX_CV(op_array->this_var))==FAILURE) {
Z_DELREF_P(EG(This));
}
}
}
+ EX(opline) = UNEXPECTED((op_array->fn_flags & ZEND_ACC_INTERACTIVE) != 0) && EG(start_op) ? EG(start_op) : op_array->opcodes;
EG(opline_ptr) = &EX(opline);
+ LOAD_OPLINE();
EX(function_state).function = (zend_function *) op_array;
EX(function_state).arguments = NULL;
-
+
while (1) {
int ret;
#ifdef ZEND_WIN32
@@ -104,7 +407,7 @@ zend_vm_enter:
}
#endif
- if ((ret = EX(opline)->handler(execute_data TSRMLS_CC)) > 0) {
+ if ((ret = OPLINE->handler(execute_data TSRMLS_CC)) > 0) {
switch (ret) {
case 1:
EG(in_execution) = original_in_execution;
@@ -125,23 +428,28 @@ zend_vm_enter:
static int ZEND_FASTCALL ZEND_JMP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ USE_OPLINE
+
#if DEBUG_ZEND>=2
- printf("Jumping to %d\n", EX(opline)->op1.u.opline_num);
+ printf("Jumping to %d\n", opline->op1.opline_num);
#endif
- ZEND_VM_SET_OPCODE(EX(opline)->op1.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op1.jmp_addr);
ZEND_VM_CONTINUE(); /* CHECK_ME */
}
static int ZEND_FASTCALL ZEND_INIT_STRING_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zval *tmp = &EX_T(EX(opline)->result.u.var).tmp_var;
+ USE_OPLINE
+ zval *tmp = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
tmp->value.str.val = emalloc(1);
tmp->value.str.val[0] = 0;
tmp->value.str.len = 0;
Z_SET_REFCOUNT_P(tmp, 1);
tmp->type = IS_STRING;
Z_UNSET_ISREF_P(tmp);
+ /*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
}
@@ -153,8 +461,8 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
EG(current_execute_data) = EX(prev_execute_data);
EG(opline_ptr) = NULL;
if (!EG(active_symbol_table)) {
- zval ***cv = EX(CVs);
- zval ***end = cv + EX(op_array)->last_var;
+ zval ***cv = EX_CVs();
+ zval ***end = cv + op_array->last_var;
while (cv != end) {
if (*cv) {
zval_ptr_dtor(*cv);
@@ -173,32 +481,38 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
if (nested) {
execute_data = EG(current_execute_data);
+ }
+ if (nested) {
+ USE_OPLINE
- if (EX(call_opline)->opcode == ZEND_INCLUDE_OR_EVAL) {
+ LOAD_REGS();
+ LOAD_OPLINE();
+ if (UNEXPECTED(opline->opcode == ZEND_INCLUDE_OR_EVAL)) {
EX(function_state).function = (zend_function *) EX(op_array);
EX(function_state).arguments = NULL;
EX(object) = EX(current_object);
- if (RETURN_VALUE_USED(EX(call_opline))) {
- if (!EX_T(EX(call_opline)->result.u.var).var.ptr) { /* there was no return statement */
- ALLOC_ZVAL(EX_T(EX(call_opline)->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(EX(call_opline)->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(EX(call_opline)->result.u.var).var.ptr) = 1;
- Z_TYPE_P(EX_T(EX(call_opline)->result.u.var).var.ptr) = IS_BOOL;
- }
- }
-
EG(opline_ptr) = &EX(opline);
EG(active_op_array) = EX(op_array);
EG(return_value_ptr_ptr) = EX(original_return_value);
destroy_op_array(op_array TSRMLS_CC);
efree(op_array);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
+ HANDLE_EXCEPTION_LEAVE();
+ } else if (RETURN_VALUE_USED(opline)) {
+ if (!EX_T(opline->result.var).var.ptr) { /* there was no return statement */
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, 1);
+ INIT_PZVAL(retval);
+ EX_T(opline->result.var).var.ptr = retval;
+ }
}
- EX(opline)++;
+ ZEND_VM_INC_OPCODE();
ZEND_VM_LEAVE();
} else {
@@ -222,7 +536,7 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
EX(function_state).arguments = NULL;
if (EG(This)) {
- if (EG(exception) && IS_CTOR_CALL(EX(called_scope))) {
+ if (UNEXPECTED(EG(exception) != NULL) && IS_CTOR_CALL(EX(called_scope))) {
if (IS_CTOR_USED(EX(called_scope))) {
Z_DELREF_P(EG(This));
}
@@ -241,14 +555,15 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
zend_vm_stack_clear_multiple(TSRMLS_C);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
- if (RETURN_VALUE_USED(EX(call_opline)) && EX_T(EX(call_opline)->result.u.var).var.ptr) {
- zval_ptr_dtor(&EX_T(EX(call_opline)->result.u.var).var.ptr);
+ if (RETURN_VALUE_USED(opline) && EX_T(opline->result.var).var.ptr) {
+ zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
}
+ HANDLE_EXCEPTION_LEAVE();
}
- EX(opline)++;
+ ZEND_VM_INC_OPCODE();
ZEND_VM_LEAVE();
}
}
@@ -257,89 +572,99 @@ static int ZEND_FASTCALL zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_bool should_change_scope = 0;
+ zend_function *fbc = EX(function_state).function;
- if (EX(function_state).function->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) {
- if (EX(function_state).function->common.fn_flags & ZEND_ACC_ABSTRACT) {
- zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
+ SAVE_OPLINE();
+ if (UNEXPECTED((fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED)) != 0)) {
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) {
+ zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", fbc->common.scope->name, fbc->common.function_name);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
- if (EX(function_state).function->common.fn_flags & ZEND_ACC_DEPRECATED) {
+ if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 0)) {
zend_error(E_DEPRECATED, "Function %s%s%s() is deprecated",
- EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : "",
- EX(function_state).function->common.scope ? "::" : "",
- EX(function_state).function->common.function_name);
+ fbc->common.scope ? fbc->common.scope->name : "",
+ fbc->common.scope ? "::" : "",
+ fbc->common.function_name);
}
}
- if (EX(function_state).function->common.scope &&
- !(EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC) &&
+ if (fbc->common.scope &&
+ !(fbc->common.fn_flags & ZEND_ACC_STATIC) &&
!EX(object)) {
- if (EX(function_state).function->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
+ if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
/* FIXME: output identifiers properly */
- zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically", fbc->common.scope->name, fbc->common.function_name);
} else {
/* FIXME: output identifiers properly */
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically", EX(function_state).function->common.scope->name, EX(function_state).function->common.function_name);
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically", fbc->common.scope->name, fbc->common.function_name);
}
}
- if (EX(function_state).function->type == ZEND_USER_FUNCTION ||
- EX(function_state).function->common.scope) {
+ if (fbc->type == ZEND_USER_FUNCTION || fbc->common.scope) {
should_change_scope = 1;
EX(current_this) = EG(This);
EX(current_scope) = EG(scope);
EX(current_called_scope) = EG(called_scope);
EG(This) = EX(object);
- EG(scope) = (EX(function_state).function->type == ZEND_USER_FUNCTION || !EX(object)) ? EX(function_state).function->common.scope : NULL;
+ EG(scope) = (fbc->type == ZEND_USER_FUNCTION || !EX(object)) ? fbc->common.scope : NULL;
EG(called_scope) = EX(called_scope);
}
zend_arg_types_stack_3_pop(&EG(arg_types_stack), &EX(called_scope), &EX(current_object), &EX(fbc));
EX(function_state).arguments = zend_vm_stack_push_args(opline->extended_value TSRMLS_CC);
+ LOAD_OPLINE();
+
+ if (fbc->type == ZEND_INTERNAL_FUNCTION) {
+ temp_variable *ret = &EX_T(opline->result.var);
- if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION) {
- ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference;
+ MAKE_STD_ZVAL(ret->var.ptr);
+ ZVAL_NULL(ret->var.ptr);
+ ret->var.ptr_ptr = &ret->var.ptr;
+ ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
- if (EX(function_state).function->common.arg_info) {
+ if (fbc->common.arg_info) {
zend_uint i=0;
zval **p = (zval**)EX(function_state).arguments;
ulong arg_count = opline->extended_value;
while (arg_count>0) {
- zend_verify_arg_type(EX(function_state).function, ++i, *(p-arg_count), 0 TSRMLS_CC);
+ zend_verify_arg_type(fbc, ++i, *(p-arg_count), 0 TSRMLS_CC);
arg_count--;
}
}
+
if (!zend_execute_internal) {
/* saves one function call if zend_execute_internal is not used */
- ((zend_internal_function *) EX(function_state).function)->handler(opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(function_state).function->common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
+ fbc->internal_function.handler(opline->extended_value, ret->var.ptr, (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) ? &ret->var.ptr : NULL, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
} else {
zend_execute_internal(execute_data, RETURN_VALUE_USED(opline) TSRMLS_CC);
}
if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ zval_ptr_dtor(&ret->var.ptr);
}
- } else if (EX(function_state).function->type == ZEND_USER_FUNCTION) {
+ } else if (fbc->type == ZEND_USER_FUNCTION) {
EX(original_return_value) = EG(return_value_ptr_ptr);
EG(active_symbol_table) = NULL;
- EG(active_op_array) = &EX(function_state).function->op_array;
+ EG(active_op_array) = &fbc->op_array;
EG(return_value_ptr_ptr) = NULL;
if (RETURN_VALUE_USED(opline)) {
- EG(return_value_ptr_ptr) = &EX_T(opline->result.u.var).var.ptr;
- EX_T(opline->result.u.var).var.ptr = NULL;
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- EX_T(opline->result.u.var).var.fcall_returned_reference = EX(function_state).function->common.return_reference;
+ temp_variable *ret = &EX_T(opline->result.var);
+
+ ret->var.ptr = NULL;
+ EG(return_value_ptr_ptr) = &ret->var.ptr;
+ ret->var.ptr_ptr = &ret->var.ptr;
+ ret->var.fcall_returned_reference = (fbc->common.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
}
- if (zend_execute == execute && !EG(exception)) {
- EX(call_opline) = opline;
- ZEND_VM_ENTER();
+ if (EXPECTED(zend_execute == execute)) {
+ if (EXPECTED(EG(exception) == NULL)) {
+ ZEND_VM_ENTER();
+ }
} else {
zend_execute(EG(active_op_array) TSRMLS_CC);
}
@@ -360,27 +685,28 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
}
EG(active_symbol_table) = EX(symbol_table);
} else { /* ZEND_OVERLOADED_FUNCTION */
- ALLOC_INIT_ZVAL(EX_T(opline->result.u.var).var.ptr);
+ MAKE_STD_ZVAL(EX_T(opline->result.var).var.ptr);
+ ZVAL_NULL(EX_T(opline->result.var).var.ptr);
/* Not sure what should be done here if it's a static method */
- if (EX(object)) {
- Z_OBJ_HT_P(EX(object))->call_method(EX(function_state).function->common.function_name, opline->extended_value, EX_T(opline->result.u.var).var.ptr, &EX_T(opline->result.u.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
+ if (EXPECTED(EX(object) != NULL)) {
+ Z_OBJ_HT_P(EX(object))->call_method(fbc->common.function_name, opline->extended_value, EX_T(opline->result.var).var.ptr, &EX_T(opline->result.var).var.ptr, EX(object), RETURN_VALUE_USED(opline) TSRMLS_CC);
} else {
zend_error_noreturn(E_ERROR, "Cannot call overloaded function for non-object");
}
- if (EX(function_state).function->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
- efree(EX(function_state).function->common.function_name);
+ if (fbc->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY) {
+ efree((char*)fbc->common.function_name);
}
- efree(EX(function_state).function);
+ efree(fbc);
if (!RETURN_VALUE_USED(opline)) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
} else {
- Z_UNSET_ISREF_P(EX_T(opline->result.u.var).var.ptr);
- Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1);
- EX_T(opline->result.u.var).var.fcall_returned_reference = 0;
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
+ Z_UNSET_ISREF_P(EX_T(opline->result.var).var.ptr);
+ Z_SET_REFCOUNT_P(EX_T(opline->result.var).var.ptr, 1);
+ EX_T(opline->result.var).var.fcall_returned_reference = 0;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
}
@@ -389,7 +715,7 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
if (should_change_scope) {
if (EG(This)) {
- if (EG(exception) && IS_CTOR_CALL(EX(called_scope))) {
+ if (UNEXPECTED(EG(exception) != NULL) && IS_CTOR_CALL(EX(called_scope))) {
if (IS_CTOR_USED(EX(called_scope))) {
Z_DELREF_P(EG(This));
}
@@ -409,11 +735,12 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
zend_vm_stack_clear_multiple(TSRMLS_C);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
- if (RETURN_VALUE_USED(opline) && EX_T(opline->result.u.var).var.ptr) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ if (RETURN_VALUE_USED(opline) && EX_T(opline->result.var).var.ptr) {
+ zval_ptr_dtor(&EX_T(opline->result.var).var.ptr);
}
+ HANDLE_EXCEPTION();
}
ZEND_VM_NEXT_OPCODE();
@@ -427,72 +754,78 @@ static int ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(ZEND_OPCODE_HANDLER
static int ZEND_FASTCALL ZEND_RECV_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_uint arg_num = Z_LVAL(opline->op1.u.constant);
+ USE_OPLINE
+ zend_uint arg_num = opline->op1.num;
zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
- if (param == NULL) {
- char *space;
- char *class_name = get_active_class_name(&space TSRMLS_CC);
- zend_execute_data *ptr = EX(prev_execute_data);
-
+ SAVE_OPLINE();
+ if (UNEXPECTED(param == NULL)) {
if (zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, NULL, opline->extended_value TSRMLS_CC)) {
+ const char *space;
+ const char *class_name;
+ zend_execute_data *ptr;
+
+ if (EG(active_op_array)->scope) {
+ class_name = EG(active_op_array)->scope->name;
+ space = "::";
+ } else {
+ class_name = space = "";
+ }
+ ptr = EX(prev_execute_data);
+
if(ptr && ptr->op_array) {
- zend_error(E_WARNING, "Missing argument %ld for %s%s%s(), called in %s on line %d and defined", opline->op1.u.constant.value.lval, class_name, space, get_active_function_name(TSRMLS_C), ptr->op_array->filename, ptr->opline->lineno);
+ zend_error(E_WARNING, "Missing argument %u for %s%s%s(), called in %s on line %d and defined", opline->op1.num, class_name, space, get_active_function_name(TSRMLS_C), ptr->op_array->filename, ptr->opline->lineno);
} else {
- zend_error(E_WARNING, "Missing argument %ld for %s%s%s()", opline->op1.u.constant.value.lval, class_name, space, get_active_function_name(TSRMLS_C));
+ zend_error(E_WARNING, "Missing argument %u for %s%s%s()", opline->op1.num, class_name, space, get_active_function_name(TSRMLS_C));
}
}
- if (opline->result.op_type == IS_VAR) {
- PZVAL_UNLOCK_FREE(*EX_T(opline->result.u.var).var.ptr_ptr);
- }
} else {
- zend_free_op free_res;
zval **var_ptr;
zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, *param, opline->extended_value TSRMLS_CC);
- var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W);
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->result.var TSRMLS_CC);
Z_DELREF_PP(var_ptr);
*var_ptr = *param;
Z_ADDREF_PP(var_ptr);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_NEW_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *object_zval;
zend_function *constructor;
- if (EX_T(opline->op1.u.var).class_entry->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) {
- char *class_type;
-
- if (EX_T(opline->op1.u.var).class_entry->ce_flags & ZEND_ACC_INTERFACE) {
- class_type = "interface";
+ SAVE_OPLINE();
+ if (UNEXPECTED((EX_T(opline->op1.var).class_entry->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)) != 0)) {
+ if (EX_T(opline->op1.var).class_entry->ce_flags & ZEND_ACC_INTERFACE) {
+ zend_error_noreturn(E_ERROR, "Cannot instantiate interface %s", EX_T(opline->op1.var).class_entry->name);
+ } else if ((EX_T(opline->op1.var).class_entry->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
+ zend_error_noreturn(E_ERROR, "Cannot instantiate trait %s", EX_T(opline->op1.var).class_entry->name);
} else {
- class_type = "abstract class";
+ zend_error_noreturn(E_ERROR, "Cannot instantiate abstract class %s", EX_T(opline->op1.var).class_entry->name);
}
- zend_error_noreturn(E_ERROR, "Cannot instantiate %s %s", class_type, EX_T(opline->op1.u.var).class_entry->name);
}
ALLOC_ZVAL(object_zval);
- object_init_ex(object_zval, EX_T(opline->op1.u.var).class_entry);
+ object_init_ex(object_zval, EX_T(opline->op1.var).class_entry);
INIT_PZVAL(object_zval);
constructor = Z_OBJ_HT_P(object_zval)->get_constructor(object_zval TSRMLS_CC);
if (constructor == NULL) {
if (RETURN_VALUE_USED(opline)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, object_zval);
+ AI_SET_PTR(&EX_T(opline->result.var), object_zval);
} else {
zval_ptr_dtor(&object_zval);
}
- ZEND_VM_JMP(EX(op_array)->opcodes + opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes + opline->op2.opline_num);
} else {
if (RETURN_VALUE_USED(opline)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, object_zval);
PZVAL_LOCK(object_zval);
+ AI_SET_PTR(&EX_T(opline->result.var), object_zval);
}
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), ENCODE_CTOR(EX(called_scope), RETURN_VALUE_USED(opline)));
@@ -500,90 +833,148 @@ static int ZEND_FASTCALL ZEND_NEW_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
/* We are not handling overloaded classes right now */
EX(object) = object_zval;
EX(fbc) = constructor;
- EX(called_scope) = EX_T(opline->op1.u.var).class_entry;
+ EX(called_scope) = EX_T(opline->op1.var).class_entry;
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
static int ZEND_FASTCALL ZEND_BEGIN_SILENCE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = EG(error_reporting);
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG; /* shouldn't be necessary */
+ SAVE_OPLINE();
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = EG(error_reporting);
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_LONG; /* shouldn't be necessary */
if (EX(old_error_reporting) == NULL) {
- EX(old_error_reporting) = &EX_T(opline->result.u.var).tmp_var;
+ EX(old_error_reporting) = &EX_T(opline->result.var).tmp_var;
}
if (EG(error_reporting)) {
- zend_alter_ini_entry_ex("error_reporting", sizeof("error_reporting"), "0", 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME, 1 TSRMLS_CC);
+ do {
+ EG(error_reporting) = 0;
+ if (!EG(error_reporting_ini_entry)) {
+ if (UNEXPECTED(zend_hash_find(EG(ini_directives), "error_reporting", sizeof("error_reporting"), (void **) &EG(error_reporting_ini_entry)) == FAILURE)) {
+ break;
+ }
+ }
+ if (!EG(error_reporting_ini_entry)->modified) {
+ if (!EG(modified_ini_directives)) {
+ ALLOC_HASHTABLE(EG(modified_ini_directives));
+ zend_hash_init(EG(modified_ini_directives), 8, NULL, NULL, 0);
+ }
+ if (EXPECTED(zend_hash_add(EG(modified_ini_directives), "error_reporting", sizeof("error_reporting"), &EG(error_reporting_ini_entry), sizeof(zend_ini_entry*), NULL) == SUCCESS)) {
+ EG(error_reporting_ini_entry)->orig_value = EG(error_reporting_ini_entry)->value;
+ EG(error_reporting_ini_entry)->orig_value_length = EG(error_reporting_ini_entry)->value_length;
+ EG(error_reporting_ini_entry)->orig_modifiable = EG(error_reporting_ini_entry)->modifiable;
+ EG(error_reporting_ini_entry)->modified = 1;
+ }
+ } else if (EG(error_reporting_ini_entry)->value != EG(error_reporting_ini_entry)->orig_value) {
+ efree(EG(error_reporting_ini_entry)->value);
+ }
+ EG(error_reporting_ini_entry)->value = estrndup("0", sizeof("0")-1);
+ EG(error_reporting_ini_entry)->value_length = sizeof("0")-1;
+ } while (0);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_RAISE_ABSTRACT_ERROR_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ SAVE_OPLINE();
zend_error_noreturn(E_ERROR, "Cannot call abstract method %s::%s()", EG(scope)->name, EX(op_array)->function_name);
ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
static int ZEND_FASTCALL ZEND_EXT_STMT_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ SAVE_OPLINE();
if (!EG(no_extensions)) {
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_statement_handler, EX(op_array) TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_EXT_FCALL_BEGIN_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ SAVE_OPLINE();
if (!EG(no_extensions)) {
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_begin_handler, EX(op_array) TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_EXT_FCALL_END_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
+ SAVE_OPLINE();
if (!EG(no_extensions)) {
zend_llist_apply_with_argument(&zend_extensions, (llist_apply_with_arg_func_t) zend_extension_fcall_end_handler, EX(op_array) TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DECLARE_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- EX_T(opline->result.u.var).class_entry = do_bind_class(opline, EG(class_table), 0 TSRMLS_CC);
+ SAVE_OPLINE();
+ EX_T(opline->result.var).class_entry = do_bind_class(EX(op_array), opline, EG(class_table), 0 TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- EX_T(opline->result.u.var).class_entry = do_bind_inherited_class(opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC);
+ SAVE_OPLINE();
+ EX_T(opline->result.var).class_entry = do_bind_inherited_class(EX(op_array), opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DECLARE_INHERITED_CLASS_DELAYED_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_class_entry **pce, **pce_orig;
- if (zend_hash_find(EG(class_table), Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void**)&pce) == FAILURE ||
- (zend_hash_find(EG(class_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), (void**)&pce_orig) == SUCCESS &&
+ SAVE_OPLINE();
+ if (zend_hash_quick_find(EG(class_table), Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv)+1, Z_HASH_P(opline->op2.zv), (void**)&pce) == FAILURE ||
+ (zend_hash_quick_find(EG(class_table), Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), Z_HASH_P(opline->op1.zv), (void**)&pce_orig) == SUCCESS &&
*pce != *pce_orig)) {
- do_bind_inherited_class(opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC);
+ do_bind_inherited_class(EX(op_array), opline, EG(class_table), EX_T(opline->extended_value).class_entry, 0 TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DECLARE_FUNCTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- do_bind_function(EX(opline), EG(function_table), 0);
+ USE_OPLINE
+
+ SAVE_OPLINE();
+ do_bind_function(EX(op_array), opline, EG(function_table), 0);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_TICKS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ SAVE_OPLINE();
+ if (++EG(ticks_count)>=opline->extended_value) {
+ EG(ticks_count)=0;
+ if (zend_ticks_function) {
+ zend_ticks_function(opline->extended_value);
+ }
+ }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -597,15 +988,56 @@ static int ZEND_FASTCALL ZEND_NOP_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_ADD_TRAIT_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_class_entry *ce = EX_T(opline->op1.var).class_entry;
+ zend_class_entry *trait;
+
+ SAVE_OPLINE();
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ trait = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ trait = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv),
+ Z_STRLEN_P(opline->op2.zv),
+ opline->op2.literal + 1,
+ opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(trait == NULL)) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+ if (!((trait->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT)) {
+ zend_error_noreturn(E_ERROR, "%s cannot use %s - it is not a trait", ce->name, trait->name);
+ }
+ CACHE_PTR(opline->op2.literal->cache_slot, trait);
+ }
+
+ zend_do_implement_trait(ce, trait TSRMLS_CC);
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_BIND_TRAITS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_class_entry *ce = EX_T(opline->op1.var).class_entry;
+
+ SAVE_OPLINE();
+ zend_do_bind_traits(ce TSRMLS_CC);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_uint op_num = EG(opline_before_exception)-EG(active_op_array)->opcodes;
int i;
- zend_uint catch_op_num;
+ zend_uint catch_op_num = 0;
int catched = 0;
zval restored_error_reporting;
- void **stack_frame = (void**)(((char*)EX(Ts)) +
+ void **stack_frame = (void**)(((char*)EX_Ts()) +
(ZEND_MM_ALIGNED_SIZE(sizeof(temp_variable)) * EX(op_array)->T));
while (zend_vm_stack_top(TSRMLS_C) != stack_frame) {
@@ -617,9 +1049,7 @@ static int ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER
if (EG(active_op_array)->try_catch_array[i].try_op > op_num) {
/* further blocks will not be relevant... */
break;
- }
- if (op_num >= EG(active_op_array)->try_catch_array[i].try_op
- && op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
+ } else if (op_num < EG(active_op_array)->try_catch_array[i].catch_op) {
catch_op_num = EX(op_array)->try_catch_array[i].catch_op;
catched = 1;
}
@@ -655,13 +1085,13 @@ static int ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER
switch (brk_opline->opcode) {
case ZEND_SWITCH_FREE:
- if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
- zend_switch_free(&EX_T(brk_opline->op1.u.var), brk_opline->extended_value TSRMLS_CC);
+ if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
+ zval_ptr_dtor(&EX_T(brk_opline->op1.var).var.ptr);
}
break;
case ZEND_FREE:
- if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
- zendi_zval_dtor(EX_T(brk_opline->op1.u.var).tmp_var);
+ if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
+ zendi_zval_dtor(EX_T(brk_opline->op1.var).tmp_var);
}
break;
}
@@ -689,13 +1119,22 @@ static int ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER
static int ZEND_FASTCALL ZEND_VERIFY_ABSTRACT_CLASS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_verify_abstract_class(EX_T(EX(opline)->op1.u.var).class_entry TSRMLS_CC);
+ USE_OPLINE
+
+ SAVE_OPLINE();
+ zend_verify_abstract_class(EX_T(opline->op1.var).class_entry TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- int ret = zend_user_opcode_handlers[EX(opline)->opcode](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL);
+ USE_OPLINE
+ int ret;
+
+ SAVE_OPLINE();
+ ret = zend_user_opcode_handlers[opline->opcode](ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL);
+ LOAD_OPLINE();
switch (ret) {
case ZEND_USER_OPCODE_CONTINUE:
@@ -707,55 +1146,92 @@ static int ZEND_FASTCALL ZEND_USER_OPCODE_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS
case ZEND_USER_OPCODE_LEAVE:
ZEND_VM_LEAVE();
case ZEND_USER_OPCODE_DISPATCH:
- ZEND_VM_DISPATCH(EX(opline)->opcode, EX(opline));
+ ZEND_VM_DISPATCH(opline->opcode, opline);
default:
- ZEND_VM_DISPATCH((zend_uchar)(ret & 0xff), EX(opline));
+ ZEND_VM_DISPATCH((zend_uchar)(ret & 0xff), opline);
}
}
static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
+ USE_OPLINE
+ SAVE_OPLINE();
+ EG(exception) = NULL;
if (IS_CONST == IS_UNUSED) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- zval *class_name = &opline->op2.u.constant;
+ zval *class_name = opline->op2.zv;
- if (IS_CONST != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) {
- EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name);
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX_T(opline->result.var).class_entry = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ EX_T(opline->result.var).class_entry = zend_fetch_class_by_name(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->op2.literal + 1, opline->extended_value TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, EX_T(opline->result.var).class_entry);
+ }
+ } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
+ EX_T(opline->result.var).class_entry = Z_OBJCE_P(class_name);
} else if (Z_TYPE_P(class_name) == IS_STRING) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
} else {
zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
- char *function_name_strval, *lcname;
- int function_name_strlen;
-
-
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_CONST == IS_CONST) {
- if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
+ function_name = (zval*)(opline->op2.literal+1);
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (UNEXPECTED(zend_hash_quick_find(EG(function_table), Z_STRVAL_P(function_name), Z_STRLEN_P(function_name)+1, Z_HASH_P(function_name), (void **) &EX(fbc)) == FAILURE)) {
+ SAVE_OPLINE();
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
}
+ EX(object) = NULL;
+ /*CHECK_EXCEPTION();*/
+ ZEND_VM_NEXT_OPCODE();
} else {
- function_name = &opline->op2.u.constant;
+ char *function_name_strval, *lcname;
+ int function_name_strlen;
+
- if (IS_CONST != IS_CONST && IS_CONST != IS_TMP_VAR &&
- Z_TYPE_P(function_name) == IS_OBJECT &&
+ SAVE_OPLINE();
+ function_name = opline->op2.zv;
+
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ function_name_strval = Z_STRVAL_P(function_name);
+ function_name_strlen = Z_STRLEN_P(function_name);
+ if (function_name_strval[0] == '\\') {
+ function_name_strlen -= 1;
+ lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
+ } else {
+ lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
+ }
+ if (UNEXPECTED(zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
+ }
+ efree(lcname);
+
+ EX(object) = NULL;
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else if (IS_CONST != IS_CONST && IS_CONST != IS_TMP_VAR &&
+ EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
Z_OBJ_HANDLER_P(function_name, get_closure) &&
Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
if (EX(object)) {
@@ -768,46 +1244,96 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
- }
+ } else if (IS_CONST != IS_CONST &&
+ EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
+ zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
+ zend_class_entry *ce;
+ zval **method = NULL;
+ zval **obj = NULL;
- if (Z_TYPE_P(function_name) != IS_STRING) {
- zend_error_noreturn(E_ERROR, "Function name must be a string");
- }
- function_name_strval = Z_STRVAL_P(function_name);
- function_name_strlen = Z_STRLEN_P(function_name);
- if (function_name_strval[0] == '\\') {
+ zend_hash_index_find(Z_ARRVAL_P(function_name), 0, (void **) &obj);
+ zend_hash_index_find(Z_ARRVAL_P(function_name), 1, (void **) &method);
+
+ if (Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_OBJECT) {
+ zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
+ }
+
+ if (Z_TYPE_PP(method) != IS_STRING) {
+ zend_error_noreturn(E_ERROR, "Second array member is not a valid method");
+ }
+
+ if (Z_TYPE_PP(obj) == IS_STRING) {
+ ce = zend_fetch_class_by_name(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj), NULL, 0 TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_PP(obj));
+ }
+ EX(called_scope) = ce;
+ EX(object) = NULL;
+
+ if (ce->get_static_method) {
+ EX(fbc) = ce->get_static_method(ce, Z_STRVAL_PP(method), Z_STRLEN_PP(method) TSRMLS_CC);
+ } else {
+ EX(fbc) = zend_std_get_static_method(ce, Z_STRVAL_PP(method), Z_STRLEN_PP(method), NULL TSRMLS_CC);
+ }
+ } else {
+ EX(object) = *obj;
+ ce = EX(called_scope) = Z_OBJCE_PP(obj);
+
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), Z_STRVAL_PP(method), Z_STRLEN_PP(method), NULL TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), Z_STRVAL_PP(method));
+ }
- function_name_strlen -= 1;
- lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
+ if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(object) = NULL;
+ } else {
+ if (!PZVAL_IS_REF(EX(object))) {
+ Z_ADDREF_P(EX(object)); /* For $this pointer */
+ } else {
+ zval *this_ptr;
+ ALLOC_ZVAL(this_ptr);
+ INIT_PZVAL_COPY(this_ptr, EX(object));
+ zval_copy_ctor(this_ptr);
+ EX(object) = this_ptr;
+ }
+ }
+ }
+
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, Z_STRVAL_PP(method));
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
} else {
- lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
- }
- if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
+ zend_error_noreturn(E_ERROR, "Function name must be a string");
}
- efree(lcname);
-
}
-
- EX(object) = NULL;
- ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline + 1;
+ USE_OPLINE
+ zend_literal *func_name;
- ZEND_VM_INC_OPCODE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc))==FAILURE) {
- char *short_name = Z_STRVAL(opline->op1.u.constant)+Z_LVAL(op_data->op1.u.constant);
- if (zend_hash_quick_find(EG(function_table), short_name, Z_STRLEN(opline->op1.u.constant)-Z_LVAL(op_data->op1.u.constant)+1, op_data->extended_value, (void **) &EX(fbc))==FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
+ func_name = opline->op2.literal + 1;
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (zend_hash_quick_find(EG(function_table), Z_STRVAL(func_name->constant), Z_STRLEN(func_name->constant)+1, func_name->hash_value, (void **) &EX(fbc))==FAILURE) {
+ func_name++;
+ if (UNEXPECTED(zend_hash_quick_find(EG(function_table), Z_STRVAL(func_name->constant), Z_STRLEN(func_name->constant)+1, func_name->hash_value, (void **) &EX(fbc))==FAILURE)) {
+ SAVE_OPLINE();
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
}
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
}
EX(object) = NULL;
@@ -816,17 +1342,18 @@ static int ZEND_FASTCALL ZEND_INIT_NS_FCALL_BY_NAME_SPEC_CONST_HANDLER(ZEND_OPC
static int ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *assignment_value;
- zend_uint arg_num = Z_LVAL(opline->op1.u.constant);
- zend_free_op free_res;
+ zend_uint arg_num = opline->op1.num;
zval **param = zend_vm_stack_get_arg(arg_num TSRMLS_CC);
zval **var_ptr;
+ SAVE_OPLINE();
if (param == NULL) {
ALLOC_ZVAL(assignment_value);
- *assignment_value = opline->op2.u.constant;
- if ((Z_TYPE(opline->op2.u.constant) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT || Z_TYPE(opline->op2.u.constant)==IS_CONSTANT_ARRAY) {
+ *assignment_value = *opline->op2.zv;
+ if ((Z_TYPE_P(assignment_value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT ||
+ Z_TYPE_P(assignment_value)==IS_CONSTANT_ARRAY) {
Z_SET_REFCOUNT_P(assignment_value, 1);
zval_update_constant(&assignment_value, 0 TSRMLS_CC);
} else {
@@ -839,33 +1366,34 @@ static int ZEND_FASTCALL ZEND_RECV_INIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_
}
zend_verify_arg_type((zend_function *) EG(active_op_array), arg_num, assignment_value, opline->extended_value TSRMLS_CC);
- var_ptr = get_zval_ptr_ptr(&opline->result, EX(Ts), &free_res, BP_VAR_W);
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->result.var TSRMLS_CC);
Z_DELREF_PP(var_ptr);
*var_ptr = assignment_value;
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BRK_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
+ USE_OPLINE
zend_brk_cont_element *el;
- el = zend_brk_cont(&opline->op2.u.constant, opline->op1.u.opline_num,
- EX(op_array), EX(Ts) TSRMLS_CC);
+ SAVE_OPLINE();
+ el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
+ EX(op_array), EX_Ts() TSRMLS_CC);
ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
}
static int ZEND_FASTCALL ZEND_CONT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
+ USE_OPLINE
zend_brk_cont_element *el;
- el = zend_brk_cont(&opline->op2.u.constant, opline->op1.u.opline_num,
- EX(op_array), EX(Ts) TSRMLS_CC);
+ SAVE_OPLINE();
+ el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->op1.opline_num,
+ EX(op_array), EX_Ts() TSRMLS_CC);
ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
}
@@ -873,89 +1401,138 @@ static int ZEND_FASTCALL ZEND_CONT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
static int ZEND_FASTCALL ZEND_GOTO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *brk_opline;
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_brk_cont_element *el;
- el = zend_brk_cont(&opline->op2.u.constant, opline->extended_value,
- EX(op_array), EX(Ts) TSRMLS_CC);
+ SAVE_OPLINE();
+ el = zend_brk_cont(Z_LVAL_P(opline->op2.zv), opline->extended_value,
+ EX(op_array), EX_Ts() TSRMLS_CC);
brk_opline = EX(op_array)->opcodes + el->brk;
switch (brk_opline->opcode) {
case ZEND_SWITCH_FREE:
- if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
- zend_switch_free(&EX_T(brk_opline->op1.u.var), brk_opline->extended_value TSRMLS_CC);
+ if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
+ zval_ptr_dtor(&EX_T(brk_opline->op1.var).var.ptr);
}
break;
case ZEND_FREE:
- if (brk_opline->op1.u.EA.type != EXT_TYPE_FREE_ON_RETURN) {
- zendi_zval_dtor(EX_T(brk_opline->op1.u.var).tmp_var);
+ if (!(brk_opline->extended_value & EXT_TYPE_FREE_ON_RETURN)) {
+ zendi_zval_dtor(EX_T(brk_opline->op1.var).tmp_var);
}
break;
}
- ZEND_VM_JMP(opline->op1.u.jmp_addr);
+ ZEND_VM_JMP(opline->op1.jmp_addr);
}
static int ZEND_FASTCALL ZEND_ADD_INTERFACE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_class_entry *ce = EX_T(opline->op1.u.var).class_entry;
- zend_class_entry *iface = zend_fetch_class(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant), opline->extended_value TSRMLS_CC);
+ USE_OPLINE
+ zend_class_entry *ce = EX_T(opline->op1.var).class_entry;
+ zend_class_entry *iface;
- if (iface) {
- if (!(iface->ce_flags & ZEND_ACC_INTERFACE)) {
- zend_error_noreturn(E_ERROR, "%s cannot implement %s - it is not an interface", ce->name, iface->name);
+ SAVE_OPLINE();
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ iface = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ iface = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(iface == NULL)) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
- zend_do_implement_interface(ce, iface TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
}
+ if (UNEXPECTED((iface->ce_flags & ZEND_ACC_INTERFACE) == 0)) {
+ zend_error_noreturn(E_ERROR, "%s cannot implement %s - it is not an interface", ce->name, iface->name);
+ }
+ zend_do_implement_interface(ce, iface TSRMLS_CC);
+
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
+ USE_OPLINE
+ SAVE_OPLINE();
+ EG(exception) = NULL;
if (IS_TMP_VAR == IS_UNUSED) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
zend_free_op free_op2;
- zval *class_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *class_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) {
- EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name);
+ if (IS_TMP_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX_T(opline->result.var).class_entry = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ EX_T(opline->result.var).class_entry = zend_fetch_class_by_name(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->op2.literal + 1, opline->extended_value TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, EX_T(opline->result.var).class_entry);
+ }
+ } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
+ EX_T(opline->result.var).class_entry = Z_OBJCE_P(class_name);
} else if (Z_TYPE_P(class_name) == IS_STRING) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
} else {
zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
}
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
- char *function_name_strval, *lcname;
- int function_name_strlen;
- zend_free_op free_op2;
-
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_TMP_VAR == IS_CONST) {
- if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
+ function_name = (zval*)(opline->op2.literal+1);
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (UNEXPECTED(zend_hash_quick_find(EG(function_table), Z_STRVAL_P(function_name), Z_STRLEN_P(function_name)+1, Z_HASH_P(function_name), (void **) &EX(fbc)) == FAILURE)) {
+ SAVE_OPLINE();
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
}
+ EX(object) = NULL;
+ /*CHECK_EXCEPTION();*/
+ ZEND_VM_NEXT_OPCODE();
} else {
- function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ char *function_name_strval, *lcname;
+ int function_name_strlen;
+ zend_free_op free_op2;
- if (IS_TMP_VAR != IS_CONST && IS_TMP_VAR != IS_TMP_VAR &&
- Z_TYPE_P(function_name) == IS_OBJECT &&
+ SAVE_OPLINE();
+ function_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ function_name_strval = Z_STRVAL_P(function_name);
+ function_name_strlen = Z_STRLEN_P(function_name);
+ if (function_name_strval[0] == '\\') {
+ function_name_strlen -= 1;
+ lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
+ } else {
+ lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
+ }
+ if (UNEXPECTED(zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
+ }
+ efree(lcname);
+ zval_dtor(free_op2.var);
+ EX(object) = NULL;
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else if (IS_TMP_VAR != IS_CONST && IS_TMP_VAR != IS_TMP_VAR &&
+ EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
Z_OBJ_HANDLER_P(function_name, get_closure) &&
Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
if (EX(object)) {
@@ -968,101 +1545,157 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_TMP_HANDLER(ZEND_OPCODE_H
} else {
zval_dtor(free_op2.var);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
- }
+ } else if (IS_TMP_VAR != IS_CONST &&
+ EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
+ zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
+ zend_class_entry *ce;
+ zval **method = NULL;
+ zval **obj = NULL;
- if (Z_TYPE_P(function_name) != IS_STRING) {
- zend_error_noreturn(E_ERROR, "Function name must be a string");
- }
- function_name_strval = Z_STRVAL_P(function_name);
- function_name_strlen = Z_STRLEN_P(function_name);
- if (function_name_strval[0] == '\\') {
+ zend_hash_index_find(Z_ARRVAL_P(function_name), 0, (void **) &obj);
+ zend_hash_index_find(Z_ARRVAL_P(function_name), 1, (void **) &method);
- function_name_strlen -= 1;
- lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
- } else {
- lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
- }
- if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
- }
- efree(lcname);
- zval_dtor(free_op2.var);
- }
+ if (Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_OBJECT) {
+ zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
+ }
- EX(object) = NULL;
- ZEND_VM_NEXT_OPCODE();
-}
+ if (Z_TYPE_PP(method) != IS_STRING) {
+ zend_error_noreturn(E_ERROR, "Second array member is not a valid method");
+ }
+ if (Z_TYPE_PP(obj) == IS_STRING) {
+ ce = zend_fetch_class_by_name(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj), NULL, 0 TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_PP(obj));
+ }
+ EX(called_scope) = ce;
+ EX(object) = NULL;
-static int ZEND_FASTCALL ZEND_BRK_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zend_free_op free_op2;
- zend_brk_cont_element *el;
+ if (ce->get_static_method) {
+ EX(fbc) = ce->get_static_method(ce, Z_STRVAL_PP(method), Z_STRLEN_PP(method) TSRMLS_CC);
+ } else {
+ EX(fbc) = zend_std_get_static_method(ce, Z_STRVAL_PP(method), Z_STRLEN_PP(method), NULL TSRMLS_CC);
+ }
+ } else {
+ EX(object) = *obj;
+ ce = EX(called_scope) = Z_OBJCE_PP(obj);
- el = zend_brk_cont(_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num,
- EX(op_array), EX(Ts) TSRMLS_CC);
- zval_dtor(free_op2.var);
- ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
-}
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), Z_STRVAL_PP(method), Z_STRLEN_PP(method), NULL TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), Z_STRVAL_PP(method));
+ }
-static int ZEND_FASTCALL ZEND_CONT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zend_free_op free_op2;
- zend_brk_cont_element *el;
+ if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(object) = NULL;
+ } else {
+ if (!PZVAL_IS_REF(EX(object))) {
+ Z_ADDREF_P(EX(object)); /* For $this pointer */
+ } else {
+ zval *this_ptr;
+ ALLOC_ZVAL(this_ptr);
+ INIT_PZVAL_COPY(this_ptr, EX(object));
+ zval_copy_ctor(this_ptr);
+ EX(object) = this_ptr;
+ }
+ }
+ }
- el = zend_brk_cont(_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num,
- EX(op_array), EX(Ts) TSRMLS_CC);
- zval_dtor(free_op2.var);
- ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, Z_STRVAL_PP(method));
+ }
+ zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else {
+ zend_error_noreturn(E_ERROR, "Function name must be a string");
+ }
+ }
}
+
static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
+ USE_OPLINE
+ SAVE_OPLINE();
+ EG(exception) = NULL;
if (IS_VAR == IS_UNUSED) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
zend_free_op free_op2;
- zval *class_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *class_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (IS_VAR != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) {
- EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name);
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX_T(opline->result.var).class_entry = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ EX_T(opline->result.var).class_entry = zend_fetch_class_by_name(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->op2.literal + 1, opline->extended_value TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, EX_T(opline->result.var).class_entry);
+ }
+ } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
+ EX_T(opline->result.var).class_entry = Z_OBJCE_P(class_name);
} else if (Z_TYPE_P(class_name) == IS_STRING) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
} else {
zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
- char *function_name_strval, *lcname;
- int function_name_strlen;
- zend_free_op free_op2;
-
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_VAR == IS_CONST) {
- if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
+ function_name = (zval*)(opline->op2.literal+1);
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (UNEXPECTED(zend_hash_quick_find(EG(function_table), Z_STRVAL_P(function_name), Z_STRLEN_P(function_name)+1, Z_HASH_P(function_name), (void **) &EX(fbc)) == FAILURE)) {
+ SAVE_OPLINE();
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
}
+ EX(object) = NULL;
+ /*CHECK_EXCEPTION();*/
+ ZEND_VM_NEXT_OPCODE();
} else {
- function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ char *function_name_strval, *lcname;
+ int function_name_strlen;
+ zend_free_op free_op2;
- if (IS_VAR != IS_CONST && IS_VAR != IS_TMP_VAR &&
- Z_TYPE_P(function_name) == IS_OBJECT &&
+ SAVE_OPLINE();
+ function_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ function_name_strval = Z_STRVAL_P(function_name);
+ function_name_strlen = Z_STRLEN_P(function_name);
+ if (function_name_strval[0] == '\\') {
+ function_name_strlen -= 1;
+ lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
+ } else {
+ lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
+ }
+ if (UNEXPECTED(zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
+ }
+ efree(lcname);
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ EX(object) = NULL;
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else if (IS_VAR != IS_CONST && IS_VAR != IS_TMP_VAR &&
+ EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
Z_OBJ_HANDLER_P(function_name, get_closure) &&
Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
if (EX(object)) {
@@ -1075,124 +1708,190 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_VAR_HANDLER(ZEND_OPCODE_H
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
- }
+ } else if (IS_VAR != IS_CONST &&
+ EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
+ zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
+ zend_class_entry *ce;
+ zval **method = NULL;
+ zval **obj = NULL;
- if (Z_TYPE_P(function_name) != IS_STRING) {
- zend_error_noreturn(E_ERROR, "Function name must be a string");
- }
- function_name_strval = Z_STRVAL_P(function_name);
- function_name_strlen = Z_STRLEN_P(function_name);
- if (function_name_strval[0] == '\\') {
+ zend_hash_index_find(Z_ARRVAL_P(function_name), 0, (void **) &obj);
+ zend_hash_index_find(Z_ARRVAL_P(function_name), 1, (void **) &method);
- function_name_strlen -= 1;
- lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
- } else {
- lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
- }
- if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
- }
- efree(lcname);
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- }
+ if (Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_OBJECT) {
+ zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
+ }
- EX(object) = NULL;
- ZEND_VM_NEXT_OPCODE();
-}
+ if (Z_TYPE_PP(method) != IS_STRING) {
+ zend_error_noreturn(E_ERROR, "Second array member is not a valid method");
+ }
+ if (Z_TYPE_PP(obj) == IS_STRING) {
+ ce = zend_fetch_class_by_name(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj), NULL, 0 TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_PP(obj));
+ }
+ EX(called_scope) = ce;
+ EX(object) = NULL;
-static int ZEND_FASTCALL ZEND_BRK_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zend_free_op free_op2;
- zend_brk_cont_element *el;
+ if (ce->get_static_method) {
+ EX(fbc) = ce->get_static_method(ce, Z_STRVAL_PP(method), Z_STRLEN_PP(method) TSRMLS_CC);
+ } else {
+ EX(fbc) = zend_std_get_static_method(ce, Z_STRVAL_PP(method), Z_STRLEN_PP(method), NULL TSRMLS_CC);
+ }
+ } else {
+ EX(object) = *obj;
+ ce = EX(called_scope) = Z_OBJCE_PP(obj);
- el = zend_brk_cont(_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num,
- EX(op_array), EX(Ts) TSRMLS_CC);
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
-}
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), Z_STRVAL_PP(method), Z_STRLEN_PP(method), NULL TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), Z_STRVAL_PP(method));
+ }
-static int ZEND_FASTCALL ZEND_CONT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zend_free_op free_op2;
- zend_brk_cont_element *el;
+ if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(object) = NULL;
+ } else {
+ if (!PZVAL_IS_REF(EX(object))) {
+ Z_ADDREF_P(EX(object)); /* For $this pointer */
+ } else {
+ zval *this_ptr;
+ ALLOC_ZVAL(this_ptr);
+ INIT_PZVAL_COPY(this_ptr, EX(object));
+ zval_copy_ctor(this_ptr);
+ EX(object) = this_ptr;
+ }
+ }
+ }
- el = zend_brk_cont(_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC), opline->op1.u.opline_num,
- EX(op_array), EX(Ts) TSRMLS_CC);
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, Z_STRVAL_PP(method));
+ }
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else {
+ zend_error_noreturn(E_ERROR, "Function name must be a string");
+ }
+ }
}
+
static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
+ USE_OPLINE
+ SAVE_OPLINE();
+ EG(exception) = NULL;
if (IS_UNUSED == IS_UNUSED) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
zval *class_name = NULL;
- if (IS_UNUSED != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) {
- EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name);
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX_T(opline->result.var).class_entry = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ EX_T(opline->result.var).class_entry = zend_fetch_class_by_name(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->op2.literal + 1, opline->extended_value TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, EX_T(opline->result.var).class_entry);
+ }
+ } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
+ EX_T(opline->result.var).class_entry = Z_OBJCE_P(class_name);
} else if (Z_TYPE_P(class_name) == IS_STRING) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
} else {
zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
+ USE_OPLINE
+ SAVE_OPLINE();
+ EG(exception) = NULL;
if (IS_CV == IS_UNUSED) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- zval *class_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *class_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- if (IS_CV != IS_CONST && Z_TYPE_P(class_name) == IS_OBJECT) {
- EX_T(opline->result.u.var).class_entry = Z_OBJCE_P(class_name);
+ if (IS_CV == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX_T(opline->result.var).class_entry = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ EX_T(opline->result.var).class_entry = zend_fetch_class_by_name(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->op2.literal + 1, opline->extended_value TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, EX_T(opline->result.var).class_entry);
+ }
+ } else if (Z_TYPE_P(class_name) == IS_OBJECT) {
+ EX_T(opline->result.var).class_entry = Z_OBJCE_P(class_name);
} else if (Z_TYPE_P(class_name) == IS_STRING) {
- EX_T(opline->result.u.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
+ EX_T(opline->result.var).class_entry = zend_fetch_class(Z_STRVAL_P(class_name), Z_STRLEN_P(class_name), opline->extended_value TSRMLS_CC);
} else {
zend_error_noreturn(E_ERROR, "Class name must be a valid object or a string");
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
- char *function_name_strval, *lcname;
- int function_name_strlen;
-
-
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_CV == IS_CONST) {
- if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant)+1, opline->extended_value, (void **) &EX(fbc)) == FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL(opline->op2.u.constant));
+ function_name = (zval*)(opline->op2.literal+1);
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (UNEXPECTED(zend_hash_quick_find(EG(function_table), Z_STRVAL_P(function_name), Z_STRLEN_P(function_name)+1, Z_HASH_P(function_name), (void **) &EX(fbc)) == FAILURE)) {
+ SAVE_OPLINE();
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", Z_STRVAL_P(opline->op2.zv));
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
}
+ EX(object) = NULL;
+ /*CHECK_EXCEPTION();*/
+ ZEND_VM_NEXT_OPCODE();
} else {
- function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ char *function_name_strval, *lcname;
+ int function_name_strlen;
+
+
+ SAVE_OPLINE();
+ function_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
+ if (EXPECTED(Z_TYPE_P(function_name) == IS_STRING)) {
+ function_name_strval = Z_STRVAL_P(function_name);
+ function_name_strlen = Z_STRLEN_P(function_name);
+ if (function_name_strval[0] == '\\') {
+ function_name_strlen -= 1;
+ lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
+ } else {
+ lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
+ }
+ if (UNEXPECTED(zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
+ }
+ efree(lcname);
- if (IS_CV != IS_CONST && IS_CV != IS_TMP_VAR &&
- Z_TYPE_P(function_name) == IS_OBJECT &&
+ EX(object) = NULL;
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else if (IS_CV != IS_CONST && IS_CV != IS_TMP_VAR &&
+ EXPECTED(Z_TYPE_P(function_name) == IS_OBJECT) &&
Z_OBJ_HANDLER_P(function_name, get_closure) &&
Z_OBJ_HANDLER_P(function_name, get_closure)(function_name, &EX(called_scope), &EX(fbc), &EX(object) TSRMLS_CC) == SUCCESS) {
if (EX(object)) {
@@ -1205,126 +1904,115 @@ static int ZEND_FASTCALL ZEND_INIT_FCALL_BY_NAME_SPEC_CV_HANDLER(ZEND_OPCODE_HA
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
- }
+ } else if (IS_CV != IS_CONST &&
+ EXPECTED(Z_TYPE_P(function_name) == IS_ARRAY) &&
+ zend_hash_num_elements(Z_ARRVAL_P(function_name)) == 2) {
+ zend_class_entry *ce;
+ zval **method = NULL;
+ zval **obj = NULL;
- if (Z_TYPE_P(function_name) != IS_STRING) {
- zend_error_noreturn(E_ERROR, "Function name must be a string");
- }
- function_name_strval = Z_STRVAL_P(function_name);
- function_name_strlen = Z_STRLEN_P(function_name);
- if (function_name_strval[0] == '\\') {
+ zend_hash_index_find(Z_ARRVAL_P(function_name), 0, (void **) &obj);
+ zend_hash_index_find(Z_ARRVAL_P(function_name), 1, (void **) &method);
- function_name_strlen -= 1;
- lcname = zend_str_tolower_dup(function_name_strval + 1, function_name_strlen);
- } else {
- lcname = zend_str_tolower_dup(function_name_strval, function_name_strlen);
- }
- if (zend_hash_find(EG(function_table), lcname, function_name_strlen+1, (void **) &EX(fbc)) == FAILURE) {
- zend_error_noreturn(E_ERROR, "Call to undefined function %s()", function_name_strval);
- }
- efree(lcname);
+ if (Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_OBJECT) {
+ zend_error_noreturn(E_ERROR, "First array member is not a valid class name or object");
+ }
- }
+ if (Z_TYPE_PP(method) != IS_STRING) {
+ zend_error_noreturn(E_ERROR, "Second array member is not a valid method");
+ }
- EX(object) = NULL;
- ZEND_VM_NEXT_OPCODE();
-}
+ if (Z_TYPE_PP(obj) == IS_STRING) {
+ ce = zend_fetch_class_by_name(Z_STRVAL_PP(obj), Z_STRLEN_PP(obj), NULL, 0 TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_PP(obj));
+ }
+ EX(called_scope) = ce;
+ EX(object) = NULL;
+ if (ce->get_static_method) {
+ EX(fbc) = ce->get_static_method(ce, Z_STRVAL_PP(method), Z_STRLEN_PP(method) TSRMLS_CC);
+ } else {
+ EX(fbc) = zend_std_get_static_method(ce, Z_STRVAL_PP(method), Z_STRLEN_PP(method), NULL TSRMLS_CC);
+ }
+ } else {
+ EX(object) = *obj;
+ ce = EX(called_scope) = Z_OBJCE_PP(obj);
-static int ZEND_FASTCALL ZEND_CATCH_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zend_class_entry *ce;
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), Z_STRVAL_PP(method), Z_STRLEN_PP(method), NULL TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), Z_STRVAL_PP(method));
+ }
- /* Check whether an exception has been thrown, if not, jump over code */
- zend_exception_restore(TSRMLS_C);
- if (EG(exception) == NULL) {
- ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
- ZEND_VM_CONTINUE(); /* CHECK_ME */
- }
- ce = Z_OBJCE_P(EG(exception));
- if (ce != EX_T(opline->op1.u.var).class_entry) {
- if (!instanceof_function(ce, EX_T(opline->op1.u.var).class_entry TSRMLS_CC)) {
- if (opline->op1.u.EA.type) {
- zend_throw_exception_internal(NULL TSRMLS_CC);
- ZEND_VM_NEXT_OPCODE();
+ if ((EX(fbc)->common.fn_flags & ZEND_ACC_STATIC) != 0) {
+ EX(object) = NULL;
+ } else {
+ if (!PZVAL_IS_REF(EX(object))) {
+ Z_ADDREF_P(EX(object)); /* For $this pointer */
+ } else {
+ zval *this_ptr;
+ ALLOC_ZVAL(this_ptr);
+ INIT_PZVAL_COPY(this_ptr, EX(object));
+ zval_copy_ctor(this_ptr);
+ EX(object) = this_ptr;
+ }
+ }
}
- ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
- ZEND_VM_CONTINUE(); /* CHECK_ME */
- }
- }
- if (!EG(active_symbol_table)) {
- if (EX(CVs)[opline->op2.u.var]) {
- zval_ptr_dtor(EX(CVs)[opline->op2.u.var]);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, Z_STRVAL_PP(method));
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else {
+ zend_error_noreturn(E_ERROR, "Function name must be a string");
}
- EX(CVs)[opline->op2.u.var] = (zval**)EX(CVs) + (EX(op_array)->last_var + opline->op2.u.var);
- *EX(CVs)[opline->op2.u.var] = EG(exception);
- } else {
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op2.u.var);
- zend_hash_quick_update(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value,
- &EG(exception), sizeof(zval *), (void**)&EX(CVs)[opline->op2.u.var]);
}
- EG(exception) = NULL;
- ZEND_VM_NEXT_OPCODE();
-}
-
-static int ZEND_FASTCALL ZEND_BRK_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
-
- zend_brk_cont_element *el;
-
- el = zend_brk_cont(_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC), opline->op1.u.opline_num,
- EX(op_array), EX(Ts) TSRMLS_CC);
-
- ZEND_VM_JMP(EX(op_array)->opcodes + el->brk);
}
-static int ZEND_FASTCALL ZEND_CONT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
-
- zend_brk_cont_element *el;
-
- el = zend_brk_cont(_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC), opline->op1.u.opline_num,
- EX(op_array), EX(Ts) TSRMLS_CC);
-
- ZEND_VM_JMP(EX(op_array)->opcodes + el->cont);
-}
static int ZEND_FASTCALL ZEND_BW_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_not_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_not_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- boolean_not_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_not_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval z_copy;
- zval *z = &opline->op1.u.constant;
+ zval *z;
+
+ SAVE_OPLINE();
+ z = opline->op1.zv;
if (IS_CONST != IS_CONST &&
- Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL) {
+ UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) &&
+ Z_OBJ_HT_P(z)->get_method != NULL) {
if (IS_CONST == IS_TMP_VAR) {
INIT_PZVAL(z);
}
@@ -1338,172 +2026,42 @@ static int ZEND_FASTCALL ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_print_variable(z);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_PRINT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG;
+ USE_OPLINE
+ ZVAL_LONG(&EX_T(opline->result.var).tmp_var, 1);
return ZEND_ECHO_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
-static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zend_free_op free_op1;
- zval *varname = &opline->op1.u.constant;
- zval **retval;
- zval tmp_varname;
- HashTable *target_symbol_table;
-
- if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
- tmp_varname = *varname;
- zval_copy_ctor(&tmp_varname);
- convert_to_string(&tmp_varname);
- varname = &tmp_varname;
- }
-
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
-
- } else {
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- ZEND_VM_NEXT_OPCODE();
- }
-*/
- if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval_ptr);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
- /* break missing intentionally */
- case BP_VAR_W: {
- zval *new_zval = &EG(uninitialized_zval);
-
- Z_ADDREF_P(new_zval);
- zend_hash_update(target_symbol_table, varname->value.str.val, varname->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval);
- }
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- }
- switch (opline->op2.u.EA.type) {
- case ZEND_FETCH_GLOBAL:
- if (IS_CONST != IS_TMP_VAR) {
-
- }
- break;
- case ZEND_FETCH_LOCAL:
-
- break;
- case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
- break;
- case ZEND_FETCH_GLOBAL_LOCK:
- if (IS_CONST == IS_VAR && !free_op1.var) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- break;
- }
- }
-
-
- if (IS_CONST != IS_CONST && varname == &tmp_varname) {
- zval_dtor(varname);
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
- }
- PZVAL_LOCK(*retval);
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_IS:
- AI_SET_PTR(EX_T(opline->result.u.var).var, *retval);
- break;
- case BP_VAR_UNSET: {
- zend_free_op free_res;
-
- EX_T(opline->result.u.var).var.ptr_ptr = retval;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- }
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
- FREE_OP_VAR_PTR(free_res);
- break;
- default:
- EX_T(opline->result.u.var).var.ptr_ptr = retval;
- break;
- }
- }
- }
- ZEND_VM_NEXT_OPCODE();
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CONST(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), EX(opline)->extended_value)?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
static int ZEND_FASTCALL ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *val = &opline->op1.u.constant;
+ zval *val;
int ret;
- if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = opline->op1.zv;
+
+ if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
ret = i_zend_is_true(val);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (!ret) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
@@ -1512,25 +2070,28 @@ static int ZEND_FASTCALL ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *val = &opline->op1.u.constant;
+ zval *val;
int ret;
- if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = opline->op1.zv;
+
+ if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
ret = i_zend_is_true(val);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (ret) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
@@ -1539,18 +2100,21 @@ static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS
static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *val = &opline->op1.u.constant;
+ zval *val;
int retval;
- if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = opline->op1.zv;
+
+ if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (EXPECTED(retval != 0)) {
@@ -1561,36 +2125,39 @@ static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG
ZEND_VM_CONTINUE(); /* CHECK_ME */
} else {
#if DEBUG_ZEND>=2
- printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp on false to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.u.opline_num]);
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
ZEND_VM_CONTINUE(); /* CHECK_ME */
}
}
static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *val = &opline->op1.u.constant;
+ zval *val;
int retval;
- if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = opline->op1.zv;
+
+ if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
if (!retval) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
ZEND_VM_NEXT_OPCODE();
@@ -1598,27 +2165,30 @@ static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR
static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *val = &opline->op1.u.constant;
+ zval *val;
int retval;
- if (IS_CONST == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = opline->op1.zv;
+
+ if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
if (retval) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
ZEND_VM_NEXT_OPCODE();
@@ -1626,14 +2196,19 @@ static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *fname = &opline->op1.u.constant;
+ zval *fname = opline->op1.zv;
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- if (zend_hash_quick_find(EG(function_table), fname->value.str.val, fname->value.str.len+1, Z_LVAL(opline->op2.u.constant), (void **) &EX(function_state).function)==FAILURE) {
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ EX(function_state).function = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else if (UNEXPECTED(zend_hash_quick_find(EG(function_table), Z_STRVAL_P(fname), Z_STRLEN_P(fname)+1, Z_HASH_P(fname), (void **) &EX(function_state).function)==FAILURE)) {
+ SAVE_OPLINE();
zend_error_noreturn(E_ERROR, "Call to undefined function %s()", fname->value.str.val);
+ } else {
+ CACHE_PTR(opline->op1.literal->cache_slot, EX(function_state).function);
}
EX(object) = NULL;
@@ -1642,94 +2217,125 @@ static int ZEND_FASTCALL ZEND_DO_FCALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
static int ZEND_FASTCALL ZEND_RETURN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *retval_ptr;
- zval **retval_ptr_ptr;
- if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) {
+ SAVE_OPLINE();
+ retval_ptr = opline->op1.zv;
+
+ if (!EG(return_value_ptr_ptr)) {
+ if (IS_CONST == IS_TMP_VAR) {
- if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
- /* Not supposed to happen, but we'll allow it */
- zend_error(E_NOTICE, "Only variable references should be returned by reference");
- goto return_by_value;
}
+ } else if (!0) { /* Not a temp var */
+ if (IS_CONST == IS_CONST ||
+ (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
+ zval *ret;
- retval_ptr_ptr = NULL;
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ zval_copy_ctor(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
+ retval_ptr == &EG(uninitialized_zval)) {
+ zval *ret;
- if (IS_CONST == IS_VAR && !retval_ptr_ptr) {
- zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
+ ALLOC_INIT_ZVAL(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else {
+ *EG(return_value_ptr_ptr) = retval_ptr;
+ Z_ADDREF_P(retval_ptr);
}
+ } else {
+ zval *ret;
- if (IS_CONST == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) {
- if (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- EX_T(opline->op1.u.var).var.fcall_returned_reference) {
- } else if (EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
- if (IS_CONST == IS_VAR && !0) {
- PZVAL_LOCK(*retval_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
- }
- zend_error(E_NOTICE, "Only variable references should be returned by reference");
- goto return_by_value;
- }
- }
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ *EG(return_value_ptr_ptr) = ret;
+ }
- if (EG(return_value_ptr_ptr)) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
- Z_ADDREF_PP(retval_ptr_ptr);
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
- (*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr);
- }
- } else {
-return_by_value:
+static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *retval_ptr;
+ zval **retval_ptr_ptr;
- retval_ptr = &opline->op1.u.constant;
- if (!EG(return_value_ptr_ptr)) {
- if (IS_CONST == IS_TMP_VAR) {
+ SAVE_OPLINE();
- }
- } else if (!0) { /* Not a temp var */
- if (IS_CONST == IS_CONST ||
- EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
- (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
+ do {
+ if (IS_CONST == IS_CONST || IS_CONST == IS_TMP_VAR) {
+ /* Not supposed to happen, but we'll allow it */
+ zend_error(E_NOTICE, "Only variable references should be returned by reference");
+
+ retval_ptr = opline->op1.zv;
+ if (!EG(return_value_ptr_ptr)) {
+ if (IS_CONST == IS_TMP_VAR) {
+
+ }
+ } else if (!0) { /* Not a temp var */
zval *ret;
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
- } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
- retval_ptr == &EG(uninitialized_zval)) {
+ } else {
zval *ret;
- ALLOC_INIT_ZVAL(ret);
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
- } else {
- *EG(return_value_ptr_ptr) = retval_ptr;
- Z_ADDREF_P(retval_ptr);
}
- } else {
- zval *ret;
+ break;
+ }
- ALLOC_ZVAL(ret);
- INIT_PZVAL_COPY(ret, retval_ptr);
- *EG(return_value_ptr_ptr) = ret;
+ retval_ptr_ptr = NULL;
+
+ if (IS_CONST == IS_VAR && UNEXPECTED(retval_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
}
- }
+
+ if (IS_CONST == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) {
+ if (opline->extended_value == ZEND_RETURNS_FUNCTION &&
+ EX_T(opline->op1.var).var.fcall_returned_reference) {
+ } else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be returned by reference");
+ if (EG(return_value_ptr_ptr)) {
+ retval_ptr = *retval_ptr_ptr;
+ *EG(return_value_ptr_ptr) = retval_ptr;
+ Z_ADDREF_P(retval_ptr);
+ }
+ break;
+ }
+ }
+
+ if (EG(return_value_ptr_ptr)) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
+ Z_ADDREF_PP(retval_ptr_ptr);
+
+ *EG(return_value_ptr_ptr) = *retval_ptr_ptr;
+ }
+ } while (0);
return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_THROW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *value;
zval *exception;
- value = &opline->op1.u.constant;
+ SAVE_OPLINE();
+ value = opline->op1.zv;
- if (IS_CONST == IS_CONST || Z_TYPE_P(value) != IS_OBJECT) {
+ if (IS_CONST == IS_CONST || UNEXPECTED(Z_TYPE_P(value) != IS_OBJECT)) {
zend_error_noreturn(E_ERROR, "Can only throw objects");
}
zend_exception_save(TSRMLS_C);
@@ -1743,22 +2349,24 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS
zend_throw_exception_object(exception TSRMLS_CC);
zend_exception_restore(TSRMLS_C);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
static int ZEND_FASTCALL ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ SAVE_OPLINE();
if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
- && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
- zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.u.opline_num);
+ && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
+ zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.opline_num);
}
{
zval *valptr;
zval *value;
- value = &opline->op1.u.constant;
+ value = opline->op1.zv;
ALLOC_ZVAL(valptr);
INIT_PZVAL_COPY(valptr, value);
@@ -1768,40 +2376,45 @@ static int ZEND_FASTCALL ZEND_SEND_VAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
zend_vm_stack_push(valptr TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ zval *retval = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
/* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(&opline->op1.u.constant);
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ ZVAL_BOOL(retval, i_zend_is_true(opline->op1.zv));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *obj = &opline->op1.u.constant;
+ zval *obj;
zend_class_entry *ce;
zend_function *clone;
zend_object_clone_obj_t clone_call;
+ SAVE_OPLINE();
+ obj = opline->op1.zv;
+
if (IS_CONST == IS_CONST ||
- (IS_CONST == IS_VAR && !obj) ||
- Z_TYPE_P(obj) != IS_OBJECT) {
+ UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT)) {
zend_error_noreturn(E_ERROR, "__clone method called on non-object");
}
ce = Z_OBJCE_P(obj);
clone = ce ? ce->clone : NULL;
clone_call = Z_OBJ_HT_P(obj)->clone_obj;
- if (!clone_call) {
+ if (UNEXPECTED(clone_call == NULL)) {
if (ce) {
zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name);
} else {
@@ -1813,42 +2426,49 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS
if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (ce != EG(scope)) {
+ if (UNEXPECTED(ce != EG(scope))) {
zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (!zend_check_protected(clone->common.scope, EG(scope))) {
+ if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
}
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- if (!EG(exception)) {
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- Z_OBJVAL_P(EX_T(opline->result.u.var).var.ptr) = clone_call(obj TSRMLS_CC);
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_OBJECT;
- Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1);
- Z_SET_ISREF_P(EX_T(opline->result.u.var).var.ptr);
- if (!RETURN_VALUE_USED(opline) || EG(exception)) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ if (EXPECTED(EG(exception) == NULL)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ Z_OBJVAL_P(retval) = clone_call(obj TSRMLS_CC);
+ Z_TYPE_P(retval) = IS_OBJECT;
+ Z_SET_REFCOUNT_P(retval, 1);
+ Z_SET_ISREF_P(retval);
+ if (!RETURN_VALUE_USED(opline) || UNEXPECTED(EG(exception) != NULL)) {
+ zval_ptr_dtor(&retval);
+ } else {
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *expr = &opline->op1.u.constant;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *expr;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+
+ SAVE_OPLINE();
+ expr = opline->op1.zv;
if (opline->extended_value != IS_STRING) {
- *result = *expr;
+ ZVAL_COPY_VALUE(result, expr);
if (!0) {
zendi_zval_copy_ctor(*result);
}
@@ -1872,12 +2492,12 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_make_printable_zval(expr, &var_copy, &use_copy);
if (use_copy) {
- *result = var_copy;
+ ZVAL_COPY_VALUE(result, &var_copy);
if (0) {
}
} else {
- *result = *expr;
+ ZVAL_COPY_VALUE(result, expr);
if (!0) {
zendi_zval_copy_ctor(*result);
}
@@ -1892,36 +2512,37 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
break;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_op_array *new_op_array=NULL;
- int return_value_used;
- zval *inc_filename = &opline->op1.u.constant;
+ zval *inc_filename;
zval tmp_inc_filename;
zend_bool failure_retval=0;
+ SAVE_OPLINE();
+ inc_filename = opline->op1.zv;
+
if (inc_filename->type!=IS_STRING) {
- tmp_inc_filename = *inc_filename;
+ ZVAL_COPY_VALUE(&tmp_inc_filename, inc_filename);
zval_copy_ctor(&tmp_inc_filename);
convert_to_string(&tmp_inc_filename);
inc_filename = &tmp_inc_filename;
}
- return_value_used = RETURN_VALUE_USED(opline);
-
- if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
- if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
+ if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
+ if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
}
} else {
- switch (Z_LVAL(opline->op2.u.constant)) {
+ switch (opline->extended_value) {
case ZEND_INCLUDE_ONCE:
case ZEND_REQUIRE_ONCE: {
zend_file_handle file_handle;
@@ -1943,14 +2564,14 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
}
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
- new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
+ new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
zend_destroy_file_handle(&file_handle TSRMLS_CC);
} else {
zend_file_handle_dtor(&file_handle TSRMLS_CC);
failure_retval=1;
}
} else {
- if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
+ if (opline->extended_value == ZEND_INCLUDE_ONCE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
@@ -1963,7 +2584,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
break;
case ZEND_INCLUDE:
case ZEND_REQUIRE:
- new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
+ new_op_array = compile_filename(opline->extended_value, inc_filename TSRMLS_CC);
break;
case ZEND_EVAL: {
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
@@ -1979,12 +2600,18 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
zval_dtor(&tmp_inc_filename);
}
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- if (new_op_array && !EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ } else if (EXPECTED(new_op_array != NULL)) {
EX(original_return_value) = EG(return_value_ptr_ptr);
- EG(return_value_ptr_ptr) = return_value_used ? EX_T(opline->result.u.var).var.ptr_ptr : NULL;
EG(active_op_array) = new_op_array;
- EX_T(opline->result.u.var).var.ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ EX_T(opline->result.var).var.ptr = NULL;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ EG(return_value_ptr_ptr) = EX_T(opline->result.var).var.ptr_ptr;
+ } else {
+ EG(return_value_ptr_ptr) = NULL;
+ }
EX(current_object) = EX(object);
@@ -1995,8 +2622,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
zend_rebuild_symbol_table(TSRMLS_C);
}
- if (zend_execute == execute) {
- EX(call_opline) = opline;
+ if (EXPECTED(zend_execute == execute)) {
ZEND_VM_ENTER();
} else {
zend_execute(new_op_array TSRMLS_CC);
@@ -2005,121 +2631,39 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER(ZEND_OPCODE_HA
EX(function_state).function = (zend_function *) EX(op_array);
EX(object) = EX(current_object);
- if (return_value_used) {
- if (!EX_T(opline->result.u.var).var.ptr) { /* there was no return statement */
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = 1;
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
- }
- }
-
EG(opline_ptr) = &EX(opline);
EG(active_op_array) = EX(op_array);
EG(return_value_ptr_ptr) = EX(original_return_value);
destroy_op_array(new_op_array TSRMLS_CC);
efree(new_op_array);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
- }
- } else {
- if (return_value_used) {
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_ZVAL(*EX_T(opline->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = failure_retval;
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
- }
- }
- ZEND_VM_NEXT_OPCODE();
-}
-
-static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zval tmp, *varname;
- HashTable *target_symbol_table;
-
+ HANDLE_EXCEPTION();
+ } else if (RETURN_VALUE_USED(opline)) {
+ if (!EX_T(opline->result.var).var.ptr) { /* there was no return statement */
+ zval *retval;
- if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
- if (EG(active_symbol_table)) {
- zend_execute_data *ex = EX(prev_execute_data);
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
-
- if (zend_hash_quick_del(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value) == SUCCESS) {
- while (ex && ex->symbol_table == EG(active_symbol_table)) {
- int i;
-
- if (ex->op_array) {
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == cv->hash_value &&
- ex->op_array->vars[i].name_len == cv->name_len &&
- !memcmp(ex->op_array->vars[i].name, cv->name, cv->name_len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
- ex = ex->prev_execute_data;
- }
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, 1);
+ INIT_PZVAL(retval);
+ EX_T(opline->result.var).var.ptr = retval;
}
- EX(CVs)[opline->op1.u.var] = NULL;
- } else if (EX(CVs)[opline->op1.u.var]) {
- zval_ptr_dtor(EX(CVs)[opline->op1.u.var]);
- EX(CVs)[opline->op1.u.var] = NULL;
}
- ZEND_VM_NEXT_OPCODE();
- }
-
- varname = &opline->op1.u.constant;
-
- if (Z_TYPE_P(varname) != IS_STRING) {
- tmp = *varname;
- zval_copy_ctor(&tmp);
- convert_to_string(&tmp);
- varname = &tmp;
- } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
- Z_ADDREF_P(varname);
- }
-
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname) TSRMLS_CC);
- } else {
- ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
- if (zend_hash_quick_del(target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value) == SUCCESS) {
- zend_execute_data *ex = execute_data;
-
- do {
- int i;
-
- if (ex->op_array) {
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == varname->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, varname->value.str.val, varname->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
- ex = ex->prev_execute_data;
- } while (ex && ex->symbol_table == target_symbol_table);
- }
- }
+ } else if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
- if (varname == &tmp) {
- zval_dtor(&tmp);
- } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
- zval_ptr_dtor(&varname);
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, failure_retval);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
-
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *array_ptr, **array_ptr_ptr;
HashTable *fe_ht;
@@ -2127,14 +2671,18 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
zend_class_entry *ce = NULL;
zend_bool is_empty = 0;
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
+ SAVE_OPLINE();
+
+ if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
+ (opline->extended_value & ZEND_FE_RESET_VARIABLE)) {
array_ptr_ptr = NULL;
if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) {
- ALLOC_INIT_ZVAL(array_ptr);
+ MAKE_STD_ZVAL(array_ptr);
+ ZVAL_NULL(array_ptr);
} else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) {
if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) {
zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class");
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
ce = Z_OBJCE_PP(array_ptr_ptr);
@@ -2154,7 +2702,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
Z_ADDREF_P(array_ptr);
}
} else {
- array_ptr = &opline->op1.u.constant;
+ array_ptr = opline->op1.zv;
if (0) { /* IS_TMP_VAR */
zval *tmp;
@@ -2190,50 +2738,35 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
if (ce && ce->get_iterator) {
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
- if (iter && !EG(exception)) {
+ if (iter && EXPECTED(EG(exception) == NULL)) {
array_ptr = zend_iterator_wrap(iter TSRMLS_CC);
} else {
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- } else {
-
- }
if (!EG(exception)) {
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name);
}
zend_throw_exception_internal(NULL TSRMLS_CC);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
}
- AI_SET_PTR(EX_T(opline->result.u.var).var, array_ptr);
- PZVAL_LOCK(array_ptr);
+ EX_T(opline->result.var).fe.ptr = array_ptr;
if (iter) {
iter->index = 0;
if (iter->funcs->rewind) {
iter->funcs->rewind(iter TSRMLS_CC);
- if (EG(exception)) {
- Z_DELREF_P(array_ptr);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array_ptr);
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- } else {
-
- }
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
}
is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS;
- if (EG(exception)) {
- Z_DELREF_P(array_ptr);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array_ptr);
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
-
- } else {
- }
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
iter->index = -1; /* will be set to 0 before using next handler */
} else if ((fe_ht = HASH_OF(array_ptr)) != NULL) {
@@ -2256,462 +2789,653 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
}
}
is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS;
- zend_hash_get_pointer(fe_ht, &EX_T(opline->result.u.var).fe.fe_pos);
+ zend_hash_get_pointer(fe_ht, &EX_T(opline->result.var).fe.fe_pos);
} else {
zend_error(E_WARNING, "Invalid argument supplied for foreach()");
is_empty = 1;
}
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
-
- } else {
-
- }
if (is_empty) {
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
} else {
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
-static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zval **value;
- zend_bool isset = 1;
-
- if (IS_CONST == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
- if (EX(CVs)[opline->op1.u.var]) {
- value = EX(CVs)[opline->op1.u.var];
- } else if (EG(active_symbol_table)) {
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
-
- if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
- isset = 0;
- }
- } else {
- isset = 0;
- }
- } else {
- HashTable *target_symbol_table;
+#if 0 || (IS_CONST != IS_UNUSED)
+ USE_OPLINE
- zval tmp, *varname = &opline->op1.u.constant;
+ SAVE_OPLINE();
+ if (IS_CONST != IS_UNUSED) {
- if (Z_TYPE_P(varname) != IS_STRING) {
- tmp = *varname;
- zval_copy_ctor(&tmp);
- convert_to_string(&tmp);
- varname = &tmp;
- }
+ zval *ptr = opline->op1.zv;
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- value = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1 TSRMLS_CC);
- if (!value) {
- isset = 0;
- }
+ if (Z_TYPE_P(ptr) == IS_LONG) {
+ EG(exit_status) = Z_LVAL_P(ptr);
} else {
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
- if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
- isset = 0;
- }
- }
-
- if (varname == &tmp) {
- zval_dtor(&tmp);
+ zend_print_variable(ptr);
}
}
-
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
- } else {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = isset;
- }
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
- } else {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
- }
- break;
- }
-
- ZEND_VM_NEXT_OPCODE();
+#endif
+ zend_bailout();
+ ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
-static int ZEND_FASTCALL ZEND_EXIT_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
-#if 0 || (IS_CONST != IS_UNUSED)
- zend_op *opline = EX(opline);
- if (IS_CONST != IS_UNUSED) {
+ USE_OPLINE
- zval *ptr = &opline->op1.u.constant;
+ zval *value;
- if (Z_TYPE_P(ptr) == IS_LONG) {
- EG(exit_status) = Z_LVAL_P(ptr);
- } else {
- zend_print_variable(ptr);
+ SAVE_OPLINE();
+ value = opline->op1.zv;
+
+ if (i_zend_is_true(value)) {
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
+ if (!0) {
+ zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
}
- }
+#if DEBUG_ZEND>=2
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- zend_bailout();
+ ZEND_VM_JMP(opline->op2.jmp_addr);
+ }
+
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL ZEND_JMP_SET_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ zval *value, *ret;
- zval *value = &opline->op1.u.constant;
+ SAVE_OPLINE();
+ value = opline->op1.zv;
if (i_zend_is_true(value)) {
- EX_T(opline->result.u.var).tmp_var = *value;
- zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
+ if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
+ Z_ADDREF_P(value);
+ EX_T(opline->result.var).var.ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ } else {
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, value);
+ EX_T(opline->result.var).var.ptr = ret;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ if (!0) {
+ zval_copy_ctor(EX_T(opline->result.var).var.ptr);
+ }
+ }
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_JMP(opline->op2.u.jmp_addr);
+ ZEND_VM_JMP(opline->op2.jmp_addr);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ zval *value;
- zval *value = &opline->op1.u.constant;
+ SAVE_OPLINE();
+ value = opline->op1.zv;
- EX_T(opline->result.u.var).tmp_var = *value;
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
if (!0) {
- zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL ZEND_TICKS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL ZEND_QM_ASSIGN_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (++EG(ticks_count)>=Z_LVAL(opline->op1.u.constant)) {
- EG(ticks_count)=0;
- if (zend_ticks_function) {
- zend_ticks_function(Z_LVAL(opline->op1.u.constant));
+ zval *value, *ret;
+
+ SAVE_OPLINE();
+ value = opline->op1.zv;
+
+ if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
+ Z_ADDREF_P(value);
+ EX_T(opline->result.var).var.ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ } else {
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, value);
+ EX_T(opline->result.var).var.ptr = ret;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ if (!0) {
+ zval_copy_ctor(EX_T(opline->result.var).var.ptr);
}
}
+
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- add_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- div_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL ZEND_FETCH_DIM_TMP_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = opline->op1.zv;
- zval *container = &opline->op1.u.constant;
+ if (IS_CONST != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
- if (Z_TYPE_P(container) != IS_ARRAY) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
}
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+
} else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_CONST == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
- zval *dim = &opline->op2.u.constant;
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_CONST != IS_TMP_VAR) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, BP_VAR_R TSRMLS_CC));
- SELECTIVE_PZVAL_LOCK(EX_T(opline->result.u.var).var.ptr, &opline->result);
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_CONST == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
}
+
+
+ if (IS_CONST != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_CONST_CONST(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_DIM_TMP_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ zval *container;
+
+ SAVE_OPLINE();
+ container = opline->op1.zv;
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ } else {
+
+ zval *value = *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
+
+ PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
+
+ }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
zend_class_entry *ce;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_CONST == IS_CONST) {
/* no function found. try a static method in class */
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
EX(called_scope) = ce;
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
- if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
+ if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
EX(called_scope) = EG(called_scope);
} else {
EX(called_scope) = ce;
}
}
- if(IS_CONST != IS_UNUSED) {
+
+ if (IS_CONST == IS_CONST &&
+ IS_CONST == IS_CONST &&
+ CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (IS_CONST != IS_CONST &&
+ IS_CONST == IS_CONST &&
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
+ /* do nothing */
+ } else if (IS_CONST != IS_UNUSED) {
char *function_name_strval = NULL;
int function_name_strlen = 0;
if (IS_CONST == IS_CONST) {
- function_name_strval = Z_STRVAL(opline->op2.u.constant);
- function_name_strlen = Z_STRLEN(opline->op2.u.constant);
+ function_name_strval = Z_STRVAL_P(opline->op2.zv);
+ function_name_strlen = Z_STRLEN_P(opline->op2.zv);
} else {
- function_name = &opline->op2.u.constant;
+ function_name = opline->op2.zv;
- if (Z_TYPE_P(function_name) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
@@ -2723,22 +3447,28 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(
if (ce->get_static_method) {
EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
} else {
- EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+ EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen, ((IS_CONST == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
}
- if (!EX(fbc)) {
+ if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
+ if (IS_CONST == IS_CONST && EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
+ if (IS_CONST == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
+ }
+ }
}
-
if (IS_CONST != IS_CONST) {
}
} else {
- if(!ce->constructor) {
+ if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
}
EX(fbc) = ce->constructor;
}
@@ -2751,18 +3481,12 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- int severity;
- char *verb;
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- severity = E_STRICT;
- verb = "should not";
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
} else {
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- severity = E_ERROR;
- verb = "cannot";
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
}
- zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
-
}
if ((EX(object) = EG(This))) {
Z_ADDREF_P(EX(object));
@@ -2770,62 +3494,61 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER(
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
+ SAVE_OPLINE();
if (IS_CONST==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- &opline->op2.u.constant TSRMLS_CC);
-
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ opline->op2.zv TSRMLS_CC);
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ SAVE_OPLINE();
if (IS_CONST == IS_UNUSED) {
- /* namespaced constant */
- if (!zend_get_constant_ex(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant), &EX_T(opline->result.u.var).tmp_var, NULL, opline->extended_value TSRMLS_CC)) {
+ zend_constant *c;
+ zval *retval;
+
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ c = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if ((c = zend_quick_get_constant(opline->op2.literal + 1, opline->extended_value TSRMLS_CC)) == NULL) {
if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
- char *actual = (char *)zend_memrchr(Z_STRVAL(opline->op2.u.constant), '\\', Z_STRLEN(opline->op2.u.constant));
+ char *actual = (char *)zend_memrchr(Z_STRVAL_P(opline->op2.zv), '\\', Z_STRLEN_P(opline->op2.zv));
if(!actual) {
- actual = Z_STRVAL(opline->op2.u.constant);
+ actual = Z_STRVAL_P(opline->op2.zv);
} else {
actual++;
}
/* non-qualified constant - allow text substitution */
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", actual, actual);
- ZVAL_STRINGL(&EX_T(opline->result.u.var).tmp_var, actual, Z_STRLEN(opline->op2.u.constant)-(actual - Z_STRVAL(opline->op2.u.constant)), 1);
+ ZVAL_STRINGL(&EX_T(opline->result.var).tmp_var, actual, Z_STRLEN_P(opline->op2.zv)-(actual - Z_STRVAL_P(opline->op2.zv)), 1);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
} else {
- zend_error_noreturn(E_ERROR, "Undefined constant '%s'",
- Z_STRVAL(opline->op2.u.constant), Z_STRVAL(opline->op2.u.constant));
+ zend_error_noreturn(E_ERROR, "Undefined constant '%s'", Z_STRVAL_P(opline->op2.zv));
}
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, c);
}
+ retval = &EX_T(opline->result.var).tmp_var;
+ ZVAL_COPY_VALUE(retval, &c->value);
+ zval_copy_ctor(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
/* class constant */
@@ -2833,16 +3556,32 @@ static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCO
zval **value;
if (IS_CONST == IS_CONST) {
-
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant));
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ value = CACHED_PTR(opline->op2.literal->cache_slot);
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(opline->op2.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
+ if ((value = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce)) != NULL) {
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
}
- if (zend_hash_find(&ce->constants_table, Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void **) &value) == SUCCESS) {
+ if (EXPECTED(zend_hash_quick_find(&ce->constants_table, Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv)+1, Z_HASH_P(opline->op2.zv), (void **) &value) == SUCCESS)) {
if (Z_TYPE_PP(value) == IS_CONSTANT_ARRAY ||
(Z_TYPE_PP(value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
zend_class_entry *old_scope = EG(scope);
@@ -2851,52 +3590,47 @@ static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_CONST_CONST_HANDLER(ZEND_OPCO
zval_update_constant(value, (void *) 1 TSRMLS_CC);
EG(scope) = old_scope;
}
- EX_T(opline->result.u.var).tmp_var = **value;
- zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
+ if (IS_CONST == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, value);
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, value);
+ }
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
} else {
- zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant));
+ zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(opline->op2.zv));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
- zval *offset=&opline->op2.u.constant;
-#if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = NULL;
- if (opline->extended_value) {
- expr_ptr_ptr=NULL;
+ if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=&opline->op1.u.constant;
- }
-#else
- expr_ptr=&opline->op1.u.constant;
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=opline->op1.zv;
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -2907,20 +3641,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_O
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_CONST != IS_UNUSED) {
+
+ zval *offset = opline->op2.zv;
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_CONST == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -2930,21 +3681,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CONST_HANDLER(ZEND_O
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_CONST == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CONST != IS_UNUSED
@@ -2954,18 +3706,170 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_H
}
}
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
+
+
+ SAVE_OPLINE();
+ if (IS_CONST == IS_CV &&
+ IS_CONST == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ varname = opline->op1.zv;
+
+ if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ } else {
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
+ }
+
+ if (IS_CONST != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
+
+ SAVE_OPLINE();
+ if (IS_CONST == IS_CV &&
+ IS_CONST == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
+ } else {
+ HashTable *target_symbol_table;
+
+ zval tmp, *varname = opline->op1.zv;
+
+ if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ }
+
+ if (IS_CONST != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *name = &opline->op1.u.constant;
- zval *val = &opline->op2.u.constant;
+ zval *name;
+ zval *val;
zend_constant c;
+ SAVE_OPLINE();
+ name = opline->op1.zv;
+ val = opline->op2.zv;
+
if ((Z_TYPE_P(val) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT || Z_TYPE_P(val) == IS_CONSTANT_ARRAY) {
- zval tmp = *val;
+ zval tmp;
zval *tmp_ptr = &tmp;
+ ZVAL_COPY_VALUE(&tmp, val);
if (Z_TYPE_P(val) == IS_CONSTANT_ARRAY) {
zval_copy_ctor(&tmp);
}
@@ -2973,11 +3877,11 @@ static int ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCOD
zval_update_constant(&tmp_ptr, NULL TSRMLS_CC);
c.value = *tmp_ptr;
} else {
- c.value = *val;
+ INIT_PZVAL_COPY(&c.value, val);
zval_copy_ctor(&c.value);
}
c.flags = CONST_CS; /* non persistent, case sensetive */
- c.name = zend_strndup(Z_STRVAL_P(name), Z_STRLEN_P(name));
+ c.name = IS_INTERNED(Z_STRVAL_P(name)) ? Z_STRVAL_P(name) : zend_strndup(Z_STRVAL_P(name), Z_STRLEN_P(name));
c.name_len = Z_STRLEN_P(name)+1;
c.module_number = PHP_USER_CONSTANT;
@@ -2985,304 +3889,337 @@ static int ZEND_FASTCALL ZEND_DECLARE_CONST_SPEC_CONST_CONST_HANDLER(ZEND_OPCOD
}
- ZEND_VM_NEXT_OPCODE();
-}
-
-static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zend_function *op_array;
-
- if (zend_hash_quick_find(EG(function_table), Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), Z_LVAL(opline->op2.u.constant), (void *) &op_array) == FAILURE ||
- op_array->type != ZEND_USER_FUNCTION) {
- zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
- }
-
- zend_create_closure(&EX_T(opline->result.u.var).tmp_var, op_array TSRMLS_CC);
-
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
zend_class_entry *ce;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_CONST == IS_CONST) {
/* no function found. try a static method in class */
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
EX(called_scope) = ce;
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
- if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
+ if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
EX(called_scope) = EG(called_scope);
} else {
EX(called_scope) = ce;
}
}
- if(IS_TMP_VAR != IS_UNUSED) {
+
+ if (IS_CONST == IS_CONST &&
+ IS_TMP_VAR == IS_CONST &&
+ CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (IS_CONST != IS_CONST &&
+ IS_TMP_VAR == IS_CONST &&
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
+ /* do nothing */
+ } else if (IS_TMP_VAR != IS_UNUSED) {
char *function_name_strval = NULL;
int function_name_strlen = 0;
zend_free_op free_op2;
if (IS_TMP_VAR == IS_CONST) {
- function_name_strval = Z_STRVAL(opline->op2.u.constant);
- function_name_strlen = Z_STRLEN(opline->op2.u.constant);
+ function_name_strval = Z_STRVAL_P(opline->op2.zv);
+ function_name_strlen = Z_STRLEN_P(opline->op2.zv);
} else {
- function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
@@ -3294,22 +4231,28 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMP_HANDLER(ZE
if (ce->get_static_method) {
EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
} else {
- EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+ EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen, ((IS_TMP_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
}
- if (!EX(fbc)) {
+ if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
+ if (IS_TMP_VAR == IS_CONST && EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
+ if (IS_CONST == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
+ }
+ }
}
-
if (IS_TMP_VAR != IS_CONST) {
zval_dtor(free_op2.var);
}
} else {
- if(!ce->constructor) {
+ if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
}
EX(fbc) = ce->constructor;
}
@@ -3322,18 +4265,12 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMP_HANDLER(ZE
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- int severity;
- char *verb;
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- severity = E_STRICT;
- verb = "should not";
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
} else {
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- severity = E_ERROR;
- verb = "cannot";
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
}
- zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
-
}
if ((EX(object) = EG(This))) {
Z_ADDREF_P(EX(object));
@@ -3341,77 +4278,53 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_TMP_HANDLER(ZE
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op2;
+ SAVE_OPLINE();
if (IS_CONST==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
-
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op2;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+
zval *expr_ptr;
- zval *offset=_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-#if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = NULL;
- if (opline->extended_value) {
- expr_ptr_ptr=NULL;
+ if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=&opline->op1.u.constant;
- }
-#else
- expr_ptr=&opline->op1.u.constant;
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=opline->op1.zv;
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -3422,20 +4335,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPC
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_TMP_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -3445,21 +4375,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPC
}
zval_dtor(free_op2.var);
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_CONST == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CONST != IS_UNUSED
@@ -3471,284 +4402,487 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HAN
static int ZEND_FASTCALL ZEND_ADD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = opline->op1.zv;
+
+ if (IS_CONST != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_CONST == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_CONST != IS_TMP_VAR) {
+
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_CONST == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
+ }
+
+
+ if (IS_CONST != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_CONST_VAR(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
zend_class_entry *ce;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_CONST == IS_CONST) {
/* no function found. try a static method in class */
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
EX(called_scope) = ce;
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
- if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
+ if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
EX(called_scope) = EG(called_scope);
} else {
EX(called_scope) = ce;
}
}
- if(IS_VAR != IS_UNUSED) {
+
+ if (IS_CONST == IS_CONST &&
+ IS_VAR == IS_CONST &&
+ CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (IS_CONST != IS_CONST &&
+ IS_VAR == IS_CONST &&
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
+ /* do nothing */
+ } else if (IS_VAR != IS_UNUSED) {
char *function_name_strval = NULL;
int function_name_strlen = 0;
zend_free_op free_op2;
if (IS_VAR == IS_CONST) {
- function_name_strval = Z_STRVAL(opline->op2.u.constant);
- function_name_strlen = Z_STRLEN(opline->op2.u.constant);
+ function_name_strval = Z_STRVAL_P(opline->op2.zv);
+ function_name_strlen = Z_STRLEN_P(opline->op2.zv);
} else {
- function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
@@ -3760,22 +4894,28 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_VAR_HANDLER(ZE
if (ce->get_static_method) {
EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
} else {
- EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+ EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen, ((IS_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
}
- if (!EX(fbc)) {
+ if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
+ if (IS_VAR == IS_CONST && EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
+ if (IS_CONST == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
+ }
+ }
}
-
if (IS_VAR != IS_CONST) {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
} else {
- if(!ce->constructor) {
+ if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
}
EX(fbc) = ce->constructor;
}
@@ -3788,18 +4928,12 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_VAR_HANDLER(ZE
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- int severity;
- char *verb;
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- severity = E_STRICT;
- verb = "should not";
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
} else {
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- severity = E_ERROR;
- verb = "cannot";
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
}
- zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
-
}
if ((EX(object) = EG(This))) {
Z_ADDREF_P(EX(object));
@@ -3807,77 +4941,53 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_VAR_HANDLER(ZE
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op2;
+ SAVE_OPLINE();
if (IS_CONST==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
-
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op2;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+
zval *expr_ptr;
- zval *offset=_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-#if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = NULL;
- if (opline->extended_value) {
- expr_ptr_ptr=NULL;
+ if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=&opline->op1.u.constant;
- }
-#else
- expr_ptr=&opline->op1.u.constant;
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=opline->op1.zv;
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -3888,20 +4998,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPC
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -3911,21 +5038,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_VAR_HANDLER(ZEND_OPC
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_CONST == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CONST != IS_UNUSED
@@ -3935,42 +5063,360 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HAN
}
}
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
+
+
+ SAVE_OPLINE();
+ if (IS_CONST == IS_CV &&
+ IS_VAR == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ varname = opline->op1.zv;
+
+ if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ } else {
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
+ }
+
+ if (IS_CONST != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
+
+ SAVE_OPLINE();
+ if (IS_CONST == IS_CV &&
+ IS_VAR == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
+ } else {
+ HashTable *target_symbol_table;
+
+ zval tmp, *varname = opline->op1.zv;
+
+ if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ }
+
+ if (IS_CONST != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST_UNUSED(int type, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = opline->op1.zv;
+
+ if (IS_CONST != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_CONST == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_CONST != IS_TMP_VAR) {
+
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_CONST == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
+ }
+
+
+ if (IS_CONST != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CONST_UNUSED(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
zend_class_entry *ce;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_CONST == IS_CONST) {
/* no function found. try a static method in class */
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
EX(called_scope) = ce;
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
- if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
+ if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
EX(called_scope) = EG(called_scope);
} else {
EX(called_scope) = ce;
}
}
- if(IS_UNUSED != IS_UNUSED) {
+
+ if (IS_CONST == IS_CONST &&
+ IS_UNUSED == IS_CONST &&
+ CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (IS_CONST != IS_CONST &&
+ IS_UNUSED == IS_CONST &&
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
+ /* do nothing */
+ } else if (IS_UNUSED != IS_UNUSED) {
char *function_name_strval = NULL;
int function_name_strlen = 0;
if (IS_UNUSED == IS_CONST) {
- function_name_strval = Z_STRVAL(opline->op2.u.constant);
- function_name_strlen = Z_STRLEN(opline->op2.u.constant);
+ function_name_strval = Z_STRVAL_P(opline->op2.zv);
+ function_name_strlen = Z_STRLEN_P(opline->op2.zv);
} else {
function_name = NULL;
- if (Z_TYPE_P(function_name) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
@@ -3982,22 +5428,28 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER
if (ce->get_static_method) {
EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
} else {
- EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+ EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen, ((IS_UNUSED == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
}
- if (!EX(fbc)) {
+ if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
+ if (IS_UNUSED == IS_CONST && EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
+ if (IS_CONST == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
+ }
+ }
}
-
if (IS_UNUSED != IS_CONST) {
}
} else {
- if(!ce->constructor) {
+ if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
}
EX(fbc) = ce->constructor;
}
@@ -4010,18 +5462,12 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- int severity;
- char *verb;
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- severity = E_STRICT;
- verb = "should not";
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
} else {
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- severity = E_ERROR;
- verb = "cannot";
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
}
- zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
-
}
if ((EX(object) = EG(This))) {
Z_ADDREF_P(EX(object));
@@ -4029,45 +5475,35 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_UNUSED_HANDLER
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
- zval *offset=NULL;
-#if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = NULL;
- if (opline->extended_value) {
- expr_ptr_ptr=NULL;
+ if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=&opline->op1.u.constant;
- }
-#else
- expr_ptr=&opline->op1.u.constant;
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=opline->op1.zv;
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -4078,20 +5514,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_UNUSED != IS_UNUSED) {
+
+ zval *offset = NULL;
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_UNUSED == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -4101,21 +5554,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_UNUSED_HANDLER(ZEND_
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_CONST == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CONST != IS_UNUSED
@@ -4125,286 +5579,498 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_
}
}
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
+
+
+ SAVE_OPLINE();
+ if (IS_CONST == IS_CV &&
+ IS_UNUSED == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ varname = opline->op1.zv;
+
+ if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ } else {
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
+ }
+
+ if (IS_CONST != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
+
+ SAVE_OPLINE();
+ if (IS_CONST == IS_CV &&
+ IS_UNUSED == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
+ } else {
+ HashTable *target_symbol_table;
+
+ zval tmp, *varname = opline->op1.zv;
+
+ if (IS_CONST != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_CONST == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ }
+
+ if (IS_CONST != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_function *op_array;
+
+ SAVE_OPLINE();
+
+ if (UNEXPECTED(zend_hash_quick_find(EG(function_table), Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), Z_HASH_P(opline->op1.zv), (void *) &op_array) == FAILURE) ||
+ UNEXPECTED(op_array->type != ZEND_USER_FUNCTION)) {
+ zend_error_noreturn(E_ERROR, "Base lambda function for closure not found");
+ }
+
+ zend_create_closure(&EX_T(opline->result.var).tmp_var, op_array, EG(scope), EG(This) TSRMLS_CC);
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- add_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- div_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
zend_class_entry *ce;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_CONST == IS_CONST) {
/* no function found. try a static method in class */
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
EX(called_scope) = ce;
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
- if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
+ if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
EX(called_scope) = EG(called_scope);
} else {
EX(called_scope) = ce;
}
}
- if(IS_CV != IS_UNUSED) {
+
+ if (IS_CONST == IS_CONST &&
+ IS_CV == IS_CONST &&
+ CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (IS_CONST != IS_CONST &&
+ IS_CV == IS_CONST &&
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
+ /* do nothing */
+ } else if (IS_CV != IS_UNUSED) {
char *function_name_strval = NULL;
int function_name_strlen = 0;
if (IS_CV == IS_CONST) {
- function_name_strval = Z_STRVAL(opline->op2.u.constant);
- function_name_strlen = Z_STRLEN(opline->op2.u.constant);
+ function_name_strval = Z_STRVAL_P(opline->op2.zv);
+ function_name_strlen = Z_STRLEN_P(opline->op2.zv);
} else {
- function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ function_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- if (Z_TYPE_P(function_name) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
@@ -4416,22 +6082,28 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEN
if (ce->get_static_method) {
EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
} else {
- EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+ EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen, ((IS_CV == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
}
- if (!EX(fbc)) {
+ if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
+ if (IS_CV == IS_CONST && EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
+ if (IS_CONST == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
+ }
+ }
}
-
if (IS_CV != IS_CONST) {
}
} else {
- if(!ce->constructor) {
+ if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
}
EX(fbc) = ce->constructor;
}
@@ -4444,18 +6116,12 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEN
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- int severity;
- char *verb;
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- severity = E_STRICT;
- verb = "should not";
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
} else {
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- severity = E_ERROR;
- verb = "cannot";
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
}
- zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
-
}
if ((EX(object) = EG(This))) {
Z_ADDREF_P(EX(object));
@@ -4463,76 +6129,111 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CV_HANDLER(ZEN
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL ZEND_CATCH_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
+ zend_class_entry *ce, *catch_ce;
+ zval *exception;
+
+ SAVE_OPLINE();
+ /* Check whether an exception has been thrown, if not, jump over code */
+ zend_exception_restore(TSRMLS_C);
+ if (EG(exception) == NULL) {
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
+ ZEND_VM_CONTINUE(); /* CHECK_ME */
+ }
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ catch_ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ catch_ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC);
+ CACHE_PTR(opline->op1.literal->cache_slot, catch_ce);
+ }
+ ce = Z_OBJCE_P(EG(exception));
+#ifdef HAVE_DTRACE
+ if (DTRACE_EXCEPTION_CAUGHT_ENABLED()) {
+ DTRACE_EXCEPTION_CAUGHT(ce->name);
+ }
+#endif /* HAVE_DTRACE */
- if (IS_CONST==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
+ if (ce != catch_ce) {
+ if (!instanceof_function(ce, catch_ce TSRMLS_CC)) {
+ if (opline->result.num) {
+ zend_throw_exception_internal(NULL TSRMLS_CC);
+ HANDLE_EXCEPTION();
+ }
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->extended_value]);
+ ZEND_VM_CONTINUE(); /* CHECK_ME */
}
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- &opline->op1.u.constant,
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
+ exception = EG(exception);
+ if (!EG(active_symbol_table)) {
+ if (EX_CV(opline->op2.var)) {
+ zval_ptr_dtor(EX_CV(opline->op2.var));
+ }
+ EX_CV(opline->op2.var) = (zval**)EX_CVs() + (EX(op_array)->last_var + opline->op2.var);
+ *EX_CV(opline->op2.var) = EG(exception);
+ } else {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op2.var);
+ zend_hash_quick_update(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value,
+ &EG(exception), sizeof(zval *), (void**)&EX_CV(opline->op2.var));
+ }
+ if (UNEXPECTED(EG(exception) != exception)) {
+ Z_ADDREF_P(EG(exception));
+ HANDLE_EXCEPTION();
+ } else {
+ EG(exception) = NULL;
+ ZEND_VM_NEXT_OPCODE();
+ }
+}
+
+static int ZEND_FASTCALL ZEND_CASE_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
+
+ SAVE_OPLINE();
+ if (IS_CONST==IS_VAR) {
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ opline->op1.zv,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
- zval *offset=_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
-#if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = NULL;
- if (opline->extended_value) {
- expr_ptr_ptr=NULL;
+ if (IS_CONST == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=&opline->op1.u.constant;
- }
-#else
- expr_ptr=&opline->op1.u.constant;
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=opline->op1.zv;
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_CONST == IS_VAR || IS_CONST == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_CONST == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -4543,20 +6244,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCO
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_CV != IS_UNUSED) {
+
+ zval *offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_CV == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -4566,21 +6284,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HANDLER(ZEND_OPCO
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_CONST == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CONST != IS_UNUSED
@@ -4592,35 +6311,43 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HAND
static int ZEND_FASTCALL ZEND_BW_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_not_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_not_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- boolean_not_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_not_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval z_copy;
- zval *z = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *z;
+
+ SAVE_OPLINE();
+ z = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (IS_TMP_VAR != IS_CONST &&
- Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL) {
+ UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) &&
+ Z_OBJ_HT_P(z)->get_method != NULL) {
if (IS_TMP_VAR == IS_TMP_VAR) {
INIT_PZVAL(z);
}
@@ -4635,172 +6362,42 @@ static int ZEND_FASTCALL ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_PRINT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG;
+ USE_OPLINE
+ ZVAL_LONG(&EX_T(opline->result.var).tmp_var, 1);
return ZEND_ECHO_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
-static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP(int type, ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zend_free_op free_op1;
- zval *varname = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval **retval;
- zval tmp_varname;
- HashTable *target_symbol_table;
-
- if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
- tmp_varname = *varname;
- zval_copy_ctor(&tmp_varname);
- convert_to_string(&tmp_varname);
- varname = &tmp_varname;
- }
-
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
- zval_dtor(free_op1.var);
- } else {
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- ZEND_VM_NEXT_OPCODE();
- }
-*/
- if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval_ptr);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
- /* break missing intentionally */
- case BP_VAR_W: {
- zval *new_zval = &EG(uninitialized_zval);
-
- Z_ADDREF_P(new_zval);
- zend_hash_update(target_symbol_table, varname->value.str.val, varname->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval);
- }
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- }
- switch (opline->op2.u.EA.type) {
- case ZEND_FETCH_GLOBAL:
- if (IS_TMP_VAR != IS_TMP_VAR) {
- zval_dtor(free_op1.var);
- }
- break;
- case ZEND_FETCH_LOCAL:
- zval_dtor(free_op1.var);
- break;
- case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
- break;
- case ZEND_FETCH_GLOBAL_LOCK:
- if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- break;
- }
- }
-
-
- if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
- zval_dtor(varname);
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
- }
- PZVAL_LOCK(*retval);
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_IS:
- AI_SET_PTR(EX_T(opline->result.u.var).var, *retval);
- break;
- case BP_VAR_UNSET: {
- zend_free_op free_res;
-
- EX_T(opline->result.u.var).var.ptr_ptr = retval;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- }
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
- FREE_OP_VAR_PTR(free_res);
- break;
- default:
- EX_T(opline->result.u.var).var.ptr_ptr = retval;
- break;
- }
- }
- }
- ZEND_VM_NEXT_OPCODE();
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_TMP(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), EX(opline)->extended_value)?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
static int ZEND_FASTCALL ZEND_JMPZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *val;
int ret;
- if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
ret = i_zend_is_true(val);
zval_dtor(free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (!ret) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
@@ -4809,25 +6406,28 @@ static int ZEND_FASTCALL ZEND_JMPZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *val;
int ret;
- if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
ret = i_zend_is_true(val);
zval_dtor(free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (ret) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
@@ -4836,18 +6436,21 @@ static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *val;
int retval;
- if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
zval_dtor(free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (EXPECTED(retval != 0)) {
@@ -4858,36 +6461,39 @@ static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
ZEND_VM_CONTINUE(); /* CHECK_ME */
} else {
#if DEBUG_ZEND>=2
- printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp on false to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.u.opline_num]);
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
ZEND_VM_CONTINUE(); /* CHECK_ME */
}
}
static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *val;
int retval;
- if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
zval_dtor(free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
if (!retval) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
ZEND_VM_NEXT_OPCODE();
@@ -4895,27 +6501,30 @@ static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS
static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *val;
int retval;
- if (IS_TMP_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
zval_dtor(free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
if (retval) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
ZEND_VM_NEXT_OPCODE();
@@ -4923,40 +6532,114 @@ static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
static int ZEND_FASTCALL ZEND_FREE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zendi_zval_dtor(EX_T(EX(opline)->op1.u.var).tmp_var);
+ USE_OPLINE
+
+ SAVE_OPLINE();
+ if (IS_TMP_VAR == IS_TMP_VAR) {
+ zendi_zval_dtor(EX_T(opline->op1.var).tmp_var);
+ } else {
+ zval_ptr_dtor(&EX_T(opline->op1.var).var.ptr);
+ }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ zval *retval_ptr;
+ zend_free_op free_op1;
+
+ SAVE_OPLINE();
+ retval_ptr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (!EG(return_value_ptr_ptr)) {
+ if (IS_TMP_VAR == IS_TMP_VAR) {
+ zval_dtor(free_op1.var);
+ }
+ } else if (!1) { /* Not a temp var */
+ if (IS_TMP_VAR == IS_CONST ||
+ (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ zval_copy_ctor(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
+ retval_ptr == &EG(uninitialized_zval)) {
+ zval *ret;
+
+ ALLOC_INIT_ZVAL(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else {
+ *EG(return_value_ptr_ptr) = retval_ptr;
+ Z_ADDREF_P(retval_ptr);
+ }
+ } else {
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ *EG(return_value_ptr_ptr) = ret;
+ }
+
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
zval *retval_ptr;
zval **retval_ptr_ptr;
zend_free_op free_op1;
- if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) {
+ SAVE_OPLINE();
+ do {
if (IS_TMP_VAR == IS_CONST || IS_TMP_VAR == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
- goto return_by_value;
+
+ retval_ptr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (!EG(return_value_ptr_ptr)) {
+ if (IS_TMP_VAR == IS_TMP_VAR) {
+ zval_dtor(free_op1.var);
+ }
+ } else if (!1) { /* Not a temp var */
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ zval_copy_ctor(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else {
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ *EG(return_value_ptr_ptr) = ret;
+ }
+ break;
}
retval_ptr_ptr = NULL;
- if (IS_TMP_VAR == IS_VAR && !retval_ptr_ptr) {
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(retval_ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
}
if (IS_TMP_VAR == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) {
if (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- EX_T(opline->op1.u.var).var.fcall_returned_reference) {
- } else if (EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
- if (IS_TMP_VAR == IS_VAR && !1) {
- PZVAL_LOCK(*retval_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
- }
+ EX_T(opline->op1.var).var.fcall_returned_reference) {
+ } else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
zend_error(E_NOTICE, "Only variable references should be returned by reference");
- goto return_by_value;
+ if (EG(return_value_ptr_ptr)) {
+ retval_ptr = *retval_ptr_ptr;
+ *EG(return_value_ptr_ptr) = retval_ptr;
+ Z_ADDREF_P(retval_ptr);
+ }
+ break;
}
}
@@ -4964,59 +6647,24 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
Z_ADDREF_PP(retval_ptr_ptr);
- (*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr);
+ *EG(return_value_ptr_ptr) = *retval_ptr_ptr;
}
- } else {
-return_by_value:
-
- retval_ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-
- if (!EG(return_value_ptr_ptr)) {
- if (IS_TMP_VAR == IS_TMP_VAR) {
- zval_dtor(free_op1.var);
- }
- } else if (!1) { /* Not a temp var */
- if (IS_TMP_VAR == IS_CONST ||
- EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
- (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
- zval *ret;
-
- ALLOC_ZVAL(ret);
- INIT_PZVAL_COPY(ret, retval_ptr);
- zval_copy_ctor(ret);
- *EG(return_value_ptr_ptr) = ret;
- } else if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
- retval_ptr == &EG(uninitialized_zval)) {
- zval *ret;
-
- ALLOC_INIT_ZVAL(ret);
- *EG(return_value_ptr_ptr) = ret;
- } else {
- *EG(return_value_ptr_ptr) = retval_ptr;
- Z_ADDREF_P(retval_ptr);
- }
- } else {
- zval *ret;
-
- ALLOC_ZVAL(ret);
- INIT_PZVAL_COPY(ret, retval_ptr);
- *EG(return_value_ptr_ptr) = ret;
- }
- }
+ } while (0);
return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *value;
zval *exception;
zend_free_op free_op1;
- value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ SAVE_OPLINE();
+ value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_TMP_VAR == IS_CONST || Z_TYPE_P(value) != IS_OBJECT) {
+ if (IS_TMP_VAR == IS_CONST || UNEXPECTED(Z_TYPE_P(value) != IS_OBJECT)) {
zend_error_noreturn(E_ERROR, "Can only throw objects");
}
zend_exception_save(TSRMLS_C);
@@ -5030,22 +6678,24 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_throw_exception_object(exception TSRMLS_CC);
zend_exception_restore(TSRMLS_C);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
static int ZEND_FASTCALL ZEND_SEND_VAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ SAVE_OPLINE();
if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
- && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
- zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.u.opline_num);
+ && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
+ zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.opline_num);
}
{
zval *valptr;
zval *value;
zend_free_op free_op1;
- value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
ALLOC_ZVAL(valptr);
INIT_PZVAL_COPY(valptr, value);
@@ -5055,41 +6705,46 @@ static int ZEND_FASTCALL ZEND_SEND_VAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
zend_vm_stack_push(valptr TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
+ zval *retval = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
/* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC));
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC)));
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CLONE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *obj = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *obj;
zend_class_entry *ce;
zend_function *clone;
zend_object_clone_obj_t clone_call;
+ SAVE_OPLINE();
+ obj = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
if (IS_TMP_VAR == IS_CONST ||
- (IS_TMP_VAR == IS_VAR && !obj) ||
- Z_TYPE_P(obj) != IS_OBJECT) {
+ UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT)) {
zend_error_noreturn(E_ERROR, "__clone method called on non-object");
}
ce = Z_OBJCE_P(obj);
clone = ce ? ce->clone : NULL;
clone_call = Z_OBJ_HT_P(obj)->clone_obj;
- if (!clone_call) {
+ if (UNEXPECTED(clone_call == NULL)) {
if (ce) {
zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name);
} else {
@@ -5101,42 +6756,49 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (ce != EG(scope)) {
+ if (UNEXPECTED(ce != EG(scope))) {
zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (!zend_check_protected(clone->common.scope, EG(scope))) {
+ if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
}
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- if (!EG(exception)) {
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- Z_OBJVAL_P(EX_T(opline->result.u.var).var.ptr) = clone_call(obj TSRMLS_CC);
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_OBJECT;
- Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1);
- Z_SET_ISREF_P(EX_T(opline->result.u.var).var.ptr);
- if (!RETURN_VALUE_USED(opline) || EG(exception)) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ if (EXPECTED(EG(exception) == NULL)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ Z_OBJVAL_P(retval) = clone_call(obj TSRMLS_CC);
+ Z_TYPE_P(retval) = IS_OBJECT;
+ Z_SET_REFCOUNT_P(retval, 1);
+ Z_SET_ISREF_P(retval);
+ if (!RETURN_VALUE_USED(opline) || UNEXPECTED(EG(exception) != NULL)) {
+ zval_ptr_dtor(&retval);
+ } else {
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *expr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *expr;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+
+ SAVE_OPLINE();
+ expr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (opline->extended_value != IS_STRING) {
- *result = *expr;
+ ZVAL_COPY_VALUE(result, expr);
if (!1) {
zendi_zval_copy_ctor(*result);
}
@@ -5160,12 +6822,12 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_make_printable_zval(expr, &var_copy, &use_copy);
if (use_copy) {
- *result = var_copy;
+ ZVAL_COPY_VALUE(result, &var_copy);
if (1) {
zval_dtor(free_op1.var);
}
} else {
- *result = *expr;
+ ZVAL_COPY_VALUE(result, expr);
if (!1) {
zendi_zval_copy_ctor(*result);
}
@@ -5180,36 +6842,37 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
break;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_op_array *new_op_array=NULL;
- int return_value_used;
zend_free_op free_op1;
- zval *inc_filename = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *inc_filename;
zval tmp_inc_filename;
zend_bool failure_retval=0;
+ SAVE_OPLINE();
+ inc_filename = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
if (inc_filename->type!=IS_STRING) {
- tmp_inc_filename = *inc_filename;
+ ZVAL_COPY_VALUE(&tmp_inc_filename, inc_filename);
zval_copy_ctor(&tmp_inc_filename);
convert_to_string(&tmp_inc_filename);
inc_filename = &tmp_inc_filename;
}
- return_value_used = RETURN_VALUE_USED(opline);
-
- if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
- if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
+ if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
+ if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
}
} else {
- switch (Z_LVAL(opline->op2.u.constant)) {
+ switch (opline->extended_value) {
case ZEND_INCLUDE_ONCE:
case ZEND_REQUIRE_ONCE: {
zend_file_handle file_handle;
@@ -5231,14 +6894,14 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
}
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
- new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
+ new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
zend_destroy_file_handle(&file_handle TSRMLS_CC);
} else {
zend_file_handle_dtor(&file_handle TSRMLS_CC);
failure_retval=1;
}
} else {
- if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
+ if (opline->extended_value == ZEND_INCLUDE_ONCE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
@@ -5251,7 +6914,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
break;
case ZEND_INCLUDE:
case ZEND_REQUIRE:
- new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
+ new_op_array = compile_filename(opline->extended_value, inc_filename TSRMLS_CC);
break;
case ZEND_EVAL: {
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
@@ -5267,12 +6930,18 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
zval_dtor(&tmp_inc_filename);
}
zval_dtor(free_op1.var);
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- if (new_op_array && !EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ } else if (EXPECTED(new_op_array != NULL)) {
EX(original_return_value) = EG(return_value_ptr_ptr);
- EG(return_value_ptr_ptr) = return_value_used ? EX_T(opline->result.u.var).var.ptr_ptr : NULL;
EG(active_op_array) = new_op_array;
- EX_T(opline->result.u.var).var.ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ EX_T(opline->result.var).var.ptr = NULL;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ EG(return_value_ptr_ptr) = EX_T(opline->result.var).var.ptr_ptr;
+ } else {
+ EG(return_value_ptr_ptr) = NULL;
+ }
EX(current_object) = EX(object);
@@ -5283,8 +6952,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
zend_rebuild_symbol_table(TSRMLS_C);
}
- if (zend_execute == execute) {
- EX(call_opline) = opline;
+ if (EXPECTED(zend_execute == execute)) {
ZEND_VM_ENTER();
} else {
zend_execute(new_op_array TSRMLS_CC);
@@ -5293,121 +6961,39 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER(ZEND_OPCODE_HAND
EX(function_state).function = (zend_function *) EX(op_array);
EX(object) = EX(current_object);
- if (return_value_used) {
- if (!EX_T(opline->result.u.var).var.ptr) { /* there was no return statement */
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = 1;
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
- }
- }
-
EG(opline_ptr) = &EX(opline);
EG(active_op_array) = EX(op_array);
EG(return_value_ptr_ptr) = EX(original_return_value);
destroy_op_array(new_op_array TSRMLS_CC);
efree(new_op_array);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
- }
- } else {
- if (return_value_used) {
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_ZVAL(*EX_T(opline->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = failure_retval;
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
- }
- }
- ZEND_VM_NEXT_OPCODE();
-}
+ HANDLE_EXCEPTION();
+ } else if (RETURN_VALUE_USED(opline)) {
+ if (!EX_T(opline->result.var).var.ptr) { /* there was no return statement */
+ zval *retval;
-static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zval tmp, *varname;
- HashTable *target_symbol_table;
- zend_free_op free_op1;
-
- if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
- if (EG(active_symbol_table)) {
- zend_execute_data *ex = EX(prev_execute_data);
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
-
- if (zend_hash_quick_del(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value) == SUCCESS) {
- while (ex && ex->symbol_table == EG(active_symbol_table)) {
- int i;
-
- if (ex->op_array) {
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == cv->hash_value &&
- ex->op_array->vars[i].name_len == cv->name_len &&
- !memcmp(ex->op_array->vars[i].name, cv->name, cv->name_len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
- ex = ex->prev_execute_data;
- }
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, 1);
+ INIT_PZVAL(retval);
+ EX_T(opline->result.var).var.ptr = retval;
}
- EX(CVs)[opline->op1.u.var] = NULL;
- } else if (EX(CVs)[opline->op1.u.var]) {
- zval_ptr_dtor(EX(CVs)[opline->op1.u.var]);
- EX(CVs)[opline->op1.u.var] = NULL;
}
- ZEND_VM_NEXT_OPCODE();
- }
-
- varname = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-
- if (Z_TYPE_P(varname) != IS_STRING) {
- tmp = *varname;
- zval_copy_ctor(&tmp);
- convert_to_string(&tmp);
- varname = &tmp;
- } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
- Z_ADDREF_P(varname);
- }
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname) TSRMLS_CC);
- } else {
- ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
- if (zend_hash_quick_del(target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value) == SUCCESS) {
- zend_execute_data *ex = execute_data;
-
- do {
- int i;
-
- if (ex->op_array) {
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == varname->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, varname->value.str.val, varname->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
- ex = ex->prev_execute_data;
- } while (ex && ex->symbol_table == target_symbol_table);
- }
- }
+ } else if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
- if (varname == &tmp) {
- zval_dtor(&tmp);
- } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
- zval_ptr_dtor(&varname);
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, failure_retval);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- zval_dtor(free_op1.var);
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval *array_ptr, **array_ptr_ptr;
HashTable *fe_ht;
@@ -5415,14 +7001,18 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
zend_class_entry *ce = NULL;
zend_bool is_empty = 0;
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
+ SAVE_OPLINE();
+
+ if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
+ (opline->extended_value & ZEND_FE_RESET_VARIABLE)) {
array_ptr_ptr = NULL;
if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) {
- ALLOC_INIT_ZVAL(array_ptr);
+ MAKE_STD_ZVAL(array_ptr);
+ ZVAL_NULL(array_ptr);
} else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) {
if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) {
zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class");
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
ce = Z_OBJCE_PP(array_ptr_ptr);
@@ -5442,7 +7032,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
Z_ADDREF_P(array_ptr);
}
} else {
- array_ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ array_ptr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (1) { /* IS_TMP_VAR */
zval *tmp;
@@ -5478,50 +7068,35 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
if (ce && ce->get_iterator) {
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
- if (iter && !EG(exception)) {
+ if (iter && EXPECTED(EG(exception) == NULL)) {
array_ptr = zend_iterator_wrap(iter TSRMLS_CC);
} else {
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- } else {
-
- }
if (!EG(exception)) {
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name);
}
zend_throw_exception_internal(NULL TSRMLS_CC);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
}
- AI_SET_PTR(EX_T(opline->result.u.var).var, array_ptr);
- PZVAL_LOCK(array_ptr);
+ EX_T(opline->result.var).fe.ptr = array_ptr;
if (iter) {
iter->index = 0;
if (iter->funcs->rewind) {
iter->funcs->rewind(iter TSRMLS_CC);
- if (EG(exception)) {
- Z_DELREF_P(array_ptr);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array_ptr);
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
-
- } else {
- }
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
}
is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS;
- if (EG(exception)) {
- Z_DELREF_P(array_ptr);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array_ptr);
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
-
- } else {
- }
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
iter->index = -1; /* will be set to 0 before using next handler */
} else if ((fe_ht = HASH_OF(array_ptr)) != NULL) {
@@ -5544,101 +7119,29 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
}
}
is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS;
- zend_hash_get_pointer(fe_ht, &EX_T(opline->result.u.var).fe.fe_pos);
+ zend_hash_get_pointer(fe_ht, &EX_T(opline->result.var).fe.fe_pos);
} else {
zend_error(E_WARNING, "Invalid argument supplied for foreach()");
is_empty = 1;
}
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
-
- } else {
-
- }
if (is_empty) {
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
} else {
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
-static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zval **value;
- zend_bool isset = 1;
-
- if (IS_TMP_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
- if (EX(CVs)[opline->op1.u.var]) {
- value = EX(CVs)[opline->op1.u.var];
- } else if (EG(active_symbol_table)) {
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
-
- if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
- isset = 0;
- }
- } else {
- isset = 0;
- }
- } else {
- HashTable *target_symbol_table;
- zend_free_op free_op1;
- zval tmp, *varname = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-
- if (Z_TYPE_P(varname) != IS_STRING) {
- tmp = *varname;
- zval_copy_ctor(&tmp);
- convert_to_string(&tmp);
- varname = &tmp;
- }
-
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- value = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1 TSRMLS_CC);
- if (!value) {
- isset = 0;
- }
- } else {
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
- if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
- isset = 0;
- }
- }
-
- if (varname == &tmp) {
- zval_dtor(&tmp);
- }
- zval_dtor(free_op1.var);
- }
-
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
- } else {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = isset;
- }
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
- } else {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
- }
- break;
- }
-
- ZEND_VM_NEXT_OPCODE();
-}
-
static int ZEND_FASTCALL ZEND_EXIT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_TMP_VAR != IS_UNUSED)
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ SAVE_OPLINE();
if (IS_TMP_VAR != IS_UNUSED) {
zend_free_op free_op1;
- zval *ptr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *ptr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (Z_TYPE_P(ptr) == IS_LONG) {
EG(exit_status) = Z_LVAL_P(ptr);
@@ -5649,348 +7152,627 @@ static int ZEND_FASTCALL ZEND_EXIT_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
#endif
zend_bailout();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
static int ZEND_FASTCALL ZEND_END_SILENCE_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval restored_error_reporting;
- if (!EG(error_reporting) && Z_LVAL(EX_T(opline->op1.u.var).tmp_var) != 0) {
+ SAVE_OPLINE();
+ if (!EG(error_reporting) && Z_LVAL(EX_T(opline->op1.var).tmp_var) != 0) {
Z_TYPE(restored_error_reporting) = IS_LONG;
- Z_LVAL(restored_error_reporting) = Z_LVAL(EX_T(opline->op1.u.var).tmp_var);
+ Z_LVAL(restored_error_reporting) = Z_LVAL(EX_T(opline->op1.var).tmp_var);
+ EG(error_reporting) = Z_LVAL(restored_error_reporting);
convert_to_string(&restored_error_reporting);
- zend_alter_ini_entry_ex("error_reporting", sizeof("error_reporting"), Z_STRVAL(restored_error_reporting), Z_STRLEN(restored_error_reporting), ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME, 1 TSRMLS_CC);
- zendi_zval_dtor(restored_error_reporting);
+ if (EXPECTED(EG(error_reporting_ini_entry) != NULL)) {
+ if (EXPECTED(EG(error_reporting_ini_entry)->modified &&
+ EG(error_reporting_ini_entry)->value != EG(error_reporting_ini_entry)->orig_value)) {
+ efree(EG(error_reporting_ini_entry)->value);
+ }
+ EG(error_reporting_ini_entry)->value = Z_STRVAL(restored_error_reporting);
+ EG(error_reporting_ini_entry)->value_length = Z_STRLEN(restored_error_reporting);
+ } else {
+ zendi_zval_dtor(restored_error_reporting);
+ }
}
- if (EX(old_error_reporting) == &EX_T(opline->op1.u.var).tmp_var) {
+ if (EX(old_error_reporting) == &EX_T(opline->op1.var).tmp_var) {
EX(old_error_reporting) = NULL;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *value;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (i_zend_is_true(value)) {
- EX_T(opline->result.u.var).tmp_var = *value;
- zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
- zval_dtor(free_op1.var);
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
+ if (!1) {
+ zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
+ }
+
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_JMP(opline->op2.u.jmp_addr);
+ ZEND_VM_JMP(opline->op2.jmp_addr);
}
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_JMP_SET_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *value, *ret;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (i_zend_is_true(value)) {
+ if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
+ Z_ADDREF_P(value);
+ EX_T(opline->result.var).var.ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ } else {
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, value);
+ EX_T(opline->result.var).var.ptr = ret;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ if (!1) {
+ zval_copy_ctor(EX_T(opline->result.var).var.ptr);
+ }
+ }
+
+#if DEBUG_ZEND>=2
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
+#endif
+ ZEND_VM_JMP(opline->op2.jmp_addr);
+ }
+
+ zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *value;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- EX_T(opline->result.u.var).tmp_var = *value;
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
if (!1) {
- zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_QM_ASSIGN_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *value, *ret;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
+ Z_ADDREF_P(value);
+ EX_T(opline->result.var).var.ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ } else {
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, value);
+ EX_T(opline->result.var).var.ptr = ret;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ if (!1) {
+ zval_copy_ctor(EX_T(opline->result.var).var.ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *expr = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *expr;
zend_bool result;
+ SAVE_OPLINE();
+ expr = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->get_class_entry) {
- result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.u.var).class_entry TSRMLS_CC);
+ result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.var).class_entry TSRMLS_CC);
} else {
result = 0;
}
- ZVAL_BOOL(&EX_T(opline->result.u.var).tmp_var, result);
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, result);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL ZEND_FETCH_DIM_TMP_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *container = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ zval_dtor(free_op1.var);
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_TMP_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
- if (Z_TYPE_P(container) != IS_ARRAY) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
}
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_TMP_VAR != IS_TMP_VAR) {
+ zval_dtor(free_op1.var);
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+ zval_dtor(free_op1.var);
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
+ }
+
+
+ if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_TMP_CONST(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_DIM_TMP_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_ARRAY)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
} else {
- zval *dim = &opline->op2.u.constant;
+ zval *value = *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
- AI_SET_PTR(EX_T(opline->result.u.var).var, *zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, BP_VAR_R TSRMLS_CC));
- SELECTIVE_PZVAL_LOCK(EX_T(opline->result.u.var).var.ptr, &opline->result);
+ PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_CHAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zval *str = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+ zval *str = &EX_T(opline->result.var).tmp_var;
+
+ SAVE_OPLINE();
if (IS_TMP_VAR == IS_UNUSED) {
/* Initialize for erealloc in add_char_to_string */
@@ -6001,16 +7783,19 @@ static int ZEND_FASTCALL ZEND_ADD_CHAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDL
INIT_PZVAL(str);
}
- add_char_to_string(str, str, &opline->op2.u.constant);
+ add_char_to_string(str, str, opline->op2.zv);
/* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
+ /*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_STRING_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zval *str = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+ zval *str = &EX_T(opline->result.var).tmp_var;
+
+ SAVE_OPLINE();
if (IS_TMP_VAR == IS_UNUSED) {
/* Initialize for erealloc in add_string_to_string */
@@ -6021,45 +7806,59 @@ static int ZEND_FASTCALL ZEND_ADD_STRING_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HAN
INIT_PZVAL(str);
}
- add_string_to_string(str, str, &opline->op2.u.constant);
+ add_string_to_string(str, str, opline->op2.zv);
/* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
+ /*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op1;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = &opline->op2.u.constant;
+ function_name = opline->op2.zv;
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_CONST != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ EX(object) = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_CONST != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_CONST == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_CONST == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -6079,76 +7878,52 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CONST_HANDLER(ZEND_OPCO
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op1;
+ SAVE_OPLINE();
if (IS_TMP_VAR==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
- zval_dtor(free_op1.var);
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
- zval *offset=&opline->op2.u.constant;
-#if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = NULL;
- if (opline->extended_value) {
- expr_ptr_ptr=NULL;
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-#endif
-
- if (1) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (1) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -6159,20 +7934,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPC
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_CONST != IS_UNUSED) {
+
+ zval *offset = opline->op2.zv;
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_CONST == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -6182,21 +7974,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CONST_HANDLER(ZEND_OPC
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_TMP_VAR == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_TMP_VAR != IS_UNUSED
@@ -6206,259 +7999,441 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HAN
}
}
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
+ zend_free_op free_op1;
+
+ SAVE_OPLINE();
+ if (IS_TMP_VAR == IS_CV &&
+ IS_CONST == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ } else {
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
+ }
+
+ if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+ zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
+
+ SAVE_OPLINE();
+ if (IS_TMP_VAR == IS_CV &&
+ IS_CONST == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
+ } else {
+ HashTable *target_symbol_table;
+ zend_free_op free_op1;
+ zval tmp, *varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ }
+
+ if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+ zval_dtor(free_op1.var);
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *str = &EX_T(opline->result.u.var).tmp_var;
- zval *var = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *str = &EX_T(opline->result.var).tmp_var;
+ zval *var;
zval var_copy;
int use_copy = 0;
+ SAVE_OPLINE();
+ var = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
if (IS_TMP_VAR == IS_UNUSED) {
/* Initialize for erealloc in add_string_to_string */
Z_STRVAL_P(str) = NULL;
@@ -6488,42 +8463,56 @@ static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_
*/
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op1, free_op2;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_TMP_VAR != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ EX(object) = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_TMP_VAR != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_TMP_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_TMP_VAR == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -6544,77 +8533,53 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op1, free_op2;
+ SAVE_OPLINE();
if (IS_TMP_VAR==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
- zval_dtor(free_op1.var);
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op1, free_op2;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+ zend_free_op free_op1;
zval *expr_ptr;
- zval *offset=_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-#if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = NULL;
- if (opline->extended_value) {
- expr_ptr_ptr=NULL;
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-#endif
-
- if (1) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (1) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -6625,20 +8590,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP_HANDLER(ZEND_OPCOD
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_TMP_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -6648,21 +8630,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP_HANDLER(ZEND_OPCOD
}
zval_dtor(free_op2.var);
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_TMP_VAR == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_TMP_VAR != IS_UNUSED
@@ -6674,257 +8657,448 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDL
static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ zval_dtor(free_op1.var);
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_TMP_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_TMP_VAR != IS_TMP_VAR) {
+ zval_dtor(free_op1.var);
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+ zval_dtor(free_op1.var);
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
+ }
+
+
+ if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_VAR(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_TMP_VAR(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_VAR(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *str = &EX_T(opline->result.u.var).tmp_var;
- zval *var = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *str = &EX_T(opline->result.var).tmp_var;
+ zval *var;
zval var_copy;
int use_copy = 0;
+ SAVE_OPLINE();
+ var = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
if (IS_TMP_VAR == IS_UNUSED) {
/* Initialize for erealloc in add_string_to_string */
Z_STRVAL_P(str) = NULL;
@@ -6954,42 +9128,56 @@ static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_
*/
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op1, free_op2;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_VAR != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ EX(object) = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_VAR != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_VAR == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -7010,77 +9198,53 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op1, free_op2;
+ SAVE_OPLINE();
if (IS_TMP_VAR==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
- zval_dtor(free_op1.var);
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op1, free_op2;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+ zend_free_op free_op1;
zval *expr_ptr;
- zval *offset=_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-#if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = NULL;
- if (opline->extended_value) {
- expr_ptr_ptr=NULL;
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-#endif
-
- if (1) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (1) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -7091,20 +9255,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_VAR_HANDLER(ZEND_OPCOD
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -7114,21 +9295,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_VAR_HANDLER(ZEND_OPCOD
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_TMP_VAR == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_TMP_VAR != IS_UNUSED
@@ -7138,42 +9320,334 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDL
}
}
-static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
zend_free_op free_op1;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
- zval *expr_ptr;
- zval *offset=NULL;
-#if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if (IS_TMP_VAR == IS_CV &&
+ IS_VAR == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
- if (opline->extended_value) {
- expr_ptr_ptr=NULL;
- expr_ptr = *expr_ptr_ptr;
+ varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
} else {
- expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
}
-#else
- expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-#endif
- if (1) { /* temporary variable */
- zval *new_expr;
+ if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+ zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
+
+ SAVE_OPLINE();
+ if (IS_TMP_VAR == IS_CV &&
+ IS_VAR == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
} else {
-#if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ HashTable *target_symbol_table;
+ zend_free_op free_op1;
+ zval tmp, *varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ }
+
+ if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+ zval_dtor(free_op1.var);
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_TMP_UNUSED(int type, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ zval_dtor(free_op1.var);
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_TMP_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_TMP_VAR != IS_TMP_VAR) {
+ zval_dtor(free_op1.var);
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+ zval_dtor(free_op1.var);
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_TMP_VAR == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
+ }
+
+
+ if (IS_TMP_VAR != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_UNUSED(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_UNUSED(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_UNUSED(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_TMP_UNUSED(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_UNUSED(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_TMP_UNUSED(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *expr_ptr;
+
+ SAVE_OPLINE();
+ if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = NULL;
+
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
+ expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
+ } else {
+ expr_ptr=_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (1) { /* temporary variable */
+ zval *new_expr;
+
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -7184,20 +9658,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER(ZEND_OP
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_UNUSED != IS_UNUSED) {
+
+ zval *offset = NULL;
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_UNUSED == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -7207,21 +9698,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNUSED_HANDLER(ZEND_OP
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_TMP_VAR == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_TMP_VAR != IS_UNUSED
@@ -7231,259 +9723,441 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HA
}
}
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
+ zend_free_op free_op1;
+
+ SAVE_OPLINE();
+ if (IS_TMP_VAR == IS_CV &&
+ IS_UNUSED == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ } else {
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
+ }
+
+ if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+ zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
+
+ SAVE_OPLINE();
+ if (IS_TMP_VAR == IS_CV &&
+ IS_UNUSED == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
+ } else {
+ HashTable *target_symbol_table;
+ zend_free_op free_op1;
+ zval tmp, *varname = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_TMP_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_TMP_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ }
+
+ if (IS_TMP_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+ zval_dtor(free_op1.var);
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op1.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *str = &EX_T(opline->result.u.var).tmp_var;
- zval *var = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *str = &EX_T(opline->result.var).tmp_var;
+ zval *var;
zval var_copy;
int use_copy = 0;
+ SAVE_OPLINE();
+ var = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
if (IS_TMP_VAR == IS_UNUSED) {
/* Initialize for erealloc in add_string_to_string */
Z_STRVAL_P(str) = NULL;
@@ -7512,42 +10186,56 @@ static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_A
* string offsets or overloaded objects
*/
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op1;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ function_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_CV != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ EX(object) = _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_CV != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_CV == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_CV == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -7567,76 +10255,52 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op1;
+ SAVE_OPLINE();
if (IS_TMP_VAR==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
- zval_dtor(free_op1.var);
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
- zval *offset=_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
-#if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = NULL;
- if (opline->extended_value) {
- expr_ptr_ptr=NULL;
+ if (IS_TMP_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-#endif
-
- if (1) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (1) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_TMP_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -7647,20 +10311,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_HANDLER(ZEND_OPCODE
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_CV != IS_UNUSED) {
+
+ zval *offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_CV == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -7670,21 +10351,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_HANDLER(ZEND_OPCODE
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_TMP_VAR == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_TMP_VAR != IS_UNUSED
@@ -7696,193 +10378,223 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLE
static int ZEND_FASTCALL ZEND_BW_NOT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_not_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_not_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- boolean_not_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_not_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_PRE_INC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **var_ptr;
+
+ SAVE_OPLINE();
+ var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !var_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (IS_VAR == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (IS_VAR == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- increment_function(val);
+ fast_increment_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- increment_function(*var_ptr);
+ fast_increment_function(*var_ptr);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_PRE_DEC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **var_ptr;
+
+ SAVE_OPLINE();
+ var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !var_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (IS_VAR == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (IS_VAR == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- decrement_function(val);
+ fast_decrement_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- decrement_function(*var_ptr);
+ fast_decrement_function(*var_ptr);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_POST_INC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **var_ptr, *retval;
+
+ SAVE_OPLINE();
+ var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !var_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (IS_VAR == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).tmp_var = *EG(uninitialized_zval_ptr);
- }
+ if (IS_VAR == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ ZVAL_NULL(&EX_T(opline->result.var).tmp_var);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
- EX_T(opline->result.u.var).tmp_var = **var_ptr;
- zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
+ retval = &EX_T(opline->result.var).tmp_var;
+ ZVAL_COPY_VALUE(retval, *var_ptr);
+ zendi_zval_copy_ctor(*retval);
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- increment_function(val);
+ fast_increment_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- increment_function(*var_ptr);
+ fast_increment_function(*var_ptr);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_POST_DEC_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **var_ptr, *retval;
+
+ SAVE_OPLINE();
+ var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !var_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (IS_VAR == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).tmp_var = *EG(uninitialized_zval_ptr);
- }
+ if (IS_VAR == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ ZVAL_NULL(&EX_T(opline->result.var).tmp_var);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
- EX_T(opline->result.u.var).tmp_var = **var_ptr;
- zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
+ retval = &EX_T(opline->result.var).tmp_var;
+ ZVAL_COPY_VALUE(retval, *var_ptr);
+ zendi_zval_copy_ctor(*retval);
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- decrement_function(val);
+ fast_decrement_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- decrement_function(*var_ptr);
+ fast_decrement_function(*var_ptr);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ECHO_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval z_copy;
- zval *z = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *z;
+
+ SAVE_OPLINE();
+ z = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (IS_VAR != IS_CONST &&
- Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL) {
+ UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) &&
+ Z_OBJ_HT_P(z)->get_method != NULL) {
if (IS_VAR == IS_TMP_VAR) {
INIT_PZVAL(z);
}
@@ -7897,172 +10609,42 @@ static int ZEND_FASTCALL ZEND_ECHO_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_PRINT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG;
+ USE_OPLINE
+ ZVAL_LONG(&EX_T(opline->result.var).tmp_var, 1);
return ZEND_ECHO_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
-static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zend_free_op free_op1;
- zval *varname = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval **retval;
- zval tmp_varname;
- HashTable *target_symbol_table;
-
- if (IS_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
- tmp_varname = *varname;
- zval_copy_ctor(&tmp_varname);
- convert_to_string(&tmp_varname);
- varname = &tmp_varname;
- }
-
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- } else {
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- ZEND_VM_NEXT_OPCODE();
- }
-*/
- if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval_ptr);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
- /* break missing intentionally */
- case BP_VAR_W: {
- zval *new_zval = &EG(uninitialized_zval);
-
- Z_ADDREF_P(new_zval);
- zend_hash_update(target_symbol_table, varname->value.str.val, varname->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval);
- }
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- }
- switch (opline->op2.u.EA.type) {
- case ZEND_FETCH_GLOBAL:
- if (IS_VAR != IS_TMP_VAR) {
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- }
- break;
- case ZEND_FETCH_LOCAL:
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- break;
- case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
- break;
- case ZEND_FETCH_GLOBAL_LOCK:
- if (IS_VAR == IS_VAR && !free_op1.var) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- break;
- }
- }
-
-
- if (IS_VAR != IS_CONST && varname == &tmp_varname) {
- zval_dtor(varname);
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
- }
- PZVAL_LOCK(*retval);
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_IS:
- AI_SET_PTR(EX_T(opline->result.u.var).var, *retval);
- break;
- case BP_VAR_UNSET: {
- zend_free_op free_res;
-
- EX_T(opline->result.u.var).var.ptr_ptr = retval;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- }
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
- FREE_OP_VAR_PTR(free_res);
- break;
- default:
- EX_T(opline->result.u.var).var.ptr_ptr = retval;
- break;
- }
- }
- }
- ZEND_VM_NEXT_OPCODE();
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_VAR(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_VAR(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), EX(opline)->extended_value)?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_VAR(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
static int ZEND_FASTCALL ZEND_JMPZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *val;
int ret;
- if (IS_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
ret = i_zend_is_true(val);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (!ret) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
@@ -8071,25 +10653,28 @@ static int ZEND_FASTCALL ZEND_JMPZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *val;
int ret;
- if (IS_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
ret = i_zend_is_true(val);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (ret) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
@@ -8098,18 +10683,21 @@ static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *val;
int retval;
- if (IS_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (EXPECTED(retval != 0)) {
@@ -8120,36 +10708,39 @@ static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
ZEND_VM_CONTINUE(); /* CHECK_ME */
} else {
#if DEBUG_ZEND>=2
- printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp on false to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.u.opline_num]);
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
ZEND_VM_CONTINUE(); /* CHECK_ME */
}
}
static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *val;
int retval;
- if (IS_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
if (!retval) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
ZEND_VM_NEXT_OPCODE();
@@ -8157,62 +10748,145 @@ static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS
static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *val = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *val;
int retval;
- if (IS_VAR == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
if (retval) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
ZEND_VM_NEXT_OPCODE();
}
+static int ZEND_FASTCALL ZEND_FREE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ SAVE_OPLINE();
+ if (IS_VAR == IS_TMP_VAR) {
+ zendi_zval_dtor(EX_T(opline->op1.var).tmp_var);
+ } else {
+ zval_ptr_dtor(&EX_T(opline->op1.var).var.ptr);
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_RETURN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ zval *retval_ptr;
+ zend_free_op free_op1;
+
+ SAVE_OPLINE();
+ retval_ptr = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (!EG(return_value_ptr_ptr)) {
+ if (IS_VAR == IS_TMP_VAR) {
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else if (!0) { /* Not a temp var */
+ if (IS_VAR == IS_CONST ||
+ (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ zval_copy_ctor(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else if ((IS_VAR == IS_CV || IS_VAR == IS_VAR) &&
+ retval_ptr == &EG(uninitialized_zval)) {
+ zval *ret;
+
+ ALLOC_INIT_ZVAL(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else {
+ *EG(return_value_ptr_ptr) = retval_ptr;
+ Z_ADDREF_P(retval_ptr);
+ }
+ } else {
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ *EG(return_value_ptr_ptr) = ret;
+ }
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
zval *retval_ptr;
zval **retval_ptr_ptr;
zend_free_op free_op1;
- if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) {
+ SAVE_OPLINE();
+ do {
if (IS_VAR == IS_CONST || IS_VAR == IS_TMP_VAR) {
/* Not supposed to happen, but we'll allow it */
zend_error(E_NOTICE, "Only variable references should be returned by reference");
- goto return_by_value;
+
+ retval_ptr = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (!EG(return_value_ptr_ptr)) {
+ if (IS_VAR == IS_TMP_VAR) {
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ } else if (!0) { /* Not a temp var */
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ zval_copy_ctor(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else {
+ zval *ret;
+
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ *EG(return_value_ptr_ptr) = ret;
+ }
+ break;
}
- retval_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ retval_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !retval_ptr_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(retval_ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
}
if (IS_VAR == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) {
if (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- EX_T(opline->op1.u.var).var.fcall_returned_reference) {
- } else if (EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
- if (IS_VAR == IS_VAR && !(free_op1.var != NULL)) {
- PZVAL_LOCK(*retval_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
- }
+ EX_T(opline->op1.var).var.fcall_returned_reference) {
+ } else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
zend_error(E_NOTICE, "Only variable references should be returned by reference");
- goto return_by_value;
+ if (EG(return_value_ptr_ptr)) {
+ retval_ptr = *retval_ptr_ptr;
+ *EG(return_value_ptr_ptr) = retval_ptr;
+ Z_ADDREF_P(retval_ptr);
+ }
+ break;
}
}
@@ -8220,59 +10894,25 @@ static int ZEND_FASTCALL ZEND_RETURN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
Z_ADDREF_PP(retval_ptr_ptr);
- (*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr);
+ *EG(return_value_ptr_ptr) = *retval_ptr_ptr;
}
- } else {
-return_by_value:
-
- retval_ptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-
- if (!EG(return_value_ptr_ptr)) {
- if (IS_VAR == IS_TMP_VAR) {
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- }
- } else if (!0) { /* Not a temp var */
- if (IS_VAR == IS_CONST ||
- EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
- (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
- zval *ret;
-
- ALLOC_ZVAL(ret);
- INIT_PZVAL_COPY(ret, retval_ptr);
- zval_copy_ctor(ret);
- *EG(return_value_ptr_ptr) = ret;
- } else if ((IS_VAR == IS_CV || IS_VAR == IS_VAR) &&
- retval_ptr == &EG(uninitialized_zval)) {
- zval *ret;
-
- ALLOC_INIT_ZVAL(ret);
- *EG(return_value_ptr_ptr) = ret;
- } else {
- *EG(return_value_ptr_ptr) = retval_ptr;
- Z_ADDREF_P(retval_ptr);
- }
- } else {
- zval *ret;
+ } while (0);
- ALLOC_ZVAL(ret);
- INIT_PZVAL_COPY(ret, retval_ptr);
- *EG(return_value_ptr_ptr) = ret;
- }
- }
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_THROW_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *value;
zval *exception;
zend_free_op free_op1;
- value = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ SAVE_OPLINE();
+ value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_CONST || Z_TYPE_P(value) != IS_OBJECT) {
+ if (IS_VAR == IS_CONST || UNEXPECTED(Z_TYPE_P(value) != IS_OBJECT)) {
zend_error_noreturn(E_ERROR, "Can only throw objects");
}
zend_exception_save(TSRMLS_C);
@@ -8286,40 +10926,15 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_throw_exception_object(exception TSRMLS_CC);
zend_exception_restore(TSRMLS_C);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- ZEND_VM_NEXT_OPCODE();
-}
-
-static int ZEND_FASTCALL ZEND_SEND_VAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
- && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
- zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.u.opline_num);
- }
- {
- zval *valptr;
- zval *value;
- zend_free_op free_op1;
-
- value = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-
- ALLOC_ZVAL(valptr);
- INIT_PZVAL_COPY(valptr, value);
- if (!0) {
- zval_copy_ctor(valptr);
- }
- zend_vm_stack_push(valptr TSRMLS_CC);
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- }
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
static int ZEND_FASTCALL zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *varptr;
zend_free_op free_op1;
- varptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ varptr = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (varptr == &EG(uninitialized_zval)) {
ALLOC_ZVAL(varptr);
@@ -8329,7 +10944,7 @@ static int ZEND_FASTCALL zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_AR
zval *original_var = varptr;
ALLOC_ZVAL(varptr);
- *varptr = *original_var;
+ ZVAL_COPY_VALUE(varptr, original_var);
Z_UNSET_ISREF_P(varptr);
Z_SET_REFCOUNT_P(varptr, 0);
zval_copy_ctor(varptr);
@@ -8338,34 +10953,36 @@ static int ZEND_FASTCALL zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_AR
zend_vm_stack_push(varptr TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; /* for string offsets */
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval *varptr;
+ SAVE_OPLINE();
if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { /* Had function_ptr at compile_time */
if (!(opline->extended_value & ZEND_ARG_SEND_BY_REF)) {
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
- } else if (!ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ } else if (!ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
if (IS_VAR == IS_VAR &&
(opline->extended_value & ZEND_ARG_SEND_FUNCTION) &&
- EX_T(opline->op1.u.var).var.fcall_returned_reference &&
- EX_T(opline->op1.u.var).var.ptr) {
- varptr = EX_T(opline->op1.u.var).var.ptr;
+ EX_T(opline->op1.var).var.fcall_returned_reference &&
+ EX_T(opline->op1.var).var.ptr) {
+ varptr = EX_T(opline->op1.var).var.ptr;
PZVAL_UNLOCK_EX(varptr, &free_op1, 0);
} else {
- varptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ varptr = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
}
if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) ||
- EX_T(opline->op1.u.var).var.fcall_returned_reference) &&
+ EX_T(opline->op1.var).var.fcall_returned_reference) &&
varptr != &EG(uninitialized_zval) &&
(PZVAL_IS_REF(varptr) ||
(Z_REFCOUNT_P(varptr) == 1 && (IS_VAR == IS_CV || free_op1.var)))) {
@@ -8377,7 +10994,7 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
!(opline->extended_value & ZEND_ARG_SEND_SILENT) :
- !ARG_MAY_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ !ARG_MAY_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
zend_error(E_STRICT, "Only variables should be passed by reference");
}
ALLOC_ZVAL(valptr);
@@ -8388,28 +11005,32 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
zend_vm_stack_push(valptr TSRMLS_CC);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval **varptr_ptr;
zval *varptr;
- varptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !varptr_ptr) {
+ SAVE_OPLINE();
+ varptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(varptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
}
- if (IS_VAR == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(*varptr_ptr == &EG(error_zval))) {
ALLOC_INIT_ZVAL(varptr);
zend_vm_stack_push(varptr TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
- if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
@@ -8419,60 +11040,68 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
zend_vm_stack_push(varptr TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SEND_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
if ((opline->extended_value == ZEND_DO_FCALL_BY_NAME)
- && ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ && ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
return ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+ SAVE_OPLINE();
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_BOOL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
+ zval *retval = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
/* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC));
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC)));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SWITCH_FREE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zend_switch_free(&EX_T(opline->op1.u.var), opline->extended_value TSRMLS_CC);
+ SAVE_OPLINE();
+ zval_ptr_dtor(&EX_T(opline->op1.var).var.ptr);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CLONE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *obj = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *obj;
zend_class_entry *ce;
zend_function *clone;
zend_object_clone_obj_t clone_call;
+ SAVE_OPLINE();
+ obj = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
if (IS_VAR == IS_CONST ||
- (IS_VAR == IS_VAR && !obj) ||
- Z_TYPE_P(obj) != IS_OBJECT) {
+ UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT)) {
zend_error_noreturn(E_ERROR, "__clone method called on non-object");
}
ce = Z_OBJCE_P(obj);
clone = ce ? ce->clone : NULL;
clone_call = Z_OBJ_HT_P(obj)->clone_obj;
- if (!clone_call) {
+ if (UNEXPECTED(clone_call == NULL)) {
if (ce) {
zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name);
} else {
@@ -8484,42 +11113,49 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (ce != EG(scope)) {
+ if (UNEXPECTED(ce != EG(scope))) {
zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (!zend_check_protected(clone->common.scope, EG(scope))) {
+ if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
}
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- if (!EG(exception)) {
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- Z_OBJVAL_P(EX_T(opline->result.u.var).var.ptr) = clone_call(obj TSRMLS_CC);
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_OBJECT;
- Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1);
- Z_SET_ISREF_P(EX_T(opline->result.u.var).var.ptr);
- if (!RETURN_VALUE_USED(opline) || EG(exception)) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ if (EXPECTED(EG(exception) == NULL)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ Z_OBJVAL_P(retval) = clone_call(obj TSRMLS_CC);
+ Z_TYPE_P(retval) = IS_OBJECT;
+ Z_SET_REFCOUNT_P(retval, 1);
+ Z_SET_ISREF_P(retval);
+ if (!RETURN_VALUE_USED(opline) || UNEXPECTED(EG(exception) != NULL)) {
+ zval_ptr_dtor(&retval);
+ } else {
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *expr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *expr;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+
+ SAVE_OPLINE();
+ expr = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (opline->extended_value != IS_STRING) {
- *result = *expr;
+ ZVAL_COPY_VALUE(result, expr);
if (!0) {
zendi_zval_copy_ctor(*result);
}
@@ -8543,12 +11179,12 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_make_printable_zval(expr, &var_copy, &use_copy);
if (use_copy) {
- *result = var_copy;
+ ZVAL_COPY_VALUE(result, &var_copy);
if (0) {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
}
} else {
- *result = *expr;
+ ZVAL_COPY_VALUE(result, expr);
if (!0) {
zendi_zval_copy_ctor(*result);
}
@@ -8563,36 +11199,37 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
break;
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_op_array *new_op_array=NULL;
- int return_value_used;
zend_free_op free_op1;
- zval *inc_filename = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *inc_filename;
zval tmp_inc_filename;
zend_bool failure_retval=0;
+ SAVE_OPLINE();
+ inc_filename = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
if (inc_filename->type!=IS_STRING) {
- tmp_inc_filename = *inc_filename;
+ ZVAL_COPY_VALUE(&tmp_inc_filename, inc_filename);
zval_copy_ctor(&tmp_inc_filename);
convert_to_string(&tmp_inc_filename);
inc_filename = &tmp_inc_filename;
}
- return_value_used = RETURN_VALUE_USED(opline);
-
- if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
- if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
+ if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
+ if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
}
} else {
- switch (Z_LVAL(opline->op2.u.constant)) {
+ switch (opline->extended_value) {
case ZEND_INCLUDE_ONCE:
case ZEND_REQUIRE_ONCE: {
zend_file_handle file_handle;
@@ -8614,14 +11251,14 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
}
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
- new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
+ new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
zend_destroy_file_handle(&file_handle TSRMLS_CC);
} else {
zend_file_handle_dtor(&file_handle TSRMLS_CC);
failure_retval=1;
}
} else {
- if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
+ if (opline->extended_value == ZEND_INCLUDE_ONCE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
@@ -8634,7 +11271,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
break;
case ZEND_INCLUDE:
case ZEND_REQUIRE:
- new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
+ new_op_array = compile_filename(opline->extended_value, inc_filename TSRMLS_CC);
break;
case ZEND_EVAL: {
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
@@ -8650,12 +11287,18 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
zval_dtor(&tmp_inc_filename);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- if (new_op_array && !EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ } else if (EXPECTED(new_op_array != NULL)) {
EX(original_return_value) = EG(return_value_ptr_ptr);
- EG(return_value_ptr_ptr) = return_value_used ? EX_T(opline->result.u.var).var.ptr_ptr : NULL;
EG(active_op_array) = new_op_array;
- EX_T(opline->result.u.var).var.ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ EX_T(opline->result.var).var.ptr = NULL;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ EG(return_value_ptr_ptr) = EX_T(opline->result.var).var.ptr_ptr;
+ } else {
+ EG(return_value_ptr_ptr) = NULL;
+ }
EX(current_object) = EX(object);
@@ -8666,8 +11309,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
zend_rebuild_symbol_table(TSRMLS_C);
}
- if (zend_execute == execute) {
- EX(call_opline) = opline;
+ if (EXPECTED(zend_execute == execute)) {
ZEND_VM_ENTER();
} else {
zend_execute(new_op_array TSRMLS_CC);
@@ -8676,121 +11318,39 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND
EX(function_state).function = (zend_function *) EX(op_array);
EX(object) = EX(current_object);
- if (return_value_used) {
- if (!EX_T(opline->result.u.var).var.ptr) { /* there was no return statement */
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = 1;
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
- }
- }
-
EG(opline_ptr) = &EX(opline);
EG(active_op_array) = EX(op_array);
EG(return_value_ptr_ptr) = EX(original_return_value);
destroy_op_array(new_op_array TSRMLS_CC);
efree(new_op_array);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
- }
- } else {
- if (return_value_used) {
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_ZVAL(*EX_T(opline->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = failure_retval;
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
- }
- }
- ZEND_VM_NEXT_OPCODE();
-}
+ HANDLE_EXCEPTION();
+ } else if (RETURN_VALUE_USED(opline)) {
+ if (!EX_T(opline->result.var).var.ptr) { /* there was no return statement */
+ zval *retval;
-static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zval tmp, *varname;
- HashTable *target_symbol_table;
- zend_free_op free_op1;
-
- if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
- if (EG(active_symbol_table)) {
- zend_execute_data *ex = EX(prev_execute_data);
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
-
- if (zend_hash_quick_del(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value) == SUCCESS) {
- while (ex && ex->symbol_table == EG(active_symbol_table)) {
- int i;
-
- if (ex->op_array) {
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == cv->hash_value &&
- ex->op_array->vars[i].name_len == cv->name_len &&
- !memcmp(ex->op_array->vars[i].name, cv->name, cv->name_len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
- ex = ex->prev_execute_data;
- }
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, 1);
+ INIT_PZVAL(retval);
+ EX_T(opline->result.var).var.ptr = retval;
}
- EX(CVs)[opline->op1.u.var] = NULL;
- } else if (EX(CVs)[opline->op1.u.var]) {
- zval_ptr_dtor(EX(CVs)[opline->op1.u.var]);
- EX(CVs)[opline->op1.u.var] = NULL;
}
- ZEND_VM_NEXT_OPCODE();
- }
-
- varname = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (Z_TYPE_P(varname) != IS_STRING) {
- tmp = *varname;
- zval_copy_ctor(&tmp);
- convert_to_string(&tmp);
- varname = &tmp;
- } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
- Z_ADDREF_P(varname);
- }
-
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname) TSRMLS_CC);
- } else {
- ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
- if (zend_hash_quick_del(target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value) == SUCCESS) {
- zend_execute_data *ex = execute_data;
-
- do {
- int i;
-
- if (ex->op_array) {
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == varname->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, varname->value.str.val, varname->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
- ex = ex->prev_execute_data;
- } while (ex && ex->symbol_table == target_symbol_table);
- }
- }
+ } else if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
- if (varname == &tmp) {
- zval_dtor(&tmp);
- } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
- zval_ptr_dtor(&varname);
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, failure_retval);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval *array_ptr, **array_ptr_ptr;
HashTable *fe_ht;
@@ -8798,14 +11358,18 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
zend_class_entry *ce = NULL;
zend_bool is_empty = 0;
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- array_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ SAVE_OPLINE();
+
+ if ((IS_VAR == IS_CV || IS_VAR == IS_VAR) &&
+ (opline->extended_value & ZEND_FE_RESET_VARIABLE)) {
+ array_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) {
- ALLOC_INIT_ZVAL(array_ptr);
+ MAKE_STD_ZVAL(array_ptr);
+ ZVAL_NULL(array_ptr);
} else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) {
if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) {
zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class");
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
ce = Z_OBJCE_PP(array_ptr_ptr);
@@ -8825,7 +11389,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
Z_ADDREF_P(array_ptr);
}
} else {
- array_ptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ array_ptr = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (0) { /* IS_TMP_VAR */
zval *tmp;
@@ -8861,50 +11425,35 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
if (ce && ce->get_iterator) {
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
- if (iter && !EG(exception)) {
+ if (iter && EXPECTED(EG(exception) == NULL)) {
array_ptr = zend_iterator_wrap(iter TSRMLS_CC);
} else {
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- } else {
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- }
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (!EG(exception)) {
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name);
}
zend_throw_exception_internal(NULL TSRMLS_CC);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
}
- AI_SET_PTR(EX_T(opline->result.u.var).var, array_ptr);
- PZVAL_LOCK(array_ptr);
+ EX_T(opline->result.var).fe.ptr = array_ptr;
if (iter) {
iter->index = 0;
if (iter->funcs->rewind) {
iter->funcs->rewind(iter TSRMLS_CC);
- if (EG(exception)) {
- Z_DELREF_P(array_ptr);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array_ptr);
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- } else {
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- }
- ZEND_VM_NEXT_OPCODE();
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ HANDLE_EXCEPTION();
}
}
is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS;
- if (EG(exception)) {
- Z_DELREF_P(array_ptr);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array_ptr);
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- } else {
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- }
- ZEND_VM_NEXT_OPCODE();
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ HANDLE_EXCEPTION();
}
iter->index = -1; /* will be set to 0 before using next handler */
} else if ((fe_ht = HASH_OF(array_ptr)) != NULL) {
@@ -8927,29 +11476,26 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
}
}
is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS;
- zend_hash_get_pointer(fe_ht, &EX_T(opline->result.u.var).fe.fe_pos);
+ zend_hash_get_pointer(fe_ht, &EX_T(opline->result.var).fe.fe_pos);
} else {
zend_error(E_WARNING, "Invalid argument supplied for foreach()");
is_empty = 1;
}
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- } else {
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- }
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (is_empty) {
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
} else {
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *array = EX_T(opline->op1.u.var).var.ptr;
+ zval *array = EX_T(opline->op1.var).fe.ptr;
zval **value;
char *str_key;
uint str_key_len;
@@ -8959,22 +11505,24 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
int key_type = 0;
zend_bool use_key = (zend_bool)(opline->extended_value & ZEND_FE_FETCH_WITH_KEY);
+ SAVE_OPLINE();
+
switch (zend_iterator_unwrap(array, &iter TSRMLS_CC)) {
default:
case ZEND_ITER_INVALID:
zend_error(E_WARNING, "Invalid argument supplied for foreach()");
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
case ZEND_ITER_PLAIN_OBJECT: {
- char *class_name, *prop_name;
+ const char *class_name, *prop_name;
zend_object *zobj = zend_objects_get_address(array TSRMLS_CC);
- fe_ht = HASH_OF(array);
- zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos);
+ fe_ht = Z_OBJPROP_P(array);
+ zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
do {
if (zend_hash_get_current_data(fe_ht, (void **) &value)==FAILURE) {
/* reached end of iteration */
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
@@ -8982,7 +11530,7 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
} while (key_type == HASH_KEY_NON_EXISTANT ||
(key_type != HASH_KEY_IS_LONG &&
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) != SUCCESS));
- zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos);
+ zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
if (use_key && key_type != HASH_KEY_IS_LONG) {
zend_unmangle_property_name(str_key, str_key_len-1, &class_name, &prop_name);
str_key_len = strlen(prop_name);
@@ -8993,17 +11541,17 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
}
case ZEND_ITER_PLAIN_ARRAY:
- fe_ht = HASH_OF(array);
- zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos);
+ fe_ht = Z_ARRVAL_P(array);
+ zend_hash_set_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
if (zend_hash_get_current_data(fe_ht, (void **) &value)==FAILURE) {
/* reached end of iteration */
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
if (use_key) {
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 1, NULL);
}
zend_hash_move_forward(fe_ht);
- zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.u.var).fe.fe_pos);
+ zend_hash_get_pointer(fe_ht, &EX_T(opline->op1.var).fe.fe_pos);
break;
case ZEND_ITER_OBJECT:
@@ -9012,39 +11560,35 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
/* This could cause an endless loop if index becomes zero again.
* In case that ever happens we need an additional flag. */
iter->funcs->move_forward(iter TSRMLS_CC);
- if (EG(exception)) {
- Z_DELREF_P(array);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
}
/* If index is zero we come from FE_RESET and checked valid() already. */
if (!iter || (iter->index > 0 && iter->funcs->valid(iter TSRMLS_CC) == FAILURE)) {
/* reached end of iteration */
- if (EG(exception)) {
- Z_DELREF_P(array);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
iter->funcs->get_current_data(iter, &value TSRMLS_CC);
- if (EG(exception)) {
- Z_DELREF_P(array);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
if (!value) {
/* failure in get_current_data */
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
if (use_key) {
if (iter->funcs->get_current_key) {
key_type = iter->funcs->get_current_key(iter, &str_key, &str_key_len, &int_key TSRMLS_CC);
- if (EG(exception)) {
- Z_DELREF_P(array);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
} else {
key_type = HASH_KEY_IS_LONG;
@@ -9057,20 +11601,19 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
if (opline->extended_value & ZEND_FE_FETCH_BYREF) {
SEPARATE_ZVAL_IF_NOT_REF(value);
Z_SET_ISREF_PP(value);
- EX_T(opline->result.u.var).var.ptr_ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = value;
Z_ADDREF_PP(value);
} else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *value);
PZVAL_LOCK(*value);
+ AI_SET_PTR(&EX_T(opline->result.var), *value);
}
if (use_key) {
- zend_op *op_data = opline+1;
- zval *key = &EX_T(op_data->result.u.var).tmp_var;
+ zval *key = &EX_T((opline+1)->result.var).tmp_var;
switch (key_type) {
case HASH_KEY_IS_STRING:
- Z_STRVAL_P(key) = str_key;
+ Z_STRVAL_P(key) = (char*)str_key;
Z_STRLEN_P(key) = str_key_len-1;
Z_TYPE_P(key) = IS_STRING;
break;
@@ -9085,87 +11628,20 @@ static int ZEND_FASTCALL ZEND_FE_FETCH_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
}
}
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zval **value;
- zend_bool isset = 1;
-
- if (IS_VAR == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
- if (EX(CVs)[opline->op1.u.var]) {
- value = EX(CVs)[opline->op1.u.var];
- } else if (EG(active_symbol_table)) {
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
-
- if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
- isset = 0;
- }
- } else {
- isset = 0;
- }
- } else {
- HashTable *target_symbol_table;
- zend_free_op free_op1;
- zval tmp, *varname = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-
- if (Z_TYPE_P(varname) != IS_STRING) {
- tmp = *varname;
- zval_copy_ctor(&tmp);
- convert_to_string(&tmp);
- varname = &tmp;
- }
-
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- value = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1 TSRMLS_CC);
- if (!value) {
- isset = 0;
- }
- } else {
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
- if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
- isset = 0;
- }
- }
-
- if (varname == &tmp) {
- zval_dtor(&tmp);
- }
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- }
-
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
- } else {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = isset;
- }
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
- } else {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
- }
- break;
- }
-
- ZEND_VM_NEXT_OPCODE();
-}
-
static int ZEND_FASTCALL ZEND_EXIT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_VAR != IS_UNUSED)
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ SAVE_OPLINE();
if (IS_VAR != IS_UNUSED) {
zend_free_op free_op1;
- zval *ptr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *ptr = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (Z_TYPE_P(ptr) == IS_LONG) {
EG(exit_status) = Z_LVAL_P(ptr);
@@ -9176,333 +11652,439 @@ static int ZEND_FASTCALL ZEND_EXIT_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
#endif
zend_bailout();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *value = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *value;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (i_zend_is_true(value)) {
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
+ if (!0) {
+ zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
+ }
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+#if DEBUG_ZEND>=2
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
+#endif
+ ZEND_VM_JMP(opline->op2.jmp_addr);
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_JMP_SET_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *value, *ret;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (i_zend_is_true(value)) {
- EX_T(opline->result.u.var).tmp_var = *value;
- zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
+ if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
+ Z_ADDREF_P(value);
+ EX_T(opline->result.var).var.ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ } else {
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, value);
+ EX_T(opline->result.var).var.ptr = ret;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ if (!0) {
+ zval_copy_ctor(EX_T(opline->result.var).var.ptr);
+ }
+ }
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_JMP(opline->op2.u.jmp_addr);
+ ZEND_VM_JMP(opline->op2.jmp_addr);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *value = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *value;
- EX_T(opline->result.u.var).tmp_var = *value;
+ SAVE_OPLINE();
+ value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
if (!0) {
- zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_QM_ASSIGN_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *value, *ret;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
+ Z_ADDREF_P(value);
+ EX_T(opline->result.var).var.ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ } else {
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, value);
+ EX_T(opline->result.var).var.ptr = ret;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ if (!0) {
+ zval_copy_ctor(EX_T(opline->result.var).var.ptr);
+ }
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *expr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *expr;
zend_bool result;
+ SAVE_OPLINE();
+ expr = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->get_class_entry) {
- result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.u.var).class_entry TSRMLS_CC);
+ result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.var).class_entry TSRMLS_CC);
} else {
result = 0;
}
- ZVAL_BOOL(&EX_T(opline->result.u.var).tmp_var, result);
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, result);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1, free_op_data1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
zval *object;
- zval *property = &opline->op2.u.constant;
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = opline->op2.zv;
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -9513,16 +12095,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*b
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -9532,7 +12114,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*b
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -9554,22 +12136,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*b
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -9584,66 +12166,71 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*b
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_CONST(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
break;
case ZEND_ASSIGN_DIM: {
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_VAR == IS_VAR && !(free_op1.var != NULL)) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = &opline->op2.u.constant;
+ zval *dim = opline->op2.zv;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_CONST, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = &opline->op2.u.constant;
- var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ value = opline->op2.zv;
+ var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -9655,16 +12242,21 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_CONST(int (*binar
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
}
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
}
@@ -9725,29 +12317,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = &opline->op2.u.constant;
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = opline->op2.zv;
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -9758,13 +12356,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -9773,9 +12371,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -9789,14 +12387,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -9807,6 +12405,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -9822,26 +12421,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HA
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = &opline->op2.u.constant;
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = opline->op2.zv;
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -9852,12 +12457,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -9867,10 +12472,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -9880,20 +12485,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -9903,6 +12507,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -9916,198 +12521,341 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_H
return zend_post_incdec_property_helper_SPEC_VAR_CONST(decrement_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_VAR != IS_TMP_VAR) {
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_VAR == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
+ }
+
+
+ if (IS_VAR != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_CONST(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_VAR_CONST(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_CONST(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = &opline->op2.u.constant;
zval **container;
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK &&
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
IS_VAR != IS_CV &&
- EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = &opline->op2.u.constant;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_W TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* We are going to assign the result by reference */
- if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ if (UNEXPECTED(opline->extended_value != 0)) {
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ if (retval_ptr) {
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = &opline->op2.u.constant;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
- if (IS_VAR == IS_VAR && !container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_RW TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = &opline->op2.u.constant;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_IS TSRMLS_CC);
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_IS TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = &opline->op2.u.constant;
zval **container;
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ SAVE_OPLINE();
+
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_W TSRMLS_CC);
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
} else {
if (IS_CONST == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *dim = &opline->op2.u.constant;
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- /* Not needed in DIM_UNSET
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- */
if (IS_VAR == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_UNSET TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
+ if (UNEXPECTED(EX_T(opline->result.var).var.ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot unset string offsets");
} else {
zend_free_op free_res;
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*retval_ptr, &free_res);
+ if (retval_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*retval_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
- ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_CONST(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *container = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *container;
- zval *offset = &opline->op2.u.constant;
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = opline->op2.zv;
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
} else {
zval *retval;
@@ -10117,18 +12865,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_CONST(
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (0) {
zval_ptr_dtor(&offset);
@@ -10138,138 +12878,184 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_CONST(
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_VAR_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_VAR_CONST(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = &opline->op2.u.constant;
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = opline->op2.zv;
+
if (IS_VAR == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = &opline->op2.u.constant;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = opline->op2.zv;
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_VAR_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *container;
+
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = opline->op2.zv;
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ } else {
+ zval *retval;
+
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+
+ }
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1;
- zval *property = &opline->op2.u.constant;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = opline->op2.zv;
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_VAR_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_VAR_CONST(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_res;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *property = &opline->op2.u.constant;
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = opline->op2.zv;
if (IS_VAR == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -10279,49 +13065,48 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCOD
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *property_name = &opline->op2.u.constant;
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property_name = opline->op2.zv;
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -10329,28 +13114,31 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAN
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (Z_TYPE_PP(object_ptr) == IS_OBJECT) {
- zval *property_name = &opline->op2.u.constant;
+ zval *property_name = opline->op2.zv;
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -10359,30 +13147,46 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAN
} else {
zend_free_op free_op_data1, free_op_data2;
zval *value;
- zval *dim = &opline->op2.u.constant;
+ zval *dim = opline->op2.zv;
zval **variable_ptr_ptr;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), object_ptr, dim, IS_CONST, BP_VAR_W TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- if (!variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
+ if (UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T((opline+1)->op2.var), value, (opline+1)->op1_type TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T((opline+1)->op2.var).str_offset.str)+EX_T((opline+1)->op2.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_TMP_FREE(free_op_data1)) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if ((opline+1)->op1_type == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if ((opline+1)->op1_type == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
FREE_OP_VAR_PTR(free_op_data2);
@@ -10390,34 +13194,55 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAN
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_dim has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *value = &opline->op2.u.constant;
- zval **variable_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *value;
+ zval **variable_ptr_ptr;
+
+ SAVE_OPLINE();
+ value = opline->op2.zv;
+ variable_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T(opline->op1.var), value, IS_CONST TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
- if (IS_VAR == IS_VAR && !variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(opline->op1.u.var), value, IS_CONST TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(opline->op1.u.var).str_offset.str)+EX_T(opline->op1.u.var).str_offset.offset, 1, 1);
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T(opline->op1.var).str_offset.str)+EX_T(opline->op1.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (IS_VAR == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (0) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, 0 TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if (IS_CONST == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if (IS_CONST == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
@@ -10425,42 +13250,56 @@ static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER
/* zend_assign_to_variable() always takes care of op2, never free it! */
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op1;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = &opline->op2.u.constant;
+ function_name = opline->op2.zv;
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_CONST != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ EX(object) = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_CONST != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_CONST == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_CONST == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -10481,45 +13320,61 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZEND_OPCO
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
zend_class_entry *ce;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_VAR == IS_CONST) {
/* no function found. try a static method in class */
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
EX(called_scope) = ce;
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
- if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
+ if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
EX(called_scope) = EG(called_scope);
} else {
EX(called_scope) = ce;
}
}
- if(IS_CONST != IS_UNUSED) {
+
+ if (IS_VAR == IS_CONST &&
+ IS_CONST == IS_CONST &&
+ CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (IS_VAR != IS_CONST &&
+ IS_CONST == IS_CONST &&
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
+ /* do nothing */
+ } else if (IS_CONST != IS_UNUSED) {
char *function_name_strval = NULL;
int function_name_strlen = 0;
if (IS_CONST == IS_CONST) {
- function_name_strval = Z_STRVAL(opline->op2.u.constant);
- function_name_strlen = Z_STRLEN(opline->op2.u.constant);
+ function_name_strval = Z_STRVAL_P(opline->op2.zv);
+ function_name_strlen = Z_STRLEN_P(opline->op2.zv);
} else {
- function_name = &opline->op2.u.constant;
+ function_name = opline->op2.zv;
- if (Z_TYPE_P(function_name) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
@@ -10531,22 +13386,28 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZE
if (ce->get_static_method) {
EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
} else {
- EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+ EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen, ((IS_CONST == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
}
- if (!EX(fbc)) {
+ if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
+ if (IS_CONST == IS_CONST && EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
+ if (IS_VAR == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
+ }
+ }
}
-
if (IS_CONST != IS_CONST) {
}
} else {
- if(!ce->constructor) {
+ if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
}
EX(fbc) = ce->constructor;
}
@@ -10559,18 +13420,12 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZE
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- int severity;
- char *verb;
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- severity = E_STRICT;
- verb = "should not";
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
} else {
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- severity = E_ERROR;
- verb = "cannot";
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
}
- zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
-
}
if ((EX(object) = EG(This))) {
Z_ADDREF_P(EX(object));
@@ -10578,62 +13433,61 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CONST_HANDLER(ZE
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op1;
+ SAVE_OPLINE();
if (IS_VAR==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ SAVE_OPLINE();
if (IS_VAR == IS_UNUSED) {
- /* namespaced constant */
- if (!zend_get_constant_ex(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant), &EX_T(opline->result.u.var).tmp_var, NULL, opline->extended_value TSRMLS_CC)) {
+ zend_constant *c;
+ zval *retval;
+
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ c = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if ((c = zend_quick_get_constant(opline->op2.literal + 1, opline->extended_value TSRMLS_CC)) == NULL) {
if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
- char *actual = (char *)zend_memrchr(Z_STRVAL(opline->op2.u.constant), '\\', Z_STRLEN(opline->op2.u.constant));
+ char *actual = (char *)zend_memrchr(Z_STRVAL_P(opline->op2.zv), '\\', Z_STRLEN_P(opline->op2.zv));
if(!actual) {
- actual = Z_STRVAL(opline->op2.u.constant);
+ actual = Z_STRVAL_P(opline->op2.zv);
} else {
actual++;
}
/* non-qualified constant - allow text substitution */
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", actual, actual);
- ZVAL_STRINGL(&EX_T(opline->result.u.var).tmp_var, actual, Z_STRLEN(opline->op2.u.constant)-(actual - Z_STRVAL(opline->op2.u.constant)), 1);
+ ZVAL_STRINGL(&EX_T(opline->result.var).tmp_var, actual, Z_STRLEN_P(opline->op2.zv)-(actual - Z_STRVAL_P(opline->op2.zv)), 1);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
} else {
- zend_error_noreturn(E_ERROR, "Undefined constant '%s'",
- Z_STRVAL(opline->op2.u.constant), Z_STRVAL(opline->op2.u.constant));
+ zend_error_noreturn(E_ERROR, "Undefined constant '%s'", Z_STRVAL_P(opline->op2.zv));
}
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, c);
}
+ retval = &EX_T(opline->result.var).tmp_var;
+ ZVAL_COPY_VALUE(retval, &c->value);
+ zval_copy_ctor(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
/* class constant */
@@ -10641,16 +13495,32 @@ static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE
zval **value;
if (IS_VAR == IS_CONST) {
-
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant));
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ value = CACHED_PTR(opline->op2.literal->cache_slot);
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(opline->op2.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
+ if ((value = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce)) != NULL) {
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
}
- if (zend_hash_find(&ce->constants_table, Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void **) &value) == SUCCESS) {
+ if (EXPECTED(zend_hash_quick_find(&ce->constants_table, Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv)+1, Z_HASH_P(opline->op2.zv), (void **) &value) == SUCCESS)) {
if (Z_TYPE_PP(value) == IS_CONSTANT_ARRAY ||
(Z_TYPE_PP(value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
zend_class_entry *old_scope = EG(scope);
@@ -10659,52 +13529,47 @@ static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE
zval_update_constant(value, (void *) 1 TSRMLS_CC);
EG(scope) = old_scope;
}
- EX_T(opline->result.u.var).tmp_var = **value;
- zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
+ if (IS_VAR == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, value);
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, value);
+ }
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
} else {
- zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant));
+ zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(opline->op2.zv));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
- zval *offset=&opline->op2.u.constant;
-#if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (opline->extended_value) {
- expr_ptr_ptr=_get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -10715,20 +13580,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLER(ZEND_OPC
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_CONST != IS_UNUSED) {
+
+ zval *offset = opline->op2.zv;
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_CONST == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -10738,21 +13620,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CONST_HANDLER(ZEND_OPC
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && opline->extended_value) {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
} else {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_VAR == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_VAR != IS_UNUSED
@@ -10762,17 +13645,86 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAN
}
}
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
+ zend_free_op free_op1;
+
+ SAVE_OPLINE();
+ if (IS_VAR == IS_CV &&
+ IS_CONST == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ varname = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ } else {
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
+ }
+
+ if (IS_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = &opline->op2.u.constant;
+ offset = opline->op2.zv;
if (IS_VAR != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -10781,37 +13733,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAND
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_CONST == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -10827,7 +13781,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAND
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (0) {
@@ -10852,15 +13806,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAND
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *offset = &opline->op2.u.constant;
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = opline->op2.zv;
if (IS_VAR != IS_VAR || container) {
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -10871,7 +13830,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAND
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -10888,139 +13847,232 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HAND
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
+
+ SAVE_OPLINE();
+ if (IS_VAR == IS_CV &&
+ IS_CONST == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
+ } else {
+ HashTable *target_symbol_table;
+ zend_free_op free_op1;
+ zval tmp, *varname = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ }
+
+ if (IS_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CONST(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (IS_VAR != IS_VAR || container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- zval *offset = &opline->op2.u.constant;
+ offset = opline->op2.zv;
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- ht = Z_ARRVAL_PP(container);
+ ht = Z_ARRVAL_PP(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_CONST == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
- break;
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
- }
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
- } else {
- result = 1;
- }
- break;
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
+ }
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (0) {
- MAKE_REAL_ZVAL_PTR(offset);
- }
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (0) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
-
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
+
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
+ }
- } else {
+ } else {
- }
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -11036,277 +14088,306 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_VAR_CONST_HANDLER(ZEN
static int ZEND_FASTCALL ZEND_ADD_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
zval *object;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
zval_dtor(free_op2.var);
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -11317,16 +14398,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(int (*bin
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -11336,7 +14417,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(int (*bin
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -11358,22 +14439,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(int (*bin
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -11388,66 +14469,71 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(int (*bin
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_TMP(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
break;
case ZEND_ASSIGN_DIM: {
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_VAR == IS_VAR && !(free_op1.var != NULL)) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *dim = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 1, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_TMP_VAR, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ value = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
zval_dtor(free_op2.var);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -11459,17 +14545,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_TMP(int (*binary_
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
zval_dtor(free_op2.var);
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
}
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
}
@@ -11530,29 +14621,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HA
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_TMP(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
zval_dtor(free_op2.var);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -11563,13 +14660,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_TMP(incdec_t i
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -11578,9 +14675,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_TMP(incdec_t i
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -11594,14 +14691,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_TMP(incdec_t i
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -11612,6 +14709,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_TMP(incdec_t i
zval_dtor(free_op2.var);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -11627,26 +14725,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HAND
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_TMP(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
zval_dtor(free_op2.var);
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -11657,12 +14761,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_TMP(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -11672,10 +14776,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_TMP(incdec_t
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -11685,20 +14789,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_TMP(incdec_t
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -11708,6 +14811,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_TMP(incdec_t
zval_dtor(free_op2.var);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -11723,196 +14827,183 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HAN
static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
zval **container;
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK &&
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
IS_VAR != IS_CV &&
- EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
zval_dtor(free_op2.var);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
- if (IS_VAR == IS_VAR && !container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_W TSRMLS_CC);
zval_dtor(free_op2.var);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* We are going to assign the result by reference */
- if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ if (UNEXPECTED(opline->extended_value != 0)) {
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ if (retval_ptr) {
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_RW TSRMLS_CC);
zval_dtor(free_op2.var);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_IS TSRMLS_CC);
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_IS TSRMLS_CC);
zval_dtor(free_op2.var);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
zval **container;
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ SAVE_OPLINE();
+
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_W TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_W TSRMLS_CC);
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
} else {
if (IS_TMP_VAR == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
}
zval_dtor(free_op2.var);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- /* Not needed in DIM_UNSET
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- */
if (IS_VAR == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_UNSET TSRMLS_CC);
zval_dtor(free_op2.var);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
+ if (UNEXPECTED(EX_T(opline->result.var).var.ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot unset string offsets");
} else {
zend_free_op free_res;
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*retval_ptr, &free_res);
+ if (retval_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*retval_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
- ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_TMP(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_TMP(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *container = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *container;
zend_free_op free_op2;
- zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
zval_dtor(free_op2.var);
} else {
zval *retval;
@@ -11922,18 +15013,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_TMP(in
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (1) {
zval_ptr_dtor(&offset);
@@ -11943,138 +15026,184 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_TMP(in
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_VAR_TMP(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_VAR_TMP(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
if (IS_VAR == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_VAR_TMP(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *container;
+ zend_free_op free_op2;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ zval_dtor(free_op2.var);
+ } else {
+ zval *retval;
+
+ if (1) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (1) {
+ zval_ptr_dtor(&offset);
+ } else {
+ zval_dtor(free_op2.var);
+ }
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_VAR_TMP(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_VAR_TMP(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_res;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_VAR == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -12084,49 +15213,48 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *property_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (1) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property_name);
} else {
@@ -12134,28 +15262,31 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDL
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (Z_TYPE_PP(object_ptr) == IS_OBJECT) {
zend_free_op free_op2;
- zval *property_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *property_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (1) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property_name);
} else {
@@ -12164,31 +15295,47 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDL
} else {
zend_free_op free_op2, free_op_data1, free_op_data2;
zval *value;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *dim = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
zval **variable_ptr_ptr;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, 1, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), object_ptr, dim, IS_TMP_VAR, BP_VAR_W TSRMLS_CC);
zval_dtor(free_op2.var);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- if (!variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
+ if (UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T((opline+1)->op2.var), value, (opline+1)->op1_type TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T((opline+1)->op2.var).str_offset.str)+EX_T((opline+1)->op2.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_TMP_FREE(free_op_data1)) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if ((opline+1)->op1_type == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if ((opline+1)->op1_type == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
FREE_OP_VAR_PTR(free_op_data2);
@@ -12196,34 +15343,55 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDL
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_dim has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *value = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **variable_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *value;
+ zval **variable_ptr_ptr;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T(opline->op1.var), value, IS_TMP_VAR TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
- if (IS_VAR == IS_VAR && !variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(opline->op1.u.var), value, IS_TMP_VAR TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(opline->op1.u.var).str_offset.str)+EX_T(opline->op1.u.var).str_offset.offset, 1, 1);
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T(opline->op1.var).str_offset.str)+EX_T(opline->op1.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (IS_VAR == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (1) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, 1 TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if (IS_TMP_VAR == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if (IS_TMP_VAR == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
@@ -12231,42 +15399,56 @@ static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_A
/* zend_assign_to_variable() always takes care of op2, never free it! */
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op1, free_op2;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_TMP_VAR != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ EX(object) = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_TMP_VAR != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_TMP_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_TMP_VAR == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -12288,45 +15470,61 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE
zval_dtor(free_op2.var);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
zend_class_entry *ce;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_VAR == IS_CONST) {
/* no function found. try a static method in class */
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
EX(called_scope) = ce;
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
- if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
+ if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
EX(called_scope) = EG(called_scope);
} else {
EX(called_scope) = ce;
}
}
- if(IS_TMP_VAR != IS_UNUSED) {
+
+ if (IS_VAR == IS_CONST &&
+ IS_TMP_VAR == IS_CONST &&
+ CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (IS_VAR != IS_CONST &&
+ IS_TMP_VAR == IS_CONST &&
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
+ /* do nothing */
+ } else if (IS_TMP_VAR != IS_UNUSED) {
char *function_name_strval = NULL;
int function_name_strlen = 0;
zend_free_op free_op2;
if (IS_TMP_VAR == IS_CONST) {
- function_name_strval = Z_STRVAL(opline->op2.u.constant);
- function_name_strlen = Z_STRLEN(opline->op2.u.constant);
+ function_name_strval = Z_STRVAL_P(opline->op2.zv);
+ function_name_strlen = Z_STRLEN_P(opline->op2.zv);
} else {
- function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
@@ -12338,22 +15536,28 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_TMP_HANDLER(ZEND
if (ce->get_static_method) {
EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
} else {
- EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+ EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen, ((IS_TMP_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
}
- if (!EX(fbc)) {
+ if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
+ if (IS_TMP_VAR == IS_CONST && EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
+ if (IS_VAR == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
+ }
+ }
}
-
if (IS_TMP_VAR != IS_CONST) {
zval_dtor(free_op2.var);
}
} else {
- if(!ce->constructor) {
+ if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
}
EX(fbc) = ce->constructor;
}
@@ -12366,18 +15570,12 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_TMP_HANDLER(ZEND
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- int severity;
- char *verb;
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- severity = E_STRICT;
- verb = "should not";
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
} else {
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- severity = E_ERROR;
- verb = "cannot";
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
}
- zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
-
}
if ((EX(object) = EG(This))) {
Z_ADDREF_P(EX(object));
@@ -12385,77 +15583,53 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_TMP_HANDLER(ZEND
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op1, free_op2;
+ SAVE_OPLINE();
if (IS_VAR==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op1, free_op2;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+ zend_free_op free_op1;
zval *expr_ptr;
- zval *offset=_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-#if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (opline->extended_value) {
- expr_ptr_ptr=_get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -12466,20 +15640,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMP_HANDLER(ZEND_OPCOD
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_TMP_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -12489,21 +15680,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_TMP_HANDLER(ZEND_OPCOD
}
zval_dtor(free_op2.var);
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && opline->extended_value) {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
} else {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_VAR == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_VAR != IS_UNUSED
@@ -12515,15 +15707,18 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDL
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_VAR != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -12532,37 +15727,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLE
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_TMP_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -12578,7 +15775,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLE
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (1) {
@@ -12603,15 +15800,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLE
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_VAR != IS_VAR || container) {
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -12622,7 +15824,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLE
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -12639,139 +15841,151 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLE
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_TMP(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (IS_VAR != IS_VAR || container) {
- zend_free_op free_op2;
- zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- ht = Z_ARRVAL_PP(container);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- break;
- }
+ ht = Z_ARRVAL_PP(container);
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_TMP_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
} else {
- result = 1;
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
- zval_dtor(free_op2.var);
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (1) {
- MAKE_REAL_ZVAL_PTR(offset);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ }
+ zval_dtor(free_op2.var);
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (1) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (1) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
- zval_dtor(free_op2.var);
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (1) {
+ zval_ptr_dtor(&offset);
+ } else {
+ zval_dtor(free_op2.var);
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
- zval_dtor(free_op2.var);
- } else {
- zval_dtor(free_op2.var);
}
+ zval_dtor(free_op2.var);
+ } else {
+ zval_dtor(free_op2.var);
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -12787,277 +16001,306 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_VAR_TMP_HANDLER(ZEND_
static int ZEND_FASTCALL ZEND_ADD_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
zval *object;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -13068,16 +16311,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(int (*bin
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -13087,7 +16330,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(int (*bin
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -13109,22 +16352,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(int (*bin
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -13139,66 +16382,71 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(int (*bin
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_VAR(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
break;
case ZEND_ASSIGN_DIM: {
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_VAR == IS_VAR && !(free_op1.var != NULL)) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *dim = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_VAR, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ value = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -13210,17 +16458,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_VAR(int (*binary_
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
}
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
}
@@ -13281,29 +16534,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HA
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_VAR(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -13314,13 +16573,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_VAR(incdec_t i
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -13329,9 +16588,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_VAR(incdec_t i
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -13345,14 +16604,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_VAR(incdec_t i
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -13363,6 +16622,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_VAR(incdec_t i
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -13378,26 +16638,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HAND
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_VAR(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -13408,12 +16674,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_VAR(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -13423,10 +16689,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_VAR(incdec_t
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -13436,20 +16702,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_VAR(incdec_t
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -13459,6 +16724,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_VAR(incdec_t
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -13472,198 +16738,341 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HAN
return zend_post_incdec_property_helper_SPEC_VAR_VAR(decrement_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_VAR != IS_TMP_VAR) {
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_VAR == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
+ }
+
+
+ if (IS_VAR != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_VAR(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_VAR_VAR(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_VAR(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
zval **container;
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK &&
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
IS_VAR != IS_CV &&
- EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_W TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* We are going to assign the result by reference */
- if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ if (UNEXPECTED(opline->extended_value != 0)) {
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ if (retval_ptr) {
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
- if (IS_VAR == IS_VAR && !container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_RW TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_IS TSRMLS_CC);
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_IS TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
zval **container;
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ SAVE_OPLINE();
+
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_W TSRMLS_CC);
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
} else {
if (IS_VAR == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- /* Not needed in DIM_UNSET
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- */
if (IS_VAR == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_UNSET TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
+ if (UNEXPECTED(EX_T(opline->result.var).var.ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot unset string offsets");
} else {
zend_free_op free_res;
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*retval_ptr, &free_res);
+ if (retval_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*retval_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
- ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_VAR(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *container = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *container;
zend_free_op free_op2;
- zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
} else {
zval *retval;
@@ -13673,18 +17082,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_VAR(in
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (0) {
zval_ptr_dtor(&offset);
@@ -13694,138 +17095,184 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_VAR(in
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_VAR_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_VAR_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
if (IS_VAR == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_VAR_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *container;
+ zend_free_op free_op2;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else {
+ zval *retval;
+
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ }
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_VAR_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_VAR_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_res;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_VAR == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -13835,49 +17282,48 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *property_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -13885,28 +17331,31 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDL
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (Z_TYPE_PP(object_ptr) == IS_OBJECT) {
zend_free_op free_op2;
- zval *property_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *property_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -13915,31 +17364,47 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDL
} else {
zend_free_op free_op2, free_op_data1, free_op_data2;
zval *value;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *dim = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
zval **variable_ptr_ptr;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), object_ptr, dim, IS_VAR, BP_VAR_W TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- if (!variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
+ if (UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T((opline+1)->op2.var), value, (opline+1)->op1_type TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T((opline+1)->op2.var).str_offset.str)+EX_T((opline+1)->op2.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_TMP_FREE(free_op_data1)) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if ((opline+1)->op1_type == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if ((opline+1)->op1_type == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
FREE_OP_VAR_PTR(free_op_data2);
@@ -13947,34 +17412,55 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDL
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_dim has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *value = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **variable_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *value;
+ zval **variable_ptr_ptr;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(opline->op1.u.var), value, IS_VAR TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(opline->op1.u.var).str_offset.str)+EX_T(opline->op1.u.var).str_offset.offset, 1, 1);
+ if (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T(opline->op1.var), value, IS_VAR TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T(opline->op1.var).str_offset.str)+EX_T(opline->op1.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (IS_VAR == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (0) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, 0 TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if (IS_VAR == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if (IS_VAR == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
@@ -13983,40 +17469,44 @@ static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_A
/* zend_assign_to_variable() always takes care of op2, never free it! */
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
zval **variable_ptr_ptr;
- zval **value_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **value_ptr_ptr;
+
+ SAVE_OPLINE();
+ value_ptr_ptr = _get_zval_ptr_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_VAR == IS_VAR &&
value_ptr_ptr &&
!Z_ISREF_PP(value_ptr_ptr) &&
opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !EX_T(opline->op2.u.var).var.fcall_returned_reference) {
+ !EX_T(opline->op2.var).var.fcall_returned_reference) {
if (free_op2.var == NULL) {
PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
}
zend_error(E_STRICT, "Only variables should be assigned by reference");
if (UNEXPECTED(EG(exception) != NULL)) {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
return ZEND_ASSIGN_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else if (IS_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
PZVAL_LOCK(*value_ptr_ptr);
}
- if (IS_VAR == IS_VAR && EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr)) {
zend_error_noreturn(E_ERROR, "Cannot assign by reference to overloaded object");
}
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if ((IS_VAR == IS_VAR && !value_ptr_ptr) ||
- (IS_VAR == IS_VAR && !variable_ptr_ptr)) {
+ variable_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if ((IS_VAR == IS_VAR && UNEXPECTED(value_ptr_ptr == NULL)) ||
+ (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL))) {
zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
}
zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
@@ -14025,50 +17515,64 @@ static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDL
Z_DELREF_PP(variable_ptr_ptr);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *variable_ptr_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*variable_ptr_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *variable_ptr_ptr);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op1, free_op2;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_VAR != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ EX(object) = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_VAR != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_VAR == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -14090,45 +17594,61 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
zend_class_entry *ce;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_VAR == IS_CONST) {
/* no function found. try a static method in class */
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
EX(called_scope) = ce;
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
- if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
+ if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
EX(called_scope) = EG(called_scope);
} else {
EX(called_scope) = ce;
}
}
- if(IS_VAR != IS_UNUSED) {
+
+ if (IS_VAR == IS_CONST &&
+ IS_VAR == IS_CONST &&
+ CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (IS_VAR != IS_CONST &&
+ IS_VAR == IS_CONST &&
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
+ /* do nothing */
+ } else if (IS_VAR != IS_UNUSED) {
char *function_name_strval = NULL;
int function_name_strlen = 0;
zend_free_op free_op2;
if (IS_VAR == IS_CONST) {
- function_name_strval = Z_STRVAL(opline->op2.u.constant);
- function_name_strlen = Z_STRLEN(opline->op2.u.constant);
+ function_name_strval = Z_STRVAL_P(opline->op2.zv);
+ function_name_strlen = Z_STRLEN_P(opline->op2.zv);
} else {
- function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
@@ -14140,22 +17660,28 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_VAR_HANDLER(ZEND
if (ce->get_static_method) {
EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
} else {
- EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+ EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen, ((IS_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
}
- if (!EX(fbc)) {
+ if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
+ if (IS_VAR == IS_CONST && EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
+ if (IS_VAR == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
+ }
+ }
}
-
if (IS_VAR != IS_CONST) {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
} else {
- if(!ce->constructor) {
+ if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
}
EX(fbc) = ce->constructor;
}
@@ -14168,18 +17694,12 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_VAR_HANDLER(ZEND
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- int severity;
- char *verb;
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- severity = E_STRICT;
- verb = "should not";
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
} else {
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- severity = E_ERROR;
- verb = "cannot";
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
}
- zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
-
}
if ((EX(object) = EG(This))) {
Z_ADDREF_P(EX(object));
@@ -14187,77 +17707,53 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_VAR_HANDLER(ZEND
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op1, free_op2;
+ SAVE_OPLINE();
if (IS_VAR==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op1, free_op2;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+ zend_free_op free_op1;
zval *expr_ptr;
- zval *offset=_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-#if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (opline->extended_value) {
- expr_ptr_ptr=_get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -14268,20 +17764,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_VAR_HANDLER(ZEND_OPCOD
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -14291,21 +17804,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_VAR_HANDLER(ZEND_OPCOD
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && opline->extended_value) {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
} else {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_VAR == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_VAR != IS_UNUSED
@@ -14315,17 +17829,86 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDL
}
}
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
+ zend_free_op free_op1;
+
+ SAVE_OPLINE();
+ if (IS_VAR == IS_CV &&
+ IS_VAR == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ varname = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ } else {
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
+ }
+
+ if (IS_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_VAR != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -14334,37 +17917,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLE
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -14380,7 +17965,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLE
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (0) {
@@ -14405,15 +17990,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLE
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_VAR != IS_VAR || container) {
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -14424,7 +18014,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLE
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -14441,139 +18031,232 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLE
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
+
+ SAVE_OPLINE();
+ if (IS_VAR == IS_CV &&
+ IS_VAR == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
+ } else {
+ HashTable *target_symbol_table;
+ zend_free_op free_op1;
+ zval tmp, *varname = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ }
+
+ if (IS_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_VAR(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ USE_OPLINE
+ zend_free_op free_op1, free_op2;
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (IS_VAR != IS_VAR || container) {
- zend_free_op free_op2;
- zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- ht = Z_ARRVAL_PP(container);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- break;
- }
+ ht = Z_ARRVAL_PP(container);
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
} else {
- result = 1;
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (0) {
- MAKE_REAL_ZVAL_PTR(offset);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ }
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (0) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- } else {
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else {
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -14589,33 +18272,30 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_VAR_VAR_HANDLER(ZEND_
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1, free_op_data1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
zval *object;
zval *property = NULL;
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -14626,16 +18306,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -14645,7 +18325,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -14667,22 +18347,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -14697,66 +18377,71 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_UNUSED(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
break;
case ZEND_ASSIGN_DIM: {
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_VAR == IS_VAR && !(free_op1.var != NULL)) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
zval *dim = NULL;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_UNUSED, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
value = NULL;
- var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -14768,16 +18453,21 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_UNUSED(int (*bina
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
}
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
}
@@ -14836,106 +18526,258 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE
return zend_binary_assign_op_helper_SPEC_VAR_UNUSED(bitwise_xor_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_VAR_UNUSED(int type, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_VAR == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_VAR != IS_TMP_VAR) {
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_VAR == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
+ }
+
+
+ if (IS_VAR != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_UNUSED(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_UNUSED(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_UNUSED(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_VAR_UNUSED(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_UNUSED(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_VAR_UNUSED(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
static int ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = NULL;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
- if (IS_VAR == IS_VAR && !container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, NULL, IS_UNUSED, BP_VAR_W TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* We are going to assign the result by reference */
- if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ if (UNEXPECTED(opline->extended_value != 0)) {
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ if (retval_ptr) {
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = NULL;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
- if (IS_VAR == IS_VAR && !container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, NULL, IS_UNUSED, BP_VAR_RW TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = NULL;
zval **container;
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ SAVE_OPLINE();
+
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, NULL, IS_UNUSED, BP_VAR_W TSRMLS_CC);
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
} else {
if (IS_UNUSED == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, NULL, IS_UNUSED, BP_VAR_R TSRMLS_CC);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (Z_TYPE_PP(object_ptr) == IS_OBJECT) {
@@ -14945,7 +18787,7 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HA
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -14957,27 +18799,43 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HA
zval *dim = NULL;
zval **variable_ptr_ptr;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), object_ptr, dim, IS_UNUSED, BP_VAR_W TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- if (!variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
+ if (UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T((opline+1)->op2.var), value, (opline+1)->op1_type TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T((opline+1)->op2.var).str_offset.str)+EX_T((opline+1)->op2.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_TMP_FREE(free_op_data1)) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if ((opline+1)->op1_type == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if ((opline+1)->op1_type == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
FREE_OP_VAR_PTR(free_op_data2);
@@ -14985,46 +18843,62 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HA
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_dim has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
zend_class_entry *ce;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_VAR == IS_CONST) {
/* no function found. try a static method in class */
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
EX(called_scope) = ce;
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
- if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
+ if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
EX(called_scope) = EG(called_scope);
} else {
EX(called_scope) = ce;
}
}
- if(IS_UNUSED != IS_UNUSED) {
+
+ if (IS_VAR == IS_CONST &&
+ IS_UNUSED == IS_CONST &&
+ CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (IS_VAR != IS_CONST &&
+ IS_UNUSED == IS_CONST &&
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
+ /* do nothing */
+ } else if (IS_UNUSED != IS_UNUSED) {
char *function_name_strval = NULL;
int function_name_strlen = 0;
if (IS_UNUSED == IS_CONST) {
- function_name_strval = Z_STRVAL(opline->op2.u.constant);
- function_name_strlen = Z_STRLEN(opline->op2.u.constant);
+ function_name_strval = Z_STRVAL_P(opline->op2.zv);
+ function_name_strlen = Z_STRLEN_P(opline->op2.zv);
} else {
function_name = NULL;
- if (Z_TYPE_P(function_name) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
@@ -15036,22 +18910,28 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_UNUSED_HANDLER(Z
if (ce->get_static_method) {
EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
} else {
- EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+ EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen, ((IS_UNUSED == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
}
- if (!EX(fbc)) {
+ if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
+ if (IS_UNUSED == IS_CONST && EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
+ if (IS_VAR == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
+ }
+ }
}
-
if (IS_UNUSED != IS_CONST) {
}
} else {
- if(!ce->constructor) {
+ if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
}
EX(fbc) = ce->constructor;
}
@@ -15064,18 +18944,12 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_UNUSED_HANDLER(Z
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- int severity;
- char *verb;
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- severity = E_STRICT;
- verb = "should not";
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
} else {
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- severity = E_ERROR;
- verb = "cannot";
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
}
- zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
-
}
if ((EX(object) = EG(This))) {
Z_ADDREF_P(EX(object));
@@ -15083,45 +18957,35 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_UNUSED_HANDLER(Z
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
- zval *offset=NULL;
-#if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (opline->extended_value) {
- expr_ptr_ptr=_get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -15132,20 +18996,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_UNUSED_HANDLER(ZEND_OP
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_UNUSED != IS_UNUSED) {
+
+ zval *offset = NULL;
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_UNUSED == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -15155,21 +19036,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_UNUSED_HANDLER(ZEND_OP
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && opline->extended_value) {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
} else {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_VAR == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_VAR != IS_UNUSED
@@ -15179,279 +19061,476 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HA
}
}
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
+ zend_free_op free_op1;
+
+ SAVE_OPLINE();
+ if (IS_VAR == IS_CV &&
+ IS_UNUSED == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ varname = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ } else {
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
+ }
+
+ if (IS_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
+
+ SAVE_OPLINE();
+ if (IS_VAR == IS_CV &&
+ IS_UNUSED == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
+ } else {
+ HashTable *target_symbol_table;
+ zend_free_op free_op1;
+ zval tmp, *varname = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_VAR == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ }
+
+ if (IS_VAR != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_SEPARATE_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *var_ptr, *new_zv;
+
+ SAVE_OPLINE();
+ var_ptr = EX_T(opline->op1.var).var.ptr;
+ if (Z_TYPE_P(var_ptr) != IS_OBJECT &&
+ !PZVAL_IS_REF(var_ptr) &&
+ Z_REFCOUNT_P(var_ptr) > 1) {
+
+ Z_DELREF_P(var_ptr);
+ ALLOC_ZVAL(new_zv);
+ INIT_PZVAL_COPY(new_zv, var_ptr);
+ var_ptr = new_zv;
+ zval_copy_ctor(var_ptr);
+ EX_T(opline->op1.var).var.ptr = var_ptr;
+ }
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1, free_op_data1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
zval *object;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -15462,16 +19541,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*bina
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -15481,7 +19560,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*bina
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -15503,22 +19582,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*bina
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -15533,66 +19612,71 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*bina
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_CV(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
break;
case ZEND_ASSIGN_DIM: {
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_VAR == IS_VAR && !(free_op1.var != NULL)) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_VAR_CV(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *dim = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_CV, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- var_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ var_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -15604,16 +19688,21 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_VAR_CV(int (*binary_o
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
}
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
ZEND_VM_NEXT_OPCODE();
}
@@ -15674,29 +19763,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HAN
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CV(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -15707,13 +19802,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CV(incdec_t in
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -15722,9 +19817,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CV(incdec_t in
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -15738,14 +19833,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CV(incdec_t in
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -15756,6 +19851,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_VAR_CV(incdec_t in
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -15771,26 +19867,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDL
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CV(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_VAR == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -15801,12 +19903,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CV(incdec_t i
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -15816,10 +19918,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CV(incdec_t i
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -15829,20 +19931,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CV(incdec_t i
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -15852,6 +19953,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_VAR_CV(incdec_t i
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -15867,196 +19969,183 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HAND
static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
zval **container;
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK &&
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
IS_VAR != IS_CV &&
- EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- zend_fetch_dimension_address_read(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_W TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* We are going to assign the result by reference */
- if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ if (UNEXPECTED(opline->extended_value != 0)) {
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ if (retval_ptr) {
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_RW TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_IS TSRMLS_CC);
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_IS TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
zval **container;
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ SAVE_OPLINE();
+
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_W TSRMLS_CC);
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
} else {
if (IS_CV == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- /* Not needed in DIM_UNSET
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- */
if (IS_VAR == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_UNSET TSRMLS_CC);
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
+ if (UNEXPECTED(EX_T(opline->result.var).var.ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot unset string offsets");
} else {
zend_free_op free_res;
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*retval_ptr, &free_res);
+ if (retval_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*retval_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
- ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_CV(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_CV(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *container = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *container;
- zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
} else {
zval *retval;
@@ -16066,18 +20155,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_CV(int
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (0) {
zval_ptr_dtor(&offset);
@@ -16087,138 +20168,184 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_VAR_CV(int
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_VAR_CV(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_VAR_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
if (IS_VAR == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !container) {
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_VAR_CV(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *container;
+
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ } else {
+ zval *retval;
+
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+
+ }
+ }
+
+ if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_VAR_CV(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_VAR_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_res;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (IS_VAR == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -16228,49 +20355,48 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_H
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_VAR == IS_VAR && !container) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_VAR == IS_VAR && (free_op1.var != NULL) &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_VAR == IS_VAR && (free_op1.var != NULL) && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *property_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ property_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -16278,28 +20404,31 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLE
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op1;
- zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **object_ptr;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (IS_VAR == IS_VAR && !object_ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (Z_TYPE_PP(object_ptr) == IS_OBJECT) {
- zval *property_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *property_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -16308,30 +20437,46 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLE
} else {
zend_free_op free_op_data1, free_op_data2;
zval *value;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *dim = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
zval **variable_ptr_ptr;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), object_ptr, dim, IS_CV, BP_VAR_W TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- if (!variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
+ if (UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T((opline+1)->op2.var), value, (opline+1)->op1_type TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T((opline+1)->op2.var).str_offset.str)+EX_T((opline+1)->op2.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_TMP_FREE(free_op_data1)) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if ((opline+1)->op1_type == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if ((opline+1)->op1_type == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
FREE_OP_VAR_PTR(free_op_data2);
@@ -16339,34 +20484,55 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLE
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
/* assign_dim has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *value = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **variable_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval *value;
+ zval **variable_ptr_ptr;
- if (IS_VAR == IS_VAR && !variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(opline->op1.u.var), value, IS_CV TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(opline->op1.u.var).str_offset.str)+EX_T(opline->op1.u.var).str_offset.offset, 1, 1);
+ SAVE_OPLINE();
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+
+ if (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T(opline->op1.var), value, IS_CV TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T(opline->op1.var).str_offset.str)+EX_T(opline->op1.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (IS_VAR == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (0) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, 0 TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if (IS_CV == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if (IS_CV == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
@@ -16374,40 +20540,44 @@ static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_AR
/* zend_assign_to_variable() always takes care of op2, never free it! */
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
zval **variable_ptr_ptr;
- zval **value_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op2, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **value_ptr_ptr;
+
+ SAVE_OPLINE();
+ value_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op2.var TSRMLS_CC);
if (IS_CV == IS_VAR &&
value_ptr_ptr &&
!Z_ISREF_PP(value_ptr_ptr) &&
opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !EX_T(opline->op2.u.var).var.fcall_returned_reference) {
+ !EX_T(opline->op2.var).var.fcall_returned_reference) {
if (free_op2.var == NULL) {
PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
}
zend_error(E_STRICT, "Only variables should be assigned by reference");
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
return ZEND_ASSIGN_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else if (IS_CV == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
PZVAL_LOCK(*value_ptr_ptr);
}
- if (IS_VAR == IS_VAR && EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
+ if (IS_VAR == IS_VAR && UNEXPECTED(EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr)) {
zend_error_noreturn(E_ERROR, "Cannot assign by reference to overloaded object");
}
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- if ((IS_CV == IS_VAR && !value_ptr_ptr) ||
- (IS_VAR == IS_VAR && !variable_ptr_ptr)) {
+ variable_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if ((IS_CV == IS_VAR && UNEXPECTED(value_ptr_ptr == NULL)) ||
+ (IS_VAR == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL))) {
zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
}
zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
@@ -16416,49 +20586,63 @@ static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLE
Z_DELREF_PP(variable_ptr_ptr);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *variable_ptr_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*variable_ptr_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *variable_ptr_ptr);
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op1;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ function_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_CV != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ EX(object) = _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_CV != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_CV == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_CV == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -16479,45 +20663,61 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
zend_class_entry *ce;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
if (IS_VAR == IS_CONST) {
/* no function found. try a static method in class */
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL(opline->op1.u.constant));
+ if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Class '%s' not found", Z_STRVAL_P(opline->op1.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
EX(called_scope) = ce;
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
- if (opline->op1.u.EA.type == ZEND_FETCH_CLASS_PARENT || opline->op1.u.EA.type == ZEND_FETCH_CLASS_SELF) {
+ if (opline->extended_value == ZEND_FETCH_CLASS_PARENT || opline->extended_value == ZEND_FETCH_CLASS_SELF) {
EX(called_scope) = EG(called_scope);
} else {
EX(called_scope) = ce;
}
}
- if(IS_CV != IS_UNUSED) {
+
+ if (IS_VAR == IS_CONST &&
+ IS_CV == IS_CONST &&
+ CACHED_PTR(opline->op2.literal->cache_slot)) {
+ EX(fbc) = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if (IS_VAR != IS_CONST &&
+ IS_CV == IS_CONST &&
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce))) {
+ /* do nothing */
+ } else if (IS_CV != IS_UNUSED) {
char *function_name_strval = NULL;
int function_name_strlen = 0;
if (IS_CV == IS_CONST) {
- function_name_strval = Z_STRVAL(opline->op2.u.constant);
- function_name_strlen = Z_STRLEN(opline->op2.u.constant);
+ function_name_strval = Z_STRVAL_P(opline->op2.zv);
+ function_name_strlen = Z_STRLEN_P(opline->op2.zv);
} else {
- function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ function_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- if (Z_TYPE_P(function_name) != IS_STRING) {
+ if (UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
@@ -16529,22 +20729,28 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CV_HANDLER(ZEND_
if (ce->get_static_method) {
EX(fbc) = ce->get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
} else {
- EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
+ EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen, ((IS_CV == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
}
- if (!EX(fbc)) {
+ if (UNEXPECTED(EX(fbc) == NULL)) {
zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", ce->name, function_name_strval);
}
+ if (IS_CV == IS_CONST && EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0)) {
+ if (IS_VAR == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, EX(fbc));
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, EX(fbc));
+ }
+ }
}
-
if (IS_CV != IS_CONST) {
}
} else {
- if(!ce->constructor) {
+ if (UNEXPECTED(ce->constructor == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot call constructor");
}
if (EG(This) && Z_OBJCE_P(EG(This)) != ce->constructor->common.scope && (ce->constructor->common.fn_flags & ZEND_ACC_PRIVATE)) {
- zend_error(E_COMPILE_ERROR, "Cannot call private %s::__construct()", ce->name);
+ zend_error_noreturn(E_ERROR, "Cannot call private %s::__construct()", ce->name);
}
EX(fbc) = ce->constructor;
}
@@ -16557,18 +20763,12 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CV_HANDLER(ZEND_
!instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
/* We are calling method of the other (incompatible) class,
but passing $this. This is done for compatibility with php-4. */
- int severity;
- char *verb;
if (EX(fbc)->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
- severity = E_STRICT;
- verb = "should not";
+ zend_error(E_STRICT, "Non-static method %s::%s() should not be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
} else {
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
- severity = E_ERROR;
- verb = "cannot";
+ zend_error_noreturn(E_ERROR, "Non-static method %s::%s() cannot be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name);
}
- zend_error(severity, "Non-static method %s::%s() %s be called statically, assuming $this from incompatible context", EX(fbc)->common.scope->name, EX(fbc)->common.function_name, verb);
-
}
if ((EX(object) = EG(This))) {
Z_ADDREF_P(EX(object));
@@ -16576,76 +20776,52 @@ static int ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_CV_HANDLER(ZEND_
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op1;
+ SAVE_OPLINE();
if (IS_VAR==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
- if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
- zval *offset=_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
-#if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- if (opline->extended_value) {
- expr_ptr_ptr=_get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ if (IS_VAR == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_VAR == IS_VAR || IS_VAR == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_VAR == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -16656,20 +20832,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_CV != IS_UNUSED) {
+
+ zval *offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_CV == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -16679,21 +20872,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_VAR == IS_VAR || IS_VAR == IS_CV) && opline->extended_value) {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
} else {
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_VAR == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_VAR != IS_UNUSED
@@ -16705,15 +20899,18 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLE
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (IS_VAR != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -16722,37 +20919,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_CV == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -16768,7 +20967,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (0) {
@@ -16793,15 +20992,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
- zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (IS_VAR != IS_VAR || container) {
if (IS_VAR == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -16812,7 +21016,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -16829,139 +21033,151 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CV(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (IS_VAR != IS_VAR || container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC);
- zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- ht = Z_ARRVAL_PP(container);
+ ht = Z_ARRVAL_PP(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_CV == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
- break;
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
- }
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
- } else {
- result = 1;
- }
- break;
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
+ }
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (0) {
- MAKE_REAL_ZVAL_PTR(offset);
- }
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (0) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
-
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
+ }
- } else {
+ } else {
- }
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -16977,23 +21193,25 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_VAR_CV_HANDLER(ZEND_O
static int ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *obj = _get_obj_zval_ptr_unused(TSRMLS_C);
+ zval *obj;
zend_class_entry *ce;
zend_function *clone;
zend_object_clone_obj_t clone_call;
+ SAVE_OPLINE();
+ obj = _get_obj_zval_ptr_unused(TSRMLS_C);
+
if (IS_UNUSED == IS_CONST ||
- (IS_UNUSED == IS_VAR && !obj) ||
- Z_TYPE_P(obj) != IS_OBJECT) {
+ UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT)) {
zend_error_noreturn(E_ERROR, "__clone method called on non-object");
}
ce = Z_OBJCE_P(obj);
clone = ce ? ce->clone : NULL;
clone_call = Z_OBJ_HT_P(obj)->clone_obj;
- if (!clone_call) {
+ if (UNEXPECTED(clone_call == NULL)) {
if (ce) {
zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name);
} else {
@@ -17005,37 +21223,43 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARG
if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (ce != EG(scope)) {
+ if (UNEXPECTED(ce != EG(scope))) {
zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (!zend_check_protected(clone->common.scope, EG(scope))) {
+ if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
}
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- if (!EG(exception)) {
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- Z_OBJVAL_P(EX_T(opline->result.u.var).var.ptr) = clone_call(obj TSRMLS_CC);
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_OBJECT;
- Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1);
- Z_SET_ISREF_P(EX_T(opline->result.u.var).var.ptr);
- if (!RETURN_VALUE_USED(opline) || EG(exception)) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ if (EXPECTED(EG(exception) == NULL)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ Z_OBJVAL_P(retval) = clone_call(obj TSRMLS_CC);
+ Z_TYPE_P(retval) = IS_OBJECT;
+ Z_SET_REFCOUNT_P(retval, 1);
+ Z_SET_ISREF_P(retval);
+ if (!RETURN_VALUE_USED(opline) || UNEXPECTED(EG(exception) != NULL)) {
+ zval_ptr_dtor(&retval);
+ } else {
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_EXIT_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
#if 0 || (IS_UNUSED != IS_UNUSED)
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ SAVE_OPLINE();
if (IS_UNUSED != IS_UNUSED) {
zval *ptr = NULL;
@@ -17049,38 +21273,35 @@ static int ZEND_FASTCALL ZEND_EXIT_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS
}
#endif
zend_bailout();
- ZEND_VM_NEXT_OPCODE();
+ ZEND_VM_NEXT_OPCODE(); /* Never reached */
}
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op_data1;
zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
zval *object;
- zval *property = &opline->op2.u.constant;
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = opline->op2.zv;
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -17091,16 +21312,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(int
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -17110,7 +21331,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(int
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -17132,22 +21353,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(int
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -17161,17 +21382,19 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(int
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_CONST(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
@@ -17179,48 +21402,51 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_CONST(int (*bi
case ZEND_ASSIGN_DIM: {
zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_UNUSED == IS_VAR && !0) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = &opline->op2.u.constant;
+ zval *dim = opline->op2.zv;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_CONST, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = &opline->op2.u.constant;
+ value = opline->op2.zv;
var_ptr = NULL;
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -17232,16 +21458,21 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_CONST(int (*bi
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
- }
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+
+ CHECK_EXCEPTION();
+ }
ZEND_VM_NEXT_OPCODE();
}
@@ -17302,29 +21533,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCO
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **object_ptr;
zval *object;
- zval *property = &opline->op2.u.constant;
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = opline->op2.zv;
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -17335,13 +21572,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incde
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -17350,9 +21587,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incde
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -17366,14 +21603,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incde
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -17384,6 +21621,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incde
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -17399,26 +21637,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **object_ptr;
zval *object;
- zval *property = &opline->op2.u.constant;
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = opline->op2.zv;
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -17429,12 +21673,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incd
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -17444,10 +21688,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incd
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -17457,20 +21701,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incd
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -17480,6 +21723,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incd
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -17493,22 +21737,23 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCOD
return zend_post_incdec_property_helper_SPEC_UNUSED_CONST(decrement_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ zval *container;
- zval *offset = &opline->op2.u.constant;
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ offset = opline->op2.zv;
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
} else {
zval *retval;
@@ -17518,18 +21763,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_CON
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (0) {
zval_ptr_dtor(&offset);
@@ -17538,137 +21775,182 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_CON
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = &opline->op2.u.constant;
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = opline->op2.zv;
+
if (IS_UNUSED == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = &opline->op2.u.constant;
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = opline->op2.zv;
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+
+ zval *container;
+
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ offset = opline->op2.zv;
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ } else {
+ zval *retval;
+
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1;
- zval *property = &opline->op2.u.constant;
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = opline->op2.zv;
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_UNUSED_CONST(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_res;
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *property = &opline->op2.u.constant;
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = opline->op2.zv;
if (IS_UNUSED == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -17678,48 +21960,47 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CONST_HANDLER(ZEND_OP
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *property_name = &opline->op2.u.constant;
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property_name = opline->op2.zv;
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -17727,14 +22008,17 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_CHAR_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zval *str = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+ zval *str = &EX_T(opline->result.var).tmp_var;
+
+ SAVE_OPLINE();
if (IS_UNUSED == IS_UNUSED) {
/* Initialize for erealloc in add_char_to_string */
@@ -17745,16 +22029,19 @@ static int ZEND_FASTCALL ZEND_ADD_CHAR_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HA
INIT_PZVAL(str);
}
- add_char_to_string(str, str, &opline->op2.u.constant);
+ add_char_to_string(str, str, opline->op2.zv);
/* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
+ /*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_STRING_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zval *str = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+ zval *str = &EX_T(opline->result.var).tmp_var;
+
+ SAVE_OPLINE();
if (IS_UNUSED == IS_UNUSED) {
/* Initialize for erealloc in add_string_to_string */
@@ -17765,25 +22052,28 @@ static int ZEND_FASTCALL ZEND_ADD_STRING_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_
INIT_PZVAL(str);
}
- add_string_to_string(str, str, &opline->op2.u.constant);
+ add_string_to_string(str, str, opline->op2.zv);
/* FREE_OP is missing intentionally here - we're always working on the same temporary variable */
+ /*CHECK_EXCEPTION();*/
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = &opline->op2.u.constant;
+ function_name = opline->op2.zv;
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_CONST != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
@@ -17792,18 +22082,29 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER(ZEND_O
EX(object) = _get_obj_zval_ptr_unused(TSRMLS_C);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_CONST != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_CONST == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_CONST == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -17823,31 +22124,44 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER(ZEND_O
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ SAVE_OPLINE();
if (IS_UNUSED == IS_UNUSED) {
- /* namespaced constant */
- if (!zend_get_constant_ex(Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant), &EX_T(opline->result.u.var).tmp_var, NULL, opline->extended_value TSRMLS_CC)) {
+ zend_constant *c;
+ zval *retval;
+
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ c = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else if ((c = zend_quick_get_constant(opline->op2.literal + 1, opline->extended_value TSRMLS_CC)) == NULL) {
if ((opline->extended_value & IS_CONSTANT_UNQUALIFIED) != 0) {
- char *actual = (char *)zend_memrchr(Z_STRVAL(opline->op2.u.constant), '\\', Z_STRLEN(opline->op2.u.constant));
+ char *actual = (char *)zend_memrchr(Z_STRVAL_P(opline->op2.zv), '\\', Z_STRLEN_P(opline->op2.zv));
if(!actual) {
- actual = Z_STRVAL(opline->op2.u.constant);
+ actual = Z_STRVAL_P(opline->op2.zv);
} else {
actual++;
}
/* non-qualified constant - allow text substitution */
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'", actual, actual);
- ZVAL_STRINGL(&EX_T(opline->result.u.var).tmp_var, actual, Z_STRLEN(opline->op2.u.constant)-(actual - Z_STRVAL(opline->op2.u.constant)), 1);
+ ZVAL_STRINGL(&EX_T(opline->result.var).tmp_var, actual, Z_STRLEN_P(opline->op2.zv)-(actual - Z_STRVAL_P(opline->op2.zv)), 1);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
} else {
- zend_error_noreturn(E_ERROR, "Undefined constant '%s'",
- Z_STRVAL(opline->op2.u.constant), Z_STRVAL(opline->op2.u.constant));
+ zend_error_noreturn(E_ERROR, "Undefined constant '%s'", Z_STRVAL_P(opline->op2.zv));
}
+ } else {
+ CACHE_PTR(opline->op2.literal->cache_slot, c);
}
+ retval = &EX_T(opline->result.var).tmp_var;
+ ZVAL_COPY_VALUE(retval, &c->value);
+ zval_copy_ctor(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
/* class constant */
@@ -17855,16 +22169,32 @@ static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPC
zval **value;
if (IS_UNUSED == IS_CONST) {
-
- ce = zend_fetch_class(Z_STRVAL(opline->op1.u.constant), Z_STRLEN(opline->op1.u.constant), opline->extended_value TSRMLS_CC);
- if (!ce) {
- zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant));
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ value = CACHED_PTR(opline->op2.literal->cache_slot);
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ } else if (CACHED_PTR(opline->op1.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op1.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op1.zv), Z_STRLEN_P(opline->op1.zv), opline->op1.literal + 1, opline->extended_value TSRMLS_CC);
+ if (UNEXPECTED(ce == NULL)) {
+ zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(opline->op2.zv));
+ }
+ CACHE_PTR(opline->op1.literal->cache_slot, ce);
}
} else {
- ce = EX_T(opline->op1.u.var).class_entry;
+ ce = EX_T(opline->op1.var).class_entry;
+ if ((value = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce)) != NULL) {
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
}
- if (zend_hash_find(&ce->constants_table, Z_STRVAL(opline->op2.u.constant), Z_STRLEN(opline->op2.u.constant)+1, (void **) &value) == SUCCESS) {
+ if (EXPECTED(zend_hash_quick_find(&ce->constants_table, Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv)+1, Z_HASH_P(opline->op2.zv), (void **) &value) == SUCCESS)) {
if (Z_TYPE_PP(value) == IS_CONSTANT_ARRAY ||
(Z_TYPE_PP(value) & IS_CONSTANT_TYPE_MASK) == IS_CONSTANT) {
zend_class_entry *old_scope = EG(scope);
@@ -17873,21 +22203,27 @@ static int ZEND_FASTCALL ZEND_FETCH_CONSTANT_SPEC_UNUSED_CONST_HANDLER(ZEND_OPC
zval_update_constant(value, (void *) 1 TSRMLS_CC);
EG(scope) = old_scope;
}
- EX_T(opline->result.u.var).tmp_var = **value;
- zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
+ if (IS_UNUSED == IS_CONST) {
+ CACHE_PTR(opline->op2.literal->cache_slot, value);
+ } else {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, ce, value);
+ }
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, *value);
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
} else {
- zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL(opline->op2.u.constant));
+ zend_error_noreturn(E_ERROR, "Undefined class constant '%s'", Z_STRVAL_P(opline->op2.zv));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_UNUSED == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_UNUSED != IS_UNUSED
@@ -17899,15 +22235,18 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = &opline->op2.u.constant;
+ offset = opline->op2.zv;
if (IS_UNUSED != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -17916,37 +22255,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_H
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_CONST == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -17962,7 +22303,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_H
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (0) {
@@ -17986,15 +22327,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_H
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *offset = &opline->op2.u.constant;
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ offset = opline->op2.zv;
if (IS_UNUSED != IS_VAR || container) {
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -18005,7 +22351,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_H
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -18021,137 +22367,149 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_H
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CONST(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (IS_UNUSED != IS_VAR || container) {
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *offset = &opline->op2.u.constant;
+ offset = opline->op2.zv;
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- ht = Z_ARRVAL_PP(container);
+ ht = Z_ARRVAL_PP(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_CONST == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
- break;
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
- }
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
- } else {
- result = 1;
- }
- break;
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
+ }
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (0) {
- MAKE_REAL_ZVAL_PTR(offset);
- }
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (0) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
-
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
+
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
+ }
- } else {
+ } else {
- }
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -18167,33 +22525,30 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_CONST_HANDLER(
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op2, free_op_data1;
zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
zval *object;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
zval_dtor(free_op2.var);
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -18204,16 +22559,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -18223,7 +22578,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -18245,22 +22600,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -18274,17 +22629,19 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_TMP(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2, free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
@@ -18292,48 +22649,51 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_TMP(int (*bina
case ZEND_ASSIGN_DIM: {
zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_UNUSED == IS_VAR && !0) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *dim = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 1, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_TMP_VAR, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ value = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
var_ptr = NULL;
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -18345,17 +22705,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_TMP(int (*bina
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
zval_dtor(free_op2.var);
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
- }
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+
+ CHECK_EXCEPTION();
+ }
ZEND_VM_NEXT_OPCODE();
}
@@ -18416,29 +22781,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
zval_dtor(free_op2.var);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -18449,13 +22820,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -18464,9 +22835,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -18480,14 +22851,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -18498,6 +22869,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_
zval_dtor(free_op2.var);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -18513,26 +22885,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_H
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_TMP(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
zval_dtor(free_op2.var);
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -18543,12 +22921,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_TMP(incdec
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -18558,10 +22936,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_TMP(incdec
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -18571,20 +22949,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_TMP(incdec
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -18594,6 +22971,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_TMP(incdec
zval_dtor(free_op2.var);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -18607,22 +22985,23 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_
return zend_post_incdec_property_helper_SPEC_UNUSED_TMP(decrement_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ zval *container;
zend_free_op free_op2;
- zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
zval_dtor(free_op2.var);
} else {
zval *retval;
@@ -18632,18 +23011,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (1) {
zval_ptr_dtor(&offset);
@@ -18652,137 +23023,182 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
if (IS_UNUSED == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+
+ zval *container;
+ zend_free_op free_op2;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ zval_dtor(free_op2.var);
+ } else {
+ zval *retval;
+
+ if (1) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (1) {
+ zval_ptr_dtor(&offset);
+ } else {
+ zval_dtor(free_op2.var);
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_UNUSED_TMP(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_res;
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_UNUSED == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -18792,48 +23208,47 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCO
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *property_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (1) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property_name);
} else {
@@ -18841,19 +23256,23 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HA
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *str = &EX_T(opline->result.u.var).tmp_var;
- zval *var = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *str = &EX_T(opline->result.var).tmp_var;
+ zval *var;
zval var_copy;
int use_copy = 0;
+ SAVE_OPLINE();
+ var = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
if (IS_UNUSED == IS_UNUSED) {
/* Initialize for erealloc in add_string_to_string */
Z_STRVAL_P(str) = NULL;
@@ -18883,22 +23302,25 @@ static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDL
*/
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op2;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_TMP_VAR != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
@@ -18907,18 +23329,29 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_TMP_HANDLER(ZEND_OPC
EX(object) = _get_obj_zval_ptr_unused(TSRMLS_C);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_TMP_VAR != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_TMP_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_TMP_VAR == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -18939,14 +23372,15 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_TMP_HANDLER(ZEND_OPC
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_UNUSED == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_UNUSED != IS_UNUSED
@@ -18958,15 +23392,18 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HA
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_UNUSED != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -18975,37 +23412,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HAN
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_TMP_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -19021,7 +23460,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HAN
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (1) {
@@ -19045,15 +23484,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HAN
zval_dtor(free_op2.var);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_UNUSED != IS_VAR || container) {
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -19064,7 +23508,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HAN
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -19080,137 +23524,149 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HAN
zval_dtor(free_op2.var);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_TMP(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (IS_UNUSED != IS_VAR || container) {
- zend_free_op free_op2;
- zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- ht = Z_ARRVAL_PP(container);
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ ht = Z_ARRVAL_PP(container);
- break;
- }
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_TMP_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
} else {
- result = 1;
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
- zval_dtor(free_op2.var);
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (1) {
- MAKE_REAL_ZVAL_PTR(offset);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ }
+ zval_dtor(free_op2.var);
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (1) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (1) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
- zval_dtor(free_op2.var);
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (1) {
+ zval_ptr_dtor(&offset);
+ } else {
+ zval_dtor(free_op2.var);
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
- zval_dtor(free_op2.var);
- } else {
- zval_dtor(free_op2.var);
}
+ zval_dtor(free_op2.var);
+ } else {
+ zval_dtor(free_op2.var);
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -19226,33 +23682,30 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_TMP_HANDLER(ZE
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op2, free_op_data1;
zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
zval *object;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -19263,16 +23716,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -19282,7 +23735,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -19304,22 +23757,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -19333,17 +23786,19 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_VAR(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2, free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
@@ -19351,48 +23806,51 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_VAR(int (*bina
case ZEND_ASSIGN_DIM: {
zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_UNUSED == IS_VAR && !0) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *dim = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_VAR, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ value = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
var_ptr = NULL;
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -19404,17 +23862,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_VAR(int (*bina
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
- }
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+
+ CHECK_EXCEPTION();
+ }
ZEND_VM_NEXT_OPCODE();
}
@@ -19475,29 +23938,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_VAR(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -19508,13 +23977,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_VAR(incdec_
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -19523,9 +23992,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_VAR(incdec_
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -19539,14 +24008,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_VAR(incdec_
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -19557,6 +24026,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_VAR(incdec_
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -19572,26 +24042,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_H
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_VAR(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -19602,12 +24078,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_VAR(incdec
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -19617,10 +24093,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_VAR(incdec
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -19630,20 +24106,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_VAR(incdec
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -19653,6 +24128,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_VAR(incdec
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -19666,22 +24142,23 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_
return zend_post_incdec_property_helper_SPEC_UNUSED_VAR(decrement_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ zval *container;
zend_free_op free_op2;
- zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
} else {
zval *retval;
@@ -19691,18 +24168,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (0) {
zval_ptr_dtor(&offset);
@@ -19711,137 +24180,182 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
if (IS_UNUSED == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+
+ zval *container;
+ zend_free_op free_op2;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else {
+ zval *retval;
+
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_UNUSED_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_res;
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_UNUSED == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -19851,48 +24365,47 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCO
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *property_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -19900,19 +24413,23 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HA
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *str = &EX_T(opline->result.u.var).tmp_var;
- zval *var = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *str = &EX_T(opline->result.var).tmp_var;
+ zval *var;
zval var_copy;
int use_copy = 0;
+ SAVE_OPLINE();
+ var = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
if (IS_UNUSED == IS_UNUSED) {
/* Initialize for erealloc in add_string_to_string */
Z_STRVAL_P(str) = NULL;
@@ -19942,22 +24459,25 @@ static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDL
*/
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op2;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_VAR != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
@@ -19966,18 +24486,29 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_VAR_HANDLER(ZEND_OPC
EX(object) = _get_obj_zval_ptr_unused(TSRMLS_C);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_VAR != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_VAR == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -19998,14 +24529,15 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_VAR_HANDLER(ZEND_OPC
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_UNUSED == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_UNUSED != IS_UNUSED
@@ -20017,15 +24549,18 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HA
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_UNUSED != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -20034,37 +24569,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HAN
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -20080,7 +24617,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HAN
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (0) {
@@ -20104,15 +24641,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HAN
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_UNUSED != IS_VAR || container) {
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -20123,7 +24665,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HAN
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -20139,137 +24681,149 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HAN
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_VAR(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (IS_UNUSED != IS_VAR || container) {
- zend_free_op free_op2;
- zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- ht = Z_ARRVAL_PP(container);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- break;
- }
+ ht = Z_ARRVAL_PP(container);
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
} else {
- result = 1;
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (0) {
- MAKE_REAL_ZVAL_PTR(offset);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ }
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (0) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- } else {
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else {
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -20285,33 +24839,30 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_VAR_HANDLER(ZE
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op_data1;
zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
zval *object;
zval *property = NULL;
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -20322,16 +24873,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -20341,7 +24892,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -20363,22 +24914,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -20392,17 +24943,19 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
@@ -20410,21 +24963,19 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(int (*b
case ZEND_ASSIGN_DIM: {
zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_UNUSED == IS_VAR && !0) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
zval *dim = NULL;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_UNUSED, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
@@ -20435,23 +24986,28 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(int (*b
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -20463,16 +25019,21 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_UNUSED(int (*b
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
- }
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+
+ CHECK_EXCEPTION();
+ }
ZEND_VM_NEXT_OPCODE();
}
@@ -20533,9 +25094,9 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPC
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_UNUSED == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_UNUSED != IS_UNUSED
@@ -20547,33 +25108,30 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_UNUSED_HANDLER(ZEND_OPCODE
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op_data1;
zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
zval *object;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -20584,16 +25142,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*b
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -20603,7 +25161,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*b
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -20625,22 +25183,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*b
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -20654,17 +25212,19 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*b
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_CV(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
@@ -20672,48 +25232,51 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_CV(int (*binar
case ZEND_ASSIGN_DIM: {
zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_UNUSED == IS_VAR && !0) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *dim = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_CV, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
var_ptr = NULL;
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -20725,16 +25288,21 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_UNUSED_CV(int (*binar
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
- }
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+
+ CHECK_EXCEPTION();
+ }
ZEND_VM_NEXT_OPCODE();
}
@@ -20795,29 +25363,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -20828,13 +25402,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -20843,9 +25417,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -20859,14 +25433,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -20877,6 +25451,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -20892,26 +25467,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HA
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -20922,12 +25503,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -20937,10 +25518,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -20950,20 +25531,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -20973,6 +25553,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -20986,22 +25567,23 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_H
return zend_post_incdec_property_helper_SPEC_UNUSED_CV(decrement_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ zval *container;
- zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
} else {
zval *retval;
@@ -21011,18 +25593,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (0) {
zval_ptr_dtor(&offset);
@@ -21031,137 +25605,182 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
if (IS_UNUSED == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+
+ zval *container;
+
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_unused(TSRMLS_C);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ } else {
+ zval *retval;
+
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_UNUSED_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_res;
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (IS_UNUSED == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -21171,48 +25790,47 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CV_HANDLER(ZEND_OPCOD
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_UNUSED == IS_VAR && !container) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_UNUSED == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_UNUSED == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
- zval **object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *property_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ property_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_UNUSED == IS_VAR && !object_ptr) {
+ if (IS_UNUSED == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -21220,19 +25838,23 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAN
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *str = &EX_T(opline->result.u.var).tmp_var;
- zval *var = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *str = &EX_T(opline->result.var).tmp_var;
+ zval *var;
zval var_copy;
int use_copy = 0;
+ SAVE_OPLINE();
+ var = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
if (IS_UNUSED == IS_UNUSED) {
/* Initialize for erealloc in add_string_to_string */
Z_STRVAL_P(str) = NULL;
@@ -21261,22 +25883,25 @@ static int ZEND_FASTCALL ZEND_ADD_VAR_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLE
* string offsets or overloaded objects
*/
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ function_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_CV != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
@@ -21285,18 +25910,29 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CV_HANDLER(ZEND_OPCO
EX(object) = _get_obj_zval_ptr_unused(TSRMLS_C);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_CV != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_CV == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_CV == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -21316,14 +25952,15 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CV_HANDLER(ZEND_OPCO
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_UNUSED == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_UNUSED != IS_UNUSED
@@ -21335,15 +25972,18 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAN
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (IS_UNUSED != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -21352,37 +25992,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAND
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_CV == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -21398,7 +26040,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAND
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (0) {
@@ -21422,15 +26064,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAND
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ zval **container;
+ zval *offset;
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (IS_UNUSED != IS_VAR || container) {
if (IS_UNUSED == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -21441,7 +26088,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAND
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -21457,137 +26104,149 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HAND
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CV(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (IS_UNUSED != IS_VAR || container) {
+ SAVE_OPLINE();
+ container = _get_obj_zval_ptr_ptr_unused(TSRMLS_C);
- zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- ht = Z_ARRVAL_PP(container);
+ ht = Z_ARRVAL_PP(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_CV == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
- break;
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
- }
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
- } else {
- result = 1;
- }
- break;
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
+ }
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (0) {
- MAKE_REAL_ZVAL_PTR(offset);
- }
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (0) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
-
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
+
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
+ }
- } else {
+ } else {
- }
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -21603,189 +26262,219 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_UNUSED_CV_HANDLER(ZEN
static int ZEND_FASTCALL ZEND_BW_NOT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_not_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_not_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_NOT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- boolean_not_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_not_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_PRE_INC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **var_ptr;
+
+ SAVE_OPLINE();
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !var_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (IS_CV == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (IS_CV == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- increment_function(val);
+ fast_increment_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- increment_function(*var_ptr);
+ fast_increment_function(*var_ptr);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_PRE_DEC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **var_ptr;
+
+ SAVE_OPLINE();
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !var_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (IS_CV == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (IS_CV == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- decrement_function(val);
+ fast_decrement_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- decrement_function(*var_ptr);
+ fast_decrement_function(*var_ptr);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_POST_INC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ zval **var_ptr, *retval;
- zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ SAVE_OPLINE();
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !var_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (IS_CV == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).tmp_var = *EG(uninitialized_zval_ptr);
- }
+ if (IS_CV == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ ZVAL_NULL(&EX_T(opline->result.var).tmp_var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
- EX_T(opline->result.u.var).tmp_var = **var_ptr;
- zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
+ retval = &EX_T(opline->result.var).tmp_var;
+ ZVAL_COPY_VALUE(retval, *var_ptr);
+ zendi_zval_copy_ctor(*retval);
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- increment_function(val);
+ fast_increment_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- increment_function(*var_ptr);
+ fast_increment_function(*var_ptr);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_POST_DEC_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ zval **var_ptr, *retval;
- zval **var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ SAVE_OPLINE();
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !var_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
- if (IS_CV == IS_VAR && *var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).tmp_var = *EG(uninitialized_zval_ptr);
- }
+ if (IS_CV == IS_VAR && UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ ZVAL_NULL(&EX_T(opline->result.var).tmp_var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
- EX_T(opline->result.u.var).tmp_var = **var_ptr;
- zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
+ retval = &EX_T(opline->result.var).tmp_var;
+ ZVAL_COPY_VALUE(retval, *var_ptr);
+ zendi_zval_copy_ctor(*retval);
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *val = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
Z_ADDREF_P(val);
- decrement_function(val);
+ fast_decrement_function(val);
Z_OBJ_HANDLER_PP(var_ptr, set)(var_ptr, val TSRMLS_CC);
zval_ptr_dtor(&val);
} else {
- decrement_function(*var_ptr);
+ fast_decrement_function(*var_ptr);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ECHO_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval z_copy;
- zval *z = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *z;
+
+ SAVE_OPLINE();
+ z = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
if (IS_CV != IS_CONST &&
- Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get_method != NULL) {
+ UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) &&
+ Z_OBJ_HT_P(z)->get_method != NULL) {
if (IS_CV == IS_TMP_VAR) {
INIT_PZVAL(z);
}
@@ -21799,172 +26488,42 @@ static int ZEND_FASTCALL ZEND_ECHO_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_print_variable(z);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_PRINT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_LONG;
+ USE_OPLINE
+ ZVAL_LONG(&EX_T(opline->result.var).tmp_var, 1);
return ZEND_ECHO_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
-static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV(int type, ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zend_free_op free_op1;
- zval *varname = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **retval;
- zval tmp_varname;
- HashTable *target_symbol_table;
-
- if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
- tmp_varname = *varname;
- zval_copy_ctor(&tmp_varname);
- convert_to_string(&tmp_varname);
- varname = &tmp_varname;
- }
-
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
-
- } else {
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
-/*
- if (!target_symbol_table) {
- ZEND_VM_NEXT_OPCODE();
- }
-*/
- if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &retval) == FAILURE) {
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_UNSET:
- zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
- /* break missing intentionally */
- case BP_VAR_IS:
- retval = &EG(uninitialized_zval_ptr);
- break;
- case BP_VAR_RW:
- zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
- /* break missing intentionally */
- case BP_VAR_W: {
- zval *new_zval = &EG(uninitialized_zval);
-
- Z_ADDREF_P(new_zval);
- zend_hash_update(target_symbol_table, varname->value.str.val, varname->value.str.len+1, &new_zval, sizeof(zval *), (void **) &retval);
- }
- break;
- EMPTY_SWITCH_DEFAULT_CASE()
- }
- }
- switch (opline->op2.u.EA.type) {
- case ZEND_FETCH_GLOBAL:
- if (IS_CV != IS_TMP_VAR) {
-
- }
- break;
- case ZEND_FETCH_LOCAL:
-
- break;
- case ZEND_FETCH_STATIC:
- zval_update_constant(retval, (void*) 1 TSRMLS_CC);
- break;
- case ZEND_FETCH_GLOBAL_LOCK:
- if (IS_CV == IS_VAR && !free_op1.var) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- break;
- }
- }
-
-
- if (IS_CV != IS_CONST && varname == &tmp_varname) {
- zval_dtor(varname);
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
- }
- PZVAL_LOCK(*retval);
- switch (type) {
- case BP_VAR_R:
- case BP_VAR_IS:
- AI_SET_PTR(EX_T(opline->result.u.var).var, *retval);
- break;
- case BP_VAR_UNSET: {
- zend_free_op free_res;
-
- EX_T(opline->result.u.var).var.ptr_ptr = retval;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- }
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
- FREE_OP_VAR_PTR(free_res);
- break;
- default:
- EX_T(opline->result.u.var).var.ptr_ptr = retval;
- break;
- }
- }
- }
- ZEND_VM_NEXT_OPCODE();
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CV(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CV(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CV(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CV(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), EX(opline)->extended_value)?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CV(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
-static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- return zend_fetch_var_address_helper_SPEC_CV(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
-}
-
static int ZEND_FASTCALL ZEND_JMPZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *val = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *val;
int ret;
- if (IS_CV == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
ret = i_zend_is_true(val);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (!ret) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
@@ -21973,25 +26532,28 @@ static int ZEND_FASTCALL ZEND_JMPZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *val = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *val;
int ret;
- if (IS_CV == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
ret = i_zend_is_true(val);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (ret) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
@@ -22000,18 +26562,21 @@ static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *val = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *val;
int retval;
- if (IS_CV == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
if (EXPECTED(retval != 0)) {
@@ -22022,36 +26587,39 @@ static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
ZEND_VM_CONTINUE(); /* CHECK_ME */
} else {
#if DEBUG_ZEND>=2
- printf("Conditional jmp on false to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp on false to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.u.opline_num]);
+ ZEND_VM_SET_OPCODE(&EX(op_array)->opcodes[opline->op2.opline_num]);
ZEND_VM_CONTINUE(); /* CHECK_ME */
}
}
static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *val = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *val;
int retval;
- if (IS_CV == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
if (!retval) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
ZEND_VM_NEXT_OPCODE();
@@ -22059,27 +26627,30 @@ static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *val = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *val;
int retval;
- if (IS_CV == IS_TMP_VAR && Z_TYPE_P(val) == IS_BOOL) {
+ SAVE_OPLINE();
+ val = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
retval = i_zend_is_true(val);
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_CONTINUE();
+ HANDLE_EXCEPTION();
}
}
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = retval;
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = retval;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
if (retval) {
#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- ZEND_VM_SET_OPCODE(opline->op2.u.jmp_addr);
+ ZEND_VM_SET_OPCODE(opline->op2.jmp_addr);
ZEND_VM_CONTINUE();
}
ZEND_VM_NEXT_OPCODE();
@@ -22087,94 +26658,125 @@ static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
static int ZEND_FASTCALL ZEND_RETURN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *retval_ptr;
- zval **retval_ptr_ptr;
- if (EG(active_op_array)->return_reference == ZEND_RETURN_REF) {
+ SAVE_OPLINE();
+ retval_ptr = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (!EG(return_value_ptr_ptr)) {
+ if (IS_CV == IS_TMP_VAR) {
- if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
- /* Not supposed to happen, but we'll allow it */
- zend_error(E_NOTICE, "Only variable references should be returned by reference");
- goto return_by_value;
}
+ } else if (!0) { /* Not a temp var */
+ if (IS_CV == IS_CONST ||
+ (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
+ zval *ret;
- retval_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ zval_copy_ctor(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else if ((IS_CV == IS_CV || IS_CV == IS_VAR) &&
+ retval_ptr == &EG(uninitialized_zval)) {
+ zval *ret;
- if (IS_CV == IS_VAR && !retval_ptr_ptr) {
- zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
+ ALLOC_INIT_ZVAL(ret);
+ *EG(return_value_ptr_ptr) = ret;
+ } else {
+ *EG(return_value_ptr_ptr) = retval_ptr;
+ Z_ADDREF_P(retval_ptr);
}
+ } else {
+ zval *ret;
- if (IS_CV == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) {
- if (opline->extended_value == ZEND_RETURNS_FUNCTION &&
- EX_T(opline->op1.u.var).var.fcall_returned_reference) {
- } else if (EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
- if (IS_CV == IS_VAR && !0) {
- PZVAL_LOCK(*retval_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
- }
- zend_error(E_NOTICE, "Only variable references should be returned by reference");
- goto return_by_value;
- }
- }
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
+ *EG(return_value_ptr_ptr) = ret;
+ }
- if (EG(return_value_ptr_ptr)) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
- Z_ADDREF_PP(retval_ptr_ptr);
+ return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
- (*EG(return_value_ptr_ptr)) = (*retval_ptr_ptr);
- }
- } else {
-return_by_value:
+static int ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval *retval_ptr;
+ zval **retval_ptr_ptr;
- retval_ptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- if (!EG(return_value_ptr_ptr)) {
- if (IS_CV == IS_TMP_VAR) {
+ SAVE_OPLINE();
- }
- } else if (!0) { /* Not a temp var */
- if (IS_CV == IS_CONST ||
- EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
- (PZVAL_IS_REF(retval_ptr) && Z_REFCOUNT_P(retval_ptr) > 0)) {
+ do {
+ if (IS_CV == IS_CONST || IS_CV == IS_TMP_VAR) {
+ /* Not supposed to happen, but we'll allow it */
+ zend_error(E_NOTICE, "Only variable references should be returned by reference");
+
+ retval_ptr = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (!EG(return_value_ptr_ptr)) {
+ if (IS_CV == IS_TMP_VAR) {
+
+ }
+ } else if (!0) { /* Not a temp var */
zval *ret;
ALLOC_ZVAL(ret);
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
- } else if ((IS_CV == IS_CV || IS_CV == IS_VAR) &&
- retval_ptr == &EG(uninitialized_zval)) {
+ } else {
zval *ret;
- ALLOC_INIT_ZVAL(ret);
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, retval_ptr);
*EG(return_value_ptr_ptr) = ret;
- } else {
- *EG(return_value_ptr_ptr) = retval_ptr;
- Z_ADDREF_P(retval_ptr);
}
- } else {
- zval *ret;
+ break;
+ }
- ALLOC_ZVAL(ret);
- INIT_PZVAL_COPY(ret, retval_ptr);
- *EG(return_value_ptr_ptr) = ret;
+ retval_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(retval_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot return string offsets by reference");
}
- }
+
+ if (IS_CV == IS_VAR && !Z_ISREF_PP(retval_ptr_ptr)) {
+ if (opline->extended_value == ZEND_RETURNS_FUNCTION &&
+ EX_T(opline->op1.var).var.fcall_returned_reference) {
+ } else if (EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr) {
+ zend_error(E_NOTICE, "Only variable references should be returned by reference");
+ if (EG(return_value_ptr_ptr)) {
+ retval_ptr = *retval_ptr_ptr;
+ *EG(return_value_ptr_ptr) = retval_ptr;
+ Z_ADDREF_P(retval_ptr);
+ }
+ break;
+ }
+ }
+
+ if (EG(return_value_ptr_ptr)) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr_ptr);
+ Z_ADDREF_PP(retval_ptr_ptr);
+
+ *EG(return_value_ptr_ptr) = *retval_ptr_ptr;
+ }
+ } while (0);
return zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_THROW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *value;
zval *exception;
- value = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ SAVE_OPLINE();
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_CONST || Z_TYPE_P(value) != IS_OBJECT) {
+ if (IS_CV == IS_CONST || UNEXPECTED(Z_TYPE_P(value) != IS_OBJECT)) {
zend_error_noreturn(E_ERROR, "Can only throw objects");
}
zend_exception_save(TSRMLS_C);
@@ -22188,40 +26790,15 @@ static int ZEND_FASTCALL ZEND_THROW_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_throw_exception_object(exception TSRMLS_CC);
zend_exception_restore(TSRMLS_C);
- ZEND_VM_NEXT_OPCODE();
-}
-
-static int ZEND_FASTCALL ZEND_SEND_VAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- if (opline->extended_value==ZEND_DO_FCALL_BY_NAME
- && ARG_MUST_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
- zend_error_noreturn(E_ERROR, "Cannot pass parameter %d by reference", opline->op2.u.opline_num);
- }
- {
- zval *valptr;
- zval *value;
-
-
- value = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
-
- ALLOC_ZVAL(valptr);
- INIT_PZVAL_COPY(valptr, value);
- if (!0) {
- zval_copy_ctor(valptr);
- }
- zend_vm_stack_push(valptr TSRMLS_CC);
-
- }
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
static int ZEND_FASTCALL zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *varptr;
- varptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ varptr = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
if (varptr == &EG(uninitialized_zval)) {
ALLOC_ZVAL(varptr);
@@ -22231,7 +26808,7 @@ static int ZEND_FASTCALL zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARG
zval *original_var = varptr;
ALLOC_ZVAL(varptr);
- *varptr = *original_var;
+ ZVAL_COPY_VALUE(varptr, original_var);
Z_UNSET_ISREF_P(varptr);
Z_SET_REFCOUNT_P(varptr, 0);
zval_copy_ctor(varptr);
@@ -22240,34 +26817,36 @@ static int ZEND_FASTCALL zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARG
zend_vm_stack_push(varptr TSRMLS_CC);
; /* for string offsets */
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
zval *varptr;
+ SAVE_OPLINE();
if (opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) { /* Had function_ptr at compile_time */
if (!(opline->extended_value & ZEND_ARG_SEND_BY_REF)) {
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
- } else if (!ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ } else if (!ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
if (IS_CV == IS_VAR &&
(opline->extended_value & ZEND_ARG_SEND_FUNCTION) &&
- EX_T(opline->op1.u.var).var.fcall_returned_reference &&
- EX_T(opline->op1.u.var).var.ptr) {
- varptr = EX_T(opline->op1.u.var).var.ptr;
+ EX_T(opline->op1.var).var.fcall_returned_reference &&
+ EX_T(opline->op1.var).var.ptr) {
+ varptr = EX_T(opline->op1.var).var.ptr;
PZVAL_UNLOCK_EX(varptr, &free_op1, 0);
} else {
- varptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ varptr = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
}
if ((!(opline->extended_value & ZEND_ARG_SEND_FUNCTION) ||
- EX_T(opline->op1.u.var).var.fcall_returned_reference) &&
+ EX_T(opline->op1.var).var.fcall_returned_reference) &&
varptr != &EG(uninitialized_zval) &&
(PZVAL_IS_REF(varptr) ||
(Z_REFCOUNT_P(varptr) == 1 && (IS_CV == IS_CV || free_op1.var)))) {
@@ -22279,7 +26858,7 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
!(opline->extended_value & ZEND_ARG_SEND_SILENT) :
- !ARG_MAY_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ !ARG_MAY_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
zend_error(E_STRICT, "Only variables should be passed by reference");
}
ALLOC_ZVAL(valptr);
@@ -22290,28 +26869,32 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
zend_vm_stack_push(valptr TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval **varptr_ptr;
zval *varptr;
- varptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && !varptr_ptr) {
+ SAVE_OPLINE();
+ varptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(varptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
}
- if (IS_CV == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
+ if (IS_CV == IS_VAR && UNEXPECTED(*varptr_ptr == &EG(error_zval))) {
ALLOC_INIT_ZVAL(varptr);
zend_vm_stack_push(varptr TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
- if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
@@ -22320,51 +26903,57 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
Z_ADDREF_P(varptr);
zend_vm_stack_push(varptr TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SEND_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
if ((opline->extended_value == ZEND_DO_FCALL_BY_NAME)
- && ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ && ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.opline_num)) {
return ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+ SAVE_OPLINE();
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_BOOL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ zval *retval = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
/* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = i_zend_is_true(_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC));
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC)));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *obj = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *obj;
zend_class_entry *ce;
zend_function *clone;
zend_object_clone_obj_t clone_call;
+ SAVE_OPLINE();
+ obj = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
if (IS_CV == IS_CONST ||
- (IS_CV == IS_VAR && !obj) ||
- Z_TYPE_P(obj) != IS_OBJECT) {
+ UNEXPECTED(Z_TYPE_P(obj) != IS_OBJECT)) {
zend_error_noreturn(E_ERROR, "__clone method called on non-object");
}
ce = Z_OBJCE_P(obj);
clone = ce ? ce->clone : NULL;
clone_call = Z_OBJ_HT_P(obj)->clone_obj;
- if (!clone_call) {
+ if (UNEXPECTED(clone_call == NULL)) {
if (ce) {
zend_error_noreturn(E_ERROR, "Trying to clone an uncloneable object of class %s", ce->name);
} else {
@@ -22376,42 +26965,49 @@ static int ZEND_FASTCALL ZEND_CLONE_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (clone->op_array.fn_flags & ZEND_ACC_PRIVATE) {
/* Ensure that if we're calling a private function, we're allowed to do so.
*/
- if (ce != EG(scope)) {
+ if (UNEXPECTED(ce != EG(scope))) {
zend_error_noreturn(E_ERROR, "Call to private %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
} else if ((clone->common.fn_flags & ZEND_ACC_PROTECTED)) {
/* Ensure that if we're calling a protected function, we're allowed to do so.
*/
- if (!zend_check_protected(clone->common.scope, EG(scope))) {
+ if (UNEXPECTED(!zend_check_protected(clone->common.scope, EG(scope)))) {
zend_error_noreturn(E_ERROR, "Call to protected %s::__clone() from context '%s'", ce->name, EG(scope) ? EG(scope)->name : "");
}
}
}
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- if (!EG(exception)) {
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- Z_OBJVAL_P(EX_T(opline->result.u.var).var.ptr) = clone_call(obj TSRMLS_CC);
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_OBJECT;
- Z_SET_REFCOUNT_P(EX_T(opline->result.u.var).var.ptr, 1);
- Z_SET_ISREF_P(EX_T(opline->result.u.var).var.ptr);
- if (!RETURN_VALUE_USED(opline) || EG(exception)) {
- zval_ptr_dtor(&EX_T(opline->result.u.var).var.ptr);
+ if (EXPECTED(EG(exception) == NULL)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ Z_OBJVAL_P(retval) = clone_call(obj TSRMLS_CC);
+ Z_TYPE_P(retval) = IS_OBJECT;
+ Z_SET_REFCOUNT_P(retval, 1);
+ Z_SET_ISREF_P(retval);
+ if (!RETURN_VALUE_USED(opline) || UNEXPECTED(EG(exception) != NULL)) {
+ zval_ptr_dtor(&retval);
+ } else {
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ zval *expr;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- zval *expr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ SAVE_OPLINE();
+ expr = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
if (opline->extended_value != IS_STRING) {
- *result = *expr;
+ ZVAL_COPY_VALUE(result, expr);
if (!0) {
zendi_zval_copy_ctor(*result);
}
@@ -22435,12 +27031,12 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_make_printable_zval(expr, &var_copy, &use_copy);
if (use_copy) {
- *result = var_copy;
+ ZVAL_COPY_VALUE(result, &var_copy);
if (0) {
}
} else {
- *result = *expr;
+ ZVAL_COPY_VALUE(result, expr);
if (!0) {
zendi_zval_copy_ctor(*result);
}
@@ -22455,36 +27051,37 @@ static int ZEND_FASTCALL ZEND_CAST_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
break;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_op_array *new_op_array=NULL;
- int return_value_used;
- zval *inc_filename = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *inc_filename;
zval tmp_inc_filename;
zend_bool failure_retval=0;
+ SAVE_OPLINE();
+ inc_filename = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
if (inc_filename->type!=IS_STRING) {
- tmp_inc_filename = *inc_filename;
+ ZVAL_COPY_VALUE(&tmp_inc_filename, inc_filename);
zval_copy_ctor(&tmp_inc_filename);
convert_to_string(&tmp_inc_filename);
inc_filename = &tmp_inc_filename;
}
- return_value_used = RETURN_VALUE_USED(opline);
-
- if (Z_LVAL(opline->op2.u.constant) != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
- if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE || Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE) {
+ if (opline->extended_value != ZEND_EVAL && strlen(Z_STRVAL_P(inc_filename)) != Z_STRLEN_P(inc_filename)) {
+ if (opline->extended_value == ZEND_INCLUDE_ONCE || opline->extended_value == ZEND_INCLUDE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
}
} else {
- switch (Z_LVAL(opline->op2.u.constant)) {
+ switch (opline->extended_value) {
case ZEND_INCLUDE_ONCE:
case ZEND_REQUIRE_ONCE: {
zend_file_handle file_handle;
@@ -22506,14 +27103,14 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
}
if (zend_hash_add_empty_element(&EG(included_files), file_handle.opened_path, strlen(file_handle.opened_path)+1)==SUCCESS) {
- new_op_array = zend_compile_file(&file_handle, (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
+ new_op_array = zend_compile_file(&file_handle, (opline->extended_value==ZEND_INCLUDE_ONCE?ZEND_INCLUDE:ZEND_REQUIRE) TSRMLS_CC);
zend_destroy_file_handle(&file_handle TSRMLS_CC);
} else {
zend_file_handle_dtor(&file_handle TSRMLS_CC);
failure_retval=1;
}
} else {
- if (Z_LVAL(opline->op2.u.constant)==ZEND_INCLUDE_ONCE) {
+ if (opline->extended_value == ZEND_INCLUDE_ONCE) {
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
} else {
zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, Z_STRVAL_P(inc_filename) TSRMLS_CC);
@@ -22526,7 +27123,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
break;
case ZEND_INCLUDE:
case ZEND_REQUIRE:
- new_op_array = compile_filename(Z_LVAL(opline->op2.u.constant), inc_filename TSRMLS_CC);
+ new_op_array = compile_filename(opline->extended_value, inc_filename TSRMLS_CC);
break;
case ZEND_EVAL: {
char *eval_desc = zend_make_compiled_string_description("eval()'d code" TSRMLS_CC);
@@ -22542,12 +27139,18 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
zval_dtor(&tmp_inc_filename);
}
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- if (new_op_array && !EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
+ HANDLE_EXCEPTION();
+ } else if (EXPECTED(new_op_array != NULL)) {
EX(original_return_value) = EG(return_value_ptr_ptr);
- EG(return_value_ptr_ptr) = return_value_used ? EX_T(opline->result.u.var).var.ptr_ptr : NULL;
EG(active_op_array) = new_op_array;
- EX_T(opline->result.u.var).var.ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
+ EX_T(opline->result.var).var.ptr = NULL;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ EG(return_value_ptr_ptr) = EX_T(opline->result.var).var.ptr_ptr;
+ } else {
+ EG(return_value_ptr_ptr) = NULL;
+ }
EX(current_object) = EX(object);
@@ -22558,8 +27161,7 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
zend_rebuild_symbol_table(TSRMLS_C);
}
- if (zend_execute == execute) {
- EX(call_opline) = opline;
+ if (EXPECTED(zend_execute == execute)) {
ZEND_VM_ENTER();
} else {
zend_execute(new_op_array TSRMLS_CC);
@@ -22568,121 +27170,39 @@ static int ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL
EX(function_state).function = (zend_function *) EX(op_array);
EX(object) = EX(current_object);
- if (return_value_used) {
- if (!EX_T(opline->result.u.var).var.ptr) { /* there was no return statement */
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = 1;
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
- }
- }
-
EG(opline_ptr) = &EX(opline);
EG(active_op_array) = EX(op_array);
EG(return_value_ptr_ptr) = EX(original_return_value);
destroy_op_array(new_op_array TSRMLS_CC);
efree(new_op_array);
- if (EG(exception)) {
+ if (UNEXPECTED(EG(exception) != NULL)) {
zend_throw_exception_internal(NULL TSRMLS_CC);
- }
- } else {
- if (return_value_used) {
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_ZVAL(*EX_T(opline->result.u.var).var.ptr);
- Z_LVAL_P(EX_T(opline->result.u.var).var.ptr) = failure_retval;
- Z_TYPE_P(EX_T(opline->result.u.var).var.ptr) = IS_BOOL;
- }
- }
- ZEND_VM_NEXT_OPCODE();
-}
-
-static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
-{
- zend_op *opline = EX(opline);
- zval tmp, *varname;
- HashTable *target_symbol_table;
+ HANDLE_EXCEPTION();
+ } else if (RETURN_VALUE_USED(opline)) {
+ if (!EX_T(opline->result.var).var.ptr) { /* there was no return statement */
+ zval *retval;
-
- if (IS_CV == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
- if (EG(active_symbol_table)) {
- zend_execute_data *ex = EX(prev_execute_data);
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
-
- if (zend_hash_quick_del(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value) == SUCCESS) {
- while (ex && ex->symbol_table == EG(active_symbol_table)) {
- int i;
-
- if (ex->op_array) {
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == cv->hash_value &&
- ex->op_array->vars[i].name_len == cv->name_len &&
- !memcmp(ex->op_array->vars[i].name, cv->name, cv->name_len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
- ex = ex->prev_execute_data;
- }
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, 1);
+ INIT_PZVAL(retval);
+ EX_T(opline->result.var).var.ptr = retval;
}
- EX(CVs)[opline->op1.u.var] = NULL;
- } else if (EX(CVs)[opline->op1.u.var]) {
- zval_ptr_dtor(EX(CVs)[opline->op1.u.var]);
- EX(CVs)[opline->op1.u.var] = NULL;
}
- ZEND_VM_NEXT_OPCODE();
- }
-
- varname = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
-
- if (Z_TYPE_P(varname) != IS_STRING) {
- tmp = *varname;
- zval_copy_ctor(&tmp);
- convert_to_string(&tmp);
- varname = &tmp;
- } else if (IS_CV == IS_VAR || IS_CV == IS_CV) {
- Z_ADDREF_P(varname);
- }
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- zend_std_unset_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname) TSRMLS_CC);
- } else {
- ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
-
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
- if (zend_hash_quick_del(target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value) == SUCCESS) {
- zend_execute_data *ex = execute_data;
-
- do {
- int i;
-
- if (ex->op_array) {
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == varname->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, varname->value.str.val, varname->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
- ex = ex->prev_execute_data;
- } while (ex && ex->symbol_table == target_symbol_table);
- }
- }
+ } else if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
- if (varname == &tmp) {
- zval_dtor(&tmp);
- } else if (IS_CV == IS_VAR || IS_CV == IS_CV) {
- zval_ptr_dtor(&varname);
+ ALLOC_ZVAL(retval);
+ ZVAL_BOOL(retval, failure_retval);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
-
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *array_ptr, **array_ptr_ptr;
HashTable *fe_ht;
@@ -22690,14 +27210,18 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
zend_class_entry *ce = NULL;
zend_bool is_empty = 0;
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- array_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ SAVE_OPLINE();
+
+ if ((IS_CV == IS_CV || IS_CV == IS_VAR) &&
+ (opline->extended_value & ZEND_FE_RESET_VARIABLE)) {
+ array_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
if (array_ptr_ptr == NULL || array_ptr_ptr == &EG(uninitialized_zval_ptr)) {
- ALLOC_INIT_ZVAL(array_ptr);
+ MAKE_STD_ZVAL(array_ptr);
+ ZVAL_NULL(array_ptr);
} else if (Z_TYPE_PP(array_ptr_ptr) == IS_OBJECT) {
if(Z_OBJ_HT_PP(array_ptr_ptr)->get_class_entry == NULL) {
zend_error(E_WARNING, "foreach() cannot iterate over objects without PHP class");
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
}
ce = Z_OBJCE_PP(array_ptr_ptr);
@@ -22717,7 +27241,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
Z_ADDREF_P(array_ptr);
}
} else {
- array_ptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ array_ptr = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
if (0) { /* IS_TMP_VAR */
zval *tmp;
@@ -22753,50 +27277,35 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
if (ce && ce->get_iterator) {
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
- if (iter && !EG(exception)) {
+ if (iter && EXPECTED(EG(exception) == NULL)) {
array_ptr = zend_iterator_wrap(iter TSRMLS_CC);
} else {
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- } else {
-
- }
if (!EG(exception)) {
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Object of type %s did not create an Iterator", ce->name);
}
zend_throw_exception_internal(NULL TSRMLS_CC);
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
}
- AI_SET_PTR(EX_T(opline->result.u.var).var, array_ptr);
- PZVAL_LOCK(array_ptr);
+ EX_T(opline->result.var).fe.ptr = array_ptr;
if (iter) {
iter->index = 0;
if (iter->funcs->rewind) {
iter->funcs->rewind(iter TSRMLS_CC);
- if (EG(exception)) {
- Z_DELREF_P(array_ptr);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array_ptr);
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
- } else {
-
- }
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
}
is_empty = iter->funcs->valid(iter TSRMLS_CC) != SUCCESS;
- if (EG(exception)) {
- Z_DELREF_P(array_ptr);
+ if (UNEXPECTED(EG(exception) != NULL)) {
zval_ptr_dtor(&array_ptr);
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
-
- } else {
- }
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
iter->index = -1; /* will be set to 0 before using next handler */
} else if ((fe_ht = HASH_OF(array_ptr)) != NULL) {
@@ -22819,437 +27328,469 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
}
}
is_empty = zend_hash_has_more_elements(fe_ht) != SUCCESS;
- zend_hash_get_pointer(fe_ht, &EX_T(opline->result.u.var).fe.fe_pos);
+ zend_hash_get_pointer(fe_ht, &EX_T(opline->result.var).fe.fe_pos);
} else {
zend_error(E_WARNING, "Invalid argument supplied for foreach()");
is_empty = 1;
}
- if (opline->extended_value & ZEND_FE_RESET_VARIABLE) {
-
- } else {
-
- }
if (is_empty) {
- ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.u.opline_num);
+ ZEND_VM_JMP(EX(op_array)->opcodes+opline->op2.opline_num);
} else {
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
}
-static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL ZEND_EXIT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zval **value;
- zend_bool isset = 1;
+#if 0 || (IS_CV != IS_UNUSED)
+ USE_OPLINE
- if (IS_CV == IS_CV && (opline->extended_value & ZEND_QUICK_SET)) {
- if (EX(CVs)[opline->op1.u.var]) {
- value = EX(CVs)[opline->op1.u.var];
- } else if (EG(active_symbol_table)) {
- zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.u.var);
+ SAVE_OPLINE();
+ if (IS_CV != IS_UNUSED) {
- if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
- isset = 0;
- }
+ zval *ptr = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (Z_TYPE_P(ptr) == IS_LONG) {
+ EG(exit_status) = Z_LVAL_P(ptr);
} else {
- isset = 0;
+ zend_print_variable(ptr);
}
- } else {
- HashTable *target_symbol_table;
-
- zval tmp, *varname = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC);
- if (Z_TYPE_P(varname) != IS_STRING) {
- tmp = *varname;
- zval_copy_ctor(&tmp);
- convert_to_string(&tmp);
- varname = &tmp;
- }
+ }
+#endif
+ zend_bailout();
+ ZEND_VM_NEXT_OPCODE(); /* Never reached */
+}
- if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
- value = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1 TSRMLS_CC);
- if (!value) {
- isset = 0;
- }
- } else {
- target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), BP_VAR_IS, varname TSRMLS_CC);
- if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
- isset = 0;
- }
- }
+static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
- if (varname == &tmp) {
- zval_dtor(&tmp);
- }
+ zval *value;
- }
+ SAVE_OPLINE();
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
+ if (i_zend_is_true(value)) {
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
+ if (!0) {
+ zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
+ }
- switch (opline->extended_value & ZEND_ISSET_ISEMPTY_MASK) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
- } else {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = isset;
- }
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 1;
- } else {
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = 0;
- }
- break;
+#if DEBUG_ZEND>=2
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
+#endif
+ ZEND_VM_JMP(opline->op2.jmp_addr);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL ZEND_EXIT_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL ZEND_JMP_SET_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
-#if 0 || (IS_CV != IS_UNUSED)
- zend_op *opline = EX(opline);
- if (IS_CV != IS_UNUSED) {
+ USE_OPLINE
- zval *ptr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *value, *ret;
- if (Z_TYPE_P(ptr) == IS_LONG) {
- EG(exit_status) = Z_LVAL_P(ptr);
+ SAVE_OPLINE();
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (i_zend_is_true(value)) {
+ if (IS_CV == IS_VAR || IS_CV == IS_CV) {
+ Z_ADDREF_P(value);
+ EX_T(opline->result.var).var.ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
} else {
- zend_print_variable(ptr);
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, value);
+ EX_T(opline->result.var).var.ptr = ret;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ if (!0) {
+ zval_copy_ctor(EX_T(opline->result.var).var.ptr);
+ }
}
- }
+#if DEBUG_ZEND>=2
+ printf("Conditional jmp to %d\n", opline->op2.opline_num);
#endif
- zend_bailout();
+ ZEND_VM_JMP(opline->op2.jmp_addr);
+ }
+
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *value = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *value;
- if (i_zend_is_true(value)) {
- EX_T(opline->result.u.var).tmp_var = *value;
- zendi_zval_copy_ctor(EX_T(opline->result.u.var).tmp_var);
+ SAVE_OPLINE();
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
-#if DEBUG_ZEND>=2
- printf("Conditional jmp to %d\n", opline->op2.u.opline_num);
-#endif
- ZEND_VM_JMP(opline->op2.u.jmp_addr);
+ ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
+ if (!0) {
+ zval_copy_ctor(&EX_T(opline->result.var).tmp_var);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL ZEND_QM_ASSIGN_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL ZEND_QM_ASSIGN_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *value = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *value, *ret;
- EX_T(opline->result.u.var).tmp_var = *value;
- if (!0) {
- zval_copy_ctor(&EX_T(opline->result.u.var).tmp_var);
+ SAVE_OPLINE();
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR || IS_CV == IS_CV) {
+ Z_ADDREF_P(value);
+ EX_T(opline->result.var).var.ptr = value;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ } else {
+ ALLOC_ZVAL(ret);
+ INIT_PZVAL_COPY(ret, value);
+ EX_T(opline->result.var).var.ptr = ret;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
+ if (!0) {
+ zval_copy_ctor(EX_T(opline->result.var).var.ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *expr = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *expr;
zend_bool result;
+ SAVE_OPLINE();
+ expr = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->get_class_entry) {
- result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.u.var).class_entry TSRMLS_CC);
+ result = instanceof_function(Z_OBJCE_P(expr), EX_T(opline->op2.var).class_entry TSRMLS_CC);
} else {
result = 0;
}
- ZVAL_BOOL(&EX_T(opline->result.u.var).tmp_var, result);
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, result);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CONST(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op_data1;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
zval *object;
- zval *property = &opline->op2.u.constant;
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = opline->op2.zv;
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -23260,16 +27801,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CONST(int (*bi
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -23279,7 +27820,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CONST(int (*bi
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -23301,22 +27842,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CONST(int (*bi
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -23330,66 +27871,71 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CONST(int (*bi
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_CONST(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
break;
case ZEND_ASSIGN_DIM: {
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_CV == IS_VAR && !0) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_CV_CONST(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = &opline->op2.u.constant;
+ zval *dim = opline->op2.zv;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_CONST, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = &opline->op2.u.constant;
- var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ value = opline->op2.zv;
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -23401,16 +27947,21 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_CONST(int (*binary
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
- }
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+
+ CHECK_EXCEPTION();
+ }
ZEND_VM_NEXT_OPCODE();
}
@@ -23471,29 +28022,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_H
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = &opline->op2.u.constant;
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = opline->op2.zv;
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -23504,13 +28061,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -23519,9 +28076,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -23535,14 +28092,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -23553,6 +28110,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -23568,26 +28126,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HAN
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = &opline->op2.u.constant;
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = opline->op2.zv;
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -23598,12 +28162,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -23613,10 +28177,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -23626,20 +28190,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -23649,6 +28212,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -23662,197 +28226,340 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HA
return zend_post_incdec_property_helper_SPEC_CV_CONST(decrement_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_CV == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_CV != IS_TMP_VAR) {
+
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_CV == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
+ }
+
+
+ if (IS_CV != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_CV_CONST(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *dim = &opline->op2.u.constant;
zval **container;
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK &&
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
IS_CV != IS_CV &&
- EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = &opline->op2.u.constant;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **container;
- if (IS_CV == IS_VAR && !container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
- if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ if (UNEXPECTED(opline->extended_value != 0)) {
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ if (retval_ptr) {
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = &opline->op2.u.constant;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_RW TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *dim = &opline->op2.u.constant;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC);
+ zval **container;
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_IS TSRMLS_CC);
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_IS TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = &opline->op2.u.constant;
zval **container;
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ SAVE_OPLINE();
+
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_W TSRMLS_CC);
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
} else {
if (IS_CONST == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_R TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
- zval *dim = &opline->op2.u.constant;
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
- /* Not needed in DIM_UNSET
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- */
if (IS_CV == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, opline->op2.zv, IS_CONST, BP_VAR_UNSET TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
+ if (UNEXPECTED(EX_T(opline->result.var).var.ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot unset string offsets");
} else {
zend_free_op free_res;
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*retval_ptr, &free_res);
+ if (retval_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*retval_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
- ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_CONST(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_CONST(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *container = _get_zval_ptr_cv(&opline->op1, EX(Ts), type TSRMLS_CC);
+ zval *container;
- zval *offset = &opline->op2.u.constant;
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = opline->op2.zv;
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
} else {
zval *retval;
@@ -23862,18 +28569,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_CONST(i
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (0) {
zval_ptr_dtor(&offset);
@@ -23882,137 +28581,182 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_CONST(i
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_CV_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_CV_CONST(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = &opline->op2.u.constant;
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = opline->op2.zv;
+
if (IS_CV == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = &opline->op2.u.constant;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = opline->op2.zv;
+ container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_CV_CONST(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+
+ zval *container;
+
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = opline->op2.zv;
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ } else {
+ zval *retval;
+
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1;
- zval *property = &opline->op2.u.constant;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = opline->op2.zv;
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_CV_CONST(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_CV_CONST(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_res;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval *property = &opline->op2.u.constant;
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = opline->op2.zv;
if (IS_CV == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -24022,48 +28766,47 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
+
+ zval **object_ptr;
+ zval *property_name;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- zval *property_name = &opline->op2.u.constant;
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property_name = opline->op2.zv;
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_CV == IS_VAR && !object_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -24071,28 +28814,31 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HAND
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (Z_TYPE_PP(object_ptr) == IS_OBJECT) {
- zval *property_name = &opline->op2.u.constant;
+ zval *property_name = opline->op2.zv;
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -24101,30 +28847,46 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HAND
} else {
zend_free_op free_op_data1, free_op_data2;
zval *value;
- zval *dim = &opline->op2.u.constant;
+ zval *dim = opline->op2.zv;
zval **variable_ptr_ptr;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), object_ptr, dim, IS_CONST, BP_VAR_W TSRMLS_CC);
+
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
+ if (UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T((opline+1)->op2.var), value, (opline+1)->op1_type TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- if (!variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1);
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T((opline+1)->op2.var).str_offset.str)+EX_T((opline+1)->op2.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_TMP_FREE(free_op_data1)) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if ((opline+1)->op1_type == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if ((opline+1)->op1_type == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
FREE_OP_VAR_PTR(free_op_data2);
@@ -24132,75 +28894,110 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HAND
}
/* assign_dim has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ zval *value;
+ zval **variable_ptr_ptr;
- zval *value = &opline->op2.u.constant;
- zval **variable_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ SAVE_OPLINE();
+ value = opline->op2.zv;
+ variable_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(opline->op1.u.var), value, IS_CONST TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(opline->op1.u.var).str_offset.str)+EX_T(opline->op1.u.var).str_offset.offset, 1, 1);
+ if (IS_CV == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T(opline->op1.var), value, IS_CONST TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T(opline->op1.var).str_offset.str)+EX_T(opline->op1.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (IS_CV == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (0) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, 0 TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if (IS_CONST == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if (IS_CONST == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
/* zend_assign_to_variable() always takes care of op2, never free it! */
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = &opline->op2.u.constant;
+ function_name = opline->op2.zv;
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_CONST != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ EX(object) = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_CONST != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_CONST == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_CONST == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -24220,76 +29017,52 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CONST_HANDLER(ZEND_OPCOD
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
+ SAVE_OPLINE();
if (IS_CV==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- &opline->op2.u.constant TSRMLS_CC);
-
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ opline->op2.zv TSRMLS_CC);
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
- zval *offset=&opline->op2.u.constant;
-#if 0 || IS_CV == IS_VAR || IS_CV == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_CV == IS_VAR || IS_CV == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (opline->extended_value) {
- expr_ptr_ptr=_get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_CV == IS_VAR || IS_CV == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -24300,20 +29073,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONST_HANDLER(ZEND_OPCO
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_CONST != IS_UNUSED) {
+
+ zval *offset = opline->op2.zv;
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_CONST == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -24323,21 +29113,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CONST_HANDLER(ZEND_OPCO
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_CV == IS_VAR || IS_CV == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_CV == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CV != IS_UNUSED
@@ -24347,17 +29138,86 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HAND
}
}
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
+
+
+ SAVE_OPLINE();
+ if (IS_CV == IS_CV &&
+ IS_CONST == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ varname = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_CV == IS_VAR || IS_CV == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ } else {
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
+ }
+
+ if (IS_CV != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_CV == IS_VAR || IS_CV == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = &opline->op2.u.constant;
+ offset = opline->op2.zv;
if (IS_CV != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -24366,37 +29226,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDL
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_CONST == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_CONST == IS_CV || IS_CONST == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -24412,7 +29274,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDL
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (0) {
@@ -24436,15 +29298,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDL
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
- zval *offset = &opline->op2.u.constant;
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = opline->op2.zv;
if (IS_CV != IS_VAR || container) {
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -24455,7 +29322,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDL
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -24471,137 +29338,230 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDL
}
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
+
+ SAVE_OPLINE();
+ if (IS_CV == IS_CV &&
+ IS_CONST == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
+ } else {
+ HashTable *target_symbol_table;
+
+ zval tmp, *varname = _get_zval_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
+
+ if (IS_CONST != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_CONST == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ }
+
+ if (IS_CV != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CONST(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC);
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (IS_CV != IS_VAR || container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
- zval *offset = &opline->op2.u.constant;
+ offset = opline->op2.zv;
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- ht = Z_ARRVAL_PP(container);
+ ht = Z_ARRVAL_PP(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_CONST == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
- break;
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
- }
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
- } else {
- result = 1;
- }
- break;
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
+ }
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (0) {
- MAKE_REAL_ZVAL_PTR(offset);
- }
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CONST == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (0) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
-
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
+
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
+ }
- } else {
+ } else {
- }
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -24617,277 +29577,306 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_CONST_HANDLER(ZEND
static int ZEND_FASTCALL ZEND_ADD_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_TMP(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op2, free_op_data1;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
zval *object;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
zval_dtor(free_op2.var);
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -24898,16 +29887,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_TMP(int (*bina
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -24917,7 +29906,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_TMP(int (*bina
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -24939,22 +29928,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_TMP(int (*bina
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -24968,66 +29957,71 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_TMP(int (*bina
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_TMP(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2, free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_CV_TMP(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
break;
case ZEND_ASSIGN_DIM: {
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_CV == IS_VAR && !0) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_CV_TMP(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *dim = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 1, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_TMP_VAR, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ value = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -25039,17 +30033,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_TMP(int (*binary_o
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
zval_dtor(free_op2.var);
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
- }
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+
+ CHECK_EXCEPTION();
+ }
ZEND_VM_NEXT_OPCODE();
}
@@ -25110,29 +30109,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HAN
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_TMP(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
zval_dtor(free_op2.var);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -25143,13 +30148,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_TMP(incdec_t in
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -25158,9 +30163,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_TMP(incdec_t in
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -25174,14 +30179,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_TMP(incdec_t in
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -25192,6 +30197,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_TMP(incdec_t in
zval_dtor(free_op2.var);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -25207,26 +30213,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDL
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_TMP(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
zval_dtor(free_op2.var);
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -25237,12 +30249,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_TMP(incdec_t i
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -25252,10 +30264,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_TMP(incdec_t i
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -25265,20 +30277,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_TMP(incdec_t i
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -25288,6 +30299,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_TMP(incdec_t i
zval_dtor(free_op2.var);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -25303,195 +30315,182 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HAND
static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
zval **container;
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK &&
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
IS_CV != IS_CV &&
- EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **container;
- if (IS_CV == IS_VAR && !container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_W TSRMLS_CC);
zval_dtor(free_op2.var);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
- if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ if (UNEXPECTED(opline->extended_value != 0)) {
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ if (retval_ptr) {
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_RW TSRMLS_CC);
zval_dtor(free_op2.var);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC);
+ zval **container;
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_IS TSRMLS_CC);
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_IS TSRMLS_CC);
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
zval **container;
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ SAVE_OPLINE();
+
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_W TSRMLS_CC);
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
} else {
if (IS_TMP_VAR == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_R TSRMLS_CC);
}
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
- /* Not needed in DIM_UNSET
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- */
if (IS_CV == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_TMP_VAR, BP_VAR_UNSET TSRMLS_CC);
zval_dtor(free_op2.var);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
+ if (UNEXPECTED(EX_T(opline->result.var).var.ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot unset string offsets");
} else {
zend_free_op free_res;
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*retval_ptr, &free_res);
+ if (retval_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*retval_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
- ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_TMP(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_TMP(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *container = _get_zval_ptr_cv(&opline->op1, EX(Ts), type TSRMLS_CC);
+ zval *container;
zend_free_op free_op2;
- zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
zval_dtor(free_op2.var);
} else {
zval *retval;
@@ -25501,18 +30500,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_TMP(int
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (1) {
zval_ptr_dtor(&offset);
@@ -25521,137 +30512,182 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_TMP(int
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_CV_TMP(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_CV_TMP(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
if (IS_CV == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_CV_TMP(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+
+ zval *container;
+ zend_free_op free_op2;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ zval_dtor(free_op2.var);
+ } else {
+ zval *retval;
+
+ if (1) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (1) {
+ zval_ptr_dtor(&offset);
+ } else {
+ zval_dtor(free_op2.var);
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_CV_TMP(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_CV_TMP(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_res;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval *property = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_CV == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -25661,48 +30697,47 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_H
if (1) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property);
} else {
zval_dtor(free_op2.var);
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- zval *property_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (1) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_CV == IS_VAR && !object_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property_name);
} else {
@@ -25710,28 +30745,31 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLE
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (Z_TYPE_PP(object_ptr) == IS_OBJECT) {
zend_free_op free_op2;
- zval *property_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *property_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (1) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (1) {
zval_ptr_dtor(&property_name);
} else {
@@ -25740,31 +30778,47 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLE
} else {
zend_free_op free_op2, free_op_data1, free_op_data2;
zval *value;
- zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *dim = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
zval **variable_ptr_ptr;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, 1, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), object_ptr, dim, IS_TMP_VAR, BP_VAR_W TSRMLS_CC);
zval_dtor(free_op2.var);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- if (!variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
+ if (UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T((opline+1)->op2.var), value, (opline+1)->op1_type TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T((opline+1)->op2.var).str_offset.str)+EX_T((opline+1)->op2.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_TMP_FREE(free_op_data1)) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if ((opline+1)->op1_type == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if ((opline+1)->op1_type == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
FREE_OP_VAR_PTR(free_op_data2);
@@ -25772,75 +30826,110 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLE
}
/* assign_dim has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *value = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **variable_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval *value;
+ zval **variable_ptr_ptr;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ variable_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(opline->op1.u.var), value, IS_TMP_VAR TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(opline->op1.u.var).str_offset.str)+EX_T(opline->op1.u.var).str_offset.offset, 1, 1);
+ if (IS_CV == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T(opline->op1.var), value, IS_TMP_VAR TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T(opline->op1.var).str_offset.str)+EX_T(opline->op1.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (IS_CV == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (1) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, 1 TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if (IS_TMP_VAR == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if (IS_TMP_VAR == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
/* zend_assign_to_variable() always takes care of op2, never free it! */
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op2;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_TMP_VAR != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ EX(object) = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_TMP_VAR != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_TMP_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_TMP_VAR == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -25861,77 +30950,53 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_
zval_dtor(free_op2.var);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op2;
+ SAVE_OPLINE();
if (IS_CV==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
zval_dtor(free_op2.var);
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
-
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op2;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+
zval *expr_ptr;
- zval *offset=_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-#if 0 || IS_CV == IS_VAR || IS_CV == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_CV == IS_VAR || IS_CV == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (opline->extended_value) {
- expr_ptr_ptr=_get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_CV == IS_VAR || IS_CV == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -25942,20 +31007,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMP_HANDLER(ZEND_OPCODE
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_TMP_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_TMP_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -25965,21 +31047,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_TMP_HANDLER(ZEND_OPCODE
}
zval_dtor(free_op2.var);
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_CV == IS_VAR || IS_CV == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_CV == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CV != IS_UNUSED
@@ -25991,15 +31074,18 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLE
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_CV != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -26008,37 +31094,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_TMP_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -26054,7 +31142,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (1) {
@@ -26078,15 +31166,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER
zval_dtor(free_op2.var);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
- zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_CV != IS_VAR || container) {
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -26097,7 +31190,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -26113,137 +31206,149 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER
zval_dtor(free_op2.var);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_TMP(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
-
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC);
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (IS_CV != IS_VAR || container) {
- zend_free_op free_op2;
- zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
- ht = Z_ARRVAL_PP(container);
+ offset = _get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- break;
- }
+ ht = Z_ARRVAL_PP(container);
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_TMP_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
} else {
- result = 1;
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
- zval_dtor(free_op2.var);
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (1) {
- MAKE_REAL_ZVAL_PTR(offset);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ }
+ zval_dtor(free_op2.var);
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (1) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_TMP_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (1) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
- zval_dtor(free_op2.var);
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (1) {
+ zval_ptr_dtor(&offset);
+ } else {
+ zval_dtor(free_op2.var);
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
- zval_dtor(free_op2.var);
- } else {
- zval_dtor(free_op2.var);
}
+ zval_dtor(free_op2.var);
+ } else {
+ zval_dtor(free_op2.var);
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -26259,277 +31364,306 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_TMP_HANDLER(ZEND_O
static int ZEND_FASTCALL ZEND_ADD_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC));
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_VAR(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op2, free_op_data1;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
zval *object;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -26540,16 +31674,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_VAR(int (*bina
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -26559,7 +31693,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_VAR(int (*bina
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -26581,22 +31715,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_VAR(int (*bina
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -26610,66 +31744,71 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_VAR(int (*bina
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_VAR(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2, free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_CV_VAR(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
break;
case ZEND_ASSIGN_DIM: {
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_CV == IS_VAR && !0) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_CV_VAR(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *dim = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_VAR, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ value = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -26681,17 +31820,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_VAR(int (*binary_o
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
- }
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+
+ CHECK_EXCEPTION();
+ }
ZEND_VM_NEXT_OPCODE();
}
@@ -26752,29 +31896,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HAN
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_VAR(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -26785,13 +31935,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_VAR(incdec_t in
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -26800,9 +31950,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_VAR(incdec_t in
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -26816,14 +31966,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_VAR(incdec_t in
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -26834,6 +31984,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_VAR(incdec_t in
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -26849,26 +32000,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDL
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_VAR(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -26879,12 +32036,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_VAR(incdec_t i
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -26894,10 +32051,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_VAR(incdec_t i
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -26907,20 +32064,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_VAR(incdec_t i
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -26930,6 +32086,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_VAR(incdec_t i
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -26943,197 +32100,340 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HAND
return zend_post_incdec_property_helper_SPEC_CV_VAR(decrement_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_CV == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_CV != IS_TMP_VAR) {
+
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_CV == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
+ }
+
+
+ if (IS_CV != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_CV_VAR(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
zval **container;
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK &&
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
IS_CV != IS_CV &&
- EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- zend_fetch_dimension_address_read(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **container;
- if (IS_CV == IS_VAR && !container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_W TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
- if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ if (UNEXPECTED(opline->extended_value != 0)) {
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ if (retval_ptr) {
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **container;
- if (IS_CV == IS_VAR && !container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_RW TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC);
+ zval **container;
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_IS TSRMLS_CC);
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_IS TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
zval **container;
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ SAVE_OPLINE();
+
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_W TSRMLS_CC);
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
} else {
if (IS_VAR == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_R TSRMLS_CC);
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
- /* Not needed in DIM_UNSET
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- */
if (IS_CV == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC), IS_VAR, BP_VAR_UNSET TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
+ if (UNEXPECTED(EX_T(opline->result.var).var.ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot unset string offsets");
} else {
zend_free_op free_res;
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*retval_ptr, &free_res);
+ if (retval_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*retval_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
- ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_VAR(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_VAR(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *container = _get_zval_ptr_cv(&opline->op1, EX(Ts), type TSRMLS_CC);
+ zval *container;
zend_free_op free_op2;
- zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *offset;
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ SAVE_OPLINE();
+ container = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
} else {
zval *retval;
@@ -27143,18 +32443,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_VAR(int
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (0) {
zval_ptr_dtor(&offset);
@@ -27163,137 +32455,182 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_VAR(int
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_CV_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_CV_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
if (IS_CV == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_CV_VAR(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+
+ zval *container;
+ zend_free_op free_op2;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else {
+ zval *retval;
+
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1, free_op2;
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_CV_VAR(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_CV_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_op2, free_res;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_CV == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -27303,48 +32640,47 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_H
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op2;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- zval *property_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_CV == IS_VAR && !object_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -27352,28 +32688,31 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLE
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (Z_TYPE_PP(object_ptr) == IS_OBJECT) {
zend_free_op free_op2;
- zval *property_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *property_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -27382,31 +32721,47 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLE
} else {
zend_free_op free_op2, free_op_data1, free_op_data2;
zval *value;
- zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval *dim = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
zval **variable_ptr_ptr;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), object_ptr, dim, IS_VAR, BP_VAR_W TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- if (!variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
+ if (UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T((opline+1)->op2.var), value, (opline+1)->op1_type TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T((opline+1)->op2.var).str_offset.str)+EX_T((opline+1)->op2.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_TMP_FREE(free_op_data1)) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if ((opline+1)->op1_type == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if ((opline+1)->op1_type == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
FREE_OP_VAR_PTR(free_op_data2);
@@ -27414,74 +32769,99 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLE
}
/* assign_dim has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval *value = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
- zval **variable_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval *value;
+ zval **variable_ptr_ptr;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ variable_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T(opline->op1.var), value, IS_VAR TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
- if (IS_CV == IS_VAR && !variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(opline->op1.u.var), value, IS_VAR TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(opline->op1.u.var).str_offset.str)+EX_T(opline->op1.u.var).str_offset.offset, 1, 1);
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T(opline->op1.var).str_offset.str)+EX_T(opline->op1.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (IS_CV == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (0) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, 0 TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if (IS_VAR == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if (IS_VAR == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
/* zend_assign_to_variable() always takes care of op2, never free it! */
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
zval **variable_ptr_ptr;
- zval **value_ptr_ptr = _get_zval_ptr_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **value_ptr_ptr;
+
+ SAVE_OPLINE();
+ value_ptr_ptr = _get_zval_ptr_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_VAR == IS_VAR &&
value_ptr_ptr &&
!Z_ISREF_PP(value_ptr_ptr) &&
opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !EX_T(opline->op2.u.var).var.fcall_returned_reference) {
+ !EX_T(opline->op2.var).var.fcall_returned_reference) {
if (free_op2.var == NULL) {
PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
}
zend_error(E_STRICT, "Only variables should be assigned by reference");
if (UNEXPECTED(EG(exception) != NULL)) {
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
return ZEND_ASSIGN_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else if (IS_VAR == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
PZVAL_LOCK(*value_ptr_ptr);
}
- if (IS_CV == IS_VAR && EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr)) {
zend_error_noreturn(E_ERROR, "Cannot assign by reference to overloaded object");
}
- variable_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if ((IS_VAR == IS_VAR && !value_ptr_ptr) ||
- (IS_CV == IS_VAR && !variable_ptr_ptr)) {
+ variable_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if ((IS_VAR == IS_VAR && UNEXPECTED(value_ptr_ptr == NULL)) ||
+ (IS_CV == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL))) {
zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
}
zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
@@ -27490,49 +32870,63 @@ static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLE
Z_DELREF_PP(variable_ptr_ptr);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *variable_ptr_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*variable_ptr_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *variable_ptr_ptr);
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
zend_free_op free_op2;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ function_name = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_VAR != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ EX(object) = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_VAR != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_VAR == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_VAR == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -27553,77 +32947,53 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
zend_free_op free_op2;
+ SAVE_OPLINE();
if (IS_CV==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC) TSRMLS_CC);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
-
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_free_op free_op2;
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
+ USE_OPLINE
+
zval *expr_ptr;
- zval *offset=_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
-#if 0 || IS_CV == IS_VAR || IS_CV == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_CV == IS_VAR || IS_CV == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (opline->extended_value) {
- expr_ptr_ptr=_get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_CV == IS_VAR || IS_CV == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -27634,20 +33004,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_VAR_HANDLER(ZEND_OPCODE
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_free_op free_op2;
+ zval *offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -27657,21 +33044,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_VAR_HANDLER(ZEND_OPCODE
}
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_CV == IS_VAR || IS_CV == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_CV == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CV != IS_UNUSED
@@ -27681,17 +33069,86 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLE
}
}
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
+
+
+ SAVE_OPLINE();
+ if (IS_CV == IS_CV &&
+ IS_VAR == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ varname = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_CV == IS_VAR || IS_CV == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ } else {
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
+ }
+
+ if (IS_CV != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_CV == IS_VAR || IS_CV == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_CV != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -27700,37 +33157,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_VAR == IS_CV || IS_VAR == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -27746,7 +33205,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (0) {
@@ -27770,15 +33229,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
- zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
if (IS_CV != IS_VAR || container) {
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -27789,7 +33253,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -27805,137 +33269,230 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_VAR(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC);
- zval **value = NULL;
- int result = 0;
+ SAVE_OPLINE();
+ if (IS_CV == IS_CV &&
+ IS_VAR == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
- if (IS_CV != IS_VAR || container) {
- zend_free_op free_op2;
- zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
+ } else {
+ HashTable *target_symbol_table;
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ zval tmp, *varname = _get_zval_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
- ht = Z_ARRVAL_PP(container);
+ if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ if (IS_VAR != IS_UNUSED) {
+ zend_class_entry *ce;
- break;
+ if (IS_VAR == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
}
+ }
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
+ if (IS_CV != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_VAR(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op2;
+ zval **container;
+ zval **value = NULL;
+ int result = 0;
+ ulong hval;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ offset = _get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC);
+
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
+
+ ht = Z_ARRVAL_PP(container);
+
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_VAR == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
} else {
- result = 1;
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (0) {
- MAKE_REAL_ZVAL_PTR(offset);
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ }
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_VAR == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (0) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
- } else {
- if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
+ } else {
+ if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -27951,33 +33508,30 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_VAR_HANDLER(ZEND_O
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op_data1;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
zval *object;
zval *property = NULL;
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -27988,16 +33542,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*b
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -28007,7 +33561,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*b
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -28029,22 +33583,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*b
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -28058,66 +33612,71 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*b
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_UNUSED(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
break;
case ZEND_ASSIGN_DIM: {
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_CV == IS_VAR && !0) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
zval *dim = NULL;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_UNUSED, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
value = NULL;
- var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -28129,16 +33688,21 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_UNUSED(int (*binar
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
- }
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+
+ CHECK_EXCEPTION();
+ }
ZEND_VM_NEXT_OPCODE();
}
@@ -28197,105 +33761,257 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_
return zend_binary_assign_op_helper_SPEC_CV_UNUSED(bitwise_xor_function, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
+static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CV_UNUSED(int type, ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zend_free_op free_op1;
+ zval *varname;
+ zval **retval;
+ zval tmp_varname;
+ HashTable *target_symbol_table;
+ ulong hash_value;
+
+ SAVE_OPLINE();
+ varname = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV != IS_CONST && UNEXPECTED(Z_TYPE_P(varname) != IS_STRING)) {
+ ZVAL_COPY_VALUE(&tmp_varname, varname);
+ zval_copy_ctor(&tmp_varname);
+ Z_SET_REFCOUNT(tmp_varname, 1);
+ Z_UNSET_ISREF(tmp_varname);
+ convert_to_string(&tmp_varname);
+ varname = &tmp_varname;
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ retval = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0, ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+/*
+ if (!target_symbol_table) {
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+*/
+ if (IS_CV == IS_CONST) {
+ hash_value = Z_HASH_P(varname);
+ } else if (IS_INTERNED(Z_STRVAL_P(varname))) {
+ hash_value = INTERNED_HASH(Z_STRVAL_P(varname));
+ } else {
+ hash_value = zend_hash_func(Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1);
+ }
+
+ if (zend_hash_quick_find(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, (void **) &retval) == FAILURE) {
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_UNSET:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_IS:
+ retval = &EG(uninitialized_zval_ptr);
+ break;
+ case BP_VAR_RW:
+ zend_error(E_NOTICE,"Undefined variable: %s", Z_STRVAL_P(varname));
+ /* break missing intentionally */
+ case BP_VAR_W:
+ Z_ADDREF_P(&EG(uninitialized_zval));
+ zend_hash_quick_update(target_symbol_table, Z_STRVAL_P(varname), Z_STRLEN_P(varname)+1, hash_value, &EG(uninitialized_zval_ptr), sizeof(zval *), (void **) &retval);
+ break;
+ EMPTY_SWITCH_DEFAULT_CASE()
+ }
+ }
+ switch (opline->extended_value & ZEND_FETCH_TYPE_MASK) {
+ case ZEND_FETCH_GLOBAL:
+ if (IS_CV != IS_TMP_VAR) {
+
+ }
+ break;
+ case ZEND_FETCH_LOCAL:
+
+ break;
+ case ZEND_FETCH_STATIC:
+ zval_update_constant(retval, (void*) 1 TSRMLS_CC);
+ break;
+ case ZEND_FETCH_GLOBAL_LOCK:
+ if (IS_CV == IS_VAR && !free_op1.var) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ }
+ break;
+ }
+ }
+
+
+ if (IS_CV != IS_CONST && varname == &tmp_varname) {
+ zval_dtor(&tmp_varname);
+ }
+ if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ switch (type) {
+ case BP_VAR_R:
+ case BP_VAR_IS:
+ AI_SET_PTR(&EX_T(opline->result.var), *retval);
+ break;
+ case BP_VAR_UNSET: {
+ zend_free_op free_res;
+
+ PZVAL_UNLOCK(*retval, &free_res);
+ if (retval != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval);
+ }
+ PZVAL_LOCK(*retval);
+ FREE_OP_VAR_PTR(free_res);
+ }
+ /* break missing intentionally */
+ default:
+ EX_T(opline->result.var).var.ptr_ptr = retval;
+ break;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_R_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_RW_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_RW, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_FUNC_ARG_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+
+ return zend_fetch_var_address_helper_SPEC_CV_UNUSED(ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))?BP_VAR_W:BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
+static int ZEND_FASTCALL ZEND_FETCH_IS_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ return zend_fetch_var_address_helper_SPEC_CV_UNUSED(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+}
+
static int ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = NULL;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, NULL, IS_UNUSED, BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
- if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ if (UNEXPECTED(opline->extended_value != 0)) {
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ if (retval_ptr) {
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = NULL;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, NULL, IS_UNUSED, BP_VAR_RW TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = NULL;
zval **container;
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ SAVE_OPLINE();
+
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, NULL, IS_UNUSED, BP_VAR_W TSRMLS_CC);
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
} else {
if (IS_UNUSED == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, NULL, IS_UNUSED, BP_VAR_R TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (Z_TYPE_PP(object_ptr) == IS_OBJECT) {
@@ -28305,7 +34021,7 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HAN
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((IS_UNUSED == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -28317,27 +34033,43 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HAN
zval *dim = NULL;
zval **variable_ptr_ptr;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), object_ptr, dim, IS_UNUSED, BP_VAR_W TSRMLS_CC);
+
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
+ if (UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T((opline+1)->op2.var), value, (opline+1)->op1_type TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- if (!variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1);
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T((opline+1)->op2.var).str_offset.str)+EX_T((opline+1)->op2.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_TMP_FREE(free_op_data1)) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if ((opline+1)->op1_type == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if ((opline+1)->op1_type == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
FREE_OP_VAR_PTR(free_op_data2);
@@ -28345,46 +34077,36 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HAN
}
/* assign_dim has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
- zval *offset=NULL;
-#if 0 || IS_CV == IS_VAR || IS_CV == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_CV == IS_VAR || IS_CV == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (opline->extended_value) {
- expr_ptr_ptr=_get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_CV == IS_VAR || IS_CV == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -28395,20 +34117,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUSED_HANDLER(ZEND_OPC
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_UNUSED != IS_UNUSED) {
+
+ zval *offset = NULL;
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_UNUSED == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -28418,21 +34157,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_UNUSED_HANDLER(ZEND_OPC
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_CV == IS_VAR || IS_CV == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_CV == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CV != IS_UNUSED
@@ -28442,279 +34182,455 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HAN
}
}
+static int ZEND_FASTCALL ZEND_UNSET_VAR_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval tmp, *varname;
+ HashTable *target_symbol_table;
+
+
+ SAVE_OPLINE();
+ if (IS_CV == IS_CV &&
+ IS_UNUSED == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ zend_delete_variable(EX(prev_execute_data), EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value TSRMLS_CC);
+ EX_CV(opline->op1.var) = NULL;
+ } else if (EX_CV(opline->op1.var)) {
+ zval_ptr_dtor(EX_CV(opline->op1.var));
+ EX_CV(opline->op1.var) = NULL;
+ }
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+ }
+
+ varname = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ } else if (IS_CV == IS_VAR || IS_CV == IS_CV) {
+ Z_ADDREF_P(varname);
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ zend_std_unset_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ } else {
+ ulong hash_value = zend_inline_hash_func(varname->value.str.val, varname->value.str.len+1);
+
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ zend_delete_variable(execute_data, target_symbol_table, varname->value.str.val, varname->value.str.len+1, hash_value TSRMLS_CC);
+ }
+
+ if (IS_CV != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ } else if (IS_CV == IS_VAR || IS_CV == IS_CV) {
+ zval_ptr_dtor(&varname);
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
+static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+{
+ USE_OPLINE
+ zval **value;
+ zend_bool isset = 1;
+
+ SAVE_OPLINE();
+ if (IS_CV == IS_CV &&
+ IS_UNUSED == IS_UNUSED &&
+ (opline->extended_value & ZEND_QUICK_SET)) {
+ if (EX_CV(opline->op1.var)) {
+ value = EX_CV(opline->op1.var);
+ } else if (EG(active_symbol_table)) {
+ zend_compiled_variable *cv = &CV_DEF_OF(opline->op1.var);
+
+ if (zend_hash_quick_find(EG(active_symbol_table), cv->name, cv->name_len+1, cv->hash_value, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ } else {
+ isset = 0;
+ }
+ } else {
+ HashTable *target_symbol_table;
+
+ zval tmp, *varname = _get_zval_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV != IS_CONST && Z_TYPE_P(varname) != IS_STRING) {
+ ZVAL_COPY_VALUE(&tmp, varname);
+ zval_copy_ctor(&tmp);
+ convert_to_string(&tmp);
+ varname = &tmp;
+ }
+
+ if (IS_UNUSED != IS_UNUSED) {
+ zend_class_entry *ce;
+
+ if (IS_UNUSED == IS_CONST) {
+ if (CACHED_PTR(opline->op2.literal->cache_slot)) {
+ ce = CACHED_PTR(opline->op2.literal->cache_slot);
+ } else {
+ ce = zend_fetch_class_by_name(Z_STRVAL_P(opline->op2.zv), Z_STRLEN_P(opline->op2.zv), opline->op2.literal + 1, 0 TSRMLS_CC);
+ CACHE_PTR(opline->op2.literal->cache_slot, ce);
+ }
+ } else {
+ ce = EX_T(opline->op2.var).class_entry;
+ }
+ value = zend_std_get_static_property(ce, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 1, ((IS_CV == IS_CONST) ? opline->op1.literal : NULL) TSRMLS_CC);
+ if (!value) {
+ isset = 0;
+ }
+ } else {
+ target_symbol_table = zend_get_target_symbol_table(opline->extended_value & ZEND_FETCH_TYPE_MASK TSRMLS_CC);
+ if (zend_hash_find(target_symbol_table, varname->value.str.val, varname->value.str.len+1, (void **) &value) == FAILURE) {
+ isset = 0;
+ }
+ }
+
+ if (IS_CV != IS_CONST && varname == &tmp) {
+ zval_dtor(&tmp);
+ }
+
+ }
+
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) != IS_NULL) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
+ } else {
+ ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
+}
+
static int ZEND_FASTCALL ZEND_ADD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- add_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_add_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SUB_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- sub_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_sub_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MUL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- mul_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mul_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_DIV_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- div_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_div_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_MOD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- mod_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ fast_mod_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- shift_left_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_left_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_SR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- shift_right_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ shift_right_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CONCAT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- concat_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ concat_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- is_identical_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ is_identical_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
+ SAVE_OPLINE();
is_identical_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
Z_LVAL_P(result) = !Z_LVAL_P(result);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) == 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_NOT_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) != 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_not_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) < 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *result = &EX_T(opline->result.u.var).tmp_var;
+ zval *result = &EX_T(opline->result.var).tmp_var;
- compare_function(result,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
- ZVAL_BOOL(result, (Z_LVAL_P(result) <= 0));
+ SAVE_OPLINE();
+ ZVAL_BOOL(result, fast_is_smaller_or_equal_function(result,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC));
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_or_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_and_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_and_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BW_XOR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- bitwise_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ bitwise_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ SAVE_OPLINE();
+ boolean_xor_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CV(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
zend_free_op free_op_data1;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
zval *object;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval *value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- znode *result = &opline->result;
+ zval *property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ zval *value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
FREE_OP(free_op_data1);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
} else {
/* here we are sure we are dealing with an object */
@@ -28725,16 +34641,16 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CV(int (*binar
/* here property is a string */
if (opline->extended_value == ZEND_ASSIGN_OBJ
&& Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
binary_op(*zptr, *zptr, value TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = *zptr;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*zptr);
+ EX_T(opline->result.var).var.ptr = *zptr;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -28744,7 +34660,7 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CV(int (*binar
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
if (Z_OBJ_HT_P(object)->read_property) {
- z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
}
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
if (Z_OBJ_HT_P(object)->read_dimension) {
@@ -28766,22 +34682,22 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CV(int (*binar
SEPARATE_ZVAL_IF_NOT_REF(&z);
binary_op(z, z, value TSRMLS_CC);
if (opline->extended_value == ZEND_ASSIGN_OBJ) {
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else /* if (opline->extended_value == ZEND_ASSIGN_DIM) */ {
Z_OBJ_HT_P(object)->write_dimension(object, property, z TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = z;
- EX_T(result->u.var).var.ptr_ptr = NULL;
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(z);
+ EX_T(opline->result.var).var.ptr = z;
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to assign property of non-object");
- if (!RETURN_VALUE_UNUSED(result)) {
- EX_T(result->u.var).var.ptr = EG(uninitialized_zval_ptr);
- EX_T(result->u.var).var.ptr_ptr = NULL;
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ EX_T(opline->result.var).var.ptr = &EG(uninitialized_zval);
+ EX_T(opline->result.var).var.ptr_ptr = NULL;
}
}
}
@@ -28795,66 +34711,71 @@ static int ZEND_FASTCALL zend_binary_assign_op_obj_helper_SPEC_CV_CV(int (*binar
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_CV(int (*binary_op)(zval *result, zval *op1, zval *op2 TSRMLS_DC), ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op_data2, free_op_data1;
zval **var_ptr;
zval *value;
+ SAVE_OPLINE();
switch (opline->extended_value) {
case ZEND_ASSIGN_OBJ:
return zend_binary_assign_op_obj_helper_SPEC_CV_CV(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
break;
case ZEND_ASSIGN_DIM: {
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ } else if (UNEXPECTED(Z_TYPE_PP(container) == IS_OBJECT)) {
if (IS_CV == IS_VAR && !0) {
Z_ADDREF_PP(container); /* undo the effect of get_obj_zval_ptr_ptr() */
}
return zend_binary_assign_op_obj_helper_SPEC_CV_CV(binary_op, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else {
- zend_op *op_data = opline+1;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *dim = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- var_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- ZEND_VM_INC_OPCODE();
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), container, dim, IS_CV, BP_VAR_RW TSRMLS_CC);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ var_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
}
}
break;
default:
- value = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- var_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ var_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
/* do nothing */
break;
}
- if (!var_ptr) {
+ if (UNEXPECTED(var_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use assign-op operators with overloaded objects nor string offsets");
}
- if (*var_ptr == EG(error_zval_ptr)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ if (UNEXPECTED(*var_ptr == &EG(error_zval))) {
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
+ CHECK_EXCEPTION();
+ if (opline->extended_value == ZEND_ASSIGN_DIM) {
+ ZEND_VM_INC_OPCODE();
+ }
ZEND_VM_NEXT_OPCODE();
}
SEPARATE_ZVAL_IF_NOT_REF(var_ptr);
- if(Z_TYPE_PP(var_ptr) == IS_OBJECT && Z_OBJ_HANDLER_PP(var_ptr, get)
+ if (UNEXPECTED(Z_TYPE_PP(var_ptr) == IS_OBJECT)
+ && Z_OBJ_HANDLER_PP(var_ptr, get)
&& Z_OBJ_HANDLER_PP(var_ptr, set)) {
/* proxy object */
zval *objval = Z_OBJ_HANDLER_PP(var_ptr, get)(*var_ptr TSRMLS_CC);
@@ -28866,16 +34787,21 @@ static int ZEND_FASTCALL zend_binary_assign_op_helper_SPEC_CV_CV(int (*binary_op
binary_op(*var_ptr, *var_ptr, value TSRMLS_CC);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *var_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*var_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *var_ptr);
}
if (opline->extended_value == ZEND_ASSIGN_DIM) {
FREE_OP(free_op_data1);
FREE_OP_VAR_PTR(free_op_data2);
- }
+ CHECK_EXCEPTION();
+ ZEND_VM_INC_OPCODE();
+ } else {
+
+ CHECK_EXCEPTION();
+ }
ZEND_VM_NEXT_OPCODE();
}
@@ -28936,29 +34862,35 @@ static int ZEND_FASTCALL ZEND_ASSIGN_BW_XOR_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HAND
static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **retval = &EX_T(opline->result.u.var).var.ptr;
+ zval *property;
+ zval **retval;
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ retval = &EX_T(opline->result.var).var.ptr;
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -28969,13 +34901,13 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t inc
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
SEPARATE_ZVAL_IF_NOT_REF(zptr);
have_get_ptr = 1;
incdec_op(*zptr);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
+ if (RETURN_VALUE_USED(opline)) {
*retval = *zptr;
PZVAL_LOCK(*retval);
}
@@ -28984,9 +34916,9 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t inc
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -29000,14 +34932,14 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t inc
SEPARATE_ZVAL_IF_NOT_REF(&z);
incdec_op(z);
*retval = z;
- Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC);
- SELECTIVE_PZVAL_LOCK(*retval, &opline->result);
+ Z_OBJ_HT_P(object)->write_property(object, property, z, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+ SELECTIVE_PZVAL_LOCK(*retval, opline);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- *retval = EG(uninitialized_zval_ptr);
- PZVAL_LOCK(*retval);
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ *retval = &EG(uninitialized_zval);
}
}
}
@@ -29018,6 +34950,7 @@ static int ZEND_FASTCALL zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t inc
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -29033,26 +34966,32 @@ static int ZEND_FASTCALL ZEND_PRE_DEC_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLE
static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t incdec_op, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **object_ptr;
zval *object;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval *retval = &EX_T(opline->result.u.var).tmp_var;
+ zval *property;
+ zval *retval;
int have_get_ptr = 0;
- if (IS_CV == IS_VAR && !object_ptr) {
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ retval = &EX_T(opline->result.var).tmp_var;
+
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
- if (Z_TYPE_P(object) != IS_OBJECT) {
+ if (UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -29063,12 +35002,12 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t in
}
if (Z_OBJ_HT_P(object)->get_property_ptr_ptr) {
- zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property TSRMLS_CC);
+ zval **zptr = Z_OBJ_HT_P(object)->get_property_ptr_ptr(object, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (zptr != NULL) { /* NULL means no success in getting PTR */
have_get_ptr = 1;
SEPARATE_ZVAL_IF_NOT_REF(zptr);
- *retval = **zptr;
+ ZVAL_COPY_VALUE(retval, *zptr);
zendi_zval_copy_ctor(*retval);
incdec_op(*zptr);
@@ -29078,10 +35017,10 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t in
if (!have_get_ptr) {
if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) {
- zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R TSRMLS_CC);
+ zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval *z_copy;
- if (Z_TYPE_P(z) == IS_OBJECT && Z_OBJ_HT_P(z)->get) {
+ if (UNEXPECTED(Z_TYPE_P(z) == IS_OBJECT) && Z_OBJ_HT_P(z)->get) {
zval *value = Z_OBJ_HT_P(z)->get(z TSRMLS_CC);
if (Z_REFCOUNT_P(z) == 0) {
@@ -29091,20 +35030,19 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t in
}
z = value;
}
- *retval = *z;
+ ZVAL_COPY_VALUE(retval, z);
zendi_zval_copy_ctor(*retval);
ALLOC_ZVAL(z_copy);
- *z_copy = *z;
+ INIT_PZVAL_COPY(z_copy, z);
zendi_zval_copy_ctor(*z_copy);
- INIT_PZVAL(z_copy);
incdec_op(z_copy);
Z_ADDREF_P(z);
- Z_OBJ_HT_P(object)->write_property(object, property, z_copy TSRMLS_CC);
+ Z_OBJ_HT_P(object)->write_property(object, property, z_copy, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
zval_ptr_dtor(&z_copy);
zval_ptr_dtor(&z);
} else {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
- *retval = *EG(uninitialized_zval_ptr);
+ ZVAL_NULL(retval);
}
}
@@ -29114,6 +35052,7 @@ static int ZEND_FASTCALL zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t in
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -29129,195 +35068,182 @@ static int ZEND_FASTCALL ZEND_POST_DEC_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDL
static int ZEND_FASTCALL ZEND_FETCH_DIM_R_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
zval **container;
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK &&
+ SAVE_OPLINE();
+
+ if ((opline->extended_value & ZEND_FETCH_ADD_LOCK) &&
IS_CV != IS_CV &&
- EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr_ptr) {
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **container;
- if (IS_CV == IS_VAR && !container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
- if (opline->extended_value && EX_T(opline->result.u.var).var.ptr_ptr) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ if (UNEXPECTED(opline->extended_value != 0)) {
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ if (retval_ptr) {
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ }
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_RW TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_IS_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC);
+ zval **container;
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_IS TSRMLS_CC);
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_IS TSRMLS_CC);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
zval **container;
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ SAVE_OPLINE();
+
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_W TSRMLS_CC);
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
} else {
if (IS_CV == IS_UNUSED) {
zend_error_noreturn(E_ERROR, "Cannot use [] for reading");
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
- zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
- }
- zend_fetch_dimension_address_read(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_R TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ zend_fetch_dimension_address_read(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_R TSRMLS_CC);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_DIM_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval **container;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
- /* Not needed in DIM_UNSET
- if (opline->extended_value == ZEND_FETCH_ADD_LOCK) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- }
- */
if (IS_CV == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_fetch_dimension_address(&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T(opline->result.var), container, _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC), IS_CV, BP_VAR_UNSET TSRMLS_CC);
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) {
+ if (UNEXPECTED(EX_T(opline->result.var).var.ptr_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot unset string offsets");
} else {
zend_free_op free_res;
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*retval_ptr, &free_res);
+ if (retval_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(retval_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*retval_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
- ZEND_VM_NEXT_OPCODE();
}
-static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_CV(int type, ZEND_OPCODE_HANDLER_ARGS)
+static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_CV(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
+
+ zval *container;
- zval *container = _get_zval_ptr_cv(&opline->op1, EX(Ts), type TSRMLS_CC);
+ zval *offset;
- zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ SAVE_OPLINE();
+ container = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- if (Z_TYPE_P(container) != IS_OBJECT || !Z_OBJ_HT_P(container)->read_property) {
- if (type != BP_VAR_IS) {
- zend_error(E_NOTICE, "Trying to get property of non-object");
- }
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
- }
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ zend_error(E_NOTICE, "Trying to get property of non-object");
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
} else {
zval *retval;
@@ -29327,18 +35253,10 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_CV(int
}
/* here we are sure we are dealing with an object */
- retval = Z_OBJ_HT_P(container)->read_property(container, offset, type TSRMLS_CC);
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_R, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
- if (RETURN_VALUE_UNUSED(&opline->result)) {
- if (Z_REFCOUNT_P(retval) == 0) {
- GC_REMOVE_ZVAL_FROM_BUFFER(retval);
- zval_dtor(retval);
- FREE_ZVAL(retval);
- }
- } else {
- AI_SET_PTR(EX_T(opline->result.u.var).var, retval);
- PZVAL_LOCK(retval);
- }
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
if (0) {
zval_ptr_dtor(&offset);
@@ -29347,137 +35265,182 @@ static int ZEND_FASTCALL zend_fetch_property_address_read_helper_SPEC_CV_CV(int
}
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_CV_CV(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_CV_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *property;
zval **container;
+ SAVE_OPLINE();
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
if (IS_CV == IS_VAR && (opline->extended_value & ZEND_FETCH_ADD_LOCK)) {
- PZVAL_LOCK(*EX_T(opline->op1.u.var).var.ptr_ptr);
- EX_T(opline->op1.u.var).var.ptr = *EX_T(opline->op1.u.var).var.ptr_ptr;
+ PZVAL_LOCK(*EX_T(opline->op1.var).var.ptr_ptr);
+ EX_T(opline->op1.var).var.ptr = *EX_T(opline->op1.var).var.ptr_ptr;
}
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if (IS_CV == IS_VAR && !container) {
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
/* We are going to assign the result by reference */
if (opline->extended_value & ZEND_FETCH_MAKE_REF) {
- Z_DELREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
- SEPARATE_ZVAL_TO_MAKE_IS_REF(EX_T(opline->result.u.var).var.ptr_ptr);
- Z_ADDREF_PP(EX_T(opline->result.u.var).var.ptr_ptr);
+ zval **retval_ptr = EX_T(opline->result.var).var.ptr_ptr;
+
+ Z_DELREF_PP(retval_ptr);
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(retval_ptr);
+ Z_ADDREF_PP(retval_ptr);
+ EX_T(opline->result.var).var.ptr = *EX_T(opline->result.var).var.ptr_ptr;
+ EX_T(opline->result.var).var.ptr_ptr = &EX_T(opline->result.var).var.ptr;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_RW(EX_CVs(), opline->op1.var TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_RW TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_RW TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_IS_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- return zend_fetch_property_address_read_helper_SPEC_CV_CV(BP_VAR_IS, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ USE_OPLINE
+
+ zval *container;
+
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+
+ if (UNEXPECTED(Z_TYPE_P(container) != IS_OBJECT) ||
+ UNEXPECTED(Z_OBJ_HT_P(container)->read_property == NULL)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+
+ } else {
+ zval *retval;
+
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+
+ /* here we are sure we are dealing with an object */
+ retval = Z_OBJ_HT_P(container)->read_property(container, offset, BP_VAR_IS, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
+
+ PZVAL_LOCK(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
+
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+
+ }
+ }
+
+ CHECK_EXCEPTION();
+ ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
+ if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), (opline->extended_value & ZEND_FETCH_ARG_MASK))) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1;
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval *property;
+ zval **container;
+
+ SAVE_OPLINE();
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ container = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_W TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_W TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
} else {
- return zend_fetch_property_address_read_helper_SPEC_CV_CV(BP_VAR_R, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ return zend_fetch_property_address_read_helper_SPEC_CV_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
}
static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op1, free_res;
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval *property = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval **container;
+ zval *property;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (IS_CV == IS_CV) {
if (container != &EG(uninitialized_zval_ptr)) {
@@ -29487,48 +35450,47 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HA
if (0) {
MAKE_REAL_ZVAL_PTR(property);
}
- if (IS_CV == IS_VAR && !container) {
+ if (IS_CV == IS_VAR && UNEXPECTED(container == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
- zend_fetch_property_address(&EX_T(opline->result.u.var), container, property, BP_VAR_UNSET TSRMLS_CC);
+ zend_fetch_property_address(&EX_T(opline->result.var), container, property, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL), BP_VAR_UNSET TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property);
} else {
}
- if (IS_CV == IS_VAR && 0 &&
- READY_TO_DESTROY(free_op1.var)) {
- AI_USE_PTR(EX_T(opline->result.u.var).var);
- if (!PZVAL_IS_REF(*EX_T(opline->result.u.var).var.ptr_ptr) &&
- Z_REFCOUNT_PP(EX_T(opline->result.u.var).var.ptr_ptr) > 2) {
- SEPARATE_ZVAL(EX_T(opline->result.u.var).var.ptr_ptr);
- }
+ if (IS_CV == IS_VAR && 0 && READY_TO_DESTROY(free_op1.var)) {
+ EXTRACT_ZVAL_PTR(&EX_T(opline->result.var));
}
- PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res);
- if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
- SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_UNLOCK(*EX_T(opline->result.var).var.ptr_ptr, &free_res);
+ if (EX_T(opline->result.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {
+ SEPARATE_ZVAL_IF_NOT_REF(EX_T(opline->result.var).var.ptr_ptr);
}
- PZVAL_LOCK(*EX_T(opline->result.u.var).var.ptr_ptr);
+ PZVAL_LOCK(*EX_T(opline->result.var).var.ptr_ptr);
FREE_OP_VAR_PTR(free_res);
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- zval *property_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval **object_ptr;
+ zval *property_name;
+
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ property_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- if (IS_CV == IS_VAR && !object_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_OBJ TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_OBJ, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -29536,28 +35498,31 @@ static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER
}
/* assign_obj has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- zend_op *op_data = opline+1;
+ USE_OPLINE
+
+ zval **object_ptr;
- zval **object_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ SAVE_OPLINE();
+ object_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (IS_CV == IS_VAR && !object_ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(object_ptr == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (Z_TYPE_PP(object_ptr) == IS_OBJECT) {
- zval *property_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *property_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (0) {
MAKE_REAL_ZVAL_PTR(property_name);
}
- zend_assign_to_object(&opline->result, object_ptr, property_name, &op_data->op1, EX(Ts), ZEND_ASSIGN_DIM TSRMLS_CC);
+ zend_assign_to_object(RETURN_VALUE_USED(opline)?&EX_T(opline->result.var).var.ptr:NULL, object_ptr, property_name, (opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), ZEND_ASSIGN_DIM, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
if (0) {
zval_ptr_dtor(&property_name);
} else {
@@ -29566,30 +35531,46 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER
} else {
zend_free_op free_op_data1, free_op_data2;
zval *value;
- zval *dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval *dim = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
zval **variable_ptr_ptr;
- zend_fetch_dimension_address(&EX_T(op_data->op2.u.var), object_ptr, dim, 0, BP_VAR_W TSRMLS_CC);
+ zend_fetch_dimension_address(&EX_T((opline+1)->op2.var), object_ptr, dim, IS_CV, BP_VAR_W TSRMLS_CC);
- value = get_zval_ptr(&op_data->op1, EX(Ts), &free_op_data1, BP_VAR_R);
- variable_ptr_ptr = _get_zval_ptr_ptr_var(&op_data->op2, EX(Ts), &free_op_data2 TSRMLS_CC);
- if (!variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(op_data->op2.u.var), value, op_data->op1.op_type TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(op_data->op2.u.var).str_offset.str)+EX_T(op_data->op2.u.var).str_offset.offset, 1, 1);
+ value = get_zval_ptr((opline+1)->op1_type, &(opline+1)->op1, EX_Ts(), &free_op_data1, BP_VAR_R);
+ variable_ptr_ptr = _get_zval_ptr_ptr_var((opline+1)->op2.var, EX_Ts(), &free_op_data2 TSRMLS_CC);
+ if (UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T((opline+1)->op2.var), value, (opline+1)->op1_type TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
+
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T((opline+1)->op2.var).str_offset.str)+EX_T((opline+1)->op2.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (IS_TMP_FREE(free_op_data1)) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, IS_TMP_FREE(free_op_data1) TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if ((opline+1)->op1_type == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if ((opline+1)->op1_type == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
FREE_OP_VAR_PTR(free_op_data2);
@@ -29597,73 +35578,98 @@ static int ZEND_FASTCALL ZEND_ASSIGN_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER
}
/* assign_dim has two opcodes! */
+ CHECK_EXCEPTION();
ZEND_VM_INC_OPCODE();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *value = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
- zval **variable_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval *value;
+ zval **variable_ptr_ptr;
+
+ SAVE_OPLINE();
+ value = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ variable_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+
+ if (IS_CV == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL)) {
+ if (zend_assign_to_string_offset(&EX_T(opline->op1.var), value, IS_CV TSRMLS_CC)) {
+ if (RETURN_VALUE_USED(opline)) {
+ zval *retval;
- if (IS_CV == IS_VAR && !variable_ptr_ptr) {
- if (zend_assign_to_string_offset(&EX_T(opline->op1.u.var), value, IS_CV TSRMLS_CC)) {
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- EX_T(opline->result.u.var).var.ptr_ptr = &EX_T(opline->result.u.var).var.ptr;
- ALLOC_ZVAL(EX_T(opline->result.u.var).var.ptr);
- INIT_PZVAL(EX_T(opline->result.u.var).var.ptr);
- ZVAL_STRINGL(EX_T(opline->result.u.var).var.ptr, Z_STRVAL_P(EX_T(opline->op1.u.var).str_offset.str)+EX_T(opline->op1.u.var).str_offset.offset, 1, 1);
+ ALLOC_ZVAL(retval);
+ ZVAL_STRINGL(retval, Z_STRVAL_P(EX_T(opline->op1.var).str_offset.str)+EX_T(opline->op1.var).str_offset.offset, 1, 1);
+ INIT_PZVAL(retval);
+ AI_SET_PTR(&EX_T(opline->result.var), retval);
}
- } else if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, EG(uninitialized_zval_ptr));
- PZVAL_LOCK(EG(uninitialized_zval_ptr));
+ } else if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
+ }
+ } else if (IS_CV == IS_VAR && UNEXPECTED(*variable_ptr_ptr == &EG(error_zval))) {
+ if (0) {
+ zval_dtor(value);
+ }
+ if (RETURN_VALUE_USED(opline)) {
+ PZVAL_LOCK(&EG(uninitialized_zval));
+ AI_SET_PTR(&EX_T(opline->result.var), &EG(uninitialized_zval));
}
} else {
- value = zend_assign_to_variable(variable_ptr_ptr, value, 0 TSRMLS_CC);
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, value);
+ if (IS_CV == IS_TMP_VAR) {
+ value = zend_assign_tmp_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else if (IS_CV == IS_CONST) {
+ value = zend_assign_const_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ } else {
+ value = zend_assign_to_variable(variable_ptr_ptr, value TSRMLS_CC);
+ }
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(value);
+ AI_SET_PTR(&EX_T(opline->result.var), value);
}
}
/* zend_assign_to_variable() always takes care of op2, never free it! */
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zend_free_op free_op2;
zval **variable_ptr_ptr;
- zval **value_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op2, EX(Ts), BP_VAR_W TSRMLS_CC);
+ zval **value_ptr_ptr;
+
+ SAVE_OPLINE();
+ value_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op2.var TSRMLS_CC);
if (IS_CV == IS_VAR &&
value_ptr_ptr &&
!Z_ISREF_PP(value_ptr_ptr) &&
opline->extended_value == ZEND_RETURNS_FUNCTION &&
- !EX_T(opline->op2.u.var).var.fcall_returned_reference) {
+ !EX_T(opline->op2.var).var.fcall_returned_reference) {
if (free_op2.var == NULL) {
PZVAL_LOCK(*value_ptr_ptr); /* undo the effect of get_zval_ptr_ptr() */
}
zend_error(E_STRICT, "Only variables should be assigned by reference");
if (UNEXPECTED(EG(exception) != NULL)) {
- ZEND_VM_NEXT_OPCODE();
+ HANDLE_EXCEPTION();
}
return ZEND_ASSIGN_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} else if (IS_CV == IS_VAR && opline->extended_value == ZEND_RETURNS_NEW) {
PZVAL_LOCK(*value_ptr_ptr);
}
- if (IS_CV == IS_VAR && EX_T(opline->op1.u.var).var.ptr_ptr == &EX_T(opline->op1.u.var).var.ptr) {
+ if (IS_CV == IS_VAR && UNEXPECTED(EX_T(opline->op1.var).var.ptr_ptr == &EX_T(opline->op1.var).var.ptr)) {
zend_error_noreturn(E_ERROR, "Cannot assign by reference to overloaded object");
}
- variable_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
- if ((IS_CV == IS_VAR && !value_ptr_ptr) ||
- (IS_CV == IS_VAR && !variable_ptr_ptr)) {
+ variable_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if ((IS_CV == IS_VAR && UNEXPECTED(value_ptr_ptr == NULL)) ||
+ (IS_CV == IS_VAR && UNEXPECTED(variable_ptr_ptr == NULL))) {
zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets nor overloaded objects");
}
zend_assign_to_variable_reference(variable_ptr_ptr, value_ptr_ptr TSRMLS_CC);
@@ -29672,48 +35678,62 @@ static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER
Z_DELREF_PP(variable_ptr_ptr);
}
- if (!RETURN_VALUE_UNUSED(&opline->result)) {
- AI_SET_PTR(EX_T(opline->result.u.var).var, *variable_ptr_ptr);
+ if (RETURN_VALUE_USED(opline)) {
PZVAL_LOCK(*variable_ptr_ptr);
+ AI_SET_PTR(&EX_T(opline->result.var), *variable_ptr_ptr);
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
zval *function_name;
char *function_name_strval;
int function_name_strlen;
+ SAVE_OPLINE();
zend_ptr_stack_3_push(&EG(arg_types_stack), EX(fbc), EX(object), EX(called_scope));
- function_name = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ function_name = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- if (Z_TYPE_P(function_name)!=IS_STRING) {
+ if (IS_CV != IS_CONST &&
+ UNEXPECTED(Z_TYPE_P(function_name) != IS_STRING)) {
zend_error_noreturn(E_ERROR, "Method name must be a string");
}
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
- EX(object) = _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
+ EX(object) = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (EX(object) && Z_TYPE_P(EX(object)) == IS_OBJECT) {
- if (Z_OBJ_HT_P(EX(object))->get_method == NULL) {
- zend_error_noreturn(E_ERROR, "Object does not support method calls");
- }
+ if (EXPECTED(EX(object) != NULL) &&
+ EXPECTED(Z_TYPE_P(EX(object)) == IS_OBJECT)) {
+ EX(called_scope) = Z_OBJCE_P(EX(object));
- /* First, locate the function. */
- EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
- if (!EX(fbc)) {
- zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
- }
+ if (IS_CV != IS_CONST ||
+ (EX(fbc) = CACHED_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope))) == NULL) {
+ zval *object = EX(object);
- EX(called_scope) = Z_OBJCE_P(EX(object));
+ if (UNEXPECTED(Z_OBJ_HT_P(EX(object))->get_method == NULL)) {
+ zend_error_noreturn(E_ERROR, "Object does not support method calls");
+ }
+
+ /* First, locate the function. */
+ EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(&EX(object), function_name_strval, function_name_strlen, ((IS_CV == IS_CONST) ? (opline->op2.literal + 1) : NULL) TSRMLS_CC);
+ if (UNEXPECTED(EX(fbc) == NULL)) {
+ zend_error_noreturn(E_ERROR, "Call to undefined method %s::%s()", Z_OBJ_CLASS_NAME_P(EX(object)), function_name_strval);
+ }
+ if (IS_CV == IS_CONST &&
+ EXPECTED((EX(fbc)->common.fn_flags & (ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_NEVER_CACHE)) == 0) &&
+ EXPECTED(EX(object) == object)) {
+ CACHE_POLYMORPHIC_PTR(opline->op2.literal->cache_slot, EX(called_scope), EX(fbc));
+ }
+ }
} else {
zend_error_noreturn(E_ERROR, "Call to a member function %s() on a non-object", function_name_strval);
}
@@ -29733,76 +35753,52 @@ static int ZEND_FASTCALL ZEND_INIT_METHOD_CALL_SPEC_CV_CV_HANDLER(ZEND_OPCODE_H
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_CASE_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
- int switch_expr_is_overloaded=0;
+ USE_OPLINE
+ SAVE_OPLINE();
if (IS_CV==IS_VAR) {
- if (EX_T(opline->op1.u.var).var.ptr_ptr) {
- PZVAL_LOCK(EX_T(opline->op1.u.var).var.ptr);
- } else {
- switch_expr_is_overloaded = 1;
- Z_ADDREF_P(EX_T(opline->op1.u.var).str_offset.str);
- }
+ PZVAL_LOCK(EX_T(opline->op1.var).var.ptr);
}
- is_equal_function(&EX_T(opline->result.u.var).tmp_var,
- _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
- _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
+ is_equal_function(&EX_T(opline->result.var).tmp_var,
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC),
+ _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC) TSRMLS_CC);
- if (switch_expr_is_overloaded) {
- /* We only free op1 if this is a string offset,
- * Since if it is a TMP_VAR, it'll be reused by
- * other CASE opcodes (whereas string offsets
- * are allocated at each get_zval_ptr())
- */
-
- EX_T(opline->op1.u.var).var.ptr_ptr = NULL;
- EX_T(opline->op1.u.var).var.ptr = NULL;
- }
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval *array_ptr = &EX_T(opline->result.u.var).tmp_var;
zval *expr_ptr;
- zval *offset=_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
-#if 0 || IS_CV == IS_VAR || IS_CV == IS_CV
- zval **expr_ptr_ptr = NULL;
+ SAVE_OPLINE();
+ if ((IS_CV == IS_VAR || IS_CV == IS_CV) && opline->extended_value) {
+ zval **expr_ptr_ptr = _get_zval_ptr_ptr_cv_BP_VAR_W(EX_CVs(), opline->op1.var TSRMLS_CC);
- if (opline->extended_value) {
- expr_ptr_ptr=_get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC);
+ if (IS_CV == IS_VAR && UNEXPECTED(expr_ptr_ptr == NULL)) {
+ zend_error_noreturn(E_ERROR, "Cannot create references to/from string offsets");
+ }
+ SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
expr_ptr = *expr_ptr_ptr;
+ Z_ADDREF_P(expr_ptr);
} else {
- expr_ptr=_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
- }
-#else
- expr_ptr=_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC);
-#endif
-
- if (0) { /* temporary variable */
- zval *new_expr;
+ expr_ptr=_get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op1.var TSRMLS_CC);
+ if (0) { /* temporary variable */
+ zval *new_expr;
- ALLOC_ZVAL(new_expr);
- INIT_PZVAL_COPY(new_expr, expr_ptr);
- expr_ptr = new_expr;
- } else {
-#if 0 || IS_CV == IS_VAR || IS_CV == IS_CV
- if (opline->extended_value) {
- SEPARATE_ZVAL_TO_MAKE_IS_REF(expr_ptr_ptr);
- expr_ptr = *expr_ptr_ptr;
- Z_ADDREF_P(expr_ptr);
- } else
-#endif
- if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
+ ALLOC_ZVAL(new_expr);
+ INIT_PZVAL_COPY(new_expr, expr_ptr);
+ expr_ptr = new_expr;
+ } else if (IS_CV == IS_CONST || PZVAL_IS_REF(expr_ptr)) {
zval *new_expr;
ALLOC_ZVAL(new_expr);
@@ -29813,20 +35809,37 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_
Z_ADDREF_P(expr_ptr);
}
}
- if (offset) {
+
+ if (IS_CV != IS_UNUSED) {
+
+ zval *offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
+ ulong hval;
+
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), zend_dval_to_lval(Z_DVAL_P(offset)), &expr_ptr, sizeof(zval *), NULL);
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index;
case IS_LONG:
case IS_BOOL:
- zend_hash_index_update(Z_ARRVAL_P(array_ptr), Z_LVAL_P(offset), &expr_ptr, sizeof(zval *), NULL);
+ hval = Z_LVAL_P(offset);
+num_index:
+ zend_hash_index_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_STRING:
- zend_symtable_update(Z_ARRVAL_P(array_ptr), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, &expr_ptr, sizeof(zval *), NULL);
+ if (IS_CV == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
+ }
+ }
+ zend_hash_quick_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, &expr_ptr, sizeof(zval *), NULL);
break;
case IS_NULL:
- zend_hash_update(Z_ARRVAL_P(array_ptr), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_update(Z_ARRVAL(EX_T(opline->result.var).tmp_var), "", sizeof(""), &expr_ptr, sizeof(zval *), NULL);
break;
default:
zend_error(E_WARNING, "Illegal offset type");
@@ -29836,21 +35849,22 @@ static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CV_CV_HANDLER(ZEND_OPCODE_
}
} else {
- zend_hash_next_index_insert(Z_ARRVAL_P(array_ptr), &expr_ptr, sizeof(zval *), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(EX_T(opline->result.var).tmp_var), &expr_ptr, sizeof(zval *), NULL);
}
- if (opline->extended_value) {
+ if ((IS_CV == IS_VAR || IS_CV == IS_CV) && opline->extended_value) {
} else {
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- array_init(&EX_T(opline->result.u.var).tmp_var);
+ array_init(&EX_T(opline->result.var).tmp_var);
if (IS_CV == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CV != IS_UNUSED
@@ -29862,15 +35876,18 @@ static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER
static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
+ zval **container;
zval *offset;
+ ulong hval;
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
SEPARATE_ZVAL_IF_NOT_REF(container);
}
- offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (IS_CV != IS_VAR || container) {
switch (Z_TYPE_PP(container)) {
@@ -29879,37 +35896,39 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_
switch (Z_TYPE_P(offset)) {
case IS_DOUBLE:
- zend_hash_index_del(ht, zend_dval_to_lval(Z_DVAL_P(offset)));
- break;
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_dim;
case IS_RESOURCE:
case IS_BOOL:
case IS_LONG:
- zend_hash_index_del(ht, Z_LVAL_P(offset));
+ hval = Z_LVAL_P(offset);
+ zend_hash_index_del(ht, hval);
break;
case IS_STRING:
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
Z_ADDREF_P(offset);
}
- if (zend_symtable_del(ht, offset->value.str.val, offset->value.str.len+1) == SUCCESS &&
- ht == &EG(symbol_table)) {
- zend_execute_data *ex;
- ulong hash_value = zend_inline_hash_func(offset->value.str.val, offset->value.str.len+1);
-
- for (ex = execute_data; ex; ex = ex->prev_execute_data) {
- if (ex->op_array && ex->symbol_table == ht) {
- int i;
-
- for (i = 0; i < ex->op_array->last_var; i++) {
- if (ex->op_array->vars[i].hash_value == hash_value &&
- ex->op_array->vars[i].name_len == offset->value.str.len &&
- !memcmp(ex->op_array->vars[i].name, offset->value.str.val, offset->value.str.len)) {
- ex->CVs[i] = NULL;
- break;
- }
- }
- }
+ if (IS_CV == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_dim);
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
}
+ if (ht == &EG(symbol_table)) {
+ zend_delete_global_variable_ex(offset->value.str.val, offset->value.str.len, hval TSRMLS_CC);
+ } else {
+ zend_hash_quick_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval);
+ }
+ if (IS_CV == IS_CV || IS_CV == IS_VAR) {
+ zval_ptr_dtor(&offset);
+ }
+ break;
+num_index_dim:
+ zend_hash_index_del(ht, hval);
if (IS_CV == IS_CV || IS_CV == IS_VAR) {
zval_ptr_dtor(&offset);
}
@@ -29925,7 +35944,7 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_
break;
}
case IS_OBJECT:
- if (!Z_OBJ_HT_P(*container)->unset_dimension) {
+ if (UNEXPECTED(Z_OBJ_HT_P(*container)->unset_dimension == NULL)) {
zend_error_noreturn(E_ERROR, "Cannot use object as array");
}
if (0) {
@@ -29949,15 +35968,20 @@ static int ZEND_FASTCALL ZEND_UNSET_DIM_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_UNSET TSRMLS_CC);
- zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ zval **container;
+ zval *offset;
+
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_UNSET(EX_CVs(), opline->op1.var TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
if (IS_CV != IS_VAR || container) {
if (IS_CV == IS_CV && container != &EG(uninitialized_zval_ptr)) {
@@ -29968,7 +35992,7 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_
MAKE_REAL_ZVAL_PTR(offset);
}
if (Z_OBJ_HT_P(*container)->unset_property) {
- Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC);
+ Z_OBJ_HT_P(*container)->unset_property(*container, offset, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
}
@@ -29984,137 +36008,149 @@ static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CV(int prop_dim, ZEND_OPCODE_HANDLER_ARGS)
{
- zend_op *opline = EX(opline);
+ USE_OPLINE
- zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC);
+ zval **container;
zval **value = NULL;
int result = 0;
+ ulong hval;
+ zval *offset;
- if (IS_CV != IS_VAR || container) {
+ SAVE_OPLINE();
+ container = _get_zval_ptr_ptr_cv_BP_VAR_IS(EX_CVs(), opline->op1.var TSRMLS_CC);
- zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
+ offset = _get_zval_ptr_cv_BP_VAR_R(EX_CVs(), opline->op2.var TSRMLS_CC);
- if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
- HashTable *ht;
- int isset = 0;
+ if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
+ HashTable *ht;
+ int isset = 0;
- ht = Z_ARRVAL_PP(container);
+ ht = Z_ARRVAL_PP(container);
- switch (Z_TYPE_P(offset)) {
- case IS_DOUBLE:
- if (zend_hash_index_find(ht, zend_dval_to_lval(Z_DVAL_P(offset)), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_RESOURCE:
- case IS_BOOL:
- case IS_LONG:
- if (zend_hash_index_find(ht, Z_LVAL_P(offset), (void **) &value) == SUCCESS) {
- isset = 1;
- }
- break;
- case IS_STRING:
- if (zend_symtable_find(ht, offset->value.str.val, offset->value.str.len+1, (void **) &value) == SUCCESS) {
- isset = 1;
+ switch (Z_TYPE_P(offset)) {
+ case IS_DOUBLE:
+ hval = zend_dval_to_lval(Z_DVAL_P(offset));
+ goto num_index_prop;
+ case IS_RESOURCE:
+ case IS_BOOL:
+ case IS_LONG:
+ hval = Z_LVAL_P(offset);
+num_index_prop:
+ if (zend_hash_index_find(ht, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_STRING:
+ if (IS_CV == IS_CONST) {
+ hval = Z_HASH_P(offset);
+ } else {
+ if (!prop_dim) {
+ ZEND_HANDLE_NUMERIC_EX(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, goto num_index_prop);
}
- break;
- case IS_NULL:
- if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
- isset = 1;
+ if (IS_INTERNED(Z_STRVAL_P(offset))) {
+ hval = INTERNED_HASH(Z_STRVAL_P(offset));
+ } else {
+ hval = zend_hash_func(Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1);
}
- break;
- default:
- zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ }
+ if (zend_hash_quick_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, hval, (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ case IS_NULL:
+ if (zend_hash_find(ht, "", sizeof(""), (void **) &value) == SUCCESS) {
+ isset = 1;
+ }
+ break;
+ default:
+ zend_error(E_WARNING, "Illegal offset type in isset or empty");
+ break;
+ }
- break;
+ if (opline->extended_value & ZEND_ISSET) {
+ if (isset && Z_TYPE_PP(value) == IS_NULL) {
+ result = 0;
+ } else {
+ result = isset;
}
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (isset && Z_TYPE_PP(value) == IS_NULL) {
- result = 0;
- } else {
- result = isset;
- }
- break;
- case ZEND_ISEMPTY:
- if (!isset || !i_zend_is_true(*value)) {
- result = 0;
- } else {
- result = 1;
- }
- break;
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (!isset || !i_zend_is_true(*value)) {
+ result = 0;
+ } else {
+ result = 1;
}
+ }
- } else if (Z_TYPE_PP(container) == IS_OBJECT) {
- if (0) {
- MAKE_REAL_ZVAL_PTR(offset);
- }
- if (prop_dim) {
- if (Z_OBJ_HT_P(*container)->has_property) {
- result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check property of non-object");
- result = 0;
- }
+ } else if (Z_TYPE_PP(container) == IS_OBJECT) {
+ if (0) {
+ MAKE_REAL_ZVAL_PTR(offset);
+ }
+ if (prop_dim) {
+ if (Z_OBJ_HT_P(*container)->has_property) {
+ result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0, ((IS_CV == IS_CONST) ? opline->op2.literal : NULL) TSRMLS_CC);
} else {
- if (Z_OBJ_HT_P(*container)->has_dimension) {
- result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value == ZEND_ISEMPTY) TSRMLS_CC);
- } else {
- zend_error(E_NOTICE, "Trying to check element of non-array");
- result = 0;
- }
+ zend_error(E_NOTICE, "Trying to check property of non-object");
+ result = 0;
}
- if (0) {
- zval_ptr_dtor(&offset);
+ } else {
+ if (Z_OBJ_HT_P(*container)->has_dimension) {
+ result = Z_OBJ_HT_P(*container)->has_dimension(*container, offset, (opline->extended_value & ZEND_ISEMPTY) != 0 TSRMLS_CC);
} else {
-
+ zend_error(E_NOTICE, "Trying to check element of non-array");
+ result = 0;
}
- } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
- zval tmp;
+ }
+ if (0) {
+ zval_ptr_dtor(&offset);
+ } else {
+
+ }
+ } else if ((*container)->type == IS_STRING && !prop_dim) { /* string offsets */
+ zval tmp;
- if (Z_TYPE_P(offset) != IS_LONG) {
- tmp = *offset;
+ if (Z_TYPE_P(offset) != IS_LONG) {
+ if (Z_TYPE_P(offset) <= IS_BOOL /* simple scalar types */
+ || (Z_TYPE_P(offset) == IS_STRING /* or numeric string */
+ && IS_LONG == is_numeric_string(Z_STRVAL_P(offset), Z_STRLEN_P(offset), NULL, NULL, 0))) {
+ ZVAL_COPY_VALUE(&tmp, offset);
zval_copy_ctor(&tmp);
convert_to_long(&tmp);
offset = &tmp;
+ } else {
+ /* can not be converted to proper offset, return "not set" */
+ result = 0;
}
- if (Z_TYPE_P(offset) == IS_LONG) {
- switch (opline->extended_value) {
- case ZEND_ISSET:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
- result = 1;
- }
- break;
- case ZEND_ISEMPTY:
- if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
- result = 1;
- }
- break;
+ }
+ if (Z_TYPE_P(offset) == IS_LONG) {
+ if (opline->extended_value & ZEND_ISSET) {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container)) {
+ result = 1;
+ }
+ } else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
+ if (offset->value.lval >= 0 && offset->value.lval < Z_STRLEN_PP(container) && Z_STRVAL_PP(container)[offset->value.lval] != '0') {
+ result = 1;
}
}
+ }
- } else {
+ } else {
- }
}
- Z_TYPE(EX_T(opline->result.u.var).tmp_var) = IS_BOOL;
-
- switch (opline->extended_value) {
- case ZEND_ISSET:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = result;
- break;
- case ZEND_ISEMPTY:
- Z_LVAL(EX_T(opline->result.u.var).tmp_var) = !result;
- break;
+ Z_TYPE(EX_T(opline->result.var).tmp_var) = IS_BOOL;
+ if (opline->extended_value & ZEND_ISSET) {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = result;
+ } else {
+ Z_LVAL(EX_T(opline->result.var).tmp_var) = !result;
}
+ CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
}
@@ -30130,7 +36166,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_PROP_OBJ_SPEC_CV_CV_HANDLER(ZEND_OP
static int ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
- zend_error_noreturn(E_ERROR, "Invalid opcode %d/%d/%d.", EX(opline)->opcode, EX(opline)->op1.op_type, EX(opline)->op2.op_type);
+ zend_error_noreturn(E_ERROR, "Invalid opcode %d/%d/%d.", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);
}
@@ -31388,55 +37424,55 @@ void zend_init_opcodes_handlers(void)
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_BRK_SPEC_CONST_HANDLER,
- ZEND_BRK_SPEC_TMP_HANDLER,
- ZEND_BRK_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_BRK_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_BRK_SPEC_CONST_HANDLER,
- ZEND_BRK_SPEC_TMP_HANDLER,
- ZEND_BRK_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_BRK_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_BRK_SPEC_CONST_HANDLER,
- ZEND_BRK_SPEC_TMP_HANDLER,
- ZEND_BRK_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_BRK_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_BRK_SPEC_CONST_HANDLER,
- ZEND_BRK_SPEC_TMP_HANDLER,
- ZEND_BRK_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_BRK_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_BRK_SPEC_CONST_HANDLER,
- ZEND_BRK_SPEC_TMP_HANDLER,
- ZEND_BRK_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_BRK_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_CONT_SPEC_CONST_HANDLER,
- ZEND_CONT_SPEC_TMP_HANDLER,
- ZEND_CONT_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_CONT_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_CONT_SPEC_CONST_HANDLER,
- ZEND_CONT_SPEC_TMP_HANDLER,
- ZEND_CONT_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_CONT_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_CONT_SPEC_CONST_HANDLER,
- ZEND_CONT_SPEC_TMP_HANDLER,
- ZEND_CONT_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_CONT_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_CONT_SPEC_CONST_HANDLER,
- ZEND_CONT_SPEC_TMP_HANDLER,
- ZEND_CONT_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_CONT_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_CONT_SPEC_CONST_HANDLER,
- ZEND_CONT_SPEC_TMP_HANDLER,
- ZEND_CONT_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_CONT_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_BOOL_SPEC_CONST_HANDLER,
ZEND_BOOL_SPEC_CONST_HANDLER,
ZEND_BOOL_SPEC_CONST_HANDLER,
@@ -31772,21 +37808,21 @@ void zend_init_opcodes_handlers(void)
ZEND_SEND_VAL_SPEC_TMP_HANDLER,
ZEND_SEND_VAL_SPEC_TMP_HANDLER,
ZEND_SEND_VAL_SPEC_TMP_HANDLER,
- ZEND_SEND_VAL_SPEC_VAR_HANDLER,
- ZEND_SEND_VAL_SPEC_VAR_HANDLER,
- ZEND_SEND_VAL_SPEC_VAR_HANDLER,
- ZEND_SEND_VAL_SPEC_VAR_HANDLER,
- ZEND_SEND_VAL_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_SEND_VAL_SPEC_CV_HANDLER,
- ZEND_SEND_VAL_SPEC_CV_HANDLER,
- ZEND_SEND_VAL_SPEC_CV_HANDLER,
- ZEND_SEND_VAL_SPEC_CV_HANDLER,
- ZEND_SEND_VAL_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -31897,11 +37933,11 @@ void zend_init_opcodes_handlers(void)
ZEND_FREE_SPEC_TMP_HANDLER,
ZEND_FREE_SPEC_TMP_HANDLER,
ZEND_FREE_SPEC_TMP_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
+ ZEND_FREE_SPEC_VAR_HANDLER,
+ ZEND_FREE_SPEC_VAR_HANDLER,
+ ZEND_FREE_SPEC_VAR_HANDLER,
+ ZEND_FREE_SPEC_VAR_HANDLER,
+ ZEND_FREE_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -31987,31 +38023,31 @@ void zend_init_opcodes_handlers(void)
ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER,
ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER,
ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER,
- ZEND_UNSET_VAR_SPEC_CONST_HANDLER,
- ZEND_UNSET_VAR_SPEC_CONST_HANDLER,
- ZEND_UNSET_VAR_SPEC_CONST_HANDLER,
- ZEND_UNSET_VAR_SPEC_CONST_HANDLER,
- ZEND_UNSET_VAR_SPEC_CONST_HANDLER,
- ZEND_UNSET_VAR_SPEC_TMP_HANDLER,
- ZEND_UNSET_VAR_SPEC_TMP_HANDLER,
- ZEND_UNSET_VAR_SPEC_TMP_HANDLER,
- ZEND_UNSET_VAR_SPEC_TMP_HANDLER,
- ZEND_UNSET_VAR_SPEC_TMP_HANDLER,
- ZEND_UNSET_VAR_SPEC_VAR_HANDLER,
- ZEND_UNSET_VAR_SPEC_VAR_HANDLER,
- ZEND_UNSET_VAR_SPEC_VAR_HANDLER,
- ZEND_UNSET_VAR_SPEC_VAR_HANDLER,
- ZEND_UNSET_VAR_SPEC_VAR_HANDLER,
+ ZEND_UNSET_VAR_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_VAR_SPEC_CONST_VAR_HANDLER,
+ ZEND_UNSET_VAR_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_VAR_SPEC_TMP_CONST_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_UNSET_VAR_SPEC_TMP_VAR_HANDLER,
+ ZEND_UNSET_VAR_SPEC_TMP_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_UNSET_VAR_SPEC_VAR_CONST_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_UNSET_VAR_SPEC_VAR_VAR_HANDLER,
+ ZEND_UNSET_VAR_SPEC_VAR_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_UNSET_VAR_SPEC_CV_HANDLER,
- ZEND_UNSET_VAR_SPEC_CV_HANDLER,
- ZEND_UNSET_VAR_SPEC_CV_HANDLER,
- ZEND_UNSET_VAR_SPEC_CV_HANDLER,
- ZEND_UNSET_VAR_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_VAR_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_UNSET_VAR_SPEC_CV_VAR_HANDLER,
+ ZEND_UNSET_VAR_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -32137,31 +38173,31 @@ void zend_init_opcodes_handlers(void)
ZEND_EXIT_SPEC_CV_HANDLER,
ZEND_EXIT_SPEC_CV_HANDLER,
ZEND_EXIT_SPEC_CV_HANDLER,
- ZEND_FETCH_R_SPEC_CONST_HANDLER,
- ZEND_FETCH_R_SPEC_CONST_HANDLER,
- ZEND_FETCH_R_SPEC_CONST_HANDLER,
- ZEND_FETCH_R_SPEC_CONST_HANDLER,
- ZEND_FETCH_R_SPEC_CONST_HANDLER,
- ZEND_FETCH_R_SPEC_TMP_HANDLER,
- ZEND_FETCH_R_SPEC_TMP_HANDLER,
- ZEND_FETCH_R_SPEC_TMP_HANDLER,
- ZEND_FETCH_R_SPEC_TMP_HANDLER,
- ZEND_FETCH_R_SPEC_TMP_HANDLER,
- ZEND_FETCH_R_SPEC_VAR_HANDLER,
- ZEND_FETCH_R_SPEC_VAR_HANDLER,
- ZEND_FETCH_R_SPEC_VAR_HANDLER,
- ZEND_FETCH_R_SPEC_VAR_HANDLER,
- ZEND_FETCH_R_SPEC_VAR_HANDLER,
+ ZEND_FETCH_R_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_R_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_R_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_R_SPEC_TMP_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_R_SPEC_TMP_VAR_HANDLER,
+ ZEND_FETCH_R_SPEC_TMP_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_R_SPEC_VAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_R_SPEC_VAR_VAR_HANDLER,
+ ZEND_FETCH_R_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_FETCH_R_SPEC_CV_CONST_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_FETCH_R_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_R_SPEC_CV_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_FETCH_R_SPEC_CV_HANDLER,
- ZEND_FETCH_R_SPEC_CV_HANDLER,
- ZEND_FETCH_R_SPEC_CV_HANDLER,
- ZEND_FETCH_R_SPEC_CV_HANDLER,
- ZEND_FETCH_R_SPEC_CV_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -32212,31 +38248,31 @@ void zend_init_opcodes_handlers(void)
ZEND_FETCH_OBJ_R_SPEC_CV_VAR_HANDLER,
ZEND_NULL_HANDLER,
ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_W_SPEC_CONST_HANDLER,
- ZEND_FETCH_W_SPEC_CONST_HANDLER,
- ZEND_FETCH_W_SPEC_CONST_HANDLER,
- ZEND_FETCH_W_SPEC_CONST_HANDLER,
- ZEND_FETCH_W_SPEC_CONST_HANDLER,
- ZEND_FETCH_W_SPEC_TMP_HANDLER,
- ZEND_FETCH_W_SPEC_TMP_HANDLER,
- ZEND_FETCH_W_SPEC_TMP_HANDLER,
- ZEND_FETCH_W_SPEC_TMP_HANDLER,
- ZEND_FETCH_W_SPEC_TMP_HANDLER,
- ZEND_FETCH_W_SPEC_VAR_HANDLER,
- ZEND_FETCH_W_SPEC_VAR_HANDLER,
- ZEND_FETCH_W_SPEC_VAR_HANDLER,
- ZEND_FETCH_W_SPEC_VAR_HANDLER,
- ZEND_FETCH_W_SPEC_VAR_HANDLER,
+ ZEND_FETCH_W_SPEC_CONST_CONST_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_FETCH_W_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_W_SPEC_CONST_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_FETCH_W_SPEC_TMP_CONST_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_FETCH_W_SPEC_TMP_VAR_HANDLER,
+ ZEND_FETCH_W_SPEC_TMP_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_FETCH_W_SPEC_VAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_W_SPEC_VAR_VAR_HANDLER,
+ ZEND_FETCH_W_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_W_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_W_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_W_SPEC_CV_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_FETCH_W_SPEC_CV_HANDLER,
- ZEND_FETCH_W_SPEC_CV_HANDLER,
- ZEND_FETCH_W_SPEC_CV_HANDLER,
- ZEND_FETCH_W_SPEC_CV_HANDLER,
- ZEND_FETCH_W_SPEC_CV_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -32287,31 +38323,31 @@ void zend_init_opcodes_handlers(void)
ZEND_FETCH_OBJ_W_SPEC_CV_VAR_HANDLER,
ZEND_NULL_HANDLER,
ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_RW_SPEC_CONST_HANDLER,
- ZEND_FETCH_RW_SPEC_CONST_HANDLER,
- ZEND_FETCH_RW_SPEC_CONST_HANDLER,
- ZEND_FETCH_RW_SPEC_CONST_HANDLER,
- ZEND_FETCH_RW_SPEC_CONST_HANDLER,
- ZEND_FETCH_RW_SPEC_TMP_HANDLER,
- ZEND_FETCH_RW_SPEC_TMP_HANDLER,
- ZEND_FETCH_RW_SPEC_TMP_HANDLER,
- ZEND_FETCH_RW_SPEC_TMP_HANDLER,
- ZEND_FETCH_RW_SPEC_TMP_HANDLER,
- ZEND_FETCH_RW_SPEC_VAR_HANDLER,
- ZEND_FETCH_RW_SPEC_VAR_HANDLER,
- ZEND_FETCH_RW_SPEC_VAR_HANDLER,
- ZEND_FETCH_RW_SPEC_VAR_HANDLER,
- ZEND_FETCH_RW_SPEC_VAR_HANDLER,
+ ZEND_FETCH_RW_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_RW_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_RW_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_RW_SPEC_TMP_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_RW_SPEC_TMP_VAR_HANDLER,
+ ZEND_FETCH_RW_SPEC_TMP_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_RW_SPEC_VAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_RW_SPEC_VAR_VAR_HANDLER,
+ ZEND_FETCH_RW_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_FETCH_RW_SPEC_CV_HANDLER,
- ZEND_FETCH_RW_SPEC_CV_HANDLER,
- ZEND_FETCH_RW_SPEC_CV_HANDLER,
- ZEND_FETCH_RW_SPEC_CV_HANDLER,
- ZEND_FETCH_RW_SPEC_CV_HANDLER,
+ ZEND_FETCH_RW_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_RW_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_RW_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -32362,31 +38398,31 @@ void zend_init_opcodes_handlers(void)
ZEND_FETCH_OBJ_RW_SPEC_CV_VAR_HANDLER,
ZEND_NULL_HANDLER,
ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_IS_SPEC_CONST_HANDLER,
- ZEND_FETCH_IS_SPEC_CONST_HANDLER,
- ZEND_FETCH_IS_SPEC_CONST_HANDLER,
- ZEND_FETCH_IS_SPEC_CONST_HANDLER,
- ZEND_FETCH_IS_SPEC_CONST_HANDLER,
- ZEND_FETCH_IS_SPEC_TMP_HANDLER,
- ZEND_FETCH_IS_SPEC_TMP_HANDLER,
- ZEND_FETCH_IS_SPEC_TMP_HANDLER,
- ZEND_FETCH_IS_SPEC_TMP_HANDLER,
- ZEND_FETCH_IS_SPEC_TMP_HANDLER,
- ZEND_FETCH_IS_SPEC_VAR_HANDLER,
- ZEND_FETCH_IS_SPEC_VAR_HANDLER,
- ZEND_FETCH_IS_SPEC_VAR_HANDLER,
- ZEND_FETCH_IS_SPEC_VAR_HANDLER,
- ZEND_FETCH_IS_SPEC_VAR_HANDLER,
+ ZEND_FETCH_IS_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_IS_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_IS_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_IS_SPEC_TMP_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_IS_SPEC_TMP_VAR_HANDLER,
+ ZEND_FETCH_IS_SPEC_TMP_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_IS_SPEC_VAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_IS_SPEC_VAR_VAR_HANDLER,
+ ZEND_FETCH_IS_SPEC_VAR_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_FETCH_IS_SPEC_CV_HANDLER,
- ZEND_FETCH_IS_SPEC_CV_HANDLER,
- ZEND_FETCH_IS_SPEC_CV_HANDLER,
- ZEND_FETCH_IS_SPEC_CV_HANDLER,
- ZEND_FETCH_IS_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_IS_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_IS_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_IS_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -32437,31 +38473,31 @@ void zend_init_opcodes_handlers(void)
ZEND_FETCH_OBJ_IS_SPEC_CV_VAR_HANDLER,
ZEND_NULL_HANDLER,
ZEND_FETCH_OBJ_IS_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CONST_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CONST_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CONST_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CONST_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CONST_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_TMP_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_TMP_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_TMP_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_TMP_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_TMP_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_VAR_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_VAR_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_VAR_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_VAR_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_VAR_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_TMP_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_TMP_VAR_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_TMP_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_VAR_CONST_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_VAR_VAR_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_VAR_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CV_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CV_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CV_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CV_HANDLER,
- ZEND_FETCH_FUNC_ARG_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_FUNC_ARG_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -32512,31 +38548,31 @@ void zend_init_opcodes_handlers(void)
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_VAR_HANDLER,
ZEND_NULL_HANDLER,
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CONST_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CONST_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CONST_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CONST_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CONST_HANDLER,
- ZEND_FETCH_UNSET_SPEC_TMP_HANDLER,
- ZEND_FETCH_UNSET_SPEC_TMP_HANDLER,
- ZEND_FETCH_UNSET_SPEC_TMP_HANDLER,
- ZEND_FETCH_UNSET_SPEC_TMP_HANDLER,
- ZEND_FETCH_UNSET_SPEC_TMP_HANDLER,
- ZEND_FETCH_UNSET_SPEC_VAR_HANDLER,
- ZEND_FETCH_UNSET_SPEC_VAR_HANDLER,
- ZEND_FETCH_UNSET_SPEC_VAR_HANDLER,
- ZEND_FETCH_UNSET_SPEC_VAR_HANDLER,
- ZEND_FETCH_UNSET_SPEC_VAR_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_CONST_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_CONST_VAR_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_TMP_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_TMP_VAR_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_TMP_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_VAR_CONST_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_VAR_VAR_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_VAR_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CV_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CV_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CV_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CV_HANDLER,
- ZEND_FETCH_UNSET_SPEC_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_CV_VAR_HANDLER,
+ ZEND_FETCH_UNSET_SPEC_CV_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -32762,31 +38798,31 @@ void zend_init_opcodes_handlers(void)
ZEND_EXT_NOP_SPEC_HANDLER,
ZEND_EXT_NOP_SPEC_HANDLER,
ZEND_EXT_NOP_SPEC_HANDLER,
- ZEND_TICKS_SPEC_CONST_HANDLER,
- ZEND_TICKS_SPEC_CONST_HANDLER,
- ZEND_TICKS_SPEC_CONST_HANDLER,
- ZEND_TICKS_SPEC_CONST_HANDLER,
- ZEND_TICKS_SPEC_CONST_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
+ ZEND_TICKS_SPEC_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -32816,27 +38852,27 @@ void zend_init_opcodes_handlers(void)
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_CATCH_SPEC_CV_HANDLER,
+ ZEND_CATCH_SPEC_CONST_CV_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_CATCH_SPEC_CV_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_CATCH_SPEC_CV_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_CATCH_SPEC_CV_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_CATCH_SPEC_CV_HANDLER,
ZEND_THROW_SPEC_CONST_HANDLER,
ZEND_THROW_SPEC_CONST_HANDLER,
ZEND_THROW_SPEC_CONST_HANDLER,
@@ -32912,31 +38948,31 @@ void zend_init_opcodes_handlers(void)
ZEND_CLONE_SPEC_CV_HANDLER,
ZEND_CLONE_SPEC_CV_HANDLER,
ZEND_CLONE_SPEC_CV_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CONST_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
- ZEND_NULL_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CV_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CV_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CV_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CV_HANDLER,
+ ZEND_RETURN_BY_REF_SPEC_CV_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -32987,31 +39023,31 @@ void zend_init_opcodes_handlers(void)
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_CONST_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_VAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_CONST_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_VAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_VAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_CONST_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_VAR_HANDLER,
+ ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_HANDLER,
- ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -33962,10 +39998,95 @@ void zend_init_opcodes_handlers(void)
ZEND_JMP_SET_SPEC_CV_HANDLER,
ZEND_JMP_SET_SPEC_CV_HANDLER,
ZEND_JMP_SET_SPEC_CV_HANDLER,
- ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_CONST_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_CONST_UNUSED_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_ADD_TRAIT_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_BIND_TRAITS_SPEC_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_NULL_HANDLER,
+ ZEND_SEPARATE_SPEC_VAR_UNUSED_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
@@ -33977,16 +40098,56 @@ void zend_init_opcodes_handlers(void)
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_CONST_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_CONST_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_CONST_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_CONST_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_CONST_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_TMP_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_TMP_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_TMP_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_TMP_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_TMP_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_VAR_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_VAR_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_VAR_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_VAR_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_CV_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_CV_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_CV_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_CV_HANDLER,
+ ZEND_QM_ASSIGN_VAR_SPEC_CV_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_CONST_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_CONST_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_CONST_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_CONST_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_CONST_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_TMP_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_TMP_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_TMP_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_TMP_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_TMP_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_VAR_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_VAR_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_VAR_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_VAR_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_VAR_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
ZEND_NULL_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_CV_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_CV_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_CV_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_CV_HANDLER,
+ ZEND_JMP_SET_VAR_SPEC_CV_HANDLER,
ZEND_NULL_HANDLER
};
zend_opcode_handlers = (opcode_handler_t*)labels;
@@ -34012,7 +40173,7 @@ static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* o
_UNUSED_CODE, /* 15 */
_CV_CODE /* 16 = IS_CV */
};
- return zend_opcode_handlers[opcode * 25 + zend_vm_decode[op->op1.op_type] * 5 + zend_vm_decode[op->op2.op_type]];
+ return zend_opcode_handlers[opcode * 25 + zend_vm_decode[op->op1_type] * 5 + zend_vm_decode[op->op2_type]];
}
ZEND_API void zend_vm_set_opcode_handler(zend_op* op)
diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl
index 18d0e2935..426f68979 100644
--- a/Zend/zend_vm_execute.skl
+++ b/Zend/zend_vm_execute.skl
@@ -2,6 +2,7 @@
ZEND_API void {%EXECUTOR_NAME%}(zend_op_array *op_array TSRMLS_DC)
{
+ DCL_OPLINE
zend_execute_data *execute_data;
zend_bool nested = 0;
zend_bool original_in_execution = EG(in_execution);
@@ -36,29 +37,31 @@ zend_vm_enter:
EX(nested) = nested;
nested = 1;
- if (op_array->start_op) {
- ZEND_VM_SET_OPCODE(op_array->start_op);
- } else {
- ZEND_VM_SET_OPCODE(op_array->opcodes);
+ LOAD_REGS();
+
+ if (!op_array->run_time_cache && op_array->last_cache_slot) {
+ op_array->run_time_cache = ecalloc(op_array->last_cache_slot, sizeof(void*));
}
if (op_array->this_var != -1 && EG(This)) {
Z_ADDREF_P(EG(This)); /* For $this pointer */
if (!EG(active_symbol_table)) {
- EX(CVs)[op_array->this_var] = (zval**)EX(CVs) + (op_array->last_var + op_array->this_var);
- *EX(CVs)[op_array->this_var] = EG(This);
+ EX_CV(op_array->this_var) = (zval**)EX_CVs() + (op_array->last_var + op_array->this_var);
+ *EX_CV(op_array->this_var) = EG(This);
} else {
- if (zend_hash_add(EG(active_symbol_table), "this", sizeof("this"), &EG(This), sizeof(zval *), (void**)&EX(CVs)[op_array->this_var])==FAILURE) {
+ if (zend_hash_add(EG(active_symbol_table), "this", sizeof("this"), &EG(This), sizeof(zval *), (void**)&EX_CV(op_array->this_var))==FAILURE) {
Z_DELREF_P(EG(This));
}
}
}
+ EX(opline) = UNEXPECTED((op_array->fn_flags & ZEND_ACC_INTERACTIVE) != 0) && EG(start_op) ? EG(start_op) : op_array->opcodes;
EG(opline_ptr) = &EX(opline);
+ LOAD_OPLINE();
EX(function_state).function = (zend_function *) op_array;
EX(function_state).arguments = NULL;
-
+
while (1) {
{%ZEND_VM_CONTINUE_LABEL%}
#ifdef ZEND_WIN32
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php
index 4ef6bfc8c..be6ca0474 100644
--- a/Zend/zend_vm_gen.php
+++ b/Zend/zend_vm_gen.php
@@ -82,7 +82,7 @@ $typecode = array(
);
$op1_type = array(
- "ANY" => "opline->op1.op_type",
+ "ANY" => "opline->op1_type",
"TMP" => "IS_TMP_VAR",
"VAR" => "IS_VAR",
"CONST" => "IS_CONST",
@@ -91,7 +91,7 @@ $op1_type = array(
);
$op2_type = array(
- "ANY" => "opline->op2.op_type",
+ "ANY" => "opline->op2_type",
"TMP" => "IS_TMP_VAR",
"VAR" => "IS_VAR",
"CONST" => "IS_CONST",
@@ -118,75 +118,75 @@ $op2_free = array(
);
$op1_get_zval_ptr = array(
- "ANY" => "get_zval_ptr(&opline->op1, EX(Ts), &free_op1, \\1)",
- "TMP" => "_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC)",
- "VAR" => "_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC)",
- "CONST" => "&opline->op1.u.constant",
+ "ANY" => "get_zval_ptr(opline->op1_type, &opline->op1, EX_Ts(), &free_op1, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC)",
+ "VAR" => "_get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC)",
+ "CONST" => "opline->op1.zv",
"UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv(&opline->op1, EX(Ts), \\1 TSRMLS_CC)",
+ "CV" => "_get_zval_ptr_cv_\\1(EX_CVs(), opline->op1.var TSRMLS_CC)",
);
$op2_get_zval_ptr = array(
- "ANY" => "get_zval_ptr(&opline->op2, EX(Ts), &free_op2, \\1)",
- "TMP" => "_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC)",
- "VAR" => "_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC)",
- "CONST" => "&opline->op2.u.constant",
+ "ANY" => "get_zval_ptr(opline->op2_type, &opline->op2, EX_Ts(), &free_op2, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC)",
+ "VAR" => "_get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC)",
+ "CONST" => "opline->op2.zv",
"UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_cv(&opline->op2, EX(Ts), \\1 TSRMLS_CC)",
+ "CV" => "_get_zval_ptr_cv_\\1(EX_CVs(), opline->op2.var TSRMLS_CC)",
);
$op1_get_zval_ptr_ptr = array(
- "ANY" => "get_zval_ptr_ptr(&opline->op1, EX(Ts), &free_op1, \\1)",
+ "ANY" => "get_zval_ptr_ptr(opline->op1_type, &opline->op1, EX_Ts(), &free_op1, \\1)",
"TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC)",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC)",
"CONST" => "NULL",
"UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), \\1 TSRMLS_CC)",
+ "CV" => "_get_zval_ptr_ptr_cv_\\1(EX_CVs(), opline->op1.var TSRMLS_CC)",
);
$op2_get_zval_ptr_ptr = array(
- "ANY" => "get_zval_ptr_ptr(&opline->op2, EX(Ts), &free_op2, \\1)",
+ "ANY" => "get_zval_ptr_ptr(opline->op2_type, &opline->op2, EX_Ts(), &free_op2, \\1)",
"TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC)",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC)",
"CONST" => "NULL",
"UNUSED" => "NULL",
- "CV" => "_get_zval_ptr_ptr_cv(&opline->op2, EX(Ts), \\1 TSRMLS_CC)",
+ "CV" => "_get_zval_ptr_ptr_cv_\\1(EX_CVs(), opline->op2.var TSRMLS_CC)",
);
$op1_get_obj_zval_ptr = array(
- "ANY" => "get_obj_zval_ptr(&opline->op1, EX(Ts), &free_op1, \\1)",
- "TMP" => "_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC)",
- "VAR" => "_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC)",
- "CONST" => "&opline->op1.u.constant",
+ "ANY" => "get_obj_zval_ptr(opline->op1_type, &opline->op1, EX_Ts(), &free_op1, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC)",
+ "VAR" => "_get_zval_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC)",
+ "CONST" => "opline->op1.zv",
"UNUSED" => "_get_obj_zval_ptr_unused(TSRMLS_C)",
- "CV" => "_get_zval_ptr_cv(&opline->op1, EX(Ts), \\1 TSRMLS_CC)",
+ "CV" => "_get_zval_ptr_cv_\\1(EX_CVs(), opline->op1.var TSRMLS_CC)",
);
$op2_get_obj_zval_ptr = array(
- "ANY" => "get_obj_zval_ptr(&opline->op2, EX(Ts), &free_op2, \\1)",
- "TMP" => "_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC)",
- "VAR" => "_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC)",
- "CONST" => "&opline->op2.u.constant",
+ "ANY" => "get_obj_zval_ptr(opline->op2_type, &opline->op2, EX_Ts(), &free_op2, \\1)",
+ "TMP" => "_get_zval_ptr_tmp(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC)",
+ "VAR" => "_get_zval_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC)",
+ "CONST" => "opline->op2.zv",
"UNUSED" => "_get_obj_zval_ptr_unused(TSRMLS_C)",
- "CV" => "_get_zval_ptr_cv(&opline->op2, EX(Ts), \\1 TSRMLS_CC)",
+ "CV" => "_get_zval_ptr_cv_\\1(EX_CVs(), opline->op2.var TSRMLS_CC)",
);
$op1_get_obj_zval_ptr_ptr = array(
- "ANY" => "get_obj_zval_ptr_ptr(&opline->op1, EX(Ts), &free_op1, \\1)",
+ "ANY" => "get_obj_zval_ptr_ptr(opline->op1_type, &opline->op1, EX_Ts(), &free_op1, \\1)",
"TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC)",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var, EX_Ts(), &free_op1 TSRMLS_CC)",
"CONST" => "NULL",
"UNUSED" => "_get_obj_zval_ptr_ptr_unused(TSRMLS_C)",
- "CV" => "_get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), \\1 TSRMLS_CC)",
+ "CV" => "_get_zval_ptr_ptr_cv_\\1(EX_CVs(), opline->op1.var TSRMLS_CC)",
);
$op2_get_obj_zval_ptr_ptr = array(
- "ANY" => "get_obj_zval_ptr_ptr(&opline->op2, EX(Ts), &free_op2, \\1)",
+ "ANY" => "get_obj_zval_ptr_ptr(opline->op2_type, &opline->op2, EX_Ts(), &free_op2, \\1)",
"TMP" => "NULL",
- "VAR" => "_get_zval_ptr_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC)",
+ "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var, EX_Ts(), &free_op2 TSRMLS_CC)",
"CONST" => "NULL",
"UNUSED" => "_get_obj_zval_ptr_ptr_unused(TSRMLS_C)",
- "CV" => "_get_zval_ptr_ptr_cv(&opline->op2, EX(Ts), \\1 TSRMLS_CC)",
+ "CV" => "_get_zval_ptr_ptr_cv_\\1(EX_CVs(), opline->op2.var TSRMLS_CC)",
);
$op1_is_tmp_free = array(
@@ -504,7 +504,7 @@ function gen_handler($f, $spec, $kind, $name, $op1, $op2, $use, $code, $lineno)
}
break;
case ZEND_VM_KIND_GOTO:
- out($f,$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."_HANDLER:\n");
+ out($f,$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2]."_HANDLER: ZEND_VM_GUARD(".$name.($spec?"_SPEC":"").$prefix[$op1].$prefix[$op2].");\n");
break;
}
@@ -694,7 +694,7 @@ function gen_null_handler($f) {
$done = 1;
out($f,"static int ZEND_FASTCALL ZEND_NULL_HANDLER(ZEND_OPCODE_HANDLER_ARGS)\n");
out($f,"{\n");
- out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", EX(opline)->opcode, EX(opline)->op1.op_type, EX(opline)->op2.op_type);\n");
+ out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);\n");
out($f,"}\n\n");
}
}
@@ -768,11 +768,11 @@ function gen_executor_code($f, $spec, $kind, $prolog) {
break;
case ZEND_VM_KIND_SWITCH:
out($f,"default:\n");
- out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", EX(opline)->opcode, EX(opline)->op1.op_type, EX(opline)->op2.op_type);\n");
+ out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);\n");
break;
case ZEND_VM_KIND_GOTO:
out($f,"ZEND_NULL_HANDLER:\n");
- out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", EX(opline)->opcode, EX(opline)->op1.op_type, EX(opline)->op2.op_type);\n");
+ out($f,"\tzend_error_noreturn(E_ERROR, \"Invalid opcode %d/%d/%d.\", OPLINE->opcode, OPLINE->op1_type, OPLINE->op2_type);\n");
break;
}
}
@@ -800,18 +800,60 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
out($f,"static opcode_handler_t zend_vm_get_opcode_handler(zend_uchar opcode, zend_op* op);\n\n");
switch ($kind) {
case ZEND_VM_KIND_CALL:
- out($f,"\n");
- out($f,"#define ZEND_VM_CONTINUE() return 0\n");
- out($f,"#define ZEND_VM_RETURN() return 1\n");
- out($f,"#define ZEND_VM_ENTER() return 2\n");
- out($f,"#define ZEND_VM_LEAVE() return 3\n");
+ out($f,"\n");
+ out($f,"#undef OPLINE\n");
+ out($f,"#undef DCL_OPLINE\n");
+ out($f,"#undef USE_OPLINE\n");
+ out($f,"#undef LOAD_OPLINE\n");
+ out($f,"#undef SAVE_OPLINE\n");
+ out($f,"#define OPLINE EX(opline)\n");
+ out($f,"#define DCL_OPLINE\n");
+ out($f,"#define USE_OPLINE zend_op *opline = EX(opline);\n");
+ out($f,"#define LOAD_OPLINE()\n");
+ out($f,"#define SAVE_OPLINE()\n");
+ out($f,"#undef CHECK_EXCEPTION\n");
+ out($f,"#undef HANDLE_EXCEPTION\n");
+ out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
+ out($f,"#define CHECK_EXCEPTION() LOAD_OPLINE()\n");
+ out($f,"#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
+ out($f,"#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()\n");
+ out($f,"#define LOAD_REGS()\n");
+ out($f,"#define ZEND_VM_CONTINUE() return 0\n");
+ out($f,"#define ZEND_VM_RETURN() return 1\n");
+ out($f,"#define ZEND_VM_ENTER() return 2\n");
+ out($f,"#define ZEND_VM_LEAVE() return 3\n");
out($f,"#define ZEND_VM_DISPATCH(opcode, opline) return zend_vm_get_opcode_handler(opcode, opline)(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);\n\n");
out($f,"#define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL execute_data TSRMLS_CC\n");
out($f,"#undef EX\n");
out($f,"#define EX(element) execute_data->element\n\n");
+ out($f,"#undef EX_CV\n");
+ out($f,"#define EX_CV(var) EX(CVs)[var]\n");
+ out($f,"#undef EX_CVs\n");
+ out($f,"#define EX_CVs() EX(CVs)\n");
+ out($f,"#undef EX_T\n");
+ out($f,"#define EX_T(offset) (*(temp_variable *)((char *) EX(Ts) + offset))\n");
+ out($f,"#undef EX_Ts\n");
+ out($f,"#define EX_Ts() EX(Ts)\n\n");
break;
case ZEND_VM_KIND_SWITCH:
out($f,"\n");
+ out($f,"#undef OPLINE\n");
+ out($f,"#undef DCL_OPLINE\n");
+ out($f,"#undef USE_OPLINE\n");
+ out($f,"#undef LOAD_OPLINE\n");
+ out($f,"#undef SAVE_OPLINE\n");
+ out($f,"#define OPLINE opline\n");
+ out($f,"#define DCL_OPLINE zend_op *opline;\n");
+ out($f,"#define USE_OPLINE\n");
+ out($f,"#define LOAD_OPLINE() opline = EX(opline)\n");
+ out($f,"#define SAVE_OPLINE() EX(opline) = opline\n");
+ out($f,"#undef CHECK_EXCEPTION\n");
+ out($f,"#undef HANDLE_EXCEPTION\n");
+ out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
+ out($f,"#define CHECK_EXCEPTION() LOAD_OPLINE()\n");
+ out($f,"#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
+ out($f,"#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()\n");
+ out($f,"#define LOAD_REGS() do {Ts = EX(Ts); CVs = EX(CVs);} while (0)\n");
out($f,"#define ZEND_VM_CONTINUE() goto zend_vm_continue\n");
out($f,"#define ZEND_VM_RETURN() EG(in_execution) = original_in_execution; return\n");
out($f,"#define ZEND_VM_ENTER() op_array = EG(active_op_array); goto zend_vm_enter\n");
@@ -820,10 +862,35 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
out($f,"#define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL execute_data TSRMLS_CC\n");
out($f,"#undef EX\n");
out($f,"#define EX(element) execute_data->element\n\n");
+ out($f,"#undef EX_CV\n");
+ out($f,"#define EX_CV(var) CVs[var]\n");
+ out($f,"#undef EX_CVs\n");
+ out($f,"#define EX_CVs() CVs\n");
+ out($f,"#undef EX_T\n");
+ out($f,"#define EX_T(offset) T(offset)\n");
+ out($f,"#undef EX_Ts\n");
+ out($f,"#define EX_Ts() Ts\n\n");
break;
case ZEND_VM_KIND_GOTO:
out($f,"\n");
- out($f,"#define ZEND_VM_CONTINUE() goto *(void**)(EX(opline)->handler)\n");
+ out($f,"#undef OPLINE\n");
+ out($f,"#undef DCL_OPLINE\n");
+ out($f,"#undef USE_OPLINE\n");
+ out($f,"#undef LOAD_OPLINE\n");
+ out($f,"#undef SAVE_OPLINE\n");
+ out($f,"#define OPLINE opline\n");
+ out($f,"#define DCL_OPLINE zend_op *opline;\n");
+ out($f,"#define USE_OPLINE\n");
+ out($f,"#define LOAD_OPLINE() opline = EX(opline)\n");
+ out($f,"#define SAVE_OPLINE() EX(opline) = opline\n");
+ out($f,"#undef CHECK_EXCEPTION\n");
+ out($f,"#undef HANDLE_EXCEPTION\n");
+ out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
+ out($f,"#define CHECK_EXCEPTION() if (UNEXPECTED(EG(exception) != NULL)) goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
+ out($f,"#define HANDLE_EXCEPTION() goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
+ out($f,"#define HANDLE_EXCEPTION_LEAVE() goto ZEND_HANDLE_EXCEPTION_SPEC_HANDLER\n");
+ out($f,"#define LOAD_REGS() do {Ts = EX(Ts); CVs = EX(CVs);} while (0)\n");
+ out($f,"#define ZEND_VM_CONTINUE() goto *(void**)(OPLINE->handler)\n");
out($f,"#define ZEND_VM_RETURN() EG(in_execution) = original_in_execution; return\n");
out($f,"#define ZEND_VM_ENTER() op_array = EG(active_op_array); goto zend_vm_enter\n");
out($f,"#define ZEND_VM_LEAVE() ZEND_VM_CONTINUE()\n");
@@ -831,6 +898,14 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
out($f,"#define ZEND_OPCODE_HANDLER_ARGS_PASSTHRU_INTERNAL execute_data TSRMLS_CC\n");
out($f,"#undef EX\n");
out($f,"#define EX(element) execute_data->element\n\n");
+ out($f,"#undef EX_CV\n");
+ out($f,"#define EX_CV(var) CVs[var]\n");
+ out($f,"#undef EX_CVs\n");
+ out($f,"#define EX_CVs() CVs\n");
+ out($f,"#undef EX_T\n");
+ out($f,"#define EX_T(offset) T(offset)\n\n");
+ out($f,"#undef EX_Ts\n");
+ out($f,"#define EX_Ts() Ts\n\n");
break;
}
break;
@@ -839,6 +914,8 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
break;
case "HELPER_VARS":
if ($kind != ZEND_VM_KIND_CALL) {
+ out($f,$m[1]."temp_variable *Ts;\n");
+ out($f,$m[1]."zval ***CVs;\n");
if ($kind == ZEND_VM_KIND_SWITCH) {
out($f,$m[1]."opcode_handler_t dispatch_handler;\n");
}
@@ -881,13 +958,13 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
// Emit code that dispatches to opcode handler
switch ($kind) {
case ZEND_VM_KIND_CALL:
- out($f, $m[1]."if ((ret = EX(opline)->handler(execute_data TSRMLS_CC)) > 0)".$m[3]."\n");
+ out($f, $m[1]."if ((ret = OPLINE->handler(execute_data TSRMLS_CC)) > 0)".$m[3]."\n");
break;
case ZEND_VM_KIND_SWITCH:
- out($f, $m[1]."dispatch_handler = EX(opline)->handler;\nzend_vm_dispatch:\n".$m[1]."switch ((int)dispatch_handler)".$m[3]."\n");
+ out($f, $m[1]."dispatch_handler = OPLINE->handler;\nzend_vm_dispatch:\n".$m[1]."switch ((int)dispatch_handler)".$m[3]."\n");
break;
case ZEND_VM_KIND_GOTO:
- out($f, $m[1]."goto *(void**)(EX(opline)->handler);".$m[3]."\n");
+ out($f, $m[1]."goto *(void**)(OPLINE->handler);".$m[3]."\n");
break;
}
break;
@@ -1124,22 +1201,23 @@ function gen_vm($def, $skel) {
// Insert header
out($f, $GLOBALS['header_text']);
-
+
// Suppress free_op1 warnings on Windows
out($f, "#ifdef ZEND_WIN32\n# pragma warning(once : 4101)\n#endif\n");
-
+
// Support for ZEND_USER_OPCODE
- out($f, "static user_opcode_handler_t zend_user_opcode_handlers[256] = {");
+ out($f, "static user_opcode_handler_t zend_user_opcode_handlers[256] = {\n");
for ($i = 0; $i < 255; ++$i) {
- out($f, "(user_opcode_handler_t)NULL,");
+ out($f, "\t(user_opcode_handler_t)NULL,\n");
}
- out($f, "(user_opcode_handler_t)NULL};\n\n");
+ out($f, "\t(user_opcode_handler_t)NULL\n};\n\n");
out($f, "static zend_uchar zend_user_opcodes[256] = {");
for ($i = 0; $i < 255; ++$i) {
+ if ($i % 16 == 1) out($f, "\n\t");
out($f, "$i,");
}
- out($f, "255};\n\n");
+ out($f, "255\n};\n\n");
// Generate specialized executor
gen_executor($f, $skl, ZEND_VM_SPEC, ZEND_VM_KIND, "execute", "zend_init_opcodes_handlers", 0);
@@ -1149,6 +1227,12 @@ function gen_vm($def, $skel) {
out($f,"\n/* Old executor */\n\n");
out($f,"#undef EX\n");
out($f,"#define EX(element) execute_data.element\n\n");
+ out($f,"#undef EX_CV\n");
+ out($f,"#define EX_CV(var) EX(CVs)[var]\n");
+ out($f,"#undef EX_CVs\n");
+ out($f,"#define EX_CVs() EX(CVs)\n");
+ out($f,"#undef EX_T\n");
+ out($f,"#define EX_T(offset) (*(temp_variable *)((char *) EX(Ts) + offset))\n\n");
out($f,"#undef ZEND_VM_CONTINUE\n\n");
out($f,"#undef ZEND_VM_RETURN\n\n");
out($f,"#undef ZEND_VM_ENTER\n\n");
@@ -1188,7 +1272,7 @@ function gen_vm($def, $skel) {
out($f, "\t\t\t_UNUSED_CODE, /* 15 */\n");
out($f, "\t\t\t_CV_CODE /* 16 = IS_CV */\n");
out($f, "\t\t};\n");
- out($f, "\t\treturn zend_opcode_handlers[opcode * 25 + zend_vm_decode[op->op1.op_type] * 5 + zend_vm_decode[op->op2.op_type]];\n");
+ out($f, "\t\treturn zend_opcode_handlers[opcode * 25 + zend_vm_decode[op->op1_type] * 5 + zend_vm_decode[op->op2_type]];\n");
if (ZEND_VM_OLD_EXECUTOR) {
out($f, "\t}\n");
}
@@ -1205,8 +1289,30 @@ function gen_vm($def, $skel) {
if (count($export) > 0 &&
!ZEND_VM_OLD_EXECUTOR &&
ZEND_VM_KIND != ZEND_VM_KIND_CALL) {
+ out($f,"#undef OPLINE\n");
+ out($f,"#undef DCL_OPLINE\n");
+ out($f,"#undef USE_OPLINE\n");
+ out($f,"#undef LOAD_OPLINE\n");
+ out($f,"#undef SAVE_OPLINE\n");
+ out($f,"#define OPLINE EX(opline)\n");
+ out($f,"#define DCL_OPLINE\n");
+ out($f,"#define USE_OPLINE zend_op *opline = EX(opline);\n");
+ out($f,"#define LOAD_OPLINE()\n");
+ out($f,"#define SAVE_OPLINE()\n");
+ out($f,"#undef CHECK_EXCEPTION\n");
+ out($f,"#undef HANDLE_EXCEPTION\n");
+ out($f,"#undef HANDLE_EXCEPTION_LEAVE\n");
+ out($f,"#define CHECK_EXCEPTION() LOAD_OPLINE()\n");
+ out($f,"#define HANDLE_EXCEPTION() LOAD_OPLINE(); ZEND_VM_CONTINUE()\n");
+ out($f,"#define HANDLE_EXCEPTION_LEAVE() LOAD_OPLINE(); ZEND_VM_LEAVE()\n");
out($f,"#undef EX\n");
out($f,"#define EX(element) execute_data->element\n\n");
+ out($f,"#undef EX_CV\n");
+ out($f,"#define EX_CV(var) EX(CVs)[var]\n");
+ out($f,"#undef EX_CVs\n");
+ out($f,"#define EX_CVs() EX(CVs)\n");
+ out($f,"#undef EX_T\n");
+ out($f,"#define EX_T(offset) (*(temp_variable *)((char *) EX(Ts) + offset))\n\n");
out($f,"#undef ZEND_VM_CONTINUE\n");
out($f,"#undef ZEND_VM_RETURN\n");
out($f,"#undef ZEND_VM_ENTER\n");
diff --git a/Zend/zend_vm_opcodes.h b/Zend/zend_vm_opcodes.h
index 5786fd7e2..680778c2a 100644
--- a/Zend/zend_vm_opcodes.h
+++ b/Zend/zend_vm_opcodes.h
@@ -129,6 +129,7 @@
#define ZEND_THROW 108
#define ZEND_FETCH_CLASS 109
#define ZEND_CLONE 110
+#define ZEND_RETURN_BY_REF 111
#define ZEND_INIT_METHOD_CALL 112
#define ZEND_INIT_STATIC_METHOD_CALL 113
#define ZEND_ISSET_ISEMPTY_VAR 114
@@ -153,3 +154,8 @@
#define ZEND_USER_OPCODE 150
#define ZEND_JMP_SET 152
#define ZEND_DECLARE_LAMBDA_FUNCTION 153
+#define ZEND_ADD_TRAIT 154
+#define ZEND_BIND_TRAITS 155
+#define ZEND_SEPARATE 156
+#define ZEND_QM_ASSIGN_VAR 157
+#define ZEND_JMP_SET_VAR 158