]> granicus.if.org Git - php/commitdiff
Optimize ZEND_POW (Rouven Weßling)
authorDmitry Stogov <dmitry@zend.com>
Sun, 18 May 2014 16:48:16 +0000 (20:48 +0400)
committerDmitry Stogov <dmitry@zend.com>
Sun, 18 May 2014 16:48:16 +0000 (20:48 +0400)
ext/opcache/Optimizer/pass1_5.c
ext/opcache/Optimizer/pass3.c
ext/opcache/ZendAccelerator.h

index 577d1b66098e469fc5d804f40619334ddada157b..30705ff18a84645c31e53bc5fb8984891a7142f0 100644 (file)
@@ -25,6 +25,9 @@ if (ZEND_OPTIMIZER_PASS_1 & OPTIMIZATION_LEVEL) {
                case ZEND_MUL:
                case ZEND_DIV:
                case ZEND_MOD:
+#if ZEND_EXTENSION_API_NO >= PHP_5_6_X_API_NO
+               case ZEND_POW:
+#endif
                case ZEND_SL:
                case ZEND_SR:
                case ZEND_CONCAT:
index fd2a190009738163566ee2ee85ffcd0b69d95de6..1ee641ca52ff33d44fa72429c8cb1f4b939b4957 100644 (file)
@@ -45,6 +45,9 @@ if (ZEND_OPTIMIZER_PASS_3 & OPTIMIZATION_LEVEL) {
                        case ZEND_MUL:
                        case ZEND_DIV:
                        case ZEND_MOD:
+#if ZEND_EXTENSION_API_NO >= PHP_5_6_X_API_NO
+                       case ZEND_POW:
+#endif
                        case ZEND_CONCAT:
                        case ZEND_SL:
                        case ZEND_SR:
@@ -104,6 +107,11 @@ if (ZEND_OPTIMIZER_PASS_3 & OPTIMIZATION_LEVEL) {
                                                        case ZEND_MOD:
                                                                opline->opcode = ZEND_ASSIGN_MOD;
                                                                break;
+#if ZEND_EXTENSION_API_NO >= PHP_5_6_X_API_NO
+                                                       case ZEND_POW:
+                                                               opline->opcode = ZEND_ASSIGN_POW;
+                                                               break;
+#endif
                                                        case ZEND_CONCAT:
                                                                opline->opcode = ZEND_ASSIGN_CONCAT;
                                                                break;
index d3fa38ea665a9b11a26df5ccff1c437344e91359..a25e766244d13d287194d1e2825a77b0075fd812 100644 (file)
@@ -93,6 +93,7 @@
 #define PHP_5_3_X_API_NO               220090626
 #define PHP_5_4_X_API_NO               220100525
 #define PHP_5_5_X_API_NO               220121212
+#define PHP_5_6_X_API_NO               220131226
 
 /*** file locking ***/
 #ifndef ZEND_WIN32