| Andi Gutmans 2004-04-03, 7:30 am |
| andi Sat Apr 3 06:09:45 2004 EDT
Modified files:
/ZendEngine2 zend.h zend_operators.c zend_operators.h
Log:
- Nuke code which hasn't been in use for ages.
http://cvs.php.net/diff.php/ZendEng...3&r2=1.244&ty=u
Index: ZendEngine2/zend.h
diff -u ZendEngine2/zend.h:1.243 ZendEngine2/zend.h:1.244
--- ZendEngine2/zend.h:1.243 Tue Mar 30 13:36:53 2004
+++ ZendEngine2/zend.h Sat Apr 3 06:09:38 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h,v 1.243 2004/03/30 18:36:53 helly Exp $ */
+/* $Id: zend.h,v 1.244 2004/04/03 11:09:38 andi Exp $ */
#ifndef ZEND_H
#define ZEND_H
@@ -395,9 +395,6 @@
#define IS_CONSTANT 8
#define IS_CONSTANT_ARRAY 9
-/* Special data type to temporarily mark large numbers */
-#define FLAG_IS_BC 10 /* for parser internal use only */
-
/* Ugly hack to support constants as static array indices */
#define IS_CONSTANT_INDEX 0x80
http://cvs.php.net/diff.php/ZendEng...9&r2=1.190&ty=u
Index: ZendEngine2/zend_operators.c
diff -u ZendEngine2/zend_operators.c:1.189 ZendEngine2/zend_operators.c:1.190
--- ZendEngine2/zend_operators.c:1.189 Sun Mar 28 07:08:26 2004
+++ ZendEngine2/zend_operators.c Sat Apr 3 06:09:38 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_operators.c,v 1.189 2004/03/28 12:08:26 stas Exp $ */
+/* $Id: zend_operators.c,v 1.190 2004/04/03 11:09:38 andi Exp $ */
#include <ctype.h>
@@ -118,11 +118,6 @@
case IS_DOUBLE:
case IS_LONG:
break;
-#if 0 && HAVE_BCMATH
- case FLAG_IS_BC:
- op->type = IS_DOUBLE; /* may have lost significant digits */
- break;
-#endif
default:
op->value.lval = strtol(op->value.str.val, NULL, 10);
op->type = IS_LONG;
@@ -161,9 +156,6 @@
case IS_DOUBLE: \
case IS_LONG: \
break; \
- case FLAG_IS_BC: \
- (holder).type = IS_DOUBLE; /* may have lost significant digits */ \
- break; \
default: \
(holder).value.lval = strtol((op)->value.str.val, NULL, 10); \
(holder).type = IS_LONG; \
@@ -1654,10 +1646,6 @@
op1->type = IS_DOUBLE;
efree(strval); /* should never be empty_string */
break;
-#if 0
- case FLAG_IS_BC:
- /* Not implemented */
-#endif
default:
/* Perl style string increment */
increment_string(op1);
@@ -1847,22 +1835,6 @@
if ((ret1=is_numeric_string(s1->value.str.val, s1->value.str.len, &lval1, &dval1, 0)) &&
(ret2=is_numeric_string(s2->value.str.val, s2->value.str.len, &lval2, &dval2, 0))) {
-#if 0&&HAVE_BCMATH
- if ((ret1==FLAG_IS_BC) || (ret2==FLAG_IS_BC)) {
- bc_num first, second;
-
- /* use the BC math library to compare the numbers */
- init_num(&first);
- init_num(&second);
- str2num(&first, s1->value.str.val, 100); /* this scale should do */
- str2num(&second, s2->value.str.val, 100); /* ditto */
- result->value.lval = bc_compare(first, second);
- result->value.lval = ZEND_NORMALIZE_BOOL(result->value.lval);
- result->type = IS_LONG;
- free_num(&first);
- free_num(&second);
- } else
-#endif
if ((ret1==IS_DOUBLE) || (ret2==IS_DOUBLE)) {
if (ret1!=IS_DOUBLE) {
dval1 = strtod(s1->value.str.val, NULL);
http://cvs.php.net/diff.php/ZendEng...87&r2=1.88&ty=u
Index: ZendEngine2/zend_operators.h
diff -u ZendEngine2/zend_operators.h:1.87 ZendEngine2/zend_operators.h:1.88
--- ZendEngine2/zend_operators.h:1.87 Thu Mar 4 06:02:05 2004
+++ ZendEngine2/zend_operators.h Sat Apr 3 06:09:39 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_operators.h,v 1.87 2004/03/04 11:02:05 derick Exp $ */
+/* $Id: zend_operators.h,v 1.88 2004/04/03 11:09:39 andi Exp $ */
#ifndef ZEND_OPERATORS_H
#define ZEND_OPERATORS_H
@@ -98,9 +98,9 @@
errno=0;
local_dval = strtod(str, &end_ptr_double);
- if (errno!=ERANGE) {
+ if (errno != ERANGE) {
if (end_ptr_double == str+length) { /* floating point string */
- if (! zend_finite(local_dval)) {
+ if (!zend_finite(local_dval)) {
/* "inf","nan" and maybe other weird ones */
return 0;
}
@@ -108,28 +108,7 @@
if (dval) {
*dval = local_dval;
}
-#if 0&&HAVE_BCMATH
- if (length>16) {
- register char *ptr=str, *end=str+length;
-
- while (ptr<end) {
- switch (*ptr++) {
- case 'e':
- case 'E':
- /* scientific notation, not handled by the BC library */
- return IS_DOUBLE;
- break;
- default:
- break;
- }
- }
- return FLAG_IS_BC;
- } else {
- return IS_DOUBLE;
- }
-#else
return IS_DOUBLE;
-#endif
}
} else {
end_ptr_double=NULL;
|