com php-src: Optimize ZEND_POW (Rouven Weßling) : ext/opcache/Optimizer/pass1_5.c ext/opcache/Opt imizer/pass3.c ext/opcache/ZendAccelerator.h
| From: | Dmitry Stogov | Date: | Sun, 18 May 2014 16:48:16 +0000 |
| Subject: | com php-src: Optimize ZEND_POW (Rouven Weßling) : ext/opcache/Optimizer/pass1_5.c ext/opcache/Opt imizer/pass3.c ext/opcache/ZendAccelerator.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78448@lists.php.net to get a copy of this message | ||
Commit: 3fff53fc5790918bea9a8c04a04a9d8c79ebdbf6
Author: Dmitry Stogov <dmitry@zend.com> Sun, 18 May 2014 20:48:16 +0400
Parents: 1759905a23eb4ae0d0d3181a21da911c51d4fbf4
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3fff53fc5790918bea9a8c04a04a9d8c79ebdbf6
Log:
Optimize ZEND_POW (Rouven Weßling)
Changed paths:
M ext/opcache/Optimizer/pass1_5.c
M ext/opcache/Optimizer/pass3.c
M ext/opcache/ZendAccelerator.h
Diff:
diff --git a/ext/opcache/Optimizer/pass1_5.c b/ext/opcache/Optimizer/pass1_5.c
index 577d1b6..30705ff 100644
--- a/ext/opcache/Optimizer/pass1_5.c
+++ b/ext/opcache/Optimizer/pass1_5.c
@@ -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:
diff --git a/ext/opcache/Optimizer/pass3.c b/ext/opcache/Optimizer/pass3.c
index fd2a190..1ee641c 100644
--- a/ext/opcache/Optimizer/pass3.c
+++ b/ext/opcache/Optimizer/pass3.c
@@ -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;
diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h
index d3fa38e..a25e766 100644
--- a/ext/opcache/ZendAccelerator.h
+++ b/ext/opcache/ZendAccelerator.h
@@ -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