summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_opcodes.c
diff options
context:
space:
mode:
authordatibbaw <datibbaw@php.net>2013-11-19 15:36:06 +0800
committerBob Weinand <bobwei9@hotmail.com>2014-02-06 14:41:21 +0100
commitaff56f3c4539869910cf2778cf0ece2d8c2dd671 (patch)
treee98c54de8656d0684fba10018abadbba81a4feb4 /Zend/zend_vm_opcodes.c
parentdf76fd8997ef503c5fee479c7349c47996a0c781 (diff)
downloadphp-git-aff56f3c4539869910cf2778cf0ece2d8c2dd671.tar.gz
add T_POW (**) operator
Fixed recognition of the operator Added opcode, still doing multiply instead of pow() opcode now always returns int(42) The right answer, but always a float Yanked code from pow() implementation. Should not handle negative long as exponent ourselves Added test cases from pow() Moved precedence higher than '~' Added GMP operator overloading Added ZEND_ASSIGN_POW (**=) operator. Added pow() as a language construct. Adjusted test cases for changed precedence. Reduced pow() to shell function around ZEND_API pow_function() Reduced test case to only contain edge cases Added overloading test case Moved unary minus above T_POW Revert "Added pow() as a language construct." Bad bad bad idea. This reverts commit f60b98cf7a8371233d800a6faa286ddba4432d02. Reverted unary minus behaviour due to previous revert. Convert arrays to int(0) Exponent with array as a base becomes int(0) Rebase against master Fixed tokenizer test case
Diffstat (limited to 'Zend/zend_vm_opcodes.c')
-rw-r--r--Zend/zend_vm_opcodes.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_vm_opcodes.c b/Zend/zend_vm_opcodes.c
index d6f51cce5c..23edabc47f 100644
--- a/Zend/zend_vm_opcodes.c
+++ b/Zend/zend_vm_opcodes.c
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <zend.h>
-const char *zend_vm_opcodes_map[166] = {
+const char *zend_vm_opcodes_map[168] = {
"ZEND_NOP",
"ZEND_ADD",
"ZEND_SUB",
@@ -188,6 +188,8 @@ const char *zend_vm_opcodes_map[166] = {
"ZEND_FAST_RET",
"ZEND_RECV_VARIADIC",
"ZEND_SEND_UNPACK",
+ "ZEND_POW",
+ "ZEND_ASSIGN_POW",
};
ZEND_API const char* zend_get_opcode_name(zend_uchar opcode) {